mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2025-01-04 00:23:43 +08:00
fix: smux should show its support udp and uot
This commit is contained in:
parent
0c61057551
commit
7f1b7e7521
@ -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{
|
||||
|
@ -92,7 +92,7 @@ func (r *Relay) SupportUDP() bool {
|
||||
switch proxy.SupportWithDialer() {
|
||||
case C.ALLNet:
|
||||
case C.UDP:
|
||||
default: // C.TCP and C.NONet
|
||||
default: // C.TCP and C.InvalidNet
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user