Commit 0d75659c authored by Mygod's avatar Mygod

Set VPN flag properly

Refine #2562.
parent 8a70231f
......@@ -102,8 +102,10 @@ class ProxyInstance(val profile: Profile, private val route: String = profile.ro
this.configFile = configFile
val config = profile.toJson()
val vpnFlags = if (service.isVpnService) ";V" else ""
plugin?.let { (path, opts) -> config.put("plugin", path).put("plugin_opts", opts.toString() + vpnFlags) }
plugin?.let { (path, opts) ->
if (service.isVpnService) opts["V"] = ""
config.put("plugin", path).put("plugin_opts", opts.toString())
}
config.put("local_address", DataStore.listenAddress)
config.put("local_port", DataStore.portProxy)
configFile.writeText(config.toString())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment