Giter Site home page Giter Site logo

Comments (18)

krlvm avatar krlvm commented on June 10, 2024

I think you've set your proxy server address as local server address, that's why it can't bind to it.

from powertunnel-android.

xxjoe2 avatar xxjoe2 commented on June 10, 2024

I think you've set your proxy server address as local server address, that's why it can't bind to it.

yes i have a proxy server running. but how come? they are in the same address but with different ports

i have proxy and dns server running on the phone
so i created an alias 10.255.255.1 and set the proxy to listen to this ip. however, powertunnel still failed to start
then, i have stopped those servers and pointing to another upstream proxy server, didnt work. tried to start without upstream proxy, still no luck

any idea to solve this?

from powertunnel-android.

krlvm avatar krlvm commented on June 10, 2024

I mean that PowerTunnel also runs a proxy server locally on your device (port 8085 by default), and you changed its IP address from local (0.0.0.0, 127.0.0.1 or any other accessible interface) so something else, where the proxy can't bind port.

You can try clearing the application data.

from powertunnel-android.

xxjoe2 avatar xxjoe2 commented on June 10, 2024

I mean that PowerTunnel also runs a proxy server locally on your device (port 8085 by default), and you changed its IP address from local (0.0.0.0, 127.0.0.1 or any other accessible interface) so something else, where the proxy can't bind port.

You can try clearing the application data.

i have tried to set powertunnel to listen on 192.168 10.1 but it still didint start

and it should not cause any problem even they are listening to the same ip (different ports). i installed powertunnel on another non-root device with orbot installed and both of them are listening to 127.0.0.1 without problem

it's weird

been uninstalled and reinstalled a few times, so not caching or data problem

from powertunnel-android.

krlvm avatar krlvm commented on June 10, 2024

Are you using a custom ROM?

from powertunnel-android.

xxjoe2 avatar xxjoe2 commented on June 10, 2024

yes, rooted
samsung, android Q

from powertunnel-android.

krlvm avatar krlvm commented on June 10, 2024

Seems like an issue with ROM, and the logs don't shed enough light on this, I can hardly do anything about it

from powertunnel-android.

xxjoe2 avatar xxjoe2 commented on June 10, 2024

that was an excerpt which contains critial logs

here you are the full log, after successfully resolved localhost
https://paste.c-net.org/ParishPuppet

from powertunnel-android.

krlvm avatar krlvm commented on June 10, 2024

The error is, in fact, on the system side.

15388 27727 I TunnelingVpnService: Establishing VPN Service...
15388 27727 E TunnelingVpnService: Failed to establish VPN Service: Cannot set address
15388 27727 E TunnelingVpnService: java.lang.IllegalStateException: Cannot set address
15388 27727 E TunnelingVpnService: 	at android.os.Parcel.createException(Parcel.java:2096)
15388 27727 E TunnelingVpnService: 	at android.os.Parcel.readException(Parcel.java:2056)
15388 27727 E TunnelingVpnService: 	at android.os.Parcel.readException(Parcel.java:2004)
15388 27727 E TunnelingVpnService: 	at android.net.IConnectivityManager$Stub$Proxy.establishVpn(IConnectivityManager.java:4048)
15388 27727 E TunnelingVpnService: 	at android.net.VpnService$Builder.establish(VpnService.java:1133)
15388 27727 E TunnelingVpnService: 	at io.github.krlvm.powertunnel.android.services.TunnelingVpnService.connect(TunnelingVpnService.java:155)
15388 27727 E TunnelingVpnService: 	at io.github.krlvm.powertunnel.android.services.TunnelingVpnService.lambda$onStartCommand$0$io-github-krlvm-powertunnel-android-services-TunnelingVpnService(TunnelingVpnService.java:105)
15388 27727 E TunnelingVpnService: 	at io.github.krlvm.powertunnel.android.services.TunnelingVpnService$$ExternalSyntheticLambda0.accept(Unknown Source:4)
15388 27727 E TunnelingVpnService: 	at io.github.krlvm.powertunnel.android.managers.ProxyManager.lambda$start$0$io-github-krlvm-powertunnel-android-managers-ProxyManager(ProxyManager.java:128)
15388 27727 E TunnelingVpnService: 	at io.github.krlvm.powertunnel.android.managers.ProxyManager$$ExternalSyntheticLambda0.run(Unknown Source:2)
15388 27727 E TunnelingVpnService: 	at java.lang.Thread.run(Thread.java:919)
15388 27727 E TunnelingVpnService: Caused by: android.os.RemoteException: Remote stack trace:
15388 27727 E TunnelingVpnService: 	at com.android.server.connectivity.Vpn.jniSetAddresses(Native Method)
15388 27727 E TunnelingVpnService: 	at com.android.server.connectivity.Vpn.establish(Vpn.java:1303)
15388 27727 E TunnelingVpnService: 	at com.android.server.ConnectivityService.establishVpn(ConnectivityService.java:5644)
15388 27727 E TunnelingVpnService: 	at android.net.IConnectivityManager$Stub.onTransact(IConnectivityManager.java:1730)
15388 27727 E TunnelingVpnService: 	at android.os.Binder.execTransactInternal(Binder.java:1056)
15388 27727 E TunnelingVpnService: 
15388 27727 W TunnelingVpnService: VPN Service is still not established, stopping...

