add route setting
This commit is contained in:
parent
6797289988
commit
c3dc374786
26
config/local.json
Executable file → Normal file
26
config/local.json
Executable file → Normal file
@ -10,7 +10,7 @@
|
||||
},
|
||||
{
|
||||
"port": 2802,
|
||||
"listen": "127.0.0.1",
|
||||
"listen": "0.0.0.0",
|
||||
"protocol": "http"
|
||||
},
|
||||
{
|
||||
@ -26,5 +26,27 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"protocol": "freedom",
|
||||
"tag": "direct"
|
||||
},
|
||||
{
|
||||
"protocol": "blackhole",
|
||||
"tag": "blocked"
|
||||
}
|
||||
],
|
||||
"routing": {
|
||||
"rules": [
|
||||
{
|
||||
"type": "field",
|
||||
"ip": [
|
||||
"geoip:cn",
|
||||
"geoip:private"
|
||||
],
|
||||
"outboundTag": "direct"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -241,7 +241,10 @@ def main():
|
||||
xray_config.clear()
|
||||
for k in xray_local_config:
|
||||
xray_config[k] = xray_local_config[k]
|
||||
xray_config["outbounds"] = [out]
|
||||
out_list = [out]
|
||||
if "outbounds" in xray_config:
|
||||
out_list.extend(xray_config["outbounds"])
|
||||
xray_config["outbounds"] = out_list
|
||||
xray_config.commit()
|
||||
loop2 = False
|
||||
elif func_sel.lower() == "q":
|
||||
|
Loading…
x
Reference in New Issue
Block a user