sing-box服务端配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{
"type": "vmess",
"tag": "vpf8h4nj-in",
"listen": "::",
"listen_port": 443,
"sniff": true,
"sniff_override_destination": true,
"transport": {
"type": "ws",
"path": "/example",
"max_early_data": 2048,
"early_data_header_name": "Sec-WebSocket-Protocol"
},
"users": [
{
"uuid": "df5f4b75-6js7-4e55-b20f-8233se7c38d",
"alterId": 0
}
],

#vmess+ws则下方tls内容省略
"tls": {
"enabled": true,
"server_name": "example.com", #此处填签名证书域名
"certificate_path": "/root/ssl/cert.crt",
"key_path": "/root/ssl/private.key"
}
}

clash客户端配置 vmess+ws+tls

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
name: vmess+ws+tls
type: vmess
server: example.com #若没有域名,此处填IP,若有域名,可填域名
port: 443
uuid: df5f4b75-6js7-4e55-b20f-8233se7c38d
alterId: 0
cipher: auto
network: ws
ws-opts:
path: /example
max-early-data: 2048
early-data-header-name: Sec-WebSocket-Protocol
#若不配置tls,则下方tls、skip-cert-verify、servername字段省略
tls: true
skip-cert-verify: false #自签证书,值为true,可信任的机构证书,值为false
servername: example.com #此处填签名证书域名