github.com/inazumav/sing-box@v0.0.0-20230926072359-ab51429a14f1/docs/examples/fakeip.md (about) 1 ```json 2 { 3 "dns": { 4 "servers": [ 5 { 6 "tag": "google", 7 "address": "tls://8.8.8.8" 8 }, 9 { 10 "tag": "local", 11 "address": "223.5.5.5", 12 "detour": "direct" 13 }, 14 { 15 "tag": "remote", 16 "address": "fakeip" 17 }, 18 { 19 "tag": "block", 20 "address": "rcode://success" 21 } 22 ], 23 "rules": [ 24 { 25 "geosite": "category-ads-all", 26 "server": "block", 27 "disable_cache": true 28 }, 29 { 30 "outbound": "any", 31 "server": "local" 32 }, 33 { 34 "geosite": "cn", 35 "server": "local" 36 }, 37 { 38 "query_type": [ 39 "A", 40 "AAAA" 41 ], 42 "server": "remote" 43 } 44 ], 45 "fakeip": { 46 "enabled": true, 47 "inet4_range": "198.18.0.0/15", 48 "inet6_range": "fc00::/18" 49 }, 50 "independent_cache": true, 51 "strategy": "ipv4_only" 52 }, 53 "inbounds": [ 54 { 55 "type": "tun", 56 "inet4_address": "172.19.0.1/30", 57 "auto_route": true, 58 "sniff": true, 59 "domain_strategy": "ipv4_only" // remove this line if you want to resolve the domain remotely (if the server is not sing-box, UDP may not work due to wrong behavior). 60 } 61 ], 62 "outbounds": [ 63 { 64 "type": "shadowsocks", 65 "tag": "proxy", 66 "server": "mydomain.com", 67 "server_port": 8080, 68 "method": "2022-blake3-aes-128-gcm", 69 "password": "8JCsPssfgS8tiRwiMlhARg==" 70 }, 71 { 72 "type": "direct", 73 "tag": "direct" 74 }, 75 { 76 "type": "block", 77 "tag": "block" 78 }, 79 { 80 "type": "dns", 81 "tag": "dns-out" 82 } 83 ], 84 "route": { 85 "rules": [ 86 { 87 "protocol": "dns", 88 "outbound": "dns-out" 89 }, 90 { 91 "geosite": "cn", 92 "geoip": [ 93 "private", 94 "cn" 95 ], 96 "outbound": "direct" 97 }, 98 { 99 "geosite": "category-ads-all", 100 "outbound": "block" 101 } 102 ], 103 "auto_detect_interface": true 104 } 105 } 106 ```