mirror of
https://github.com/SagerNet/sing-box.git
synced 2026-08-04 14:36:07 +00:00
Fix AnyTLS URLTest results
Co-authored-by: makt28 <makt28@users.noreply.github.com>
This commit is contained in:
parent
256d42ad18
commit
a29b4ea1e8
1 changed files with 6 additions and 0 deletions
|
|
@ -26,6 +26,8 @@ func RegisterOutbound(registry *outbound.Registry) {
|
|||
outbound.Register[option.AnyTLSOutboundOptions](registry, C.TypeAnyTLS, NewOutbound)
|
||||
}
|
||||
|
||||
var _ adapter.OutboundWithMultiplex = (*Outbound)(nil)
|
||||
|
||||
type Outbound struct {
|
||||
outbound.Adapter
|
||||
dialer tls.Dialer
|
||||
|
|
@ -122,6 +124,10 @@ func (h *Outbound) dialOut(ctx context.Context) (net.Conn, error) {
|
|||
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) {
|
||||
ctx, metadata := adapter.ExtendContext(ctx)
|
||||
metadata.Outbound = h.Tag()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue