@@ -9,11 +9,10 @@ import (
9
9
"gopkg.in/yaml.v2"
10
10
11
11
"cfa/native/app"
12
- "github.com/metacubex/mihomo/log"
13
12
14
13
"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 "
17
16
)
18
17
19
18
func logDns (cfg * config.RawConfig ) {
@@ -79,16 +78,7 @@ func Load(path string) error {
79
78
80
79
// Start the external controller like in hub.Parse(), but we have set its
81
80
// 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 )
92
82
93
83
app .ApplySubtitlePattern (rawCfg .ClashForAndroid .UiSubtitlePattern )
94
84
@@ -103,5 +93,5 @@ func LoadDefault() {
103
93
panic (err .Error ())
104
94
}
105
95
106
- executor .ApplyConfig (cfg , true )
96
+ hub .ApplyConfig (cfg )
107
97
}
0 commit comments