update conf
This commit is contained in:
parent
c9fd9b04f3
commit
05191501ce
33
client.conf
33
client.conf
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
4
setup.py
4
setup.py
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue