Add UDP timeout route option

This commit is contained in:
世界 2024-11-24 14:45:40 +08:00
parent c4b6d0eadb
commit 1d2720bf5e
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
14 changed files with 155 additions and 239 deletions

View file

@ -47,6 +47,7 @@ func NewRuleAction(ctx context.Context, logger logger.ContextLogger, action opti
FallbackDelay: time.Duration(action.RouteOptionsOptions.FallbackDelay),
UDPDisableDomainUnmapping: action.RouteOptionsOptions.UDPDisableDomainUnmapping,
UDPConnect: action.RouteOptionsOptions.UDPConnect,
UDPTimeout: time.Duration(action.RouteOptionsOptions.UDPTimeout),
}, nil
case C.RuleActionTypeDirect:
directDialer, err := dialer.New(ctx, option.DialerOptions(action.DirectOptions))
@ -152,6 +153,7 @@ type RuleActionRouteOptions struct {
FallbackDelay time.Duration
UDPDisableDomainUnmapping bool
UDPConnect bool
UDPTimeout time.Duration
}
func (r *RuleActionRouteOptions) Type() string {