File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 33Reuse ports based on probe request data
44
55通过探测请求数据实现端口复用
6+
7+
8+ # run
9+ ```
10+ $ oneport
11+ $ # or
12+ $ oneport -c /path/to/config.yml
13+ ```
14+
15+
16+ # config.yml
17+ 该文件配置如何反向代理 Socket 请求:
18+ ```
19+ config:
20+ # 监听地址
21+ listen: 0.0.0.0:1111
22+
23+ rules:
24+ # 字符串匹配
25+ - rule: GET
26+ address: 127.0.0.1:80
27+ # 首字节匹配
28+ - rule: 3
29+ address: 127.0.0.1:3389
30+ # 多字节匹配
31+ - rule: [0x53, 0x53]
32+ address: 127.0.0.1:22
33+ # 内置规则
34+ - rule: $SSH
35+ address: 127.0.0.1:22
36+ # 内置规则可能是多个规则的集合,比如 $HTTP 匹配 GET、POST 等多个字符串
37+ - rule: $HTTP
38+ address: 127.0.0.1:80
39+ # 通配规则
40+ - rule: []
41+ address: 127.0.0.1:4444
42+ ```
43+ 目前的内置规则有:` $SSH ` , ` $RDP ` , ` $HTTP `
44+ 规则按顺序匹配,越靠前优先级越高
45+
46+
47+ # hot-reload
48+ 配置修改后支持热重载:
49+ ```
50+ $ oneport -r
51+ $ # or
52+ $ oneport --reload
53+ ```
You can’t perform that action at this time.
0 commit comments