fix: smux should show its support udp and uot

This commit is contained in:
wwqgtxx
2023-04-23 21:50:42 +08:00
parent 0c61057551
commit 7f1b7e7521
2 changed files with 15 additions and 1 deletions

View File

@ -81,6 +81,20 @@ func (s *SingMux) ListenPacketContext(ctx context.Context, metadata *C.Metadata,
return newPacketConn(pc, s.ProxyAdapter), nil
}
func (s *SingMux) SupportUDP() bool {
if s.onlyTcp {
return s.ProxyAdapter.SupportUOT()
}
return true
}
func (s *SingMux) SupportUOT() bool {
if s.onlyTcp {
return s.ProxyAdapter.SupportUOT()
}
return true
}
func NewSingMux(option SingMuxOption, proxy C.ProxyAdapter, base ProxyBase) (C.ProxyAdapter, error) {
singDialer := &muxSingDialer{dialer: dialer.NewDialer(), proxy: proxy, statistic: option.Statistic}
client, err := mux.NewClient(mux.Options{