-
Notifications
You must be signed in to change notification settings - Fork 407
/
2_xray_config.json
82 lines (82 loc) · 2.67 KB
/
2_xray_config.json
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
"log": {
"loglevel": "warning",
"error": "/var/log/xray/error.log",
"access": "/var/log/xray/access.log"
},
"inbounds": [
{
"port": 443, //监听端口
"protocol": "trojan",
"settings": {
"clients": [
{
"password":"diy6443", //修改为自己密码
"email": "[email protected]"
}
],
"fallbacks": [
{
"alpn": "h2", //h2 回落匹配
"dest": "/dev/shm/uds82.sock", //h2 回落进程
"xver": 2 //开启 PROXY protocol 发送,发送真实来源 IP 和端口给 Nginx。 1 或 2 表示 PROXY protocol 版本。
}, //对应 Nginx 版本小于 v1.25.1 配置,否则此部分必须删除。
{
"dest": "/dev/shm/uds81.sock", //http/1.1 回落进程
"xver": 2 //开启 PROXY protocol 发送,发送真实来源 IP 和端口给 Nginx。 1 或 2 表示 PROXY protocol 版本。
} //对应 Nginx 版本小于 v1.25.1 配置,否则此部分必须删除。
{
"dest": "/dev/shm/uds88.sock", //h2 回落与 http/1.1 回落共用进程
"xver": 2 //开启 PROXY protocol 发送,发送真实来源 IP 和端口给 Nginx。 1 或 2 表示 PROXY protocol 版本。
} //对应 Nginx 版本不小于 v1.25.1 配置,否则此部分必须删除。
]
},
"streamSettings": {
"network": "tcp",
"security": "tls",
"tlsSettings": {
"certificates": [
{
"ocspStapling": 3600,
"certificateFile": "/home/tls/xx.yy/xx.yy.crt", //换成自己的证书,绝对路径。
"keyFile": "/home/tls/xx.yy/xx.yy.key" //换成自己的密钥,绝对路径。
}
],
"rejectUnknownSni": true, //限定域名连接(包括禁止以 IP 方式访问网站)
"minVersion": "1.2",
"maxVersion": "1.2",
"cipherSuites": "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256:TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256" //非 AES 算法的密码套件。若无 RSA 证书,可删除 RSA 算法的密码套件;无 ECC 证书,可删除 ECDSA 算法的密码套件。
}
},
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
}
}
],
"routing": {
"rules": [
{
"type": "field",
"protocol": [
"bittorrent"
],
"outboundTag": "blocked"
}
]
},
"outbounds": [
{
"protocol": "freedom",
"settings": {}
},
{
"tag": "blocked",
"protocol": "blackhole",
"settings": {}
}
]
}