mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-13 21:54:13 +08:00
Bring back override destination
This commit is contained in:
parent
d3d7664ea0
commit
06b84afea6
@ -272,6 +272,7 @@ func (r *RejectActionOptions) UnmarshalJSON(bytes []byte) error {
|
||||
type RouteActionSniff struct {
|
||||
Sniffer badoption.Listable[string] `json:"sniffer,omitempty"`
|
||||
Timeout badoption.Duration `json:"timeout,omitempty"`
|
||||
OverrideDestination bool `json:"override_destination,omitempty"`
|
||||
}
|
||||
|
||||
type RouteActionResolve struct {
|
||||
|
@ -80,6 +80,7 @@ func NewRuleAction(ctx context.Context, logger logger.ContextLogger, action opti
|
||||
sniffAction := &RuleActionSniff{
|
||||
snifferNames: action.SniffOptions.Sniffer,
|
||||
Timeout: time.Duration(action.SniffOptions.Timeout),
|
||||
OverrideDestination: action.SniffOptions.OverrideDestination,
|
||||
}
|
||||
return sniffAction, sniffAction.build()
|
||||
case C.RuleActionTypeResolve:
|
||||
@ -290,7 +291,6 @@ type RuleActionSniff struct {
|
||||
StreamSniffers []sniff.StreamSniffer
|
||||
PacketSniffers []sniff.PacketSniffer
|
||||
Timeout time.Duration
|
||||
// Deprecated
|
||||
OverrideDestination bool
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user