void RestartCoreWorker(Action next) { JObject cfg = GetDecodedConfig(true, false, true); if (cfg == null) { StopCoreThen(next); return; } if (!OverwriteInboundSettings( ref cfg, overwriteInboundType, this.inboundIP, this.inboundPort)) { StopCoreThen(next); return; } InjectSkipCnSiteSettingsIntoConfig(ref cfg); server.title = GetTitle(); server.RestartCoreThen( cfg.ToString(), () => { OnRequireNotifierUpdate?.Invoke(this, EventArgs.Empty); OnRequireKeepTrack?.Invoke(this, new VgcApis.Models.BoolEvent(true)); next?.Invoke(); }, Lib.Utils.GetEnvVarsFromConfig(cfg)); }
void RestartCoreWorker(Action next) { JObject cfg = GetDecodedConfig(true, false, true); if (cfg == null) { StopCoreThen(next); return; } if (!OverwriteInboundSettings( ref cfg, overwriteInboundType, this.inboundIP, this.inboundPort)) { StopCoreThen(next); return; } InjectSkipCNSite(ref cfg); server.RestartCoreThen( cfg.ToString(), next, Lib.Utils.GetEnvVarsFromConfig(cfg)); }