chore: listeners support tunnel

This commit is contained in:
wwqgtxx
2022-12-05 17:03:12 +08:00
parent 8c58d8a8ad
commit 5c410b8df4
5 changed files with 118 additions and 8 deletions

View File

@ -55,6 +55,13 @@ func ParseListener(mapping map[string]any) (C.InboundListener, error) {
return nil, err
}
listener, err = IN.NewMixed(mixedOption)
case "tunnel":
tunnelOption := &IN.TunnelOption{}
err = decoder.Decode(mapping, tunnelOption)
if err != nil {
return nil, err
}
listener, err = IN.NewTunnel(tunnelOption)
case "shadowsocks":
shadowsocksOption := &IN.ShadowSocksOption{}
err = decoder.Decode(mapping, shadowsocksOption)