From 00381812a55df256a2e46d6a578a6ac00fdac547 Mon Sep 17 00:00:00 2001 From: Hiddify <114227601+hiddify-com@users.noreply.github.com> Date: Mon, 5 Aug 2024 23:26:44 +0200 Subject: [PATCH] add intrrupt connection --- config/config.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/config/config.go b/config/config.go index d27e80c..ae62dc3 100644 --- a/config/config.go +++ b/config/config.go @@ -201,8 +201,9 @@ func setOutbounds(options *option.Options, input *option.Options, opt *ConfigOpt URL: opt.ConnectionTestUrl, Interval: option.Duration(opt.URLTestInterval.Duration()), // IdleTimeout: option.Duration(opt.URLTestIdleTimeout.Duration()), - Tolerance: 1, - IdleTimeout: option.Duration(opt.URLTestInterval.Duration().Nanoseconds() * 3), + Tolerance: 1, + IdleTimeout: option.Duration(opt.URLTestInterval.Duration().Nanoseconds() * 3), + InterruptExistConnections: true, }, } defaultSelect := urlTest.Tag @@ -216,8 +217,9 @@ func setOutbounds(options *option.Options, input *option.Options, opt *ConfigOpt Type: C.TypeSelector, Tag: OutboundSelectTag, SelectorOptions: option.SelectorOutboundOptions{ - Outbounds: append([]string{urlTest.Tag}, tags...), - Default: defaultSelect, + Outbounds: append([]string{urlTest.Tag}, tags...), + Default: defaultSelect, + InterruptExistConnections: true, }, }