add intrrupt connection
This commit is contained in:
@@ -201,8 +201,9 @@ func setOutbounds(options *option.Options, input *option.Options, opt *ConfigOpt
|
|||||||
URL: opt.ConnectionTestUrl,
|
URL: opt.ConnectionTestUrl,
|
||||||
Interval: option.Duration(opt.URLTestInterval.Duration()),
|
Interval: option.Duration(opt.URLTestInterval.Duration()),
|
||||||
// IdleTimeout: option.Duration(opt.URLTestIdleTimeout.Duration()),
|
// IdleTimeout: option.Duration(opt.URLTestIdleTimeout.Duration()),
|
||||||
Tolerance: 1,
|
Tolerance: 1,
|
||||||
IdleTimeout: option.Duration(opt.URLTestInterval.Duration().Nanoseconds() * 3),
|
IdleTimeout: option.Duration(opt.URLTestInterval.Duration().Nanoseconds() * 3),
|
||||||
|
InterruptExistConnections: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
defaultSelect := urlTest.Tag
|
defaultSelect := urlTest.Tag
|
||||||
@@ -216,8 +217,9 @@ func setOutbounds(options *option.Options, input *option.Options, opt *ConfigOpt
|
|||||||
Type: C.TypeSelector,
|
Type: C.TypeSelector,
|
||||||
Tag: OutboundSelectTag,
|
Tag: OutboundSelectTag,
|
||||||
SelectorOptions: option.SelectorOutboundOptions{
|
SelectorOptions: option.SelectorOutboundOptions{
|
||||||
Outbounds: append([]string{urlTest.Tag}, tags...),
|
Outbounds: append([]string{urlTest.Tag}, tags...),
|
||||||
Default: defaultSelect,
|
Default: defaultSelect,
|
||||||
|
InterruptExistConnections: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user