Support strict mode for system tethering

TODO: Set up rules when upstream interface not found.
This commit is contained in:
Mygod
2018-09-03 16:37:54 +08:00
parent 0342d97fb0
commit 89c26fe384
6 changed files with 13 additions and 6 deletions

View File

@@ -55,7 +55,9 @@ class TetheringService : IpNeighbourMonitoringService(), UpstreamMonitor.Callbac
// system tethering already has working forwarding rules
// so it doesn't make sense to add additional forwarding rules
rule()
// here we always enforce strict mode as fallback is handled by system which we disable
forward()
if (app.strict) overrideSystemRules()
if (app.masquerade) masquerade()
dnsRedirect(dns)
if (app.pref.getBoolean("service.disableIpv6", false)) disableIpv6()