Skip to content

Commit 8a7c942

Browse files
dependabot[bot]yuhan6665
authored andcommitted
Prettified Code!
1 parent 59cf99a commit 8a7c942

File tree

13 files changed

+326
-379
lines changed

13 files changed

+326
-379
lines changed

docs/config/inbounds/vless.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,9 @@ VLESS 是一个无状态的轻量传输协议,它分为入站和出站两部
4444
- 第2个块为加密方式,可选 `native`/`xorpub`/`random`, 分别对应: 原始格式数据包/原始格式+混淆公钥部分/全随机数(类似 VMESS/Shadows socks)。要求服务端与客户端一致
4545
- 第3个块为会话恢复票据有效时间。格式为 `600s``100-500s`. 前者将在该时长和该时长的一半之间随机一个时间(如 `600s`=`300-600s`),后者则手动指定随即范围
4646

47-
往后为 padding, 连接建立后服务端发送一些垃圾数据用以混淆长度特征,无需与客户端相同(出站的相同部分为客户端向服务端方向发送的 padding),属于可变长部分,格式为 `padding.delay.padding`+`(.delay.padding)`*n(可插入多个 padding, 要求两个 padding 块之间必须包含一个 delay 块) 比如可以写一个超长的 `padding.delay.padding.delay.padding.delay.padding.delay.padding.delay.padding`
47+
往后为 padding, 连接建立后服务端发送一些垃圾数据用以混淆长度特征,无需与客户端相同(出站的相同部分为客户端向服务端方向发送的 padding),属于可变长部分,格式为 `padding.delay.padding`+`(.delay.padding)`\*n(可插入多个 padding, 要求两个 padding 块之间必须包含一个 delay 块) 比如可以写一个超长的 `padding.delay.padding.delay.padding.delay.padding.delay.padding.delay.padding`
4848

49-
-`padding` 格式为 `probability-min-max``100-111-1111` 含义为 100% 发送一个长度 111~1111 的padding.
50-
-`delay` 格式同样为 `probability-min-max``75-0-111` 含义为 75% 的概率等待 0~111 毫秒
49+
-`padding` 格式为 `probability-min-max``100-111-1111` 含义为 100% 发送一个长度 111~1111 的padding. -`delay` 格式同样为 `probability-min-max``75-0-111` 含义为 75% 的概率等待 0~111 毫秒
5150

5251
第一个 padding 块存在特殊要求,要求概率为 100% 且最小长度大于 0. 若不存在任何 padding, 核心自动使用 `100-111-1111.75-0-111.50-0-3333` 作为 padding 设置。
5352

docs/config/outbounds/vless.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ VLESS 极简反向代理配置,和核心内部自带的的通用反向代理
152152
**内网端可以设 CDN 等多条冗余线路均为 `"reverse": { "tag": "yyy" }` 对应公网端多个相同的 `"reverse": { "tag": "xxx" }`**
153153

154154
### 安全注意事项
155+
155156
公网端可以给不同 id 设不同 reverse 穿透至不同的内网设备,**客户端应当用新的 id,不然拿到客户端配置就能劫持你的反向代理**
156157

157158
用于内网穿透的连接即使开了 XTLS Vision,也只是吃到了 padding,并没有裸奔,是否给用于使用的连接开 XTLS 裸奔自行分析

docs/config/reverse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
反向代理可以把服务器端的流量向客户端转发,即逆向流量转发。
44

5-
::: tip
5+
::: tip
66
这个反向代理为通用反向代理(不限制代理协议类型),配置更为复杂,不要和 VLESS 简易配置反向弄混(见 VLESS 出入站文档相关部分)。
77
:::
88

docs/document/level-2/nginx_or_haproxy_tls_tunnel.md

Lines changed: 156 additions & 181 deletions
Original file line numberDiff line numberDiff line change
@@ -106,199 +106,174 @@ WantedBy=multi-user.target
106106

