fix: Adjust the timing of loading proxy selection
This commit is contained in:
parent
2fbbf7519f
commit
55811dae32
1 changed files with 7 additions and 7 deletions
|
@ -2,6 +2,7 @@ package executor
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/Dreamacro/clash/listener/inner"
|
||||||
"net/netip"
|
"net/netip"
|
||||||
"os"
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
@ -78,21 +79,20 @@ func ApplyConfig(cfg *config.Config, force bool) {
|
||||||
updateSniffer(cfg.Sniffer)
|
updateSniffer(cfg.Sniffer)
|
||||||
updateHosts(cfg.Hosts)
|
updateHosts(cfg.Hosts)
|
||||||
updateDNS(cfg.DNS)
|
updateDNS(cfg.DNS)
|
||||||
|
initInnerTcp()
|
||||||
loadProviders(cfg)
|
loadProxyProvider(cfg.Providers)
|
||||||
|
updateProfile(cfg)
|
||||||
|
loadRuleProvider(cfg.RuleProviders)
|
||||||
updateGeneral(cfg.General, force)
|
updateGeneral(cfg.General, force)
|
||||||
updateIPTables(cfg)
|
updateIPTables(cfg)
|
||||||
updateTun(cfg.Tun, cfg.DNS)
|
updateTun(cfg.Tun, cfg.DNS)
|
||||||
updateExperimental(cfg)
|
updateExperimental(cfg)
|
||||||
updateProfile(cfg)
|
|
||||||
|
|
||||||
log.SetLevel(cfg.General.LogLevel)
|
log.SetLevel(cfg.General.LogLevel)
|
||||||
}
|
}
|
||||||
|
|
||||||
func loadProviders(cfg *config.Config) {
|
func initInnerTcp() {
|
||||||
P.NewInner(tunnel.TCPIn())
|
inner.New(tunnel.TCPIn())
|
||||||
loadProxyProvider(cfg.Providers)
|
|
||||||
loadRuleProvider(cfg.RuleProviders)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetGeneral() *config.General {
|
func GetGeneral() *config.General {
|
||||||
|
|
Loading…
Reference in a new issue