update conf
This commit is contained in:
parent
c9fd9b04f3
commit
05191501ce
33
client.conf
33
client.conf
|
@ -7,7 +7,15 @@
|
||||||
|
|
||||||
"dns": {
|
"dns": {
|
||||||
"servers": [
|
"servers": [
|
||||||
|
"223.5.5.5",
|
||||||
"114.114.114.114",
|
"114.114.114.114",
|
||||||
|
{
|
||||||
|
"address": "8.8.8.8",
|
||||||
|
"port": 53,
|
||||||
|
"domains": [
|
||||||
|
"geosite:geolocation-!cn"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"address": "1.1.1.1",
|
"address": "1.1.1.1",
|
||||||
"port": 53,
|
"port": 53,
|
||||||
|
@ -19,12 +27,23 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
"routing": {
|
"routing": {
|
||||||
"domainStrategy": "IPOnDemand",
|
"domainStrategy": "IPIfNonMatch",
|
||||||
"rules": [
|
"rules": [
|
||||||
{
|
{
|
||||||
"type": "field",
|
"type": "field",
|
||||||
"outboundTag": "direct",
|
"outboundTag": "direct",
|
||||||
"domain": ["geosite:cn"]
|
"ip": [
|
||||||
|
"223.5.5.5",
|
||||||
|
"114.114.114.114"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "field",
|
||||||
|
"outboundTag": "proxy",
|
||||||
|
"ip": [
|
||||||
|
"8.8.8.8",
|
||||||
|
"1.1.1.1"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "field",
|
"type": "field",
|
||||||
|
@ -34,6 +53,11 @@
|
||||||
"geoip:private"
|
"geoip:private"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "field",
|
||||||
|
"outboundTag": "direct",
|
||||||
|
"domain": ["geosite:cn"]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "field",
|
"type": "field",
|
||||||
"outboundTag": "proxy",
|
"outboundTag": "proxy",
|
||||||
|
@ -88,6 +112,11 @@
|
||||||
"protocol": "freedom",
|
"protocol": "freedom",
|
||||||
"settings": {},
|
"settings": {},
|
||||||
"tag": "direct"
|
"tag": "direct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"protocol": "blackhole",
|
||||||
|
"settings": {},
|
||||||
|
"tag": "block"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
4
setup.py
4
setup.py
|
@ -139,8 +139,8 @@ def main():
|
||||||
with open("nginx/nginx/site-confs/default", "w") as file:
|
with open("nginx/nginx/site-confs/default", "w") as file:
|
||||||
file.write(output)
|
file.write(output)
|
||||||
|
|
||||||
# process client.conf
|
# process client.json
|
||||||
with open("client.conf", "r") as file:
|
with open("client.json", "r") as file:
|
||||||
template = jinja2.Template(file.read())
|
template = jinja2.Template(file.read())
|
||||||
|
|
||||||
output = template.render(uuid = v_uuid, path = v_path, server_name = server_name)
|
output = template.render(uuid = v_uuid, path = v_path, server_name = server_name)
|
||||||
|
|
Loading…
Reference in New Issue