github.com/inazumav/sing-box@v0.0.0-20230926072359-ab51429a14f1/docs/examples/tun.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": "block", 16 "address": "rcode://success" 17 } 18 ], 19 "rules": [ 20 { 21 "geosite": "category-ads-all", 22 "server": "block", 23 "disable_cache": true 24 }, 25 { 26 "outbound": "any", 27 "server": "local" 28 }, 29 { 30 "geosite": "cn", 31 "server": "local" 32 } 33 ], 34 "strategy": "ipv4_only" 35 }, 36 "inbounds": [ 37 { 38 "type": "tun", 39 "inet4_address": "172.19.0.1/30", 40 "auto_route": true, 41 "strict_route": false, 42 "sniff": true 43 } 44 ], 45 "outbounds": [ 46 { 47 "type": "shadowsocks", 48 "tag": "proxy", 49 "server": "mydomain.com", 50 "server_port": 8080, 51 "method": "2022-blake3-aes-128-gcm", 52 "password": "8JCsPssfgS8tiRwiMlhARg==" 53 }, 54 { 55 "type": "direct", 56 "tag": "direct" 57 }, 58 { 59 "type": "block", 60 "tag": "block" 61 }, 62 { 63 "type": "dns", 64 "tag": "dns-out" 65 } 66 ], 67 "route": { 68 "rules": [ 69 { 70 "protocol": "dns", 71 "outbound": "dns-out" 72 }, 73 { 74 "geosite": "cn", 75 "geoip": [ 76 "private", 77 "cn" 78 ], 79 "outbound": "direct" 80 }, 81 { 82 "geosite": "category-ads-all", 83 "outbound": "block" 84 } 85 ], 86 "auto_detect_interface": true 87 } 88 } 89 ```