Browse Source

update: change `tproxy` into `tproxy4`

v1.x.x
dnomd343 2 years ago
parent
commit
507b544981
  1. 6
      README.md
  2. 2
      cmd/proxy/main.go
  3. 6
      docs/example_1.md
  4. 18
      docs/example_2.md

6
README.md

@ -67,8 +67,8 @@ proxy:
http:
web: 8080
socks:
proxy: 1094
direct: 1084
proxy4: 1094
direct4: 1084
proxy6: 1096
direct6: 1086
addon:
@ -85,6 +85,8 @@ proxy:
- courier.push.apple.com
```
> 入站代理中内置 `tproxy4``tproxy6` 两个接口,分别对应 IPv4 与 IPv6 的透明代理,可作为 `inboundTag` 在路由中引用
+ `log` :代理日志级别,可选 `debug` 、`info` 、`warning` 、`error` 、`none` ,默认为 `warning`
+ `core` :代理内核类型,可选 `xray` 、`v2ray` 、`sagray`,默认为 `xray`

2
cmd/proxy/main.go

@ -37,7 +37,7 @@ func loadInbounds(config *Config) string {
sniff.DestOverride = sniff.DestOverride[:len(sniff.DestOverride)-1]
}
var inbounds []interface{}
inbounds = append(inbounds, loadTProxyConfig("tproxy", config.V4TProxyPort, sniff))
inbounds = append(inbounds, loadTProxyConfig("tproxy4", config.V4TProxyPort, sniff))
inbounds = append(inbounds, loadTProxyConfig("tproxy6", config.V6TProxyPort, sniff))
for tag, port := range config.Http {
inbounds = append(inbounds, loadHttpConfig(tag, port, sniff))

6
docs/example_1.md

@ -120,15 +120,15 @@ custom:
"outbounds": [
{
"tag": "nodeA",
···
"...": "..."
},
{
"tag": "nodeB",
···
"...": "..."
},
{
"tag": "nodeC",
···
"...": "..."
},
]
}

18
docs/example_2.md

@ -69,8 +69,8 @@ proxy:
log: info
core: xray
socks:
proxy: 1094
direct: 1084
proxy4: 1094
direct4: 1084
proxy6: 1096
direct6: 1086
sniff:
@ -137,11 +137,11 @@ asset:
},
{
"tag": "proxy4",
...
"...": "..."
},
{
"tag": "proxy6",
...
"...": "..."
}
]
}
@ -156,7 +156,7 @@ asset:
"rules": [
{
"type": "field",
"inboundTag": ["direct"],
"inboundTag": ["direct4"],
"outboundTag": "direct4"
},
{
@ -166,7 +166,7 @@ asset:
},
{
"type": "field",
"inboundTag": ["proxy"],
"inboundTag": ["proxy4"],
"outboundTag": "proxy4"
},
{
@ -176,7 +176,7 @@ asset:
},
{
"type": "field",
"inboundTag": ["tproxy"],
"inboundTag": ["tproxy4"],
"domain": ["geosite:cn"],
"outboundTag": "direct4"
},
@ -188,7 +188,7 @@ asset:
},
{
"type": "field",
"inboundTag": ["tproxy"],
"inboundTag": ["tproxy4"],
"ip": [
"geoip:cn",
"geoip:private"
@ -206,7 +206,7 @@ asset:
},
{
"type": "field",
"inboundTag": ["tproxy"],
"inboundTag": ["tproxy4"],
"outboundTag": "proxy4"
},
{

Loading…
Cancel
Save