Allow direct outbounds without domain_resolver

This commit is contained in:
世界
2025-04-01 21:32:49 +08:00
parent 2450dec60e
commit 9802c6a930
2 changed files with 8 additions and 2 deletions

View File

@@ -48,7 +48,12 @@ func NewOutbound(ctx context.Context, router adapter.Router, logger log.ContextL
if options.Detour != "" {
return nil, E.New("`detour` is not supported in direct context")
}
outboundDialer, err := dialer.New(ctx, options.DialerOptions, true)
outboundDialer, err := dialer.NewWithOptions(dialer.Options{
Context: ctx,
Options: options.DialerOptions,
RemoteIsDomain: true,
DirectOutbound: true,
})
if err != nil {
return nil, err
}