107107
```json
108108
{
109-
"log": {
110-
"loglevel": "none"
111-
},
112-
"inbounds": [
113-
{
114-
"listen": "/dev/shm/vless.sock,0666",
115-
"protocol": "vless",
116-
"settings": {
117-
"clients": [
118-
{
119-
"id": "uuid"
120-
}
121-
],
122-
"decryption": "none"
123-
},
124-
"streamSettings": {
125-
"network": "tcp"
126-
},
127-
"sniffing": {
128-
"enabled": true,
129-
"destOverride": [
130-
"http",
131-
"tls"
132-
]
133-
}
134-
}
135-
],
136-
"outbounds": [
137-
{
138-
"protocol": "freedom"
139-
}
140-
]
109+
"log": {
110+
"loglevel": "none"
111+
},
112+
"inbounds": [
113+
{
114+
"listen": "/dev/shm/vless.sock,0666",
115+
"protocol": "vless",
116+
"settings": {
117+
"clients": [
118+
{
119+
"id": "uuid"
120+
}
121+
],
122+
"decryption": "none"
123+
},
124+
"streamSettings": {
125+
"network": "tcp"
126+
},
127+
"sniffing": {
128+
"enabled": true,
129+
"destOverride": ["http", "tls"]
130+
}
131+
}
132+
],
133+
"outbounds": [
134+
{
135+
"protocol": "freedom"
136+
}
137+
]
141138
}
142139
```
143140

144141
客户端 xray 配置,此处以旁路由透明代理为例
145142

