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: http:
web: 8080 web: 8080
socks: socks:
proxy: 1094 proxy4: 1094
direct: 1084 direct4: 1084
proxy6: 1096 proxy6: 1096
direct6: 1086 direct6: 1086
addon: addon:
@ -85,6 +85,8 @@ proxy:
- courier.push.apple.com - courier.push.apple.com
``` ```
> 入站代理中内置 `tproxy4``tproxy6` 两个接口,分别对应 IPv4 与 IPv6 的透明代理,可作为 `inboundTag` 在路由中引用
+ `log` :代理日志级别,可选 `debug` 、`info` 、`warning` 、`error` 、`none` ,默认为 `warning` + `log` :代理日志级别,可选 `debug` 、`info` 、`warning` 、`error` 、`none` ,默认为 `warning`
+ `core` :代理内核类型,可选 `xray` 、`v2ray` 、`sagray`,默认为 `xray` + `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] sniff.DestOverride = sniff.DestOverride[:len(sniff.DestOverride)-1]
} }
var inbounds []interface{} 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)) inbounds = append(inbounds, loadTProxyConfig("tproxy6", config.V6TProxyPort, sniff))
for tag, port := range config.Http { for tag, port := range config.Http {
inbounds = append(inbounds, loadHttpConfig(tag, port, sniff)) inbounds = append(inbounds, loadHttpConfig(tag, port, sniff))

6
docs/example_1.md

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

18
docs/example_2.md

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

Loading…
Cancel
Save