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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
// v2ray客户端配置 VMESS+TLS+TCP
{
"log": {
"loglevel": "info"
},
"inbounds": [
{
"port": 1080, // 本地监听端口
"listen": "127.0.0.1", //监听本机环回地址
"protocol": "socks", // 入口协议为 socks
"sniffing": {
"enabled": true, //开启流量嗅探,通过协议嗅探进行目标地址重定向,可以实现更精细的流量控制和路由策略, 如果不需要路由,这里可以禁用 false
"destOverride": ["http", "tls"]
},
"settings": {
"auth": "noauth" //socks的认证设置,noauth 代表不认证
}
}
],
"outbounds": [
{
"protocol": "vmess", // 代理协议VMESS
"settings": {
"vnext": [
{
"address": "sub.domain.com", // 指向cloudflare中配置好的域名 这里很关键
"port": 443, // VPS服务器端口
"users": [
{
"id": "d473149f-2cf8-42ab-8386-bf174cd790b7", // UUID,必须与服务器端相同
"alterId": 0,
"security": "none" //由于启用了TLS加密传输,VMESS协议本身不再加密,节省性能开销,降低延迟
}
]
}
]
},
"streamSettings": {
"network": "tcp", //承载传输流量的协议TCP
"security": "tls", //传输加密方式,指定为TLS
"tlsSettings": {
"allowInsecure": false, //跳过证书验证,false为不跳过,更安全
"serverName": "sub.domain.com" //这里是指: SNI (Server Name Indication,服务器名称指示),指向你的域名,必须要指定才能建立TLS握手
}
}
}
]
}
|