Пример #1
0
        private void MyAppExit(bool blWindowsShutDown)
        {
            try
            {
                Utils.SaveLog("MyAppExit Begin");

                StorageUI();
                ConfigHandler.SaveConfig(ref config);

                //HttpProxyHandle.CloseHttpAgent(config);
                if (blWindowsShutDown)
                {
                    SysProxyHandle.ResetIEProxy4WindowsShutDown();
                }
                else
                {
                    SysProxyHandle.UpdateSysProxy(config, true);
                }

                statistics?.SaveToFile();
                statistics?.Close();

                v2rayHandler.V2rayStop();
                Utils.SaveLog("MyAppExit End");
            }
            catch { }
        }
Пример #2
0
        private void MyAppExit()
        {
            try
            {
                v2rayHandler.V2rayStop();

                //HttpProxyHandle.CloseHttpAgent(config);
                HttpProxyHandle.UpdateSysProxy(config, true);

                ConfigHandler.SaveConfig(ref config);
                statistics?.SaveToFile();
                statistics?.Close();
            }
            catch { }
        }
Пример #3
0
        /// <summary>
        /// 关闭V2ray
        /// </summary>
        private void CloseV2ray()
        {
            ConfigHandler.ToJsonFile(config);

            ChangePACButtonStatus(0);
            //ChangeSysAgent(false);

            v2rayHandler.V2rayStop();
        }