add route setting

This commit is contained in:
Dreagonmon 2025-02-03 16:25:56 +08:00
parent 6797289988
commit c3dc374786
3 changed files with 28 additions and 3 deletions

24
config/local.json Executable file → Normal file
View 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"
}
]
}
}

0
kill.sh Executable file → Normal file
View File

View File

@ -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":