fix TCP redirect #131

This commit is contained in:
rui.zheng 2017-08-10 15:43:59 +08:00
parent 347854412b
commit 3862424269
2 changed files with 2 additions and 3 deletions

View File

@ -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)

View File

@ -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 = ""
}