orbot
orbot copied to clipboard
VPN Mode not working on Nougat
As of now, I am testing latest code on master branch with HEAD (0636eacb) and VPN mode is not working on my Nougat tablet running lineage-14.1. The logs show that orbot bootstraps sucessfuly and I do not see any obvious errors. When I check my IP address in my default web browser, it is unchanged when VPN mode is enabled. Orbot works fine when VPN mode is disabled. I have also tried using the VPN on selected apps only, but that is also unsuccessful. Other applications that use VPN, such as OpenVPN, work as expected. I'm not really sure how pdnsd was even being tested on the latest releases since I just discovered it was not getting included in the apk files with the latest sources. I just fixed pdnsd so that it gets included in the apk files now with this PR: https://github.com/guardianproject/orbot/pull/477
I've also noticed that the released Orbot apks on github are marked as "release" builds, but some of the libs have not been stripped. When I create my own builds of orbot, the libs in the apks are all stripped on release builds.
For example, the latest release of Orbot contains libgojni.so which is 24MB. It should be 12MB when stripped.
06-24 23:08:51.704 4879 9451 D OrbotVpnService: starting VPN
06-24 23:08:51.705 4879 9451 D OrbotVpnService: setting VPN ports
06-24 23:08:51.715 4879 9451 D OrbotVpnService: setting VPN ports
06-24 23:08:51.925 4879 9452 D OrbotVpnService: pdsnd conf: global { perm_cache=0; cache_dir=/data/user/0/org.torproject.android/files; server_port = 8092; server_ip = 192.168.200.1; query_method=udp_only; min_ttl=1m; max_ttl=1w; timeout=10; daemon=on; pid_file=/data/user/0/org.torproject.android/files/pdnsd.pid; } server { label= upstream; ip = 127.0.0.1; port = 32943; uptest = none; } rr { name=localhost; reverse=on; a=127.0.0.1; owner=localhost; soa=localhost,root.localhost,42,86400,900,86400,86400; }
06-24 23:08:51.928 4879 4879 E Orbot : onBind
06-24 23:08:51.931 4879 9452 I OrbotVpnService: PDNSD: 139
06-24 23:08:51.932 4879 9452 D Tun2Socks: NOTICE(tun2socks): initializing BadVPN tun2socks 1.999.129
06-24 23:08:51.932 4879 9452 D Tun2Socks: NOTICE(tun2socks): entering event loop
06-24 23:08:54.585 4879 9451 D Orbot : torrc.custom=
06-24 23:08:54.585 4879 9451 D Orbot : RunAsDaemon 0
06-24 23:08:54.585 4879 9451 D Orbot : AvoidDiskWrites 0
06-24 23:08:54.585 4879 9451 D Orbot : SOCKSPort 9050 IPv6Traffic PreferIPv6
06-24 23:08:54.585 4879 9451 D Orbot : SafeSocks 0
06-24 23:08:54.585 4879 9451 D Orbot : TestSocks 0
06-24 23:08:54.585 4879 9451 D Orbot : HTTPTunnelPort 8118
06-24 23:08:54.585 4879 9451 D Orbot : ReducedConnectionPadding 1
06-24 23:08:54.585 4879 9451 D Orbot : CircuitPadding 1
06-24 23:08:54.585 4879 9451 D Orbot : ReducedCircuitPadding 1
06-24 23:08:54.585 4879 9451 D Orbot : TransPort auto
06-24 23:08:54.585 4879 9451 D Orbot : DNSPort auto
06-24 23:08:54.585 4879 9451 D Orbot : VirtualAddrNetwork 10.192.0.0/10
06-24 23:08:54.585 4879 9451 D Orbot : AutomapHostsOnResolve 1
06-24 23:08:54.585 4879 9451 D Orbot : DormantClientTimeout 10 minutes
06-24 23:08:54.585 4879 9451 D Orbot : DormantCanceledByStartup 1
06-24 23:08:54.585 4879 9451 D Orbot : DisableNetwork 0
06-24 23:08:54.585 4879 9451 D Orbot : UseBridges 0
06-24 23:08:54.585 4879 9451 D Orbot : GeoIPFile /data/data/org.torproject.android/files/geoip
06-24 23:08:54.585 4879 9451 D Orbot : GeoIPv6File /data/data/org.torproject.android/files/geoip6
06-24 23:08:54.585 4879 9451 D Orbot : StrictNodes 0
06-24 23:08:54.585 4879 9451 D Orbot : ClientOnionAuthDir /data/user/0/org.torproject.android/files/v3_client_auth
06-24 23:08:54.585 4879 9451 D Orbot :
06-24 23:08:54.585 4879 9451 D Orbot :
06-24 23:08:54.592 4879 9451 D OrbotVpnService: setting VPN ports
06-24 23:08:54.592 4879 9451 D OrbotVpnService: setting VPN ports
06-24 23:08:54.655 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {GENERAL} Tor 0.4.5.9-dev (git-cc90b96a0389d147) running on Linux with Libevent 2.1.11-stable, OpenSSL 1.1.1l-dev, Zlib 1.2.8, Liblzma 5.2.5, Libzstd 1.4.9 and Unknown N/A as libc.
06-24 23:08:54.655 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {GENERAL} Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
06-24 23:08:54.655 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {CONFIG} Read configuration file "/data/user/0/org.torproject.android/app_TorService/torrc-defaults".
06-24 23:08:54.655 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {CONFIG} Read configuration file "/data/user/0/org.torproject.android/app_TorService/torrc".
06-24 23:08:54.662 4879 4879 V Orbot : Waiting for Tor Control Connection...
06-24 23:08:54.683 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {GENERAL} Tor 0.4.5.9-dev (git-cc90b96a0389d147) running on Linux with Libevent 2.1.11-stable, OpenSSL 1.1.1l-dev, Zlib 1.2.8, Liblzma 5.2.5, Libzstd 1.4.9 and Unknown N/A as libc.
06-24 23:08:54.683 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {GENERAL} Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
06-24 23:08:54.683 4879 4970 I GoLog : Jun 24 23:08:54.000 [warn] {GENERAL} This build of Tor has been compiled with one or more options that might make it less reliable or secure! They are: --enable-restart-debugging
06-24 23:08:54.683 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {CONFIG} Read configuration file "/data/user/0/org.torproject.android/app_TorService/torrc-defaults".
06-24 23:08:54.683 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {CONFIG} Read configuration file "/data/user/0/org.torproject.android/app_TorService/torrc".
06-24 23:08:54.689 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {NET} Opening Socks listener on 127.0.0.1:9050
06-24 23:08:54.690 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {NET} Opened Socks listener connection (ready) on 127.0.0.1:9050
06-24 23:08:54.690 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {NET} Opening DNS listener on 127.0.0.1:0
06-24 23:08:54.690 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {NET} DNS listener listening on port 57301.
06-24 23:08:54.690 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {NET} Opened DNS listener connection (ready) on 127.0.0.1:57301
06-24 23:08:54.690 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {NET} Opening Transparent pf/netfilter listener on 127.0.0.1:0
06-24 23:08:54.690 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {NET} Transparent pf/netfilter listener listening on port 46755.
06-24 23:08:54.690 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {NET} Opened Transparent pf/netfilter listener connection (ready) on 127.0.0.1:46755
06-24 23:08:54.690 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {NET} Opening HTTP tunnel listener on 127.0.0.1:8118
06-24 23:08:54.690 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {NET} Opened HTTP tunnel listener connection (ready) on 127.0.0.1:8118
06-24 23:08:54.690 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {NET} Opening Control listener on /data/user/0/org.torproject.android/app_TorService/data/ControlSocket
06-24 23:08:54.690 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {NET} Opened Control listener connection (ready) on /data/user/0/org.torproject.android/app_TorService/data/ControlSocket
06-24 23:08:54.711 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {GENERAL} Parsing GEOIP IPv4 file /data/data/org.torproject.android/files/geoip.
06-24 23:08:54.996 4879 4970 I GoLog : Jun 24 23:08:54.000 [notice] {GENERAL} Parsing GEOIP IPv6 file /data/data/org.torproject.android/files/geoip6.
06-24 23:08:55.153 4879 4970 I GoLog : Jun 24 23:08:55.000 [notice] {CONTROL} Bootstrapped 0% (starting): Starting
06-24 23:08:55.869 4879 4970 I GoLog : Jun 24 23:08:55.000 [notice] {GUARD} Starting with guard context "default"
06-24 23:08:55.884 4879 4970 I GoLog : Jun 24 23:08:55.000 [notice] {CONTROL} New control connection opened.
06-24 23:08:55.884 4879 4879 W art : Long monitor contention with owner ControlSocket (9459) at void java.lang.Object.wait!()(Object.java:-2) waiters=0 in java.util.List net.freehaven.tor.control.TorControlConnection.sendAndWaitForResponse(java.lang.String, java.lang.String) for 721ms
06-24 23:08:55.925 4879 4970 I GoLog : Jun 24 23:08:55.000 [notice] {CONTROL} Bootstrapped 5% (conn): Connecting to a relay
06-24 23:08:55.933 4879 9460 D Orbot : orConnStatus (viktortan): LAUNCHED
06-24 23:08:55.941 4879 4879 D OrbotVpnService: setting VPN ports
06-24 23:08:55.941 4879 4879 I Choreographer: Skipped 77 frames! The application may be doing too much work on its main thread.
06-24 23:08:55.942 4879 9461 D OrbotVpnService: is a restart... let's wait for a few seconds
06-24 23:08:55.959 4879 4970 I GoLog : Jun 24 23:08:55.000 [notice] {CONTROL} Bootstrapped 10% (conn_done): Connected to a relay
06-24 23:08:56.031 4879 4970 I GoLog : Jun 24 23:08:56.000 [notice] {CONTROL} Bootstrapped 14% (handshake): Handshaking with a relay
06-24 23:08:56.068 4879 4970 I GoLog : Jun 24 23:08:56.000 [notice] {CONTROL} Bootstrapped 15% (handshake_done): Handshake with a relay done
06-24 23:08:56.069 4879 4970 I GoLog : Jun 24 23:08:56.000 [notice] {CONTROL} Bootstrapped 90% (ap_handshake_done): Handshake finished with a relay to build circuits
06-24 23:08:56.069 4879 4970 I GoLog : Jun 24 23:08:56.000 [notice] {CONTROL} Bootstrapped 95% (circuit_create): Establishing a Tor circuit
06-24 23:08:56.070 4879 9460 D Orbot : orConnStatus (viktortan): CONNECTED
06-24 23:08:56.189 4879 9452 D Tun2Socks: NOTICE(tun2socks): Free TCP connections
06-24 23:08:56.242 4879 4970 I GoLog : Jun 24 23:08:56.000 [notice] {CONTROL} Bootstrapped 100% (done): Done
06-24 23:08:56.280 4879 9452 D Tun2Socks: NOTICE(tun2socks): exiting
06-24 23:08:59.958 4879 9461 D OrbotVpnService: Stopping existing VPN interface
06-24 23:08:59.959 4879 9461 D OrbotVpnService: pdsnd conf: global { perm_cache=0; cache_dir=/data/user/0/org.torproject.android/files; server_port = 8093; server_ip = 192.168.200.1; query_method=udp_only; min_ttl=1m; max_ttl=1w; timeout=10; daemon=on; pid_file=/data/user/0/org.torproject.android/files/pdnsd.pid; } server { label= upstream; ip = 127.0.0.1; port = 57301; uptest = none; } rr { name=localhost; reverse=on; a=127.0.0.1; owner=localhost; soa=localhost,root.localhost,42,86400,900,86400,86400; }
06-24 23:08:59.965 4879 9461 I OrbotVpnService: PDNSD: 0
06-24 23:08:59.965 4879 9461 D Tun2Socks: NOTICE(tun2socks): initializing BadVPN tun2socks 1.999.129
06-24 23:08:59.965 4879 9461 D Tun2Socks: NOTICE(tun2socks): entering event loop
It looks like it could be an issue with "setting VPN ports" or with onBind.
Same problem on nougat for me as well. Not only that, try to press on custom bridges and try writing, the app will crash itself
Sometimes when you off the vpn mode, it will still be in vpn mode
I asked my friend to try the same version of Orbot that I'm using and it worked on his device. We are both using the same version of cm-14.1 (lineage), but have different devices.
The issue on my device seems to be related to when I type "ip route show table tun0", it shows nothing in the routing table for tun0. But, ifconfig shows that tun0 is created. So, I think the problem is with tun2socks not creating the routing table on my device.
I also double checked my kernel patches and all of these are already merged: https://review.lineageos.org/q/topic:%227580-fixvpn%22+(status:open%20OR%20status:merged)
This list is from the following: https://gitlab.com/LineageOS/issues/android/-/issues/2193
And also there is this weird bug,
- start the vpn mode
- Start the tor connecting big tor button
- After it is connected off the tor connection
- Then off the vpn mode and close the application You will see an orbot notification even though it isn't supposed to be there.
Do it exactly in that sequence of events and you will get it
Also when you try to paste custom bridges, orbot crashes