Properly support proper VPNs
It turns out that not using masquerade will not work with real VPNs (as opposed to dummy ones, including adblockers and sockifiers). Fixes #10.
This commit is contained in:
@@ -52,7 +52,7 @@ class TetheringService : Service(), VpnMonitor.Callback, IpNeighbourMonitor.Call
|
||||
for ((downstream, value) in routings) if (value == null) try {
|
||||
// system tethering already has working forwarding rules
|
||||
// so it doesn't make sense to add additional forwarding rules
|
||||
val routing = Routing(upstream, downstream).rule().forward().dnsRedirect(dns)
|
||||
val routing = Routing(upstream, downstream).rule().forward().masquerade().dnsRedirect(dns)
|
||||
if (routing.start()) routings[downstream] = routing else {
|
||||
failed = true
|
||||
routing.stop()
|
||||
|
||||
Reference in New Issue
Block a user