krlvm / PowerTunnel-Android

Powerful and extensible proxy server with anti-censorship functionality for Android
GNU General Public License v3.0
1.64k stars 123 forks source link

Its not connecting in vpn mode #100

Closed olva90 closed 2 years ago

olva90 commented 2 years ago

Power tunnel is not working in my xiaomi redmi note 4x (android 7). After clicking the connect option in the app it immediately try to connect the vpn mode by showing green from red but few seconds later it become red again and not connecting to vpn. Also want to mention that i didn't change any option in the app, just install and click the connect option. Is that a bug?

krlvm commented 2 years ago

Will the previous version work?

olva90 commented 2 years ago

I just tried 1.9.1 and its working

KAGEYAM4 commented 2 years ago

Will the previous version work?

it's happening on my device too.. currently using 1.9.1..

Please tell us how can we assist you in resolving this bug.. i can test and send logs if there is a way .. i am on rooted device

krlvm commented 2 years ago

Thanks for your willingness to help.

A small digression for context: I've rewrote the entire PowerTunnel foundation in version 2.0 release, including proxy server and Android VPN Service management stack, which resulted in breaking network connection on some Android devices when PowerTunnel is working (so I don't even push version 2.0 to more users). This could came either from a bug in proxy server implementation, either from a bug from the basic VPN Service DNS resolving (however, all works flawlessly on all my devices, including Android 5, 6, 7, 8, 9 and 10 devices). Related issue: #82

It was not clear from your post if everything works with version 1.9.1? Are you able to connect to the blocked sites on version 2.0 or the Internet connection does not work at all after connecting to PowerTunnel VPN? What firmware and Android version are you using?

To identify the problematic component in the circuit, try to test version 2.0 in proxy server mode, to do this, go to the settings and switch the VPN to proxy mode. After that, try setting "127.0.0.1:8085" as a proxy server in your WiFi settings if you are connected via WiFi, or using a browser that supports setting a proxy server, such as Bromite (screenshot) or Firefox (using FoxyProxy extension, proxy type is HTTPS/SSL). If you cannot establish a connection, then the problem is definitely in the proxy server.

KAGEYAM4 commented 2 years ago

Ok here you go .. Tested all the things you mentioned ..

CustomRom-SparkOS-Tempest-UNOFFICIAL-RMX1851-20211230 December 5, 2021 Security Patch Android 12

Power Tunnel 1.9.1 -- Using at default config with VPN mode .. everything works perfectly..Blocked sites are accessible.

Powert Tunnel 2.0-- Default config VPN Mode-- Youtube and instagram App working but speed is slow as compared to 1.9.1 , Octodroid Apo is not working.... browser are not working.. Bromite and OH browser..( Web surfing is not avilable) Blocked sites are also not working

Proxy Mode- Went to proxy in bromite and changed there to custom proxy like you said .. Blocked sites are working.. Apps are working..

OH Browser-- it does not has proxy settings ... so blocked sites are not working here but normal web surfing is available.

krlvm commented 2 years ago

Thank you very much for detailed response.

While I'm thinking what can be the root problem, I remembered that the one change I did to the VPN stack was #73. Please, try this build: PowerTunnel-100-RH.zip

KAGEYAM4 commented 2 years ago

PowerTunnel-100-RH.zip default config.. VPN MODE...this is working.. perfectly.... blocked sites are accessible.. web surfing woking.. apps woking

krlvm commented 2 years ago

Thanks a lot for your help! I will release a version with fix soon.

KAGEYAM4 commented 2 years ago

✌️.. Thanks for this great app ... android and windows... both are awesome ..love this project...

krlvm commented 2 years ago

Fix is available in version 2.0.1, you need to enable option named "Resolve domain names" in VPN category of settings. Please, check if it works for you. Disclaimer: it breaks AdBlock plugin because I could introduce it only by disabling the option I suggest to enable now.

KAGEYAM4 commented 2 years ago

Thanks for the Quick Fix.. It works now.. AdBlock Plugin - it's ok ... you can take your time there .... Thanks again

krlvm commented 2 years ago

@PhoenixCODE2322, I think I've managed to find the root case of the problem and looks like it's completely fixed in development branch even without additional hacky options, can you confirm?

PowerTunnel-v2.1-dev.zip

KAGEYAM4 commented 2 years ago

@PhoenixCODE2322, I think I've managed to find the root case of the problem and looks like it's completely fixed in development branch even without additional hacky options, can you confirm?

PowerTunnel-v2.1-dev.zip

ok will test it now, can you tell me which specific things i need to test ?

krlvm commented 2 years ago

Thank you, if the issue is fixed, all should work fine without modifying any configuration.

KAGEYAM4 commented 2 years ago

reporting-

1) VPN mode, default config ..... everything works 2) VPN mode, adblock plugin on , everything else default ---- working perfectly

KAGEYAM4 commented 2 years ago

Thanks for the fix.. great work 👍

krlvm commented 2 years ago

Thanks for confirming, now the hostnames are always extracted properly, so it is also possible to use government blacklists and AdBlock plugin without stability issues.