Commit dd2abac2 authored by chenhuaqing's avatar chenhuaqing

refine passing network interface args

parent 403f72fe
......@@ -101,6 +101,9 @@ class ProxyInstance(val profile: Profile, private val route: String = profile.ro
})
}
})
if (DataStore.outboundBindInterface.isNotBlank()) {
config.put("outbound-bind-interface", DataStore.outboundBindInterface)
}
configFile.writeText(config.toString())
Timber.d("prepare start service with config: $config")
......
......@@ -107,4 +107,7 @@ object DataStore : OnPreferenceDataStoreChangeListener {
var dirty: Boolean
get() = privateStore.getBoolean(Key.dirty) ?: false
set(value) = privateStore.putBoolean(Key.dirty, value)
var outboundBindInterface: String
get() = privateStore.getString(Key.outboundBindInterface) ?: ""
set(value) = privateStore.putString(Key.outboundBindInterface, value)
}
......@@ -65,6 +65,7 @@ object Key {
const val plugin = "plugin"
const val pluginConfigure = "plugin.configure"
const val udpFallback = "udpFallback"
const val outboundBindInterface = "outboundBindInterface"
const val dirty = "profileDirty"
......
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