Compare commits
46 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
34b4b9d099 | ||
|
|
0808ec1612 | ||
|
|
6b12549cd9 | ||
|
|
92baf9025a | ||
|
|
d58861ab88 | ||
|
|
142230e56a | ||
|
|
b8959c8f12 | ||
|
|
3fa22fdc55 | ||
|
|
a1c743e59c | ||
|
|
ebd0f45c10 | ||
|
|
fce6c46250 | ||
|
|
6114e4ff55 | ||
|
|
cc3d1ff7de | ||
|
|
2f721c8535 | ||
|
|
ddb790104f | ||
|
|
181dfd2f51 | ||
|
|
fca062f75a | ||
|
|
52b84c3201 | ||
|
|
e1021a6832 | ||
|
|
aa338d2da5 | ||
|
|
44471c4926 | ||
|
|
930c7e4ce5 | ||
|
|
2e64f23ef9 | ||
|
|
801d1fd320 | ||
|
|
cfffb5756e | ||
|
|
b30daf8e56 | ||
|
|
84eba671f0 | ||
|
|
f28b93daa0 | ||
|
|
dc16136c59 | ||
|
|
e47caf8c4f | ||
|
|
8ad80bb75d | ||
|
|
22475e459d | ||
|
|
73ad33dfc9 | ||
|
|
f1782c78f4 | ||
|
|
b544dde2c6 | ||
|
|
1a7dca8e58 | ||
|
|
23c7d7fb46 | ||
|
|
65fda407dc | ||
|
|
12ebad436a | ||
|
|
c7297dba7e | ||
|
|
e61368a26e | ||
|
|
b98da3a5dc | ||
|
|
12f3400894 | ||
|
|
4b5508fc3c | ||
|
|
5f40e6e0b7 | ||
|
|
080d660cfa |
19
README.md
19
README.md
@@ -1,5 +1,5 @@
|
|||||||
# v2rayN
|
# v2rayN
|
||||||
A V2Ray client for Windows, support [Xray core](https://github.com/XTLS/Xray-core) and [v2fly core](https://github.com/v2fly/v2ray-core)
|
A GUI client for Windows, support [Xray core](https://github.com/XTLS/Xray-core) and [v2fly core](https://github.com/v2fly/v2ray-core) and [others](https://github.com/2dust/v2rayN/wiki/List-of-supported-cores)
|
||||||
|
|
||||||
|
|
||||||
[](https://github.com/2dust/v2rayN/commits/master)
|
[](https://github.com/2dust/v2rayN/commits/master)
|
||||||
@@ -7,15 +7,16 @@ A V2Ray client for Windows, support [Xray core](https://github.com/XTLS/Xray-cor
|
|||||||
[](https://github.com/2dust/v2rayN/releases)
|
[](https://github.com/2dust/v2rayN/releases)
|
||||||
[](https://t.me/v2rayn)
|
[](https://t.me/v2rayn)
|
||||||
|
|
||||||
### How to use
|
|
||||||
- If you are new to this, please download v2rayN-Core.zip from [releases](https://github.com/2dust/v2rayN/releases)
|
## How to use
|
||||||
- Otherwise please download v2rayN.zip (you will also need to download v2ray core into the same folder with v2rayN.exe)
|
- If you are new to this, please download v2rayN-With-Core.zip from [releases](https://github.com/2dust/v2rayN/releases)
|
||||||
|
- Otherwise please download v2rayN.zip (you will also need to download cores in the bin directory)
|
||||||
- Run v2rayN.exe
|
- Run v2rayN.exe
|
||||||
|
|
||||||
### Requirements
|
## Requirements
|
||||||
- Microsoft [.NET Framework 4.8 Runtime](https://dotnet.microsoft.com/zh-cn/download/dotnet-framework/thank-you/net48-offline-installer)
|
- [Microsoft .NET 6.0 Desktop Runtime ](https://download.visualstudio.microsoft.com/download/pr/513d13b7-b456-45af-828b-b7b7981ff462/edf44a743b78f8b54a2cec97ce888346/windowsdesktop-runtime-6.0.15-win-x64.exe)
|
||||||
- v2fly core [https://github.com/v2fly/v2ray-core/releases](https://github.com/v2fly/v2ray-core/releases)
|
- [Supported cores](https://github.com/2dust/v2rayN/wiki/List-of-supported-cores)
|
||||||
- Xray core [https://github.com/XTLS/Xray-core/releases](https://github.com/XTLS/Xray-core/releases)
|
|
||||||
|
|
||||||
### Telegram Channel
|
|
||||||
|
## Telegram Channel
|
||||||
[github_2dust](https://t.me/github_2dust)
|
[github_2dust](https://t.me/github_2dust)
|
||||||
|
|||||||
@@ -9,13 +9,9 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Google.Protobuf">
|
<PackageReference Include="Google.Protobuf" Version="3.22.3" />
|
||||||
<Version>3.21.9</Version>
|
<PackageReference Include="Grpc.Core" Version="2.46.6" />
|
||||||
</PackageReference>
|
<PackageReference Include="Grpc.Tools" Version="2.53.0">
|
||||||
<PackageReference Include="Grpc.Core">
|
|
||||||
<Version>2.46.5</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Grpc.Tools" Version="2.50.0">
|
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Windows;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Windows;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
using v2rayN.Handler;
|
using v2rayN.Handler;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
@@ -30,8 +31,9 @@ namespace v2rayN
|
|||||||
{
|
{
|
||||||
Global.ExePathKey = Utils.GetMD5(Utils.GetExePath());
|
Global.ExePathKey = Utils.GetMD5(Utils.GetExePath());
|
||||||
|
|
||||||
|
var rebootas = (e.Args ?? new string[] { }).Any(t => t == Global.RebootAs);
|
||||||
ProgramStarted = new EventWaitHandle(false, EventResetMode.AutoReset, Global.ExePathKey, out bool bCreatedNew);
|
ProgramStarted = new EventWaitHandle(false, EventResetMode.AutoReset, Global.ExePathKey, out bool bCreatedNew);
|
||||||
if (!bCreatedNew)
|
if (!rebootas && !bCreatedNew)
|
||||||
{
|
{
|
||||||
ProgramStarted.Set();
|
ProgramStarted.Set();
|
||||||
Current.Shutdown();
|
Current.Shutdown();
|
||||||
@@ -63,6 +65,10 @@ namespace v2rayN
|
|||||||
Environment.Exit(0);
|
Environment.Exit(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (RuntimeInformation.ProcessArchitecture != Architecture.X86 && RuntimeInformation.ProcessArchitecture != Architecture.X64)
|
||||||
|
{
|
||||||
|
_config.guiItem.enableStatistics = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
|
private void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
|
||||||
{
|
{
|
||||||
@@ -78,7 +84,7 @@ namespace v2rayN
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
|
private void TaskScheduler_UnobservedTaskException(object? sender, UnobservedTaskExceptionEventArgs e)
|
||||||
{
|
{
|
||||||
Utils.SaveLog("TaskScheduler_UnobservedTaskException", e.Exception);
|
Utils.SaveLog("TaskScheduler_UnobservedTaskException", e.Exception);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,6 +80,7 @@
|
|||||||
public const string DelayUnit = "";
|
public const string DelayUnit = "";
|
||||||
public const string SpeedUnit = "";
|
public const string SpeedUnit = "";
|
||||||
public const int MinFontSize = 10;
|
public const int MinFontSize = 10;
|
||||||
|
public const string RebootAs = "rebootas";
|
||||||
|
|
||||||
public static readonly List<string> IEProxyProtocols = new() {
|
public static readonly List<string> IEProxyProtocols = new() {
|
||||||
"{ip}:{http_port}",
|
"{ip}:{http_port}",
|
||||||
|
|||||||
@@ -463,9 +463,9 @@ namespace v2rayN.Handler
|
|||||||
}
|
}
|
||||||
if (lstProfile.Count > 0)
|
if (lstProfile.Count > 0)
|
||||||
{
|
{
|
||||||
return SetDefaultServerIndex(ref config, lstProfile[0].indexId);
|
return SetDefaultServerIndex(ref config, lstProfile.Where(t => t.port > 0).FirstOrDefault()?.indexId);
|
||||||
}
|
}
|
||||||
return SetDefaultServerIndex(ref config, SqliteHelper.Instance.Table<ProfileItem>().Select(t => t.indexId).FirstOrDefault());
|
return SetDefaultServerIndex(ref config, SqliteHelper.Instance.Table<ProfileItem>().Where(t => t.port > 0).Select(t => t.indexId).FirstOrDefault());
|
||||||
}
|
}
|
||||||
public static ProfileItem? GetDefaultServer(ref Config config)
|
public static ProfileItem? GetDefaultServer(ref Config config)
|
||||||
{
|
{
|
||||||
@@ -795,6 +795,11 @@ namespace v2rayN.Handler
|
|||||||
profileItem.path = profileItem.path.TrimEx();
|
profileItem.path = profileItem.path.TrimEx();
|
||||||
profileItem.streamSecurity = profileItem.streamSecurity.TrimEx();
|
profileItem.streamSecurity = profileItem.streamSecurity.TrimEx();
|
||||||
|
|
||||||
|
if (!Global.flows.Contains(profileItem.flow))
|
||||||
|
{
|
||||||
|
profileItem.flow = Global.flows.First();
|
||||||
|
}
|
||||||
|
|
||||||
AddServerCommon(ref config, profileItem, toFile);
|
AddServerCommon(ref config, profileItem, toFile);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -866,8 +871,7 @@ namespace v2rayN.Handler
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return o.configVersion == n.configVersion
|
return o.configType == n.configType
|
||||||
&& o.configType == n.configType
|
|
||||||
&& o.address == n.address
|
&& o.address == n.address
|
||||||
&& o.port == n.port
|
&& o.port == n.port
|
||||||
&& o.id == n.id
|
&& o.id == n.id
|
||||||
@@ -933,12 +937,18 @@ namespace v2rayN.Handler
|
|||||||
}
|
}
|
||||||
|
|
||||||
int countServers = 0;
|
int countServers = 0;
|
||||||
|
//Check for duplicate indexId
|
||||||
|
List<string>? lstDbIndexId = null;
|
||||||
List<ProfileItem> lstAdd = new();
|
List<ProfileItem> lstAdd = new();
|
||||||
string[] arrData = clipboardData.Split(Environment.NewLine.ToCharArray());
|
var arrData = clipboardData.Split(Environment.NewLine.ToCharArray()).Where(t => !t.IsNullOrEmpty());
|
||||||
|
if (isSub)
|
||||||
|
{
|
||||||
|
arrData = arrData.Distinct();
|
||||||
|
}
|
||||||
foreach (string str in arrData)
|
foreach (string str in arrData)
|
||||||
{
|
{
|
||||||
//maybe sub
|
//maybe sub
|
||||||
if (Utils.IsNullOrEmpty(subid) && (str.StartsWith(Global.httpsProtocol) || str.StartsWith(Global.httpProtocol)))
|
if (!isSub && (str.StartsWith(Global.httpsProtocol) || str.StartsWith(Global.httpProtocol)))
|
||||||
{
|
{
|
||||||
if (AddSubItem(ref config, str) == 0)
|
if (AddSubItem(ref config, str) == 0)
|
||||||
{
|
{
|
||||||
@@ -957,9 +967,22 @@ namespace v2rayN.Handler
|
|||||||
{
|
{
|
||||||
var existItem = lstOriSub?.FirstOrDefault(t => t.isSub == isSub && CompareProfileItem(t, profileItem, true));
|
var existItem = lstOriSub?.FirstOrDefault(t => t.isSub == isSub && CompareProfileItem(t, profileItem, true));
|
||||||
if (existItem != null)
|
if (existItem != null)
|
||||||
|
{
|
||||||
|
//Check for duplicate indexId
|
||||||
|
if (lstDbIndexId is null)
|
||||||
|
{
|
||||||
|
lstDbIndexId = LazyConfig.Instance.ProfileItemIndexs("");
|
||||||
|
}
|
||||||
|
if (lstAdd.Any(t => t.indexId == existItem.indexId)
|
||||||
|
|| lstDbIndexId.Any(t => t == existItem.indexId))
|
||||||
|
{
|
||||||
|
profileItem.indexId = string.Empty;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
profileItem.indexId = existItem.indexId;
|
profileItem.indexId = existItem.indexId;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//filter
|
//filter
|
||||||
if (!Utils.IsNullOrEmpty(subFilter))
|
if (!Utils.IsNullOrEmpty(subFilter))
|
||||||
{
|
{
|
||||||
@@ -994,7 +1017,7 @@ namespace v2rayN.Handler
|
|||||||
addStatus = AddVlessServer(ref config, profileItem, false);
|
addStatus = AddVlessServer(ref config, profileItem, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addStatus == 0)
|
if (addStatus == 0 && profileItem.port > 0)
|
||||||
{
|
{
|
||||||
countServers++;
|
countServers++;
|
||||||
lstAdd.Add(profileItem);
|
lstAdd.Add(profileItem);
|
||||||
@@ -1167,7 +1190,15 @@ namespace v2rayN.Handler
|
|||||||
lstOriSub = LazyConfig.Instance.ProfileItems(subid);
|
lstOriSub = LazyConfig.Instance.ProfileItems(subid);
|
||||||
}
|
}
|
||||||
|
|
||||||
int counter = AddBatchServers(ref config, clipboardData, subid, isSub, lstOriSub);
|
var counter = 0;
|
||||||
|
if (Utils.IsBase64String(clipboardData))
|
||||||
|
{
|
||||||
|
counter = AddBatchServers(ref config, Utils.Base64Decode(clipboardData), subid, isSub, lstOriSub);
|
||||||
|
}
|
||||||
|
if (counter < 1)
|
||||||
|
{
|
||||||
|
counter = AddBatchServers(ref config, clipboardData, subid, isSub, lstOriSub);
|
||||||
|
}
|
||||||
if (counter < 1)
|
if (counter < 1)
|
||||||
{
|
{
|
||||||
counter = AddBatchServers(ref config, Utils.Base64Decode(clipboardData), subid, isSub, lstOriSub);
|
counter = AddBatchServers(ref config, Utils.Base64Decode(clipboardData), subid, isSub, lstOriSub);
|
||||||
@@ -1287,17 +1318,11 @@ namespace v2rayN.Handler
|
|||||||
|
|
||||||
public static int MoveToGroup(Config config, List<ProfileItem> lstProfile, string subid)
|
public static int MoveToGroup(Config config, List<ProfileItem> lstProfile, string subid)
|
||||||
{
|
{
|
||||||
foreach (var it in lstProfile)
|
foreach (var item in lstProfile)
|
||||||
{
|
{
|
||||||
var item = LazyConfig.Instance.GetProfileItem(it.indexId);
|
|
||||||
if (item is null)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
item.subid = subid;
|
item.subid = subid;
|
||||||
SqliteHelper.Instance.Update(item);
|
|
||||||
}
|
}
|
||||||
|
SqliteHelper.Instance.UpdateAll(lstProfile);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -456,14 +456,8 @@ namespace v2rayN.Handler
|
|||||||
|
|
||||||
boundStreamSettings(node, "out", outbound.streamSettings);
|
boundStreamSettings(node, "out", outbound.streamSettings);
|
||||||
|
|
||||||
if (node.streamSecurity == Global.StreamSecurityReality)
|
if (node.streamSecurity == Global.StreamSecurityReality
|
||||||
{
|
|| node.streamSecurity == Global.StreamSecurity)
|
||||||
usersItem.flow = node.flow;
|
|
||||||
|
|
||||||
outbound.mux.enabled = false;
|
|
||||||
outbound.mux.concurrency = -1;
|
|
||||||
}
|
|
||||||
else if (node.streamSecurity == Global.StreamSecurity)
|
|
||||||
{
|
{
|
||||||
if (!Utils.IsNullOrEmpty(node.flow))
|
if (!Utils.IsNullOrEmpty(node.flow))
|
||||||
{
|
{
|
||||||
@@ -834,11 +828,11 @@ namespace v2rayN.Handler
|
|||||||
/// <param name="fileName"></param>
|
/// <param name="fileName"></param>
|
||||||
/// <param name="msg"></param>
|
/// <param name="msg"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private static int GenerateClientCustomConfig(ProfileItem node, string fileName, out string msg)
|
private static int GenerateClientCustomConfig(ProfileItem node, string? fileName, out string msg)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (node == null)
|
if (node == null || fileName is null)
|
||||||
{
|
{
|
||||||
msg = ResUI.CheckServerSettings;
|
msg = ResUI.CheckServerSettings;
|
||||||
return -1;
|
return -1;
|
||||||
@@ -916,7 +910,8 @@ namespace v2rayN.Handler
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (node == null)
|
if (node == null
|
||||||
|
|| node.port <= 0)
|
||||||
{
|
{
|
||||||
msg = ResUI.CheckServerSettings;
|
msg = ResUI.CheckServerSettings;
|
||||||
return -1;
|
return -1;
|
||||||
@@ -1465,6 +1460,11 @@ namespace v2rayN.Handler
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (item.configType == EConfigType.VLESS
|
||||||
|
&& !Global.flows.Contains(item.flow))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
outbound(item, ref v2rayConfigCopy);
|
outbound(item, ref v2rayConfigCopy);
|
||||||
v2rayConfigCopy.outbounds[0].tag = Global.agentTag + inbound.port.ToString();
|
v2rayConfigCopy.outbounds[0].tag = Global.agentTag + inbound.port.ToString();
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ namespace v2rayN.Handler
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Utils.SaveLog(Utils.ToJson(node));
|
//Utils.SaveLog(Utils.ToJson(node));
|
||||||
Utils.SaveLog(ex.Message, ex);
|
Utils.SaveLog(ex.Message, ex);
|
||||||
string msg = ex.Message;
|
string msg = ex.Message;
|
||||||
ShowMsg(true, msg);
|
ShowMsg(true, msg);
|
||||||
|
|||||||
@@ -200,8 +200,9 @@ namespace v2rayN.Handler
|
|||||||
coreType = ECoreType.v2rayN,
|
coreType = ECoreType.v2rayN,
|
||||||
coreUrl = Global.NUrl,
|
coreUrl = Global.NUrl,
|
||||||
coreReleaseApiUrl = Global.NUrl.Replace(Global.githubUrl, Global.githubApiUrl),
|
coreReleaseApiUrl = Global.NUrl.Replace(Global.githubUrl, Global.githubApiUrl),
|
||||||
coreDownloadUrl32 = Global.NUrl + "/download/{0}/v2rayN.zip",
|
coreDownloadUrl32 = Global.NUrl + "/download/{0}/v2rayN-32.zip",
|
||||||
coreDownloadUrl64 = Global.NUrl + "/download/{0}/v2rayN.zip",
|
coreDownloadUrl64 = Global.NUrl + "/download/{0}/v2rayN.zip",
|
||||||
|
coreDownloadUrlArm64 = Global.NUrl + "/download/{0}/v2rayN-arm64.zip"
|
||||||
});
|
});
|
||||||
|
|
||||||
coreInfos.Add(new CoreInfo
|
coreInfos.Add(new CoreInfo
|
||||||
@@ -213,6 +214,7 @@ namespace v2rayN.Handler
|
|||||||
coreReleaseApiUrl = Global.v2flyCoreUrl.Replace(Global.githubUrl, Global.githubApiUrl),
|
coreReleaseApiUrl = Global.v2flyCoreUrl.Replace(Global.githubUrl, Global.githubApiUrl),
|
||||||
coreDownloadUrl32 = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
coreDownloadUrl32 = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
||||||
coreDownloadUrl64 = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
coreDownloadUrl64 = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
||||||
|
coreDownloadUrlArm64 = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
||||||
match = "V2Ray",
|
match = "V2Ray",
|
||||||
versionArg = "-version",
|
versionArg = "-version",
|
||||||
redirectInfo = true,
|
redirectInfo = true,
|
||||||
@@ -227,6 +229,7 @@ namespace v2rayN.Handler
|
|||||||
coreReleaseApiUrl = Global.SagerNetCoreUrl.Replace(Global.githubUrl, Global.githubApiUrl),
|
coreReleaseApiUrl = Global.SagerNetCoreUrl.Replace(Global.githubUrl, Global.githubApiUrl),
|
||||||
coreDownloadUrl32 = Global.SagerNetCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
coreDownloadUrl32 = Global.SagerNetCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
||||||
coreDownloadUrl64 = Global.SagerNetCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
coreDownloadUrl64 = Global.SagerNetCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
||||||
|
coreDownloadUrlArm64 = Global.SagerNetCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
||||||
match = "V2Ray",
|
match = "V2Ray",
|
||||||
versionArg = "version",
|
versionArg = "version",
|
||||||
redirectInfo = true,
|
redirectInfo = true,
|
||||||
@@ -241,6 +244,7 @@ namespace v2rayN.Handler
|
|||||||
coreReleaseApiUrl = Global.v2flyCoreUrl.Replace(Global.githubUrl, Global.githubApiUrl),
|
coreReleaseApiUrl = Global.v2flyCoreUrl.Replace(Global.githubUrl, Global.githubApiUrl),
|
||||||
coreDownloadUrl32 = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
coreDownloadUrl32 = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
||||||
coreDownloadUrl64 = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
coreDownloadUrl64 = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
||||||
|
coreDownloadUrlArm64 = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
|
||||||
match = "V2Ray",
|
match = "V2Ray",
|
||||||
versionArg = "version",
|
versionArg = "version",
|
||||||
redirectInfo = true,
|
redirectInfo = true,
|
||||||
@@ -255,6 +259,7 @@ namespace v2rayN.Handler
|
|||||||
coreReleaseApiUrl = Global.xrayCoreUrl.Replace(Global.githubUrl, Global.githubApiUrl),
|
coreReleaseApiUrl = Global.xrayCoreUrl.Replace(Global.githubUrl, Global.githubApiUrl),
|
||||||
coreDownloadUrl32 = Global.xrayCoreUrl + "/download/{0}/Xray-windows-{1}.zip",
|
coreDownloadUrl32 = Global.xrayCoreUrl + "/download/{0}/Xray-windows-{1}.zip",
|
||||||
coreDownloadUrl64 = Global.xrayCoreUrl + "/download/{0}/Xray-windows-{1}.zip",
|
coreDownloadUrl64 = Global.xrayCoreUrl + "/download/{0}/Xray-windows-{1}.zip",
|
||||||
|
coreDownloadUrlArm64 = Global.xrayCoreUrl + "/download/{0}/Xray-windows-{1}.zip",
|
||||||
match = "Xray",
|
match = "Xray",
|
||||||
versionArg = "-version",
|
versionArg = "-version",
|
||||||
redirectInfo = true,
|
redirectInfo = true,
|
||||||
@@ -269,6 +274,7 @@ namespace v2rayN.Handler
|
|||||||
coreReleaseApiUrl = Global.clashCoreUrl.Replace(Global.githubUrl, Global.githubApiUrl),
|
coreReleaseApiUrl = Global.clashCoreUrl.Replace(Global.githubUrl, Global.githubApiUrl),
|
||||||
coreDownloadUrl32 = Global.clashCoreUrl + "/download/{0}/clash-windows-386-{0}.zip",
|
coreDownloadUrl32 = Global.clashCoreUrl + "/download/{0}/clash-windows-386-{0}.zip",
|
||||||
coreDownloadUrl64 = Global.clashCoreUrl + "/download/{0}/clash-windows-amd64-{0}.zip",
|
coreDownloadUrl64 = Global.clashCoreUrl + "/download/{0}/clash-windows-amd64-{0}.zip",
|
||||||
|
coreDownloadUrlArm64 = Global.clashCoreUrl + "/download/{0}/clash-windows-arm64-{0}.zip",
|
||||||
match = "v",
|
match = "v",
|
||||||
versionArg = "-v",
|
versionArg = "-v",
|
||||||
redirectInfo = true,
|
redirectInfo = true,
|
||||||
@@ -283,6 +289,7 @@ namespace v2rayN.Handler
|
|||||||
coreReleaseApiUrl = Global.clashMetaCoreUrl.Replace(Global.githubUrl, Global.githubApiUrl),
|
coreReleaseApiUrl = Global.clashMetaCoreUrl.Replace(Global.githubUrl, Global.githubApiUrl),
|
||||||
coreDownloadUrl32 = Global.clashMetaCoreUrl + "/download/{0}/Clash.Meta-windows-386-{0}.zip",
|
coreDownloadUrl32 = Global.clashMetaCoreUrl + "/download/{0}/Clash.Meta-windows-386-{0}.zip",
|
||||||
coreDownloadUrl64 = Global.clashMetaCoreUrl + "/download/{0}/Clash.Meta-windows-amd64-compatible-{0}.zip",
|
coreDownloadUrl64 = Global.clashMetaCoreUrl + "/download/{0}/Clash.Meta-windows-amd64-compatible-{0}.zip",
|
||||||
|
coreDownloadUrlArm64 = Global.clashMetaCoreUrl + "/download/{0}/Clash.Meta-windows-arm64-{0}.zip",
|
||||||
match = "v",
|
match = "v",
|
||||||
versionArg = "-v",
|
versionArg = "-v",
|
||||||
redirectInfo = true,
|
redirectInfo = true,
|
||||||
@@ -297,6 +304,7 @@ namespace v2rayN.Handler
|
|||||||
coreReleaseApiUrl = Global.hysteriaCoreUrl.Replace(Global.githubUrl, Global.githubApiUrl),
|
coreReleaseApiUrl = Global.hysteriaCoreUrl.Replace(Global.githubUrl, Global.githubApiUrl),
|
||||||
coreDownloadUrl32 = Global.hysteriaCoreUrl + "/download/{0}/hysteria-windows-386.exe",
|
coreDownloadUrl32 = Global.hysteriaCoreUrl + "/download/{0}/hysteria-windows-386.exe",
|
||||||
coreDownloadUrl64 = Global.hysteriaCoreUrl + "/download/{0}/hysteria-windows-amd64.exe",
|
coreDownloadUrl64 = Global.hysteriaCoreUrl + "/download/{0}/hysteria-windows-amd64.exe",
|
||||||
|
coreDownloadUrlArm64 = Global.hysteriaCoreUrl + "/download/{0}/hysteria-windows-arm64.exe",
|
||||||
redirectInfo = true,
|
redirectInfo = true,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -325,6 +333,12 @@ namespace v2rayN.Handler
|
|||||||
arguments = "run",
|
arguments = "run",
|
||||||
coreUrl = Global.singboxCoreUrl,
|
coreUrl = Global.singboxCoreUrl,
|
||||||
redirectInfo = true,
|
redirectInfo = true,
|
||||||
|
coreReleaseApiUrl = Global.singboxCoreUrl.Replace(Global.githubUrl, Global.githubApiUrl),
|
||||||
|
coreDownloadUrl32 = Global.singboxCoreUrl + "/download/{0}/sing-box-{1}-windows-386.zip",
|
||||||
|
coreDownloadUrl64 = Global.singboxCoreUrl + "/download/{0}/sing-box-{1}-windows-amd64.zip",
|
||||||
|
coreDownloadUrlArm64 = Global.singboxCoreUrl + "/download/{0}/sing-box-{1}-windows-arm64.zip",
|
||||||
|
match = "sing-box",
|
||||||
|
versionArg = "version",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
|
using Microsoft.Win32;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
@@ -11,14 +11,6 @@ namespace v2rayN.Handler
|
|||||||
public sealed class MainFormHandler
|
public sealed class MainFormHandler
|
||||||
{
|
{
|
||||||
private static readonly Lazy<MainFormHandler> instance = new(() => new());
|
private static readonly Lazy<MainFormHandler> instance = new(() => new());
|
||||||
//Action<bool, string> _updateUI;
|
|
||||||
|
|
||||||
//private DownloadHandle downloadHandle2;
|
|
||||||
//private Config _config;
|
|
||||||
//private V2rayHandler _v2rayHandler;
|
|
||||||
//private List<int> _selecteds;
|
|
||||||
//private Thread _workThread;
|
|
||||||
//Action<int, string> _updateFunc;
|
|
||||||
public static MainFormHandler Instance => instance.Value;
|
public static MainFormHandler Instance => instance.Value;
|
||||||
|
|
||||||
public Icon GetNotifyIcon(Config config)
|
public Icon GetNotifyIcon(Config config)
|
||||||
@@ -142,7 +134,7 @@ namespace v2rayN.Handler
|
|||||||
FilterIndex = 2,
|
FilterIndex = 2,
|
||||||
RestoreDirectory = true
|
RestoreDirectory = true
|
||||||
};
|
};
|
||||||
if (fileDialog.ShowDialog() != DialogResult.OK)
|
if (fileDialog.ShowDialog() != true)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -181,7 +173,7 @@ namespace v2rayN.Handler
|
|||||||
FilterIndex = 2,
|
FilterIndex = 2,
|
||||||
RestoreDirectory = true
|
RestoreDirectory = true
|
||||||
};
|
};
|
||||||
if (fileDialog.ShowDialog() != DialogResult.OK)
|
if (fileDialog.ShowDialog() != true)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -218,7 +210,7 @@ namespace v2rayN.Handler
|
|||||||
FilterIndex = 2,
|
FilterIndex = 2,
|
||||||
RestoreDirectory = true
|
RestoreDirectory = true
|
||||||
};
|
};
|
||||||
if (fileDialog.ShowDialog() != DialogResult.OK)
|
if (fileDialog.ShowDialog() != true)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -246,14 +238,14 @@ namespace v2rayN.Handler
|
|||||||
public bool RestoreGuiNConfig(ref Config config)
|
public bool RestoreGuiNConfig(ref Config config)
|
||||||
{
|
{
|
||||||
var fileContent = string.Empty;
|
var fileContent = string.Empty;
|
||||||
using (OpenFileDialog fileDialog = new())
|
OpenFileDialog fileDialog = new();
|
||||||
{
|
|
||||||
fileDialog.InitialDirectory = Utils.GetBackupPath("");
|
fileDialog.InitialDirectory = Utils.GetBackupPath("");
|
||||||
fileDialog.Filter = "guiNConfig|*.json|All|*.*";
|
fileDialog.Filter = "guiNConfig|*.json|All|*.*";
|
||||||
fileDialog.FilterIndex = 2;
|
fileDialog.FilterIndex = 2;
|
||||||
fileDialog.RestoreDirectory = true;
|
fileDialog.RestoreDirectory = true;
|
||||||
|
|
||||||
if (fileDialog.ShowDialog() == DialogResult.OK)
|
if (fileDialog.ShowDialog() == true)
|
||||||
{
|
{
|
||||||
fileContent = Utils.LoadResource(fileDialog.FileName);
|
fileContent = Utils.LoadResource(fileDialog.FileName);
|
||||||
}
|
}
|
||||||
@@ -261,7 +253,7 @@ namespace v2rayN.Handler
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (Utils.IsNullOrEmpty(fileContent))
|
if (Utils.IsNullOrEmpty(fileContent))
|
||||||
{
|
{
|
||||||
UI.ShowWarning(ResUI.OperationFailed);
|
UI.ShowWarning(ResUI.OperationFailed);
|
||||||
@@ -285,37 +277,52 @@ namespace v2rayN.Handler
|
|||||||
|
|
||||||
public void UpdateTask(Config config, Action<bool, string> update)
|
public void UpdateTask(Config config, Action<bool, string> update)
|
||||||
{
|
{
|
||||||
Task.Run(() => UpdateTaskRun(config, update));
|
Task.Run(() => UpdateTaskRunSubscription(config, update));
|
||||||
|
Task.Run(() => UpdateTaskRunGeo(config, update));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateTaskRun(Config config, Action<bool, string> update)
|
private void UpdateTaskRunSubscription(Config config, Action<bool, string> update)
|
||||||
{
|
{
|
||||||
var autoUpdateSubTime = DateTime.Now;
|
|
||||||
var autoUpdateGeoTime = DateTime.Now;
|
|
||||||
|
|
||||||
Thread.Sleep(60000);
|
Thread.Sleep(60000);
|
||||||
Utils.SaveLog("UpdateTaskRun");
|
Utils.SaveLog("UpdateTaskRunSubscription");
|
||||||
|
|
||||||
var updateHandle = new UpdateHandle();
|
var updateHandle = new UpdateHandle();
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
var dtNow = DateTime.Now;
|
var updateTime = ((DateTimeOffset)DateTime.Now).ToUnixTimeSeconds();
|
||||||
|
var lstSubs = LazyConfig.Instance.SubItems()
|
||||||
|
.Where(t => t.autoUpdateInterval > 0)
|
||||||
|
.Where(t => updateTime - t.updateTime >= t.autoUpdateInterval * 60)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
if (config.guiItem.autoUpdateSubInterval > 0)
|
foreach (var item in lstSubs)
|
||||||
{
|
{
|
||||||
if ((dtNow - autoUpdateSubTime).Hours % config.guiItem.autoUpdateSubInterval == 0)
|
updateHandle.UpdateSubscriptionProcess(config, item.id, true, (bool success, string msg) =>
|
||||||
{
|
|
||||||
updateHandle.UpdateSubscriptionProcess(config, "", true, (bool success, string msg) =>
|
|
||||||
{
|
{
|
||||||
update(success, msg);
|
update(success, msg);
|
||||||
if (success)
|
if (success)
|
||||||
Utils.SaveLog("subscription" + msg);
|
Utils.SaveLog("subscription" + msg);
|
||||||
});
|
});
|
||||||
autoUpdateSubTime = dtNow;
|
item.updateTime = updateTime;
|
||||||
|
ConfigHandler.AddSubItem(ref config, item);
|
||||||
|
|
||||||
|
Thread.Sleep(5000);
|
||||||
}
|
}
|
||||||
Thread.Sleep(60000);
|
Thread.Sleep(60000);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateTaskRunGeo(Config config, Action<bool, string> update)
|
||||||
|
{
|
||||||
|
var autoUpdateGeoTime = DateTime.Now;
|
||||||
|
|
||||||
|
Thread.Sleep(1000 * 120);
|
||||||
|
Utils.SaveLog("UpdateTaskRunGeo");
|
||||||
|
|
||||||
|
var updateHandle = new UpdateHandle();
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
var dtNow = DateTime.Now;
|
||||||
if (config.guiItem.autoUpdateInterval > 0)
|
if (config.guiItem.autoUpdateInterval > 0)
|
||||||
{
|
{
|
||||||
if ((dtNow - autoUpdateGeoTime).Hours % config.guiItem.autoUpdateInterval == 0)
|
if ((dtNow - autoUpdateGeoTime).Hours % config.guiItem.autoUpdateInterval == 0)
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ namespace v2rayN.Handler
|
|||||||
VmessQRCode vmessQRCode = new()
|
VmessQRCode vmessQRCode = new()
|
||||||
{
|
{
|
||||||
v = item.configVersion.ToString(),
|
v = item.configVersion.ToString(),
|
||||||
ps = item.remarks.TrimEx(), //备注也许很长 ;
|
ps = item.remarks.TrimEx(),
|
||||||
add = item.address,
|
add = item.address,
|
||||||
port = item.port.ToString(),
|
port = item.port.ToString(),
|
||||||
id = item.id,
|
id = item.id,
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ namespace v2rayN.Handler
|
|||||||
|
|
||||||
WebProxy webProxy = new(Global.Loopback, it.port);
|
WebProxy webProxy = new(Global.Loopback, it.port);
|
||||||
|
|
||||||
await downloadHandle.DownloadDataAsync(url, webProxy, timeout, async (bool success, string msg) =>
|
await downloadHandle.DownloadDataAsync(url, webProxy, timeout, (bool success, string msg) =>
|
||||||
{
|
{
|
||||||
decimal.TryParse(msg, out decimal dec);
|
decimal.TryParse(msg, out decimal dec);
|
||||||
if (dec > 0)
|
if (dec > 0)
|
||||||
@@ -294,7 +294,7 @@ namespace v2rayN.Handler
|
|||||||
if (item is null) continue;
|
if (item is null) continue;
|
||||||
|
|
||||||
WebProxy webProxy = new(Global.Loopback, it.port);
|
WebProxy webProxy = new(Global.Loopback, it.port);
|
||||||
_ = downloadHandle.DownloadDataAsync(url, webProxy, timeout, async (bool success, string msg) =>
|
_ = downloadHandle.DownloadDataAsync(url, webProxy, timeout, (bool success, string msg) =>
|
||||||
{
|
{
|
||||||
decimal.TryParse(msg, out decimal dec);
|
decimal.TryParse(msg, out decimal dec);
|
||||||
if (dec > 0)
|
if (dec > 0)
|
||||||
|
|||||||
@@ -134,6 +134,8 @@ namespace v2rayN.Handler
|
|||||||
|
|
||||||
private void Init()
|
private void Init()
|
||||||
{
|
{
|
||||||
|
SqliteHelper.Instance.Execute($"delete from ServerStatItem where indexId not in ( select indexId from ProfileItem )");
|
||||||
|
|
||||||
long ticks = DateTime.Now.Date.Ticks;
|
long ticks = DateTime.Now.Date.Ticks;
|
||||||
SqliteHelper.Instance.Execute($"update ServerStatItem set todayUp = 0,todayDown=0,dateNow={ticks} where dateNow<>{ticks}");
|
SqliteHelper.Instance.Execute($"update ServerStatItem set todayUp = 0,todayDown=0,dateNow={ticks} where dateNow<>{ticks}");
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
using Splat;
|
using DynamicData;
|
||||||
|
using Splat;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Windows.Forms;
|
using System.Windows;
|
||||||
using v2rayN.Base;
|
using v2rayN.Base;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
@@ -163,16 +165,6 @@ namespace v2rayN.Handler
|
|||||||
|
|
||||||
Task.Run(async () =>
|
Task.Run(async () =>
|
||||||
{
|
{
|
||||||
//Turn off system proxy
|
|
||||||
//bool bSysProxyType = false;
|
|
||||||
//if (!blProxy && config.sysProxyType == ESysProxyType.ForcedChange)
|
|
||||||
//{
|
|
||||||
// bSysProxyType = true;
|
|
||||||
// config.sysProxyType = ESysProxyType.ForcedClear;
|
|
||||||
// SysProxyHandle.UpdateSysProxy(config, false);
|
|
||||||
// Thread.Sleep(3000);
|
|
||||||
//}
|
|
||||||
|
|
||||||
foreach (var item in subItem)
|
foreach (var item in subItem)
|
||||||
{
|
{
|
||||||
string id = item.id.TrimEx();
|
string id = item.id.TrimEx();
|
||||||
@@ -196,16 +188,55 @@ namespace v2rayN.Handler
|
|||||||
_updateFunc(false, $"{hashCode}{args.GetException().Message}");
|
_updateFunc(false, $"{hashCode}{args.GetException().Message}");
|
||||||
};
|
};
|
||||||
|
|
||||||
//idn to idc
|
|
||||||
url = Utils.GetPunycode(url);
|
|
||||||
|
|
||||||
_updateFunc(false, $"{hashCode}{ResUI.MsgStartGettingSubscriptions}");
|
_updateFunc(false, $"{hashCode}{ResUI.MsgStartGettingSubscriptions}");
|
||||||
|
|
||||||
|
//one url
|
||||||
|
url = Utils.GetPunycode(url);
|
||||||
var result = await downloadHandle.TryDownloadString(url, blProxy, userAgent);
|
var result = await downloadHandle.TryDownloadString(url, blProxy, userAgent);
|
||||||
if (blProxy && Utils.IsNullOrEmpty(result))
|
if (blProxy && Utils.IsNullOrEmpty(result))
|
||||||
{
|
{
|
||||||
result = await downloadHandle.TryDownloadString(url, false, userAgent);
|
result = await downloadHandle.TryDownloadString(url, false, userAgent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//more url
|
||||||
|
if (!Utils.IsNullOrEmpty(item.moreUrl.TrimEx()))
|
||||||
|
{
|
||||||
|
if (!Utils.IsNullOrEmpty(result) && Utils.IsBase64String(result))
|
||||||
|
{
|
||||||
|
result = Utils.Base64Decode(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
var lstUrl = new List<string>
|
||||||
|
{
|
||||||
|
item.moreUrl.TrimEx().Split(",")
|
||||||
|
};
|
||||||
|
foreach (var it in lstUrl)
|
||||||
|
{
|
||||||
|
var url2 = Utils.GetPunycode(it);
|
||||||
|
if (Utils.IsNullOrEmpty(url2))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
var result2 = await downloadHandle.TryDownloadString(url2, blProxy, userAgent);
|
||||||
|
if (blProxy && Utils.IsNullOrEmpty(result2))
|
||||||
|
{
|
||||||
|
result2 = await downloadHandle.TryDownloadString(url2, false, userAgent);
|
||||||
|
}
|
||||||
|
if (!Utils.IsNullOrEmpty(result2))
|
||||||
|
{
|
||||||
|
if (Utils.IsBase64String(result2))
|
||||||
|
{
|
||||||
|
result += Utils.Base64Decode(result2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result += result2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (Utils.IsNullOrEmpty(result))
|
if (Utils.IsNullOrEmpty(result))
|
||||||
{
|
{
|
||||||
_updateFunc(false, $"{hashCode}{ResUI.MsgSubscriptionDecodingFailed}");
|
_updateFunc(false, $"{hashCode}{ResUI.MsgSubscriptionDecodingFailed}");
|
||||||
@@ -231,18 +262,12 @@ namespace v2rayN.Handler
|
|||||||
}
|
}
|
||||||
_updateFunc(false, "-------------------------------------------------------");
|
_updateFunc(false, "-------------------------------------------------------");
|
||||||
}
|
}
|
||||||
////restore system proxy
|
|
||||||
//if (bSysProxyType)
|
|
||||||
//{
|
|
||||||
// config.sysProxyType = ESysProxyType.ForcedChange;
|
|
||||||
// SysProxyHandle.UpdateSysProxy(config, false);
|
|
||||||
//}
|
|
||||||
_updateFunc(true, $"{ResUI.MsgUpdateSubscriptionEnd}");
|
_updateFunc(true, $"{ResUI.MsgUpdateSubscriptionEnd}");
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void UpdateGeoFile(string geoName, Config config, Action<bool, string> update)
|
public void UpdateGeoFile(string geoName, Config config, Action<bool, string> update)
|
||||||
{
|
{
|
||||||
_config = config;
|
_config = config;
|
||||||
@@ -380,6 +405,9 @@ namespace v2rayN.Handler
|
|||||||
case ECoreType.clash_meta:
|
case ECoreType.clash_meta:
|
||||||
version = Regex.Match(echo, $"v[0-9.]+").Groups[0].Value;
|
version = Regex.Match(echo, $"v[0-9.]+").Groups[0].Value;
|
||||||
break;
|
break;
|
||||||
|
case ECoreType.sing_box:
|
||||||
|
version = Regex.Match(echo, $"([0-9.]+)").Groups[1].Value;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
@@ -418,7 +446,20 @@ namespace v2rayN.Handler
|
|||||||
{
|
{
|
||||||
curVersion = "v" + getCoreVersion(type);
|
curVersion = "v" + getCoreVersion(type);
|
||||||
message = string.Format(ResUI.IsLatestCore, curVersion);
|
message = string.Format(ResUI.IsLatestCore, curVersion);
|
||||||
string osBit = Environment.Is64BitProcess ? "64" : "32";
|
string osBit = "64";
|
||||||
|
switch (RuntimeInformation.ProcessArchitecture)
|
||||||
|
{
|
||||||
|
case Architecture.Arm64:
|
||||||
|
osBit = "arm64-v8a";
|
||||||
|
break;
|
||||||
|
case Architecture.X86:
|
||||||
|
osBit = "32";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
osBit = "64";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
url = string.Format(coreInfo.coreDownloadUrl64, version, osBit);
|
url = string.Format(coreInfo.coreDownloadUrl64, version, osBit);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -427,23 +468,58 @@ namespace v2rayN.Handler
|
|||||||
{
|
{
|
||||||
curVersion = getCoreVersion(type);
|
curVersion = getCoreVersion(type);
|
||||||
message = string.Format(ResUI.IsLatestCore, curVersion);
|
message = string.Format(ResUI.IsLatestCore, curVersion);
|
||||||
if (Environment.Is64BitProcess)
|
switch (RuntimeInformation.ProcessArchitecture)
|
||||||
{
|
{
|
||||||
url = string.Format(coreInfo.coreDownloadUrl64, version);
|
case Architecture.Arm64:
|
||||||
|
url = coreInfo.coreDownloadUrlArm64;
|
||||||
|
break;
|
||||||
|
case Architecture.X86:
|
||||||
|
url = coreInfo.coreDownloadUrl32;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
url = coreInfo.coreDownloadUrl64;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else
|
url = string.Format(url, version);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case ECoreType.sing_box:
|
||||||
{
|
{
|
||||||
url = string.Format(coreInfo.coreDownloadUrl32, version);
|
curVersion = "v" + getCoreVersion(type);
|
||||||
|
message = string.Format(ResUI.IsLatestCore, curVersion);
|
||||||
|
switch (RuntimeInformation.ProcessArchitecture)
|
||||||
|
{
|
||||||
|
case Architecture.Arm64:
|
||||||
|
url = coreInfo.coreDownloadUrlArm64;
|
||||||
|
break;
|
||||||
|
case Architecture.X86:
|
||||||
|
url = coreInfo.coreDownloadUrl32;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
url = coreInfo.coreDownloadUrl64;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
url = string.Format(url, version, version.Replace("v", ""));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ECoreType.v2rayN:
|
case ECoreType.v2rayN:
|
||||||
{
|
{
|
||||||
curVersion = FileVersionInfo.GetVersionInfo(Utils.GetExePath()).FileVersion.ToString();
|
curVersion = FileVersionInfo.GetVersionInfo(Utils.GetExePath()).FileVersion.ToString();
|
||||||
message = string.Format(ResUI.IsLatestN, curVersion);
|
message = string.Format(ResUI.IsLatestN, curVersion);
|
||||||
|
switch (RuntimeInformation.ProcessArchitecture)
|
||||||
|
{
|
||||||
|
case Architecture.Arm64:
|
||||||
|
url = string.Format(coreInfo.coreDownloadUrlArm64, version);
|
||||||
|
break;
|
||||||
|
case Architecture.X86:
|
||||||
|
url = string.Format(coreInfo.coreDownloadUrl32, version);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
url = string.Format(coreInfo.coreDownloadUrl64, version);
|
url = string.Format(coreInfo.coreDownloadUrl64, version);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
throw new ArgumentException("Type");
|
throw new ArgumentException("Type");
|
||||||
}
|
}
|
||||||
@@ -479,7 +555,7 @@ namespace v2rayN.Handler
|
|||||||
bool blDownload = false;
|
bool blDownload = false;
|
||||||
if (blAsk)
|
if (blAsk)
|
||||||
{
|
{
|
||||||
if (UI.ShowYesNo(string.Format(ResUI.DownloadYesNo, url)) == DialogResult.Yes)
|
if (UI.ShowYesNo(string.Format(ResUI.DownloadYesNo, url)) == MessageBoxResult.Yes)
|
||||||
{
|
{
|
||||||
blDownload = true;
|
blDownload = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -301,7 +301,7 @@
|
|||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 备注或别名
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string remarks
|
public string remarks
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
public string coreDownloadUrl64 { get; set; }
|
public string coreDownloadUrl64 { get; set; }
|
||||||
|
|
||||||
|
public string coreDownloadUrlArm64 { get; set; }
|
||||||
|
|
||||||
public string match { get; set; }
|
public string match { get; set; }
|
||||||
public string versionArg { get; set; }
|
public string versionArg { get; set; }
|
||||||
|
|
||||||
|
|||||||
9
v2rayN/v2rayN/Mode/EViewAction.cs
Normal file
9
v2rayN/v2rayN/Mode/EViewAction.cs
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
namespace v2rayN.Mode
|
||||||
|
{
|
||||||
|
public enum EViewAction
|
||||||
|
{
|
||||||
|
AdjustMainLvColWidth,
|
||||||
|
ProfilesFocus
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -121,7 +121,7 @@ namespace v2rayN.Mode
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string network { get; set; }
|
public string network { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 备注或别名
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string remarks { get; set; }
|
public string remarks { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -6,46 +6,24 @@ namespace v2rayN.Mode
|
|||||||
public class SubItem
|
public class SubItem
|
||||||
{
|
{
|
||||||
[PrimaryKey]
|
[PrimaryKey]
|
||||||
public string id
|
public string id { get; set; }
|
||||||
{
|
|
||||||
get; set;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
public string remarks { get; set; }
|
||||||
/// 备注
|
|
||||||
/// </summary>
|
|
||||||
public string remarks
|
|
||||||
{
|
|
||||||
get; set;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
public string url { get; set; }
|
||||||
/// url
|
|
||||||
/// </summary>
|
public string moreUrl { get; set; }
|
||||||
public string url
|
|
||||||
{
|
|
||||||
get; set;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// enable
|
|
||||||
/// </summary>
|
|
||||||
public bool enabled { get; set; } = true;
|
public bool enabled { get; set; } = true;
|
||||||
|
|
||||||
/// <summary>
|
public string userAgent { get; set; } = string.Empty;
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public string userAgent
|
|
||||||
{
|
|
||||||
get; set;
|
|
||||||
} = string.Empty;
|
|
||||||
|
|
||||||
|
public int sort { get; set; }
|
||||||
|
|
||||||
public int sort
|
|
||||||
{
|
|
||||||
get; set;
|
|
||||||
}
|
|
||||||
public string filter { get; set; }
|
public string filter { get; set; }
|
||||||
|
|
||||||
|
public int autoUpdateInterval { get; set; }
|
||||||
|
|
||||||
|
public long updateTime { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
185
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
185
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
@@ -367,11 +367,11 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Alias 的本地化字符串。
|
/// 查找类似 Automatic update interval(minutes) 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string LvAlias {
|
public static string LvAutoUpdateInterval {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("LvAlias", resourceCulture);
|
return ResourceManager.GetString("LvAutoUpdateInterval", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -420,6 +420,15 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 More urls, separated by commas 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string LvMoreUrl {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("LvMoreUrl", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Port 的本地化字符串。
|
/// 查找类似 Port 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -474,15 +483,6 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 Test Results 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string LvTestResults {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("LvTestResults", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Speed(M/s) 的本地化字符串。
|
/// 查找类似 Speed(M/s) 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -564,15 +564,6 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 Medium 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string MediumFresh {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("MediumFresh", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Add a custom configuration server 的本地化字符串。
|
/// 查找类似 Add a custom configuration server 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -933,6 +924,15 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 Reboot as administrator 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string menuRebootAsAdmin {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("menuRebootAsAdmin", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Reload 的本地化字符串。
|
/// 查找类似 Reload 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1401,24 +1401,6 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 PAC update failed 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string MsgPACUpdateFailed {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("MsgPACUpdateFailed", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 PAC update succeeded 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string MsgPACUpdateSuccessfully {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("MsgPACUpdateSuccessfully", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Resolve {0} successfully 的本地化字符串。
|
/// 查找类似 Resolve {0} successfully 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1429,7 +1411,7 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Servers Filter 的本地化字符串。
|
/// 查找类似 Servers Filter, press Enter to execute 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string MsgServerTitle {
|
public static string MsgServerTitle {
|
||||||
get {
|
get {
|
||||||
@@ -1437,15 +1419,6 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 Simplify PAC Success 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string MsgSimplifyPAC {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("MsgSimplifyPAC", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Updates are not enabled, skip this subscription 的本地化字符串。
|
/// 查找类似 Updates are not enabled, skip this subscription 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1473,15 +1446,6 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 Start updating PAC... 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string MsgStartUpdatingPAC {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("MsgStartUpdatingPAC", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Invalid subscription content 的本地化字符串。
|
/// 查找类似 Invalid subscription content 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1536,24 +1500,6 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 This feature relies on the Http global proxy, please set it correctly first. 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string NeedHttpGlobalProxy {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("NeedHttpGlobalProxy", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 Normal use of this version requires .NET Framework 4.8 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string NetFrameworkRequirementsTip {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("NetFrameworkRequirementsTip", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Non-VMess or ss protocol 的本地化字符串。
|
/// 查找类似 Non-VMess or ss protocol 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1662,15 +1608,6 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 Fast 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string QuickFresh {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("QuickFresh", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Global hotkey {0} registered failed, reason {1} 的本地化字符串。
|
/// 查找类似 Global hotkey {0} registered failed, reason {1} 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1753,20 +1690,11 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Slow 的本地化字符串。
|
/// 查找类似 {0}:{1}/s↑ | {2}/s↓ 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string SlowFresh {
|
public static string SpeedDisplayText {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("SlowFresh", resourceCulture);
|
return ResourceManager.GetString("SpeedDisplayText", resourceCulture);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 Note: This feature relies on the Http global proxy. Please manually adjust the Http global proxy and active node after testing. 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string SpeedServerTips {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("SpeedServerTips", resourceCulture);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1806,15 +1734,6 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 PAC failed to start. Please run this program as Administrator. 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string StartPacFailed {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("StartPacFailed", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Start service ({0})... 的本地化字符串。
|
/// 查找类似 Start service ({0})... 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -2347,24 +2266,6 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 Automatic latency test interval (minutes) 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string TbSettingsAutoTest {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("TbSettingsAutoTest", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 Automatic update interval of subscriptions (hours) 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string TbSettingsAutoUpdate {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("TbSettingsAutoUpdate", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Automatic update interval of and Geo (hours) 的本地化字符串。
|
/// 查找类似 Automatic update interval of and Geo (hours) 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -2581,15 +2482,6 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 Enable IPv6 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string TbSettingsIpv6 {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("TbSettingsIpv6", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Keep older when deduplication 的本地化字符串。
|
/// 查找类似 Keep older when deduplication 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -2617,6 +2509,15 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 Enable logging to file 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string TbSettingsLogEnabledToFile {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TbSettingsLogEnabledToFile", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Log Level 的本地化字符串。
|
/// 查找类似 Log Level 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -2653,15 +2554,6 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 Pac listen port 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string TbSettingsPacListenPort {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("TbSettingsPacListenPort", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Auth pass 的本地化字符串。
|
/// 查找类似 Auth pass 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -2689,15 +2581,6 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 After modifying the following parameters, click Save to take effect 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string TbSettingsSaveTip {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("TbSettingsSaveTip", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Set Win10 UWP Loopback 的本地化字符串。
|
/// 查找类似 Set Win10 UWP Loopback 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -195,9 +195,6 @@
|
|||||||
<data name="LvAddress" xml:space="preserve">
|
<data name="LvAddress" xml:space="preserve">
|
||||||
<value>آدرس</value>
|
<value>آدرس</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LvAlias" xml:space="preserve">
|
|
||||||
<value>Alias</value>
|
|
||||||
</data>
|
|
||||||
<data name="LvEncryptionMethod" xml:space="preserve">
|
<data name="LvEncryptionMethod" xml:space="preserve">
|
||||||
<value>امنیت</value>
|
<value>امنیت</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -210,9 +207,6 @@
|
|||||||
<data name="LvSubscription" xml:space="preserve">
|
<data name="LvSubscription" xml:space="preserve">
|
||||||
<value>گروه فرعی</value>
|
<value>گروه فرعی</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LvTestResults" xml:space="preserve">
|
|
||||||
<value>نتایج تست</value>
|
|
||||||
</data>
|
|
||||||
<data name="LvTodayDownloadDataAmount" xml:space="preserve">
|
<data name="LvTodayDownloadDataAmount" xml:space="preserve">
|
||||||
<value> ترافیک دانلود امروز</value>
|
<value> ترافیک دانلود امروز</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -228,9 +222,6 @@
|
|||||||
<data name="LvTransportProtocol" xml:space="preserve">
|
<data name="LvTransportProtocol" xml:space="preserve">
|
||||||
<value>جابجایی</value>
|
<value>جابجایی</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MediumFresh" xml:space="preserve">
|
|
||||||
<value>متوسط</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgClearSubscription" xml:space="preserve">
|
<data name="MsgClearSubscription" xml:space="preserve">
|
||||||
<value>محتوای اشتراک اصلی را پاک کنید</value>
|
<value>محتوای اشتراک اصلی را پاک کنید</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -246,27 +237,15 @@
|
|||||||
<data name="MsgNoValidSubscription" xml:space="preserve">
|
<data name="MsgNoValidSubscription" xml:space="preserve">
|
||||||
<value>هیچ اشتراک معتبری تنظیم نشده است</value>
|
<value>هیچ اشتراک معتبری تنظیم نشده است</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MsgPACUpdateFailed" xml:space="preserve">
|
|
||||||
<value>به روز رسانی PAC ناموفق بود</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgPACUpdateSuccessfully" xml:space="preserve">
|
|
||||||
<value>به روز رسانی PAC با موفقیت انجام شد</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgParsingSuccessfully" xml:space="preserve">
|
<data name="MsgParsingSuccessfully" xml:space="preserve">
|
||||||
<value>Resolve {0} successfully</value>
|
<value>Resolve {0} successfully</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MsgSimplifyPAC" xml:space="preserve">
|
|
||||||
<value>Simplify PAC Success</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgStartGettingSubscriptions" xml:space="preserve">
|
<data name="MsgStartGettingSubscriptions" xml:space="preserve">
|
||||||
<value>شروع به دریافت اشتراک شد</value>
|
<value>شروع به دریافت اشتراک شد</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MsgStartUpdating" xml:space="preserve">
|
<data name="MsgStartUpdating" xml:space="preserve">
|
||||||
<value>شروع بروزرسانی {0}...</value>
|
<value>شروع بروزرسانی {0}...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MsgStartUpdatingPAC" xml:space="preserve">
|
|
||||||
<value>شروع بروزرسانی PAC...</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgSubscriptionDecodingFailed" xml:space="preserve">
|
<data name="MsgSubscriptionDecodingFailed" xml:space="preserve">
|
||||||
<value>محتوای اشتراک نامعتبر است</value>
|
<value>محتوای اشتراک نامعتبر است</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -285,9 +264,6 @@
|
|||||||
<data name="MsgUpdateV2rayCoreSuccessfullyMore" xml:space="preserve">
|
<data name="MsgUpdateV2rayCoreSuccessfullyMore" xml:space="preserve">
|
||||||
<value>هسته با موفقیت بروزرسانی شد! راه اندازی مجدد سرویس...</value>
|
<value>هسته با موفقیت بروزرسانی شد! راه اندازی مجدد سرویس...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="NeedHttpGlobalProxy" xml:space="preserve">
|
|
||||||
<value> This feature relies on the Http global proxy, please set it correctly first.</value>
|
|
||||||
</data>
|
|
||||||
<data name="NonvmessOrssProtocol" xml:space="preserve">
|
<data name="NonvmessOrssProtocol" xml:space="preserve">
|
||||||
<value>Non-VMess or ss protocol</value>
|
<value>Non-VMess or ss protocol</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -315,9 +291,6 @@
|
|||||||
<data name="PleaseSelectServer" xml:space="preserve">
|
<data name="PleaseSelectServer" xml:space="preserve">
|
||||||
<value>لطفا ابتدا سرور را انتخاب کنید</value>
|
<value>لطفا ابتدا سرور را انتخاب کنید</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="QuickFresh" xml:space="preserve">
|
|
||||||
<value>سریع</value>
|
|
||||||
</data>
|
|
||||||
<data name="RemoveDuplicateServerResult" xml:space="preserve">
|
<data name="RemoveDuplicateServerResult" xml:space="preserve">
|
||||||
<value>Servers deduplication completed. Old: {0}, New: {1}.</value>
|
<value>Servers deduplication completed. Old: {0}, New: {1}.</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -330,15 +303,6 @@
|
|||||||
<data name="SaveServerConfigurationIn" xml:space="preserve">
|
<data name="SaveServerConfigurationIn" xml:space="preserve">
|
||||||
<value>The server configuration file is saved at: {0}</value>
|
<value>The server configuration file is saved at: {0}</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SlowFresh" xml:space="preserve">
|
|
||||||
<value>آهسته. تدریجی</value>
|
|
||||||
</data>
|
|
||||||
<data name="SpeedServerTips" xml:space="preserve">
|
|
||||||
<value>توجه: این ویژگی به پروکسی جهانی Http متکی است. لطفاً پس از آزمایش، پراکسی جهانی Http و گره فعال را به صورت دستی تنظیم کنید.</value>
|
|
||||||
</data>
|
|
||||||
<data name="StartPacFailed" xml:space="preserve">
|
|
||||||
<value>PAC شروع نشد. لطفا این برنامه را به عنوان Administrator اجرا کنید.</value>
|
|
||||||
</data>
|
|
||||||
<data name="StartService" xml:space="preserve">
|
<data name="StartService" xml:space="preserve">
|
||||||
<value>Start service ({0})...</value>
|
<value>Start service ({0})...</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -472,9 +436,6 @@
|
|||||||
<data name="MsgServerTitle" xml:space="preserve">
|
<data name="MsgServerTitle" xml:space="preserve">
|
||||||
<value>فیلتر سرورها</value>
|
<value>فیلتر سرورها</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="NetFrameworkRequirementsTip" xml:space="preserve">
|
|
||||||
<value>استفاده معمولی از این نسخه به .NET Framework 4.8 نیاز دارد</value>
|
|
||||||
</data>
|
|
||||||
<data name="menuCheckUpdate" xml:space="preserve">
|
<data name="menuCheckUpdate" xml:space="preserve">
|
||||||
<value>بررسی بروزرسانی</value>
|
<value>بررسی بروزرسانی</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -763,12 +724,6 @@
|
|||||||
<data name="TbSettingsAutoHideStartup" xml:space="preserve">
|
<data name="TbSettingsAutoHideStartup" xml:space="preserve">
|
||||||
<value>Auto hide startup</value>
|
<value>Auto hide startup</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsAutoTest" xml:space="preserve">
|
|
||||||
<value>فاصله تست تأخیر خودکار (دقیقه)</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsAutoUpdate" xml:space="preserve">
|
|
||||||
<value>فاصله به روز رسانی خودکار اشتراک ها (ساعت)</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsAutoUpdateInterval" xml:space="preserve">
|
<data name="TbSettingsAutoUpdateInterval" xml:space="preserve">
|
||||||
<value>فاصله به روز رسانی خودکار و Geo (ساعت)</value>
|
<value>فاصله به روز رسانی خودکار و Geo (ساعت)</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -808,9 +763,6 @@
|
|||||||
<data name="TbSettingsIgnoreGeoUpdateCore" xml:space="preserve">
|
<data name="TbSettingsIgnoreGeoUpdateCore" xml:space="preserve">
|
||||||
<value>هنگام بهروزرسانی هسته، فایلهای Geo را نادیده بگیرید</value>
|
<value>هنگام بهروزرسانی هسته، فایلهای Geo را نادیده بگیرید</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsIpv6" xml:space="preserve">
|
|
||||||
<value>IPv6 را فعال کنید</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsKeepOlderDedupl" xml:space="preserve">
|
<data name="TbSettingsKeepOlderDedupl" xml:space="preserve">
|
||||||
<value>Keep older when deduplication</value>
|
<value>Keep older when deduplication</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -826,18 +778,12 @@
|
|||||||
<data name="TbSettingsN" xml:space="preserve">
|
<data name="TbSettingsN" xml:space="preserve">
|
||||||
<value>تنظیمات v2rayN</value>
|
<value>تنظیمات v2rayN</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsPacListenPort" xml:space="preserve">
|
|
||||||
<value>Pac پورت درحال شنود</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsPass" xml:space="preserve">
|
<data name="TbSettingsPass" xml:space="preserve">
|
||||||
<value>Auth pass</value>
|
<value>Auth pass</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsRemoteDNS" xml:space="preserve">
|
<data name="TbSettingsRemoteDNS" xml:space="preserve">
|
||||||
<value>سفارشی DNS (multiple, separated by commas (,))</value>
|
<value>سفارشی DNS (multiple, separated by commas (,))</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsSaveTip" xml:space="preserve">
|
|
||||||
<value>After modifying the following parameters, click Save to take effect</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsSetUWP" xml:space="preserve">
|
<data name="TbSettingsSetUWP" xml:space="preserve">
|
||||||
<value>Set Win10 UWP Loopback</value>
|
<value>Set Win10 UWP Loopback</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -195,9 +195,6 @@
|
|||||||
<data name="LvAddress" xml:space="preserve">
|
<data name="LvAddress" xml:space="preserve">
|
||||||
<value>Address</value>
|
<value>Address</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LvAlias" xml:space="preserve">
|
|
||||||
<value>Alias</value>
|
|
||||||
</data>
|
|
||||||
<data name="LvEncryptionMethod" xml:space="preserve">
|
<data name="LvEncryptionMethod" xml:space="preserve">
|
||||||
<value>Security</value>
|
<value>Security</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -210,9 +207,6 @@
|
|||||||
<data name="LvSubscription" xml:space="preserve">
|
<data name="LvSubscription" xml:space="preserve">
|
||||||
<value>Subs group</value>
|
<value>Subs group</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LvTestResults" xml:space="preserve">
|
|
||||||
<value>Test Results</value>
|
|
||||||
</data>
|
|
||||||
<data name="LvTodayDownloadDataAmount" xml:space="preserve">
|
<data name="LvTodayDownloadDataAmount" xml:space="preserve">
|
||||||
<value>Download traffic today</value>
|
<value>Download traffic today</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -228,9 +222,6 @@
|
|||||||
<data name="LvTransportProtocol" xml:space="preserve">
|
<data name="LvTransportProtocol" xml:space="preserve">
|
||||||
<value>Transport</value>
|
<value>Transport</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MediumFresh" xml:space="preserve">
|
|
||||||
<value>Medium</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgClearSubscription" xml:space="preserve">
|
<data name="MsgClearSubscription" xml:space="preserve">
|
||||||
<value>Clear original subscription content</value>
|
<value>Clear original subscription content</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -246,27 +237,15 @@
|
|||||||
<data name="MsgNoValidSubscription" xml:space="preserve">
|
<data name="MsgNoValidSubscription" xml:space="preserve">
|
||||||
<value>No valid subscriptions set</value>
|
<value>No valid subscriptions set</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MsgPACUpdateFailed" xml:space="preserve">
|
|
||||||
<value>PAC update failed</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgPACUpdateSuccessfully" xml:space="preserve">
|
|
||||||
<value>PAC update succeeded</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgParsingSuccessfully" xml:space="preserve">
|
<data name="MsgParsingSuccessfully" xml:space="preserve">
|
||||||
<value>Resolve {0} successfully</value>
|
<value>Resolve {0} successfully</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MsgSimplifyPAC" xml:space="preserve">
|
|
||||||
<value>Simplify PAC Success</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgStartGettingSubscriptions" xml:space="preserve">
|
<data name="MsgStartGettingSubscriptions" xml:space="preserve">
|
||||||
<value>Start getting subscriptions</value>
|
<value>Start getting subscriptions</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MsgStartUpdating" xml:space="preserve">
|
<data name="MsgStartUpdating" xml:space="preserve">
|
||||||
<value>Start updating {0}...</value>
|
<value>Start updating {0}...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MsgStartUpdatingPAC" xml:space="preserve">
|
|
||||||
<value>Start updating PAC...</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgSubscriptionDecodingFailed" xml:space="preserve">
|
<data name="MsgSubscriptionDecodingFailed" xml:space="preserve">
|
||||||
<value>Invalid subscription content</value>
|
<value>Invalid subscription content</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -285,9 +264,6 @@
|
|||||||
<data name="MsgUpdateV2rayCoreSuccessfullyMore" xml:space="preserve">
|
<data name="MsgUpdateV2rayCoreSuccessfullyMore" xml:space="preserve">
|
||||||
<value>Update Core successfully! Restarting service...</value>
|
<value>Update Core successfully! Restarting service...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="NeedHttpGlobalProxy" xml:space="preserve">
|
|
||||||
<value> This feature relies on the Http global proxy, please set it correctly first.</value>
|
|
||||||
</data>
|
|
||||||
<data name="NonvmessOrssProtocol" xml:space="preserve">
|
<data name="NonvmessOrssProtocol" xml:space="preserve">
|
||||||
<value>Non-VMess or ss protocol</value>
|
<value>Non-VMess or ss protocol</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -315,9 +291,6 @@
|
|||||||
<data name="PleaseSelectServer" xml:space="preserve">
|
<data name="PleaseSelectServer" xml:space="preserve">
|
||||||
<value>Please select the server first</value>
|
<value>Please select the server first</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="QuickFresh" xml:space="preserve">
|
|
||||||
<value>Fast</value>
|
|
||||||
</data>
|
|
||||||
<data name="RemoveDuplicateServerResult" xml:space="preserve">
|
<data name="RemoveDuplicateServerResult" xml:space="preserve">
|
||||||
<value>Servers deduplication completed. Old: {0}, New: {1}.</value>
|
<value>Servers deduplication completed. Old: {0}, New: {1}.</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -330,15 +303,6 @@
|
|||||||
<data name="SaveServerConfigurationIn" xml:space="preserve">
|
<data name="SaveServerConfigurationIn" xml:space="preserve">
|
||||||
<value>The server configuration file is saved at: {0}</value>
|
<value>The server configuration file is saved at: {0}</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SlowFresh" xml:space="preserve">
|
|
||||||
<value>Slow</value>
|
|
||||||
</data>
|
|
||||||
<data name="SpeedServerTips" xml:space="preserve">
|
|
||||||
<value>Note: This feature relies on the Http global proxy. Please manually adjust the Http global proxy and active node after testing.</value>
|
|
||||||
</data>
|
|
||||||
<data name="StartPacFailed" xml:space="preserve">
|
|
||||||
<value>PAC failed to start. Please run this program as Administrator.</value>
|
|
||||||
</data>
|
|
||||||
<data name="StartService" xml:space="preserve">
|
<data name="StartService" xml:space="preserve">
|
||||||
<value>Start service ({0})...</value>
|
<value>Start service ({0})...</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -470,10 +434,7 @@
|
|||||||
<value>Local</value>
|
<value>Local</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MsgServerTitle" xml:space="preserve">
|
<data name="MsgServerTitle" xml:space="preserve">
|
||||||
<value>Servers Filter</value>
|
<value>Servers Filter, press Enter to execute</value>
|
||||||
</data>
|
|
||||||
<data name="NetFrameworkRequirementsTip" xml:space="preserve">
|
|
||||||
<value>Normal use of this version requires .NET Framework 4.8</value>
|
|
||||||
</data>
|
</data>
|
||||||
<data name="menuCheckUpdate" xml:space="preserve">
|
<data name="menuCheckUpdate" xml:space="preserve">
|
||||||
<value>Check Update</value>
|
<value>Check Update</value>
|
||||||
@@ -763,12 +724,6 @@
|
|||||||
<data name="TbSettingsAutoHideStartup" xml:space="preserve">
|
<data name="TbSettingsAutoHideStartup" xml:space="preserve">
|
||||||
<value>Auto hide startup</value>
|
<value>Auto hide startup</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsAutoTest" xml:space="preserve">
|
|
||||||
<value>Automatic latency test interval (minutes)</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsAutoUpdate" xml:space="preserve">
|
|
||||||
<value>Automatic update interval of subscriptions (hours)</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsAutoUpdateInterval" xml:space="preserve">
|
<data name="TbSettingsAutoUpdateInterval" xml:space="preserve">
|
||||||
<value>Automatic update interval of and Geo (hours)</value>
|
<value>Automatic update interval of and Geo (hours)</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -808,9 +763,6 @@
|
|||||||
<data name="TbSettingsIgnoreGeoUpdateCore" xml:space="preserve">
|
<data name="TbSettingsIgnoreGeoUpdateCore" xml:space="preserve">
|
||||||
<value>Ignore Geo files when updating core</value>
|
<value>Ignore Geo files when updating core</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsIpv6" xml:space="preserve">
|
|
||||||
<value>Enable IPv6</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsKeepOlderDedupl" xml:space="preserve">
|
<data name="TbSettingsKeepOlderDedupl" xml:space="preserve">
|
||||||
<value>Keep older when deduplication</value>
|
<value>Keep older when deduplication</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -826,18 +778,12 @@
|
|||||||
<data name="TbSettingsN" xml:space="preserve">
|
<data name="TbSettingsN" xml:space="preserve">
|
||||||
<value>v2rayN settings</value>
|
<value>v2rayN settings</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsPacListenPort" xml:space="preserve">
|
|
||||||
<value>Pac listen port</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsPass" xml:space="preserve">
|
<data name="TbSettingsPass" xml:space="preserve">
|
||||||
<value>Auth pass</value>
|
<value>Auth pass</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsRemoteDNS" xml:space="preserve">
|
<data name="TbSettingsRemoteDNS" xml:space="preserve">
|
||||||
<value>Custom DNS (multiple, separated by commas (,))</value>
|
<value>Custom DNS (multiple, separated by commas (,))</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsSaveTip" xml:space="preserve">
|
|
||||||
<value>After modifying the following parameters, click Save to take effect</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsSetUWP" xml:space="preserve">
|
<data name="TbSettingsSetUWP" xml:space="preserve">
|
||||||
<value>Set Win10 UWP Loopback</value>
|
<value>Set Win10 UWP Loopback</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -1153,4 +1099,19 @@
|
|||||||
<data name="MsgSkipSubscriptionUpdate" xml:space="preserve">
|
<data name="MsgSkipSubscriptionUpdate" xml:space="preserve">
|
||||||
<value>Updates are not enabled, skip this subscription</value>
|
<value>Updates are not enabled, skip this subscription</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="menuRebootAsAdmin" xml:space="preserve">
|
||||||
|
<value>Reboot as administrator</value>
|
||||||
|
</data>
|
||||||
|
<data name="LvMoreUrl" xml:space="preserve">
|
||||||
|
<value>More urls, separated by commas</value>
|
||||||
|
</data>
|
||||||
|
<data name="SpeedDisplayText" xml:space="preserve">
|
||||||
|
<value>{0}:{1}/s↑ | {2}/s↓</value>
|
||||||
|
</data>
|
||||||
|
<data name="LvAutoUpdateInterval" xml:space="preserve">
|
||||||
|
<value>Automatic update interval(minutes)</value>
|
||||||
|
</data>
|
||||||
|
<data name="TbSettingsLogEnabledToFile" xml:space="preserve">
|
||||||
|
<value>Enable logging to file</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -195,9 +195,6 @@
|
|||||||
<data name="LvAddress" xml:space="preserve">
|
<data name="LvAddress" xml:space="preserve">
|
||||||
<value>Адрес</value>
|
<value>Адрес</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LvAlias" xml:space="preserve">
|
|
||||||
<value>Псевдоним</value>
|
|
||||||
</data>
|
|
||||||
<data name="LvEncryptionMethod" xml:space="preserve">
|
<data name="LvEncryptionMethod" xml:space="preserve">
|
||||||
<value>Безопасность</value>
|
<value>Безопасность</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -210,9 +207,6 @@
|
|||||||
<data name="LvSubscription" xml:space="preserve">
|
<data name="LvSubscription" xml:space="preserve">
|
||||||
<value>Группа подписки</value>
|
<value>Группа подписки</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LvTestResults" xml:space="preserve">
|
|
||||||
<value>Результаты тестирования</value>
|
|
||||||
</data>
|
|
||||||
<data name="LvTodayDownloadDataAmount" xml:space="preserve">
|
<data name="LvTodayDownloadDataAmount" xml:space="preserve">
|
||||||
<value>Загружено трафика сегодня</value>
|
<value>Загружено трафика сегодня</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -228,9 +222,6 @@
|
|||||||
<data name="LvTransportProtocol" xml:space="preserve">
|
<data name="LvTransportProtocol" xml:space="preserve">
|
||||||
<value>Протокол</value>
|
<value>Протокол</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MediumFresh" xml:space="preserve">
|
|
||||||
<value>Medium</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgClearSubscription" xml:space="preserve">
|
<data name="MsgClearSubscription" xml:space="preserve">
|
||||||
<value>Очистить контент оригинальной подписки</value>
|
<value>Очистить контент оригинальной подписки</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -246,27 +237,15 @@
|
|||||||
<data name="MsgNoValidSubscription" xml:space="preserve">
|
<data name="MsgNoValidSubscription" xml:space="preserve">
|
||||||
<value>Нет установлены подписки</value>
|
<value>Нет установлены подписки</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MsgPACUpdateFailed" xml:space="preserve">
|
|
||||||
<value>Ошибка обновления PAC</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgPACUpdateSuccessfully" xml:space="preserve">
|
|
||||||
<value>PAC успешно обновлен</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgParsingSuccessfully" xml:space="preserve">
|
<data name="MsgParsingSuccessfully" xml:space="preserve">
|
||||||
<value>Парсинг {0} прошел успешно</value>
|
<value>Парсинг {0} прошел успешно</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MsgSimplifyPAC" xml:space="preserve">
|
|
||||||
<value>Упрощение PAC прошло успешно</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgStartGettingSubscriptions" xml:space="preserve">
|
<data name="MsgStartGettingSubscriptions" xml:space="preserve">
|
||||||
<value>Начинаю получать подписки</value>
|
<value>Начинаю получать подписки</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MsgStartUpdating" xml:space="preserve">
|
<data name="MsgStartUpdating" xml:space="preserve">
|
||||||
<value>Начинаю обновление {0}...</value>
|
<value>Начинаю обновление {0}...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MsgStartUpdatingPAC" xml:space="preserve">
|
|
||||||
<value>Начинаю обновление PAC...</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgSubscriptionDecodingFailed" xml:space="preserve">
|
<data name="MsgSubscriptionDecodingFailed" xml:space="preserve">
|
||||||
<value>Некорректное содержимое подписки</value>
|
<value>Некорректное содержимое подписки</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -285,9 +264,6 @@
|
|||||||
<data name="MsgUpdateV2rayCoreSuccessfullyMore" xml:space="preserve">
|
<data name="MsgUpdateV2rayCoreSuccessfullyMore" xml:space="preserve">
|
||||||
<value>Успешное обновление ядра! Перезапуск службы...</value>
|
<value>Успешное обновление ядра! Перезапуск службы...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="NeedHttpGlobalProxy" xml:space="preserve">
|
|
||||||
<value>Эта функция зависит от глобального прокси-сервера HTTP, пожалуйста, сначала установите его правильно.</value>
|
|
||||||
</data>
|
|
||||||
<data name="NonvmessOrssProtocol" xml:space="preserve">
|
<data name="NonvmessOrssProtocol" xml:space="preserve">
|
||||||
<value>Не является протоколом Vmess или SS</value>
|
<value>Не является протоколом Vmess или SS</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -315,9 +291,6 @@
|
|||||||
<data name="PleaseSelectServer" xml:space="preserve">
|
<data name="PleaseSelectServer" xml:space="preserve">
|
||||||
<value>Сначала выберите сервер</value>
|
<value>Сначала выберите сервер</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="QuickFresh" xml:space="preserve">
|
|
||||||
<value>Быстрый</value>
|
|
||||||
</data>
|
|
||||||
<data name="RemoveDuplicateServerResult" xml:space="preserve">
|
<data name="RemoveDuplicateServerResult" xml:space="preserve">
|
||||||
<value>Удаление дублей завершено. Старая: {0}, Новая: {1}.</value>
|
<value>Удаление дублей завершено. Старая: {0}, Новая: {1}.</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -330,15 +303,6 @@
|
|||||||
<data name="SaveServerConfigurationIn" xml:space="preserve">
|
<data name="SaveServerConfigurationIn" xml:space="preserve">
|
||||||
<value>Файл конфигурации сервера сохранен по адресу: {0}</value>
|
<value>Файл конфигурации сервера сохранен по адресу: {0}</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SlowFresh" xml:space="preserve">
|
|
||||||
<value>Медленный</value>
|
|
||||||
</data>
|
|
||||||
<data name="SpeedServerTips" xml:space="preserve">
|
|
||||||
<value>Примечание. Эта функция зависит от глобального прокси-сервера HTTP. После тестирования вручную настройте глобальный прокси-сервер HTTP и активный узел.</value>
|
|
||||||
</data>
|
|
||||||
<data name="StartPacFailed" xml:space="preserve">
|
|
||||||
<value>PAC не удалось запустить. Пожалуйста, запустите эту программу от имени администратора.</value>
|
|
||||||
</data>
|
|
||||||
<data name="StartService" xml:space="preserve">
|
<data name="StartService" xml:space="preserve">
|
||||||
<value>Запуск сервиса ({0})...</value>
|
<value>Запуск сервиса ({0})...</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -472,9 +436,6 @@
|
|||||||
<data name="MsgServerTitle" xml:space="preserve">
|
<data name="MsgServerTitle" xml:space="preserve">
|
||||||
<value>Фильтр серверов</value>
|
<value>Фильтр серверов</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="NetFrameworkRequirementsTip" xml:space="preserve">
|
|
||||||
<value>Для корректной работы требуется .NET Framework 4.8</value>
|
|
||||||
</data>
|
|
||||||
<data name="menuCheckUpdate" xml:space="preserve">
|
<data name="menuCheckUpdate" xml:space="preserve">
|
||||||
<value>Проверить обновления</value>
|
<value>Проверить обновления</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -763,12 +724,6 @@
|
|||||||
<data name="TbSettingsAutoHideStartup" xml:space="preserve">
|
<data name="TbSettingsAutoHideStartup" xml:space="preserve">
|
||||||
<value>Auto hide startup</value>
|
<value>Auto hide startup</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsAutoTest" xml:space="preserve">
|
|
||||||
<value>Интервал автоматической проверки задержки в минутах</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsAutoUpdate" xml:space="preserve">
|
|
||||||
<value>Интервал автоматического обновления подписок в часах</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsAutoUpdateInterval" xml:space="preserve">
|
<data name="TbSettingsAutoUpdateInterval" xml:space="preserve">
|
||||||
<value>Интервал автоматического обновления Geo в часах</value>
|
<value>Интервал автоматического обновления Geo в часах</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -808,9 +763,6 @@
|
|||||||
<data name="TbSettingsIgnoreGeoUpdateCore" xml:space="preserve">
|
<data name="TbSettingsIgnoreGeoUpdateCore" xml:space="preserve">
|
||||||
<value>Игнорировать файлы Geo при обновлении ядра</value>
|
<value>Игнорировать файлы Geo при обновлении ядра</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsIpv6" xml:space="preserve">
|
|
||||||
<value>Включить IPv6</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsKeepOlderDedupl" xml:space="preserve">
|
<data name="TbSettingsKeepOlderDedupl" xml:space="preserve">
|
||||||
<value>Сохранить старые при удалении дублей</value>
|
<value>Сохранить старые при удалении дублей</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -826,18 +778,12 @@
|
|||||||
<data name="TbSettingsN" xml:space="preserve">
|
<data name="TbSettingsN" xml:space="preserve">
|
||||||
<value>Настройки v2rayN</value>
|
<value>Настройки v2rayN</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsPacListenPort" xml:space="preserve">
|
|
||||||
<value>Порт PAC</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsPass" xml:space="preserve">
|
<data name="TbSettingsPass" xml:space="preserve">
|
||||||
<value>Пароль аутентификации</value>
|
<value>Пароль аутентификации</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsRemoteDNS" xml:space="preserve">
|
<data name="TbSettingsRemoteDNS" xml:space="preserve">
|
||||||
<value>Пользовательский DNS (если несколько делите с запятыми (,))</value>
|
<value>Пользовательский DNS (если несколько делите с запятыми (,))</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsSaveTip" xml:space="preserve">
|
|
||||||
<value>После изменения следующих параметров нажмите «Сохранить», чтобы изменения вступили в силу</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsSetUWP" xml:space="preserve">
|
<data name="TbSettingsSetUWP" xml:space="preserve">
|
||||||
<value>Set Win10 UWP Loopback</value>
|
<value>Set Win10 UWP Loopback</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -195,9 +195,6 @@
|
|||||||
<data name="LvAddress" xml:space="preserve">
|
<data name="LvAddress" xml:space="preserve">
|
||||||
<value>地址</value>
|
<value>地址</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LvAlias" xml:space="preserve">
|
|
||||||
<value>别名</value>
|
|
||||||
</data>
|
|
||||||
<data name="LvEncryptionMethod" xml:space="preserve">
|
<data name="LvEncryptionMethod" xml:space="preserve">
|
||||||
<value>加密方式</value>
|
<value>加密方式</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -210,9 +207,6 @@
|
|||||||
<data name="LvSubscription" xml:space="preserve">
|
<data name="LvSubscription" xml:space="preserve">
|
||||||
<value>订阅分组</value>
|
<value>订阅分组</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LvTestResults" xml:space="preserve">
|
|
||||||
<value>测试结果</value>
|
|
||||||
</data>
|
|
||||||
<data name="LvTodayDownloadDataAmount" xml:space="preserve">
|
<data name="LvTodayDownloadDataAmount" xml:space="preserve">
|
||||||
<value>今日下载</value>
|
<value>今日下载</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -228,9 +222,6 @@
|
|||||||
<data name="LvTransportProtocol" xml:space="preserve">
|
<data name="LvTransportProtocol" xml:space="preserve">
|
||||||
<value>传输协议</value>
|
<value>传输协议</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MediumFresh" xml:space="preserve">
|
|
||||||
<value>中等</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgClearSubscription" xml:space="preserve">
|
<data name="MsgClearSubscription" xml:space="preserve">
|
||||||
<value>清除原订阅内容</value>
|
<value>清除原订阅内容</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -246,27 +237,15 @@
|
|||||||
<data name="MsgNoValidSubscription" xml:space="preserve">
|
<data name="MsgNoValidSubscription" xml:space="preserve">
|
||||||
<value>未设置有效的订阅</value>
|
<value>未设置有效的订阅</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MsgPACUpdateFailed" xml:space="preserve">
|
|
||||||
<value>PAC更新失败</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgPACUpdateSuccessfully" xml:space="preserve">
|
|
||||||
<value>PAC更新成功</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgParsingSuccessfully" xml:space="preserve">
|
<data name="MsgParsingSuccessfully" xml:space="preserve">
|
||||||
<value>解析{0}成功</value>
|
<value>解析{0}成功</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MsgSimplifyPAC" xml:space="preserve">
|
|
||||||
<value>简化PAC成功</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgStartGettingSubscriptions" xml:space="preserve">
|
<data name="MsgStartGettingSubscriptions" xml:space="preserve">
|
||||||
<value>开始获取订阅内容</value>
|
<value>开始获取订阅内容</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MsgStartUpdating" xml:space="preserve">
|
<data name="MsgStartUpdating" xml:space="preserve">
|
||||||
<value>开始更新 {0}...</value>
|
<value>开始更新 {0}...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MsgStartUpdatingPAC" xml:space="preserve">
|
|
||||||
<value>开始更新 PAC...</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgSubscriptionDecodingFailed" xml:space="preserve">
|
<data name="MsgSubscriptionDecodingFailed" xml:space="preserve">
|
||||||
<value>无效的订阅内容</value>
|
<value>无效的订阅内容</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -285,9 +264,6 @@
|
|||||||
<data name="MsgUpdateV2rayCoreSuccessfullyMore" xml:space="preserve">
|
<data name="MsgUpdateV2rayCoreSuccessfullyMore" xml:space="preserve">
|
||||||
<value>更新Core成功!正在重启服务...</value>
|
<value>更新Core成功!正在重启服务...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="NeedHttpGlobalProxy" xml:space="preserve">
|
|
||||||
<value>此功能依赖Http全局代理,请先设置正确。</value>
|
|
||||||
</data>
|
|
||||||
<data name="NonvmessOrssProtocol" xml:space="preserve">
|
<data name="NonvmessOrssProtocol" xml:space="preserve">
|
||||||
<value>非VMess或ss协议</value>
|
<value>非VMess或ss协议</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -315,9 +291,6 @@
|
|||||||
<data name="PleaseSelectServer" xml:space="preserve">
|
<data name="PleaseSelectServer" xml:space="preserve">
|
||||||
<value>请先选择服务器</value>
|
<value>请先选择服务器</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="QuickFresh" xml:space="preserve">
|
|
||||||
<value>快</value>
|
|
||||||
</data>
|
|
||||||
<data name="RemoveDuplicateServerResult" xml:space="preserve">
|
<data name="RemoveDuplicateServerResult" xml:space="preserve">
|
||||||
<value>服务器去重完成。原数量: {0},现数量: {1}</value>
|
<value>服务器去重完成。原数量: {0},现数量: {1}</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -330,15 +303,6 @@
|
|||||||
<data name="SaveServerConfigurationIn" xml:space="preserve">
|
<data name="SaveServerConfigurationIn" xml:space="preserve">
|
||||||
<value>服务端配置文件保存在:{0}</value>
|
<value>服务端配置文件保存在:{0}</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SlowFresh" xml:space="preserve">
|
|
||||||
<value>慢</value>
|
|
||||||
</data>
|
|
||||||
<data name="SpeedServerTips" xml:space="preserve">
|
|
||||||
<value>注意:此功能依赖Http全局代理!测试完成后,请手工调整Http全局代理和活动节点。</value>
|
|
||||||
</data>
|
|
||||||
<data name="StartPacFailed" xml:space="preserve">
|
|
||||||
<value>PAC服务启动失败,请用管理员启动</value>
|
|
||||||
</data>
|
|
||||||
<data name="StartService" xml:space="preserve">
|
<data name="StartService" xml:space="preserve">
|
||||||
<value>启动服务({0})...</value>
|
<value>启动服务({0})...</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -410,13 +374,13 @@
|
|||||||
<value>*grpc serviceName</value>
|
<value>*grpc serviceName</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TransportRequestHostTip1" xml:space="preserve">
|
<data name="TransportRequestHostTip1" xml:space="preserve">
|
||||||
<value>*http host中间逗号(,)隔开</value>
|
<value>*http host中间逗号(,)分隔</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TransportRequestHostTip2" xml:space="preserve">
|
<data name="TransportRequestHostTip2" xml:space="preserve">
|
||||||
<value>*ws host</value>
|
<value>*ws host</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TransportRequestHostTip3" xml:space="preserve">
|
<data name="TransportRequestHostTip3" xml:space="preserve">
|
||||||
<value>*h2 host中间逗号(,)隔开</value>
|
<value>*h2 host中间逗号(,)分隔</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TransportRequestHostTip4" xml:space="preserve">
|
<data name="TransportRequestHostTip4" xml:space="preserve">
|
||||||
<value>*QUIC 加密方式</value>
|
<value>*QUIC 加密方式</value>
|
||||||
@@ -470,10 +434,7 @@
|
|||||||
<value>本地</value>
|
<value>本地</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MsgServerTitle" xml:space="preserve">
|
<data name="MsgServerTitle" xml:space="preserve">
|
||||||
<value>服务器过滤器</value>
|
<value>服务器过滤器,按回车执行</value>
|
||||||
</data>
|
|
||||||
<data name="NetFrameworkRequirementsTip" xml:space="preserve">
|
|
||||||
<value>正常使用此版本需要.NET Framework 4.8,请更新后重启</value>
|
|
||||||
</data>
|
</data>
|
||||||
<data name="menuCheckUpdate" xml:space="preserve">
|
<data name="menuCheckUpdate" xml:space="preserve">
|
||||||
<value>检查更新</value>
|
<value>检查更新</value>
|
||||||
@@ -763,12 +724,6 @@
|
|||||||
<data name="TbSettingsAutoHideStartup" xml:space="preserve">
|
<data name="TbSettingsAutoHideStartup" xml:space="preserve">
|
||||||
<value>启动后隐藏窗口</value>
|
<value>启动后隐藏窗口</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsAutoTest" xml:space="preserve">
|
|
||||||
<value>自动延迟测试的间隔 (单位分钟)</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsAutoUpdate" xml:space="preserve">
|
|
||||||
<value>自动更新订阅的间隔(单位小时)</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsAutoUpdateInterval" xml:space="preserve">
|
<data name="TbSettingsAutoUpdateInterval" xml:space="preserve">
|
||||||
<value>自动更新Geo文件的间隔(单位小时)</value>
|
<value>自动更新Geo文件的间隔(单位小时)</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -808,14 +763,11 @@
|
|||||||
<data name="TbSettingsIgnoreGeoUpdateCore" xml:space="preserve">
|
<data name="TbSettingsIgnoreGeoUpdateCore" xml:space="preserve">
|
||||||
<value>更新Core时忽略Geo文件</value>
|
<value>更新Core时忽略Geo文件</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsIpv6" xml:space="preserve">
|
|
||||||
<value>启用IPv6</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsKeepOlderDedupl" xml:space="preserve">
|
<data name="TbSettingsKeepOlderDedupl" xml:space="preserve">
|
||||||
<value>去重时保留序号较小的项</value>
|
<value>去重时保留序号较小的项</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsLogEnabled" xml:space="preserve">
|
<data name="TbSettingsLogEnabled" xml:space="preserve">
|
||||||
<value>启用日志(默认关闭)</value>
|
<value>启用日志</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsLogLevel" xml:space="preserve">
|
<data name="TbSettingsLogLevel" xml:space="preserve">
|
||||||
<value>日志等级</value>
|
<value>日志等级</value>
|
||||||
@@ -826,17 +778,11 @@
|
|||||||
<data name="TbSettingsN" xml:space="preserve">
|
<data name="TbSettingsN" xml:space="preserve">
|
||||||
<value>v2rayN 设置</value>
|
<value>v2rayN 设置</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsPacListenPort" xml:space="preserve">
|
|
||||||
<value>Pac监听端口号</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsPass" xml:space="preserve">
|
<data name="TbSettingsPass" xml:space="preserve">
|
||||||
<value>认证密码</value>
|
<value>认证密码</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsRemoteDNS" xml:space="preserve">
|
<data name="TbSettingsRemoteDNS" xml:space="preserve">
|
||||||
<value>自定义DNS(可多个,用逗号(,)隔开)</value>
|
<value>自定义DNS(可多个,用逗号(,)分隔)</value>
|
||||||
</data>
|
|
||||||
<data name="TbSettingsSaveTip" xml:space="preserve">
|
|
||||||
<value>修改以下参数后,点击保存才生效</value>
|
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsSetUWP" xml:space="preserve">
|
<data name="TbSettingsSetUWP" xml:space="preserve">
|
||||||
<value>解除Win10 UWP应用回环代理限制</value>
|
<value>解除Win10 UWP应用回环代理限制</value>
|
||||||
@@ -1153,4 +1099,16 @@
|
|||||||
<data name="MsgSkipSubscriptionUpdate" xml:space="preserve">
|
<data name="MsgSkipSubscriptionUpdate" xml:space="preserve">
|
||||||
<value>未启用更新,跳过此订阅</value>
|
<value>未启用更新,跳过此订阅</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="menuRebootAsAdmin" xml:space="preserve">
|
||||||
|
<value>以管理员身份重启</value>
|
||||||
|
</data>
|
||||||
|
<data name="LvMoreUrl" xml:space="preserve">
|
||||||
|
<value>更多地址(url),用逗号(,)分隔</value>
|
||||||
|
</data>
|
||||||
|
<data name="LvAutoUpdateInterval" xml:space="preserve">
|
||||||
|
<value>自动更新间隔(分钟)</value>
|
||||||
|
</data>
|
||||||
|
<data name="TbSettingsLogEnabledToFile" xml:space="preserve">
|
||||||
|
<value>启用日志存到文件</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -1,45 +1,22 @@
|
|||||||
using System.Windows.Forms;
|
using System.Windows;
|
||||||
|
|
||||||
namespace v2rayN
|
namespace v2rayN
|
||||||
{
|
{
|
||||||
class UI
|
class UI
|
||||||
{
|
{
|
||||||
|
private readonly static string caption = "v2rayN";
|
||||||
|
|
||||||
public static void Show(string msg)
|
public static void Show(string msg)
|
||||||
{
|
{
|
||||||
MessageBox.Show(msg, "v2rayN", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
MessageBox.Show(msg, caption, MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.OK);
|
||||||
}
|
}
|
||||||
public static void ShowWarning(string msg)
|
public static void ShowWarning(string msg)
|
||||||
{
|
{
|
||||||
MessageBox.Show(msg, "v2rayN", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
MessageBox.Show(msg, caption, MessageBoxButton.OK, MessageBoxImage.Warning, MessageBoxResult.OK);
|
||||||
}
|
}
|
||||||
public static void ShowError(string msg)
|
public static MessageBoxResult ShowYesNo(string msg)
|
||||||
{
|
{
|
||||||
MessageBox.Show(msg, "v2rayN", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
return MessageBox.Show(msg, caption, MessageBoxButton.YesNo, MessageBoxImage.Question);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DialogResult ShowYesNo(string msg)
|
|
||||||
{
|
|
||||||
return MessageBox.Show(msg, "v2rayN", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//public static string GetResourseString(string key)
|
|
||||||
//{
|
|
||||||
// CultureInfo cultureInfo = null;
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// string languageCode = this.LanguageCode;
|
|
||||||
// cultureInfo = new CultureInfo(languageCode);
|
|
||||||
// return Common.ResourceManager.GetString(key, cultureInfo);
|
|
||||||
// }
|
|
||||||
// catch (Exception)
|
|
||||||
// {
|
|
||||||
// //默认读取英文的多语言
|
|
||||||
// cultureInfo = new CultureInfo(MKey.kDefaultLanguageCode);
|
|
||||||
// return Common.ResourceManager.GetString(key, cultureInfo);
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ using System.Security.Principal;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Windows.Forms;
|
using System.Windows;
|
||||||
using System.Windows.Interop;
|
using System.Windows.Interop;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
@@ -367,23 +367,22 @@ namespace v2rayN
|
|||||||
if (GBs > 0)
|
if (GBs > 0)
|
||||||
{
|
{
|
||||||
// multi GB
|
// multi GB
|
||||||
/*ulong TBs = GBs / factor;
|
long TBs = GBs / factor;
|
||||||
if (TBs > 0)
|
if (TBs > 0)
|
||||||
{
|
{
|
||||||
// 你是魔鬼吗? 用这么多流量
|
result = TBs + (GBs % factor / (factor + 0.0));
|
||||||
result = TBs + GBs % factor / (factor + 0.0);
|
|
||||||
unit = "TB";
|
unit = "TB";
|
||||||
return;
|
return;
|
||||||
}*/
|
}
|
||||||
result = GBs + MBs % factor / (factor + 0.0);
|
result = GBs + (MBs % factor / (factor + 0.0));
|
||||||
unit = "GB";
|
unit = "GB";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
result = MBs + KBs % factor / (factor + 0.0);
|
result = MBs + (KBs % factor / (factor + 0.0));
|
||||||
unit = "MB";
|
unit = "MB";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
result = KBs + amount % factor / (factor + 0.0);
|
result = KBs + (amount % factor / (factor + 0.0));
|
||||||
unit = "KB";
|
unit = "KB";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -429,6 +428,11 @@ namespace v2rayN
|
|||||||
BitmapSizeOptions.FromEmptyOptions());
|
BitmapSizeOptions.FromEmptyOptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// idn to idc
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="url"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public static string GetPunycode(string url)
|
public static string GetPunycode(string url)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(url))
|
if (string.IsNullOrWhiteSpace(url))
|
||||||
@@ -453,6 +457,12 @@ namespace v2rayN
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsBase64String(string plainText)
|
||||||
|
{
|
||||||
|
var buffer = new Span<byte>(new byte[plainText.Length]);
|
||||||
|
return Convert.TryFromBase64String(plainText, buffer, out int _);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
@@ -667,12 +677,12 @@ namespace v2rayN
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string GetExePath()
|
public static string GetExePath()
|
||||||
{
|
{
|
||||||
return Application.ExecutablePath;
|
return Environment.ProcessPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string StartupPath()
|
public static string StartupPath()
|
||||||
{
|
{
|
||||||
return Application.StartupPath;
|
return AppDomain.CurrentDomain.BaseDirectory;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string? RegReadValue(string path, string name, string def)
|
public static string? RegReadValue(string path, string name, string def)
|
||||||
@@ -1177,21 +1187,19 @@ namespace v2rayN
|
|||||||
|
|
||||||
#region scan screen
|
#region scan screen
|
||||||
|
|
||||||
public static string ScanScreen()
|
public static string ScanScreen(float dpiX, float dpiY)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
foreach (Screen screen in Screen.AllScreens)
|
var left = (int)(SystemParameters.WorkArea.Left);
|
||||||
{
|
var top = (int)(SystemParameters.WorkArea.Top);
|
||||||
using Bitmap fullImage = new Bitmap(screen.Bounds.Width,
|
var width = (int)(SystemParameters.WorkArea.Width / dpiX);
|
||||||
screen.Bounds.Height);
|
var height = (int)(SystemParameters.WorkArea.Height / dpiY);
|
||||||
|
|
||||||
|
using Bitmap fullImage = new Bitmap(width, height);
|
||||||
using (Graphics g = Graphics.FromImage(fullImage))
|
using (Graphics g = Graphics.FromImage(fullImage))
|
||||||
{
|
{
|
||||||
g.CopyFromScreen(screen.Bounds.X,
|
g.CopyFromScreen(left, top, 0, 0, fullImage.Size, CopyPixelOperation.SourceCopy);
|
||||||
screen.Bounds.Y,
|
|
||||||
0, 0,
|
|
||||||
fullImage.Size,
|
|
||||||
CopyPixelOperation.SourceCopy);
|
|
||||||
}
|
}
|
||||||
int maxTry = 10;
|
int maxTry = 10;
|
||||||
for (int i = 0; i < maxTry; i++)
|
for (int i = 0; i < maxTry; i++)
|
||||||
@@ -1199,9 +1207,9 @@ namespace v2rayN
|
|||||||
int marginLeft = (int)((double)fullImage.Width * i / 2.5 / maxTry);
|
int marginLeft = (int)((double)fullImage.Width * i / 2.5 / maxTry);
|
||||||
int marginTop = (int)((double)fullImage.Height * i / 2.5 / maxTry);
|
int marginTop = (int)((double)fullImage.Height * i / 2.5 / maxTry);
|
||||||
Rectangle cropRect = new(marginLeft, marginTop, fullImage.Width - marginLeft * 2, fullImage.Height - marginTop * 2);
|
Rectangle cropRect = new(marginLeft, marginTop, fullImage.Width - marginLeft * 2, fullImage.Height - marginTop * 2);
|
||||||
Bitmap target = new(screen.Bounds.Width, screen.Bounds.Height);
|
Bitmap target = new(width, height);
|
||||||
|
|
||||||
double imageScale = (double)screen.Bounds.Width / (double)cropRect.Width;
|
double imageScale = (double)width / (double)cropRect.Width;
|
||||||
using (Graphics g = Graphics.FromImage(target))
|
using (Graphics g = Graphics.FromImage(target))
|
||||||
{
|
{
|
||||||
g.DrawImage(fullImage, new Rectangle(0, 0, target.Width, target.Height),
|
g.DrawImage(fullImage, new Rectangle(0, 0, target.Width, target.Height),
|
||||||
@@ -1220,7 +1228,6 @@ namespace v2rayN
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
SaveLog(ex.Message, ex);
|
SaveLog(ex.Message, ex);
|
||||||
@@ -1228,6 +1235,14 @@ namespace v2rayN
|
|||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Tuple<float, float> GetDpiXY(Window window)
|
||||||
|
{
|
||||||
|
IntPtr hWnd = new WindowInteropHelper(window).EnsureHandle();
|
||||||
|
Graphics g = Graphics.FromHwnd(hWnd);
|
||||||
|
|
||||||
|
return new(96 / g.DpiX, 96 / g.DpiY);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using Microsoft.Win32;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
using ReactiveUI.Fody.Helpers;
|
using ReactiveUI.Fody.Helpers;
|
||||||
using ReactiveUI.Validation.Helpers;
|
using ReactiveUI.Validation.Helpers;
|
||||||
@@ -5,7 +6,6 @@ using Splat;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reactive;
|
using System.Reactive;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Forms;
|
|
||||||
using v2rayN.Base;
|
using v2rayN.Base;
|
||||||
using v2rayN.Handler;
|
using v2rayN.Handler;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
@@ -111,7 +111,7 @@ namespace v2rayN.ViewModels
|
|||||||
Multiselect = false,
|
Multiselect = false,
|
||||||
Filter = "Config|*.json|YAML|*.yaml;*.yml|All|*.*"
|
Filter = "Config|*.json|YAML|*.yaml;*.yml|All|*.*"
|
||||||
};
|
};
|
||||||
if (fileDialog.ShowDialog() != DialogResult.OK)
|
if (fileDialog.ShowDialog() != true)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,16 +3,17 @@ using DynamicData.Binding;
|
|||||||
using MaterialDesignColors;
|
using MaterialDesignColors;
|
||||||
using MaterialDesignColors.ColorManipulation;
|
using MaterialDesignColors.ColorManipulation;
|
||||||
using MaterialDesignThemes.Wpf;
|
using MaterialDesignThemes.Wpf;
|
||||||
|
using Microsoft.Win32;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
using ReactiveUI.Fody.Helpers;
|
using ReactiveUI.Fody.Helpers;
|
||||||
using Splat;
|
using Splat;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reactive;
|
using System.Reactive;
|
||||||
using System.Reactive.Linq;
|
using System.Reactive.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using v2rayN.Base;
|
using v2rayN.Base;
|
||||||
using v2rayN.Handler;
|
using v2rayN.Handler;
|
||||||
@@ -20,7 +21,6 @@ using v2rayN.Mode;
|
|||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
using v2rayN.Tool;
|
using v2rayN.Tool;
|
||||||
using v2rayN.Views;
|
using v2rayN.Views;
|
||||||
using Application = System.Windows.Application;
|
|
||||||
|
|
||||||
|
|
||||||
namespace v2rayN.ViewModels
|
namespace v2rayN.ViewModels
|
||||||
@@ -38,7 +38,7 @@ namespace v2rayN.ViewModels
|
|||||||
private NoticeHandler? _noticeHandler;
|
private NoticeHandler? _noticeHandler;
|
||||||
private readonly PaletteHelper _paletteHelper = new();
|
private readonly PaletteHelper _paletteHelper = new();
|
||||||
private Dictionary<string, bool> _dicHeaderSort = new();
|
private Dictionary<string, bool> _dicHeaderSort = new();
|
||||||
private Action<string> _updateView;
|
private Action<EViewAction> _updateView;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -122,6 +122,7 @@ namespace v2rayN.ViewModels
|
|||||||
public ReactiveCommand<Unit, Unit> OptionSettingCmd { get; }
|
public ReactiveCommand<Unit, Unit> OptionSettingCmd { get; }
|
||||||
public ReactiveCommand<Unit, Unit> RoutingSettingCmd { get; }
|
public ReactiveCommand<Unit, Unit> RoutingSettingCmd { get; }
|
||||||
public ReactiveCommand<Unit, Unit> GlobalHotkeySettingCmd { get; }
|
public ReactiveCommand<Unit, Unit> GlobalHotkeySettingCmd { get; }
|
||||||
|
public ReactiveCommand<Unit, Unit> RebootAsAdminCmd { get; }
|
||||||
public ReactiveCommand<Unit, Unit> ClearServerStatisticsCmd { get; }
|
public ReactiveCommand<Unit, Unit> ClearServerStatisticsCmd { get; }
|
||||||
public ReactiveCommand<Unit, Unit> ImportOldGuiConfigCmd { get; }
|
public ReactiveCommand<Unit, Unit> ImportOldGuiConfigCmd { get; }
|
||||||
|
|
||||||
@@ -132,6 +133,7 @@ namespace v2rayN.ViewModels
|
|||||||
public ReactiveCommand<Unit, Unit> CheckUpdateXrayCoreCmd { get; }
|
public ReactiveCommand<Unit, Unit> CheckUpdateXrayCoreCmd { get; }
|
||||||
public ReactiveCommand<Unit, Unit> CheckUpdateClashCoreCmd { get; }
|
public ReactiveCommand<Unit, Unit> CheckUpdateClashCoreCmd { get; }
|
||||||
public ReactiveCommand<Unit, Unit> CheckUpdateClashMetaCoreCmd { get; }
|
public ReactiveCommand<Unit, Unit> CheckUpdateClashMetaCoreCmd { get; }
|
||||||
|
public ReactiveCommand<Unit, Unit> CheckUpdateSingBoxCoreCmd { get; }
|
||||||
public ReactiveCommand<Unit, Unit> CheckUpdateGeoCmd { get; }
|
public ReactiveCommand<Unit, Unit> CheckUpdateGeoCmd { get; }
|
||||||
|
|
||||||
|
|
||||||
@@ -201,7 +203,7 @@ namespace v2rayN.ViewModels
|
|||||||
|
|
||||||
#region Init
|
#region Init
|
||||||
|
|
||||||
public MainWindowViewModel(ISnackbarMessageQueue snackbarMessageQueue, Action<string> updateView)
|
public MainWindowViewModel(ISnackbarMessageQueue snackbarMessageQueue, Action<EViewAction> updateView)
|
||||||
{
|
{
|
||||||
_updateView = updateView;
|
_updateView = updateView;
|
||||||
ThreadPool.RegisterWaitForSingleObject(App.ProgramStarted, OnProgramStarted, null, -1, false);
|
ThreadPool.RegisterWaitForSingleObject(App.ProgramStarted, OnProgramStarted, null, -1, false);
|
||||||
@@ -432,6 +434,10 @@ namespace v2rayN.ViewModels
|
|||||||
_noticeHandler?.Enqueue(ResUI.OperationSuccess);
|
_noticeHandler?.Enqueue(ResUI.OperationSuccess);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
RebootAsAdminCmd = ReactiveCommand.Create(() =>
|
||||||
|
{
|
||||||
|
RebootAsAdmin();
|
||||||
|
});
|
||||||
ClearServerStatisticsCmd = ReactiveCommand.Create(() =>
|
ClearServerStatisticsCmd = ReactiveCommand.Create(() =>
|
||||||
{
|
{
|
||||||
_statistics?.ClearAllServerStatistics();
|
_statistics?.ClearAllServerStatistics();
|
||||||
@@ -467,6 +473,10 @@ namespace v2rayN.ViewModels
|
|||||||
{
|
{
|
||||||
CheckUpdateCore(ECoreType.clash_meta);
|
CheckUpdateCore(ECoreType.clash_meta);
|
||||||
});
|
});
|
||||||
|
CheckUpdateSingBoxCoreCmd = ReactiveCommand.Create(() =>
|
||||||
|
{
|
||||||
|
CheckUpdateCore(ECoreType.sing_box);
|
||||||
|
});
|
||||||
CheckUpdateGeoCmd = ReactiveCommand.Create(() =>
|
CheckUpdateGeoCmd = ReactiveCommand.Create(() =>
|
||||||
{
|
{
|
||||||
CheckUpdateGeo();
|
CheckUpdateGeo();
|
||||||
@@ -549,7 +559,7 @@ namespace v2rayN.ViewModels
|
|||||||
}
|
}
|
||||||
if (_config.uiItem.enableAutoAdjustMainLvColWidth)
|
if (_config.uiItem.enableAutoAdjustMainLvColWidth)
|
||||||
{
|
{
|
||||||
_updateView("AdjustMainLvColWidth");
|
_updateView(EViewAction.AdjustMainLvColWidth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -563,8 +573,9 @@ namespace v2rayN.ViewModels
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SpeedProxyDisplay = string.Format("{0}:{1}/s<><73> | {2}/s<><73>", Global.agentTag, Utils.HumanFy(update.proxyUp), Utils.HumanFy(update.proxyDown));
|
|
||||||
SpeedDirectDisplay = string.Format("{0}:{1}/s<><73> | {2}/s<><73>", Global.directTag, Utils.HumanFy(update.directUp), Utils.HumanFy(update.directDown));
|
SpeedProxyDisplay = string.Format(ResUI.SpeedDisplayText, Global.agentTag, Utils.HumanFy(update.proxyUp), Utils.HumanFy(update.proxyDown));
|
||||||
|
SpeedDirectDisplay = string.Format(ResUI.SpeedDisplayText, Global.directTag, Utils.HumanFy(update.directUp), Utils.HumanFy(update.directDown));
|
||||||
|
|
||||||
if (update.proxyUp + update.proxyDown > 0)
|
if (update.proxyUp + update.proxyDown > 0)
|
||||||
{
|
{
|
||||||
@@ -702,7 +713,7 @@ namespace v2rayN.ViewModels
|
|||||||
|
|
||||||
RefreshServers();
|
RefreshServers();
|
||||||
|
|
||||||
_updateView("ProfilesFocus");
|
_updateView(EViewAction.ProfilesFocus);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ServerFilterChanged(bool c)
|
private void ServerFilterChanged(bool c)
|
||||||
@@ -712,10 +723,13 @@ namespace v2rayN.ViewModels
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_serverFilter = ServerFilter;
|
_serverFilter = ServerFilter;
|
||||||
|
if (Utils.IsNullOrEmpty(_serverFilter))
|
||||||
|
{
|
||||||
RefreshServers();
|
RefreshServers();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void RefreshServers()
|
public void RefreshServers()
|
||||||
{
|
{
|
||||||
List<ProfileItemModel> lstModel = LazyConfig.Instance.ProfileItems(_subId, _serverFilter);
|
List<ProfileItemModel> lstModel = LazyConfig.Instance.ProfileItems(_subId, _serverFilter);
|
||||||
|
|
||||||
@@ -911,8 +925,8 @@ namespace v2rayN.ViewModels
|
|||||||
|
|
||||||
public void AddServerViaClipboard()
|
public void AddServerViaClipboard()
|
||||||
{
|
{
|
||||||
string clipboardData = Utils.GetClipboardData();
|
var clipboardData = Utils.GetClipboardData();
|
||||||
int ret = ConfigHandler.AddBatchServers(ref _config, clipboardData, _subId, false);
|
int ret = ConfigHandler.AddBatchServers(ref _config, clipboardData!, _subId, false);
|
||||||
if (ret > 0)
|
if (ret > 0)
|
||||||
{
|
{
|
||||||
InitSubscriptionView();
|
InitSubscriptionView();
|
||||||
@@ -924,9 +938,10 @@ namespace v2rayN.ViewModels
|
|||||||
{
|
{
|
||||||
ShowHideWindow(false);
|
ShowHideWindow(false);
|
||||||
|
|
||||||
|
var dpiXY = Utils.GetDpiXY(Application.Current.MainWindow);
|
||||||
string result = await Task.Run(() =>
|
string result = await Task.Run(() =>
|
||||||
{
|
{
|
||||||
return Utils.ScanScreen();
|
return Utils.ScanScreen(dpiXY.Item1, dpiXY.Item2);
|
||||||
});
|
});
|
||||||
|
|
||||||
ShowHideWindow(true);
|
ShowHideWindow(true);
|
||||||
@@ -953,7 +968,7 @@ namespace v2rayN.ViewModels
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UI.ShowYesNo(ResUI.RemoveServer) == DialogResult.No)
|
if (UI.ShowYesNo(ResUI.RemoveServer) == MessageBoxResult.No)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1068,10 +1083,7 @@ namespace v2rayN.ViewModels
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_dicHeaderSort.ContainsKey(colName))
|
_dicHeaderSort.TryAdd(colName, true);
|
||||||
{
|
|
||||||
_dicHeaderSort.Add(colName, true);
|
|
||||||
}
|
|
||||||
_dicHeaderSort.TryGetValue(colName, out bool asc);
|
_dicHeaderSort.TryGetValue(colName, out bool asc);
|
||||||
if (ConfigHandler.SortServers(ref _config, _subId, colName, asc) != 0)
|
if (ConfigHandler.SortServers(ref _config, _subId, colName, asc) != 0)
|
||||||
{
|
{
|
||||||
@@ -1110,7 +1122,7 @@ namespace v2rayN.ViewModels
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetProfileItems(out List<ProfileItem> lstSelecteds, false) < 0)
|
if (GetProfileItems(out List<ProfileItem> lstSelecteds, true) < 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1295,6 +1307,24 @@ namespace v2rayN.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void RebootAsAdmin()
|
||||||
|
{
|
||||||
|
ProcessStartInfo startInfo = new()
|
||||||
|
{
|
||||||
|
UseShellExecute = true,
|
||||||
|
Arguments = Global.RebootAs,
|
||||||
|
WorkingDirectory = Utils.StartupPath(),
|
||||||
|
FileName = Utils.GetExePath(),
|
||||||
|
Verb = "runas",
|
||||||
|
};
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Process.Start(startInfo);
|
||||||
|
MyAppExit(false);
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
}
|
||||||
|
|
||||||
private void ImportOldGuiConfig()
|
private void ImportOldGuiConfig()
|
||||||
{
|
{
|
||||||
OpenFileDialog fileDialog = new()
|
OpenFileDialog fileDialog = new()
|
||||||
@@ -1302,7 +1332,7 @@ namespace v2rayN.ViewModels
|
|||||||
Multiselect = false,
|
Multiselect = false,
|
||||||
Filter = "guiNConfig|*.json|All|*.*"
|
Filter = "guiNConfig|*.json|All|*.*"
|
||||||
};
|
};
|
||||||
if (fileDialog.ShowDialog() != DialogResult.OK)
|
if (fileDialog.ShowDialog() != true)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ namespace v2rayN.ViewModels
|
|||||||
[Reactive] public bool EnableDragDropSort { get; set; }
|
[Reactive] public bool EnableDragDropSort { get; set; }
|
||||||
[Reactive] public bool DoubleClick2Activate { get; set; }
|
[Reactive] public bool DoubleClick2Activate { get; set; }
|
||||||
[Reactive] public int autoUpdateInterval { get; set; }
|
[Reactive] public int autoUpdateInterval { get; set; }
|
||||||
[Reactive] public int autoUpdateSubInterval { get; set; }
|
|
||||||
[Reactive] public int trayMenuServersLimit { get; set; }
|
[Reactive] public int trayMenuServersLimit { get; set; }
|
||||||
[Reactive] public string currentFontFamily { get; set; }
|
[Reactive] public string currentFontFamily { get; set; }
|
||||||
[Reactive] public int SpeedTestTimeout { get; set; }
|
[Reactive] public int SpeedTestTimeout { get; set; }
|
||||||
@@ -156,7 +155,6 @@ namespace v2rayN.ViewModels
|
|||||||
EnableDragDropSort = _config.uiItem.enableDragDropSort;
|
EnableDragDropSort = _config.uiItem.enableDragDropSort;
|
||||||
DoubleClick2Activate = _config.uiItem.doubleClick2Activate;
|
DoubleClick2Activate = _config.uiItem.doubleClick2Activate;
|
||||||
autoUpdateInterval = _config.guiItem.autoUpdateInterval;
|
autoUpdateInterval = _config.guiItem.autoUpdateInterval;
|
||||||
autoUpdateSubInterval = _config.guiItem.autoUpdateSubInterval;
|
|
||||||
trayMenuServersLimit = _config.guiItem.trayMenuServersLimit;
|
trayMenuServersLimit = _config.guiItem.trayMenuServersLimit;
|
||||||
currentFontFamily = _config.uiItem.currentFontFamily;
|
currentFontFamily = _config.uiItem.currentFontFamily;
|
||||||
SpeedTestTimeout = _config.speedTestItem.speedTestTimeout;
|
SpeedTestTimeout = _config.speedTestItem.speedTestTimeout;
|
||||||
@@ -333,7 +331,6 @@ namespace v2rayN.ViewModels
|
|||||||
_config.guiItem.enableSecurityProtocolTls13 = EnableSecurityProtocolTls13;
|
_config.guiItem.enableSecurityProtocolTls13 = EnableSecurityProtocolTls13;
|
||||||
_config.uiItem.autoHideStartup = AutoHideStartup;
|
_config.uiItem.autoHideStartup = AutoHideStartup;
|
||||||
_config.guiItem.autoUpdateInterval = autoUpdateInterval;
|
_config.guiItem.autoUpdateInterval = autoUpdateInterval;
|
||||||
_config.guiItem.autoUpdateSubInterval = autoUpdateSubInterval;
|
|
||||||
_config.guiItem.checkPreReleaseUpdate = EnableCheckPreReleaseUpdate;
|
_config.guiItem.checkPreReleaseUpdate = EnableCheckPreReleaseUpdate;
|
||||||
_config.uiItem.enableDragDropSort = EnableDragDropSort;
|
_config.uiItem.enableDragDropSort = EnableDragDropSort;
|
||||||
_config.uiItem.doubleClick2Activate = DoubleClick2Activate;
|
_config.uiItem.doubleClick2Activate = DoubleClick2Activate;
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
using DynamicData.Binding;
|
using DynamicData.Binding;
|
||||||
|
using Microsoft.Win32;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
using ReactiveUI.Fody.Helpers;
|
using ReactiveUI.Fody.Helpers;
|
||||||
using Splat;
|
using Splat;
|
||||||
using System.Reactive;
|
using System.Reactive;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Forms;
|
|
||||||
using v2rayN.Base;
|
using v2rayN.Base;
|
||||||
using v2rayN.Handler;
|
using v2rayN.Handler;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
@@ -173,7 +173,7 @@ namespace v2rayN.ViewModels
|
|||||||
UI.Show(ResUI.PleaseSelectRules);
|
UI.Show(ResUI.PleaseSelectRules);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (UI.ShowYesNo(ResUI.RemoveRules) == DialogResult.No)
|
if (UI.ShowYesNo(ResUI.RemoveRules) == MessageBoxResult.No)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -268,7 +268,7 @@ namespace v2rayN.ViewModels
|
|||||||
Multiselect = false,
|
Multiselect = false,
|
||||||
Filter = "Rules|*.json|All|*.*"
|
Filter = "Rules|*.json|All|*.*"
|
||||||
};
|
};
|
||||||
if (fileDialog.ShowDialog() != DialogResult.OK)
|
if (fileDialog.ShowDialog() != true)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -322,7 +322,7 @@ namespace v2rayN.ViewModels
|
|||||||
private int AddBatchRoutingRules(RoutingItem routingItem, string clipboardData)
|
private int AddBatchRoutingRules(RoutingItem routingItem, string clipboardData)
|
||||||
{
|
{
|
||||||
bool blReplace = false;
|
bool blReplace = false;
|
||||||
if (UI.ShowYesNo(ResUI.AddBatchRoutingRulesYesNo) == DialogResult.No)
|
if (UI.ShowYesNo(ResUI.AddBatchRoutingRulesYesNo) == MessageBoxResult.No)
|
||||||
{
|
{
|
||||||
blReplace = true;
|
blReplace = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ using ReactiveUI.Fody.Helpers;
|
|||||||
using Splat;
|
using Splat;
|
||||||
using System.Reactive;
|
using System.Reactive;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Forms;
|
|
||||||
using v2rayN.Base;
|
using v2rayN.Base;
|
||||||
using v2rayN.Handler;
|
using v2rayN.Handler;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
@@ -244,7 +243,7 @@ namespace v2rayN.ViewModels
|
|||||||
UI.Show(ResUI.PleaseSelectRules);
|
UI.Show(ResUI.PleaseSelectRules);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (UI.ShowYesNo(ResUI.RemoveRules) == DialogResult.No)
|
if (UI.ShowYesNo(ResUI.RemoveRules) == MessageBoxResult.No)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,9 @@ namespace v2rayN.ViewModels
|
|||||||
{
|
{
|
||||||
item.remarks = SelectedSource.remarks;
|
item.remarks = SelectedSource.remarks;
|
||||||
item.url = SelectedSource.url;
|
item.url = SelectedSource.url;
|
||||||
|
item.moreUrl = SelectedSource.moreUrl;
|
||||||
item.enabled = SelectedSource.enabled;
|
item.enabled = SelectedSource.enabled;
|
||||||
|
item.autoUpdateInterval = SelectedSource.autoUpdateInterval;
|
||||||
item.userAgent = SelectedSource.userAgent;
|
item.userAgent = SelectedSource.userAgent;
|
||||||
item.sort = SelectedSource.sort;
|
item.sort = SelectedSource.sort;
|
||||||
item.filter = SelectedSource.filter;
|
item.filter = SelectedSource.filter;
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ using ReactiveUI.Fody.Helpers;
|
|||||||
using Splat;
|
using Splat;
|
||||||
using System.Reactive;
|
using System.Reactive;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Forms;
|
|
||||||
using v2rayN.Base;
|
using v2rayN.Base;
|
||||||
using v2rayN.Handler;
|
using v2rayN.Handler;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
@@ -24,6 +23,7 @@ namespace v2rayN.ViewModels
|
|||||||
public IObservableCollection<SubItem> SubItems => _subItems;
|
public IObservableCollection<SubItem> SubItems => _subItems;
|
||||||
[Reactive]
|
[Reactive]
|
||||||
public SubItem SelectedSource { get; set; }
|
public SubItem SelectedSource { get; set; }
|
||||||
|
public IList<SubItem> SelectedSources { get; set; }
|
||||||
|
|
||||||
public ReactiveCommand<Unit, Unit> SubAddCmd { get; }
|
public ReactiveCommand<Unit, Unit> SubAddCmd { get; }
|
||||||
public ReactiveCommand<Unit, Unit> SubDeleteCmd { get; }
|
public ReactiveCommand<Unit, Unit> SubDeleteCmd { get; }
|
||||||
@@ -96,12 +96,15 @@ namespace v2rayN.ViewModels
|
|||||||
|
|
||||||
private void DeleteSub()
|
private void DeleteSub()
|
||||||
{
|
{
|
||||||
if (UI.ShowYesNo(ResUI.RemoveServer) == DialogResult.No)
|
if (UI.ShowYesNo(ResUI.RemoveServer) == MessageBoxResult.No)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigHandler.DeleteSubItem(ref _config, SelectedSource?.id);
|
foreach (var it in SelectedSources)
|
||||||
|
{
|
||||||
|
ConfigHandler.DeleteSubItem(ref _config, it?.id);
|
||||||
|
}
|
||||||
RefreshSubItems();
|
RefreshSubItems();
|
||||||
_noticeHandler?.Enqueue(ResUI.OperationSuccess);
|
_noticeHandler?.Enqueue(ResUI.OperationSuccess);
|
||||||
IsModified = true;
|
IsModified = true;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:reactiveui="http://reactiveui.net"
|
xmlns:reactiveui="http://reactiveui.net"
|
||||||
xmlns:resx="clr-namespace:v2rayN.Resx"
|
xmlns:resx="clr-namespace:v2rayN.Resx"
|
||||||
xmlns:tb="http://www.hardcodet.net/taskbar"
|
xmlns:tb="clr-namespace:H.NotifyIcon;assembly=H.NotifyIcon.Wpf"
|
||||||
xmlns:vms="clr-namespace:v2rayN.ViewModels"
|
xmlns:vms="clr-namespace:v2rayN.ViewModels"
|
||||||
Title="v2rayN"
|
Title="v2rayN"
|
||||||
Width="900"
|
Width="900"
|
||||||
@@ -157,6 +157,10 @@
|
|||||||
Height="{StaticResource MenuItemHeight}"
|
Height="{StaticResource MenuItemHeight}"
|
||||||
Header="{x:Static resx:ResUI.menuGlobalHotkeySetting}" />
|
Header="{x:Static resx:ResUI.menuGlobalHotkeySetting}" />
|
||||||
<Separator Margin="-40,5" />
|
<Separator Margin="-40,5" />
|
||||||
|
<MenuItem
|
||||||
|
x:Name="menuRebootAsAdmin"
|
||||||
|
Height="{StaticResource MenuItemHeight}"
|
||||||
|
Header="{x:Static resx:ResUI.menuRebootAsAdmin}" />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
x:Name="menuSettingsSetUWP"
|
x:Name="menuSettingsSetUWP"
|
||||||
Height="{StaticResource MenuItemHeight}"
|
Height="{StaticResource MenuItemHeight}"
|
||||||
@@ -225,6 +229,11 @@
|
|||||||
Height="{StaticResource MenuItemHeight}"
|
Height="{StaticResource MenuItemHeight}"
|
||||||
Header="Clash.Meta Core" />
|
Header="Clash.Meta Core" />
|
||||||
<Separator Margin="-40,5" />
|
<Separator Margin="-40,5" />
|
||||||
|
<MenuItem
|
||||||
|
x:Name="menuCheckUpdateSingBoxCore"
|
||||||
|
Height="{StaticResource MenuItemHeight}"
|
||||||
|
Header="SingBox Core" />
|
||||||
|
<Separator Margin="-40,5" />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
x:Name="menuCheckUpdateGeo"
|
x:Name="menuCheckUpdateGeo"
|
||||||
Height="{StaticResource MenuItemHeight}"
|
Height="{StaticResource MenuItemHeight}"
|
||||||
@@ -378,6 +387,14 @@
|
|||||||
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}">
|
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}">
|
||||||
<materialDesign:PackIcon VerticalAlignment="Center" Kind="Plus" />
|
<materialDesign:PackIcon VerticalAlignment="Center" Kind="Plus" />
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button
|
||||||
|
x:Name="btnAutofitColumnWidth"
|
||||||
|
Width="30"
|
||||||
|
Height="30"
|
||||||
|
Margin="4,0"
|
||||||
|
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}">
|
||||||
|
<materialDesign:PackIcon VerticalAlignment="Center" Kind="ArrowSplitVertical" />
|
||||||
|
</Button>
|
||||||
<TextBox
|
<TextBox
|
||||||
x:Name="txtServerFilter"
|
x:Name="txtServerFilter"
|
||||||
Width="200"
|
Width="200"
|
||||||
@@ -484,10 +501,10 @@
|
|||||||
CanUserSortColumns="False"
|
CanUserSortColumns="False"
|
||||||
EnableRowVirtualization="True"
|
EnableRowVirtualization="True"
|
||||||
Focusable="True"
|
Focusable="True"
|
||||||
FrozenColumnCount="1"
|
|
||||||
GridLinesVisibility="All"
|
GridLinesVisibility="All"
|
||||||
HeadersVisibility="All"
|
HeadersVisibility="All"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
|
RowHeaderWidth="40"
|
||||||
Style="{StaticResource DefDataGrid}">
|
Style="{StaticResource DefDataGrid}">
|
||||||
<DataGrid.InputBindings>
|
<DataGrid.InputBindings>
|
||||||
<KeyBinding Command="ApplicationCommands.NotACommand" Gesture="Ctrl+C" />
|
<KeyBinding Command="ApplicationCommands.NotACommand" Gesture="Ctrl+C" />
|
||||||
@@ -615,19 +632,19 @@
|
|||||||
<Style BasedOn="{StaticResource MaterialDesignDataGridColumnHeader}" TargetType="DataGridColumnHeader">
|
<Style BasedOn="{StaticResource MaterialDesignDataGridColumnHeader}" TargetType="DataGridColumnHeader">
|
||||||
<EventSetter Event="Click" Handler="LstProfiles_ColumnHeader_Click" />
|
<EventSetter Event="Click" Handler="LstProfiles_ColumnHeader_Click" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style BasedOn="{StaticResource MaterialDesignDataGridCell}" TargetType="DataGridCell">
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding isActive}" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource PrimaryHueLightBrush}" />
|
||||||
|
<Setter Property="Foreground" Value="Black" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryHueLightBrush}" />
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
</DataGrid.Resources>
|
</DataGrid.Resources>
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTemplateColumn Width="40">
|
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<Border
|
|
||||||
Width="auto"
|
|
||||||
Height="auto"
|
|
||||||
Background="{DynamicResource PrimaryHueLightBrush}"
|
|
||||||
Visibility="{Binding Path=isActive, Converter={StaticResource BoolToVisConverter}}" />
|
|
||||||
</DataTemplate>
|
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
|
||||||
</DataGridTemplateColumn>
|
|
||||||
|
|
||||||
<base:MyDGTextColumn
|
<base:MyDGTextColumn
|
||||||
Width="80"
|
Width="80"
|
||||||
@@ -638,7 +655,7 @@
|
|||||||
Width="150"
|
Width="150"
|
||||||
Binding="{Binding remarks}"
|
Binding="{Binding remarks}"
|
||||||
ExName="remarks"
|
ExName="remarks"
|
||||||
Header="{x:Static resx:ResUI.LvAlias}" />
|
Header="{x:Static resx:ResUI.LvRemarks}" />
|
||||||
<base:MyDGTextColumn
|
<base:MyDGTextColumn
|
||||||
Width="120"
|
Width="120"
|
||||||
Binding="{Binding address}"
|
Binding="{Binding address}"
|
||||||
@@ -779,7 +796,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</MenuItem.Header>
|
</MenuItem.Header>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<Separator />
|
<Separator x:Name="sepRoutings" />
|
||||||
<MenuItem x:Name="menuRoutings" Height="Auto">
|
<MenuItem x:Name="menuRoutings" Height="Auto">
|
||||||
<MenuItem.Header>
|
<MenuItem.Header>
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
using Splat;
|
using Splat;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Drawing;
|
|
||||||
using System.Reactive.Disposables;
|
using System.Reactive.Disposables;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
@@ -15,7 +14,6 @@ using v2rayN.Mode;
|
|||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
using v2rayN.ViewModels;
|
using v2rayN.ViewModels;
|
||||||
using Point = System.Windows.Point;
|
using Point = System.Windows.Point;
|
||||||
using SystemInformation = System.Windows.Forms.SystemInformation;
|
|
||||||
|
|
||||||
namespace v2rayN.Views
|
namespace v2rayN.Views
|
||||||
{
|
{
|
||||||
@@ -31,6 +29,8 @@ namespace v2rayN.Views
|
|||||||
App.Current.SessionEnding += Current_SessionEnding;
|
App.Current.SessionEnding += Current_SessionEnding;
|
||||||
this.Closing += MainWindow_Closing;
|
this.Closing += MainWindow_Closing;
|
||||||
this.PreviewKeyDown += MainWindow_PreviewKeyDown;
|
this.PreviewKeyDown += MainWindow_PreviewKeyDown;
|
||||||
|
btnAutofitColumnWidth.Click += BtnAutofitColumnWidth_Click;
|
||||||
|
txtServerFilter.PreviewKeyDown += TxtServerFilter_PreviewKeyDown;
|
||||||
lstProfiles.PreviewKeyDown += LstProfiles_PreviewKeyDown;
|
lstProfiles.PreviewKeyDown += LstProfiles_PreviewKeyDown;
|
||||||
lstProfiles.SelectionChanged += lstProfiles_SelectionChanged;
|
lstProfiles.SelectionChanged += lstProfiles_SelectionChanged;
|
||||||
lstProfiles.LoadingRow += LstProfiles_LoadingRow;
|
lstProfiles.LoadingRow += LstProfiles_LoadingRow;
|
||||||
@@ -118,6 +118,7 @@ namespace v2rayN.Views
|
|||||||
this.BindCommand(ViewModel, vm => vm.OptionSettingCmd, v => v.menuOptionSetting).DisposeWith(disposables);
|
this.BindCommand(ViewModel, vm => vm.OptionSettingCmd, v => v.menuOptionSetting).DisposeWith(disposables);
|
||||||
this.BindCommand(ViewModel, vm => vm.RoutingSettingCmd, v => v.menuRoutingSetting).DisposeWith(disposables);
|
this.BindCommand(ViewModel, vm => vm.RoutingSettingCmd, v => v.menuRoutingSetting).DisposeWith(disposables);
|
||||||
this.BindCommand(ViewModel, vm => vm.GlobalHotkeySettingCmd, v => v.menuGlobalHotkeySetting).DisposeWith(disposables);
|
this.BindCommand(ViewModel, vm => vm.GlobalHotkeySettingCmd, v => v.menuGlobalHotkeySetting).DisposeWith(disposables);
|
||||||
|
this.BindCommand(ViewModel, vm => vm.RebootAsAdminCmd, v => v.menuRebootAsAdmin).DisposeWith(disposables);
|
||||||
this.BindCommand(ViewModel, vm => vm.ClearServerStatisticsCmd, v => v.menuClearServerStatistics).DisposeWith(disposables);
|
this.BindCommand(ViewModel, vm => vm.ClearServerStatisticsCmd, v => v.menuClearServerStatistics).DisposeWith(disposables);
|
||||||
this.BindCommand(ViewModel, vm => vm.ImportOldGuiConfigCmd, v => v.menuImportOldGuiConfig).DisposeWith(disposables);
|
this.BindCommand(ViewModel, vm => vm.ImportOldGuiConfigCmd, v => v.menuImportOldGuiConfig).DisposeWith(disposables);
|
||||||
|
|
||||||
@@ -128,6 +129,7 @@ namespace v2rayN.Views
|
|||||||
this.BindCommand(ViewModel, vm => vm.CheckUpdateXrayCoreCmd, v => v.menuCheckUpdateXrayCore).DisposeWith(disposables);
|
this.BindCommand(ViewModel, vm => vm.CheckUpdateXrayCoreCmd, v => v.menuCheckUpdateXrayCore).DisposeWith(disposables);
|
||||||
this.BindCommand(ViewModel, vm => vm.CheckUpdateClashCoreCmd, v => v.menuCheckUpdateClashCore).DisposeWith(disposables);
|
this.BindCommand(ViewModel, vm => vm.CheckUpdateClashCoreCmd, v => v.menuCheckUpdateClashCore).DisposeWith(disposables);
|
||||||
this.BindCommand(ViewModel, vm => vm.CheckUpdateClashMetaCoreCmd, v => v.menuCheckUpdateClashMetaCore).DisposeWith(disposables);
|
this.BindCommand(ViewModel, vm => vm.CheckUpdateClashMetaCoreCmd, v => v.menuCheckUpdateClashMetaCore).DisposeWith(disposables);
|
||||||
|
this.BindCommand(ViewModel, vm => vm.CheckUpdateSingBoxCoreCmd, v => v.menuCheckUpdateSingBoxCore).DisposeWith(disposables);
|
||||||
this.BindCommand(ViewModel, vm => vm.CheckUpdateGeoCmd, v => v.menuCheckUpdateGeo).DisposeWith(disposables);
|
this.BindCommand(ViewModel, vm => vm.CheckUpdateGeoCmd, v => v.menuCheckUpdateGeo).DisposeWith(disposables);
|
||||||
|
|
||||||
this.BindCommand(ViewModel, vm => vm.ReloadCmd, v => v.menuReload).DisposeWith(disposables);
|
this.BindCommand(ViewModel, vm => vm.ReloadCmd, v => v.menuReload).DisposeWith(disposables);
|
||||||
@@ -147,6 +149,7 @@ namespace v2rayN.Views
|
|||||||
this.OneWayBind(ViewModel, vm => vm.RoutingItems, v => v.cmbRoutings.ItemsSource).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.RoutingItems, v => v.cmbRoutings.ItemsSource).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.SelectedRouting, v => v.cmbRoutings.SelectedItem).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.SelectedRouting, v => v.cmbRoutings.SelectedItem).DisposeWith(disposables);
|
||||||
this.OneWayBind(ViewModel, vm => vm.BlRouting, v => v.menuRoutings.Visibility).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.BlRouting, v => v.menuRoutings.Visibility).DisposeWith(disposables);
|
||||||
|
this.OneWayBind(ViewModel, vm => vm.BlRouting, v => v.sepRoutings.Visibility).DisposeWith(disposables);
|
||||||
|
|
||||||
this.OneWayBind(ViewModel, vm => vm.Servers, v => v.cmbServers.ItemsSource).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.Servers, v => v.cmbServers.ItemsSource).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.SelectedServer, v => v.cmbServers.SelectedItem).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.SelectedServer, v => v.cmbServers.SelectedItem).DisposeWith(disposables);
|
||||||
@@ -193,10 +196,10 @@ namespace v2rayN.Views
|
|||||||
|
|
||||||
spEnableTun.Visibility = IsAdministrator ? Visibility.Visible : Visibility.Collapsed;
|
spEnableTun.Visibility = IsAdministrator ? Visibility.Visible : Visibility.Collapsed;
|
||||||
|
|
||||||
if (_config.uiItem.autoHideStartup)
|
//if (_config.uiItem.autoHideStartup)
|
||||||
{
|
//{
|
||||||
WindowState = WindowState.Minimized;
|
// WindowState = WindowState.Minimized;
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (!_config.guiItem.enableHWA)
|
if (!_config.guiItem.enableHWA)
|
||||||
{
|
{
|
||||||
@@ -206,19 +209,16 @@ namespace v2rayN.Views
|
|||||||
|
|
||||||
#region Event
|
#region Event
|
||||||
|
|
||||||
private void UpdateViewHandler(string action)
|
private void UpdateViewHandler(EViewAction action)
|
||||||
{
|
{
|
||||||
if (action == "AdjustMainLvColWidth")
|
if (action == EViewAction.AdjustMainLvColWidth)
|
||||||
{
|
{
|
||||||
Application.Current.Dispatcher.Invoke(() =>
|
Application.Current.Dispatcher.Invoke(() =>
|
||||||
{
|
{
|
||||||
foreach (var it in lstProfiles.Columns)
|
AutofitColumnWidth();
|
||||||
{
|
|
||||||
it.Width = new DataGridLength(1, DataGridLengthUnitType.Auto);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (action == "ProfilesFocus")
|
else if (action == EViewAction.ProfilesFocus)
|
||||||
{
|
{
|
||||||
lstProfiles.Focus();
|
lstProfiles.Focus();
|
||||||
}
|
}
|
||||||
@@ -278,16 +278,6 @@ namespace v2rayN.Views
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (colHeader.Column.GetType().Name != typeof(MyDGTextColumn).Name)
|
|
||||||
{
|
|
||||||
foreach (var it in lstProfiles.Columns)
|
|
||||||
{
|
|
||||||
//it.MinWidth = it.ActualWidth;
|
|
||||||
it.Width = new DataGridLength(1, DataGridLengthUnitType.Auto);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var colName = ((MyDGTextColumn)colHeader.Column).ExName;
|
var colName = ((MyDGTextColumn)colHeader.Column).ExName;
|
||||||
ViewModel?.SortServer(colName);
|
ViewModel?.SortServer(colName);
|
||||||
}
|
}
|
||||||
@@ -408,6 +398,26 @@ namespace v2rayN.Views
|
|||||||
{
|
{
|
||||||
Utils.ProcessStart(Utils.GetBinPath("EnableLoopback.exe"));
|
Utils.ProcessStart(Utils.GetBinPath("EnableLoopback.exe"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void BtnAutofitColumnWidth_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
AutofitColumnWidth();
|
||||||
|
}
|
||||||
|
private void AutofitColumnWidth()
|
||||||
|
{
|
||||||
|
foreach (var it in lstProfiles.Columns)
|
||||||
|
{
|
||||||
|
it.Width = new DataGridLength(1, DataGridLengthUnitType.Auto);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TxtServerFilter_PreviewKeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Key is Key.Enter or Key.Return)
|
||||||
|
{
|
||||||
|
ViewModel?.RefreshServers();
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region UI
|
#region UI
|
||||||
@@ -420,16 +430,10 @@ namespace v2rayN.Views
|
|||||||
Height = _config.uiItem.mainHeight;
|
Height = _config.uiItem.mainHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
IntPtr hWnd = new WindowInteropHelper(this).EnsureHandle();
|
var maxWidth = SystemParameters.WorkArea.Width;
|
||||||
Graphics g = Graphics.FromHwnd(hWnd);
|
var maxHeight = SystemParameters.WorkArea.Height;
|
||||||
if (Width > SystemInformation.WorkingArea.Width * 96 / g.DpiX)
|
if (Width > maxWidth) Width = maxWidth;
|
||||||
{
|
if (Height > maxHeight) Height = maxHeight;
|
||||||
Width = SystemInformation.WorkingArea.Width * 96 / g.DpiX;
|
|
||||||
}
|
|
||||||
if (Height > SystemInformation.WorkingArea.Height * 96 / g.DpiY)
|
|
||||||
{
|
|
||||||
Height = SystemInformation.WorkingArea.Height * 96 / g.DpiY;
|
|
||||||
}
|
|
||||||
if (_config.uiItem.mainGirdHeight1 > 0 && _config.uiItem.mainGirdHeight2 > 0)
|
if (_config.uiItem.mainGirdHeight1 > 0 && _config.uiItem.mainGirdHeight2 > 0)
|
||||||
{
|
{
|
||||||
gridMain.RowDefinitions[0].Height = new GridLength(_config.uiItem.mainGirdHeight1, GridUnitType.Star);
|
gridMain.RowDefinitions[0].Height = new GridLength(_config.uiItem.mainGirdHeight1, GridUnitType.Star);
|
||||||
@@ -445,14 +449,14 @@ namespace v2rayN.Views
|
|||||||
var item2 = (MyDGTextColumn)lstProfiles.Columns[k];
|
var item2 = (MyDGTextColumn)lstProfiles.Columns[k];
|
||||||
if (item2.ExName == item.Name)
|
if (item2.ExName == item.Name)
|
||||||
{
|
{
|
||||||
if (item.Width <= 0)
|
if (item.Width < 0)
|
||||||
{
|
{
|
||||||
item2.Visibility = Visibility.Hidden;
|
item2.Visibility = Visibility.Hidden;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
item2.Width = item.Width;
|
item2.Width = item.Width;
|
||||||
item2.DisplayIndex = i + 1;
|
item2.DisplayIndex = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -472,7 +476,7 @@ namespace v2rayN.Views
|
|||||||
_config.uiItem.mainHeight = this.Height;
|
_config.uiItem.mainHeight = this.Height;
|
||||||
|
|
||||||
List<ColumnItem> lvColumnItem = new();
|
List<ColumnItem> lvColumnItem = new();
|
||||||
for (int k = 1; k < lstProfiles.Columns.Count; k++)
|
for (int k = 0; k < lstProfiles.Columns.Count; k++)
|
||||||
{
|
{
|
||||||
var item2 = (MyDGTextColumn)lstProfiles.Columns[k];
|
var item2 = (MyDGTextColumn)lstProfiles.Columns[k];
|
||||||
lvColumnItem.Add(new()
|
lvColumnItem.Add(new()
|
||||||
|
|||||||
@@ -216,7 +216,7 @@
|
|||||||
Margin="{StaticResource SettingItemMargin}"
|
Margin="{StaticResource SettingItemMargin}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Style="{StaticResource ToolbarTextBlock}"
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
Text="{x:Static resx:ResUI.TbSettingsLogEnabled}" />
|
Text="{x:Static resx:ResUI.TbSettingsLogEnabledToFile}" />
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Name="toglogEnabled"
|
x:Name="toglogEnabled"
|
||||||
Grid.Row="9"
|
Grid.Row="9"
|
||||||
@@ -668,22 +668,6 @@
|
|||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Style="{StaticResource DefTextBox}" />
|
Style="{StaticResource DefTextBox}" />
|
||||||
|
|
||||||
<TextBlock
|
|
||||||
Grid.Row="13"
|
|
||||||
Grid.Column="0"
|
|
||||||
Margin="{StaticResource SettingItemMargin}"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Style="{StaticResource ToolbarTextBlock}"
|
|
||||||
Text="{x:Static resx:ResUI.TbSettingsAutoUpdate}" />
|
|
||||||
<TextBox
|
|
||||||
x:Name="txtautoUpdateSubInterval"
|
|
||||||
Grid.Row="13"
|
|
||||||
Grid.Column="1"
|
|
||||||
Width="200"
|
|
||||||
Margin="{StaticResource SettingItemMargin}"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
Style="{StaticResource DefTextBox}" />
|
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="14"
|
Grid.Row="14"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using ReactiveUI;
|
using Microsoft.Win32;
|
||||||
|
using ReactiveUI;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reactive.Disposables;
|
using System.Reactive.Disposables;
|
||||||
@@ -159,7 +160,6 @@ namespace v2rayN.Views
|
|||||||
this.Bind(ViewModel, vm => vm.EnableDragDropSort, v => v.togEnableDragDropSort.IsChecked).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.EnableDragDropSort, v => v.togEnableDragDropSort.IsChecked).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.DoubleClick2Activate, v => v.togDoubleClick2Activate.IsChecked).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.DoubleClick2Activate, v => v.togDoubleClick2Activate.IsChecked).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.autoUpdateInterval, v => v.txtautoUpdateInterval.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.autoUpdateInterval, v => v.txtautoUpdateInterval.Text).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.autoUpdateSubInterval, v => v.txtautoUpdateSubInterval.Text).DisposeWith(disposables);
|
|
||||||
this.Bind(ViewModel, vm => vm.trayMenuServersLimit, v => v.txttrayMenuServersLimit.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.trayMenuServersLimit, v => v.txttrayMenuServersLimit.Text).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.currentFontFamily, v => v.cmbcurrentFontFamily.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.currentFontFamily, v => v.cmbcurrentFontFamily.Text).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.SpeedTestTimeout, v => v.cmbSpeedTestTimeout.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.SpeedTestTimeout, v => v.cmbSpeedTestTimeout.Text).DisposeWith(disposables);
|
||||||
@@ -210,7 +210,7 @@ namespace v2rayN.Views
|
|||||||
}
|
}
|
||||||
private void btnBrowse_Click(object sender, System.Windows.RoutedEventArgs e)
|
private void btnBrowse_Click(object sender, System.Windows.RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
|
var openFileDialog1 = new OpenFileDialog();
|
||||||
openFileDialog1.Filter = "tunConfig|*.json|All|*.*";
|
openFileDialog1.Filter = "tunConfig|*.json|All|*.*";
|
||||||
openFileDialog1.ShowDialog();
|
openFileDialog1.ShowDialog();
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using ReactiveUI;
|
using Microsoft.Win32;
|
||||||
|
using ReactiveUI;
|
||||||
using System.Reactive.Disposables;
|
using System.Reactive.Disposables;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
@@ -108,7 +109,7 @@ namespace v2rayN.Views
|
|||||||
|
|
||||||
private void btnBrowse_Click(object sender, System.Windows.RoutedEventArgs e)
|
private void btnBrowse_Click(object sender, System.Windows.RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
|
var openFileDialog1 = new OpenFileDialog();
|
||||||
openFileDialog1.Filter = "PNG|*.png";
|
openFileDialog1.Filter = "PNG|*.png";
|
||||||
openFileDialog1.ShowDialog();
|
openFileDialog1.ShowDialog();
|
||||||
|
|
||||||
|
|||||||
@@ -187,22 +187,22 @@
|
|||||||
Header="{x:Static resx:ResUI.menuRoutingAdvancedImportRules}" />
|
Header="{x:Static resx:ResUI.menuRoutingAdvancedImportRules}" />
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</DataGrid.ContextMenu>
|
</DataGrid.ContextMenu>
|
||||||
|
<DataGrid.Resources>
|
||||||
|
<Style BasedOn="{StaticResource MaterialDesignDataGridCell}" TargetType="DataGridCell">
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding isActive}" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource PrimaryHueLightBrush}" />
|
||||||
|
<Setter Property="Foreground" Value="Black" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryHueLightBrush}" />
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</DataGrid.Resources>
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTemplateColumn Width="50">
|
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<Border
|
|
||||||
Width="auto"
|
|
||||||
Height="auto"
|
|
||||||
Background="{DynamicResource PrimaryHueLightBrush}"
|
|
||||||
Visibility="{Binding Path=isActive, Converter={StaticResource BoolToVisConverter}}" />
|
|
||||||
</DataTemplate>
|
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
|
||||||
</DataGridTemplateColumn>
|
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="200"
|
Width="200"
|
||||||
Binding="{Binding remarks}"
|
Binding="{Binding remarks}"
|
||||||
Header="{x:Static resx:ResUI.LvAlias}" />
|
Header="{x:Static resx:ResUI.LvRemarks}" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="60"
|
Width="60"
|
||||||
Binding="{Binding ruleNum}"
|
Binding="{Binding ruleNum}"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
xmlns:vms="clr-namespace:v2rayN.ViewModels"
|
xmlns:vms="clr-namespace:v2rayN.ViewModels"
|
||||||
Title="{x:Static resx:ResUI.menuSubSetting}"
|
Title="{x:Static resx:ResUI.menuSubSetting}"
|
||||||
Width="700"
|
Width="700"
|
||||||
Height="550"
|
Height="600"
|
||||||
x:TypeArguments="vms:SubEditViewModel"
|
x:TypeArguments="vms:SubEditViewModel"
|
||||||
Background="{DynamicResource MaterialDesignPaper}"
|
Background="{DynamicResource MaterialDesignPaper}"
|
||||||
FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
|
FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
|
||||||
@@ -23,6 +23,14 @@
|
|||||||
TextOptions.TextRenderingMode="Auto"
|
TextOptions.TextRenderingMode="Auto"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
<Window.Resources>
|
||||||
|
<ResourceDictionary>
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Popupbox.xaml" />
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
</ResourceDictionary>
|
||||||
|
</Window.Resources>
|
||||||
|
|
||||||
<ScrollViewer
|
<ScrollViewer
|
||||||
materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True"
|
materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True"
|
||||||
HorizontalScrollBarVisibility="Auto"
|
HorizontalScrollBarVisibility="Auto"
|
||||||
@@ -41,10 +49,12 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
@@ -92,6 +102,31 @@
|
|||||||
Style="{StaticResource MyOutlinedTextBox}"
|
Style="{StaticResource MyOutlinedTextBox}"
|
||||||
TextWrapping="Wrap" />
|
TextWrapping="Wrap" />
|
||||||
|
|
||||||
|
<materialDesign:PopupBox
|
||||||
|
Grid.Row="2"
|
||||||
|
Grid.Column="2"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
StaysOpen="True"
|
||||||
|
Style="{StaticResource MaterialDesignToolForegroundPopupBox}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock
|
||||||
|
Margin="4"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
|
Text="{x:Static resx:ResUI.LvMoreUrl}" />
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtMoreUrl"
|
||||||
|
Width="400"
|
||||||
|
Margin="4"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.SubUrlTips}"
|
||||||
|
AcceptsReturn="True"
|
||||||
|
MinLines="4"
|
||||||
|
Style="{StaticResource MyOutlinedTextBox}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</StackPanel>
|
||||||
|
</materialDesign:PopupBox>
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="3"
|
Grid.Row="3"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
@@ -111,10 +146,28 @@
|
|||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="4"
|
Margin="4"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
|
Text="{x:Static resx:ResUI.LvAutoUpdateInterval}" />
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtAutoUpdateInterval"
|
||||||
|
Grid.Row="4"
|
||||||
|
Grid.Column="1"
|
||||||
|
Width="400"
|
||||||
|
Margin="4"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.SubUrlTips}"
|
||||||
|
AcceptsReturn="True"
|
||||||
|
Style="{StaticResource MyOutlinedTextBox}" />
|
||||||
|
|
||||||
|
<TextBlock
|
||||||
|
Grid.Row="5"
|
||||||
|
Grid.Column="0"
|
||||||
|
Margin="4"
|
||||||
|
VerticalAlignment="Center"
|
||||||
Text="{x:Static resx:ResUI.LvUserAgent}" />
|
Text="{x:Static resx:ResUI.LvUserAgent}" />
|
||||||
<TextBox
|
<TextBox
|
||||||
x:Name="txtUserAgent"
|
x:Name="txtUserAgent"
|
||||||
Grid.Row="4"
|
Grid.Row="5"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Width="400"
|
Width="400"
|
||||||
Margin="4"
|
Margin="4"
|
||||||
@@ -125,7 +178,7 @@
|
|||||||
TextWrapping="Wrap" />
|
TextWrapping="Wrap" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="5"
|
Grid.Row="6"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="4"
|
Margin="4"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
@@ -133,7 +186,7 @@
|
|||||||
Text="{x:Static resx:ResUI.LvFilter}" />
|
Text="{x:Static resx:ResUI.LvFilter}" />
|
||||||
<TextBox
|
<TextBox
|
||||||
x:Name="txtFilter"
|
x:Name="txtFilter"
|
||||||
Grid.Row="5"
|
Grid.Row="6"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Width="400"
|
Width="400"
|
||||||
Margin="4"
|
Margin="4"
|
||||||
@@ -143,7 +196,7 @@
|
|||||||
Style="{StaticResource MyOutlinedTextBox}" />
|
Style="{StaticResource MyOutlinedTextBox}" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="6"
|
Grid.Row="7"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="4"
|
Margin="4"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
@@ -151,7 +204,7 @@
|
|||||||
Text="{x:Static resx:ResUI.LvSort}" />
|
Text="{x:Static resx:ResUI.LvSort}" />
|
||||||
<TextBox
|
<TextBox
|
||||||
x:Name="txtSort"
|
x:Name="txtSort"
|
||||||
Grid.Row="6"
|
Grid.Row="7"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Width="400"
|
Width="400"
|
||||||
Margin="4"
|
Margin="4"
|
||||||
|
|||||||
@@ -20,7 +20,9 @@ namespace v2rayN.Views
|
|||||||
{
|
{
|
||||||
this.Bind(ViewModel, vm => vm.SelectedSource.remarks, v => v.txtRemarks.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.SelectedSource.remarks, v => v.txtRemarks.Text).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.SelectedSource.url, v => v.txtUrl.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.SelectedSource.url, v => v.txtUrl.Text).DisposeWith(disposables);
|
||||||
|
this.Bind(ViewModel, vm => vm.SelectedSource.moreUrl, v => v.txtMoreUrl.Text).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.SelectedSource.enabled, v => v.togEnable.IsChecked).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.SelectedSource.enabled, v => v.togEnable.IsChecked).DisposeWith(disposables);
|
||||||
|
this.Bind(ViewModel, vm => vm.SelectedSource.autoUpdateInterval, v => v.txtAutoUpdateInterval.Text).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.SelectedSource.userAgent, v => v.txtUserAgent.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.SelectedSource.userAgent, v => v.txtUserAgent.Text).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.SelectedSource.sort, v => v.txtSort.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.SelectedSource.sort, v => v.txtSort.Text).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.SelectedSource.filter, v => v.txtFilter.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.SelectedSource.filter, v => v.txtFilter.Text).DisposeWith(disposables);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
xmlns:resx="clr-namespace:v2rayN.Resx"
|
xmlns:resx="clr-namespace:v2rayN.Resx"
|
||||||
xmlns:vms="clr-namespace:v2rayN.ViewModels"
|
xmlns:vms="clr-namespace:v2rayN.ViewModels"
|
||||||
Title="{x:Static resx:ResUI.menuSubSetting}"
|
Title="{x:Static resx:ResUI.menuSubSetting}"
|
||||||
Width="700"
|
Width="800"
|
||||||
Height="600"
|
Height="600"
|
||||||
x:TypeArguments="vms:SubSettingViewModel"
|
x:TypeArguments="vms:SubSettingViewModel"
|
||||||
Background="{DynamicResource MaterialDesignPaper}"
|
Background="{DynamicResource MaterialDesignPaper}"
|
||||||
@@ -104,15 +104,19 @@
|
|||||||
Binding="{Binding remarks}"
|
Binding="{Binding remarks}"
|
||||||
Header="{x:Static resx:ResUI.LvRemarks}" />
|
Header="{x:Static resx:ResUI.LvRemarks}" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="200"
|
Width="150"
|
||||||
Binding="{Binding url}"
|
Binding="{Binding url}"
|
||||||
Header="{x:Static resx:ResUI.LvUrl}" />
|
Header="{x:Static resx:ResUI.LvUrl}" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="80"
|
Width="100"
|
||||||
Binding="{Binding enabled}"
|
Binding="{Binding enabled}"
|
||||||
Header="{x:Static resx:ResUI.LvEnabled}" />
|
Header="{x:Static resx:ResUI.LvEnabled}" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="200"
|
Width="150"
|
||||||
|
Binding="{Binding autoUpdateInterval}"
|
||||||
|
Header="{x:Static resx:ResUI.LvAutoUpdateInterval}" />
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="150"
|
||||||
Binding="{Binding userAgent}"
|
Binding="{Binding userAgent}"
|
||||||
Header="{x:Static resx:ResUI.LvUserAgent}" />
|
Header="{x:Static resx:ResUI.LvUserAgent}" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.ComponentModel;
|
|||||||
using System.Reactive.Disposables;
|
using System.Reactive.Disposables;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
using v2rayN.Mode;
|
||||||
using v2rayN.ViewModels;
|
using v2rayN.ViewModels;
|
||||||
|
|
||||||
namespace v2rayN.Views
|
namespace v2rayN.Views
|
||||||
@@ -17,6 +18,7 @@ namespace v2rayN.Views
|
|||||||
ViewModel = new SubSettingViewModel(this);
|
ViewModel = new SubSettingViewModel(this);
|
||||||
this.Closing += SubSettingWindow_Closing;
|
this.Closing += SubSettingWindow_Closing;
|
||||||
lstSubscription.MouseDoubleClick += LstSubscription_MouseDoubleClick;
|
lstSubscription.MouseDoubleClick += LstSubscription_MouseDoubleClick;
|
||||||
|
lstSubscription.SelectionChanged += LstSubscription_SelectionChanged;
|
||||||
|
|
||||||
this.WhenActivated(disposables =>
|
this.WhenActivated(disposables =>
|
||||||
{
|
{
|
||||||
@@ -43,6 +45,10 @@ namespace v2rayN.Views
|
|||||||
{
|
{
|
||||||
ViewModel?.EditSub(false);
|
ViewModel?.EditSub(false);
|
||||||
}
|
}
|
||||||
|
private void LstSubscription_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
ViewModel.SelectedSources = lstSubscription.SelectedItems.Cast<SubItem>().ToList();
|
||||||
|
}
|
||||||
|
|
||||||
private void menuClose_Click(object sender, System.Windows.RoutedEventArgs e)
|
private void menuClose_Click(object sender, System.Windows.RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,13 +10,13 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<ApplicationIcon>v2rayN.ico</ApplicationIcon>
|
<ApplicationIcon>v2rayN.ico</ApplicationIcon>
|
||||||
<Copyright>Copyright © 2017-2023 (GPLv3)</Copyright>
|
<Copyright>Copyright © 2017-2023 (GPLv3)</Copyright>
|
||||||
<FileVersion>6.20</FileVersion>
|
<FileVersion>6.22</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Downloader" Version="3.0.4" />
|
<PackageReference Include="Downloader" Version="3.0.4" />
|
||||||
<PackageReference Include="MaterialDesignThemes" Version="4.7.1" />
|
<PackageReference Include="MaterialDesignThemes" Version="4.7.1" />
|
||||||
<PackageReference Include="Hardcodet.NotifyIcon.Wpf" Version="1.1.0" />
|
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.0.108" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageReference Include="QRCoder.Xaml" Version="1.4.3" />
|
<PackageReference Include="QRCoder.Xaml" Version="1.4.3" />
|
||||||
<PackageReference Include="sqlite-net-pcl" Version="1.8.116" />
|
<PackageReference Include="sqlite-net-pcl" Version="1.8.116" />
|
||||||
|
|||||||
Reference in New Issue
Block a user