update conf

This commit is contained in:
quackerd 2020-06-09 10:40:04 +08:00
parent c9fd9b04f3
commit 05191501ce
Signed by: d
GPG Key ID: 590A22374D0B819F
2 changed files with 33 additions and 4 deletions

View File

@ -7,7 +7,15 @@
"dns": {
"servers": [
"223.5.5.5",
"114.114.114.114",
{
"address": "8.8.8.8",
"port": 53,
"domains": [
"geosite:geolocation-!cn"
]
},
{
"address": "1.1.1.1",
"port": 53,
@ -19,12 +27,23 @@
},
"routing": {
"domainStrategy": "IPOnDemand",
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"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",
@ -34,6 +53,11 @@
"geoip:private"
]
},
{
"type": "field",
"outboundTag": "direct",
"domain": ["geosite:cn"]
},
{
"type": "field",
"outboundTag": "proxy",
@ -88,6 +112,11 @@
"protocol": "freedom",
"settings": {},
"tag": "direct"
},
{
"protocol": "blackhole",
"settings": {},
"tag": "block"
}
]
}

View File

@ -139,8 +139,8 @@ def main():
with open("nginx/nginx/site-confs/default", "w") as file:
file.write(output)
# process client.conf
with open("client.conf", "r") as file:
# process client.json
with open("client.json", "r") as file:
template = jinja2.Template(file.read())
output = template.render(uuid = v_uuid, path = v_path, server_name = server_name)