Add Wireguard maunal config
No support for export and import via links yet
This commit is contained in:
1 parent
61654aefeb
commit
e304dce347
14 files changed
+257
-24
No files matched your search
@@ -402,7 +402,6 @@ object V2rayConfigUtil {
|
||||
private fun updateOutboundWithGlobalSettings(outbound: V2rayConfig.OutboundBean): Boolean {
|
||||
try {
|
||||
var muxEnabled = settingsStorage?.decodeBool(AppConfig.PREF_MUX_ENABLED, false)
|
||||
|
||||
val protocol = outbound.protocol
|
||||
if (protocol.equals(EConfigType.SHADOWSOCKS.name, true)
|
||||
|| protocol.equals(EConfigType.SOCKS.name, true)
|
||||
@@ -414,7 +413,6 @@ object V2rayConfigUtil {
|
||||
) {
|
||||
muxEnabled = false
|
||||
}
|
||||
|
||||
if (muxEnabled == true) {
|
||||
outbound.mux?.enabled = true
|
||||
outbound.mux?.concurrency =
|
||||
@@ -428,6 +426,14 @@ object V2rayConfigUtil {
|
||||
outbound.mux?.concurrency = -1
|
||||
}
|
||||
|
||||
if (protocol.equals(EConfigType.WIREGUARD.name, true)) {
|
||||
val localTunAddr = mutableListOf("172.16.0.2/32")
|
||||
if (settingsStorage?.decodeBool(AppConfig.PREF_PREFER_IPV6) == true) {
|
||||
localTunAddr.add("2606:4700:110:8f81:d551:a0:532e:a2b3/128")
|
||||
}
|
||||
outbound.settings?.address = localTunAddr
|
||||
}
|
||||
|
||||
if (outbound.streamSettings?.network == DEFAULT_NETWORK
|
||||
&& outbound.streamSettings?.tcpSettings?.header?.type == HTTP
|
||||
) {
|
||||
|
||||
Reference in new issue
Block a user