diff --git a/v2rayN/ServiceLib/Common/Utils.cs b/v2rayN/ServiceLib/Common/Utils.cs index f7447dfb..5d773a16 100644 --- a/v2rayN/ServiceLib/Common/Utils.cs +++ b/v2rayN/ServiceLib/Common/Utils.cs @@ -816,18 +816,6 @@ public class Utils return new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator); } return false; - //else - //{ - // var id = GetLinuxUserId().Result ?? "1000"; - // if (int.TryParse(id, out var userId)) - // { - // return userId == 0; - // } - // else - // { - // return false; - // } - //} } private static async Task GetLinuxUserId() diff --git a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs index 9ba7a90d..514df308 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs +++ b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs @@ -132,24 +132,6 @@ namespace ServiceLib.Resx { } } - /// - /// 查找类似 Download speed 的本地化字符串。 - /// - public static string downloadSpeed { - get { - return ResourceManager.GetString("downloadSpeed", resourceCulture); - } - } - - /// - /// 查找类似 Do you want to download {0}? 的本地化字符串。 - /// - public static string DownloadYesNo { - get { - return ResourceManager.GetString("DownloadYesNo", resourceCulture); - } - } - /// /// 查找类似 Failed to convert configuration file 的本地化字符串。 /// @@ -1347,15 +1329,6 @@ namespace ServiceLib.Resx { } } - /// - /// 查找类似 Advanced Function 的本地化字符串。 - /// - public static string menuRoutingAdvanced { - get { - return ResourceManager.GetString("menuRoutingAdvanced", resourceCulture); - } - } - /// /// 查找类似 Add 的本地化字符串。 /// @@ -2715,33 +2688,6 @@ namespace ServiceLib.Resx { } } - /// - /// 查找类似 3. Block Domain or IP 的本地化字符串。 - /// - public static string TbRoutingTabBlock { - get { - return ResourceManager.GetString("TbRoutingTabBlock", resourceCulture); - } - } - - /// - /// 查找类似 2. Direct Domain or IP 的本地化字符串。 - /// - public static string TbRoutingTabDirect { - get { - return ResourceManager.GetString("TbRoutingTabDirect", resourceCulture); - } - } - - /// - /// 查找类似 1. Proxy Domain or IP 的本地化字符串。 - /// - public static string TbRoutingTabProxy { - get { - return ResourceManager.GetString("TbRoutingTabProxy", resourceCulture); - } - } - /// /// 查找类似 Pre-defined Rule Set List 的本地化字符串。 /// @@ -3237,24 +3183,6 @@ namespace ServiceLib.Resx { } } - /// - /// 查找类似 Please set the sudo password in Tun mode settings first 的本地化字符串。 - /// - public static string TbSettingsLinuxSudoPasswordIsEmpty { - get { - return ResourceManager.GetString("TbSettingsLinuxSudoPasswordIsEmpty", resourceCulture); - } - } - - /// - /// 查找类似 Please do not run this app with sudo 的本地化字符串。 - /// - public static string TbSettingsLinuxSudoPasswordNotSudoRunApp { - get { - return ResourceManager.GetString("TbSettingsLinuxSudoPasswordNotSudoRunApp", resourceCulture); - } - } - /// /// 查找类似 The password you entered cannot be verified, so make sure you enter it correctly. If the application does not work properly due to an incorrect input, please restart the application. The password will not be stored and you will need to enter it again after each restart. 的本地化字符串。 /// @@ -3948,15 +3876,6 @@ namespace ServiceLib.Resx { } } - /// - /// 查找类似 Ungrouped 的本地化字符串。 - /// - public static string UngroupedServers { - get { - return ResourceManager.GetString("UngroupedServers", resourceCulture); - } - } - /// /// 查找类似 Upgrade App does not exist 的本地化字符串。 /// diff --git a/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx b/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx index 0e18c4be..7eb87b93 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx @@ -132,12 +132,6 @@ درحال دانلود... - - دانلود - - - آیا می خواهید {0} را دانلود کنید؟ - تبدیل فایل پیکربندی انجام نشد @@ -387,9 +381,6 @@ کلید میانبر جهانی {0} با موفقیت ثبت شد - - گروه بندی نشده - همه سرورها @@ -822,9 +813,6 @@ {0} وب سایت - - عملکرد پیشرفته - اضافه کردن @@ -843,15 +831,6 @@ استراتژی دامنه - - 3. مسدود کردن دامنه یا آیپی - - - 2. دایرکت کردن دامنه یا IP - - - 1. پروکسی کردن دامنه یا IP - لیست مجموعه قوانین از پیش تعریف شده @@ -1341,12 +1320,6 @@ رمز عبوری که وارد کرده اید تایید نمی شود، بنابراین مطمئن شوید که آن را به درستی وارد کرده اید. اگر برنامه به دلیل ورودی نادرست به درستی کار نمی کند، لطفاً برنامه را مجدداً راه اندازی کنید. رمز عبور ذخیره نمی شود و پس از هر بار راه اندازی مجدد باید آن را دوباره وارد کنید. - - لطفاً ابتدا رمز عبور sudo را در تنظیمات حالت Tun تنظیم کنید - - - لطفا این برنامه را با sudo اجرا نکنید - *حالت xhttp @@ -1419,4 +1392,4 @@ URL آزمایش اطلاعات اتصال فعلی - + \ No newline at end of file diff --git a/v2rayN/ServiceLib/Resx/ResUI.hu.resx b/v2rayN/ServiceLib/Resx/ResUI.hu.resx index 4f8824b7..6edbb227 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.hu.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.hu.resx @@ -132,12 +132,6 @@ Letöltés... - - Letöltés - - - Le szeretné tölteni? {0} - Nem sikerült a konfigurációs fájl átalakítása @@ -387,9 +381,6 @@ A globális billentyűparancs {0} sikeresen bejegyezve - - Összegyűjtetlen - Összes @@ -822,9 +813,6 @@ {0} Weboldal - - Fejlett funkció - Hozzáadás @@ -843,15 +831,6 @@ Domain stratégia - - 3. Domain vagy IP blokkolása - - - 2. Közvetlen domain vagy IP - - - 1. Proxy domain vagy IP - Előre definiált szabálykészletlista @@ -1341,12 +1320,6 @@ The password you entered cannot be verified, so make sure you enter it correctly. If the application does not work properly due to an incorrect input, please restart the application. The password will not be stored and you will need to enter it again after each restart. - - Kérlek, először állítsd be a sudo jelszót a Tun módban - - - Kérlek, ne futtasd ezt az alkalmazást sudo-ként - *xhttp mód diff --git a/v2rayN/ServiceLib/Resx/ResUI.resx b/v2rayN/ServiceLib/Resx/ResUI.resx index 240aa55b..a83edea6 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.resx @@ -132,12 +132,6 @@ Downloading... - - Download speed - - - Do you want to download {0}? - Failed to convert configuration file @@ -387,9 +381,6 @@ Global hotkey {0} registered successfully - - Ungrouped - All @@ -822,9 +813,6 @@ {0} Website - - Advanced Function - Add @@ -843,15 +831,6 @@ Domain strategy - - 3. Block Domain or IP - - - 2. Direct Domain or IP - - - 1. Proxy Domain or IP - Pre-defined Rule Set List @@ -1341,12 +1320,6 @@ The password you entered cannot be verified, so make sure you enter it correctly. If the application does not work properly due to an incorrect input, please restart the application. The password will not be stored and you will need to enter it again after each restart. - - Please set the sudo password in Tun mode settings first - - - Please do not run this app with sudo - *xhttp mode diff --git a/v2rayN/ServiceLib/Resx/ResUI.ru.resx b/v2rayN/ServiceLib/Resx/ResUI.ru.resx index ddef42d4..182dfaf0 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.ru.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.ru.resx @@ -132,12 +132,6 @@ Загрузка... - - Скорость загрузки - - - Хотите загрузить {0}? - Не удалось преобразовать файл конфигурации @@ -387,9 +381,6 @@ Глобальная горячая клавиша {0} зарегистрирована успешно - - Разгруппировано - Все серверы @@ -825,9 +816,6 @@ {0} веб-сайт - - Расширенная функция - Добавить @@ -846,15 +834,6 @@ Доменная стратегия - - 3.Заблокировать домен или IP - - - 2.Прямой домен или IP - - - 1.Прокси домен или IP - Предустановленный список наборов правил @@ -1341,12 +1320,6 @@ Введенный вами пароль не может быть подтвержден, поэтому убедитесь, что вы ввели его правильно. Если приложение не работает должным образом из-за неправильного ввода, то перезапустите его. Пароль не будет сохранен, и вам придется вводить его заново после каждого перезапуска - - Сначала задайте пароль sudo в настройках TUN-режима - - - Не запускайте программу как суперпользователь - *XHTTP-режим @@ -1419,4 +1392,4 @@ URL для тестирования текущего соединения - + \ 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 97305242..e6399488 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx @@ -132,12 +132,6 @@ 下载开始... - - 下载 - - - 是否下载?{0} - 转换配置文件失败 @@ -387,9 +381,6 @@ 注册全局热键 {0} 成功 - - 未分组配置文件 - 所有 @@ -822,9 +813,6 @@ {0} 官网 - - 高级功能 - 添加规则集 @@ -843,15 +831,6 @@ 域名解析策略 - - 3.阻止的 Domain 或 IP - - - 2.直连的 Domain 或 IP - - - 1.代理的 Domain 或 IP - 预定义规则集列表 @@ -1338,12 +1317,6 @@ 输入的密码无法校验,所以请确保输入正确。如果因为输入错误导致无法正常运行时,请重启本应用。 密码不会存储,每次重启后都需要再次输入。 - - 请先在 Tun 模式设置中设置 sudo 密码 - - - 请不要用 sudo 运行本程序 - *xhttp 模式 diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx index 1e35951b..3a8fc8aa 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx @@ -132,12 +132,6 @@ 下載開始... - - 下載 - - - 是否下載?{0} - 轉換設定檔失敗 @@ -387,9 +381,6 @@ 註冊全域快速鍵 {0} 成功 - - 未分組設定檔 - 所有 @@ -822,9 +813,6 @@ {0} 官網 - - 進階功能 - 新增規則集 @@ -843,15 +831,6 @@ 域名解析策略 - - 3.阻止的 Domain 或 IP - - - 2.直連的 Domain 或 IP - - - 1.代理的 Domain 或 IP - 預定義規則集列表 @@ -1338,12 +1317,6 @@ 輸入的密碼無法校驗,所以請確保輸入正確。如果因為輸入錯誤導致無法正常運作時,請重新啟動本應用。 密碼不會儲存,每次重啟後都需要再次輸入。 - - 請先在 Tun 模式設定中設定 sudo 密碼 - - - 請不要用 sudo 來運行此 App - *xhttp 模式 diff --git a/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs b/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs index 49d82998..c93151cf 100644 --- a/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs @@ -134,20 +134,19 @@ public partial class MainWindow : WindowBase break; } }); + - this.Title = $"{Utils.GetVersion()}"; if (Utils.IsWindows()) { + this.Title = $"{Utils.GetVersion()} - {(Utils.IsAdministrator() ? ResUI.RunAsAdmin : ResUI.NotRunAsAdmin)}"; + ThreadPool.RegisterWaitForSingleObject(Program.ProgramStarted, OnProgramStarted, null, -1, false); HotkeyHandler.Instance.Init(_config, OnHotkeyHandler); } else { - if (Utils.IsAdministrator()) - { - this.Title = $"{Utils.GetVersion()} - {ResUI.TbSettingsLinuxSudoPasswordNotSudoRunApp}"; - NoticeHandler.Instance.SendMessageAndEnqueue(ResUI.TbSettingsLinuxSudoPasswordNotSudoRunApp); - } + this.Title = $"{Utils.GetVersion()}"; + menuRebootAsAdmin.IsVisible = false; menuSettingsSetUWP.IsVisible = false; menuGlobalHotkeySetting.IsVisible = false; diff --git a/v2rayN/v2rayN.Desktop/Views/StatusBarView.axaml.cs b/v2rayN/v2rayN.Desktop/Views/StatusBarView.axaml.cs index b646b5d6..682a3ef2 100644 --- a/v2rayN/v2rayN.Desktop/Views/StatusBarView.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/StatusBarView.axaml.cs @@ -85,7 +85,6 @@ public partial class StatusBarView : ReactiveUserControl case EViewAction.PasswordInput: return await PasswordInputAsync(); - break; } return await Task.FromResult(true); }