From 05191501ce7931b7e18413d8444fda7b8998b0d3 Mon Sep 17 00:00:00 2001 From: quackerd Date: Tue, 9 Jun 2020 10:40:04 +0800 Subject: [PATCH] update conf --- client.conf | 33 +++++++++++++++++++++++++++++++-- setup.py | 4 ++-- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/client.conf b/client.conf index a929a67..4f464de 100644 --- a/client.conf +++ b/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" } ] } diff --git a/setup.py b/setup.py index e0eb607..ec43865 100644 --- a/setup.py +++ b/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)