Add documentation and example for linux tun

This commit is contained in:
世界
2022-07-10 16:41:38 +08:00
parent 7f84191748
commit b417bd5be4
6 changed files with 162 additions and 4 deletions

View File

@@ -3,4 +3,5 @@
Configuration examples for sing-box.
* [Shadowsocks Server](./ss-server)
* [Shadowsocks Client](./ss-client)
* [Shadowsocks Client](./ss-client)
* [Shadowsocks Tun](./ss-tun)

66
docs/examples/ss-tun.md Normal file
View File

@@ -0,0 +1,66 @@
```json
{
"dns": {
"servers": [
{
"tag": "google",
"address": "tls://8.8.8.8"
},
{
"tag": "local",
"address": "223.5.5.5",
"detour": "direct"
}
],
"rules": [
{
"domain": "mydomain.com",
"geosite": "cn",
"server": "local"
}
],
"strategy": "ipv4_only"
},
"inbounds": [
{
"type": "tun",
"inet4_address": "172.19.0.1/30",
"auto_route": true,
"hijack_dns": true,
"sniff": true
}
],
"outbounds": [
{
"type": "shadowsocks",
"tag": "proxy",
"server": "mydomain.com",
"server_port": 8080,
"method": "2022-blake3-aes-128-gcm",
"password": "8JCsPssfgS8tiRwiMlhARg=="
},
{
"type": "direct",
"tag": "direct"
},
{
"type": "block",
"tag": "block"
}
],
"route": {
"rules": [
{
"geosite": "category-ads-all",
"outbound": "block"
},
{
"geosite": "cn",
"geoip": "cn",
"outbound": "direct"
}
],
"auto_detect_interface": true
}
}
```