Delete redundant fields (#6216)

This commit is contained in:
DHR60 authored and GitHub committed 2026-09-11 19:32:23 +08:00
1 parent 200c59f773
commit b9c2decb34
3 files changed
+160 -199

No files matched your search

+71 -91
View File
@@ -1,106 +1,86 @@
{ {
"stats":{}, "stats": {},
"log": { "log": {
"loglevel": "warning" "loglevel": "warning"
}, },
"policy":{ "policy": {
"levels": { "levels": {
"8": { "8": {
"handshake": 4, "handshake": 4,
"connIdle": 300, "connIdle": 300,
"uplinkOnly": 1, "uplinkOnly": 1,
"downlinkOnly": 1 "downlinkOnly": 1
}
},
"system": {
"statsOutboundUplink": true,
"statsOutboundDownlink": true
}
},
"inbounds": [
{
"tag": "socks",
"port": 10808,
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": true,
"userLevel": 8
},
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls",
"quic"
]
}
}
],
"outbounds": [
{
"tag": "proxy",
"protocol": "vmess",
"settings": {
"address": "v2ray.cool",
"port": 10086
},
"streamSettings": {
"network": "tcp"
},
"mux": {
"enabled": false
}
},
{
"protocol": "freedom",
"streamSettings": {
"sockopt": {
"domainStrategy": "UseIP",
"happyEyeballs": {
"tryDelayMs": 250,
"interleave": 2
}
} }
}, },
"system": { "tag": "direct"
"statsOutboundUplink": true,
"statsOutboundDownlink": true
}
},
"inbounds": [{
"tag": "socks",
"port": 10808,
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": true,
"userLevel": 8
}, },
"sniffing": { {
"enabled": true, "protocol": "blackhole",
"destOverride": [ "tag": "block",
"http", "settings": {
"tls", "response": {
"quic" "type": "http"
]
}
}
],
"outbounds": [{
"tag": "proxy",
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "v2ray.cool",
"port": 10086,
"users": [
{
"id": "a3482e88-686a-4a58-8126-99c9df64b7bf",
"alterId": 0,
"security": "auto",
"level": 8
}
]
}
],
"servers": [
{
"address": "v2ray.cool",
"method": "chacha20",
"ota": false,
"password": "123456",
"port": 10086,
"level": 8
}
]
},
"streamSettings": {
"network": "tcp"
},
"mux": {
"enabled": false
}
},
{
"protocol": "freedom",
"streamSettings": {
"sockopt": {
"domainStrategy": "UseIP",
"happyEyeballs": {
"tryDelayMs": 250,
"interleave": 2
} }
} }
},
"tag": "direct"
},
{
"protocol": "blackhole",
"tag": "block",
"settings": {
"response": {
"type": "http"
}
} }
}
], ],
"routing": { "routing": {
"domainStrategy": "AsIs", "domainStrategy": "AsIs",
"rules": [] "rules": []
}, },
"dns": { "dns": {
"hosts": {}, "hosts": {},
"servers": [] "servers": []
} }
} }
@@ -1,123 +1,103 @@
{ {
"stats":{}, "stats": {},
"log": { "log": {
"loglevel": "warning" "loglevel": "warning"
}, },
"policy":{ "policy": {
"levels": { "levels": {
"8": { "8": {
"handshake": 4, "handshake": 4,
"connIdle": 300, "connIdle": 300,
"uplinkOnly": 1, "uplinkOnly": 1,
"downlinkOnly": 1 "downlinkOnly": 1
}
},
"system": {
"statsOutboundUplink": true,
"statsOutboundDownlink": true
}
},
"inbounds": [
{
"tag": "socks",
"port": 10808,
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": true,
"userLevel": 8
},
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls",
"quic"
]
}
},
{
"tag": "tun",
"protocol": "tun",
"settings": {
"name": "xray0",
"MTU": 1500,
"userLevel": 8
},
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls",
"quic"
]
}
}
],
"outbounds": [
{
"tag": "proxy",
"protocol": "vmess",
"settings": {
"address": "v2ray.cool",
"port": 10086
},
"streamSettings": {
"network": "tcp"
},
"mux": {
"enabled": false
}
},
{
"protocol": "freedom",
"streamSettings": {
"sockopt": {
"domainStrategy": "UseIP",
"happyEyeballs": {
"tryDelayMs": 250,
"interleave": 2
}
} }
}, },
"system": { "tag": "direct"
"statsOutboundUplink": true,
"statsOutboundDownlink": true
}
},
"inbounds": [{
"tag": "socks",
"port": 10808,
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": true,
"userLevel": 8
}, },
"sniffing": { {
"enabled": true, "protocol": "blackhole",
"destOverride": [ "tag": "block",
"http", "settings": {
"tls", "response": {
"quic" "type": "http"
]
}
},
{
"tag": "tun",
"protocol": "tun",
"settings": {
"name": "xray0",
"MTU": 1500,
"userLevel": 8
},
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls",
"quic"
]
}
}
],
"outbounds": [{
"tag": "proxy",
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "v2ray.cool",
"port": 10086,
"users": [
{
"id": "a3482e88-686a-4a58-8126-99c9df64b7bf",
"alterId": 0,
"security": "auto",
"level": 8
}
]
}
],
"servers": [
{
"address": "v2ray.cool",
"method": "chacha20",
"ota": false,
"password": "123456",
"port": 10086,
"level": 8
}
]
},
"streamSettings": {
"network": "tcp"
},
"mux": {
"enabled": false
}
},
{
"protocol": "freedom",
"streamSettings": {
"sockopt": {
"domainStrategy": "UseIP",
"happyEyeballs": {
"tryDelayMs": 250,
"interleave": 2
} }
} }
},
"tag": "direct"
},
{
"protocol": "blackhole",
"tag": "block",
"settings": {
"response": {
"type": "http"
}
} }
}
], ],
"routing": { "routing": {
"domainStrategy": "AsIs", "domainStrategy": "AsIs",
"rules": [] "rules": []
}, },
"dns": { "dns": {
"hosts": {}, "hosts": {},
"servers": [] "servers": []
} }
} }
@@ -255,6 +255,7 @@ object CoreOutboundBuilder {
outboundBean?.settings?.let { wireguard -> outboundBean?.settings?.let { wireguard ->
wireguard.secretKey = profileItem.secretKey wireguard.secretKey = profileItem.secretKey
wireguard.address = addresses wireguard.address = addresses
wireguard.port = null
wireguard.peers?.firstOrNull()?.let { peer -> wireguard.peers?.firstOrNull()?.let { peer ->
peer.publicKey = profileItem.publicKey.orEmpty() peer.publicKey = profileItem.publicKey.orEmpty()
peer.preSharedKey = profileItem.preSharedKey?.nullIfBlank() peer.preSharedKey = profileItem.preSharedKey?.nullIfBlank()