fix TCP redirect #131
This commit is contained in:
parent
347854412b
commit
3862424269
@ -296,8 +296,6 @@ func serve(chain *gost.Chain) error {
|
||||
case "rudp":
|
||||
ttl, _ := strconv.Atoi(node.Values.Get("ttl"))
|
||||
ln, err = gost.UDPRemoteForwardListener(node.Addr, chain, time.Duration(ttl)*time.Second)
|
||||
case "redirect":
|
||||
ln, err = gost.TCPListener(node.Addr)
|
||||
case "ssu":
|
||||
ttl, _ := strconv.Atoi(node.Values.Get("ttl"))
|
||||
ln, err = gost.ShadowUDPListener(node.Addr, node.User, time.Duration(ttl)*time.Second)
|
||||
|
3
node.go
3
node.go
@ -49,7 +49,7 @@ func ParseNode(s string) (node Node, err error) {
|
||||
}
|
||||
|
||||
switch node.Transport {
|
||||
case "tls", "ws", "wss", "kcp", "ssh", "quic", "ssu", "http2", "h2", "h2c", "redirect", "obfs4":
|
||||
case "tls", "ws", "wss", "kcp", "ssh", "quic", "ssu", "http2", "h2", "h2c", "obfs4":
|
||||
case "https":
|
||||
node.Protocol = "http"
|
||||
node.Transport = "tls"
|
||||
@ -67,6 +67,7 @@ func ParseNode(s string) (node Node, err error) {
|
||||
node.Protocol = "socks5"
|
||||
case "tcp", "udp", "rtcp", "rudp": // port forwarding
|
||||
case "direct", "remote", "forward": // SSH port forwarding
|
||||
case "redirect": // TCP transparent proxy
|
||||
default:
|
||||
node.Protocol = ""
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user