// Configs here can not contain "bypassing sanctions" contents (inappropriate on US GitHub) // Please join the official Xray Iranian group https://t.me/projectXhttp to get the whole working configs { "remarks": "Serverless", "version": { "min": "25.9.5" }, "log": { "loglevel": "warning", "dnsLog": false, "access": "none" }, "policy": { "levels": { "0": { "uplinkOnly": 0, "downlinkOnly": 0 } } }, "dns":{ "hosts": { "geosite:category-ads-all": "#3", "one.one.one.one": ["1.1.1.1", "1.0.0.1", "2606:4700:4700::1111", "2606:4700:4700::1001"], "cloudflare-dns.com": "www.cloudflare.com" }, "servers": [ { "address": "fakedns", "domains": ["domain:ir", "geosite:private", "geosite:category-ir", "full:www.cloudflare.com"], "finalQuery": true }, { "tag": "no-filter-dns", "address": "https://cloudflare-dns.com/dns-query", "timeoutMs": 5000, "finalQuery": true }, { "address": "localhost", "domains": ["domain:ir", "geosite:private", "geosite:category-ir", "full:www.cloudflare.com"], "finalQuery": true } ], "queryStrategy": "UseSystem", "useSystemHosts": true }, "inbounds": [ { "tag": "dns-in", "listen": "127.0.0.1", "port": 10853, "protocol": "tunnel", "settings": { "address": "one.one.one.one", "port": 53, "network": "tcp,udp" }, "streamSettings": { "sockopt": { "tcpKeepAliveInterval": 1, "tcpKeepAliveIdle": 46 } } }, { "tag": "socks-in", "listen": "127.0.0.1", "port": 10808, "protocol": "mixed", "sniffing": { "enabled": true, "destOverride": ["fakedns"], "routeOnly": false }, "settings": { "udp": true, "ip": "127.0.0.1" }, "streamSettings": { "sockopt": { "tcpKeepAliveInterval": 1, "tcpKeepAliveIdle": 46 } } } ], "outbounds": [ { "tag": "block-out", "protocol": "block" }, { "tag": "direct-out", "protocol": "direct", "streamSettings": { "sockopt": { "domainStrategy": "ForceIP", "happyEyeballs": { "tryDelayMs": 100, "prioritizeIPv6": true, "interleave": 2, "maxConcurrentTry": 16 } } } }, { "tag": "dns-out", "protocol": "dns", "settings": {"nonIPQuery": "skip", "network": "tcp", "address": "one.one.one.one", "port": 53}, "streamSettings": { "sockopt": { "dialerProxy": "full-fragment" } } }, { "tag": "skip-fragment", "protocol": "direct", "settings": { "fragment": { "packets": "1-1", "length": "130", "interval": "190", "maxSplit": "4" } }, "streamSettings": { "sockopt": { "dialerProxy": "_chain-skip" } } }, { "tag": "_chain-skip", "protocol": "direct", "settings": { "fragment": { "packets": "2-4", "length": "1", "interval": "1", "maxSplit": "130" } }, "streamSettings": { "sockopt": { "domainStrategy": "ForceIP", "happyEyeballs": { "tryDelayMs": 300, "prioritizeIPv6": true, "interleave": 2, "maxConcurrentTry": 16 } } } }, { "tag": "full-fragment", "protocol": "direct", "settings": { "fragment": { "packets": "1-1", "length": "1", "interval": "1", "maxSplit": "517" } }, "streamSettings": { "sockopt": { "domainStrategy": "ForceIP", "happyEyeballs": { "tryDelayMs": 300, "prioritizeIPv6": true, "interleave": 2, "maxConcurrentTry": 16 } } } }, { "tag": "udp-noises", "protocol": "direct", "settings": { "targetStrategy": "ForceIP", // or "ForceIPv6v4" to prefer IPv6 "noises": [ {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1250", "delay": "10", "applyTo": "ipv4"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"}, {"type": "rand", "packet": "1230", "delay": "10", "applyTo": "ipv6"} ] } } ], "routing": { "domainStrategy": "IPOnDemand", "rules": [ {"outboundTag": "block-out", "domain": ["geosite:category-ads-all"] }, {"outboundTag": "dns-out", "inboundTag": ["dns-in"] }, {"outboundTag": "dns-out", "inboundTag": ["socks-in"], "port": 53 }, {"outboundTag": "full-fragment", // or "skip-fragment" "inboundTag": ["no-filter-dns"] }, {"outboundTag": "block-out", "ip": ["0.0.0.0", "::"] }, {"outboundTag": "direct-out", "domain": ["domain:ir", "geosite:private", "geosite:category-ir"] }, {"outboundTag": "direct-out", "ip": ["geoip:private", "geoip:ir"] }, {"outboundTag": "udp-noises", "network": "udp", "protocol": ["quic"] }, {"outboundTag": "udp-noises", "network": "udp", "port": "443,2053,2083,2087,2096,8443" }, {"outboundTag": "direct-out", "network": "udp" }, {"outboundTag": "full-fragment", // or "skip-fragment" "network": "tcp", "protocol": ["tls"] }, {"outboundTag": "full-fragment", // or "skip-fragment" "network": "tcp", "port": "443,2053,2083,2087,2096,8443" }, {"outboundTag": "full-fragment", "network": "tcp", "protocol": ["http"] }, {"outboundTag": "full-fragment", "network": "tcp", "port": "80,8080,8880,2052,2082,2086,2095" }, {"outboundTag": "full-fragment", "network": "tcp" } ] } }