mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-26 16:57:08 +00:00
chore: better keepalive handle
This commit is contained in:
@@ -340,6 +340,7 @@ type RawConfig struct {
|
||||
GlobalUA string `yaml:"global-ua"`
|
||||
KeepAliveIdle int `yaml:"keep-alive-idle"`
|
||||
KeepAliveInterval int `yaml:"keep-alive-interval"`
|
||||
DisableKeepAlive bool `yaml:"disable-keep-alive"`
|
||||
|
||||
Sniffer RawSniffer `yaml:"sniffer" json:"sniffer"`
|
||||
ProxyProvider map[string]map[string]any `yaml:"proxy-providers"`
|
||||
@@ -657,6 +658,7 @@ func parseGeneral(cfg *RawConfig) (*General, error) {
|
||||
if cfg.KeepAliveInterval != 0 {
|
||||
N.KeepAliveInterval = time.Duration(cfg.KeepAliveInterval) * time.Second
|
||||
}
|
||||
N.DisableKeepAlive = cfg.DisableKeepAlive
|
||||
|
||||
updater.ExternalUIPath = cfg.ExternalUI
|
||||
// checkout externalUI exist
|
||||
|
||||
Reference in New Issue
Block a user