@@ -9,11 +9,10 @@ import (
99 "gopkg.in/yaml.v2"
1010
1111 "cfa/native/app"
12- "github.com/metacubex/mihomo/log"
1312
1413 "github.com/metacubex/mihomo/config"
15- "github.com/metacubex/mihomo/hub/executor "
16- "github.com/metacubex/mihomo/hub/route "
14+ "github.com/metacubex/mihomo/hub"
15+ "github.com/metacubex/mihomo/log "
1716)
1817
1918func logDns (cfg * config.RawConfig ) {
@@ -79,16 +78,7 @@ func Load(path string) error {
7978
8079 // Start the external controller like in hub.Parse(), but we have set its
8180 // default override value to end with ":0" for security.
82- //
83- // It would be difficult to update configurations for external controller
84- // inbound, so changes will require a restart after a profile is loaded.
85- if cfg .Controller .ExternalController != "" && ! strings .HasSuffix (cfg .Controller .ExternalController , ":0" ) {
86- go route .Start (cfg .Controller .ExternalController , cfg .Controller .ExternalControllerTLS ,
87- cfg .Controller .Secret , cfg .TLS .Certificate , cfg .TLS .PrivateKey , cfg .Controller .ExternalDohServer ,
88- cfg .General .LogLevel == log .DEBUG )
89- }
90-
91- executor .ApplyConfig (cfg , true )
81+ hub .ApplyConfig (cfg )
9282
9383 app .ApplySubtitlePattern (rawCfg .ClashForAndroid .UiSubtitlePattern )
9484
@@ -103,5 +93,5 @@ func LoadDefault() {
10393 panic (err .Error ())
10494 }
10595
106- executor .ApplyConfig (cfg , true )
96+ hub .ApplyConfig (cfg )
10797}
0 commit comments