chore: listeners support shadowsocks/vmess

This commit is contained in:
wwqgtxx
2022-12-05 10:12:53 +08:00
parent 2e22c712af
commit b7d976796a
24 changed files with 453 additions and 125 deletions

View File

@ -36,10 +36,10 @@ func New(addr string, in chan<- C.ConnContext, additions ...inbound.Addition) (*
func NewWithAuthenticate(addr string, in chan<- C.ConnContext, authenticate bool, additions ...inbound.Addition) (*Listener, error) {
if len(additions) == 0 {
additions = []inbound.Addition{{
InName: "DEFAULT-HTTP",
SpecialRules: "",
}}
additions = []inbound.Addition{
inbound.WithInName("DEFAULT-HTTP"),
inbound.WithSpecialRules(""),
}
}
l, err := inbound.Listen("tcp", addr)