Fix AnyTLS URLTest results

Co-authored-by: makt28 <makt28@users.noreply.github.com>
This commit is contained in:
2026-08-03 12:41:38 +08:00
committed by 世界
parent 256d42ad18
commit a29b4ea1e8

View File

@@ -26,6 +26,8 @@ func RegisterOutbound(registry *outbound.Registry) {
outbound.Register[option.AnyTLSOutboundOptions](registry, C.TypeAnyTLS, NewOutbound) outbound.Register[option.AnyTLSOutboundOptions](registry, C.TypeAnyTLS, NewOutbound)
} }
var _ adapter.OutboundWithMultiplex = (*Outbound)(nil)
type Outbound struct { type Outbound struct {
outbound.Adapter outbound.Adapter
dialer tls.Dialer dialer tls.Dialer
@@ -122,6 +124,10 @@ func (h *Outbound) dialOut(ctx context.Context) (net.Conn, error) {
return h.dialer.DialTLSContext(ctx, h.server) return h.dialer.DialTLSContext(ctx, h.server)
} }
func (h *Outbound) MultiplexEnabled() bool {
return true
}
func (h *Outbound) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) { func (h *Outbound) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) {
ctx, metadata := adapter.ExtendContext(ctx) ctx, metadata := adapter.ExtendContext(ctx)
metadata.Outbound = h.Tag() metadata.Outbound = h.Tag()