Other parts of this log are irrelevant.

If you have root access, you can run PowerTunnel in proxy mode and set 127.0.0.1:8085 as a global system proxy.

from powertunnel-android.

xxjoe2 avatar xxjoe2 commented on June 10, 2024

yeah i agreed after reading the log and some source codes
however i have no problem when using other vpn like orbot and some real vpn apps. so maybe different implementation? or android q is not supported by powertunnel?

i have another socks proxy server running on the phone. i don need to run it as proxy mode and forward it to my another local upstream proxy. what i want is to run it as vpn mode to make it possible to dirvert other apps/traffic

from powertunnel-android.

krlvm avatar krlvm commented on June 10, 2024

Other VPNs work fine because they are VPNs indeed, while PowerTunnel's VPN is just a local packet interceptor

from powertunnel-android.

xxjoe2 avatar xxjoe2 commented on June 10, 2024

i see

so it's could be due to hardware like the check for samsung model starts with sm- in the sources (mine isnt sm series) or ROM issue

any idea which particular area(s) in the rom? vpn connection? the protocol used/encryption etc, or what? may be i can port it to my phone

edit
i have read VPNService.java and learned that it will throw an illegalStateException if the parama are invalid. and in the establish function, there are 2 params:

mConfig.addresses = mAddresses;

 mConfig.routes = mRoutes;

according to the doc either one can cause an error. so how can i know if it is the address or routes, or both, causing the problem?

edit 2
i just found this https://www.sonicwall.com/support/knowledge-base/mobile-connect-fails-to-establish-sslvpn-connection-with-error-cannot-create-interface/170505292313010/ which shows the same problem but it's for android 4 ice cream.

but still, i am unable to locate the problem area

from powertunnel-android.

krlvm avatar krlvm commented on June 10, 2024

If you reinstall the application, do you see something like this?

image

from powertunnel-android.

xxjoe2 avatar xxjoe2 commented on June 10, 2024

vpndialog, yes

rn i am looking for similar forks to see if they can get connected

from powertunnel-android.

xxjoe2 avatar xxjoe2 commented on June 10, 2024

found this, a fork of raise-isayan's TunProxy
https://github.com/yehgdotnet/mobileptrepo/blob/master/android/tunproxy.apk

failed to start too with same errors. so it must be within TunProxy

from powertunnel-android.

xxjoe2 avatar xxjoe2 commented on June 10, 2024

sigh..... i got it....

from one of the forks, i found this in the log
Cannot add address: fd00:1:fd00:1:fd00:1:fd00:1/128: Permission denied

so, i know what's wrong, coz i disabled ipv6 by default
and after i re-enabled ipv6, powertunnel started successfully

so,
1/. can you please make ipv6 optional?
2/. more description about the settings will be great (perhaps most devs hate docs like me), eg

  • under dns, DNSSec (i know what this is but most people dont)
  • under settings, allow request to origin server (?)

most of them are quite technical, may be you assumed most us are advanced users. but for instance, i understand what transparent mode and strict dns mode are, but i am not very sure what "allow requests to origin server" means. do you mean cross-origin server? just wild guess :D

anyway, thanks a lot for your time and help

looking forward to see more features

from powertunnel-android.

krlvm avatar krlvm commented on June 10, 2024

I'll make IPv6 an optional feature.

When "Allow requests to origin server" is disabled, LittleProxy rejects HTTP requests if they are direct requests to proxy, i.e. if they treat the proxy server as the origin server - such requests does not have the HTTP scheme in the URI.

from powertunnel-android.

xxjoe2 avatar xxjoe2 commented on June 10, 2024

I'll make IPv6 an optional feature.

When "Allow requests to origin server" is disabled, LittleProxy rejects HTTP requests if they are direct requests to proxy, i.e. if they treat the proxy server as the origin server - such requests does not have the HTTP scheme in the URI.

that's great, thanks!

ok, so it is X-Forwarded-For i believe, which does not affect socks proxies

from powertunnel-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.