mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-08 11:44:13 +08:00
Add shadowtls example
This commit is contained in:
parent
0ec824f54f
commit
c8bb654a39
55
docs/examples/shadowtls.md
Normal file
55
docs/examples/shadowtls.md
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
#### Server
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"inbounds": [
|
||||||
|
{
|
||||||
|
"type": "shadowtls",
|
||||||
|
"listen": "::",
|
||||||
|
"listen_port": 4443,
|
||||||
|
"handshake": {
|
||||||
|
"server": "google.com",
|
||||||
|
"server_port": 443
|
||||||
|
},
|
||||||
|
"detour": "shadowsocks-in"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shadowsocks",
|
||||||
|
"tag": "shadowsocks-in",
|
||||||
|
"listen": "127.0.0.1",
|
||||||
|
"method": "2022-blake3-aes-128-gcm",
|
||||||
|
"password": "8JCsPssfgS8tiRwiMlhARg=="
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Client
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"outbounds": [
|
||||||
|
{
|
||||||
|
"type": "shadowsocks",
|
||||||
|
"method": "2022-blake3-aes-128-gcm",
|
||||||
|
"password": "8JCsPssfgS8tiRwiMlhARg==",
|
||||||
|
"detour": "shadowtls-out",
|
||||||
|
"multiplex": {
|
||||||
|
"enabled": 1,
|
||||||
|
"max_connections": 4,
|
||||||
|
"min_streams": 4
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shadowtls",
|
||||||
|
"tag": "shadowtls-out",
|
||||||
|
"server": "127.0.0.1",
|
||||||
|
"server_port": 4443,
|
||||||
|
"tls": {
|
||||||
|
"enabled": true,
|
||||||
|
"server_name": "google.com"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
@ -93,6 +93,7 @@ nav:
|
|||||||
- Shadowsocks Server: examples/ss-server.md
|
- Shadowsocks Server: examples/ss-server.md
|
||||||
- Shadowsocks Client: examples/ss-client.md
|
- Shadowsocks Client: examples/ss-client.md
|
||||||
- Shadowsocks Tun: examples/ss-tun.md
|
- Shadowsocks Tun: examples/ss-tun.md
|
||||||
|
- ShadowTLS: examples/shadowtls.md
|
||||||
- DNS Hijack: examples/dns-hijack.md
|
- DNS Hijack: examples/dns-hijack.md
|
||||||
- Contributing:
|
- Contributing:
|
||||||
- contributing/index.md
|
- contributing/index.md
|
||||||
|
@ -78,7 +78,6 @@ func TestShadowTLS(t *testing.T) {
|
|||||||
TLS: &option.OutboundTLSOptions{
|
TLS: &option.OutboundTLSOptions{
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
ServerName: "google.com",
|
ServerName: "google.com",
|
||||||
MaxVersion: "1.2",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -150,7 +149,6 @@ func TestShadowTLSOutbound(t *testing.T) {
|
|||||||
TLS: &option.OutboundTLSOptions{
|
TLS: &option.OutboundTLSOptions{
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
ServerName: "google.com",
|
ServerName: "google.com",
|
||||||
MaxVersion: "1.2",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user