Add shadowtls example

This commit is contained in:
世界 2022-08-29 21:55:44 +08:00
parent 0ec824f54f
commit c8bb654a39
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
3 changed files with 56 additions and 2 deletions

View 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"
}
}
]
}
```

View File

@ -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

View File

@ -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",
}, },
}, },
}, },