Compare commits
39 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e64f23ef9 | ||
|
|
801d1fd320 | ||
|
|
cfffb5756e | ||
|
|
b30daf8e56 | ||
|
|
84eba671f0 | ||
|
|
f28b93daa0 | ||
|
|
dc16136c59 | ||
|
|
e47caf8c4f | ||
|
|
8ad80bb75d | ||
|
|
22475e459d | ||
|
|
73ad33dfc9 | ||
|
|
f1782c78f4 | ||
|
|
b544dde2c6 | ||
|
|
1a7dca8e58 | ||
|
|
23c7d7fb46 | ||
|
|
65fda407dc | ||
|
|
12ebad436a | ||
|
|
c7297dba7e | ||
|
|
e61368a26e | ||
|
|
b98da3a5dc | ||
|
|
12f3400894 | ||
|
|
4b5508fc3c | ||
|
|
5f40e6e0b7 | ||
|
|
080d660cfa | ||
|
|
790209efbc | ||
|
|
f1679e444c | ||
|
|
9dc6ba182a | ||
|
|
785a30e623 | ||
|
|
f09efdad66 | ||
|
|
4e73b3ae28 | ||
|
|
6213f86f81 | ||
|
|
0a6955cd59 | ||
|
|
6ee8f03ec0 | ||
|
|
b1a82d95c2 | ||
|
|
30bc9ded29 | ||
|
|
5a32892e94 | ||
|
|
e33de896b6 | ||
|
|
3ba92444a5 | ||
|
|
4f120e8eb4 |
@@ -30,8 +30,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();
|
||||||
@@ -42,10 +43,11 @@ namespace v2rayN
|
|||||||
Global.processJob = new Job();
|
Global.processJob = new Job();
|
||||||
|
|
||||||
Logging.Setup();
|
Logging.Setup();
|
||||||
|
Init();
|
||||||
|
Logging.LoggingEnabled(_config.guiItem.enableLog);
|
||||||
Utils.SaveLog($"v2rayN start up | {Utils.GetVersion()} | {Utils.GetExePath()}");
|
Utils.SaveLog($"v2rayN start up | {Utils.GetVersion()} | {Utils.GetExePath()}");
|
||||||
Logging.ClearLogs();
|
Logging.ClearLogs();
|
||||||
|
|
||||||
Init();
|
|
||||||
|
|
||||||
Thread.CurrentThread.CurrentUICulture = new(_config.uiItem.currentLanguage);
|
Thread.CurrentThread.CurrentUICulture = new(_config.uiItem.currentLanguage);
|
||||||
|
|
||||||
|
|||||||
@@ -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}",
|
||||||
|
|||||||
@@ -795,21 +795,25 @@ 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))
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
AddServerCommon(ref config, profileItem, toFile);
|
AddServerCommon(ref config, profileItem, toFile);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int DedupServerList(ref Config config, ref List<ProfileItem> lstProfile)
|
public static Tuple<int, int> DedupServerList(Config config, string subId)
|
||||||
{
|
{
|
||||||
List<ProfileItem> source = lstProfile;
|
var lstProfile = LazyConfig.Instance.ProfileItems(subId);
|
||||||
bool keepOlder = config.guiItem.keepOlderDedupl;
|
|
||||||
|
|
||||||
List<ProfileItem> lstKeep = new();
|
List<ProfileItem> lstKeep = new();
|
||||||
List<ProfileItem> lstRemove = new();
|
List<ProfileItem> lstRemove = new();
|
||||||
if (!keepOlder) source.Reverse(); // Remove the early items first
|
if (config.guiItem.keepOlderDedupl) lstProfile.Reverse();
|
||||||
|
|
||||||
foreach (ProfileItem item in source)
|
foreach (ProfileItem item in lstProfile)
|
||||||
{
|
{
|
||||||
if (!lstKeep.Exists(i => CompareProfileItem(i, item, false)))
|
if (!lstKeep.Exists(i => CompareProfileItem(i, item, false)))
|
||||||
{
|
{
|
||||||
@@ -822,7 +826,7 @@ namespace v2rayN.Handler
|
|||||||
}
|
}
|
||||||
RemoveServer(config, lstRemove);
|
RemoveServer(config, lstRemove);
|
||||||
|
|
||||||
return lstKeep.Count;
|
return new Tuple<int, int>(lstProfile.Count, lstKeep.Count);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int AddServerCommon(ref Config config, ProfileItem profileItem, bool toFile = true)
|
public static int AddServerCommon(ref Config config, ProfileItem profileItem, bool toFile = true)
|
||||||
@@ -934,12 +938,14 @@ 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());
|
string[] arrData = clipboardData.Split(Environment.NewLine.ToCharArray());
|
||||||
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)
|
||||||
{
|
{
|
||||||
@@ -956,10 +962,23 @@ namespace v2rayN.Handler
|
|||||||
//exist sub items
|
//exist sub items
|
||||||
if (isSub && !Utils.IsNullOrEmpty(subid))
|
if (isSub && !Utils.IsNullOrEmpty(subid))
|
||||||
{
|
{
|
||||||
var existItem = lstOriSub?.FirstOrDefault(t => CompareProfileItem(t, profileItem, true));
|
var existItem = lstOriSub?.FirstOrDefault(t => t.isSub == isSub && CompareProfileItem(t, profileItem, true));
|
||||||
if (existItem != null)
|
if (existItem != null)
|
||||||
{
|
{
|
||||||
profileItem.indexId = existItem.indexId;
|
//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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//filter
|
//filter
|
||||||
if (!Utils.IsNullOrEmpty(subFilter))
|
if (!Utils.IsNullOrEmpty(subFilter))
|
||||||
@@ -1168,7 +1187,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);
|
||||||
@@ -1288,17 +1315,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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1390,7 +1390,7 @@ namespace v2rayN.Handler
|
|||||||
Utils.SaveLog(ex.Message, ex);
|
Utils.SaveLog(ex.Message, ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
log(configCopy, ref v2rayConfig, false);
|
log(configCopy, ref v2rayConfig, true);
|
||||||
//routing(config, ref v2rayConfig);
|
//routing(config, ref v2rayConfig);
|
||||||
//dns(configCopy, ref v2rayConfig);
|
//dns(configCopy, ref v2rayConfig);
|
||||||
|
|
||||||
@@ -1465,6 +1465,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();
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ namespace v2rayN.Handler
|
|||||||
if (Utils.IsNullOrEmpty(fileName))
|
if (Utils.IsNullOrEmpty(fileName))
|
||||||
{
|
{
|
||||||
string msg = string.Format(ResUI.NotFoundCore, Utils.GetBinPath("", coreInfo.coreType), string.Join(", ", coreInfo.coreExes.ToArray()), coreInfo.coreUrl);
|
string msg = string.Format(ResUI.NotFoundCore, Utils.GetBinPath("", coreInfo.coreType), string.Join(", ", coreInfo.coreExes.ToArray()), coreInfo.coreUrl);
|
||||||
|
Utils.SaveLog(msg);
|
||||||
ShowMsg(false, msg);
|
ShowMsg(false, msg);
|
||||||
}
|
}
|
||||||
return fileName;
|
return fileName;
|
||||||
@@ -213,6 +214,7 @@ namespace v2rayN.Handler
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
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);
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -142,7 +142,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 +181,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 +218,7 @@ namespace v2rayN.Handler
|
|||||||
FilterIndex = 2,
|
FilterIndex = 2,
|
||||||
RestoreDirectory = true
|
RestoreDirectory = true
|
||||||
};
|
};
|
||||||
if (fileDialog.ShowDialog() != DialogResult.OK)
|
if (fileDialog.ShowDialog() != true)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -246,22 +246,22 @@ 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.Filter = "guiNConfig|*.json|All|*.*";
|
|
||||||
fileDialog.FilterIndex = 2;
|
|
||||||
fileDialog.RestoreDirectory = true;
|
|
||||||
|
|
||||||
if (fileDialog.ShowDialog() == DialogResult.OK)
|
fileDialog.InitialDirectory = Utils.GetBackupPath("");
|
||||||
{
|
fileDialog.Filter = "guiNConfig|*.json|All|*.*";
|
||||||
fileContent = Utils.LoadResource(fileDialog.FileName);
|
fileDialog.FilterIndex = 2;
|
||||||
}
|
fileDialog.RestoreDirectory = true;
|
||||||
else
|
|
||||||
{
|
if (fileDialog.ShowDialog() == true)
|
||||||
return false;
|
{
|
||||||
}
|
fileContent = Utils.LoadResource(fileDialog.FileName);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (Utils.IsNullOrEmpty(fileContent))
|
if (Utils.IsNullOrEmpty(fileContent))
|
||||||
{
|
{
|
||||||
UI.ShowWarning(ResUI.OperationFailed);
|
UI.ShowWarning(ResUI.OperationFailed);
|
||||||
|
|||||||
@@ -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,
|
||||||
@@ -197,6 +197,18 @@ namespace v2rayN.Handler
|
|||||||
{
|
{
|
||||||
dicQuery.Add("fp", Utils.UrlEncode(item.fingerprint));
|
dicQuery.Add("fp", Utils.UrlEncode(item.fingerprint));
|
||||||
}
|
}
|
||||||
|
if (!Utils.IsNullOrEmpty(item.publicKey))
|
||||||
|
{
|
||||||
|
dicQuery.Add("pbk", Utils.UrlEncode(item.publicKey));
|
||||||
|
}
|
||||||
|
if (!Utils.IsNullOrEmpty(item.shortId))
|
||||||
|
{
|
||||||
|
dicQuery.Add("sid", Utils.UrlEncode(item.shortId));
|
||||||
|
}
|
||||||
|
if (!Utils.IsNullOrEmpty(item.spiderX))
|
||||||
|
{
|
||||||
|
dicQuery.Add("spx", Utils.UrlEncode(item.spiderX));
|
||||||
|
}
|
||||||
|
|
||||||
dicQuery.Add("type", !Utils.IsNullOrEmpty(item.network) ? item.network : "tcp");
|
dicQuery.Add("type", !Utils.IsNullOrEmpty(item.network) ? item.network : "tcp");
|
||||||
|
|
||||||
@@ -756,6 +768,10 @@ namespace v2rayN.Handler
|
|||||||
item.sni = query["sni"] ?? "";
|
item.sni = query["sni"] ?? "";
|
||||||
item.alpn = Utils.UrlDecode(query["alpn"] ?? "");
|
item.alpn = Utils.UrlDecode(query["alpn"] ?? "");
|
||||||
item.fingerprint = Utils.UrlDecode(query["fp"] ?? "");
|
item.fingerprint = Utils.UrlDecode(query["fp"] ?? "");
|
||||||
|
item.publicKey = Utils.UrlDecode(query["pbk"] ?? "");
|
||||||
|
item.shortId = Utils.UrlDecode(query["sid"] ?? "");
|
||||||
|
item.spiderX = Utils.UrlDecode(query["spx"] ?? "");
|
||||||
|
|
||||||
item.network = query["type"] ?? "tcp";
|
item.network = query["type"] ?? "tcp";
|
||||||
switch (item.network)
|
switch (item.network)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
using Splat;
|
using DynamicData;
|
||||||
|
using Splat;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
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,36 +164,22 @@ 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)
|
||||||
{
|
{
|
||||||
if (item.enabled == false)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (!Utils.IsNullOrEmpty(subId) && item.id != subId)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
string id = item.id.TrimEx();
|
string id = item.id.TrimEx();
|
||||||
string url = item.url.TrimEx();
|
string url = item.url.TrimEx();
|
||||||
string userAgent = item.userAgent.TrimEx();
|
string userAgent = item.userAgent.TrimEx();
|
||||||
string hashCode = $"{item.remarks}->";
|
string hashCode = $"{item.remarks}->";
|
||||||
if (Utils.IsNullOrEmpty(id) || Utils.IsNullOrEmpty(url))
|
if (Utils.IsNullOrEmpty(id) || Utils.IsNullOrEmpty(url) || (!Utils.IsNullOrEmpty(subId) && item.id != subId))
|
||||||
{
|
{
|
||||||
//_updateFunc(false, $"{hashCode}{ResUI.MsgNoValidSubscription}");
|
//_updateFunc(false, $"{hashCode}{ResUI.MsgNoValidSubscription}");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (item.enabled == false)
|
||||||
|
{
|
||||||
|
_updateFunc(false, $"{hashCode}{ResUI.MsgSkipSubscriptionUpdate}");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
var downloadHandle = new DownloadHandle();
|
var downloadHandle = new DownloadHandle();
|
||||||
downloadHandle.Error += (sender2, args) =>
|
downloadHandle.Error += (sender2, args) =>
|
||||||
@@ -200,16 +187,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}");
|
||||||
@@ -235,18 +261,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;
|
||||||
@@ -483,7 +503,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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,8 +103,10 @@ namespace v2rayN.Mode
|
|||||||
public bool enableSecurityProtocolTls13 { get; set; }
|
public bool enableSecurityProtocolTls13 { get; set; }
|
||||||
|
|
||||||
public int trayMenuServersLimit { get; set; } = 20;
|
public int trayMenuServersLimit { get; set; } = 20;
|
||||||
|
|
||||||
public bool enableHWA { get; set; } = true;
|
public bool enableHWA { get; set; } = false;
|
||||||
|
|
||||||
|
public bool enableLog { get; set; } = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
|||||||
@@ -301,7 +301,7 @@
|
|||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 备注或别名
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string remarks
|
public string remarks
|
||||||
{
|
{
|
||||||
|
|||||||
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,45 +6,20 @@ 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; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
174
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
174
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
@@ -366,15 +366,6 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 Alias 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string LvAlias {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("LvAlias", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Count 的本地化字符串。
|
/// 查找类似 Count 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -420,6 +411,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 +474,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 +555,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 +915,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 +1392,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>
|
||||||
@@ -1438,11 +1411,11 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Simplify PAC Success 的本地化字符串。
|
/// 查找类似 Updates are not enabled, skip this subscription 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string MsgSimplifyPAC {
|
public static string MsgSkipSubscriptionUpdate {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("MsgSimplifyPAC", resourceCulture);
|
return ResourceManager.GetString("MsgSkipSubscriptionUpdate", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1464,15 +1437,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>
|
||||||
@@ -1527,24 +1491,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>
|
||||||
@@ -1653,15 +1599,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>
|
||||||
@@ -1744,20 +1681,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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1797,15 +1725,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>
|
||||||
@@ -2338,15 +2257,6 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 Automatic latency test interval (minutes) 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string TbSettingsAutoTest {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("TbSettingsAutoTest", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Automatic update interval of subscriptions (hours) 的本地化字符串。
|
/// 查找类似 Automatic update interval of subscriptions (hours) 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -2572,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>
|
||||||
@@ -2644,15 +2545,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>
|
||||||
@@ -2680,15 +2572,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>
|
||||||
@@ -2995,6 +2878,15 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 Please turn off when there is an abnormal disconnection 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string TipDisplayLog {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TipDisplayLog", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 *Default value tcp 的本地化字符串。
|
/// 查找类似 *Default value tcp 的本地化字符串。
|
||||||
/// </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,9 +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">
|
<data name="TbSettingsAutoUpdate" xml:space="preserve">
|
||||||
<value>فاصله به روز رسانی خودکار اشتراک ها (ساعت)</value>
|
<value>فاصله به روز رسانی خودکار اشتراک ها (ساعت)</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -808,9 +766,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 +781,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>
|
||||||
@@ -472,9 +436,6 @@
|
|||||||
<data name="MsgServerTitle" xml:space="preserve">
|
<data name="MsgServerTitle" xml:space="preserve">
|
||||||
<value>Servers Filter</value>
|
<value>Servers Filter</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="NetFrameworkRequirementsTip" xml:space="preserve">
|
|
||||||
<value>Normal use of this version requires .NET Framework 4.8</value>
|
|
||||||
</data>
|
|
||||||
<data name="menuCheckUpdate" xml:space="preserve">
|
<data name="menuCheckUpdate" xml:space="preserve">
|
||||||
<value>Check Update</value>
|
<value>Check Update</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -763,9 +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">
|
<data name="TbSettingsAutoUpdate" xml:space="preserve">
|
||||||
<value>Automatic update interval of subscriptions (hours)</value>
|
<value>Automatic update interval of subscriptions (hours)</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -808,9 +766,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 +781,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>
|
||||||
@@ -1147,4 +1096,19 @@
|
|||||||
<data name="SpeedtestingWait" xml:space="preserve">
|
<data name="SpeedtestingWait" xml:space="preserve">
|
||||||
<value>Waiting for testing</value>
|
<value>Waiting for testing</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="TipDisplayLog" xml:space="preserve">
|
||||||
|
<value>Please turn off when there is an abnormal disconnection</value>
|
||||||
|
</data>
|
||||||
|
<data name="MsgSkipSubscriptionUpdate" xml:space="preserve">
|
||||||
|
<value>Updates are not enabled, skip this subscription</value>
|
||||||
|
</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>
|
||||||
</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,9 +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">
|
<data name="TbSettingsAutoUpdate" xml:space="preserve">
|
||||||
<value>Интервал автоматического обновления подписок в часах</value>
|
<value>Интервал автоматического обновления подписок в часах</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -808,9 +766,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 +781,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>
|
||||||
@@ -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,9 +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">
|
<data name="TbSettingsAutoUpdate" xml:space="preserve">
|
||||||
<value>自动更新订阅的间隔(单位小时)</value>
|
<value>自动更新订阅的间隔(单位小时)</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -808,9 +766,6 @@
|
|||||||
<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>
|
||||||
@@ -826,17 +781,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>
|
||||||
@@ -1147,4 +1096,16 @@
|
|||||||
<data name="SpeedtestingWait" xml:space="preserve">
|
<data name="SpeedtestingWait" xml:space="preserve">
|
||||||
<value>等待测试中...</value>
|
<value>等待测试中...</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="TipDisplayLog" xml:space="preserve">
|
||||||
|
<value>当有异常断流时请关闭</value>
|
||||||
|
</data>
|
||||||
|
<data name="MsgSkipSubscriptionUpdate" xml:space="preserve">
|
||||||
|
<value>未启用更新,跳过此订阅</value>
|
||||||
|
</data>
|
||||||
|
<data name="menuRebootAsAdmin" xml:space="preserve">
|
||||||
|
<value>以管理员身份重启</value>
|
||||||
|
</data>
|
||||||
|
<data name="LvMoreUrl" xml:space="preserve">
|
||||||
|
<value>更多地址(url),用逗号(,)分隔</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -17,6 +17,13 @@ namespace v2rayN.Tool
|
|||||||
config.LoggingRules.Add(new LoggingRule("*", LogLevel.Debug, fileTarget));
|
config.LoggingRules.Add(new LoggingRule("*", LogLevel.Debug, fileTarget));
|
||||||
LogManager.Configuration = config;
|
LogManager.Configuration = config;
|
||||||
}
|
}
|
||||||
|
public static void LoggingEnabled(bool enable)
|
||||||
|
{
|
||||||
|
if (!enable)
|
||||||
|
{
|
||||||
|
LogManager.SuspendLogging();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void ClearLogs()
|
public static void ClearLogs()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -282,6 +282,8 @@ namespace v2rayN
|
|||||||
.Replace(Environment.NewLine, "")
|
.Replace(Environment.NewLine, "")
|
||||||
.Replace("\n", "")
|
.Replace("\n", "")
|
||||||
.Replace("\r", "")
|
.Replace("\r", "")
|
||||||
|
.Replace('_', '/')
|
||||||
|
.Replace('-', '+')
|
||||||
.Replace(" ", "");
|
.Replace(" ", "");
|
||||||
|
|
||||||
if (plainText.Length % 4 > 0)
|
if (plainText.Length % 4 > 0)
|
||||||
@@ -312,7 +314,7 @@ namespace v2rayN
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
SaveLog(ex.Message, ex);
|
//SaveLog(ex.Message, ex);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -324,7 +326,7 @@ namespace v2rayN
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
SaveLog(ex.Message, ex);
|
//SaveLog(ex.Message, ex);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -337,7 +339,7 @@ namespace v2rayN
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
SaveLog(ex.Message, ex);
|
//SaveLog(ex.Message, ex);
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -427,6 +429,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))
|
||||||
@@ -451,6 +458,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
|
||||||
|
|
||||||
|
|
||||||
@@ -665,12 +678,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)
|
||||||
@@ -778,7 +791,7 @@ namespace v2rayN
|
|||||||
task.Settings.RunOnlyIfIdle = false;
|
task.Settings.RunOnlyIfIdle = false;
|
||||||
task.Settings.IdleSettings.StopOnIdleEnd = false;
|
task.Settings.IdleSettings.StopOnIdleEnd = false;
|
||||||
task.Settings.ExecutionTimeLimit = TimeSpan.Zero;
|
task.Settings.ExecutionTimeLimit = TimeSpan.Zero;
|
||||||
task.Triggers.Add(new LogonTrigger { UserId = logonUser, Delay = TimeSpan.FromMinutes(1) });
|
task.Triggers.Add(new LogonTrigger { UserId = logonUser, Delay = TimeSpan.FromSeconds(10) });
|
||||||
task.Principal.RunLevel = TaskRunLevel.Highest;
|
task.Principal.RunLevel = TaskRunLevel.Highest;
|
||||||
task.Actions.Add(new ExecAction(deamonFileName));
|
task.Actions.Add(new ExecAction(deamonFileName));
|
||||||
|
|
||||||
@@ -907,13 +920,13 @@ namespace v2rayN
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string? GetClipboardData()
|
public static string? GetClipboardData()
|
||||||
{
|
{
|
||||||
string strData = string.Empty;
|
string? strData = string.Empty;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
IDataObject data = Clipboard.GetDataObject();
|
IDataObject data = Clipboard.GetDataObject();
|
||||||
if (data.GetDataPresent(DataFormats.UnicodeText))
|
if (data.GetDataPresent(DataFormats.UnicodeText))
|
||||||
{
|
{
|
||||||
strData = data.GetData(DataFormats.UnicodeText).ToString();
|
strData = data.GetData(DataFormats.UnicodeText)?.ToString();
|
||||||
}
|
}
|
||||||
return strData;
|
return strData;
|
||||||
}
|
}
|
||||||
@@ -1150,17 +1163,23 @@ namespace v2rayN
|
|||||||
|
|
||||||
public static void SaveLog(string strContent)
|
public static void SaveLog(string strContent)
|
||||||
{
|
{
|
||||||
var logger = LogManager.GetLogger("Log1");
|
if (LogManager.IsLoggingEnabled())
|
||||||
logger.Info(strContent);
|
{
|
||||||
|
var logger = LogManager.GetLogger("Log1");
|
||||||
|
logger.Info(strContent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static void SaveLog(string strTitle, Exception ex)
|
public static void SaveLog(string strTitle, Exception ex)
|
||||||
{
|
{
|
||||||
var logger = LogManager.GetLogger("Log2");
|
if (LogManager.IsLoggingEnabled())
|
||||||
logger.Debug($"{strTitle},{ex.Message}");
|
|
||||||
logger.Debug(ex.StackTrace);
|
|
||||||
if (ex?.InnerException != null)
|
|
||||||
{
|
{
|
||||||
logger.Error(ex.InnerException);
|
var logger = LogManager.GetLogger("Log2");
|
||||||
|
logger.Debug($"{strTitle},{ex.Message}");
|
||||||
|
logger.Debug(ex.StackTrace);
|
||||||
|
if (ex?.InnerException != null)
|
||||||
|
{
|
||||||
|
logger.Error(ex.InnerException);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1169,47 +1188,44 @@ 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);
|
||||||
|
var width = (int)(SystemParameters.WorkArea.Width / dpiX);
|
||||||
|
var height = (int)(SystemParameters.WorkArea.Height / dpiY);
|
||||||
|
|
||||||
|
using Bitmap fullImage = new Bitmap(width, height);
|
||||||
|
using (Graphics g = Graphics.FromImage(fullImage))
|
||||||
{
|
{
|
||||||
using Bitmap fullImage = new Bitmap(screen.Bounds.Width,
|
g.CopyFromScreen(left, top, 0, 0, fullImage.Size, CopyPixelOperation.SourceCopy);
|
||||||
screen.Bounds.Height);
|
}
|
||||||
using (Graphics g = Graphics.FromImage(fullImage))
|
int maxTry = 10;
|
||||||
|
for (int i = 0; i < maxTry; i++)
|
||||||
|
{
|
||||||
|
int marginLeft = (int)((double)fullImage.Width * 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);
|
||||||
|
Bitmap target = new(width, height);
|
||||||
|
|
||||||
|
double imageScale = (double)width / (double)cropRect.Width;
|
||||||
|
using (Graphics g = Graphics.FromImage(target))
|
||||||
{
|
{
|
||||||
g.CopyFromScreen(screen.Bounds.X,
|
g.DrawImage(fullImage, new Rectangle(0, 0, target.Width, target.Height),
|
||||||
screen.Bounds.Y,
|
cropRect,
|
||||||
0, 0,
|
GraphicsUnit.Pixel);
|
||||||
fullImage.Size,
|
|
||||||
CopyPixelOperation.SourceCopy);
|
|
||||||
}
|
}
|
||||||
int maxTry = 10;
|
|
||||||
for (int i = 0; i < maxTry; i++)
|
BitmapLuminanceSource source = new(target);
|
||||||
|
BinaryBitmap bitmap = new(new HybridBinarizer(source));
|
||||||
|
QRCodeReader reader = new();
|
||||||
|
Result result = reader.decode(bitmap);
|
||||||
|
if (result != null)
|
||||||
{
|
{
|
||||||
int marginLeft = (int)((double)fullImage.Width * i / 2.5 / maxTry);
|
string ret = result.Text;
|
||||||
int marginTop = (int)((double)fullImage.Height * i / 2.5 / maxTry);
|
return ret;
|
||||||
Rectangle cropRect = new(marginLeft, marginTop, fullImage.Width - marginLeft * 2, fullImage.Height - marginTop * 2);
|
|
||||||
Bitmap target = new(screen.Bounds.Width, screen.Bounds.Height);
|
|
||||||
|
|
||||||
double imageScale = (double)screen.Bounds.Width / (double)cropRect.Width;
|
|
||||||
using (Graphics g = Graphics.FromImage(target))
|
|
||||||
{
|
|
||||||
g.DrawImage(fullImage, new Rectangle(0, 0, target.Width, target.Height),
|
|
||||||
cropRect,
|
|
||||||
GraphicsUnit.Pixel);
|
|
||||||
}
|
|
||||||
|
|
||||||
BitmapLuminanceSource source = new(target);
|
|
||||||
BinaryBitmap bitmap = new(new HybridBinarizer(source));
|
|
||||||
QRCodeReader reader = new();
|
|
||||||
Result result = reader.decode(bitmap);
|
|
||||||
if (result != null)
|
|
||||||
{
|
|
||||||
string ret = result.Text;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1220,6 +1236,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; }
|
||||||
|
|
||||||
@@ -201,7 +202,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 +433,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();
|
||||||
@@ -549,7 +554,7 @@ namespace v2rayN.ViewModels
|
|||||||
}
|
}
|
||||||
if (_config.uiItem.enableAutoAdjustMainLvColWidth)
|
if (_config.uiItem.enableAutoAdjustMainLvColWidth)
|
||||||
{
|
{
|
||||||
_updateView("AdjustMainLvColWidth");
|
_updateView(EViewAction.AdjustMainLvColWidth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -563,8 +568,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 +708,7 @@ namespace v2rayN.ViewModels
|
|||||||
|
|
||||||
RefreshServers();
|
RefreshServers();
|
||||||
|
|
||||||
_updateView("ProfilesFocus");
|
_updateView(EViewAction.ProfilesFocus);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ServerFilterChanged(bool c)
|
private void ServerFilterChanged(bool c)
|
||||||
@@ -924,9 +930,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 +960,7 @@ namespace v2rayN.ViewModels
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UI.ShowYesNo(ResUI.RemoveServer) == DialogResult.No)
|
if (UI.ShowYesNo(ResUI.RemoveServer) == MessageBoxResult.No)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -971,11 +978,10 @@ namespace v2rayN.ViewModels
|
|||||||
|
|
||||||
private void RemoveDuplicateServer()
|
private void RemoveDuplicateServer()
|
||||||
{
|
{
|
||||||
int oldCount = _lstProfile.Count;
|
var tuple = ConfigHandler.DedupServerList(_config, _subId);
|
||||||
int newCount = ConfigHandler.DedupServerList(ref _config, ref _lstProfile);
|
|
||||||
RefreshServers();
|
RefreshServers();
|
||||||
Reload();
|
Reload();
|
||||||
_noticeHandler?.Enqueue(string.Format(ResUI.RemoveDuplicateServerResult, oldCount, newCount));
|
_noticeHandler?.Enqueue(string.Format(ResUI.RemoveDuplicateServerResult, tuple.Item1, tuple.Item2));
|
||||||
}
|
}
|
||||||
private void CopyServer()
|
private void CopyServer()
|
||||||
{
|
{
|
||||||
@@ -1069,10 +1075,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)
|
||||||
{
|
{
|
||||||
@@ -1111,7 +1114,7 @@ namespace v2rayN.ViewModels
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetProfileItems(out List<ProfileItem> lstSelecteds, false) < 0)
|
if (GetProfileItems(out List<ProfileItem> lstSelecteds, true) < 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1296,6 +1299,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()
|
||||||
@@ -1303,7 +1324,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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,6 +62,7 @@ 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.userAgent = SelectedSource.userAgent;
|
item.userAgent = SelectedSource.userAgent;
|
||||||
item.sort = SelectedSource.sort;
|
item.sort = SelectedSource.sort;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -137,12 +137,19 @@
|
|||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Style="{StaticResource ToolbarTextBlock}"
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
Text="{x:Static resx:ResUI.TbDisplayLog}" />
|
Text="{x:Static resx:ResUI.TbDisplayLog}" />
|
||||||
<ToggleButton
|
<StackPanel
|
||||||
x:Name="togDisplayLog"
|
|
||||||
Grid.Row="4"
|
Grid.Row="4"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="4"
|
Margin="4"
|
||||||
HorizontalAlignment="Left" />
|
Orientation="Horizontal">
|
||||||
|
<ToggleButton x:Name="togDisplayLog" HorizontalAlignment="Left" />
|
||||||
|
<TextBlock
|
||||||
|
Margin="8,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
|
Text="{x:Static resx:ResUI.TipDisplayLog}" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="5"
|
Grid.Row="5"
|
||||||
@@ -176,7 +183,7 @@
|
|||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Margin="16"
|
Margin="8"
|
||||||
HorizontalAlignment="Center">
|
HorizontalAlignment="Center">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="200" />
|
<ColumnDefinition Width="200" />
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
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.menuServers}"
|
Title="{x:Static resx:ResUI.menuServers}"
|
||||||
Width="800"
|
Width="820"
|
||||||
Height="830"
|
Height="820"
|
||||||
x:TypeArguments="vms:AddServerViewModel"
|
x:TypeArguments="vms:AddServerViewModel"
|
||||||
Background="{DynamicResource MaterialDesignPaper}"
|
Background="{DynamicResource MaterialDesignPaper}"
|
||||||
FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
|
FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
|
||||||
@@ -742,7 +742,7 @@
|
|||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Row="9"
|
Grid.Row="9"
|
||||||
Margin="16"
|
Margin="8"
|
||||||
HorizontalAlignment="Center">
|
HorizontalAlignment="Center">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="200" />
|
<ColumnDefinition Width="200" />
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ namespace v2rayN.Views
|
|||||||
this.Bind(ViewModel, vm => vm.SelectedSource.fingerprint, v => v.cmbFingerprint.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.SelectedSource.fingerprint, v => v.cmbFingerprint.Text).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.SelectedSource.alpn, v => v.cmbAlpn.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.SelectedSource.alpn, v => v.cmbAlpn.Text).DisposeWith(disposables);
|
||||||
//reality
|
//reality
|
||||||
this.Bind(ViewModel, vm => vm.SelectedSource.sni, v => v.txtSNI2.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.SelectedSource.sni, v => v.txtSNI2.Text).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.SelectedSource.fingerprint, v => v.cmbFingerprint2.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.SelectedSource.fingerprint, v => v.cmbFingerprint2.Text).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.SelectedSource.publicKey, v => v.txtPublicKey.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.SelectedSource.publicKey, v => v.txtPublicKey.Text).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.SelectedSource.shortId, v => v.txtShortId.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.SelectedSource.shortId, v => v.txtShortId.Text).DisposeWith(disposables);
|
||||||
|
|||||||
@@ -150,7 +150,7 @@
|
|||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Margin="16"
|
Margin="8"
|
||||||
HorizontalAlignment="Center">
|
HorizontalAlignment="Center">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="150" />
|
<ColumnDefinition Width="150" />
|
||||||
|
|||||||
@@ -10,13 +10,13 @@
|
|||||||
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"
|
||||||
Height="700"
|
Height="700"
|
||||||
MinWidth="800"
|
MinWidth="900"
|
||||||
MinHeight="600"
|
MinHeight="700"
|
||||||
x:TypeArguments="vms:MainWindowViewModel"
|
x:TypeArguments="vms:MainWindowViewModel"
|
||||||
Background="{DynamicResource MaterialDesignPaper}"
|
Background="{DynamicResource MaterialDesignPaper}"
|
||||||
FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
|
FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
|
||||||
@@ -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}"
|
||||||
@@ -378,6 +382,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,7 +496,6 @@
|
|||||||
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"
|
||||||
@@ -615,19 +626,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 +649,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}"
|
||||||
@@ -837,9 +848,10 @@
|
|||||||
Height="Auto"
|
Height="Auto"
|
||||||
Background="{DynamicResource MaterialDesignLightBackground}"
|
Background="{DynamicResource MaterialDesignLightBackground}"
|
||||||
BorderBrush="{DynamicResource MaterialDesignDarkBackground}"
|
BorderBrush="{DynamicResource MaterialDesignDarkBackground}"
|
||||||
BorderThickness="1">
|
BorderThickness="0"
|
||||||
|
CornerRadius="4">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="2"
|
Margin="8"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Foreground="{DynamicResource MaterialDesignDarkBackground}"
|
Foreground="{DynamicResource MaterialDesignDarkBackground}"
|
||||||
|
|||||||
@@ -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,9 +29,11 @@ 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;
|
||||||
lstProfiles.PreviewKeyDown += LstProfiles_PreviewKeyDown;
|
lstProfiles.PreviewKeyDown += LstProfiles_PreviewKeyDown;
|
||||||
lstProfiles.SelectionChanged += lstProfiles_SelectionChanged;
|
lstProfiles.SelectionChanged += lstProfiles_SelectionChanged;
|
||||||
lstProfiles.LoadingRow += LstProfiles_LoadingRow;
|
lstProfiles.LoadingRow += LstProfiles_LoadingRow;
|
||||||
|
lstProfiles.RowHeaderWidth = 30;
|
||||||
if (_config.uiItem.enableDragDropSort)
|
if (_config.uiItem.enableDragDropSort)
|
||||||
{
|
{
|
||||||
lstProfiles.AllowDrop = true;
|
lstProfiles.AllowDrop = true;
|
||||||
@@ -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);
|
||||||
|
|
||||||
@@ -193,11 +194,11 @@ 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)
|
||||||
{
|
{
|
||||||
RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly;
|
RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly;
|
||||||
@@ -206,19 +207,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 +276,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 +396,18 @@ 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region UI
|
#region UI
|
||||||
@@ -420,16 +420,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,8 +439,15 @@ 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)
|
||||||
{
|
{
|
||||||
item2.Width = item.Width;
|
if (item.Width <= 0)
|
||||||
item2.DisplayIndex = i + 1;
|
{
|
||||||
|
item2.Visibility = Visibility.Hidden;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
item2.Width = item.Width;
|
||||||
|
item2.DisplayIndex = i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -471,7 +472,7 @@ namespace v2rayN.Views
|
|||||||
lvColumnItem.Add(new()
|
lvColumnItem.Add(new()
|
||||||
{
|
{
|
||||||
Name = item2.ExName,
|
Name = item2.ExName,
|
||||||
Width = Convert.ToInt32(item2.ActualWidth),
|
Width = item2.Visibility == Visibility.Visible ? Convert.ToInt32(item2.ActualWidth) : 0,
|
||||||
Index = item2.DisplayIndex
|
Index = item2.DisplayIndex
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
TextOptions.TextRenderingMode="Auto"
|
TextOptions.TextRenderingMode="Auto"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<DockPanel Margin="16">
|
<DockPanel Margin="8">
|
||||||
<Grid HorizontalAlignment="Center" DockPanel.Dock="Bottom">
|
<Grid HorizontalAlignment="Center" DockPanel.Dock="Bottom">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="200" />
|
<ColumnDefinition Width="200" />
|
||||||
@@ -753,14 +753,14 @@
|
|||||||
Width="300"
|
Width="300"
|
||||||
Margin="{StaticResource SettingItemMargin}"
|
Margin="{StaticResource SettingItemMargin}"
|
||||||
Style="{StaticResource DefComboBox}" />
|
Style="{StaticResource DefComboBox}" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="18"
|
Grid.Row="18"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="{StaticResource SettingItemMargin}"
|
Margin="{StaticResource SettingItemMargin}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Style="{StaticResource ToolbarTextBlock}"
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
Text="{x:Static resx:ResUI.TbSettingsEnableHWA}"/>
|
Text="{x:Static resx:ResUI.TbSettingsEnableHWA}" />
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Name="togEnableHWA"
|
x:Name="togEnableHWA"
|
||||||
Grid.Row="18"
|
Grid.Row="18"
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -210,7 +211,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();
|
||||||
|
|
||||||
|
|||||||
@@ -134,7 +134,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
Margin="16"
|
Margin="8"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
DockPanel.Dock="Bottom">
|
DockPanel.Dock="Bottom">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
</ToolBarTray>
|
</ToolBarTray>
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
Margin="16"
|
Margin="8"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
DockPanel.Dock="Bottom">
|
DockPanel.Dock="Bottom">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|
||||||
|
|||||||
@@ -114,7 +114,7 @@
|
|||||||
</ToolBarTray>
|
</ToolBarTray>
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
Margin="16"
|
Margin="8"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
DockPanel.Dock="Bottom">
|
DockPanel.Dock="Bottom">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -202,7 +202,7 @@
|
|||||||
<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}"
|
||||||
|
|||||||
@@ -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"
|
||||||
@@ -45,6 +53,7 @@
|
|||||||
<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 +101,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"
|
||||||
@@ -162,7 +196,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Margin="16"
|
Margin="8"
|
||||||
HorizontalAlignment="Center">
|
HorizontalAlignment="Center">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="200" />
|
<ColumnDefinition Width="200" />
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ 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.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);
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
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
|
||||||
|
|||||||
@@ -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.18</FileVersion>
|
<FileVersion>6.21</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Downloader" Version="3.0.3" />
|
<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