1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | { “inbounds”: [ { “tag”:”transparent”, “port”: 12345, “protocol”: “dokodemo-door”, “settings”: { “network”: “tcp,udp”, “followRedirect”: true }, “sniffing”: { “enabled”: true, “destOverride”: [ “http”, “tls” ] }, “streamSettings”: { “sockopt”: { “tproxy”: “tproxy” // 透明代理使用 TPROXY 方式 } } }, { “port”: 1090, “protocol”: “socks”, // 入口协议为 SOCKS 5 “sniffing”: { “enabled”: true, “destOverride”: [“http”, “tls”] }, “settings”: { “auth”: “noauth” } } ], “outbounds”: [ { “tag”: “proxy”, “protocol”: “vmess”, // 代理服务器 “settings”: { “vnext”: [ { “address”: “server.com”, // 服务器地址,请修改为你自己的服务器 IP 或域名 “port”: 10010, // 服务器端口 “users”: [ { “id”: “b831381d-6324-4d53-ad4f-8cda48b30811”, // 用户 ID,必须与服务器端配置相同 “alterId”: 32 // 此处的值也应当与服务器相同 } ] }, “streamSettings”: { “sockopt”: { “mark”: 255 } }, “mux”: { “enabled”: true } }, { “tag”: “direct”, “protocol”: “freedom”, “settings”: { “domainStrategy”: “UseIP” }, “streamSettings”: { “sockopt”: { “mark”: 255 } } }, { “tag”: “block”, “protocol”: “blackhole”, “settings”: { “response”: { “type”: “http” } } }, { “tag”: “dns-out”, “protocol”: “dns”, “streamSettings”: { “sockopt”: { “mark”: 255 } } } ], “dns”: { “servers”: [ “8.8.8.8”, // 非中中国大陆域名使用 Google 的 DNS “1.1.1.1”, // 非中中国大陆域名使用 Cloudflare 的 DNS(备用) “114.114.114.114”, // 114 的 DNS (备用) { “address”: “223.5.5.5”, //中国大陆域名使用阿里的 DNS “port”: 53, “domains”: [ “geosite:cn”, “ntp.org”, // NTP 服务器 “$myserver.address” // 此处改为你 VPS 的域名 ] } ] }, “routing”: { “domainStrategy”: “IPOnDemand”, “rules”: [ { // 劫持 53 端口 UDP 流量,使用 V2Ray 的 DNS “type”: “field”, “inboundTag”: [ “transparent” ], “port”: 53, “network”: “udp”, “outboundTag”: “dns-out” }, { // 直连 123 端口 UDP 流量(NTP 协议) “type”: “field”, “inboundTag”: [ “transparent” ], “port”: 123, “network”: “udp”, “outboundTag”: “direct” }, { “type”: “field”, “ip”: [ // 设置 DNS 配置中的国内 DNS 服务器地址直连,以达到 DNS 分流目的 “223.5.5.5”, “114.114.114.114” ], “outboundTag”: “direct” }, { “type”: “field”, “ip”: [ // 设置 DNS 配置中的国内 DNS 服务器地址走代理,以达到 DNS 分流目的 “8.8.8.8”, “1.1.1.1” ], “outboundTag”: “proxy” // 改为你自己代理的出站 tag }, { // 广告拦截 “type”: “field”, “domain”: [ “geosite:category-ads-all” ], “outboundTag”: “block” }, { // BT 流量直连 “type”: “field”, “protocol”:[“bittorrent”], “outboundTag”: “direct” }, { // 直连中国大陆主流网站 ip 和 保留 ip “type”: “field”, “ip”: [ “geoip:private”, “geoip:cn” ], “outboundTag”: “direct” }, { // 直连中国大陆主流网站域名 “type”: “field”, “domain”: [ “geosite:cn” ], “outboundTag”: “direct” } ] } } |