This commit is contained in:
ginuerzh
2022-01-28 13:13:17 +08:00
parent b2b76a10a0
commit 1b22a5db9f

View File

@ -247,6 +247,7 @@ func buildServiceConfig(url *url.URL) (*config.ServiceConfig, error) {
} }
} }
// forward mode
if remotes := strings.Trim(url.EscapedPath(), "/"); remotes != "" { if remotes := strings.Trim(url.EscapedPath(), "/"); remotes != "" {
svc.Forwarder = &config.ForwarderConfig{ svc.Forwarder = &config.ForwarderConfig{
Targets: strings.Split(remotes, ","), Targets: strings.Split(remotes, ","),
@ -257,7 +258,7 @@ func buildServiceConfig(url *url.URL) (*config.ServiceConfig, error) {
listener == "tun" || listener == "tap" { listener == "tun" || listener == "tap" {
handler = listener handler = listener
} else { } else {
handler = "tcp" handler = "forward"
} }
} }
} }