@@ -20,14 +20,12 @@ import (
20
20
"github.com/metacubex/mihomo/component/fakeip"
21
21
"github.com/metacubex/mihomo/component/geodata"
22
22
mihomoHttp "github.com/metacubex/mihomo/component/http"
23
- "github.com/metacubex/mihomo/component/keepalive"
24
23
P "github.com/metacubex/mihomo/component/process"
25
24
"github.com/metacubex/mihomo/component/resolver"
26
25
"github.com/metacubex/mihomo/component/resource"
27
26
"github.com/metacubex/mihomo/component/sniffer"
28
27
tlsC "github.com/metacubex/mihomo/component/tls"
29
28
"github.com/metacubex/mihomo/component/trie"
30
- "github.com/metacubex/mihomo/component/updater"
31
29
C "github.com/metacubex/mihomo/constant"
32
30
providerTypes "github.com/metacubex/mihomo/constant/provider"
33
31
snifferTypes "github.com/metacubex/mihomo/constant/sniffer"
@@ -66,6 +64,9 @@ type General struct {
66
64
GlobalClientFingerprint string `json:"global-client-fingerprint"`
67
65
GlobalUA string `json:"global-ua"`
68
66
ETagSupport bool `json:"etag-support"`
67
+ KeepAliveIdle int `json:"keep-alive-idle"`
68
+ KeepAliveInterval int `json:"keep-alive-interval"`
69
+ DisableKeepAlive bool `json:"disable-keep-alive"`
69
70
}
70
71
71
72
// Inbound config
@@ -707,8 +708,6 @@ func ParseRawConfig(rawCfg *RawConfig) (*Config, error) {
707
708
}
708
709
709
710
func parseGeneral (cfg * RawConfig ) (* General , error ) {
710
- updater .SetGeoAutoUpdate (cfg .GeoAutoUpdate )
711
- updater .SetGeoUpdateInterval (cfg .GeoUpdateInterval )
712
711
geodata .SetGeodataMode (cfg .GeodataMode )
713
712
geodata .SetLoader (cfg .GeodataLoader )
714
713
geodata .SetSiteMatcher (cfg .GeositeMatcher )
@@ -719,10 +718,6 @@ func parseGeneral(cfg *RawConfig) (*General, error) {
719
718
mihomoHttp .SetUA (cfg .GlobalUA )
720
719
resource .SetETag (cfg .ETagSupport )
721
720
722
- keepalive .SetKeepAliveIdle (time .Duration (cfg .KeepAliveIdle ) * time .Second )
723
- keepalive .SetKeepAliveInterval (time .Duration (cfg .KeepAliveInterval ) * time .Second )
724
- keepalive .SetDisableKeepAlive (cfg .DisableKeepAlive )
725
-
726
721
return & General {
727
722
Inbound : Inbound {
728
723
Port : cfg .Port ,
@@ -761,6 +756,9 @@ func parseGeneral(cfg *RawConfig) (*General, error) {
761
756
GlobalClientFingerprint : cfg .GlobalClientFingerprint ,
762
757
GlobalUA : cfg .GlobalUA ,
763
758
ETagSupport : cfg .ETagSupport ,
759
+ KeepAliveIdle : cfg .KeepAliveIdle ,
760
+ KeepAliveInterval : cfg .KeepAliveInterval ,
761
+ DisableKeepAlive : cfg .DisableKeepAlive ,
764
762
}, nil
765
763
}
766
764
0 commit comments