Fix inconsistent URLTest results

This commit is contained in:
世界
2026-07-25 13:05:31 +08:00
parent 397fb4d20a
commit cb0051d64d
6 changed files with 42 additions and 1 deletions

View File

@@ -26,6 +26,8 @@ func RegisterOutbound(registry *outbound.Registry) {
outbound.Register[option.TrojanOutboundOptions](registry, C.TypeTrojan, NewOutbound)
}
var _ adapter.OutboundWithMultiplex = (*Outbound)(nil)
type Outbound struct {
outbound.Adapter
logger logger.ContextLogger
@@ -107,6 +109,10 @@ func (h *Outbound) ListenPacket(ctx context.Context, destination M.Socksaddr) (n
}
}
func (h *Outbound) MultiplexEnabled() bool {
return h.multiplexDialer != nil
}
func (h *Outbound) InterfaceUpdated() {
if h.transport != nil {
h.transport.Close()