diff --git a/customize.sh b/customize.sh index e960104..3b350b9 100644 --- a/customize.sh +++ b/customize.sh @@ -59,7 +59,21 @@ echo "softap0" > /data/v2ray/softap.list [ -f /data/v2ray/resolv.conf ] || \ unzip -j -o "${ZIPFILE}" "v2ray/etc/resolv.conf" -d /data/v2ray >&2 unzip -j -o "${ZIPFILE}" "v2ray/etc/config.json.template" -d /data/v2ray >&2 -unzip -j -o "${ZIPFILE}" 'v2ray/etc/dnscrypt-proxy/*' -d /data/v2ray/dnscrypt-proxy >&2 +[ -f /data/v2ray/dnscrypt-proxy/dnscrypt-blacklist-domains.txt ] || \ +unzip -j -o "${ZIPFILE}" 'v2ray/etc/dnscrypt-proxy/dnscrypt-blacklist-domains.txt' -d /data/v2ray/dnscrypt-proxy >&2 +[ -f /data/v2ray/dnscrypt-proxy/dnscrypt-blacklist-ips.txt ] || \ +unzip -j -o "${ZIPFILE}" 'v2ray/etc/dnscrypt-proxy/dnscrypt-blacklist-ips.txt' -d /data/v2ray/dnscrypt-proxy >&2 +[ -f /data/v2ray/dnscrypt-proxy/dnscrypt-cloaking-rules.txt ] || \ +unzip -j -o "${ZIPFILE}" 'v2ray/etc/dnscrypt-proxy/dnscrypt-cloaking-rules.txt' -d /data/v2ray/dnscrypt-proxy >&2 +[ -f /data/v2ray/dnscrypt-proxy/dnscrypt-forwarding-rules.txt ] || \ +unzip -j -o "${ZIPFILE}" 'v2ray/etc/dnscrypt-proxy/dnscrypt-forwarding-rules.txt' -d /data/v2ray/dnscrypt-proxy >&2 +[ -f /data/v2ray/dnscrypt-proxy/dnscrypt-proxy.toml ] || \ +unzip -j -o "${ZIPFILE}" 'v2ray/etc/dnscrypt-proxy/dnscrypt-proxy.toml' -d /data/v2ray/dnscrypt-proxy >&2 +[ -f /data/v2ray/dnscrypt-proxy/dnscrypt-whitelist.txt ] || \ +unzip -j -o "${ZIPFILE}" 'v2ray/etc/dnscrypt-proxy/dnscrypt-whitelist.txt' -d /data/v2ray/dnscrypt-proxy >&2 +[ -f /data/v2ray/dnscrypt-proxy/example-dnscrypt-proxy.toml ] || \ +unzip -j -o "${ZIPFILE}" 'v2ray/etc/dnscrypt-proxy/example-dnscrypt-proxy.toml' -d /data/v2ray/dnscrypt-proxy >&2 +unzip -j -o "${ZIPFILE}" 'v2ray/etc/dnscrypt-proxy/update-rules.sh' -d /data/v2ray/dnscrypt-proxy >&2 [ -f /data/v2ray/config.json ] || \ cp /data/v2ray/config.json.template /data/v2ray/config.json ln -s /data/v2ray/resolv.conf $MODPATH/system/etc/resolv.conf diff --git a/v2ray/etc/config.json b/v2ray/etc/config.json index cc5a7fc..590b9b6 100644 --- a/v2ray/etc/config.json +++ b/v2ray/etc/config.json @@ -36,9 +36,11 @@ "followRedirect": true }, - // Disable sniffing. + // If you wanna bypass BT streams, you should enable it. "sniffing": { "enabled": false + // , + // "destOverride": ["http", "tls"] } }], // List of outbound proxy configurations. @@ -86,6 +88,35 @@ "ip": ["geoip:cn"], "outboundTag": "direct" } + //, + //{ + // Bypass all china sites. + // "type": "field", + // "domain": ["geosite:cn"], + // "outboundTag": "direct" + //}, + //{ + // To bypass all BT streams, you should enable sniffing. + // "type": "field", + // "protocol":["bittorrent"], + // "outboundTag": "direct" + //}, + //{ + // If your network condition not very well, you could bypass dnscrypt-proxy's upstream DNS. + // "type": "field", + // "domain": [ + // "cloudflare-dns.com", + // "doh.opendns.com", + // "dns.google" + // ], + // "outboundTag": "direct" + //}, + //{ + // Blocks major ads. + // "type": "field", + // "domain": ["geosite:category-ads"], + // "outboundTag": "blocked" + //} ] }, diff --git a/v2ray/etc/config.json.template b/v2ray/etc/config.json.template index cc5a7fc..590b9b6 100644 --- a/v2ray/etc/config.json.template +++ b/v2ray/etc/config.json.template @@ -36,9 +36,11 @@ "followRedirect": true }, - // Disable sniffing. + // If you wanna bypass BT streams, you should enable it. "sniffing": { "enabled": false + // , + // "destOverride": ["http", "tls"] } }], // List of outbound proxy configurations. @@ -86,6 +88,35 @@ "ip": ["geoip:cn"], "outboundTag": "direct" } + //, + //{ + // Bypass all china sites. + // "type": "field", + // "domain": ["geosite:cn"], + // "outboundTag": "direct" + //}, + //{ + // To bypass all BT streams, you should enable sniffing. + // "type": "field", + // "protocol":["bittorrent"], + // "outboundTag": "direct" + //}, + //{ + // If your network condition not very well, you could bypass dnscrypt-proxy's upstream DNS. + // "type": "field", + // "domain": [ + // "cloudflare-dns.com", + // "doh.opendns.com", + // "dns.google" + // ], + // "outboundTag": "direct" + //}, + //{ + // Blocks major ads. + // "type": "field", + // "domain": ["geosite:category-ads"], + // "outboundTag": "blocked" + //} ] },