From ae3ab1524577c4f967ce85eaa15d65ea6d0687e2 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Tue, 27 Aug 2024 16:09:07 +0800 Subject: [PATCH] Add Socks Protocol string --- v2rayN/ServiceLib/Global.cs | 1 + v2rayN/ServiceLib/Handler/UpdateHandler.cs | 2 +- v2rayN/ServiceLib/Resx/ResUI.Designer.cs | 11 ++++++++++- v2rayN/ServiceLib/Resx/ResUI.resx | 3 +++ v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx | 3 +++ v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx | 3 +++ v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs | 2 +- 7 files changed, 22 insertions(+), 3 deletions(-) diff --git a/v2rayN/ServiceLib/Global.cs b/v2rayN/ServiceLib/Global.cs index 971d6743..05809ed5 100644 --- a/v2rayN/ServiceLib/Global.cs +++ b/v2rayN/ServiceLib/Global.cs @@ -60,6 +60,7 @@ public const string InboundAPIProtocol = "dokodemo-door"; public const string HttpProtocol = "http://"; public const string HttpsProtocol = "https://"; + public const string SocksProtocol = "socks://"; public const string UserEMail = "t@t.tt"; public const string AutoRunRegPath = @"Software\Microsoft\Windows\CurrentVersion\Run"; diff --git a/v2rayN/ServiceLib/Handler/UpdateHandler.cs b/v2rayN/ServiceLib/Handler/UpdateHandler.cs index e517e17c..af9209c8 100644 --- a/v2rayN/ServiceLib/Handler/UpdateHandler.cs +++ b/v2rayN/ServiceLib/Handler/UpdateHandler.cs @@ -289,7 +289,7 @@ namespace ServiceLib.Handler var coreInfo = CoreInfoHandler.Instance.GetCoreInfo(type); string url = coreInfo.coreReleaseApiUrl; - var result = await (new DownloadHandler()).DownloadStringAsync(url, true, ""); + var result = await (new DownloadHandler()).DownloadStringAsync(url, true, Global.AppName); if (!Utils.IsNullOrEmpty(result)) { ResponseHandler(type, result, preRelease); diff --git a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs index e962417b..3e13ff3a 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs +++ b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs @@ -29,7 +29,7 @@ namespace ServiceLib.Resx { private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - public ResUI() { + internal ResUI() { } /// @@ -1320,6 +1320,15 @@ namespace ServiceLib.Resx { } } + /// + /// 查找类似 Show or hide the main window 的本地化字符串。 + /// + public static string menuShowOrHideMainWindow { + get { + return ResourceManager.GetString("menuShowOrHideMainWindow", resourceCulture); + } + } + /// /// 查找类似 Sort by test result 的本地化字符串。 /// diff --git a/v2rayN/ServiceLib/Resx/ResUI.resx b/v2rayN/ServiceLib/Resx/ResUI.resx index d7c8b6c2..5e68a467 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.resx @@ -1270,4 +1270,7 @@ Export selected server for complete configuration to clipboard + + Show or hide the main window + \ No newline at end of file diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx index 1334b3dd..9585f28c 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx @@ -1267,4 +1267,7 @@ 导出所选服务器完整配置至剪贴板 + + 显示或隐藏主界面 + \ No newline at end of file diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx index ad392c08..fd861acb 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx @@ -1147,4 +1147,7 @@ 匯出所選伺服器完整配置至剪貼簿 + + 顯示或隱藏主介面 + \ No newline at end of file diff --git a/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs b/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs index 9bae9d01..1c713159 100644 --- a/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs @@ -658,7 +658,7 @@ namespace ServiceLib.ViewModels } } - private void UpdateSubscriptionProcess(string subId, bool blProxy) + public void UpdateSubscriptionProcess(string subId, bool blProxy) { (new UpdateHandler()).UpdateSubscriptionProcess(_config, subId, blProxy, UpdateTaskHandler); }