Compare commits
54 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
593313a684 | ||
|
|
c71caec9df | ||
|
|
89bc92b98e | ||
|
|
17dec098cd | ||
|
|
4e38ec8f57 | ||
|
|
eda7b1789a | ||
|
|
db2510fac5 | ||
|
|
e354dad70b | ||
|
|
02607e116e | ||
|
|
932fd330ce | ||
|
|
c9c0dc9b5b | ||
|
|
2b3e29f3d1 | ||
|
|
b83b624dc3 | ||
|
|
1d3832f562 | ||
|
|
daa358a0ca | ||
|
|
ecf1be42ee | ||
|
|
3d6afe50e3 | ||
|
|
5a386c2802 | ||
|
|
6dddaa03ae | ||
|
|
643a8094a6 | ||
|
|
a62f375f5b | ||
|
|
a498578c17 | ||
|
|
7cf6ab4b51 | ||
|
|
dda920e33e | ||
|
|
ae296fced8 | ||
|
|
cdf381ce41 | ||
|
|
195828cee1 | ||
|
|
cc3560ab29 | ||
|
|
c975896c5e | ||
|
|
627e4513f3 | ||
|
|
c4c05bfafd | ||
|
|
31fb479459 | ||
|
|
1b0e3b3575 | ||
|
|
6206c81546 | ||
|
|
e09210e6c3 | ||
|
|
4089cc5cf0 | ||
|
|
2c6b2f8065 | ||
|
|
112273036b | ||
|
|
df5b55b14f | ||
|
|
40bb7a5ea1 | ||
|
|
cf5b0cbd06 | ||
|
|
504a6c5d89 | ||
|
|
a33e586ff4 | ||
|
|
a1d579e1ec | ||
|
|
59a9fc9a3d | ||
|
|
194d9a0abc | ||
|
|
5566df791c | ||
|
|
1ca416bacf | ||
|
|
97d7229974 | ||
|
|
6a0bfc43dd | ||
|
|
732da0c330 | ||
|
|
012bb5654b | ||
|
|
068fe3113b | ||
|
|
4a74102eb7 |
37
v2rayN/v2rayN/Forms/MainForm.Designer.cs
generated
37
v2rayN/v2rayN/Forms/MainForm.Designer.cs
generated
@@ -70,6 +70,8 @@
|
||||
this.menuGlobalPAC = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuKeep = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuKeepPAC = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuKeepNothing = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuKeepPACNothing = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuServers = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuAddServers2 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuScanScreen2 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -107,10 +109,12 @@
|
||||
this.tsbCheckUpdateN = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tsbCheckUpdateCore = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tsbCheckUpdatePACList = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.tsbCheckClearPACList = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.tsbHelp = new System.Windows.Forms.ToolStripDropDownButton();
|
||||
this.tsbAbout = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tsbV2rayWebsite = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.tsbLanguageDef = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tsbLanguageZhHans = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -398,7 +402,9 @@
|
||||
this.menuGlobal,
|
||||
this.menuGlobalPAC,
|
||||
this.menuKeep,
|
||||
this.menuKeepPAC});
|
||||
this.menuKeepPAC,
|
||||
this.menuKeepNothing,
|
||||
this.menuKeepPACNothing});
|
||||
this.menuSysAgentMode.Name = "menuSysAgentMode";
|
||||
resources.ApplyResources(this.menuSysAgentMode, "menuSysAgentMode");
|
||||
//
|
||||
@@ -432,6 +438,18 @@
|
||||
resources.ApplyResources(this.menuKeepPAC, "menuKeepPAC");
|
||||
this.menuKeepPAC.Click += new System.EventHandler(this.menuKeepPAC_Click);
|
||||
//
|
||||
// menuKeepNothing
|
||||
//
|
||||
this.menuKeepNothing.Name = "menuKeepNothing";
|
||||
resources.ApplyResources(this.menuKeepNothing, "menuKeepNothing");
|
||||
this.menuKeepNothing.Click += new System.EventHandler(this.menuKeepNothing_Click);
|
||||
//
|
||||
// menuKeepPACNothing
|
||||
//
|
||||
this.menuKeepPACNothing.Name = "menuKeepPACNothing";
|
||||
resources.ApplyResources(this.menuKeepPACNothing, "menuKeepPACNothing");
|
||||
this.menuKeepPACNothing.Click += new System.EventHandler(this.menuKeepPACNothing_Click);
|
||||
//
|
||||
// menuServers
|
||||
//
|
||||
this.menuServers.Name = "menuServers";
|
||||
@@ -659,6 +677,7 @@
|
||||
this.tsbCheckUpdateN,
|
||||
this.tsbCheckUpdateCore,
|
||||
this.tsbCheckUpdatePACList,
|
||||
this.toolStripSeparator13,
|
||||
this.tsbCheckClearPACList});
|
||||
this.tsbCheckUpdate.Image = global::v2rayN.Properties.Resources.checkupdate;
|
||||
resources.ApplyResources(this.tsbCheckUpdate, "tsbCheckUpdate");
|
||||
@@ -682,6 +701,11 @@
|
||||
resources.ApplyResources(this.tsbCheckUpdatePACList, "tsbCheckUpdatePACList");
|
||||
this.tsbCheckUpdatePACList.Click += new System.EventHandler(this.tsbCheckUpdatePACList_Click);
|
||||
//
|
||||
// toolStripSeparator13
|
||||
//
|
||||
this.toolStripSeparator13.Name = "toolStripSeparator13";
|
||||
resources.ApplyResources(this.toolStripSeparator13, "toolStripSeparator13");
|
||||
//
|
||||
// tsbCheckClearPACList
|
||||
//
|
||||
this.tsbCheckClearPACList.Name = "tsbCheckClearPACList";
|
||||
@@ -697,6 +721,7 @@
|
||||
//
|
||||
this.tsbHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.tsbAbout,
|
||||
this.tsbV2rayWebsite,
|
||||
this.toolStripSeparator12,
|
||||
this.tsbLanguageDef,
|
||||
this.tsbLanguageZhHans});
|
||||
@@ -710,6 +735,12 @@
|
||||
resources.ApplyResources(this.tsbAbout, "tsbAbout");
|
||||
this.tsbAbout.Click += new System.EventHandler(this.tsbAbout_Click);
|
||||
//
|
||||
// tsbV2rayWebsite
|
||||
//
|
||||
this.tsbV2rayWebsite.Name = "tsbV2rayWebsite";
|
||||
resources.ApplyResources(this.tsbV2rayWebsite, "tsbV2rayWebsite");
|
||||
this.tsbV2rayWebsite.Click += new System.EventHandler(this.tsbV2rayWebsite_Click);
|
||||
//
|
||||
// toolStripSeparator12
|
||||
//
|
||||
this.toolStripSeparator12.Name = "toolStripSeparator12";
|
||||
@@ -869,6 +900,10 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem menuTcpingServer;
|
||||
private System.Windows.Forms.ToolStripMenuItem menuRealPingServer;
|
||||
private System.Windows.Forms.ToolStripMenuItem menuNotEnabledHttp;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator13;
|
||||
private System.Windows.Forms.ToolStripMenuItem tsbV2rayWebsite;
|
||||
private System.Windows.Forms.ToolStripMenuItem menuKeepNothing;
|
||||
private System.Windows.Forms.ToolStripMenuItem menuKeepPACNothing;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -167,10 +167,10 @@ namespace v2rayN.Forms
|
||||
|
||||
if (statistics != null && statistics.Enable)
|
||||
{
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTotalUploadDataAmount"), 70, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTotalDownloadDataAmount"), 70, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTodayUploadDataAmount"), 70, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTodayDownloadDataAmount"), 70, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTodayUploadDataAmount"), 70, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTotalDownloadDataAmount"), 70, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTotalUploadDataAmount"), 70, HorizontalAlignment.Left);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,13 +198,13 @@ namespace v2rayN.Forms
|
||||
ListViewItem lvItem = null;
|
||||
if (statistics != null && statistics.Enable)
|
||||
{
|
||||
var index = statistics.Statistic.FindIndex(item_ => item_.itemId == item.getItemId());
|
||||
if (index != -1)
|
||||
var sItem = statistics.Statistic.Find(item_ => item_.itemId == item.getItemId());
|
||||
if (sItem != null)
|
||||
{
|
||||
totalUp = Utils.HumanFy(statistics.Statistic[index].totalUp);
|
||||
totalDown = Utils.HumanFy(statistics.Statistic[index].totalDown);
|
||||
todayUp = Utils.HumanFy(statistics.Statistic[index].todayUp);
|
||||
todayDown = Utils.HumanFy(statistics.Statistic[index].todayDown);
|
||||
totalUp = Utils.HumanFy(sItem.totalUp);
|
||||
totalDown = Utils.HumanFy(sItem.totalDown);
|
||||
todayUp = Utils.HumanFy(sItem.todayUp);
|
||||
todayDown = Utils.HumanFy(sItem.todayDown);
|
||||
}
|
||||
|
||||
lvItem = new ListViewItem(new string[]
|
||||
@@ -220,10 +220,10 @@ namespace v2rayN.Forms
|
||||
item.network,
|
||||
item.getSubRemarks(config),
|
||||
item.testResult,
|
||||
totalUp,
|
||||
totalDown,
|
||||
todayDown,
|
||||
todayUp,
|
||||
todayDown
|
||||
totalDown,
|
||||
totalUp
|
||||
});
|
||||
}
|
||||
else
|
||||
@@ -241,10 +241,6 @@ namespace v2rayN.Forms
|
||||
item.network,
|
||||
item.getSubRemarks(config),
|
||||
item.testResult
|
||||
//totalUp,
|
||||
//totalDown,
|
||||
//todayUp,
|
||||
//todayDown,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -324,14 +320,14 @@ namespace v2rayN.Forms
|
||||
{
|
||||
toolSslSocksPort.Text =
|
||||
toolSslHttpPort.Text =
|
||||
toolSslPacPort.Text = "NONE";
|
||||
toolSslPacPort.Text = "OFF";
|
||||
|
||||
toolSslSocksPort.Text = $"{Global.Loopback}:{config.inbound[0].localPort}";
|
||||
|
||||
if (config.listenerType != 0)
|
||||
{
|
||||
toolSslHttpPort.Text = $"{Global.Loopback}:{Global.httpPort}";
|
||||
if (config.listenerType == 2 || config.listenerType == 4)
|
||||
if (config.listenerType % 2 == 0)
|
||||
{
|
||||
if (PACServerHandle.IsRunning)
|
||||
{
|
||||
@@ -363,6 +359,8 @@ namespace v2rayN.Forms
|
||||
/// </summary>
|
||||
private void LoadV2ray()
|
||||
{
|
||||
tsbReload.Enabled = false;
|
||||
|
||||
if (Global.reloadV2ray)
|
||||
{
|
||||
ClearMsg();
|
||||
@@ -373,6 +371,8 @@ namespace v2rayN.Forms
|
||||
statistics?.SaveToFile();
|
||||
|
||||
ChangePACButtonStatus(config.listenerType);
|
||||
|
||||
tsbReload.Enabled = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -473,6 +473,12 @@ namespace v2rayN.Forms
|
||||
case Keys.A:
|
||||
menuSelectAll_Click(null, null);
|
||||
break;
|
||||
case Keys.C:
|
||||
menuExport2ShareUrl_Click(null, null);
|
||||
break;
|
||||
case Keys.V:
|
||||
menuAddServers_Click(null, null);
|
||||
break;
|
||||
case Keys.P:
|
||||
menuPingServer_Click(null, null);
|
||||
break;
|
||||
@@ -482,11 +488,16 @@ namespace v2rayN.Forms
|
||||
case Keys.R:
|
||||
menuRealPingServer_Click(null, null);
|
||||
break;
|
||||
case Keys.S:
|
||||
menuScanScreen_Click(null, null);
|
||||
break;
|
||||
case Keys.T:
|
||||
menuSpeedServer_Click(null, null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (e.KeyCode)
|
||||
{
|
||||
case Keys.Enter:
|
||||
@@ -495,6 +506,12 @@ namespace v2rayN.Forms
|
||||
case Keys.Delete:
|
||||
menuRemoveServer_Click(null, null);
|
||||
break;
|
||||
case Keys.T:
|
||||
menuMoveTop_Click(null, null);
|
||||
break;
|
||||
case Keys.B:
|
||||
menuMoveBottom_Click(null, null);
|
||||
break;
|
||||
case Keys.U:
|
||||
menuMoveUp_Click(null, null);
|
||||
break;
|
||||
@@ -503,6 +520,7 @@ namespace v2rayN.Forms
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void menuAddVmessServer_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -542,6 +560,8 @@ namespace v2rayN.Forms
|
||||
{
|
||||
List<Mode.VmessItem> servers = null;
|
||||
Utils.DedupServerList(config.vmess, out servers);
|
||||
int oldCount = config.vmess.Count;
|
||||
int newCount = servers.Count;
|
||||
if (servers != null)
|
||||
{
|
||||
config.vmess = servers;
|
||||
@@ -549,6 +569,7 @@ namespace v2rayN.Forms
|
||||
//刷新
|
||||
RefreshServers();
|
||||
LoadV2ray();
|
||||
UI.Show(string.Format(UIRes.I18N("RemoveDuplicateServerResult"), oldCount, newCount));
|
||||
}
|
||||
|
||||
private void menuCopyServer_Click(object sender, EventArgs e)
|
||||
@@ -634,9 +655,9 @@ namespace v2rayN.Forms
|
||||
GetLvSelectedIndex();
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int k = 0; k < lvSelecteds.Count; k++)
|
||||
foreach (int v in lvSelecteds)
|
||||
{
|
||||
string url = ConfigHandler.GetVmessQRCode(config, lvSelecteds[k]);
|
||||
string url = ConfigHandler.GetVmessQRCode(config, v);
|
||||
if (Utils.IsNullOrEmpty(url))
|
||||
{
|
||||
continue;
|
||||
@@ -647,7 +668,8 @@ namespace v2rayN.Forms
|
||||
if (sb.Length > 0)
|
||||
{
|
||||
Utils.SetClipboardData(sb.ToString());
|
||||
UI.Show(UIRes.I18N("BatchExportURLSuccessfully"));
|
||||
AppendText(false, UIRes.I18N("BatchExportURLSuccessfully"));
|
||||
//UI.Show(UIRes.I18N("BatchExportURLSuccessfully"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -656,9 +678,9 @@ namespace v2rayN.Forms
|
||||
GetLvSelectedIndex();
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int k = 0; k < lvSelecteds.Count; k++)
|
||||
foreach (int v in lvSelecteds)
|
||||
{
|
||||
string url = ConfigHandler.GetVmessQRCode(config, lvSelecteds[k]);
|
||||
string url = ConfigHandler.GetVmessQRCode(config, v);
|
||||
if (Utils.IsNullOrEmpty(url))
|
||||
{
|
||||
continue;
|
||||
@@ -681,6 +703,7 @@ namespace v2rayN.Forms
|
||||
//刷新
|
||||
RefreshServers();
|
||||
LoadV2ray();
|
||||
HttpProxyHandle.RestartHttpAgent(config, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -805,9 +828,10 @@ namespace v2rayN.Forms
|
||||
private void menuAddServers_Click(object sender, EventArgs e)
|
||||
{
|
||||
string clipboardData = Utils.GetClipboardData();
|
||||
if (AddBatchServers(clipboardData) == 0)
|
||||
int result = AddBatchServers(clipboardData);
|
||||
if (result > 0)
|
||||
{
|
||||
UI.Show(UIRes.I18N("SuccessfullyImportedServerViaClipboard"));
|
||||
UI.Show(string.Format(UIRes.I18N("SuccessfullyImportedServerViaClipboard"), result));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -819,16 +843,19 @@ namespace v2rayN.Forms
|
||||
|
||||
private int AddBatchServers(string clipboardData, string subid = "")
|
||||
{
|
||||
if (ConfigHandler.AddBatchServers(ref config, clipboardData, subid) != 0)
|
||||
int counter;
|
||||
int _Add()
|
||||
{
|
||||
return ConfigHandler.AddBatchServers(ref config, clipboardData, subid);
|
||||
}
|
||||
counter = _Add();
|
||||
if (counter < 1)
|
||||
{
|
||||
clipboardData = Utils.Base64Decode(clipboardData);
|
||||
if (ConfigHandler.AddBatchServers(ref config, clipboardData, subid) != 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
counter = _Add();
|
||||
}
|
||||
RefreshServers();
|
||||
return 0;
|
||||
return counter;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -966,9 +993,9 @@ namespace v2rayN.Forms
|
||||
}
|
||||
private void ClearTestResult()
|
||||
{
|
||||
for (int k = 0; k < config.vmess.Count; k++)
|
||||
foreach (int s in lvSelecteds)
|
||||
{
|
||||
SetTestResult(k, "");
|
||||
SetTestResult(s, "");
|
||||
}
|
||||
}
|
||||
private void UpdateSpeedtestHandler(int index, string msg)
|
||||
@@ -1002,10 +1029,10 @@ namespace v2rayN.Forms
|
||||
lvServers.SuspendLayout();
|
||||
|
||||
var indexStart = 9;
|
||||
lvServers.Items[i].SubItems[indexStart++].Text = Utils.HumanFy(statistics[index].totalUp);
|
||||
lvServers.Items[i].SubItems[indexStart++].Text = Utils.HumanFy(statistics[index].totalDown);
|
||||
lvServers.Items[i].SubItems[indexStart++].Text = Utils.HumanFy(statistics[index].todayUp);
|
||||
lvServers.Items[i].SubItems[indexStart++].Text = Utils.HumanFy(statistics[index].todayDown);
|
||||
lvServers.Items[i].SubItems[indexStart++].Text = Utils.HumanFy(statistics[index].todayUp);
|
||||
lvServers.Items[i].SubItems[indexStart++].Text = Utils.HumanFy(statistics[index].totalDown);
|
||||
lvServers.Items[i].SubItems[indexStart++].Text = Utils.HumanFy(statistics[index].totalUp);
|
||||
|
||||
lvServers.ResumeLayout();
|
||||
});
|
||||
@@ -1052,7 +1079,7 @@ namespace v2rayN.Forms
|
||||
}
|
||||
if (ConfigHandler.MoveServer(ref config, index, eMove) == 0)
|
||||
{
|
||||
//刷新
|
||||
//TODO: reload is not good.
|
||||
RefreshServers();
|
||||
LoadV2ray();
|
||||
}
|
||||
@@ -1078,27 +1105,30 @@ namespace v2rayN.Forms
|
||||
{
|
||||
SetListenerType(0);
|
||||
}
|
||||
|
||||
private void menuGlobal_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetListenerType(1);
|
||||
}
|
||||
|
||||
private void menuGlobalPAC_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetListenerType(2);
|
||||
}
|
||||
|
||||
private void menuKeep_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetListenerType(3);
|
||||
}
|
||||
|
||||
private void menuKeepPAC_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetListenerType(4);
|
||||
}
|
||||
|
||||
private void menuKeepNothing_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetListenerType(5);
|
||||
}
|
||||
private void menuKeepPACNothing_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetListenerType(6);
|
||||
}
|
||||
private void SetListenerType(int type)
|
||||
{
|
||||
config.listenerType = type;
|
||||
@@ -1195,7 +1225,7 @@ namespace v2rayN.Forms
|
||||
}
|
||||
|
||||
AppendText(false, UIRes.I18N("MsgStartUpdatingV2rayCore"));
|
||||
downloadHandle.AbsoluteV2rayN(config);
|
||||
downloadHandle.CheckUpdateAsync("v2rayN");
|
||||
}
|
||||
|
||||
private void tsbCheckUpdateCore_Click(object sender, EventArgs e)
|
||||
@@ -1268,7 +1298,7 @@ namespace v2rayN.Forms
|
||||
}
|
||||
|
||||
AppendText(false, UIRes.I18N("MsgStartUpdatingV2rayCore"));
|
||||
downloadHandle.AbsoluteV2rayCore(config);
|
||||
downloadHandle.CheckUpdateAsync("Core");
|
||||
}
|
||||
|
||||
private void tsbCheckUpdatePACList_Click(object sender, EventArgs e)
|
||||
@@ -1352,7 +1382,7 @@ namespace v2rayN.Forms
|
||||
}
|
||||
else
|
||||
{
|
||||
if (AddBatchServers(result) == 0)
|
||||
if (AddBatchServers(result) > 0)
|
||||
{
|
||||
UI.Show(UIRes.I18N("SuccessfullyImportedServerViaScan"));
|
||||
}
|
||||
@@ -1412,7 +1442,7 @@ namespace v2rayN.Forms
|
||||
ConfigHandler.RemoveServerViaSubid(ref config, id);
|
||||
AppendText(false, $"{hashCode}{UIRes.I18N("MsgClearSubscription")}");
|
||||
RefreshServers();
|
||||
if (AddBatchServers(result, id) == 0)
|
||||
if (AddBatchServers(result, id) > 0)
|
||||
{
|
||||
}
|
||||
else
|
||||
@@ -1452,10 +1482,15 @@ namespace v2rayN.Forms
|
||||
private void SetCurrentLanguage(string value)
|
||||
{
|
||||
Utils.RegWriteValue(Global.MyRegPath, Global.MyRegKeyLanguage, value);
|
||||
Application.Restart();
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
private void tsbV2rayWebsite_Click(object sender, EventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start(Global.v2rayWebsiteUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,154 +129,154 @@
|
||||
<value>327, 17</value>
|
||||
</metadata>
|
||||
<data name="menuAddVmessServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuAddVmessServer.Text" xml:space="preserve">
|
||||
<value>Add [VMess] server</value>
|
||||
</data>
|
||||
<data name="menuAddShadowsocksServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuAddShadowsocksServer.Text" xml:space="preserve">
|
||||
<value>Add [Shadowsocks] server</value>
|
||||
</data>
|
||||
<data name="menuAddSocksServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuAddSocksServer.Text" xml:space="preserve">
|
||||
<value>Add [Socks] server</value>
|
||||
</data>
|
||||
<data name="menuAddCustomServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuAddCustomServer.Text" xml:space="preserve">
|
||||
<value>Add a custom configuration server</value>
|
||||
</data>
|
||||
<data name="menuAddServers.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuAddServers.Text" xml:space="preserve">
|
||||
<value>Import bulk URL from clipboard</value>
|
||||
<value>Import bulk URL from clipboard (Ctrl+V)</value>
|
||||
</data>
|
||||
<data name="menuScanScreen.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuScanScreen.Text" xml:space="preserve">
|
||||
<value>Scan QR code on the screen</value>
|
||||
<value>Scan QR code on the screen (Ctrl+S)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>444, 6</value>
|
||||
<value>352, 6</value>
|
||||
</data>
|
||||
<data name="menuRemoveServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuRemoveServer.Text" xml:space="preserve">
|
||||
<value>Remove selected server (multiple choice) (Delete)</value>
|
||||
<value>Remove selected servers (Delete)</value>
|
||||
</data>
|
||||
<data name="menuRemoveDuplicateServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuRemoveDuplicateServer.Text" xml:space="preserve">
|
||||
<value>Remove duplicate server</value>
|
||||
<value>Remove duplicate servers</value>
|
||||
</data>
|
||||
<data name="menuCopyServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuCopyServer.Text" xml:space="preserve">
|
||||
<value>Copy selected server</value>
|
||||
<value>Clone selected server</value>
|
||||
</data>
|
||||
<data name="menuSetDefaultServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuSetDefaultServer.Text" xml:space="preserve">
|
||||
<value>Set as active server (Enter)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>444, 6</value>
|
||||
<value>352, 6</value>
|
||||
</data>
|
||||
<data name="menuMoveTop.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuMoveTop.Text" xml:space="preserve">
|
||||
<value>Up to top</value>
|
||||
<value>Move to top (T)</value>
|
||||
</data>
|
||||
<data name="menuMoveUp.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuMoveUp.Text" xml:space="preserve">
|
||||
<value>Upward (U)</value>
|
||||
<value>Up (U)</value>
|
||||
</data>
|
||||
<data name="menuMoveDown.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuMoveDown.Text" xml:space="preserve">
|
||||
<value>Down (D)</value>
|
||||
</data>
|
||||
<data name="menuMoveBottom.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuMoveBottom.Text" xml:space="preserve">
|
||||
<value>Moves down to the bottom</value>
|
||||
<value>Move to bottom (B)</value>
|
||||
</data>
|
||||
<data name="menuSelectAll.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuSelectAll.Text" xml:space="preserve">
|
||||
<value>Select All (Ctrl+A)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator9.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>444, 6</value>
|
||||
<value>352, 6</value>
|
||||
</data>
|
||||
<data name="menuPingServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuPingServer.Text" xml:space="preserve">
|
||||
<value>Test server ping (multiple choice)(Ctrl+P)</value>
|
||||
<value>Test servers ping (Ctrl+P)</value>
|
||||
</data>
|
||||
<data name="menuTcpingServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuTcpingServer.Text" xml:space="preserve">
|
||||
<value>Test server tcping (multiple choice)(Ctrl+O)</value>
|
||||
<value>Test servers with tcping (Ctrl+O)</value>
|
||||
</data>
|
||||
<data name="menuRealPingServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuRealPingServer.Text" xml:space="preserve">
|
||||
<value>Test server real ping (multiple choice)(Ctrl+R)</value>
|
||||
<value>Test servers real delay (Ctrl+R)</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer.Text" xml:space="preserve">
|
||||
<value>Test server speed (multiple choice)(Ctrl+T)</value>
|
||||
<value>Test servers download speed (Ctrl+T)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>444, 6</value>
|
||||
<value>352, 6</value>
|
||||
</data>
|
||||
<data name="menuExport2ClientConfig.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuExport2ClientConfig.Text" xml:space="preserve">
|
||||
<value>Export selected server for client configuration</value>
|
||||
</data>
|
||||
<data name="menuExport2ServerConfig.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuExport2ServerConfig.Text" xml:space="preserve">
|
||||
<value>Export selected server for server configuration</value>
|
||||
</data>
|
||||
<data name="menuExport2ShareUrl.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuExport2ShareUrl.Text" xml:space="preserve">
|
||||
<value>Batch export share URL to clipboard (multiple choice)</value>
|
||||
<value>Export share URLs to clipboard (Ctrl+C)</value>
|
||||
</data>
|
||||
<data name="menuExport2SubContent.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuExport2SubContent.Text" xml:space="preserve">
|
||||
<value>Batch export subscription content to clipboard (multiple choice)</value>
|
||||
<value>Export subscription (base64) share to clipboard</value>
|
||||
</data>
|
||||
<data name="tsbServer.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
|
||||
<value>Magenta</value>
|
||||
@@ -291,7 +291,7 @@
|
||||
<value>ImageAboveText</value>
|
||||
</data>
|
||||
<data name="cmsLv.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>448, 534</value>
|
||||
<value>356, 534</value>
|
||||
</data>
|
||||
<data name=">>cmsLv.Name" xml:space="preserve">
|
||||
<value>cmsLv</value>
|
||||
@@ -423,34 +423,46 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="menuNotEnabledHttp.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 22</value>
|
||||
<value>411, 22</value>
|
||||
</data>
|
||||
<data name="menuNotEnabledHttp.Text" xml:space="preserve">
|
||||
<value>Not Enabled Http Proxy</value>
|
||||
</data>
|
||||
<data name="menuGlobal.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 22</value>
|
||||
<value>411, 22</value>
|
||||
</data>
|
||||
<data name="menuGlobal.Text" xml:space="preserve">
|
||||
<value>Open Http proxy and automatically configure proxy server (global mode)</value>
|
||||
<value>Open Http proxy and set the system proxy (global mode)</value>
|
||||
</data>
|
||||
<data name="menuGlobalPAC.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 22</value>
|
||||
<value>411, 22</value>
|
||||
</data>
|
||||
<data name="menuGlobalPAC.Text" xml:space="preserve">
|
||||
<value>Open PAC and automatically configure PAC (PAC mode)</value>
|
||||
<value>Open PAC and set the system proxy (PAC mode)</value>
|
||||
</data>
|
||||
<data name="menuKeep.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 22</value>
|
||||
<value>411, 22</value>
|
||||
</data>
|
||||
<data name="menuKeep.Text" xml:space="preserve">
|
||||
<value>Only open Http proxy, do not automatically configure proxy server (direct mode)</value>
|
||||
<value>Only open Http proxy and clear the proxy settings</value>
|
||||
</data>
|
||||
<data name="menuKeepPAC.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 22</value>
|
||||
<value>411, 22</value>
|
||||
</data>
|
||||
<data name="menuKeepPAC.Text" xml:space="preserve">
|
||||
<value>Only open PAC, do not automatically configure PAC</value>
|
||||
<value>Only open PAC and clear the proxy settings</value>
|
||||
</data>
|
||||
<data name="menuKeepNothing.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>411, 22</value>
|
||||
</data>
|
||||
<data name="menuKeepNothing.Text" xml:space="preserve">
|
||||
<value>Only open Http proxy and do nothing</value>
|
||||
</data>
|
||||
<data name="menuKeepPACNothing.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>411, 22</value>
|
||||
</data>
|
||||
<data name="menuKeepPACNothing.Text" xml:space="preserve">
|
||||
<value>Only open PAC and do nothing</value>
|
||||
</data>
|
||||
<data name="menuSysAgentMode.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>264, 22</value>
|
||||
@@ -492,7 +504,7 @@
|
||||
<value>Exit</value>
|
||||
</data>
|
||||
<data name="cmsMain.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>265, 142</value>
|
||||
<value>265, 164</value>
|
||||
</data>
|
||||
<data name=">>cmsMain.Name" xml:space="preserve">
|
||||
<value>cmsMain</value>
|
||||
@@ -522,7 +534,7 @@
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="groupBox1.Text" xml:space="preserve">
|
||||
<value>Server list</value>
|
||||
<value>Servers list</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Name" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
@@ -576,10 +588,10 @@
|
||||
<value>微软雅黑, 8pt</value>
|
||||
</data>
|
||||
<data name="toolSslSocksPortLab.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>49, 17</value>
|
||||
<value>52, 17</value>
|
||||
</data>
|
||||
<data name="toolSslSocksPortLab.Text" xml:space="preserve">
|
||||
<value>SOCKS5</value>
|
||||
<value>SOCKS5:</value>
|
||||
</data>
|
||||
<data name="toolSslSocksPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>0, 17</value>
|
||||
@@ -588,16 +600,16 @@
|
||||
<value>微软雅黑, 8pt</value>
|
||||
</data>
|
||||
<data name="toolSslBlank1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>198, 17</value>
|
||||
<value>195, 17</value>
|
||||
</data>
|
||||
<data name="toolSslHttpPortLab.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>微软雅黑, 8pt</value>
|
||||
</data>
|
||||
<data name="toolSslHttpPortLab.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>36, 17</value>
|
||||
<value>39, 17</value>
|
||||
</data>
|
||||
<data name="toolSslHttpPortLab.Text" xml:space="preserve">
|
||||
<value>HTTP</value>
|
||||
<value>HTTP:</value>
|
||||
</data>
|
||||
<data name="toolSslHttpPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>0, 17</value>
|
||||
@@ -606,16 +618,16 @@
|
||||
<value>微软雅黑, 8pt</value>
|
||||
</data>
|
||||
<data name="toolSslBlank2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>198, 17</value>
|
||||
<value>195, 17</value>
|
||||
</data>
|
||||
<data name="toolSslPacPortLab.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>微软雅黑, 8pt</value>
|
||||
</data>
|
||||
<data name="toolSslPacPortLab.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>30, 17</value>
|
||||
<value>33, 17</value>
|
||||
</data>
|
||||
<data name="toolSslPacPortLab.Text" xml:space="preserve">
|
||||
<value>PAC</value>
|
||||
<value>PAC:</value>
|
||||
</data>
|
||||
<data name="toolSslPacPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>0, 17</value>
|
||||
@@ -624,7 +636,7 @@
|
||||
<value>微软雅黑, 8pt</value>
|
||||
</data>
|
||||
<data name="toolSslBlank3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>198, 17</value>
|
||||
<value>195, 17</value>
|
||||
</data>
|
||||
<data name="toolSslServerSpeed.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
@@ -684,7 +696,7 @@
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="groupBox2.Text" xml:space="preserve">
|
||||
<value>Information</value>
|
||||
<value>Informations</value>
|
||||
</data>
|
||||
<data name=">>groupBox2.Name" xml:space="preserve">
|
||||
<value>groupBox2</value>
|
||||
@@ -729,25 +741,25 @@
|
||||
<value>6, 56</value>
|
||||
</data>
|
||||
<data name="tsbSubSetting.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>197, 22</value>
|
||||
<value>125, 22</value>
|
||||
</data>
|
||||
<data name="tsbSubSetting.Text" xml:space="preserve">
|
||||
<value>Subscription settings</value>
|
||||
<value>Settings</value>
|
||||
</data>
|
||||
<data name="tsbSubUpdate.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>197, 22</value>
|
||||
<value>125, 22</value>
|
||||
</data>
|
||||
<data name="tsbSubUpdate.Text" xml:space="preserve">
|
||||
<value>Update subscription</value>
|
||||
<value>Updates</value>
|
||||
</data>
|
||||
<data name="tsbSub.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
|
||||
<value>Magenta</value>
|
||||
</data>
|
||||
<data name="tsbSub.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>93, 53</value>
|
||||
<value>99, 53</value>
|
||||
</data>
|
||||
<data name="tsbSub.Text" xml:space="preserve">
|
||||
<value>Subscription</value>
|
||||
<value>Subscriptions</value>
|
||||
</data>
|
||||
<data name="tsbSub.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
||||
<value>ImageAboveText</value>
|
||||
@@ -759,10 +771,10 @@
|
||||
<value>Magenta</value>
|
||||
</data>
|
||||
<data name="tsbOptionSetting.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>52, 53</value>
|
||||
<value>58, 53</value>
|
||||
</data>
|
||||
<data name="tsbOptionSetting.Text" xml:space="preserve">
|
||||
<value>Setting</value>
|
||||
<value>Settings</value>
|
||||
</data>
|
||||
<data name="tsbOptionSetting.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
||||
<value>ImageAboveText</value>
|
||||
@@ -788,10 +800,10 @@
|
||||
<value>Magenta</value>
|
||||
</data>
|
||||
<data name="tsbReload.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>97, 53</value>
|
||||
<value>98, 53</value>
|
||||
</data>
|
||||
<data name="tsbReload.Text" xml:space="preserve">
|
||||
<value>Restart service</value>
|
||||
<value>Restart Service</value>
|
||||
</data>
|
||||
<data name="tsbReload.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
||||
<value>ImageAboveText</value>
|
||||
@@ -800,31 +812,31 @@
|
||||
<value>6, 56</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdateN.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>338, 22</value>
|
||||
<value>393, 22</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdateN.Text" xml:space="preserve">
|
||||
<value>Check for updates to v2rayN</value>
|
||||
<value>v2rayN (this software)</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdateCore.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>338, 22</value>
|
||||
<value>393, 22</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdateCore.Text" xml:space="preserve">
|
||||
<value>Check for updates to v2rayCore</value>
|
||||
<value>Update v2rayCore</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdatePACList.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>338, 22</value>
|
||||
<value>393, 22</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdatePACList.Text" xml:space="preserve">
|
||||
<value>Check for updated PAC (requires Http proxy)</value>
|
||||
<value>Check for updated PAC (need the HTTP proxy are ON)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator13.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>390, 6</value>
|
||||
</data>
|
||||
<data name="tsbCheckClearPACList.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>338, 22</value>
|
||||
<value>393, 22</value>
|
||||
</data>
|
||||
<data name="tsbCheckClearPACList.Text" xml:space="preserve">
|
||||
<value>Simplify PAC (please set Core route)</value>
|
||||
</data>
|
||||
<data name="tsbCheckClearPACList.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
<value>Simplify PAC (need to set Core route)</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdate.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
|
||||
<value>Magenta</value>
|
||||
@@ -845,7 +857,13 @@
|
||||
<value>187, 22</value>
|
||||
</data>
|
||||
<data name="tsbAbout.Text" xml:space="preserve">
|
||||
<value>About</value>
|
||||
<value>v2rayN Project</value>
|
||||
</data>
|
||||
<data name="tsbV2rayWebsite.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>187, 22</value>
|
||||
</data>
|
||||
<data name="tsbV2rayWebsite.Text" xml:space="preserve">
|
||||
<value>V2Ray Website</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator12.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>184, 6</value>
|
||||
@@ -1157,6 +1175,18 @@
|
||||
<data name=">>menuKeepPAC.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>menuKeepNothing.Name" xml:space="preserve">
|
||||
<value>menuKeepNothing</value>
|
||||
</data>
|
||||
<data name=">>menuKeepNothing.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>menuKeepPACNothing.Name" xml:space="preserve">
|
||||
<value>menuKeepPACNothing</value>
|
||||
</data>
|
||||
<data name=">>menuKeepPACNothing.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>menuServers.Name" xml:space="preserve">
|
||||
<value>menuServers</value>
|
||||
</data>
|
||||
@@ -1343,6 +1373,12 @@
|
||||
<data name=">>tsbCheckUpdatePACList.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator13.Name" xml:space="preserve">
|
||||
<value>toolStripSeparator13</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator13.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tsbCheckClearPACList.Name" xml:space="preserve">
|
||||
<value>tsbCheckClearPACList</value>
|
||||
</data>
|
||||
@@ -1367,6 +1403,12 @@
|
||||
<data name=">>tsbAbout.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tsbV2rayWebsite.Name" xml:space="preserve">
|
||||
<value>tsbV2rayWebsite</value>
|
||||
</data>
|
||||
<data name=">>tsbV2rayWebsite.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator12.Name" xml:space="preserve">
|
||||
<value>toolStripSeparator12</value>
|
||||
</data>
|
||||
|
||||
@@ -119,151 +119,151 @@
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="menuAddVmessServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuAddVmessServer.Text" xml:space="preserve">
|
||||
<value>添加[VMess]服务器</value>
|
||||
</data>
|
||||
<data name="menuAddShadowsocksServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuAddShadowsocksServer.Text" xml:space="preserve">
|
||||
<value>添加[Shadowsocks]服务器</value>
|
||||
</data>
|
||||
<data name="menuAddSocksServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuAddSocksServer.Text" xml:space="preserve">
|
||||
<value>添加[Socks]服务器</value>
|
||||
</data>
|
||||
<data name="menuAddCustomServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuAddCustomServer.Text" xml:space="preserve">
|
||||
<value>添加自定义配置服务器</value>
|
||||
</data>
|
||||
<data name="menuAddServers.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuAddServers.Text" xml:space="preserve">
|
||||
<value>从剪贴板导入批量URL</value>
|
||||
<value>从剪贴板导入批量URL (Ctrl+V)</value>
|
||||
</data>
|
||||
<data name="menuScanScreen.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuScanScreen.Text" xml:space="preserve">
|
||||
<value>扫描屏幕上的二维码</value>
|
||||
<value>扫描屏幕上的二维码 (Ctrl+S)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>275, 6</value>
|
||||
<value>297, 6</value>
|
||||
</data>
|
||||
<data name="menuRemoveServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuRemoveServer.Text" xml:space="preserve">
|
||||
<value>移除所选服务器(多选) (Delete)</value>
|
||||
</data>
|
||||
<data name="menuRemoveDuplicateServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuRemoveDuplicateServer.Text" xml:space="preserve">
|
||||
<value>移除重复的服务器</value>
|
||||
</data>
|
||||
<data name="menuCopyServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuCopyServer.Text" xml:space="preserve">
|
||||
<value>复制所选服务器</value>
|
||||
<value>克隆所选服务器</value>
|
||||
</data>
|
||||
<data name="menuSetDefaultServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuSetDefaultServer.Text" xml:space="preserve">
|
||||
<value>设为活动服务器 (Enter)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>275, 6</value>
|
||||
<value>297, 6</value>
|
||||
</data>
|
||||
<data name="menuMoveTop.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuMoveTop.Text" xml:space="preserve">
|
||||
<value>上移至顶</value>
|
||||
<value>上移至顶 (T)</value>
|
||||
</data>
|
||||
<data name="menuMoveUp.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuMoveUp.Text" xml:space="preserve">
|
||||
<value>上移 (U)</value>
|
||||
</data>
|
||||
<data name="menuMoveDown.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuMoveDown.Text" xml:space="preserve">
|
||||
<value>下移 (D)</value>
|
||||
</data>
|
||||
<data name="menuMoveBottom.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuMoveBottom.Text" xml:space="preserve">
|
||||
<value>下移至底</value>
|
||||
<value>下移至底 (B)</value>
|
||||
</data>
|
||||
<data name="menuSelectAll.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuSelectAll.Text" xml:space="preserve">
|
||||
<value>全选 (Ctrl+A)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator9.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>275, 6</value>
|
||||
<value>297, 6</value>
|
||||
</data>
|
||||
<data name="menuPingServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuPingServer.Text" xml:space="preserve">
|
||||
<value>测试服务器延迟Ping(多选) (Ctrl+P)</value>
|
||||
</data>
|
||||
<data name="menuTcpingServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuTcpingServer.Text" xml:space="preserve">
|
||||
<value>测试服务器延迟Tcping(多选) (Ctrl+O)</value>
|
||||
</data>
|
||||
<data name="menuRealPingServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuRealPingServer.Text" xml:space="preserve">
|
||||
<value>测试服务器真连接延迟(多选) (Ctrl+R)</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer.Text" xml:space="preserve">
|
||||
<value>测试服务器速度(多选) (Ctrl+T)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>275, 6</value>
|
||||
<value>297, 6</value>
|
||||
</data>
|
||||
<data name="menuExport2ClientConfig.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuExport2ClientConfig.Text" xml:space="preserve">
|
||||
<value>导出所选服务器为客户端配置</value>
|
||||
</data>
|
||||
<data name="menuExport2ServerConfig.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuExport2ServerConfig.Text" xml:space="preserve">
|
||||
<value>导出所选服务器为服务端配置</value>
|
||||
</data>
|
||||
<data name="menuExport2ShareUrl.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuExport2ShareUrl.Text" xml:space="preserve">
|
||||
<value>批量导出分享URL至剪贴板(多选)</value>
|
||||
<value>批量导出分享URL至剪贴板(多选) (Ctrl+C)</value>
|
||||
</data>
|
||||
<data name="menuExport2SubContent.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuExport2SubContent.Text" xml:space="preserve">
|
||||
<value>批量导出订阅内容至剪贴板(多选)</value>
|
||||
@@ -275,7 +275,7 @@
|
||||
<value> 服务器 </value>
|
||||
</data>
|
||||
<data name="cmsLv.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>279, 534</value>
|
||||
<value>301, 534</value>
|
||||
</data>
|
||||
<data name="lvServers.Items" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
@@ -295,34 +295,46 @@
|
||||
</value>
|
||||
</data>
|
||||
<data name="menuNotEnabledHttp.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>340, 22</value>
|
||||
<value>316, 22</value>
|
||||
</data>
|
||||
<data name="menuNotEnabledHttp.Text" xml:space="preserve">
|
||||
<value>关闭Http代理</value>
|
||||
</data>
|
||||
<data name="menuGlobal.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>340, 22</value>
|
||||
<value>316, 22</value>
|
||||
</data>
|
||||
<data name="menuGlobal.Text" xml:space="preserve">
|
||||
<value>开启Http代理,并自动配置代理服务器(全局模式)</value>
|
||||
<value>开启Http代理,并自动配置系统代理(全局模式)</value>
|
||||
</data>
|
||||
<data name="menuGlobalPAC.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>340, 22</value>
|
||||
<value>316, 22</value>
|
||||
</data>
|
||||
<data name="menuGlobalPAC.Text" xml:space="preserve">
|
||||
<value>开启PAC,并自动配置PAC(PAC模式)</value>
|
||||
<value>开启PAC,并自动配置系统代理(PAC模式)</value>
|
||||
</data>
|
||||
<data name="menuKeep.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>340, 22</value>
|
||||
<value>316, 22</value>
|
||||
</data>
|
||||
<data name="menuKeep.Text" xml:space="preserve">
|
||||
<value>仅开启Http代理,不自动配置代理服务器(直连模式)</value>
|
||||
<value>仅开启Http代理,并清除系统代理</value>
|
||||
</data>
|
||||
<data name="menuKeepPAC.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>340, 22</value>
|
||||
<value>316, 22</value>
|
||||
</data>
|
||||
<data name="menuKeepPAC.Text" xml:space="preserve">
|
||||
<value>仅开启PAC,不自动配置PAC</value>
|
||||
<value>仅开启PAC,并清除系统代理</value>
|
||||
</data>
|
||||
<data name="menuKeepNothing.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>316, 22</value>
|
||||
</data>
|
||||
<data name="menuKeepNothing.Text" xml:space="preserve">
|
||||
<value>仅开启Http代理,不改变系统代理</value>
|
||||
</data>
|
||||
<data name="menuKeepPACNothing.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>316, 22</value>
|
||||
</data>
|
||||
<data name="menuKeepPACNothing.Text" xml:space="preserve">
|
||||
<value>仅开启PAC,不改变系统代理</value>
|
||||
</data>
|
||||
<data name="menuSysAgentMode.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>195, 22</value>
|
||||
@@ -402,7 +414,7 @@
|
||||
<data name="tsbReload.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAE3SURBVFhH7ZaBDQIhDEVvBEdwBDfQDXQER3AD3cARdAPd
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAE3SURBVFhH7ZaBDQIhDEVvBEdwBDfQDXQER3AD3cARdAPd
|
||||
QDfSDbQvuSb1AicFjJrwkxcN0FIolOuamv5VE2E+gLaPayWchEcE+hhTXVPhIoQmDcFYbKpoJtwEdX4X
|
||||
jgIrXfTwnzb6dBw22BaJVdjJmWQs1/SdBRtE0U5cBXW2oSFRO0HtSEeW2FZ1wsq9sjuRdTDVAXnNuWLY
|
||||
6JnAl0sYa/Q5q1dhq35ci+Bkq2HJvbZpxGeybAAuw4Fq+cnW1wPITgHFYxvBUw+qHEIL1yq1vDKhVlH3
|
||||
@@ -417,25 +429,28 @@
|
||||
<value> 重启服务 </value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdateN.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>232, 22</value>
|
||||
<value>223, 22</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdateN.Text" xml:space="preserve">
|
||||
<value>检查更新v2rayN</value>
|
||||
<value>v2rayN</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdateCore.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>232, 22</value>
|
||||
<value>223, 22</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdateCore.Text" xml:space="preserve">
|
||||
<value>检查更新v2rayCore</value>
|
||||
<value>v2rayCore</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdatePACList.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>232, 22</value>
|
||||
<value>223, 22</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdatePACList.Text" xml:space="preserve">
|
||||
<value>检查更新PAC</value>
|
||||
<value>PAC</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator13.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>220, 6</value>
|
||||
</data>
|
||||
<data name="tsbCheckClearPACList.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>232, 22</value>
|
||||
<value>223, 22</value>
|
||||
</data>
|
||||
<data name="tsbCheckClearPACList.Text" xml:space="preserve">
|
||||
<value>简化PAC (请设置Core路由)</value>
|
||||
@@ -447,7 +462,10 @@
|
||||
<value> 检查更新 </value>
|
||||
</data>
|
||||
<data name="tsbAbout.Text" xml:space="preserve">
|
||||
<value>关于</value>
|
||||
<value>v2rayN 项目</value>
|
||||
</data>
|
||||
<data name="tsbV2rayWebsite.Text" xml:space="preserve">
|
||||
<value>V2Ray 官网</value>
|
||||
</data>
|
||||
<data name="tsbHelp.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>69, 53</value>
|
||||
@@ -464,11 +482,14 @@
|
||||
<data name="tsbClose.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAAySURBVFhH7c6xDQAgCEVBRnVTHU2ZABuMxV3yOvJDAAA/
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAySURBVFhH7c6xDQAgCEVBRnVTHU2ZABuMxV3yOvJDAAA/
|
||||
GqfZVG6X8mg1dfUAAPBQxAZd0SJruVXHWwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="tsbClose.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>76, 53</value>
|
||||
</data>
|
||||
<data name="tsbClose.Text" xml:space="preserve">
|
||||
<value> 关闭 </value>
|
||||
<value> 关闭窗口 </value>
|
||||
</data>
|
||||
</root>
|
||||
56
v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs
generated
56
v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs
generated
@@ -118,32 +118,33 @@
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.btnClose, "btnClose");
|
||||
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.UseVisualStyleBackColor = true;
|
||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||
//
|
||||
// tabControl1
|
||||
//
|
||||
resources.ApplyResources(this.tabControl1, "tabControl1");
|
||||
this.tabControl1.Controls.Add(this.tabPage1);
|
||||
this.tabControl1.Controls.Add(this.tabPage2);
|
||||
this.tabControl1.Controls.Add(this.tabPage6);
|
||||
this.tabControl1.Controls.Add(this.tabPage7);
|
||||
this.tabControl1.Controls.Add(this.tabPage9);
|
||||
resources.ApplyResources(this.tabControl1, "tabControl1");
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
//
|
||||
// tabPage1
|
||||
//
|
||||
this.tabPage1.Controls.Add(this.groupBox1);
|
||||
resources.ApplyResources(this.tabPage1, "tabPage1");
|
||||
this.tabPage1.Controls.Add(this.groupBox1);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
resources.ApplyResources(this.groupBox1, "groupBox1");
|
||||
this.groupBox1.Controls.Add(this.label16);
|
||||
this.groupBox1.Controls.Add(this.cmblistenerType);
|
||||
this.groupBox1.Controls.Add(this.chksniffingEnabled2);
|
||||
@@ -164,7 +165,6 @@
|
||||
this.groupBox1.Controls.Add(this.label5);
|
||||
this.groupBox1.Controls.Add(this.txtlocalPort);
|
||||
this.groupBox1.Controls.Add(this.label2);
|
||||
resources.ApplyResources(this.groupBox1, "groupBox1");
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.TabStop = false;
|
||||
//
|
||||
@@ -175,6 +175,7 @@
|
||||
//
|
||||
// cmblistenerType
|
||||
//
|
||||
resources.ApplyResources(this.cmblistenerType, "cmblistenerType");
|
||||
this.cmblistenerType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmblistenerType.FormattingEnabled = true;
|
||||
this.cmblistenerType.Items.AddRange(new object[] {
|
||||
@@ -182,8 +183,9 @@
|
||||
resources.GetString("cmblistenerType.Items1"),
|
||||
resources.GetString("cmblistenerType.Items2"),
|
||||
resources.GetString("cmblistenerType.Items3"),
|
||||
resources.GetString("cmblistenerType.Items4")});
|
||||
resources.ApplyResources(this.cmblistenerType, "cmblistenerType");
|
||||
resources.GetString("cmblistenerType.Items4"),
|
||||
resources.GetString("cmblistenerType.Items5"),
|
||||
resources.GetString("cmblistenerType.Items6")});
|
||||
this.cmblistenerType.Name = "cmblistenerType";
|
||||
//
|
||||
// chksniffingEnabled2
|
||||
@@ -229,12 +231,12 @@
|
||||
//
|
||||
// cmbprotocol2
|
||||
//
|
||||
resources.ApplyResources(this.cmbprotocol2, "cmbprotocol2");
|
||||
this.cmbprotocol2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbprotocol2.FormattingEnabled = true;
|
||||
this.cmbprotocol2.Items.AddRange(new object[] {
|
||||
resources.GetString("cmbprotocol2.Items"),
|
||||
resources.GetString("cmbprotocol2.Items1")});
|
||||
resources.ApplyResources(this.cmbprotocol2, "cmbprotocol2");
|
||||
this.cmbprotocol2.Name = "cmbprotocol2";
|
||||
//
|
||||
// label3
|
||||
@@ -249,8 +251,8 @@
|
||||
//
|
||||
// cmbprotocol
|
||||
//
|
||||
this.cmbprotocol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
resources.ApplyResources(this.cmbprotocol, "cmbprotocol");
|
||||
this.cmbprotocol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbprotocol.FormattingEnabled = true;
|
||||
this.cmbprotocol.Items.AddRange(new object[] {
|
||||
resources.GetString("cmbprotocol.Items"),
|
||||
@@ -276,6 +278,7 @@
|
||||
//
|
||||
// cmbloglevel
|
||||
//
|
||||
resources.ApplyResources(this.cmbloglevel, "cmbloglevel");
|
||||
this.cmbloglevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbloglevel.FormattingEnabled = true;
|
||||
this.cmbloglevel.Items.AddRange(new object[] {
|
||||
@@ -284,7 +287,6 @@
|
||||
resources.GetString("cmbloglevel.Items2"),
|
||||
resources.GetString("cmbloglevel.Items3"),
|
||||
resources.GetString("cmbloglevel.Items4")});
|
||||
resources.ApplyResources(this.cmbloglevel, "cmbloglevel");
|
||||
this.cmbloglevel.Name = "cmbloglevel";
|
||||
//
|
||||
// label5
|
||||
@@ -304,33 +306,33 @@
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
this.tabPage2.Controls.Add(this.groupBox2);
|
||||
resources.ApplyResources(this.tabPage2, "tabPage2");
|
||||
this.tabPage2.Controls.Add(this.groupBox2);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
resources.ApplyResources(this.groupBox2, "groupBox2");
|
||||
this.groupBox2.Controls.Add(this.tabControl2);
|
||||
this.groupBox2.Controls.Add(this.panel3);
|
||||
resources.ApplyResources(this.groupBox2, "groupBox2");
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.TabStop = false;
|
||||
//
|
||||
// tabControl2
|
||||
//
|
||||
resources.ApplyResources(this.tabControl2, "tabControl2");
|
||||
this.tabControl2.Controls.Add(this.tabPage3);
|
||||
this.tabControl2.Controls.Add(this.tabPage4);
|
||||
this.tabControl2.Controls.Add(this.tabPage5);
|
||||
this.tabControl2.Controls.Add(this.tabPage8);
|
||||
resources.ApplyResources(this.tabControl2, "tabControl2");
|
||||
this.tabControl2.Name = "tabControl2";
|
||||
this.tabControl2.SelectedIndex = 0;
|
||||
//
|
||||
// tabPage3
|
||||
//
|
||||
this.tabPage3.Controls.Add(this.txtUseragent);
|
||||
resources.ApplyResources(this.tabPage3, "tabPage3");
|
||||
this.tabPage3.Controls.Add(this.txtUseragent);
|
||||
this.tabPage3.Name = "tabPage3";
|
||||
this.tabPage3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@@ -341,8 +343,8 @@
|
||||
//
|
||||
// tabPage4
|
||||
//
|
||||
this.tabPage4.Controls.Add(this.txtUserdirect);
|
||||
resources.ApplyResources(this.tabPage4, "tabPage4");
|
||||
this.tabPage4.Controls.Add(this.txtUserdirect);
|
||||
this.tabPage4.Name = "tabPage4";
|
||||
this.tabPage4.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@@ -353,8 +355,8 @@
|
||||
//
|
||||
// tabPage5
|
||||
//
|
||||
this.tabPage5.Controls.Add(this.txtUserblock);
|
||||
resources.ApplyResources(this.tabPage5, "tabPage5");
|
||||
this.tabPage5.Controls.Add(this.txtUserblock);
|
||||
this.tabPage5.Name = "tabPage5";
|
||||
this.tabPage5.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@@ -365,13 +367,14 @@
|
||||
//
|
||||
// tabPage8
|
||||
//
|
||||
this.tabPage8.Controls.Add(this.cmbroutingMode);
|
||||
resources.ApplyResources(this.tabPage8, "tabPage8");
|
||||
this.tabPage8.Controls.Add(this.cmbroutingMode);
|
||||
this.tabPage8.Name = "tabPage8";
|
||||
this.tabPage8.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cmbroutingMode
|
||||
//
|
||||
resources.ApplyResources(this.cmbroutingMode, "cmbroutingMode");
|
||||
this.cmbroutingMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbroutingMode.FormattingEnabled = true;
|
||||
this.cmbroutingMode.Items.AddRange(new object[] {
|
||||
@@ -379,16 +382,15 @@
|
||||
resources.GetString("cmbroutingMode.Items1"),
|
||||
resources.GetString("cmbroutingMode.Items2"),
|
||||
resources.GetString("cmbroutingMode.Items3")});
|
||||
resources.ApplyResources(this.cmbroutingMode, "cmbroutingMode");
|
||||
this.cmbroutingMode.Name = "cmbroutingMode";
|
||||
//
|
||||
// panel3
|
||||
//
|
||||
resources.ApplyResources(this.panel3, "panel3");
|
||||
this.panel3.Controls.Add(this.btnSetDefRountingRule);
|
||||
this.panel3.Controls.Add(this.labRoutingTips);
|
||||
this.panel3.Controls.Add(this.cmbdomainStrategy);
|
||||
this.panel3.Controls.Add(this.label15);
|
||||
resources.ApplyResources(this.panel3, "panel3");
|
||||
this.panel3.Name = "panel3";
|
||||
//
|
||||
// btnSetDefRountingRule
|
||||
@@ -400,19 +402,19 @@
|
||||
//
|
||||
// labRoutingTips
|
||||
//
|
||||
this.labRoutingTips.ForeColor = System.Drawing.Color.Brown;
|
||||
resources.ApplyResources(this.labRoutingTips, "labRoutingTips");
|
||||
this.labRoutingTips.ForeColor = System.Drawing.Color.Brown;
|
||||
this.labRoutingTips.Name = "labRoutingTips";
|
||||
//
|
||||
// cmbdomainStrategy
|
||||
//
|
||||
resources.ApplyResources(this.cmbdomainStrategy, "cmbdomainStrategy");
|
||||
this.cmbdomainStrategy.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbdomainStrategy.FormattingEnabled = true;
|
||||
this.cmbdomainStrategy.Items.AddRange(new object[] {
|
||||
resources.GetString("cmbdomainStrategy.Items"),
|
||||
resources.GetString("cmbdomainStrategy.Items1"),
|
||||
resources.GetString("cmbdomainStrategy.Items2")});
|
||||
resources.ApplyResources(this.cmbdomainStrategy, "cmbdomainStrategy");
|
||||
this.cmbdomainStrategy.Name = "cmbdomainStrategy";
|
||||
//
|
||||
// label15
|
||||
@@ -422,6 +424,7 @@
|
||||
//
|
||||
// tabPage6
|
||||
//
|
||||
resources.ApplyResources(this.tabPage6, "tabPage6");
|
||||
this.tabPage6.Controls.Add(this.chkKcpcongestion);
|
||||
this.tabPage6.Controls.Add(this.txtKcpwriteBufferSize);
|
||||
this.tabPage6.Controls.Add(this.label10);
|
||||
@@ -435,7 +438,6 @@
|
||||
this.tabPage6.Controls.Add(this.label7);
|
||||
this.tabPage6.Controls.Add(this.txtKcpmtu);
|
||||
this.tabPage6.Controls.Add(this.label6);
|
||||
resources.ApplyResources(this.tabPage6, "tabPage6");
|
||||
this.tabPage6.Name = "tabPage6";
|
||||
this.tabPage6.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@@ -507,6 +509,7 @@
|
||||
//
|
||||
// tabPage7
|
||||
//
|
||||
resources.ApplyResources(this.tabPage7, "tabPage7");
|
||||
this.tabPage7.Controls.Add(this.cbFreshrate);
|
||||
this.tabPage7.Controls.Add(this.lbFreshrate);
|
||||
this.tabPage7.Controls.Add(this.chkEnableStatistics);
|
||||
@@ -514,15 +517,14 @@
|
||||
this.tabPage7.Controls.Add(this.txturlGFWList);
|
||||
this.tabPage7.Controls.Add(this.label13);
|
||||
this.tabPage7.Controls.Add(this.chkAutoRun);
|
||||
resources.ApplyResources(this.tabPage7, "tabPage7");
|
||||
this.tabPage7.Name = "tabPage7";
|
||||
this.tabPage7.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbFreshrate
|
||||
//
|
||||
resources.ApplyResources(this.cbFreshrate, "cbFreshrate");
|
||||
this.cbFreshrate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbFreshrate.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.cbFreshrate, "cbFreshrate");
|
||||
this.cbFreshrate.Name = "cbFreshrate";
|
||||
//
|
||||
// lbFreshrate
|
||||
@@ -560,9 +562,9 @@
|
||||
//
|
||||
// tabPage9
|
||||
//
|
||||
resources.ApplyResources(this.tabPage9, "tabPage9");
|
||||
this.tabPage9.Controls.Add(this.txtuserPacRule);
|
||||
this.tabPage9.Controls.Add(this.panel4);
|
||||
resources.ApplyResources(this.tabPage9, "tabPage9");
|
||||
this.tabPage9.Name = "tabPage9";
|
||||
this.tabPage9.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@@ -573,21 +575,21 @@
|
||||
//
|
||||
// panel4
|
||||
//
|
||||
this.panel4.Controls.Add(this.label4);
|
||||
resources.ApplyResources(this.panel4, "panel4");
|
||||
this.panel4.Controls.Add(this.label4);
|
||||
this.panel4.Name = "panel4";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.ForeColor = System.Drawing.Color.Brown;
|
||||
resources.ApplyResources(this.label4, "label4");
|
||||
this.label4.ForeColor = System.Drawing.Color.Brown;
|
||||
this.label4.Name = "label4";
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
resources.ApplyResources(this.panel2, "panel2");
|
||||
this.panel2.Controls.Add(this.btnClose);
|
||||
this.panel2.Controls.Add(this.btnOK);
|
||||
resources.ApplyResources(this.panel2, "panel2");
|
||||
this.panel2.Name = "panel2";
|
||||
//
|
||||
// btnOK
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -131,16 +131,22 @@
|
||||
<value>关闭Http代理</value>
|
||||
</data>
|
||||
<data name="cmblistenerType.Items1" xml:space="preserve">
|
||||
<value>开启Http代理,并自动配置代理服务器(全局模式)</value>
|
||||
<value>开启Http代理,并自动配置系统代理(全局模式)</value>
|
||||
</data>
|
||||
<data name="cmblistenerType.Items2" xml:space="preserve">
|
||||
<value>开启PAC,并自动配置PAC(PAC模式)</value>
|
||||
<value>开启PAC,并自动配置系统代理(PAC模式)</value>
|
||||
</data>
|
||||
<data name="cmblistenerType.Items3" xml:space="preserve">
|
||||
<value>仅开启Http代理,不自动配置代理服务器(直连模式)</value>
|
||||
<value>仅开启Http代理,并清除系统代理</value>
|
||||
</data>
|
||||
<data name="cmblistenerType.Items4" xml:space="preserve">
|
||||
<value>仅开启PAC,不自动配置PAC</value>
|
||||
<value>仅开启PAC,并清除系统代理</value>
|
||||
</data>
|
||||
<data name="cmblistenerType.Items5" xml:space="preserve">
|
||||
<value>仅开启Http代理,不改变系统代理</value>
|
||||
</data>
|
||||
<data name="cmblistenerType.Items6" xml:space="preserve">
|
||||
<value>仅开启PAC,不改变系统代理</value>
|
||||
</data>
|
||||
<data name="chksniffingEnabled2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>96, 16</value>
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="chkShow.Text" xml:space="preserve">
|
||||
<value>Show shared content</value>
|
||||
<value>Sharing panel</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
|
||||
@@ -54,10 +54,7 @@ namespace v2rayN.Forms
|
||||
subItem.url = string.Empty;
|
||||
}
|
||||
|
||||
if (OnButtonClicked != null)
|
||||
{
|
||||
OnButtonClicked(sender, e);
|
||||
}
|
||||
OnButtonClicked?.Invoke(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,9 +47,8 @@ namespace v2rayN.Forms
|
||||
}
|
||||
}
|
||||
|
||||
for (int k = 0; k < config.subItem.Count; k++)
|
||||
foreach (var item in config.subItem)
|
||||
{
|
||||
var item = config.subItem[k];
|
||||
SubSettingControl control = new SubSettingControl();
|
||||
control.OnButtonClicked += Control_OnButtonClicked;
|
||||
control.subItem = item;
|
||||
|
||||
@@ -6,6 +6,7 @@ namespace v2rayN
|
||||
#region 常量
|
||||
|
||||
|
||||
public const string v2rayWebsiteUrl = @"https://www.v2ray.com/";
|
||||
public const string AboutUrl = @"https://github.com/2dust/v2rayN";
|
||||
public const string UpdateUrl = AboutUrl + @"/releases";
|
||||
|
||||
@@ -162,7 +163,7 @@ namespace v2rayN
|
||||
}
|
||||
public const string StatisticLogOverall = "StatisticLogOverall.json";
|
||||
|
||||
public const string IEProxyExceptions = "<local>;localhost;127.*;10.*;172.16.*;172.17.*;172.18.*;172.19.*;172.20.*;172.21.*;172.22.*;172.23.*;172.24.*;172.25.*;172.26.*;172.27.*;172.28.*;172.29.*;172.30.*;172.31.*;172.32.*";
|
||||
public const string IEProxyExceptions = "localhost;127.*;10.*;172.16.*;172.17.*;172.18.*;172.19.*;172.20.*;172.21.*;172.22.*;172.23.*;172.24.*;172.25.*;172.26.*;172.27.*;172.28.*;172.29.*;172.30.*;172.31.*;192.168.*";
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -247,7 +247,7 @@ namespace v2rayN.Handler
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 复制服务器
|
||||
/// 克隆服务器
|
||||
/// </summary>
|
||||
/// <param name="config"></param>
|
||||
/// <param name="index"></param>
|
||||
@@ -274,7 +274,7 @@ namespace v2rayN.Handler
|
||||
vmessItem.streamSecurity = config.vmess[index].streamSecurity;
|
||||
vmessItem.remarks = string.Format("{0}-clone", config.vmess[index].remarks);
|
||||
|
||||
config.vmess.Add(vmessItem);
|
||||
config.vmess.Insert(index + 1, vmessItem); // 插入到下一项
|
||||
|
||||
ToJsonFile(config);
|
||||
|
||||
@@ -724,7 +724,7 @@ namespace v2rayN.Handler
|
||||
/// <param name="config"></param>
|
||||
/// <param name="clipboardData"></param>
|
||||
/// <param name="subid"></param>
|
||||
/// <returns></returns>
|
||||
/// <returns>成功导入的数量</returns>
|
||||
public static int AddBatchServers(ref Config config, string clipboardData, string subid = "")
|
||||
{
|
||||
if (Utils.IsNullOrEmpty(clipboardData))
|
||||
@@ -779,11 +779,7 @@ namespace v2rayN.Handler
|
||||
}
|
||||
}
|
||||
}
|
||||
if (countServers > 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
return countServers;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -4,7 +4,10 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using v2rayN.Base;
|
||||
using v2rayN.Mode;
|
||||
using v2rayN.Properties;
|
||||
@@ -47,98 +50,119 @@ namespace v2rayN.Handler
|
||||
private DateTime totalDatetime = new DateTime();
|
||||
private int DownloadTimeout = -1;
|
||||
|
||||
#region Check for updates
|
||||
|
||||
|
||||
#region v2rayN
|
||||
|
||||
private string nLatestUrl = "https://github.com/2dust/v2rayN/releases/latest";
|
||||
private readonly string nLatestUrl = "https://github.com/2dust/v2rayN/releases/latest";
|
||||
private const string nUrl = "https://github.com/2dust/v2rayN/releases/download/{0}/v2rayN.zip";
|
||||
|
||||
public void AbsoluteV2rayN(Config config)
|
||||
{
|
||||
Utils.SetSecurityProtocol();
|
||||
WebRequest request = WebRequest.Create(nLatestUrl);
|
||||
request.BeginGetResponse(new AsyncCallback(OnResponseV2rayN), request);
|
||||
}
|
||||
|
||||
private void OnResponseV2rayN(IAsyncResult ar)
|
||||
{
|
||||
try
|
||||
{
|
||||
HttpWebRequest request = (HttpWebRequest)ar.AsyncState;
|
||||
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(ar);
|
||||
string redirectUrl = response.ResponseUri.AbsoluteUri;
|
||||
string version = redirectUrl.Substring(redirectUrl.LastIndexOf("/", StringComparison.Ordinal) + 1);
|
||||
|
||||
var curVersion = FileVersionInfo.GetVersionInfo(Utils.GetExePath()).FileVersion.ToString();
|
||||
if (curVersion == version)
|
||||
{
|
||||
if (AbsoluteCompleted != null)
|
||||
{
|
||||
AbsoluteCompleted(this, new ResultEventArgs(false, "Already the latest version"));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
string url = string.Format(nUrl, version);
|
||||
if (AbsoluteCompleted != null)
|
||||
{
|
||||
AbsoluteCompleted(this, new ResultEventArgs(true, url));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
|
||||
if (Error != null)
|
||||
Error(this, new ErrorEventArgs(ex));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Core
|
||||
|
||||
private string coreLatestUrl = "https://github.com/v2ray/v2ray-core/releases/latest";
|
||||
private readonly string coreLatestUrl = "https://github.com/v2ray/v2ray-core/releases/latest";
|
||||
private const string coreUrl = "https://github.com/v2ray/v2ray-core/releases/download/{0}/v2ray-windows-{1}.zip";
|
||||
|
||||
public void AbsoluteV2rayCore(Config config)
|
||||
public async Task CheckUpdateAsync(string type)
|
||||
{
|
||||
Utils.SetSecurityProtocol();
|
||||
WebRequest request = WebRequest.Create(coreLatestUrl);
|
||||
request.BeginGetResponse(new AsyncCallback(OnResponseV2rayCore), request);
|
||||
WebRequestHandler webRequestHandler = new WebRequestHandler();
|
||||
webRequestHandler.AllowAutoRedirect = false;
|
||||
HttpClient httpClient = new HttpClient(webRequestHandler);
|
||||
|
||||
string url;
|
||||
if (type == "Core")
|
||||
{
|
||||
url = coreLatestUrl;
|
||||
}
|
||||
|
||||
private void OnResponseV2rayCore(IAsyncResult ar)
|
||||
else if (type == "v2rayN")
|
||||
{
|
||||
try
|
||||
{
|
||||
HttpWebRequest request = (HttpWebRequest)ar.AsyncState;
|
||||
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(ar);
|
||||
string redirectUrl = response.ResponseUri.AbsoluteUri;
|
||||
string version = redirectUrl.Substring(redirectUrl.LastIndexOf("/", StringComparison.Ordinal) + 1);
|
||||
|
||||
string osBit = string.Empty;
|
||||
if (Environment.Is64BitProcess)
|
||||
{
|
||||
osBit = "64";
|
||||
url = nLatestUrl;
|
||||
}
|
||||
else
|
||||
{
|
||||
osBit = "32";
|
||||
throw new ArgumentException("Type");
|
||||
}
|
||||
string url = string.Format(coreUrl, version, osBit);
|
||||
if (AbsoluteCompleted != null)
|
||||
HttpResponseMessage response = await httpClient.GetAsync(url);
|
||||
if (response.StatusCode.ToString() == "Redirect")
|
||||
{
|
||||
AbsoluteCompleted(this, new ResultEventArgs(true, url));
|
||||
responseHandler(type, response.Headers.Location.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.SaveLog("StatusCode error: " + url);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取V2RayCore版本
|
||||
/// </summary>
|
||||
public string getV2rayVersion()
|
||||
{
|
||||
try
|
||||
{
|
||||
string filePath = Utils.GetPath("V2ray.exe");
|
||||
if (!File.Exists(filePath))
|
||||
{
|
||||
string msg = string.Format(UIRes.I18N("NotFoundCore"), @"https://github.com/v2ray/v2ray-core/releases");
|
||||
//ShowMsg(true, msg);
|
||||
return "";
|
||||
}
|
||||
|
||||
Process p = new Process();
|
||||
p.StartInfo.FileName = filePath;
|
||||
p.StartInfo.Arguments = "-version";
|
||||
p.StartInfo.WorkingDirectory = Utils.StartupPath();
|
||||
p.StartInfo.UseShellExecute = false;
|
||||
p.StartInfo.RedirectStandardOutput = true;
|
||||
p.StartInfo.CreateNoWindow = true;
|
||||
p.StartInfo.StandardOutputEncoding = Encoding.UTF8;
|
||||
p.Start();
|
||||
p.WaitForExit(5000);
|
||||
string echo = p.StandardOutput.ReadToEnd();
|
||||
string version = Regex.Match(echo, "V2Ray ([0-9.]+) \\(").Groups[1].Value;
|
||||
return version;
|
||||
}
|
||||
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
private void responseHandler(string type, string redirectUrl)
|
||||
{
|
||||
try
|
||||
{
|
||||
string version = redirectUrl.Substring(redirectUrl.LastIndexOf("/", StringComparison.Ordinal) + 1);
|
||||
|
||||
string curVersion;
|
||||
string message;
|
||||
string url;
|
||||
if (type == "Core") {
|
||||
curVersion = "v" + getV2rayVersion();
|
||||
message = string.Format(UIRes.I18N("IsLatestCore"), curVersion);
|
||||
string osBit = Environment.Is64BitProcess ? "64" : "32";
|
||||
url = string.Format(coreUrl, version, osBit);
|
||||
}
|
||||
else if (type == "v2rayN") {
|
||||
curVersion = FileVersionInfo.GetVersionInfo(Utils.GetExePath()).FileVersion.ToString();
|
||||
message = string.Format(UIRes.I18N("IsLatestN"), curVersion);
|
||||
url = string.Format(nUrl, version);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ArgumentException("Type");
|
||||
}
|
||||
|
||||
if (curVersion == version)
|
||||
{
|
||||
AbsoluteCompleted?.Invoke(this, new ResultEventArgs(false, message));
|
||||
return;
|
||||
}
|
||||
|
||||
AbsoluteCompleted?.Invoke(this, new ResultEventArgs(true, url));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
|
||||
if (Error != null)
|
||||
Error(this, new ErrorEventArgs(ex));
|
||||
Error?.Invoke(this, new ErrorEventArgs(ex));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,10 +175,7 @@ namespace v2rayN.Handler
|
||||
try
|
||||
{
|
||||
Utils.SetSecurityProtocol();
|
||||
if (UpdateCompleted != null)
|
||||
{
|
||||
UpdateCompleted(this, new ResultEventArgs(false, "Downloading..."));
|
||||
}
|
||||
UpdateCompleted?.Invoke(this, new ResultEventArgs(false, "Downloading..."));
|
||||
|
||||
progressPercentage = -1;
|
||||
totalBytesToReceive = 0;
|
||||
@@ -174,8 +195,7 @@ namespace v2rayN.Handler
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
|
||||
if (Error != null)
|
||||
Error(this, new ErrorEventArgs(ex));
|
||||
Error?.Invoke(this, new ErrorEventArgs(ex));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,8 +260,7 @@ namespace v2rayN.Handler
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
|
||||
if (Error != null)
|
||||
Error(this, new ErrorEventArgs(ex));
|
||||
Error?.Invoke(this, new ErrorEventArgs(ex));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -274,10 +293,7 @@ namespace v2rayN.Handler
|
||||
|| Utils.IsNullOrEmpty(e.Error.ToString()))
|
||||
{
|
||||
string source = e.Result;
|
||||
if (UpdateCompleted != null)
|
||||
{
|
||||
UpdateCompleted(this, new ResultEventArgs(true, source));
|
||||
}
|
||||
UpdateCompleted?.Invoke(this, new ResultEventArgs(true, source));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -288,8 +304,7 @@ namespace v2rayN.Handler
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
|
||||
if (Error != null)
|
||||
Error(this, new ErrorEventArgs(ex));
|
||||
Error?.Invoke(this, new ErrorEventArgs(ex));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace v2rayN.Handler
|
||||
var index = config.listenerType;
|
||||
if (index > 0)
|
||||
{
|
||||
color = (new Color[] { Color.Red, Color.Purple, Color.DarkGreen, Color.Orange })[index - 1];
|
||||
color = (new Color[] { Color.Red, Color.Purple, Color.DarkGreen, Color.Orange, Color.DarkSlateBlue, Color.RoyalBlue })[index - 1];
|
||||
//color = ColorTranslator.FromHtml(new string[] { "#CC0066", "#CC6600", "#99CC99", "#666699" }[index - 1]);
|
||||
}
|
||||
|
||||
|
||||
@@ -72,9 +72,8 @@ namespace v2rayN.Handler
|
||||
{
|
||||
try
|
||||
{
|
||||
for (int k = 0; k < _selecteds.Count; k++)
|
||||
foreach (int index in _selecteds)
|
||||
{
|
||||
int index = _selecteds[k];
|
||||
if (_config.vmess[index].configType == (int)EConfigType.Custom)
|
||||
{
|
||||
continue;
|
||||
@@ -103,9 +102,8 @@ namespace v2rayN.Handler
|
||||
{
|
||||
try
|
||||
{
|
||||
for (int k = 0; k < _selecteds.Count; k++)
|
||||
foreach (int index in _selecteds)
|
||||
{
|
||||
int index = _selecteds[k];
|
||||
if (_config.vmess[index].configType == (int)EConfigType.Custom)
|
||||
{
|
||||
continue;
|
||||
@@ -121,7 +119,7 @@ namespace v2rayN.Handler
|
||||
}
|
||||
}
|
||||
|
||||
Thread.Sleep(100);
|
||||
Thread.Sleep(10);
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -142,9 +140,8 @@ namespace v2rayN.Handler
|
||||
Thread.Sleep(5000);
|
||||
|
||||
var httpPort = _config.GetLocalPort("speedtest");
|
||||
for (int k = 0; k < _selecteds.Count; k++)
|
||||
foreach (int index in _selecteds)
|
||||
{
|
||||
int index = _selecteds[k];
|
||||
if (_config.vmess[index].configType == (int)EConfigType.Custom)
|
||||
{
|
||||
continue;
|
||||
@@ -182,6 +179,7 @@ namespace v2rayN.Handler
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void RunSpeedTest()
|
||||
{
|
||||
if (_config.vmess.Count <= 0)
|
||||
@@ -244,7 +242,7 @@ namespace v2rayN.Handler
|
||||
|
||||
testCounter++;
|
||||
var webProxy = new WebProxy(Global.Loopback, httpPort + index);
|
||||
downloadHandle2.DownloadFileAsync(_config, url, webProxy, 30);
|
||||
downloadHandle2.DownloadFileAsync(_config, url, webProxy, 20);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -254,15 +252,25 @@ namespace v2rayN.Handler
|
||||
var responseTime = -1;
|
||||
|
||||
try
|
||||
{
|
||||
IPAddress ipAddress;
|
||||
if (!System.Net.IPAddress.TryParse(url, out ipAddress))
|
||||
{
|
||||
IPHostEntry ipHostInfo = System.Net.Dns.GetHostEntry(url);
|
||||
IPAddress ipAddress = ipHostInfo.AddressList[0];
|
||||
ipAddress = ipHostInfo.AddressList[0];
|
||||
}
|
||||
|
||||
var timer = new Stopwatch();
|
||||
timer.Start();
|
||||
|
||||
Socket clientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||
clientSocket.Connect(new IPEndPoint(ipAddress, port));
|
||||
var endPoint = new IPEndPoint(ipAddress, port);
|
||||
Socket clientSocket = new Socket(endPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
|
||||
|
||||
IAsyncResult result = clientSocket.BeginConnect(endPoint, null, null);
|
||||
if (!result.AsyncWaitHandle.WaitOne(TimeSpan.FromSeconds(5)))
|
||||
throw new TimeoutException("connect timeout (5s): " + url);
|
||||
clientSocket.EndConnect(result);
|
||||
|
||||
timer.Stop();
|
||||
responseTime = timer.Elapsed.Milliseconds;
|
||||
clientSocket.Close();
|
||||
|
||||
@@ -237,9 +237,9 @@ namespace v2rayN.Handler
|
||||
rulesIP.outboundTag = tag;
|
||||
rulesIP.ip = new List<string>();
|
||||
|
||||
for (int k = 0; k < userRule.Count; k++)
|
||||
foreach (string u in userRule)
|
||||
{
|
||||
string url = userRule[k].TrimEx();
|
||||
string url = u.TrimEx();
|
||||
if (Utils.IsNullOrEmpty(url))
|
||||
{
|
||||
continue;
|
||||
@@ -354,6 +354,7 @@ namespace v2rayN.Handler
|
||||
|
||||
//Mux
|
||||
outbound.mux.enabled = config.muxEnabled;
|
||||
outbound.mux.concurrency = config.muxEnabled ? 8 : -1;
|
||||
|
||||
//远程服务器底层传输配置
|
||||
StreamSettings streamSettings = outbound.streamSettings;
|
||||
@@ -384,6 +385,8 @@ namespace v2rayN.Handler
|
||||
serversItem.level = 1;
|
||||
|
||||
outbound.mux.enabled = false;
|
||||
outbound.mux.concurrency = -1;
|
||||
|
||||
|
||||
outbound.protocol = "shadowsocks";
|
||||
outbound.settings.vnext = null;
|
||||
@@ -418,6 +421,7 @@ namespace v2rayN.Handler
|
||||
}
|
||||
|
||||
outbound.mux.enabled = false;
|
||||
outbound.mux.concurrency = -1;
|
||||
|
||||
outbound.protocol = "socks";
|
||||
outbound.settings.vnext = null;
|
||||
@@ -443,7 +447,6 @@ namespace v2rayN.Handler
|
||||
//远程服务器底层传输配置
|
||||
streamSettings.network = config.network();
|
||||
var host = config.requestHost();
|
||||
|
||||
//if tls
|
||||
if (config.streamSecurity() == Global.StreamSecurity)
|
||||
{
|
||||
@@ -537,8 +540,11 @@ namespace v2rayN.Handler
|
||||
quicsettings.key = config.path();
|
||||
quicsettings.header = new Header();
|
||||
quicsettings.header.type = config.headerType();
|
||||
|
||||
streamSettings.quicSettings = quicsettings;
|
||||
if (config.streamSecurity() == Global.StreamSecurity)
|
||||
{
|
||||
streamSettings.tlsSettings.serverName = config.address();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
//tcp带http伪装
|
||||
@@ -1398,6 +1404,8 @@ namespace v2rayN.Handler
|
||||
|
||||
msg = UIRes.I18N("InitialConfiguration");
|
||||
|
||||
Config configCopy = Utils.DeepCopy<Config>(config);
|
||||
|
||||
string result = Utils.GetEmbedText(SampleClient);
|
||||
if (Utils.IsNullOrEmpty(result))
|
||||
{
|
||||
@@ -1412,21 +1420,20 @@ namespace v2rayN.Handler
|
||||
return -1;
|
||||
}
|
||||
|
||||
log(config, ref v2rayConfig, false);
|
||||
log(configCopy, ref v2rayConfig, false);
|
||||
//routing(config, ref v2rayConfig);
|
||||
dns(config, ref v2rayConfig);
|
||||
dns(configCopy, ref v2rayConfig);
|
||||
|
||||
|
||||
var httpPort = config.GetLocalPort("speedtest");
|
||||
for (int k = 0; k < selecteds.Count; k++)
|
||||
var httpPort = configCopy.GetLocalPort("speedtest");
|
||||
foreach (int index in selecteds)
|
||||
{
|
||||
int index = selecteds[k];
|
||||
if (config.vmess[index].configType == (int)EConfigType.Custom)
|
||||
if (configCopy.vmess[index].configType == (int)EConfigType.Custom)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
config.index = index;
|
||||
configCopy.index = index;
|
||||
|
||||
var inbound = new Inbounds();
|
||||
inbound.listen = Global.Loopback;
|
||||
@@ -1437,7 +1444,7 @@ namespace v2rayN.Handler
|
||||
|
||||
|
||||
var v2rayConfigCopy = Utils.FromJson<V2rayConfig>(result);
|
||||
outbound(config, ref v2rayConfigCopy);
|
||||
outbound(configCopy, ref v2rayConfigCopy);
|
||||
v2rayConfigCopy.outbounds[0].tag = Global.agentTag + inbound.port.ToString();
|
||||
v2rayConfig.outbounds.Add(v2rayConfigCopy.outbounds[0]);
|
||||
|
||||
@@ -1450,7 +1457,7 @@ namespace v2rayN.Handler
|
||||
|
||||
Utils.ToJsonFile(v2rayConfig, fileName);
|
||||
|
||||
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), config.getSummary());
|
||||
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), configCopy.getSummary());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,8 @@ namespace v2rayN.Handler
|
||||
private static string v2rayConfigRes = Global.v2rayConfigFileName;
|
||||
private List<string> lstV2ray;
|
||||
public event ProcessDelegate ProcessEvent;
|
||||
private int processId = 0;
|
||||
//private int processId = 0;
|
||||
private Process _process;
|
||||
|
||||
public V2rayHandler()
|
||||
{
|
||||
@@ -90,28 +91,50 @@ namespace v2rayN.Handler
|
||||
{
|
||||
try
|
||||
{
|
||||
bool blExist = true;
|
||||
if (processId > 0)
|
||||
if (_process != null)
|
||||
{
|
||||
Process p1 = Process.GetProcessById(processId);
|
||||
if (p1 != null)
|
||||
{
|
||||
p1.Kill();
|
||||
blExist = false;
|
||||
KillProcess(_process);
|
||||
_process.Dispose();
|
||||
_process = null;
|
||||
}
|
||||
}
|
||||
if (blExist)
|
||||
else
|
||||
{
|
||||
foreach (string vName in lstV2ray)
|
||||
{
|
||||
Process[] killPro = Process.GetProcessesByName(vName);
|
||||
foreach (Process p in killPro)
|
||||
Process[] existing = Process.GetProcessesByName(vName);
|
||||
foreach (Process p in existing)
|
||||
{
|
||||
p.Kill();
|
||||
var path = p.MainModule.FileName;
|
||||
if (path == $"{Utils.GetPath(vName)}.exe")
|
||||
{
|
||||
KillProcess(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//bool blExist = true;
|
||||
//if (processId > 0)
|
||||
//{
|
||||
// Process p1 = Process.GetProcessById(processId);
|
||||
// if (p1 != null)
|
||||
// {
|
||||
// p1.Kill();
|
||||
// blExist = false;
|
||||
// }
|
||||
//}
|
||||
//if (blExist)
|
||||
//{
|
||||
// foreach (string vName in lstV2ray)
|
||||
// {
|
||||
// Process[] killPro = Process.GetProcessesByName(vName);
|
||||
// foreach (Process p in killPro)
|
||||
// {
|
||||
// p.Kill();
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
@@ -129,9 +152,9 @@ namespace v2rayN.Handler
|
||||
{
|
||||
//查找v2ray文件是否存在
|
||||
string fileName = string.Empty;
|
||||
for (int k = 0; k < lstV2ray.Count; k++)
|
||||
foreach (string name in lstV2ray)
|
||||
{
|
||||
string vName = string.Format("{0}.exe", lstV2ray[k]);
|
||||
string vName = string.Format("{0}.exe", name);
|
||||
vName = Utils.GetPath(vName);
|
||||
if (File.Exists(vName))
|
||||
{
|
||||
@@ -163,7 +186,8 @@ namespace v2rayN.Handler
|
||||
});
|
||||
p.Start();
|
||||
p.BeginOutputReadLine();
|
||||
processId = p.Id;
|
||||
//processId = p.Id;
|
||||
_process = p;
|
||||
|
||||
Global.processJob.AddProcess(p.Handle);
|
||||
}
|
||||
@@ -178,13 +202,28 @@ namespace v2rayN.Handler
|
||||
/// <summary>
|
||||
/// 消息委托
|
||||
/// </summary>
|
||||
/// <param name="notify"></param>
|
||||
/// <param name="msg"></param>
|
||||
private void ShowMsg(bool notify, string msg)
|
||||
/// <param name="updateToTrayTooltip">是否更新托盘图标的工具提示</param>
|
||||
/// <param name="msg">输出到日志框</param>
|
||||
private void ShowMsg(bool updateToTrayTooltip, string msg)
|
||||
{
|
||||
if (ProcessEvent != null)
|
||||
ProcessEvent?.Invoke(updateToTrayTooltip, msg);
|
||||
}
|
||||
|
||||
private void KillProcess(Process p)
|
||||
{
|
||||
ProcessEvent(notify, msg);
|
||||
try
|
||||
{
|
||||
p.CloseMainWindow();
|
||||
p.WaitForExit(100);
|
||||
if (!p.HasExited)
|
||||
{
|
||||
p.Kill();
|
||||
p.WaitForExit(100);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,31 +31,45 @@ namespace v2rayN.HttpProxyHandler
|
||||
if (type == 1)
|
||||
{
|
||||
//PACServerHandle.Stop();
|
||||
ProxySetting.SetProxy($"{Global.Loopback}:{port}", Global.IEProxyExceptions, 2);
|
||||
//ProxySetting.SetProxy($"{Global.Loopback}:{port}", Global.IEProxyExceptions, 2);
|
||||
SysProxyHandle.SetIEProxy(true, true, $"{Global.Loopback}:{port}");
|
||||
}
|
||||
else if (type == 2)
|
||||
{
|
||||
string pacUrl = GetPacUrl();
|
||||
ProxySetting.SetProxy(pacUrl, "", 4);
|
||||
//ProxySetting.SetProxy(pacUrl, "", 4);
|
||||
SysProxyHandle.SetIEProxy(true, false, pacUrl);
|
||||
//PACServerHandle.Stop();
|
||||
PACServerHandle.Init(config);
|
||||
}
|
||||
else if (type == 3)
|
||||
{
|
||||
//PACServerHandle.Stop();
|
||||
ProxySetting.UnsetProxy();
|
||||
SysProxyHandle.ResetIEProxy();
|
||||
}
|
||||
else if (type == 4)
|
||||
{
|
||||
string pacUrl = GetPacUrl();
|
||||
ProxySetting.UnsetProxy();
|
||||
SysProxyHandle.ResetIEProxy();
|
||||
//PACServerHandle.Stop();
|
||||
PACServerHandle.Init(config);
|
||||
}
|
||||
else if (type == 5)
|
||||
{
|
||||
//PACServerHandle.Stop();
|
||||
//SysProxyHandle.ResetIEProxy();
|
||||
}
|
||||
else if (type == 6)
|
||||
{
|
||||
string pacUrl = GetPacUrl();
|
||||
//SysProxyHandle.ResetIEProxy();
|
||||
//PACServerHandle.Stop();
|
||||
PACServerHandle.Init(config);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ProxySetting.UnsetProxy();
|
||||
SysProxyHandle.ResetIEProxy();
|
||||
//PACServerHandle.Stop();
|
||||
}
|
||||
}
|
||||
@@ -121,6 +135,11 @@ namespace v2rayN.HttpProxyHandler
|
||||
public static void RestartHttpAgent(Config config, bool forced)
|
||||
{
|
||||
bool isRestart = false;
|
||||
if (config.listenerType == 0)
|
||||
{
|
||||
// 关闭http proxy时,直接返回
|
||||
return;
|
||||
}
|
||||
//强制重启或者socks端口变化
|
||||
if (forced)
|
||||
{
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace v2rayN.HttpProxyHandler
|
||||
if (!p.HasExited)
|
||||
{
|
||||
p.Kill();
|
||||
p.WaitForExit();
|
||||
p.WaitForExit(100);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace v2rayN.HttpProxyHandler
|
||||
}
|
||||
}
|
||||
|
||||
list.options = optionsPtr;i
|
||||
list.options = optionsPtr;
|
||||
|
||||
// and then make a pointer out of the whole list
|
||||
IntPtr ipcoListPtr = Marshal.AllocCoTaskMem((int)list.dwSize);
|
||||
|
||||
193
v2rayN/v2rayN/HttpProxyHandler/SysProxyHandle.cs
Normal file
193
v2rayN/v2rayN/HttpProxyHandler/SysProxyHandle.cs
Normal file
@@ -0,0 +1,193 @@
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using v2rayN.Base;
|
||||
using v2rayN.Mode;
|
||||
using v2rayN.Properties;
|
||||
using v2rayN.Tool;
|
||||
|
||||
namespace v2rayN.HttpProxyHandler
|
||||
{
|
||||
public static class SysProxyHandle
|
||||
{
|
||||
//private const string _userWininetConfigFile = "user-wininet.json";
|
||||
|
||||
//private static string _queryStr;
|
||||
|
||||
// In general, this won't change
|
||||
// format:
|
||||
// <flags><CR-LF>
|
||||
// <proxy-server><CR-LF>
|
||||
// <bypass-list><CR-LF>
|
||||
// <pac-url>
|
||||
private static SysproxyConfig _userSettings = null;
|
||||
|
||||
enum RET_ERRORS : int
|
||||
{
|
||||
RET_NO_ERROR = 0,
|
||||
INVALID_FORMAT = 1,
|
||||
NO_PERMISSION = 2,
|
||||
SYSCALL_FAILED = 3,
|
||||
NO_MEMORY = 4,
|
||||
INVAILD_OPTION_COUNT = 5,
|
||||
};
|
||||
|
||||
static SysProxyHandle()
|
||||
{
|
||||
try
|
||||
{
|
||||
FileManager.UncompressFile(Utils.GetTempPath("sysproxy.exe"),
|
||||
Environment.Is64BitOperatingSystem ? Resources.sysproxy64_exe : Resources.sysproxy_exe);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetIEProxy(bool enable, bool global, string strProxy)
|
||||
{
|
||||
//Read();
|
||||
|
||||
//if (!_userSettings.UserSettingsRecorded)
|
||||
//{
|
||||
// // record user settings
|
||||
// ExecSysproxy("query");
|
||||
// //ParseQueryStr(_queryStr);
|
||||
//}
|
||||
|
||||
string arguments;
|
||||
if (enable)
|
||||
{
|
||||
arguments = global
|
||||
? $"global {strProxy} {Global.IEProxyExceptions}"
|
||||
: $"pac {strProxy}";
|
||||
}
|
||||
else
|
||||
{
|
||||
// restore user settings
|
||||
var flags = _userSettings.Flags;
|
||||
var proxy_server = _userSettings.ProxyServer ?? "-";
|
||||
var bypass_list = _userSettings.BypassList ?? "-";
|
||||
var pac_url = _userSettings.PacUrl ?? "-";
|
||||
arguments = $"set {flags} {proxy_server} {bypass_list} {pac_url}";
|
||||
|
||||
// have to get new settings
|
||||
_userSettings.UserSettingsRecorded = false;
|
||||
}
|
||||
|
||||
//Save();
|
||||
ExecSysproxy(arguments);
|
||||
}
|
||||
|
||||
// set system proxy to 1 (null) (null) (null)
|
||||
public static bool ResetIEProxy()
|
||||
{
|
||||
try
|
||||
{
|
||||
// clear user-wininet.json
|
||||
//_userSettings = new SysproxyConfig();
|
||||
//Save();
|
||||
// clear system setting
|
||||
ExecSysproxy("set 1 - - -");
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static void ExecSysproxy(string arguments)
|
||||
{
|
||||
// using event to avoid hanging when redirect standard output/error
|
||||
// ref: https://stackoverflow.com/questions/139593/processstartinfo-hanging-on-waitforexit-why
|
||||
// and http://blog.csdn.net/zhangweixing0/article/details/7356841
|
||||
using (AutoResetEvent outputWaitHandle = new AutoResetEvent(false))
|
||||
using (AutoResetEvent errorWaitHandle = new AutoResetEvent(false))
|
||||
{
|
||||
using (var process = new Process())
|
||||
{
|
||||
// Configure the process using the StartInfo properties.
|
||||
process.StartInfo.FileName = Utils.GetTempPath("sysproxy.exe");
|
||||
process.StartInfo.Arguments = arguments;
|
||||
process.StartInfo.WorkingDirectory = Utils.GetTempPath();
|
||||
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
process.StartInfo.UseShellExecute = false;
|
||||
process.StartInfo.RedirectStandardError = true;
|
||||
process.StartInfo.RedirectStandardOutput = true;
|
||||
|
||||
// Need to provide encoding info, or output/error strings we got will be wrong.
|
||||
process.StartInfo.StandardOutputEncoding = Encoding.Unicode;
|
||||
process.StartInfo.StandardErrorEncoding = Encoding.Unicode;
|
||||
|
||||
process.StartInfo.CreateNoWindow = true;
|
||||
|
||||
StringBuilder output = new StringBuilder();
|
||||
StringBuilder error = new StringBuilder();
|
||||
|
||||
process.OutputDataReceived += (sender, e) =>
|
||||
{
|
||||
if (e.Data == null)
|
||||
{
|
||||
outputWaitHandle.Set();
|
||||
}
|
||||
else
|
||||
{
|
||||
output.AppendLine(e.Data);
|
||||
}
|
||||
};
|
||||
process.ErrorDataReceived += (sender, e) =>
|
||||
{
|
||||
if (e.Data == null)
|
||||
{
|
||||
errorWaitHandle.Set();
|
||||
}
|
||||
else
|
||||
{
|
||||
error.AppendLine(e.Data);
|
||||
}
|
||||
};
|
||||
try
|
||||
{
|
||||
process.Start();
|
||||
|
||||
process.BeginErrorReadLine();
|
||||
process.BeginOutputReadLine();
|
||||
|
||||
process.WaitForExit();
|
||||
}
|
||||
catch (System.ComponentModel.Win32Exception e)
|
||||
{
|
||||
|
||||
// log the arguments
|
||||
throw new Exception(process.StartInfo.Arguments);
|
||||
}
|
||||
var stderr = error.ToString();
|
||||
var stdout = output.ToString();
|
||||
|
||||
var exitCode = process.ExitCode;
|
||||
if (exitCode != (int)RET_ERRORS.RET_NO_ERROR)
|
||||
{
|
||||
throw new Exception(stderr);
|
||||
}
|
||||
|
||||
//if (arguments == "query")
|
||||
//{
|
||||
// if (stdout.IsNullOrWhiteSpace() || stdout.IsNullOrEmpty())
|
||||
// {
|
||||
// throw new Exception("failed to query wininet settings");
|
||||
// }
|
||||
// _queryStr = stdout;
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -468,7 +468,7 @@ namespace v2rayN.Mode
|
||||
get; set;
|
||||
}
|
||||
/// <summary>
|
||||
/// tcp,kcp,ws
|
||||
/// tcp,kcp,ws,h2,quic
|
||||
/// </summary>
|
||||
public string network
|
||||
{
|
||||
|
||||
@@ -281,6 +281,11 @@ namespace v2rayN.Mode
|
||||
///
|
||||
/// </summary>
|
||||
public bool enabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int concurrency { get; set; }
|
||||
}
|
||||
|
||||
public class Response
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using v2rayN.Forms;
|
||||
using v2rayN.Properties;
|
||||
@@ -31,6 +32,7 @@ namespace v2rayN
|
||||
|
||||
//AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
|
||||
|
||||
Thread.Sleep(300); // 尽量避免切换语言后提示“已经运行”
|
||||
Process instance = RunningInstance();
|
||||
if (instance == null)
|
||||
{
|
||||
@@ -40,7 +42,7 @@ namespace v2rayN
|
||||
return;
|
||||
}
|
||||
|
||||
Utils.SaveLog("v2rayN start up");
|
||||
Utils.SaveLog("v2rayN start up " + Utils.GetVersion());
|
||||
|
||||
//设置语言环境
|
||||
string lang = Utils.RegReadValue(Global.MyRegPath, Global.MyRegKeyLanguage, "zh-Hans");
|
||||
|
||||
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("v2rayN")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2019")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2020")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -33,4 +33,4 @@ using System.Runtime.InteropServices;
|
||||
// 方法是按如下所示使用“*”:
|
||||
//[assembly: AssemblyVersion("1.0.*")]
|
||||
//[assembly: AssemblyVersion("1.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.0")]
|
||||
[assembly: AssemblyFileVersion("3.8")]
|
||||
|
||||
20
v2rayN/v2rayN/Properties/Resources.Designer.cs
generated
20
v2rayN/v2rayN/Properties/Resources.Designer.cs
generated
@@ -216,5 +216,25 @@ namespace v2rayN.Properties {
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Byte[] 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static byte[] sysproxy_exe {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("sysproxy_exe", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Byte[] 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static byte[] sysproxy64_exe {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("sysproxy64_exe", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,4 +163,10 @@
|
||||
<data name="sub" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\sub.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="sysproxy64_exe" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\sysproxy64.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="sysproxy_exe" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\sysproxy.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
||||
BIN
v2rayN/v2rayN/Resources/sysproxy.exe.gz
Normal file
BIN
v2rayN/v2rayN/Resources/sysproxy.exe.gz
Normal file
Binary file not shown.
BIN
v2rayN/v2rayN/Resources/sysproxy64.exe.gz
Normal file
BIN
v2rayN/v2rayN/Resources/sysproxy64.exe.gz
Normal file
Binary file not shown.
37
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
37
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
@@ -19,7 +19,7 @@ namespace v2rayN.Resx {
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class ResUI {
|
||||
@@ -267,6 +267,24 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 {0} already up to date. 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string IsLatestCore {
|
||||
get {
|
||||
return ResourceManager.GetString("IsLatestCore", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 {0} already up to date. 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string IsLatestN {
|
||||
get {
|
||||
return ResourceManager.GetString("IsLatestN", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Address 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -574,7 +592,7 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 V2ray-core not found, download address: {0} 的本地化字符串。
|
||||
/// 查找类似 V2ray-core not found, please download: {0} 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string NotFoundCore {
|
||||
get {
|
||||
@@ -645,6 +663,15 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Servers deduplication completed. Old: {0}, New: {1}. 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string RemoveDuplicateServerResult {
|
||||
get {
|
||||
return ResourceManager.GetString("RemoveDuplicateServerResult", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Are you sure to remove the server? 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -691,7 +718,7 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 PAC failed to start. Pls with an administrator. 的本地化字符串。
|
||||
/// 查找类似 PAC failed to start. Run it with Admin right. 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string StartPacFailed {
|
||||
get {
|
||||
@@ -700,7 +727,7 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Start service ({0})...... 的本地化字符串。
|
||||
/// 查找类似 Start service ({0})... 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string StartService {
|
||||
get {
|
||||
@@ -728,7 +755,7 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Imported bulk URL from clipboard successfully 的本地化字符串。
|
||||
/// 查找类似 {0} servers have been imported from clipboard. 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string SuccessfullyImportedServerViaClipboard {
|
||||
get {
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
<value>Successfully imported custom configuration server</value>
|
||||
</data>
|
||||
<data name="SuccessfullyImportedServerViaClipboard" xml:space="preserve">
|
||||
<value>Imported bulk URL from clipboard successfully</value>
|
||||
<value>{0} servers have been imported from clipboard.</value>
|
||||
</data>
|
||||
<data name="CustomServerTips" xml:space="preserve">
|
||||
<value>Note that custom configuration relies entirely on your own configuration and does not work with all settings. The system agent is available when the socks port is equal to the port in the settings in the custom configuration inbound.</value>
|
||||
@@ -236,10 +236,16 @@
|
||||
{0}</value>
|
||||
</data>
|
||||
<data name="NotFoundCore" xml:space="preserve">
|
||||
<value>V2ray-core not found, download address: {0}</value>
|
||||
<value>V2ray-core not found, please download: {0}</value>
|
||||
</data>
|
||||
<data name="IsLatestN" xml:space="preserve">
|
||||
<value>{0} already up to date.</value>
|
||||
</data>
|
||||
<data name="IsLatestCore" xml:space="preserve">
|
||||
<value>{0} already up to date.</value>
|
||||
</data>
|
||||
<data name="StartService" xml:space="preserve">
|
||||
<value>Start service ({0})......</value>
|
||||
<value>Start service ({0})...</value>
|
||||
</data>
|
||||
<data name="LvAddress" xml:space="preserve">
|
||||
<value>Address</value>
|
||||
@@ -344,6 +350,9 @@
|
||||
<value>Total upload traffic</value>
|
||||
</data>
|
||||
<data name="StartPacFailed" xml:space="preserve">
|
||||
<value>PAC failed to start. Pls with an administrator.</value>
|
||||
<value>PAC failed to start. Run it with Admin right.</value>
|
||||
</data>
|
||||
<data name="RemoveDuplicateServerResult" xml:space="preserve">
|
||||
<value>Servers deduplication completed. Old: {0}, New: {1}.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -175,7 +175,7 @@
|
||||
<value>成功导入自定义配置服务器</value>
|
||||
</data>
|
||||
<data name="SuccessfullyImportedServerViaClipboard" xml:space="preserve">
|
||||
<value>从剪贴板导入批量URL成功</value>
|
||||
<value>成功从剪贴板导入 {0} 个服务器</value>
|
||||
</data>
|
||||
<data name="CustomServerTips" xml:space="preserve">
|
||||
<value>注意,自定义配置完全依赖您自己的配置,不能使用所有设置功能。在自定义配置inbound中有socks port等于设置中的port时,系统代理才可用</value>
|
||||
@@ -236,10 +236,16 @@
|
||||
{0}</value>
|
||||
</data>
|
||||
<data name="NotFoundCore" xml:space="preserve">
|
||||
<value>未找到v2ray-core,下载地址:{0}</value>
|
||||
<value>找不到 v2ray-core,下载地址: {0}</value>
|
||||
</data>
|
||||
<data name="IsLatestN" xml:space="preserve">
|
||||
<value>{0} 已是最新版本。</value>
|
||||
</data>
|
||||
<data name="IsLatestCore" xml:space="preserve">
|
||||
<value>{0} 已是最新版本。</value>
|
||||
</data>
|
||||
<data name="StartService" xml:space="preserve">
|
||||
<value>启动服务({0})......</value>
|
||||
<value>启动服务({0})...</value>
|
||||
</data>
|
||||
<data name="LvAddress" xml:space="preserve">
|
||||
<value>地址</value>
|
||||
@@ -254,7 +260,7 @@
|
||||
<value>端口</value>
|
||||
</data>
|
||||
<data name="LvServiceType" xml:space="preserve">
|
||||
<value>服务类型</value>
|
||||
<value>类型</value>
|
||||
</data>
|
||||
<data name="LvSubscription" xml:space="preserve">
|
||||
<value>订阅</value>
|
||||
@@ -346,4 +352,7 @@
|
||||
<data name="StartPacFailed" xml:space="preserve">
|
||||
<value>PAC服务启动失败,请用管理员启动</value>
|
||||
</data>
|
||||
<data name="RemoveDuplicateServerResult" xml:space="preserve">
|
||||
<value>服务器去重完成。原数量: {0},现数量: {1}</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -77,9 +77,18 @@ namespace v2rayN.Tool
|
||||
foreach (ZipArchiveEntry entry in archive.Entries)
|
||||
{
|
||||
if (entry.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
try
|
||||
{
|
||||
entry.ExtractToFile(Utils.GetPath(entry.Name), true);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace v2rayN
|
||||
{
|
||||
public static void Show(string msg)
|
||||
{
|
||||
MessageBox.Show(msg);
|
||||
MessageBox.Show(msg, "v2rayN", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
public static DialogResult ShowYesNo(string msg)
|
||||
|
||||
@@ -116,6 +116,8 @@
|
||||
</Reference>
|
||||
<Reference Include="System.Messaging" />
|
||||
<Reference Include="System.Net" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Net.Http.WebRequest" />
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>LIB\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
@@ -193,6 +195,7 @@
|
||||
<Compile Include="Base\WebClientEx.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HttpProxyHandler\SysProxyHandle.cs" />
|
||||
<Compile Include="Mode\EMove.cs" />
|
||||
<Compile Include="Mode\ServerStatistics.cs" />
|
||||
<Compile Include="Mode\SysproxyConfig.cs" />
|
||||
@@ -343,6 +346,8 @@
|
||||
<EmbeddedResource Include="Sample\custom_routing_block" />
|
||||
<EmbeddedResource Include="Sample\custom_routing_direct" />
|
||||
<EmbeddedResource Include="Sample\custom_routing_proxy" />
|
||||
<None Include="Resources\sysproxy.exe.gz" />
|
||||
<None Include="Resources\sysproxy64.exe.gz" />
|
||||
<Protobuf Include="Protos\Statistics.proto" />
|
||||
<None Include="Resources\abp.js.gz" />
|
||||
<None Include="Resources\pac.txt.gz" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
@@ -1,14 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace v2rayUpgrade
|
||||
@@ -16,6 +9,7 @@ namespace v2rayUpgrade
|
||||
public partial class MainForm : Form
|
||||
{
|
||||
private string[] _args;
|
||||
private string _tempFileName = "v2rayUpgradeTemp.zip";
|
||||
|
||||
|
||||
public MainForm(string[] args)
|
||||
@@ -35,9 +29,37 @@ namespace v2rayUpgrade
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var fileName = _args[0];
|
||||
Process[] existing = Process.GetProcessesByName("v2rayN");
|
||||
foreach (Process p in existing)
|
||||
{
|
||||
var path = p.MainModule.FileName;
|
||||
if (path == GetPath("v2rayN.exe"))
|
||||
{
|
||||
p.Kill();
|
||||
p.WaitForExit(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Failed to close v2rayN(关闭v2rayN失败)." + ex.StackTrace);
|
||||
return;
|
||||
}
|
||||
|
||||
var fileName = GetPath(_tempFileName);
|
||||
try
|
||||
{
|
||||
File.Delete(fileName);
|
||||
File.Copy(_args[0], fileName);
|
||||
if (!File.Exists(fileName))
|
||||
{
|
||||
MessageBox.Show("Upgrade Failed, File Not Exist(升级失败,文件不存在).");
|
||||
return;
|
||||
}
|
||||
|
||||
var startKey = "v2rayN/";
|
||||
|
||||
using (ZipArchive archive = ZipFile.OpenRead(fileName))
|
||||
@@ -62,11 +84,15 @@ namespace v2rayUpgrade
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Upgrade Failed(升级失败)");
|
||||
MessageBox.Show("Upgrade Failed(升级失败)." + ex.StackTrace);
|
||||
return;
|
||||
}
|
||||
finally
|
||||
{
|
||||
File.Delete(fileName);
|
||||
}
|
||||
|
||||
MessageBox.Show("Upgrade successed(升级成功)");
|
||||
|
||||
|
||||
44
v2rayN/v2rayUpgrade/Properties/Resources.Designer.cs
generated
44
v2rayN/v2rayUpgrade/Properties/Resources.Designer.cs
generated
@@ -3,47 +3,42 @@
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace v2rayUpgrade.Properties
|
||||
{
|
||||
namespace v2rayUpgrade.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 强类型资源类,用于查找本地化字符串等。
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存 ResourceManager 实例。
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("v2rayUpgrade.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
@@ -52,18 +47,15 @@ namespace v2rayUpgrade.Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 覆盖当前线程的 CurrentUICulture 属性
|
||||
/// 使用此强类型的资源类的资源查找。
|
||||
/// 重写当前线程的 CurrentUICulture 属性
|
||||
/// 重写当前线程的 CurrentUICulture 属性。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
22
v2rayN/v2rayUpgrade/Properties/Settings.Designer.cs
generated
22
v2rayN/v2rayUpgrade/Properties/Settings.Designer.cs
generated
@@ -1,28 +1,24 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace v2rayUpgrade.Properties
|
||||
{
|
||||
namespace v2rayUpgrade.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,10 +8,11 @@
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>v2rayUpgrade</RootNamespace>
|
||||
<AssemblyName>v2rayUpgrade</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -22,6 +23,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -67,6 +69,7 @@
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
|
||||
Reference in New Issue
Block a user