From 42d2d304b2cb2810fdb13193d5e27ac41cba5b4d Mon Sep 17 00:00:00 2001 From: Whispering Wind <151555003+ReturnFI@users.noreply.github.com> Date: Fri, 9 Aug 2024 20:45:57 +0330 Subject: [PATCH] Create singbox.json --- core/scripts/singbox/singbox.json | 217 ++++++++++++++++++++++++++++++ 1 file changed, 217 insertions(+) create mode 100644 core/scripts/singbox/singbox.json diff --git a/core/scripts/singbox/singbox.json b/core/scripts/singbox/singbox.json new file mode 100644 index 0000000..2f9b8aa --- /dev/null +++ b/core/scripts/singbox/singbox.json @@ -0,0 +1,217 @@ +{ + "log": { + "level": "warn", + "output": "box.log", + "timestamp": true + }, + "dns": { + "servers": [ + { + "tag": "dns-remote", + "address": "udp://1.1.1.1", + "address_resolver": "dns-direct" + }, + { + "tag": "dns-direct", + "address": "1.1.1.1", + "address_resolver": "dns-local", + "detour": "direct" + }, + { + "tag": "dns-local", + "address": "local", + "detour": "direct" + }, + { + "tag": "dns-block", + "address": "rcode://success" + } + ], + "rules": [ + { + "domain": "cp.cloudflare.com", + "server": "dns-remote", + "rewrite_ttl": 3000 + } + ], + "independent_cache": true + }, + "inbounds": [ + { + "type": "tun", + "tag": "tun-in", + "mtu": 9000, + "inet4_address": "172.19.0.1/28", + "auto_route": true, + "strict_route": true, + "endpoint_independent_nat": true, + "stack": "mixed", + "sniff": true, + "sniff_override_destination": true + }, + { + "type": "mixed", + "tag": "mixed-in", + "listen": "127.0.0.1", + "listen_port": 2334, + "sniff": true, + "sniff_override_destination": true + }, + { + "type": "direct", + "tag": "dns-in", + "listen": "127.0.0.1", + "listen_port": 6450 + } + ], + "outbounds": [ + { + "type": "selector", + "tag": "select", + "outbounds": [ + "auto", + "{username}-Hysteria2" + ], + "default": "auto" + }, + { + "type": "urltest", + "tag": "auto", + "outbounds": [ + "{username}-Hysteria2" + ], + "url": "http://connectivitycheck.gstatic.com/generate_204", + "interval": "10m0s", + "idle_timeout": "1h40m0s" + }, + { + "type": "hysteria2", + "tag": "{username}-Hysteria2", + "server": "{ip}", + "server_port": "{port}", + "obfs": { + "type": "salamander", + "password": "{obfs_password}" + }, + "password": "{username}:{password}", + "tls": { + "enabled": true, + "server_name": "bts.com", + "insecure": true + } + }, + { + "type": "dns", + "tag": "dns-out" + }, + { + "type": "direct", + "tag": "direct" + }, + { + "type": "direct", + "tag": "bypass" + }, + { + "type": "block", + "tag": "block" + } + ], + "route": { + "rules": [ + { + "rule_set": [ + "geoip-ir", + "geosite-ir" + ], + "outbound": "direct" + }, + { + "inbound": "dns-in", + "outbound": "dns-out" + }, + { + "port": 53, + "outbound": "dns-out" + }, + { + "clash_mode": "Direct", + "outbound": "direct" + }, + { + "clash_mode": "Global", + "outbound": "select" + } + ], + "rule_set": [ + { + "type": "remote", + "tag": "geosite-ir", + "format": "binary", + "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-ir.srs", + "download_detour": "direct", + "update_interval": "72h0m0s" + }, + { + "type": "remote", + "tag": "geosite-category-ads-all", + "format": "binary", + "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-category-ads-all.srs", + "download_detour": "direct", + "update_interval": "72h0m0s" + }, + { + "type": "remote", + "tag": "geosite-malware", + "format": "binary", + "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-malware.srs", + "download_detour": "direct", + "update_interval": "72h0m0s" + }, + { + "type": "remote", + "tag": "geosite-phishing", + "format": "binary", + "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-phishing.srs", + "download_detour": "direct", + "update_interval": "72h0m0s" + }, + { + "type": "remote", + "tag": "geosite-cryptominers", + "format": "binary", + "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geosite-cryptominers.srs", + "download_detour": "direct", + "update_interval": "72h0m0s" + }, + { + "type": "remote", + "tag": "geoip-ir", + "format": "binary", + "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geoip-ir.srs", + "download_detour": "direct", + "update_interval": "72h0m0s" + }, + { + "type": "remote", + "tag": "geoip-malware", + "format": "binary", + "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geoip-malware.srs", + "download_detour": "direct", + "update_interval": "72h0m0s" + }, + { + "type": "remote", + "tag": "geoip-phishing", + "format": "binary", + "url": "https://raw.githubusercontent.com/Chocolate4U/Iran-sing-box-rules/rule-set/geoip-phishing.srs", + "download_detour": "direct", + "update_interval": "72h0m0s" + } + ], + "final": "select", + "auto_detect_interface": true, + "override_android_vpn": true + } + } +