146143
```json
147144
{
148-
"log": {
149-
"loglevel": "none"
150-
},
151-
"dns": {
152-
"servers": [
153-
"1.1.1.1",
154-
{
155-
"address": "119.29.29.29",
156-
"domains": [
157-
"geosite:cn"
158-
],
159-
"expectIP": [
160-
"geoip:cn"
161-
]
162-
}
163-
],
164-
"disableFallback": true,
165-
"disableFallbackIfMatch": true
145+
"log": {
146+
"loglevel": "none"
147+
},
148+
"dns": {
149+
"servers": [
150+
"1.1.1.1",
151+
{
152+
"address": "119.29.29.29",
153+
"domains": ["geosite:cn"],
154+
"expectIP": ["geoip:cn"]
155+
}
156+
],
157+
"disableFallback": true,
158+
"disableFallbackIfMatch": true
159+
},
160+
"inbounds": [
161+
{
162+
"tag": "tproxy-in",
163+
"port": 12345,
164+
"protocol": "dokodemo-door",
165+
"settings": {
166+
"network": "tcp,udp",
167+
"followRedirect": true
168+
},
169+
"sniffing": {
170+
"enabled": true,
171+
"destOverride": ["http", "tls"]
172+
},
173+
"streamSettings": {
174+
"sockopt": {
175+
"tproxy": "tproxy",
176+
"mark": 255
177+
}
178+
}
166179
},
167-
"inbounds": [
168-
{
169-
"tag": "tproxy-in",
170-
"port": 12345,
171-
"protocol": "dokodemo-door",
172-
"settings": {
173-
"network": "tcp,udp",
174-
"followRedirect": true
175-
},
176-
"sniffing": {
177-
"enabled": true,
178-
"destOverride": [
179-
"http",
180-
"tls"
181-
]
182-
},
183-
"streamSettings": {
184-
"sockopt": {
185-
"tproxy": "tproxy",
186-
"mark": 255
187-
}
188-
}
180+
{
181+
"tag": "http",
182+
"port": 10808,
183+
"listen": "127.0.0.1",
184+
"protocol": "http",
185+
"sniffing": {
186+
"enabled": true,
187+
"destOverride": ["http", "tls"]
188+
}
189+
}
190+
],
191+
"outbounds": [
192+
{
193+
"tag": "nginxtls",
194+
"protocol": "vless",
195+
"settings": {
196+
"vnext": [
197+
{
198+
"address": "127.0.0.1",
199+
"port": 6666,
200+
"users": [
201+
{
202+
"id": "uuid",
203+
"encryption": "none"
204+
}
205+
]
206+
}
207+
]
208+
},
209+
"streamSettings": {
210+
"sockopt": {
211+
"mark": 255
189212
},
190-
{
191-
"tag": "http",
192-
"port": 10808,
193-
"listen": "127.0.0.1",
194-
"protocol": "http",
195-
"sniffing": {
196-
"enabled": true,
197-
"destOverride": [
198-
"http",
199-
"tls"
200-
]
201-
}
213+
"network": "tcp"
214+
}
215+
},
216+
{
217+
"tag": "direct",
218+
"protocol": "freedom",
219+
"streamSettings": {
220+
"sockopt": {
221+
"mark": 255
202222
}
203-
],
204-
"outbounds": [
205-
{
206-
"tag": "nginxtls",
207-
"protocol": "vless",
208-
"settings": {
209-
"vnext": [
210-
{
211-
"address": "127.0.0.1",
212-
"port": 6666,
213-
"users": [
214-
{
215-
"id": "uuid",
216-
"encryption": "none"
217-
}
218-
]
219-
}
220-
]
221-
},
222-
"streamSettings": {
223-
"sockopt": {
224-
"mark": 255
225-
},
226-
"network": "tcp"
227-
}
228-
},
229-
{
230-
"tag": "direct",
231-
"protocol": "freedom",
232-
"streamSettings": {
233-
"sockopt": {
234-
"mark": 255
235-
}
236-
}
237-
},
238-
{
239-
"tag": "block",
240-
"protocol": "blackhole",
241-
"settings": {
242-
"response": {
243-
"type": "http"
244-
}
245-
}
223+
}
224+
},
225+
{
226+
"tag": "block",
227+
"protocol": "blackhole",
228+
"settings": {
229+
"response": {
230+
"type": "http"
246231
}
247-
],
248-
"routing": {
249-
"domainMatcher": "mph",
250-
"domainStrategy": "AsIs",
251-
"rules": [
252-
{
253-
"type": "field",
254-
"domain": [
255-
"geosite:category-ads-all"
256-
],
257-
"outboundTag": "block"
258-
},
259-
{
260-
"type": "field",
261-
"port": 123,
262-
"network": "udp",
263-
"outboundTag": "direct"
264-
},
265-
{
266-
"type": "field",
267-
"ip": [
268-
"1.1.1.1"
269-
],
270-
"outboundTag": "proxy"
271-
},
272-
{
273-
"type": "field",
274-
"domain": [
275-
"geosite:cn"
276-
],
277-
"outboundTag": "direct"
278-
},
279-
{
280-
"type": "field",
281-
"protocol": [
282-
"bittorrent"
283-
],
284-
"outboundTag": "direct"
285-
},
286-
{
287-
"type": "field",
288-
"ip": [
289-
"geoip:private"
290-
],
291-
"outboundTag": "direct"
292-
},
293-
{
294-
"type": "field",
295-
"inboundTag": [
296-
"tproxy-in"
297-
],
298-
"outboundTag": "nginxtls"
299-
}
300-
]
232+
}
301233
}
234+
],
235+
"routing": {
236+
"domainMatcher": "mph",
237+
"domainStrategy": "AsIs",
238+
"rules": [
239+
{
240+
"type": "field",
241+
"domain": ["geosite:category-ads-all"],
242+
"outboundTag": "block"
243+
},
244+
{
245+
"type": "field",
246+
"port": 123,
247+
"network": "udp",
248+
"outboundTag": "direct"
249+
},
250+
{
251+
"type": "field",
252+
"ip": ["1.1.1.1"],
253+
"outboundTag": "proxy"
254+
},
255+
{
256+
"type": "field",
257+
"domain": ["geosite:cn"],
258+
"outboundTag": "direct"
259+
},
260+
{
261+
"type": "field",
262+
"protocol": ["bittorrent"],
263+
"outboundTag": "direct"
264+
},
265+
{
266+
"type": "field",
267+
"ip": ["geoip:private"],
268+
"outboundTag": "direct"
269+
},
270+
{
271+
"type": "field",
272+
"inboundTag": ["tproxy-in"],
273+
"outboundTag": "nginxtls"
274+
}
275+
]
276+
}
302277
}
303278
```
304279

0 commit comments

Comments
 (0)