Disable global split tunneling if a non-default route exists in the Wireguard configuration
This commit is contained in:
parent
195bdb947e
commit
b0dcae3586
5 changed files with 31 additions and 20 deletions
|
|
@ -43,7 +43,13 @@ abstract class Protocol {
|
|||
|
||||
abstract fun reconnectVpn(vpnBuilder: Builder)
|
||||
|
||||
protected fun ProtocolConfig.Builder.configSplitTunnel(config: JSONObject) {
|
||||
protected fun ProtocolConfig.Builder.configSplitTunneling(config: JSONObject) {
|
||||
if (!allowSplitTunneling) {
|
||||
Log.i(TAG, "Global address split tunneling is prohibited, " +
|
||||
"only tunneling from the protocol config is used")
|
||||
return
|
||||
}
|
||||
|
||||
val splitTunnelType = config.optInt("splitTunnelType")
|
||||
if (splitTunnelType == SPLIT_TUNNEL_DISABLE) return
|
||||
val splitTunnelSites = config.getJSONArray("splitTunnelSites")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue