Compare commits
102 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
737d563ebb | ||
|
|
81b70195cf | ||
|
|
e60851153b | ||
|
|
009a15f0d9 | ||
|
|
f234775bd5 | ||
|
|
9b8bd0fa8a | ||
|
|
f74191946c | ||
|
|
ffa8b6296d | ||
|
|
0b2a392de2 | ||
|
|
f6b044c10c | ||
|
|
88c87aec0e | ||
|
|
b632dee0ce | ||
|
|
0db772aaeb | ||
|
|
fedfed4028 | ||
|
|
3b27e7be36 | ||
|
|
78402118ef | ||
|
|
aa3094f796 | ||
|
|
20498ce453 | ||
|
|
56559e6509 | ||
|
|
9549d17b03 | ||
|
|
a822fa9766 | ||
|
|
dee4b19775 | ||
|
|
f4b885dce5 | ||
|
|
2c02285def | ||
|
|
be7d76947b | ||
|
|
a81254dfff | ||
|
|
cb24a909ae | ||
|
|
8a87318b68 | ||
|
|
219f544a43 | ||
|
|
46c887537e | ||
|
|
8cf66da07c | ||
|
|
57bcf8a1a7 | ||
|
|
05efff10da | ||
|
|
414ac3225a | ||
|
|
0a8e822f35 | ||
|
|
301d1dd998 | ||
|
|
621565f4a4 | ||
|
|
6f51d447c7 | ||
|
|
f9c7556c54 | ||
|
|
32b98524ff | ||
|
|
efaec3ee17 | ||
|
|
28826cad1b | ||
|
|
ca9840abf4 | ||
|
|
8813d66274 | ||
|
|
da2b0f7dd4 | ||
|
|
b1773dab90 | ||
|
|
9538a67be1 | ||
|
|
fbfbc811d4 | ||
|
|
1c04b752cd | ||
|
|
3b1a2287d5 | ||
|
|
f3e6bd2736 | ||
|
|
4e449811e7 | ||
|
|
910be7f471 | ||
|
|
1e088f851b | ||
|
|
a0b0ad53d2 | ||
|
|
5b3f09aaf7 | ||
|
|
f48468029e | ||
|
|
c837ba5482 | ||
|
|
2708ff7c1a | ||
|
|
1722e50402 | ||
|
|
244da05e70 | ||
|
|
0c26662602 | ||
|
|
2f65575fdf | ||
|
|
b1814c246a | ||
|
|
fd4af7c90c | ||
|
|
d337d4bc7b | ||
|
|
da96e75ad5 | ||
|
|
04e50d521a | ||
|
|
93aad41181 | ||
|
|
ab025b39f4 | ||
|
|
7b2bd8876d | ||
|
|
033f83465f | ||
|
|
e5547307b3 | ||
|
|
82f77b41ba | ||
|
|
8e37712175 | ||
|
|
3b06b553eb | ||
|
|
5de50009d2 | ||
|
|
56a8521893 | ||
|
|
33d541f067 | ||
|
|
957ffa203d | ||
|
|
3af13d64f3 | ||
|
|
f1e51ae1a3 | ||
|
|
6d2a1e0e9c | ||
|
|
ac2d71d7b0 | ||
|
|
002a8c505c | ||
|
|
49355da702 | ||
|
|
3b38dc51ba | ||
|
|
3a27b56cc1 | ||
|
|
fbb9c3cd64 | ||
|
|
07bdcb5491 | ||
|
|
01ac3be89f | ||
|
|
5f90b5b4c4 | ||
|
|
a616ba50c2 | ||
|
|
3ebaabc1ef | ||
|
|
1510549663 | ||
|
|
db0a757a49 | ||
|
|
20ab51e339 | ||
|
|
948b9c26d9 | ||
|
|
300a4d8067 | ||
|
|
a65afd7524 | ||
|
|
d8458e84f4 | ||
|
|
a6664fbc01 |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -5,10 +5,9 @@
|
||||
/v2rayN/.vs/
|
||||
/v2rayN/v2rayN/bin/Debug/app.publish
|
||||
/v2rayN/v2rayN/bin/Debug
|
||||
/v2rayN/v2rayN/obj/Debug
|
||||
/v2rayN/.vs/v2rayN/DesignTimeBuild
|
||||
/v2rayN/v2rayN/bin/Release
|
||||
/v2rayN/v2rayN/obj/Release
|
||||
/v2rayN/v2rayN/obj/
|
||||
/v2rayN/.vs/v2rayN/DesignTimeBuild
|
||||
/v2rayN/packages
|
||||
.vs/ProjectSettings.json
|
||||
.vs/slnx.sqlite
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# v2rayN
|
||||
|
||||
### How to use
|
||||
- Download exe from release download
|
||||
- Also need to download v2ray core in the same folder
|
||||
- If you are newbie please download v2rayN-Core.zip from releases
|
||||
- Otherwise please download v2rayN.zip (Also need to download v2ray core in the same folder)
|
||||
- Run v2rayN.exe
|
||||
|
||||
### Requirements
|
||||
|
||||
@@ -18,37 +18,31 @@ namespace v2rayN.Base
|
||||
{
|
||||
try
|
||||
{
|
||||
int count = this.Columns.Count;
|
||||
int MaxWidth = 0;
|
||||
this.SuspendLayout();
|
||||
Graphics graphics = this.CreateGraphics();
|
||||
Font font = this.Font;
|
||||
ListViewItemCollection items = this.Items;
|
||||
|
||||
string str;
|
||||
int width;
|
||||
|
||||
// 原生 ColumnHeaderAutoResizeStyle.ColumnContent 将忽略列头宽度
|
||||
this.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
for (int i = 0; i < this.Columns.Count; i++)
|
||||
{
|
||||
str = this.Columns[i].Text;
|
||||
MaxWidth = this.Columns[i].Width;
|
||||
ColumnHeader c = this.Columns[i];
|
||||
int cWidth = c.Width;
|
||||
string MaxStr = "";
|
||||
Font font = this.Items[0].SubItems[0].Font;
|
||||
|
||||
foreach (ListViewItem item in items)
|
||||
foreach (ListViewItem item in this.Items)
|
||||
{
|
||||
str = item.SubItems[i].Text;
|
||||
width = (int)graphics.MeasureString(str, font).Width;
|
||||
if (width > MaxWidth)
|
||||
{
|
||||
MaxWidth = width;
|
||||
}
|
||||
// 整行视作相同字形,不单独计算每个单元格
|
||||
font = item.SubItems[i].Font;
|
||||
string str = item.SubItems[i].Text;
|
||||
if (str.Length > MaxStr.Length) // 未考虑非等宽问题
|
||||
MaxStr = str;
|
||||
}
|
||||
if (i == 0)
|
||||
{
|
||||
this.Columns[i].Width = MaxWidth;
|
||||
}
|
||||
this.Columns[i].Width = MaxWidth;
|
||||
int strWidth = (int)graphics.MeasureString(MaxStr, font).Width;
|
||||
c.Width = System.Math.Max(cWidth, strWidth);
|
||||
}
|
||||
this.ResumeLayout();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
40
v2rayN/v2rayN/Forms/AddServerForm.Designer.cs
generated
40
v2rayN/v2rayN/Forms/AddServerForm.Designer.cs
generated
@@ -37,7 +37,6 @@
|
||||
this.label24 = new System.Windows.Forms.Label();
|
||||
this.label23 = new System.Windows.Forms.Label();
|
||||
this.panTlsMore = new System.Windows.Forms.Panel();
|
||||
this.label22 = new System.Windows.Forms.Label();
|
||||
this.label21 = new System.Windows.Forms.Label();
|
||||
this.cmbAllowInsecure = new System.Windows.Forms.ComboBox();
|
||||
this.label20 = new System.Windows.Forms.Label();
|
||||
@@ -88,14 +87,15 @@
|
||||
//
|
||||
// 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);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
resources.ApplyResources(this.groupBox1, "groupBox1");
|
||||
this.groupBox1.Controls.Add(this.btnGUID);
|
||||
this.groupBox1.Controls.Add(this.label13);
|
||||
this.groupBox1.Controls.Add(this.groupBox2);
|
||||
@@ -115,7 +115,6 @@
|
||||
this.groupBox1.Controls.Add(this.label2);
|
||||
this.groupBox1.Controls.Add(this.txtAddress);
|
||||
this.groupBox1.Controls.Add(this.label1);
|
||||
resources.ApplyResources(this.groupBox1, "groupBox1");
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.TabStop = false;
|
||||
//
|
||||
@@ -133,6 +132,7 @@
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
resources.ApplyResources(this.groupBox2, "groupBox2");
|
||||
this.groupBox2.Controls.Add(this.label24);
|
||||
this.groupBox2.Controls.Add(this.label23);
|
||||
this.groupBox2.Controls.Add(this.panTlsMore);
|
||||
@@ -150,7 +150,6 @@
|
||||
this.groupBox2.Controls.Add(this.label11);
|
||||
this.groupBox2.Controls.Add(this.label10);
|
||||
this.groupBox2.Controls.Add(this.cmbHeaderType);
|
||||
resources.ApplyResources(this.groupBox2, "groupBox2");
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.TabStop = false;
|
||||
//
|
||||
@@ -166,17 +165,11 @@
|
||||
//
|
||||
// panTlsMore
|
||||
//
|
||||
this.panTlsMore.Controls.Add(this.label22);
|
||||
resources.ApplyResources(this.panTlsMore, "panTlsMore");
|
||||
this.panTlsMore.Controls.Add(this.label21);
|
||||
this.panTlsMore.Controls.Add(this.cmbAllowInsecure);
|
||||
resources.ApplyResources(this.panTlsMore, "panTlsMore");
|
||||
this.panTlsMore.Name = "panTlsMore";
|
||||
//
|
||||
// label22
|
||||
//
|
||||
resources.ApplyResources(this.label22, "label22");
|
||||
this.label22.Name = "label22";
|
||||
//
|
||||
// label21
|
||||
//
|
||||
resources.ApplyResources(this.label21, "label21");
|
||||
@@ -184,13 +177,13 @@
|
||||
//
|
||||
// cmbAllowInsecure
|
||||
//
|
||||
resources.ApplyResources(this.cmbAllowInsecure, "cmbAllowInsecure");
|
||||
this.cmbAllowInsecure.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbAllowInsecure.FormattingEnabled = true;
|
||||
this.cmbAllowInsecure.Items.AddRange(new object[] {
|
||||
resources.GetString("cmbAllowInsecure.Items"),
|
||||
resources.GetString("cmbAllowInsecure.Items1"),
|
||||
resources.GetString("cmbAllowInsecure.Items2")});
|
||||
resources.ApplyResources(this.cmbAllowInsecure, "cmbAllowInsecure");
|
||||
this.cmbAllowInsecure.Name = "cmbAllowInsecure";
|
||||
//
|
||||
// label20
|
||||
@@ -235,12 +228,12 @@
|
||||
//
|
||||
// cmbStreamSecurity
|
||||
//
|
||||
resources.ApplyResources(this.cmbStreamSecurity, "cmbStreamSecurity");
|
||||
this.cmbStreamSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbStreamSecurity.FormattingEnabled = true;
|
||||
this.cmbStreamSecurity.Items.AddRange(new object[] {
|
||||
resources.GetString("cmbStreamSecurity.Items"),
|
||||
resources.GetString("cmbStreamSecurity.Items1")});
|
||||
resources.ApplyResources(this.cmbStreamSecurity, "cmbStreamSecurity");
|
||||
this.cmbStreamSecurity.Name = "cmbStreamSecurity";
|
||||
this.cmbStreamSecurity.SelectedIndexChanged += new System.EventHandler(this.cmbStreamSecurity_SelectedIndexChanged);
|
||||
//
|
||||
@@ -266,6 +259,7 @@
|
||||
//
|
||||
// cmbHeaderType
|
||||
//
|
||||
resources.ApplyResources(this.cmbHeaderType, "cmbHeaderType");
|
||||
this.cmbHeaderType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbHeaderType.FormattingEnabled = true;
|
||||
this.cmbHeaderType.Items.AddRange(new object[] {
|
||||
@@ -276,7 +270,6 @@
|
||||
resources.GetString("cmbHeaderType.Items4"),
|
||||
resources.GetString("cmbHeaderType.Items5"),
|
||||
resources.GetString("cmbHeaderType.Items6")});
|
||||
resources.ApplyResources(this.cmbHeaderType, "cmbHeaderType");
|
||||
this.cmbHeaderType.Name = "cmbHeaderType";
|
||||
//
|
||||
// label9
|
||||
@@ -291,6 +284,7 @@
|
||||
//
|
||||
// cmbNetwork
|
||||
//
|
||||
resources.ApplyResources(this.cmbNetwork, "cmbNetwork");
|
||||
this.cmbNetwork.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbNetwork.FormattingEnabled = true;
|
||||
this.cmbNetwork.Items.AddRange(new object[] {
|
||||
@@ -299,7 +293,6 @@
|
||||
resources.GetString("cmbNetwork.Items2"),
|
||||
resources.GetString("cmbNetwork.Items3"),
|
||||
resources.GetString("cmbNetwork.Items4")});
|
||||
resources.ApplyResources(this.cmbNetwork, "cmbNetwork");
|
||||
this.cmbNetwork.Name = "cmbNetwork";
|
||||
this.cmbNetwork.SelectedIndexChanged += new System.EventHandler(this.cmbNetwork_SelectedIndexChanged);
|
||||
//
|
||||
@@ -310,6 +303,7 @@
|
||||
//
|
||||
// cmbSecurity
|
||||
//
|
||||
resources.ApplyResources(this.cmbSecurity, "cmbSecurity");
|
||||
this.cmbSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbSecurity.FormattingEnabled = true;
|
||||
this.cmbSecurity.Items.AddRange(new object[] {
|
||||
@@ -317,7 +311,6 @@
|
||||
resources.GetString("cmbSecurity.Items1"),
|
||||
resources.GetString("cmbSecurity.Items2"),
|
||||
resources.GetString("cmbSecurity.Items3")});
|
||||
resources.ApplyResources(this.cmbSecurity, "cmbSecurity");
|
||||
this.cmbSecurity.Name = "cmbSecurity";
|
||||
//
|
||||
// txtRemarks
|
||||
@@ -377,9 +370,9 @@
|
||||
//
|
||||
// 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
|
||||
@@ -396,42 +389,42 @@
|
||||
//
|
||||
// menuServer
|
||||
//
|
||||
resources.ApplyResources(this.menuServer, "menuServer");
|
||||
this.menuServer.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.MenuItem1});
|
||||
resources.ApplyResources(this.menuServer, "menuServer");
|
||||
this.menuServer.Name = "menuServer";
|
||||
//
|
||||
// MenuItem1
|
||||
//
|
||||
resources.ApplyResources(this.MenuItem1, "MenuItem1");
|
||||
this.MenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.MenuItemImportClient,
|
||||
this.MenuItemImportServer,
|
||||
this.toolStripSeparator1,
|
||||
this.MenuItemImportClipboard});
|
||||
this.MenuItem1.Name = "MenuItem1";
|
||||
resources.ApplyResources(this.MenuItem1, "MenuItem1");
|
||||
//
|
||||
// MenuItemImportClient
|
||||
//
|
||||
this.MenuItemImportClient.Name = "MenuItemImportClient";
|
||||
resources.ApplyResources(this.MenuItemImportClient, "MenuItemImportClient");
|
||||
this.MenuItemImportClient.Name = "MenuItemImportClient";
|
||||
this.MenuItemImportClient.Click += new System.EventHandler(this.MenuItemImportClient_Click);
|
||||
//
|
||||
// MenuItemImportServer
|
||||
//
|
||||
this.MenuItemImportServer.Name = "MenuItemImportServer";
|
||||
resources.ApplyResources(this.MenuItemImportServer, "MenuItemImportServer");
|
||||
this.MenuItemImportServer.Name = "MenuItemImportServer";
|
||||
this.MenuItemImportServer.Click += new System.EventHandler(this.MenuItemImportServer_Click);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
//
|
||||
// MenuItemImportClipboard
|
||||
//
|
||||
this.MenuItemImportClipboard.Name = "MenuItemImportClipboard";
|
||||
resources.ApplyResources(this.MenuItemImportClipboard, "MenuItemImportClipboard");
|
||||
this.MenuItemImportClipboard.Name = "MenuItemImportClipboard";
|
||||
this.MenuItemImportClipboard.Click += new System.EventHandler(this.MenuItemImportClipboard_Click);
|
||||
//
|
||||
// AddServerForm
|
||||
@@ -508,7 +501,6 @@
|
||||
private System.Windows.Forms.Label label20;
|
||||
private System.Windows.Forms.Label label21;
|
||||
private System.Windows.Forms.ComboBox cmbAllowInsecure;
|
||||
private System.Windows.Forms.Label label22;
|
||||
private System.Windows.Forms.Panel panTlsMore;
|
||||
private System.Windows.Forms.Label label24;
|
||||
private System.Windows.Forms.Label label23;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -117,64 +117,55 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>编辑或添加[VMess]服务器</value>
|
||||
</data>
|
||||
<data name="btnClose.Text" xml:space="preserve">
|
||||
<value>取消(&C)</value>
|
||||
</data>
|
||||
<data name="btnGUID.Text" xml:space="preserve">
|
||||
<value>生成(&G)</value>
|
||||
</data>
|
||||
<data name="btnOK.Text" xml:space="preserve">
|
||||
<value>确定(&O)</value>
|
||||
</data>
|
||||
<data name="cmbNetwork.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 171</value>
|
||||
</data>
|
||||
<data name="cmbNetwork.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>211, 20</value>
|
||||
</data>
|
||||
<data name="cmbSecurity.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 143</value>
|
||||
</data>
|
||||
<data name="cmbSecurity.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>211, 20</value>
|
||||
</data>
|
||||
<data name="groupBox1.Text" xml:space="preserve">
|
||||
<value>服务器</value>
|
||||
</data>
|
||||
<data name="groupBox2.Text" xml:space="preserve">
|
||||
<value>不清楚则保持默认值</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>83, 12</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>地址(address)</value>
|
||||
</data>
|
||||
<data name="label10.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>89, 12</value>
|
||||
</data>
|
||||
<data name="label10.Text" xml:space="preserve">
|
||||
<value>伪装域名(host)</value>
|
||||
</data>
|
||||
<data name="label11.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>89, 12</value>
|
||||
</data>
|
||||
<data name="label11.Text" xml:space="preserve">
|
||||
<value>伪装类型(type)</value>
|
||||
</data>
|
||||
<data name="label12.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>197, 12</value>
|
||||
</data>
|
||||
<data name="label12.Text" xml:space="preserve">
|
||||
<value>*tcp或kcp或QUIC伪装类型,默认none</value>
|
||||
<data name="btnGUID.Text" xml:space="preserve">
|
||||
<value>生成(&G)</value>
|
||||
</data>
|
||||
<data name="label13.Text" xml:space="preserve">
|
||||
<value>*手填,方便识别管理</value>
|
||||
</data>
|
||||
<data name="groupBox2.Text" xml:space="preserve">
|
||||
<value>不清楚则保持默认值</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="label24.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>95, 12</value>
|
||||
</data>
|
||||
<data name="label24.Text" xml:space="preserve">
|
||||
<value>3)QUIC 加密密钥</value>
|
||||
</data>
|
||||
<data name="label23.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>95, 12</value>
|
||||
</data>
|
||||
<data name="label23.Text" xml:space="preserve">
|
||||
<value>4)QUIC 加密方式</value>
|
||||
</data>
|
||||
<data name="label21.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>203, 12</value>
|
||||
</data>
|
||||
<data name="label21.Text" xml:space="preserve">
|
||||
<value>允许不安全连接(allowInsecure)</value>
|
||||
</data>
|
||||
<data name="cmbAllowInsecure.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>223, 7</value>
|
||||
</data>
|
||||
<data name="label20.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>149, 12</value>
|
||||
</data>
|
||||
<data name="label20.Text" xml:space="preserve">
|
||||
<value>3)h2 host中间逗号(,)隔开</value>
|
||||
</data>
|
||||
<data name="label19.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>65, 12</value>
|
||||
</data>
|
||||
<data name="label19.Text" xml:space="preserve">
|
||||
<value>路径(path)</value>
|
||||
</data>
|
||||
<data name="label14.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>161, 12</value>
|
||||
</data>
|
||||
@@ -187,71 +178,35 @@
|
||||
<data name="label15.Text" xml:space="preserve">
|
||||
<value>底层传输安全</value>
|
||||
</data>
|
||||
<data name="label19.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>65, 12</value>
|
||||
<data name="label12.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>197, 12</value>
|
||||
</data>
|
||||
<data name="label19.Text" xml:space="preserve">
|
||||
<value>路径(path)</value>
|
||||
<data name="label12.Text" xml:space="preserve">
|
||||
<value>*tcp或kcp或QUIC伪装类型,默认none</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>65, 12</value>
|
||||
<data name="txtRequestHost.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>124, 58</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>端口(port)</value>
|
||||
<data name="txtRequestHost.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>334, 51</value>
|
||||
</data>
|
||||
<data name="label20.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>149, 12</value>
|
||||
<data name="label11.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>89, 12</value>
|
||||
</data>
|
||||
<data name="label20.Text" xml:space="preserve">
|
||||
<value>3)h2 host中间逗号(,)隔开</value>
|
||||
<data name="label11.Text" xml:space="preserve">
|
||||
<value>伪装类型(type)</value>
|
||||
</data>
|
||||
<data name="label22.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 12</value>
|
||||
<data name="label10.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>89, 12</value>
|
||||
</data>
|
||||
<data name="label22.Text" xml:space="preserve">
|
||||
<value>默认true</value>
|
||||
<data name="label10.Text" xml:space="preserve">
|
||||
<value>伪装域名(host)</value>
|
||||
</data>
|
||||
<data name="label23.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>95, 12</value>
|
||||
<data name="label9.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>143, 12</value>
|
||||
</data>
|
||||
<data name="label23.Text" xml:space="preserve">
|
||||
<value>4)QUIC 加密方式</value>
|
||||
</data>
|
||||
<data name="label24.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>95, 12</value>
|
||||
</data>
|
||||
<data name="label24.Text" xml:space="preserve">
|
||||
<value>3)QUIC 加密密钥</value>
|
||||
</data>
|
||||
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>65, 12</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>用户ID(id)</value>
|
||||
</data>
|
||||
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>95, 12</value>
|
||||
</data>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>额外ID(alterId)</value>
|
||||
</data>
|
||||
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>113, 12</value>
|
||||
</data>
|
||||
<data name="label5.Text" xml:space="preserve">
|
||||
<value>加密方式(security)</value>
|
||||
</data>
|
||||
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>83, 12</value>
|
||||
</data>
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>别名(remarks)</value>
|
||||
</data>
|
||||
<data name="label7.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>107, 12</value>
|
||||
</data>
|
||||
<data name="label7.Text" xml:space="preserve">
|
||||
<value>传输协议(network)</value>
|
||||
<data name="label9.Text" xml:space="preserve">
|
||||
<value>*默认tcp,选错会无法连接</value>
|
||||
</data>
|
||||
<data name="label8.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>113, 12</value>
|
||||
@@ -259,11 +214,62 @@
|
||||
<data name="label8.Text" xml:space="preserve">
|
||||
<value>*随便选,建议(auto)</value>
|
||||
</data>
|
||||
<data name="label9.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>143, 12</value>
|
||||
<data name="cmbNetwork.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 171</value>
|
||||
</data>
|
||||
<data name="label9.Text" xml:space="preserve">
|
||||
<value>*默认tcp,选错会无法连接</value>
|
||||
<data name="cmbNetwork.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>211, 20</value>
|
||||
</data>
|
||||
<data name="label7.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>107, 12</value>
|
||||
</data>
|
||||
<data name="label7.Text" xml:space="preserve">
|
||||
<value>传输协议(network)</value>
|
||||
</data>
|
||||
<data name="cmbSecurity.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 143</value>
|
||||
</data>
|
||||
<data name="cmbSecurity.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>211, 20</value>
|
||||
</data>
|
||||
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>83, 12</value>
|
||||
</data>
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>别名(remarks)</value>
|
||||
</data>
|
||||
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>113, 12</value>
|
||||
</data>
|
||||
<data name="label5.Text" xml:space="preserve">
|
||||
<value>加密方式(security)</value>
|
||||
</data>
|
||||
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>95, 12</value>
|
||||
</data>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>额外ID(alterId)</value>
|
||||
</data>
|
||||
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>65, 12</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>用户ID(id)</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>65, 12</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>端口(port)</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>83, 12</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>地址(address)</value>
|
||||
</data>
|
||||
<data name="btnOK.Text" xml:space="preserve">
|
||||
<value>确定(&O)</value>
|
||||
</data>
|
||||
<data name="MenuItem1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>92, 21</value>
|
||||
@@ -277,12 +283,6 @@
|
||||
<data name="MenuItemImportClient.Text" xml:space="preserve">
|
||||
<value>导入客户端配置</value>
|
||||
</data>
|
||||
<data name="MenuItemImportClipboard.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>171, 22</value>
|
||||
</data>
|
||||
<data name="MenuItemImportClipboard.Text" xml:space="preserve">
|
||||
<value>从剪贴板导入URL</value>
|
||||
</data>
|
||||
<data name="MenuItemImportServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>171, 22</value>
|
||||
</data>
|
||||
@@ -292,10 +292,13 @@
|
||||
<data name="toolStripSeparator1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 6</value>
|
||||
</data>
|
||||
<data name="txtRequestHost.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>124, 58</value>
|
||||
<data name="MenuItemImportClipboard.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>171, 22</value>
|
||||
</data>
|
||||
<data name="txtRequestHost.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>334, 51</value>
|
||||
<data name="MenuItemImportClipboard.Text" xml:space="preserve">
|
||||
<value>从剪贴板导入URL</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>编辑或添加[VMess]服务器</value>
|
||||
</data>
|
||||
</root>
|
||||
243
v2rayN/v2rayN/Forms/MainForm.Designer.cs
generated
243
v2rayN/v2rayN/Forms/MainForm.Designer.cs
generated
@@ -30,7 +30,7 @@
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.scMain = new System.Windows.Forms.SplitContainer();
|
||||
this.lvServers = new v2rayN.Base.ListViewFlickerFree();
|
||||
this.cmsLv = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.menuAddVmessServer = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -55,6 +55,7 @@
|
||||
this.menuTcpingServer = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuRealPingServer = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuSpeedServer = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tsbTestMe = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.menuExport2ClientConfig = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuExport2ServerConfig = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -101,12 +102,11 @@
|
||||
this.tsbSub = new System.Windows.Forms.ToolStripDropDownButton();
|
||||
this.tsbSubSetting = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tsbSubUpdate = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tsbQRCodeSwitch = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.tsbOptionSetting = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.tsbService = new System.Windows.Forms.ToolStripDropDownButton();
|
||||
this.tsbReload = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tsbTestMe = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tsbReload = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.tsbCheckUpdate = new System.Windows.Forms.ToolStripDropDownButton();
|
||||
this.tsbCheckUpdateN = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -124,10 +124,10 @@
|
||||
this.tsbPromotion = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.tsbClose = new System.Windows.Forms.ToolStripButton();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.scMain)).BeginInit();
|
||||
this.scMain.Panel1.SuspendLayout();
|
||||
this.scMain.Panel2.SuspendLayout();
|
||||
this.scMain.SuspendLayout();
|
||||
this.cmsLv.SuspendLayout();
|
||||
this.cmsMain.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
@@ -136,27 +136,25 @@
|
||||
this.tsMain.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
// scMain
|
||||
//
|
||||
resources.ApplyResources(this.splitContainer1, "splitContainer1");
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
resources.ApplyResources(this.scMain, "scMain");
|
||||
this.scMain.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.scMain.Name = "scMain";
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
// scMain.Panel1
|
||||
//
|
||||
resources.ApplyResources(this.splitContainer1.Panel1, "splitContainer1.Panel1");
|
||||
this.splitContainer1.Panel1.Controls.Add(this.lvServers);
|
||||
this.scMain.Panel1.Controls.Add(this.lvServers);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
// scMain.Panel2
|
||||
//
|
||||
resources.ApplyResources(this.splitContainer1.Panel2, "splitContainer1.Panel2");
|
||||
this.splitContainer1.Panel2.Controls.Add(this.qrCodeControl);
|
||||
this.splitContainer1.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.splitContainer1_SplitterMoved);
|
||||
this.scMain.Panel2.Controls.Add(this.qrCodeControl);
|
||||
this.scMain.TabStop = false;
|
||||
//
|
||||
// lvServers
|
||||
//
|
||||
resources.ApplyResources(this.lvServers, "lvServers");
|
||||
this.lvServers.ContextMenuStrip = this.cmsLv;
|
||||
resources.ApplyResources(this.lvServers, "lvServers");
|
||||
this.lvServers.FullRowSelect = true;
|
||||
this.lvServers.GridLines = true;
|
||||
this.lvServers.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
|
||||
@@ -167,6 +165,7 @@
|
||||
this.lvServers.Name = "lvServers";
|
||||
this.lvServers.UseCompatibleStateImageBehavior = false;
|
||||
this.lvServers.View = System.Windows.Forms.View.Details;
|
||||
this.lvServers.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.lvServers_ColumnClick);
|
||||
this.lvServers.SelectedIndexChanged += new System.EventHandler(this.lvServers_SelectedIndexChanged);
|
||||
this.lvServers.Click += new System.EventHandler(this.lvServers_Click);
|
||||
this.lvServers.DoubleClick += new System.EventHandler(this.lvServers_DoubleClick);
|
||||
@@ -174,7 +173,6 @@
|
||||
//
|
||||
// cmsLv
|
||||
//
|
||||
resources.ApplyResources(this.cmsLv, "cmsLv");
|
||||
this.cmsLv.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||
this.cmsLv.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.menuAddVmessServer,
|
||||
@@ -199,6 +197,7 @@
|
||||
this.menuTcpingServer,
|
||||
this.menuRealPingServer,
|
||||
this.menuSpeedServer,
|
||||
this.tsbTestMe,
|
||||
this.toolStripSeparator6,
|
||||
this.menuExport2ClientConfig,
|
||||
this.menuExport2ServerConfig,
|
||||
@@ -206,170 +205,177 @@
|
||||
this.menuExport2SubContent});
|
||||
this.cmsLv.Name = "cmsLv";
|
||||
this.cmsLv.OwnerItem = this.tsbServer;
|
||||
resources.ApplyResources(this.cmsLv, "cmsLv");
|
||||
//
|
||||
// menuAddVmessServer
|
||||
//
|
||||
resources.ApplyResources(this.menuAddVmessServer, "menuAddVmessServer");
|
||||
this.menuAddVmessServer.Name = "menuAddVmessServer";
|
||||
resources.ApplyResources(this.menuAddVmessServer, "menuAddVmessServer");
|
||||
this.menuAddVmessServer.Click += new System.EventHandler(this.menuAddVmessServer_Click);
|
||||
//
|
||||
// menuAddShadowsocksServer
|
||||
//
|
||||
resources.ApplyResources(this.menuAddShadowsocksServer, "menuAddShadowsocksServer");
|
||||
this.menuAddShadowsocksServer.Name = "menuAddShadowsocksServer";
|
||||
resources.ApplyResources(this.menuAddShadowsocksServer, "menuAddShadowsocksServer");
|
||||
this.menuAddShadowsocksServer.Click += new System.EventHandler(this.menuAddShadowsocksServer_Click);
|
||||
//
|
||||
// menuAddSocksServer
|
||||
//
|
||||
resources.ApplyResources(this.menuAddSocksServer, "menuAddSocksServer");
|
||||
this.menuAddSocksServer.Name = "menuAddSocksServer";
|
||||
resources.ApplyResources(this.menuAddSocksServer, "menuAddSocksServer");
|
||||
this.menuAddSocksServer.Click += new System.EventHandler(this.menuAddSocksServer_Click);
|
||||
//
|
||||
// menuAddCustomServer
|
||||
//
|
||||
resources.ApplyResources(this.menuAddCustomServer, "menuAddCustomServer");
|
||||
this.menuAddCustomServer.Name = "menuAddCustomServer";
|
||||
resources.ApplyResources(this.menuAddCustomServer, "menuAddCustomServer");
|
||||
this.menuAddCustomServer.Click += new System.EventHandler(this.menuAddCustomServer_Click);
|
||||
//
|
||||
// menuAddServers
|
||||
//
|
||||
resources.ApplyResources(this.menuAddServers, "menuAddServers");
|
||||
this.menuAddServers.Name = "menuAddServers";
|
||||
resources.ApplyResources(this.menuAddServers, "menuAddServers");
|
||||
this.menuAddServers.Click += new System.EventHandler(this.menuAddServers_Click);
|
||||
//
|
||||
// menuScanScreen
|
||||
//
|
||||
resources.ApplyResources(this.menuScanScreen, "menuScanScreen");
|
||||
this.menuScanScreen.Name = "menuScanScreen";
|
||||
resources.ApplyResources(this.menuScanScreen, "menuScanScreen");
|
||||
this.menuScanScreen.Click += new System.EventHandler(this.menuScanScreen_Click);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
|
||||
//
|
||||
// menuRemoveServer
|
||||
//
|
||||
resources.ApplyResources(this.menuRemoveServer, "menuRemoveServer");
|
||||
this.menuRemoveServer.Name = "menuRemoveServer";
|
||||
resources.ApplyResources(this.menuRemoveServer, "menuRemoveServer");
|
||||
this.menuRemoveServer.Click += new System.EventHandler(this.menuRemoveServer_Click);
|
||||
//
|
||||
// menuRemoveDuplicateServer
|
||||
//
|
||||
resources.ApplyResources(this.menuRemoveDuplicateServer, "menuRemoveDuplicateServer");
|
||||
this.menuRemoveDuplicateServer.Name = "menuRemoveDuplicateServer";
|
||||
resources.ApplyResources(this.menuRemoveDuplicateServer, "menuRemoveDuplicateServer");
|
||||
this.menuRemoveDuplicateServer.Click += new System.EventHandler(this.menuRemoveDuplicateServer_Click);
|
||||
//
|
||||
// menuCopyServer
|
||||
//
|
||||
resources.ApplyResources(this.menuCopyServer, "menuCopyServer");
|
||||
this.menuCopyServer.Name = "menuCopyServer";
|
||||
resources.ApplyResources(this.menuCopyServer, "menuCopyServer");
|
||||
this.menuCopyServer.Click += new System.EventHandler(this.menuCopyServer_Click);
|
||||
//
|
||||
// menuSetDefaultServer
|
||||
//
|
||||
resources.ApplyResources(this.menuSetDefaultServer, "menuSetDefaultServer");
|
||||
this.menuSetDefaultServer.Name = "menuSetDefaultServer";
|
||||
resources.ApplyResources(this.menuSetDefaultServer, "menuSetDefaultServer");
|
||||
this.menuSetDefaultServer.Click += new System.EventHandler(this.menuSetDefaultServer_Click);
|
||||
//
|
||||
// toolStripSeparator3
|
||||
//
|
||||
resources.ApplyResources(this.toolStripSeparator3, "toolStripSeparator3");
|
||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||
resources.ApplyResources(this.toolStripSeparator3, "toolStripSeparator3");
|
||||
//
|
||||
// menuMoveTop
|
||||
//
|
||||
resources.ApplyResources(this.menuMoveTop, "menuMoveTop");
|
||||
this.menuMoveTop.Name = "menuMoveTop";
|
||||
resources.ApplyResources(this.menuMoveTop, "menuMoveTop");
|
||||
this.menuMoveTop.Click += new System.EventHandler(this.menuMoveTop_Click);
|
||||
//
|
||||
// menuMoveUp
|
||||
//
|
||||
resources.ApplyResources(this.menuMoveUp, "menuMoveUp");
|
||||
this.menuMoveUp.Name = "menuMoveUp";
|
||||
resources.ApplyResources(this.menuMoveUp, "menuMoveUp");
|
||||
this.menuMoveUp.Click += new System.EventHandler(this.menuMoveUp_Click);
|
||||
//
|
||||
// menuMoveDown
|
||||
//
|
||||
resources.ApplyResources(this.menuMoveDown, "menuMoveDown");
|
||||
this.menuMoveDown.Name = "menuMoveDown";
|
||||
resources.ApplyResources(this.menuMoveDown, "menuMoveDown");
|
||||
this.menuMoveDown.Click += new System.EventHandler(this.menuMoveDown_Click);
|
||||
//
|
||||
// menuMoveBottom
|
||||
//
|
||||
resources.ApplyResources(this.menuMoveBottom, "menuMoveBottom");
|
||||
this.menuMoveBottom.Name = "menuMoveBottom";
|
||||
resources.ApplyResources(this.menuMoveBottom, "menuMoveBottom");
|
||||
this.menuMoveBottom.Click += new System.EventHandler(this.menuMoveBottom_Click);
|
||||
//
|
||||
// menuSelectAll
|
||||
//
|
||||
resources.ApplyResources(this.menuSelectAll, "menuSelectAll");
|
||||
this.menuSelectAll.Name = "menuSelectAll";
|
||||
resources.ApplyResources(this.menuSelectAll, "menuSelectAll");
|
||||
this.menuSelectAll.Click += new System.EventHandler(this.menuSelectAll_Click);
|
||||
//
|
||||
// toolStripSeparator9
|
||||
//
|
||||
resources.ApplyResources(this.toolStripSeparator9, "toolStripSeparator9");
|
||||
this.toolStripSeparator9.Name = "toolStripSeparator9";
|
||||
resources.ApplyResources(this.toolStripSeparator9, "toolStripSeparator9");
|
||||
//
|
||||
// menuPingServer
|
||||
//
|
||||
resources.ApplyResources(this.menuPingServer, "menuPingServer");
|
||||
this.menuPingServer.Name = "menuPingServer";
|
||||
resources.ApplyResources(this.menuPingServer, "menuPingServer");
|
||||
this.menuPingServer.Click += new System.EventHandler(this.menuPingServer_Click);
|
||||
//
|
||||
// menuTcpingServer
|
||||
//
|
||||
resources.ApplyResources(this.menuTcpingServer, "menuTcpingServer");
|
||||
this.menuTcpingServer.Name = "menuTcpingServer";
|
||||
resources.ApplyResources(this.menuTcpingServer, "menuTcpingServer");
|
||||
this.menuTcpingServer.Click += new System.EventHandler(this.menuTcpingServer_Click);
|
||||
//
|
||||
// menuRealPingServer
|
||||
//
|
||||
resources.ApplyResources(this.menuRealPingServer, "menuRealPingServer");
|
||||
this.menuRealPingServer.Name = "menuRealPingServer";
|
||||
resources.ApplyResources(this.menuRealPingServer, "menuRealPingServer");
|
||||
this.menuRealPingServer.Click += new System.EventHandler(this.menuRealPingServer_Click);
|
||||
//
|
||||
// menuSpeedServer
|
||||
//
|
||||
resources.ApplyResources(this.menuSpeedServer, "menuSpeedServer");
|
||||
this.menuSpeedServer.Name = "menuSpeedServer";
|
||||
resources.ApplyResources(this.menuSpeedServer, "menuSpeedServer");
|
||||
this.menuSpeedServer.Click += new System.EventHandler(this.menuSpeedServer_Click);
|
||||
//
|
||||
// tsbTestMe
|
||||
//
|
||||
this.tsbTestMe.Name = "tsbTestMe";
|
||||
resources.ApplyResources(this.tsbTestMe, "tsbTestMe");
|
||||
this.tsbTestMe.Click += new System.EventHandler(this.tsbTestMe_Click);
|
||||
//
|
||||
// toolStripSeparator6
|
||||
//
|
||||
resources.ApplyResources(this.toolStripSeparator6, "toolStripSeparator6");
|
||||
this.toolStripSeparator6.Name = "toolStripSeparator6";
|
||||
resources.ApplyResources(this.toolStripSeparator6, "toolStripSeparator6");
|
||||
//
|
||||
// menuExport2ClientConfig
|
||||
//
|
||||
resources.ApplyResources(this.menuExport2ClientConfig, "menuExport2ClientConfig");
|
||||
this.menuExport2ClientConfig.Name = "menuExport2ClientConfig";
|
||||
resources.ApplyResources(this.menuExport2ClientConfig, "menuExport2ClientConfig");
|
||||
this.menuExport2ClientConfig.Click += new System.EventHandler(this.menuExport2ClientConfig_Click);
|
||||
//
|
||||
// menuExport2ServerConfig
|
||||
//
|
||||
resources.ApplyResources(this.menuExport2ServerConfig, "menuExport2ServerConfig");
|
||||
this.menuExport2ServerConfig.Name = "menuExport2ServerConfig";
|
||||
resources.ApplyResources(this.menuExport2ServerConfig, "menuExport2ServerConfig");
|
||||
this.menuExport2ServerConfig.Click += new System.EventHandler(this.menuExport2ServerConfig_Click);
|
||||
//
|
||||
// menuExport2ShareUrl
|
||||
//
|
||||
resources.ApplyResources(this.menuExport2ShareUrl, "menuExport2ShareUrl");
|
||||
this.menuExport2ShareUrl.Name = "menuExport2ShareUrl";
|
||||
resources.ApplyResources(this.menuExport2ShareUrl, "menuExport2ShareUrl");
|
||||
this.menuExport2ShareUrl.Click += new System.EventHandler(this.menuExport2ShareUrl_Click);
|
||||
//
|
||||
// menuExport2SubContent
|
||||
//
|
||||
resources.ApplyResources(this.menuExport2SubContent, "menuExport2SubContent");
|
||||
this.menuExport2SubContent.Name = "menuExport2SubContent";
|
||||
resources.ApplyResources(this.menuExport2SubContent, "menuExport2SubContent");
|
||||
this.menuExport2SubContent.Click += new System.EventHandler(this.menuExport2SubContent_Click);
|
||||
//
|
||||
// tsbServer
|
||||
//
|
||||
resources.ApplyResources(this.tsbServer, "tsbServer");
|
||||
this.tsbServer.DropDown = this.cmsLv;
|
||||
this.tsbServer.Image = global::v2rayN.Properties.Resources.server;
|
||||
resources.ApplyResources(this.tsbServer, "tsbServer");
|
||||
this.tsbServer.Name = "tsbServer";
|
||||
//
|
||||
// qrCodeControl
|
||||
@@ -379,14 +385,14 @@
|
||||
//
|
||||
// notifyMain
|
||||
//
|
||||
resources.ApplyResources(this.notifyMain, "notifyMain");
|
||||
this.notifyMain.ContextMenuStrip = this.cmsMain;
|
||||
resources.ApplyResources(this.notifyMain, "notifyMain");
|
||||
this.notifyMain.MouseClick += new System.Windows.Forms.MouseEventHandler(this.notifyMain_MouseClick);
|
||||
//
|
||||
// cmsMain
|
||||
//
|
||||
resources.ApplyResources(this.cmsMain, "cmsMain");
|
||||
this.cmsMain.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||
resources.ApplyResources(this.cmsMain, "cmsMain");
|
||||
this.cmsMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.menuSysAgentMode,
|
||||
this.menuServers,
|
||||
@@ -403,7 +409,6 @@
|
||||
//
|
||||
// menuSysAgentMode
|
||||
//
|
||||
resources.ApplyResources(this.menuSysAgentMode, "menuSysAgentMode");
|
||||
this.menuSysAgentMode.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.menuNotEnabledHttp,
|
||||
this.menuGlobal,
|
||||
@@ -413,87 +418,88 @@
|
||||
this.menuKeepNothing,
|
||||
this.menuKeepPACNothing});
|
||||
this.menuSysAgentMode.Name = "menuSysAgentMode";
|
||||
resources.ApplyResources(this.menuSysAgentMode, "menuSysAgentMode");
|
||||
//
|
||||
// menuNotEnabledHttp
|
||||
//
|
||||
resources.ApplyResources(this.menuNotEnabledHttp, "menuNotEnabledHttp");
|
||||
this.menuNotEnabledHttp.Name = "menuNotEnabledHttp";
|
||||
resources.ApplyResources(this.menuNotEnabledHttp, "menuNotEnabledHttp");
|
||||
this.menuNotEnabledHttp.Click += new System.EventHandler(this.menuNotEnabledHttp_Click);
|
||||
//
|
||||
// menuGlobal
|
||||
//
|
||||
resources.ApplyResources(this.menuGlobal, "menuGlobal");
|
||||
this.menuGlobal.Name = "menuGlobal";
|
||||
resources.ApplyResources(this.menuGlobal, "menuGlobal");
|
||||
this.menuGlobal.Click += new System.EventHandler(this.menuGlobal_Click);
|
||||
//
|
||||
// menuGlobalPAC
|
||||
//
|
||||
resources.ApplyResources(this.menuGlobalPAC, "menuGlobalPAC");
|
||||
this.menuGlobalPAC.Name = "menuGlobalPAC";
|
||||
resources.ApplyResources(this.menuGlobalPAC, "menuGlobalPAC");
|
||||
this.menuGlobalPAC.Click += new System.EventHandler(this.menuGlobalPAC_Click);
|
||||
//
|
||||
// menuKeep
|
||||
//
|
||||
resources.ApplyResources(this.menuKeep, "menuKeep");
|
||||
this.menuKeep.Name = "menuKeep";
|
||||
resources.ApplyResources(this.menuKeep, "menuKeep");
|
||||
this.menuKeep.Click += new System.EventHandler(this.menuKeep_Click);
|
||||
//
|
||||
// menuKeepPAC
|
||||
//
|
||||
resources.ApplyResources(this.menuKeepPAC, "menuKeepPAC");
|
||||
this.menuKeepPAC.Name = "menuKeepPAC";
|
||||
resources.ApplyResources(this.menuKeepPAC, "menuKeepPAC");
|
||||
this.menuKeepPAC.Click += new System.EventHandler(this.menuKeepPAC_Click);
|
||||
//
|
||||
// menuKeepNothing
|
||||
//
|
||||
resources.ApplyResources(this.menuKeepNothing, "menuKeepNothing");
|
||||
this.menuKeepNothing.Name = "menuKeepNothing";
|
||||
resources.ApplyResources(this.menuKeepNothing, "menuKeepNothing");
|
||||
this.menuKeepNothing.Click += new System.EventHandler(this.menuKeepNothing_Click);
|
||||
//
|
||||
// menuKeepPACNothing
|
||||
//
|
||||
resources.ApplyResources(this.menuKeepPACNothing, "menuKeepPACNothing");
|
||||
this.menuKeepPACNothing.Name = "menuKeepPACNothing";
|
||||
resources.ApplyResources(this.menuKeepPACNothing, "menuKeepPACNothing");
|
||||
this.menuKeepPACNothing.Click += new System.EventHandler(this.menuKeepPACNothing_Click);
|
||||
//
|
||||
// menuServers
|
||||
//
|
||||
resources.ApplyResources(this.menuServers, "menuServers");
|
||||
this.menuServers.Name = "menuServers";
|
||||
resources.ApplyResources(this.menuServers, "menuServers");
|
||||
//
|
||||
// menuAddServers2
|
||||
//
|
||||
resources.ApplyResources(this.menuAddServers2, "menuAddServers2");
|
||||
this.menuAddServers2.Name = "menuAddServers2";
|
||||
resources.ApplyResources(this.menuAddServers2, "menuAddServers2");
|
||||
this.menuAddServers2.Click += new System.EventHandler(this.menuAddServers_Click);
|
||||
//
|
||||
// menuScanScreen2
|
||||
//
|
||||
resources.ApplyResources(this.menuScanScreen2, "menuScanScreen2");
|
||||
this.menuScanScreen2.Name = "menuScanScreen2";
|
||||
resources.ApplyResources(this.menuScanScreen2, "menuScanScreen2");
|
||||
this.menuScanScreen2.Click += new System.EventHandler(this.menuScanScreen_Click);
|
||||
//
|
||||
// menuCopyPACUrl
|
||||
//
|
||||
resources.ApplyResources(this.menuCopyPACUrl, "menuCopyPACUrl");
|
||||
this.menuCopyPACUrl.Name = "menuCopyPACUrl";
|
||||
resources.ApplyResources(this.menuCopyPACUrl, "menuCopyPACUrl");
|
||||
this.menuCopyPACUrl.Click += new System.EventHandler(this.menuCopyPACUrl_Click);
|
||||
//
|
||||
// menuUpdateSubscriptions
|
||||
//
|
||||
resources.ApplyResources(this.menuUpdateSubscriptions, "menuUpdateSubscriptions");
|
||||
this.menuUpdateSubscriptions.Name = "menuUpdateSubscriptions";
|
||||
resources.ApplyResources(this.menuUpdateSubscriptions, "menuUpdateSubscriptions");
|
||||
this.menuUpdateSubscriptions.Click += new System.EventHandler(this.menuUpdateSubscriptions_Click);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
resources.ApplyResources(this.toolStripSeparator2, "toolStripSeparator2");
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
resources.ApplyResources(this.toolStripSeparator2, "toolStripSeparator2");
|
||||
//
|
||||
// menuExit
|
||||
//
|
||||
resources.ApplyResources(this.menuExit, "menuExit");
|
||||
this.menuExit.Name = "menuExit";
|
||||
resources.ApplyResources(this.menuExit, "menuExit");
|
||||
this.menuExit.Click += new System.EventHandler(this.menuExit_Click);
|
||||
//
|
||||
// bgwScan
|
||||
@@ -504,31 +510,30 @@
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.scMain);
|
||||
resources.ApplyResources(this.groupBox1, "groupBox1");
|
||||
this.groupBox1.Controls.Add(this.splitContainer1);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.TabStop = false;
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
resources.ApplyResources(this.groupBox2, "groupBox2");
|
||||
this.groupBox2.Controls.Add(this.txtMsgBox);
|
||||
this.groupBox2.Controls.Add(this.ssMain);
|
||||
resources.ApplyResources(this.groupBox2, "groupBox2");
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.TabStop = false;
|
||||
//
|
||||
// txtMsgBox
|
||||
//
|
||||
resources.ApplyResources(this.txtMsgBox, "txtMsgBox");
|
||||
this.txtMsgBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(49)))), ((int)(((byte)(52)))));
|
||||
this.txtMsgBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
resources.ApplyResources(this.txtMsgBox, "txtMsgBox");
|
||||
this.txtMsgBox.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(226)))), ((int)(((byte)(228)))));
|
||||
this.txtMsgBox.Name = "txtMsgBox";
|
||||
this.txtMsgBox.ReadOnly = true;
|
||||
//
|
||||
// ssMain
|
||||
//
|
||||
resources.ApplyResources(this.ssMain, "ssMain");
|
||||
this.ssMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolSslSocksPortLab,
|
||||
this.toolSslSocksPort,
|
||||
@@ -541,6 +546,7 @@
|
||||
this.toolSslBlank3,
|
||||
this.toolSslServerSpeed,
|
||||
this.toolSslBlank4});
|
||||
resources.ApplyResources(this.ssMain, "ssMain");
|
||||
this.ssMain.Name = "ssMain";
|
||||
this.ssMain.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.ssMain_ItemClicked);
|
||||
//
|
||||
@@ -551,8 +557,8 @@
|
||||
//
|
||||
// toolSslSocksPort
|
||||
//
|
||||
resources.ApplyResources(this.toolSslSocksPort, "toolSslSocksPort");
|
||||
this.toolSslSocksPort.Name = "toolSslSocksPort";
|
||||
resources.ApplyResources(this.toolSslSocksPort, "toolSslSocksPort");
|
||||
//
|
||||
// toolSslBlank1
|
||||
//
|
||||
@@ -567,8 +573,8 @@
|
||||
//
|
||||
// toolSslHttpPort
|
||||
//
|
||||
resources.ApplyResources(this.toolSslHttpPort, "toolSslHttpPort");
|
||||
this.toolSslHttpPort.Name = "toolSslHttpPort";
|
||||
resources.ApplyResources(this.toolSslHttpPort, "toolSslHttpPort");
|
||||
//
|
||||
// toolSslBlank2
|
||||
//
|
||||
@@ -583,8 +589,8 @@
|
||||
//
|
||||
// toolSslPacPort
|
||||
//
|
||||
resources.ApplyResources(this.toolSslPacPort, "toolSslPacPort");
|
||||
this.toolSslPacPort.Name = "toolSslPacPort";
|
||||
resources.ApplyResources(this.toolSslPacPort, "toolSslPacPort");
|
||||
//
|
||||
// toolSslBlank3
|
||||
//
|
||||
@@ -600,8 +606,8 @@
|
||||
//
|
||||
// toolSslBlank4
|
||||
//
|
||||
resources.ApplyResources(this.toolSslBlank4, "toolSslBlank4");
|
||||
this.toolSslBlank4.Name = "toolSslBlank4";
|
||||
resources.ApplyResources(this.toolSslBlank4, "toolSslBlank4");
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
@@ -610,16 +616,16 @@
|
||||
//
|
||||
// tsMain
|
||||
//
|
||||
resources.ApplyResources(this.tsMain, "tsMain");
|
||||
this.tsMain.ImageScalingSize = new System.Drawing.Size(32, 32);
|
||||
this.tsMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.tsbServer,
|
||||
this.toolStripSeparator4,
|
||||
this.tsbSub,
|
||||
this.tsbQRCodeSwitch,
|
||||
this.toolStripSeparator8,
|
||||
this.tsbOptionSetting,
|
||||
this.toolStripSeparator5,
|
||||
this.tsbService,
|
||||
this.tsbReload,
|
||||
this.toolStripSeparator7,
|
||||
this.tsbCheckUpdate,
|
||||
this.toolStripSeparator10,
|
||||
@@ -627,58 +633,61 @@
|
||||
this.tsbPromotion,
|
||||
this.toolStripSeparator11,
|
||||
this.tsbClose});
|
||||
resources.ApplyResources(this.tsMain, "tsMain");
|
||||
this.tsMain.Name = "tsMain";
|
||||
this.tsMain.TabStop = true;
|
||||
//
|
||||
// toolStripSeparator4
|
||||
//
|
||||
resources.ApplyResources(this.toolStripSeparator4, "toolStripSeparator4");
|
||||
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
||||
resources.ApplyResources(this.toolStripSeparator4, "toolStripSeparator4");
|
||||
//
|
||||
// tsbSub
|
||||
//
|
||||
resources.ApplyResources(this.tsbSub, "tsbSub");
|
||||
this.tsbSub.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.tsbSubSetting,
|
||||
this.tsbSubUpdate});
|
||||
this.tsbSub.Image = global::v2rayN.Properties.Resources.sub;
|
||||
resources.ApplyResources(this.tsbSub, "tsbSub");
|
||||
this.tsbSub.Name = "tsbSub";
|
||||
//
|
||||
// tsbSubSetting
|
||||
//
|
||||
resources.ApplyResources(this.tsbSubSetting, "tsbSubSetting");
|
||||
this.tsbSubSetting.Name = "tsbSubSetting";
|
||||
resources.ApplyResources(this.tsbSubSetting, "tsbSubSetting");
|
||||
this.tsbSubSetting.Click += new System.EventHandler(this.tsbSubSetting_Click);
|
||||
//
|
||||
// tsbSubUpdate
|
||||
//
|
||||
resources.ApplyResources(this.tsbSubUpdate, "tsbSubUpdate");
|
||||
this.tsbSubUpdate.Name = "tsbSubUpdate";
|
||||
resources.ApplyResources(this.tsbSubUpdate, "tsbSubUpdate");
|
||||
this.tsbSubUpdate.Click += new System.EventHandler(this.tsbSubUpdate_Click);
|
||||
//
|
||||
// tsbQRCodeSwitch
|
||||
//
|
||||
this.tsbQRCodeSwitch.CheckOnClick = true;
|
||||
this.tsbQRCodeSwitch.ForeColor = System.Drawing.Color.Black;
|
||||
this.tsbQRCodeSwitch.Image = global::v2rayN.Properties.Resources.share;
|
||||
resources.ApplyResources(this.tsbQRCodeSwitch, "tsbQRCodeSwitch");
|
||||
this.tsbQRCodeSwitch.Name = "tsbQRCodeSwitch";
|
||||
this.tsbQRCodeSwitch.CheckedChanged += new System.EventHandler(this.tsbQRCodeSwitch_CheckedChanged);
|
||||
//
|
||||
// toolStripSeparator8
|
||||
//
|
||||
resources.ApplyResources(this.toolStripSeparator8, "toolStripSeparator8");
|
||||
this.toolStripSeparator8.Name = "toolStripSeparator8";
|
||||
resources.ApplyResources(this.toolStripSeparator8, "toolStripSeparator8");
|
||||
//
|
||||
// tsbOptionSetting
|
||||
//
|
||||
resources.ApplyResources(this.tsbOptionSetting, "tsbOptionSetting");
|
||||
this.tsbOptionSetting.Image = global::v2rayN.Properties.Resources.option;
|
||||
resources.ApplyResources(this.tsbOptionSetting, "tsbOptionSetting");
|
||||
this.tsbOptionSetting.Name = "tsbOptionSetting";
|
||||
this.tsbOptionSetting.Click += new System.EventHandler(this.tsbOptionSetting_Click);
|
||||
//
|
||||
// toolStripSeparator5
|
||||
//
|
||||
resources.ApplyResources(this.toolStripSeparator5, "toolStripSeparator5");
|
||||
this.toolStripSeparator5.Name = "toolStripSeparator5";
|
||||
//
|
||||
// tsbService
|
||||
//
|
||||
resources.ApplyResources(this.tsbService, "tsbService");
|
||||
this.tsbService.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.tsbReload,
|
||||
this.tsbTestMe});
|
||||
this.tsbService.Name = "tsbService";
|
||||
resources.ApplyResources(this.toolStripSeparator5, "toolStripSeparator5");
|
||||
//
|
||||
// tsbReload
|
||||
//
|
||||
@@ -686,20 +695,13 @@
|
||||
this.tsbReload.Name = "tsbReload";
|
||||
this.tsbReload.Click += new System.EventHandler(this.tsbReload_Click);
|
||||
//
|
||||
// tsbTestMe
|
||||
//
|
||||
resources.ApplyResources(this.tsbTestMe, "tsbTestMe");
|
||||
this.tsbTestMe.Name = "tsbTestMe";
|
||||
this.tsbTestMe.Click += new System.EventHandler(this.tsbTestMe_Click);
|
||||
//
|
||||
// toolStripSeparator7
|
||||
//
|
||||
resources.ApplyResources(this.toolStripSeparator7, "toolStripSeparator7");
|
||||
this.toolStripSeparator7.Name = "toolStripSeparator7";
|
||||
resources.ApplyResources(this.toolStripSeparator7, "toolStripSeparator7");
|
||||
//
|
||||
// tsbCheckUpdate
|
||||
//
|
||||
resources.ApplyResources(this.tsbCheckUpdate, "tsbCheckUpdate");
|
||||
this.tsbCheckUpdate.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.tsbCheckUpdateN,
|
||||
this.tsbCheckUpdateCore,
|
||||
@@ -707,45 +709,45 @@
|
||||
this.toolStripSeparator13,
|
||||
this.tsbCheckClearPACList});
|
||||
this.tsbCheckUpdate.Image = global::v2rayN.Properties.Resources.checkupdate;
|
||||
resources.ApplyResources(this.tsbCheckUpdate, "tsbCheckUpdate");
|
||||
this.tsbCheckUpdate.Name = "tsbCheckUpdate";
|
||||
//
|
||||
// tsbCheckUpdateN
|
||||
//
|
||||
resources.ApplyResources(this.tsbCheckUpdateN, "tsbCheckUpdateN");
|
||||
this.tsbCheckUpdateN.Name = "tsbCheckUpdateN";
|
||||
resources.ApplyResources(this.tsbCheckUpdateN, "tsbCheckUpdateN");
|
||||
this.tsbCheckUpdateN.Click += new System.EventHandler(this.tsbCheckUpdateN_Click);
|
||||
//
|
||||
// tsbCheckUpdateCore
|
||||
//
|
||||
resources.ApplyResources(this.tsbCheckUpdateCore, "tsbCheckUpdateCore");
|
||||
this.tsbCheckUpdateCore.Name = "tsbCheckUpdateCore";
|
||||
resources.ApplyResources(this.tsbCheckUpdateCore, "tsbCheckUpdateCore");
|
||||
this.tsbCheckUpdateCore.Click += new System.EventHandler(this.tsbCheckUpdateCore_Click);
|
||||
//
|
||||
// tsbCheckUpdatePACList
|
||||
//
|
||||
resources.ApplyResources(this.tsbCheckUpdatePACList, "tsbCheckUpdatePACList");
|
||||
this.tsbCheckUpdatePACList.Name = "tsbCheckUpdatePACList";
|
||||
resources.ApplyResources(this.tsbCheckUpdatePACList, "tsbCheckUpdatePACList");
|
||||
this.tsbCheckUpdatePACList.Click += new System.EventHandler(this.tsbCheckUpdatePACList_Click);
|
||||
//
|
||||
// toolStripSeparator13
|
||||
//
|
||||
resources.ApplyResources(this.toolStripSeparator13, "toolStripSeparator13");
|
||||
this.toolStripSeparator13.Name = "toolStripSeparator13";
|
||||
resources.ApplyResources(this.toolStripSeparator13, "toolStripSeparator13");
|
||||
//
|
||||
// tsbCheckClearPACList
|
||||
//
|
||||
resources.ApplyResources(this.tsbCheckClearPACList, "tsbCheckClearPACList");
|
||||
this.tsbCheckClearPACList.Name = "tsbCheckClearPACList";
|
||||
resources.ApplyResources(this.tsbCheckClearPACList, "tsbCheckClearPACList");
|
||||
this.tsbCheckClearPACList.Click += new System.EventHandler(this.tsbCheckClearPACList_Click);
|
||||
//
|
||||
// toolStripSeparator10
|
||||
//
|
||||
resources.ApplyResources(this.toolStripSeparator10, "toolStripSeparator10");
|
||||
this.toolStripSeparator10.Name = "toolStripSeparator10";
|
||||
resources.ApplyResources(this.toolStripSeparator10, "toolStripSeparator10");
|
||||
//
|
||||
// tsbHelp
|
||||
//
|
||||
resources.ApplyResources(this.tsbHelp, "tsbHelp");
|
||||
this.tsbHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.tsbAbout,
|
||||
this.tsbV2rayWebsite,
|
||||
@@ -753,49 +755,50 @@
|
||||
this.tsbLanguageDef,
|
||||
this.tsbLanguageZhHans});
|
||||
this.tsbHelp.Image = global::v2rayN.Properties.Resources.help;
|
||||
resources.ApplyResources(this.tsbHelp, "tsbHelp");
|
||||
this.tsbHelp.Name = "tsbHelp";
|
||||
//
|
||||
// tsbAbout
|
||||
//
|
||||
resources.ApplyResources(this.tsbAbout, "tsbAbout");
|
||||
this.tsbAbout.Name = "tsbAbout";
|
||||
resources.ApplyResources(this.tsbAbout, "tsbAbout");
|
||||
this.tsbAbout.Click += new System.EventHandler(this.tsbAbout_Click);
|
||||
//
|
||||
// tsbV2rayWebsite
|
||||
//
|
||||
resources.ApplyResources(this.tsbV2rayWebsite, "tsbV2rayWebsite");
|
||||
this.tsbV2rayWebsite.Name = "tsbV2rayWebsite";
|
||||
resources.ApplyResources(this.tsbV2rayWebsite, "tsbV2rayWebsite");
|
||||
this.tsbV2rayWebsite.Click += new System.EventHandler(this.tsbV2rayWebsite_Click);
|
||||
//
|
||||
// toolStripSeparator12
|
||||
//
|
||||
resources.ApplyResources(this.toolStripSeparator12, "toolStripSeparator12");
|
||||
this.toolStripSeparator12.Name = "toolStripSeparator12";
|
||||
resources.ApplyResources(this.toolStripSeparator12, "toolStripSeparator12");
|
||||
//
|
||||
// tsbLanguageDef
|
||||
//
|
||||
resources.ApplyResources(this.tsbLanguageDef, "tsbLanguageDef");
|
||||
this.tsbLanguageDef.Name = "tsbLanguageDef";
|
||||
resources.ApplyResources(this.tsbLanguageDef, "tsbLanguageDef");
|
||||
this.tsbLanguageDef.Click += new System.EventHandler(this.tsbLanguageDef_Click);
|
||||
//
|
||||
// tsbLanguageZhHans
|
||||
//
|
||||
resources.ApplyResources(this.tsbLanguageZhHans, "tsbLanguageZhHans");
|
||||
this.tsbLanguageZhHans.Name = "tsbLanguageZhHans";
|
||||
resources.ApplyResources(this.tsbLanguageZhHans, "tsbLanguageZhHans");
|
||||
this.tsbLanguageZhHans.Click += new System.EventHandler(this.tsbLanguageZhHans_Click);
|
||||
//
|
||||
// tsbPromotion
|
||||
//
|
||||
resources.ApplyResources(this.tsbPromotion, "tsbPromotion");
|
||||
this.tsbPromotion.ForeColor = System.Drawing.Color.Black;
|
||||
this.tsbPromotion.Image = global::v2rayN.Properties.Resources.promotion;
|
||||
resources.ApplyResources(this.tsbPromotion, "tsbPromotion");
|
||||
this.tsbPromotion.Name = "tsbPromotion";
|
||||
this.tsbPromotion.Click += new System.EventHandler(this.tsbPromotion_Click);
|
||||
//
|
||||
// toolStripSeparator11
|
||||
//
|
||||
resources.ApplyResources(this.toolStripSeparator11, "toolStripSeparator11");
|
||||
this.toolStripSeparator11.Name = "toolStripSeparator11";
|
||||
resources.ApplyResources(this.toolStripSeparator11, "toolStripSeparator11");
|
||||
//
|
||||
// tsbClose
|
||||
//
|
||||
@@ -819,10 +822,10 @@
|
||||
this.Shown += new System.EventHandler(this.MainForm_Shown);
|
||||
this.VisibleChanged += new System.EventHandler(this.MainForm_VisibleChanged);
|
||||
this.Resize += new System.EventHandler(this.MainForm_Resize);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.scMain.Panel1.ResumeLayout(false);
|
||||
this.scMain.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.scMain)).EndInit();
|
||||
this.scMain.ResumeLayout(false);
|
||||
this.cmsLv.ResumeLayout(false);
|
||||
this.cmsMain.ResumeLayout(false);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
@@ -879,7 +882,7 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem menuAddCustomServer;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripMenuItem menuAddShadowsocksServer;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.SplitContainer scMain;
|
||||
private QRCodeControl qrCodeControl;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator10;
|
||||
private System.Windows.Forms.ToolStripDropDownButton tsbCheckUpdate;
|
||||
@@ -930,9 +933,9 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem tsbV2rayWebsite;
|
||||
private System.Windows.Forms.ToolStripMenuItem menuKeepNothing;
|
||||
private System.Windows.Forms.ToolStripMenuItem menuKeepPACNothing;
|
||||
private System.Windows.Forms.ToolStripDropDownButton tsbService;
|
||||
private System.Windows.Forms.ToolStripMenuItem tsbReload;
|
||||
private System.Windows.Forms.ToolStripMenuItem tsbTestMe;
|
||||
private System.Windows.Forms.ToolStripButton tsbReload;
|
||||
private System.Windows.Forms.ToolStripButton tsbQRCodeSwitch;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace v2rayN.Forms
|
||||
{
|
||||
InitServersView();
|
||||
RefreshServers();
|
||||
lvServers.AutoResizeColumns();
|
||||
RestoreUI();
|
||||
|
||||
LoadV2ray();
|
||||
|
||||
@@ -85,6 +85,7 @@ namespace v2rayN.Forms
|
||||
{
|
||||
if (e.CloseReason == CloseReason.UserClosing)
|
||||
{
|
||||
StorageUI();
|
||||
e.Cancel = true;
|
||||
HideForm();
|
||||
return;
|
||||
@@ -99,14 +100,10 @@ namespace v2rayN.Forms
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// //this.splitContainer1.SplitterDistance = config.uiItem.mainQRCodeWidth;
|
||||
|
||||
//}
|
||||
}
|
||||
|
||||
private void splitContainer1_SplitterMoved(object sender, SplitterEventArgs e)
|
||||
{
|
||||
//config.uiItem.mainQRCodeWidth = splitContainer1.SplitterDistance;
|
||||
}
|
||||
|
||||
//private const int WM_QUERYENDSESSION = 0x0011;
|
||||
//protected override void WndProc(ref Message m)
|
||||
@@ -126,6 +123,34 @@ namespace v2rayN.Forms
|
||||
// break;
|
||||
// }
|
||||
//}
|
||||
|
||||
private void RestoreUI()
|
||||
{
|
||||
scMain.Panel2Collapsed = true;
|
||||
|
||||
if (!config.uiItem.mainSize.IsEmpty)
|
||||
{
|
||||
this.Width = config.uiItem.mainSize.Width;
|
||||
this.Height = config.uiItem.mainSize.Height;
|
||||
}
|
||||
|
||||
for (int k = 0; k < lvServers.Columns.Count; k++)
|
||||
{
|
||||
var width = ConfigHandler.GetformMainLvColWidth(ref config, ((EServerColName)k).ToString(), lvServers.Columns[k].Width);
|
||||
lvServers.Columns[k].Width = width;
|
||||
}
|
||||
}
|
||||
|
||||
private void StorageUI()
|
||||
{
|
||||
config.uiItem.mainSize = new Size(this.Width, this.Height);
|
||||
|
||||
for (int k = 0; k < lvServers.Columns.Count; k++)
|
||||
{
|
||||
ConfigHandler.AddformMainLvColWidth(ref config, ((EServerColName)k).ToString(), lvServers.Columns[k].Width);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 显示服务器 listview 和 menu
|
||||
@@ -136,6 +161,7 @@ namespace v2rayN.Forms
|
||||
private void RefreshServers()
|
||||
{
|
||||
RefreshServersView();
|
||||
//lvServers.AutoResizeColumns();
|
||||
RefreshServersMenu();
|
||||
}
|
||||
|
||||
@@ -144,6 +170,7 @@ namespace v2rayN.Forms
|
||||
/// </summary>
|
||||
private void InitServersView()
|
||||
{
|
||||
lvServers.BeginUpdate();
|
||||
lvServers.Items.Clear();
|
||||
|
||||
lvServers.GridLines = true;
|
||||
@@ -151,25 +178,26 @@ namespace v2rayN.Forms
|
||||
lvServers.View = View.Details;
|
||||
lvServers.Scrollable = true;
|
||||
lvServers.MultiSelect = true;
|
||||
lvServers.HeaderStyle = ColumnHeaderStyle.Nonclickable;
|
||||
lvServers.HeaderStyle = ColumnHeaderStyle.Clickable;
|
||||
|
||||
lvServers.Columns.Add("", 30, HorizontalAlignment.Center);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvServiceType"), 80, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvAlias"), 100, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvAddress"), 120, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvPort"), 50, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvEncryptionMethod"), 90, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTransportProtocol"), 70, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvSubscription"), 50, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTestResults"), 70, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add("", 30);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvServiceType"), 80);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvAlias"), 100);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvAddress"), 120);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvPort"), 50);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvEncryptionMethod"), 90);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTransportProtocol"), 70);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvSubscription"), 50);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTestResults"), 70, HorizontalAlignment.Right);
|
||||
|
||||
if (statistics != null && statistics.Enable)
|
||||
{
|
||||
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);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTodayDownloadDataAmount"), 70);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTodayUploadDataAmount"), 70);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTotalDownloadDataAmount"), 70);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTotalUploadDataAmount"), 70);
|
||||
}
|
||||
lvServers.EndUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -177,6 +205,7 @@ namespace v2rayN.Forms
|
||||
/// </summary>
|
||||
private void RefreshServersView()
|
||||
{
|
||||
lvServers.BeginUpdate();
|
||||
lvServers.Items.Clear();
|
||||
|
||||
for (int k = 0; k < config.vmess.Count; k++)
|
||||
@@ -193,8 +222,12 @@ namespace v2rayN.Forms
|
||||
|
||||
VmessItem item = config.vmess[k];
|
||||
|
||||
ListViewItem lvItem = null;
|
||||
if (statistics != null && statistics.Enable)
|
||||
void _addSubItem(ListViewItem i, string name, string text)
|
||||
{
|
||||
i.SubItems.Add(new ListViewItem.ListViewSubItem() { Name = name, Text = text });
|
||||
}
|
||||
bool stats = statistics != null && statistics.Enable;
|
||||
if (stats)
|
||||
{
|
||||
ServerStatItem sItem = statistics.Statistic.Find(item_ => item_.itemId == item.getItemId());
|
||||
if (sItem != null)
|
||||
@@ -204,43 +237,24 @@ namespace v2rayN.Forms
|
||||
todayUp = Utils.HumanFy(sItem.todayUp);
|
||||
todayDown = Utils.HumanFy(sItem.todayDown);
|
||||
}
|
||||
|
||||
lvItem = new ListViewItem(new string[]
|
||||
{
|
||||
def,
|
||||
((EConfigType)item.configType).ToString(),
|
||||
item.remarks,
|
||||
item.address,
|
||||
item.port.ToString(),
|
||||
//item.id,
|
||||
//item.alterId.ToString(),
|
||||
item.security,
|
||||
item.network,
|
||||
item.getSubRemarks(config),
|
||||
item.testResult,
|
||||
todayDown,
|
||||
todayUp,
|
||||
totalDown,
|
||||
totalUp
|
||||
});
|
||||
}
|
||||
else
|
||||
ListViewItem lvItem = new ListViewItem(def);
|
||||
_addSubItem(lvItem, EServerColName.configType.ToString(), ((EConfigType)item.configType).ToString());
|
||||
_addSubItem(lvItem, EServerColName.remarks.ToString(), item.remarks);
|
||||
_addSubItem(lvItem, EServerColName.address.ToString(), item.address);
|
||||
_addSubItem(lvItem, EServerColName.port.ToString(), item.port.ToString());
|
||||
_addSubItem(lvItem, EServerColName.security.ToString(), item.security);
|
||||
_addSubItem(lvItem, EServerColName.network.ToString(), item.network);
|
||||
_addSubItem(lvItem, EServerColName.subRemarks.ToString(), item.getSubRemarks(config));
|
||||
_addSubItem(lvItem, EServerColName.testResult.ToString(), item.testResult);
|
||||
if (stats)
|
||||
{
|
||||
lvItem = new ListViewItem(new string[]
|
||||
{
|
||||
def,
|
||||
((EConfigType)item.configType).ToString(),
|
||||
item.remarks,
|
||||
item.address,
|
||||
item.port.ToString(),
|
||||
//item.id,
|
||||
//item.alterId.ToString(),
|
||||
item.security,
|
||||
item.network,
|
||||
item.getSubRemarks(config),
|
||||
item.testResult
|
||||
});
|
||||
_addSubItem(lvItem, EServerColName.todayDown.ToString(), todayDown);
|
||||
_addSubItem(lvItem, EServerColName.todayUp.ToString(), todayUp);
|
||||
_addSubItem(lvItem, EServerColName.totalDown.ToString(), totalDown);
|
||||
_addSubItem(lvItem, EServerColName.totalUp.ToString(), totalUp);
|
||||
}
|
||||
|
||||
if (k % 2 == 1) // 隔行着色
|
||||
{
|
||||
lvItem.BackColor = Color.WhiteSmoke;
|
||||
@@ -248,12 +262,13 @@ namespace v2rayN.Forms
|
||||
if (config.index.Equals(k))
|
||||
{
|
||||
//lvItem.Checked = true;
|
||||
lvItem.ForeColor = Color.Blue;
|
||||
lvItem.ForeColor = Color.DodgerBlue;
|
||||
lvItem.Font = new Font(lvItem.Font, FontStyle.Bold);
|
||||
}
|
||||
|
||||
if (lvItem != null) lvServers.Items.Add(lvItem);
|
||||
}
|
||||
lvServers.EndUpdate();
|
||||
|
||||
//if (lvServers.Items.Count > 0)
|
||||
//{
|
||||
@@ -362,6 +377,35 @@ namespace v2rayN.Forms
|
||||
}
|
||||
}
|
||||
|
||||
private void lvServers_ColumnClick(object sender, ColumnClickEventArgs e)
|
||||
{
|
||||
if (e.Column < 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var tag = lvServers.Columns[e.Column].Tag?.ToString();
|
||||
bool asc = Utils.IsNullOrEmpty(tag) ? true : !Convert.ToBoolean(tag);
|
||||
if (ConfigHandler.SortServers(ref config, (EServerColName)e.Column, asc) != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
lvServers.Columns[e.Column].Tag = Convert.ToString(asc);
|
||||
RefreshServers();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
|
||||
if (e.Column < 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region v2ray 操作
|
||||
@@ -371,7 +415,7 @@ namespace v2rayN.Forms
|
||||
/// </summary>
|
||||
private void LoadV2ray()
|
||||
{
|
||||
tsbService.Enabled = false;
|
||||
tsbReload.Enabled = false;
|
||||
|
||||
if (Global.reloadV2ray)
|
||||
{
|
||||
@@ -384,7 +428,7 @@ namespace v2rayN.Forms
|
||||
|
||||
ChangePACButtonStatus(config.listenerType);
|
||||
|
||||
tsbService.Enabled = true;
|
||||
tsbReload.Enabled = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -659,6 +703,17 @@ namespace v2rayN.Forms
|
||||
SpeedtestHandler statistics = new SpeedtestHandler(ref config, ref v2rayHandler, lvSelecteds, actionType, UpdateSpeedtestHandler);
|
||||
}
|
||||
|
||||
private void tsbTestMe_Click(object sender, EventArgs e)
|
||||
{
|
||||
string result = httpProxyTest() + "ms";
|
||||
AppendText(false, string.Format(UIRes.I18N("TestMeOutput"), result));
|
||||
}
|
||||
private int httpProxyTest()
|
||||
{
|
||||
SpeedtestHandler statistics = new SpeedtestHandler(ref config, ref v2rayHandler, lvSelecteds, "", UpdateSpeedtestHandler);
|
||||
return statistics.RunAvailabilityCheck();
|
||||
}
|
||||
|
||||
private void menuExport2ClientConfig_Click(object sender, EventArgs e)
|
||||
{
|
||||
int index = GetLvSelectedIndex();
|
||||
@@ -983,7 +1038,6 @@ namespace v2rayN.Forms
|
||||
|
||||
private void menuExit_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
this.Visible = false;
|
||||
this.Close();
|
||||
|
||||
@@ -996,9 +1050,13 @@ namespace v2rayN.Forms
|
||||
this.Show();
|
||||
this.WindowState = FormWindowState.Normal;
|
||||
this.Activate();
|
||||
//this.notifyIcon1.Visible = false;
|
||||
this.ShowInTaskbar = true;
|
||||
//this.notifyIcon1.Visible = false;
|
||||
this.txtMsgBox.ScrollToCaret();
|
||||
if (config.index >= 0 && config.index < lvServers.Items.Count)
|
||||
{
|
||||
lvServers.EnsureVisible(config.index); // workaround
|
||||
}
|
||||
|
||||
SetVisibleCore(true);
|
||||
}
|
||||
@@ -1020,8 +1078,11 @@ namespace v2rayN.Forms
|
||||
|
||||
private void SetTestResult(int k, string txt)
|
||||
{
|
||||
config.vmess[k].testResult = txt;
|
||||
lvServers.Items[k].SubItems[8].Text = txt;
|
||||
if (k < lvServers.Items.Count)
|
||||
{
|
||||
config.vmess[k].testResult = txt;
|
||||
lvServers.Items[k].SubItems["testResult"].Text = txt;
|
||||
}
|
||||
}
|
||||
private void ClearTestResult()
|
||||
{
|
||||
@@ -1034,11 +1095,7 @@ namespace v2rayN.Forms
|
||||
{
|
||||
lvServers.Invoke((MethodInvoker)delegate
|
||||
{
|
||||
lvServers.SuspendLayout();
|
||||
|
||||
SetTestResult(index, msg);
|
||||
|
||||
lvServers.ResumeLayout();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1058,15 +1115,14 @@ namespace v2rayN.Forms
|
||||
{
|
||||
lvServers.Invoke((MethodInvoker)delegate
|
||||
{
|
||||
lvServers.SuspendLayout();
|
||||
lvServers.BeginUpdate();
|
||||
|
||||
int indexStart = 9;
|
||||
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.Items[i].SubItems["todayDown"].Text = Utils.HumanFy(statistics[index].todayDown);
|
||||
lvServers.Items[i].SubItems["todayUp"].Text = Utils.HumanFy(statistics[index].todayUp);
|
||||
lvServers.Items[i].SubItems["totalDown"].Text = Utils.HumanFy(statistics[index].totalDown);
|
||||
lvServers.Items[i].SubItems["totalUp"].Text = Utils.HumanFy(statistics[index].totalUp);
|
||||
|
||||
lvServers.ResumeLayout();
|
||||
lvServers.EndUpdate();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1201,11 +1257,11 @@ namespace v2rayN.Forms
|
||||
{
|
||||
int httpPort = config.GetLocalPort(Global.InboundHttp);
|
||||
WebProxy webProxy = new WebProxy(Global.Loopback, httpPort);
|
||||
downloadHandle.DownloadFileAsync(url, webProxy, 60);
|
||||
downloadHandle.DownloadFileAsync(url, webProxy, 600);
|
||||
}
|
||||
else
|
||||
{
|
||||
downloadHandle.DownloadFileAsync(url, null, 60);
|
||||
downloadHandle.DownloadFileAsync(url, null, 600);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1220,7 +1276,7 @@ namespace v2rayN.Forms
|
||||
{
|
||||
if (args.Success)
|
||||
{
|
||||
AppendText(false, UIRes.I18N("MsgParsingV2rayCoreSuccessfully"));
|
||||
AppendText(false, string.Format(UIRes.I18N("MsgParsingSuccessfully"), "v2rayN"));
|
||||
|
||||
string url = args.Msg;
|
||||
this.Invoke((MethodInvoker)(delegate
|
||||
@@ -1278,7 +1334,7 @@ namespace v2rayN.Forms
|
||||
{
|
||||
if (args.Success)
|
||||
{
|
||||
AppendText(false, UIRes.I18N("MsgParsingV2rayCoreSuccessfully"));
|
||||
AppendText(false, string.Format(UIRes.I18N("MsgParsingSuccessfully"), "v2rayCore"));
|
||||
|
||||
string url = args.Msg;
|
||||
this.Invoke((MethodInvoker)(delegate
|
||||
@@ -1388,6 +1444,11 @@ namespace v2rayN.Forms
|
||||
Process.Start(Global.AboutUrl);
|
||||
}
|
||||
|
||||
private void tsbV2rayWebsite_Click(object sender, EventArgs e)
|
||||
{
|
||||
Process.Start(Global.v2rayWebsiteUrl);
|
||||
}
|
||||
|
||||
private void tsbPromotion_Click(object sender, EventArgs e)
|
||||
{
|
||||
Process.Start($"{Utils.Base64Decode(Global.PromotionUrl)}?t={DateTime.Now.Ticks}");
|
||||
@@ -1506,6 +1567,11 @@ namespace v2rayN.Forms
|
||||
}
|
||||
}
|
||||
|
||||
private void tsbQRCodeSwitch_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
bool bShow = tsbQRCodeSwitch.Checked;
|
||||
scMain.Panel2Collapsed = !bShow;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Language
|
||||
@@ -1526,22 +1592,8 @@ namespace v2rayN.Forms
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
private void tsbV2rayWebsite_Click(object sender, EventArgs e)
|
||||
{
|
||||
Process.Start(Global.v2rayWebsiteUrl);
|
||||
}
|
||||
|
||||
private void tsbTestMe_Click(object sender, EventArgs e)
|
||||
{
|
||||
string result = httpProxyTest() + "ms";
|
||||
AppendText(false, string.Format(UIRes.I18N("TestMeOutput"), result));
|
||||
}
|
||||
private int httpProxyTest()
|
||||
{
|
||||
SpeedtestHandler statistics = new SpeedtestHandler(ref config, ref v2rayHandler, lvSelecteds, "", UpdateSpeedtestHandler);
|
||||
return statistics.RunAvailabilityCheck();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -421,23 +421,23 @@
|
||||
<value>148, 22</value>
|
||||
</data>
|
||||
<data name="tsbReload.Text" xml:space="preserve">
|
||||
<value>重启服务</value>
|
||||
<value> 重启服务 </value>
|
||||
</data>
|
||||
<data name="tsbTestMe.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>148, 22</value>
|
||||
</data>
|
||||
<data name="tsbTestMe.Text" xml:space="preserve">
|
||||
<value>测试服务状态</value>
|
||||
<value>测试当前服务状态</value>
|
||||
</data>
|
||||
<data name="tsbService.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAE3SURBVFhH7ZaBDQIhDEVvBEdwBDfQDXQER3AD3cARdAPd
|
||||
QDfSDbQvuSb1AicFjJrwkxcN0FIolOuamv5VE2E+gLaPayWchEcE+hhTXVPhIoQmDcFYbKpoJtwEdX4X
|
||||
jgIrXfTwnzb6dBw22BaJVdjJmWQs1/SdBRtE0U5cBXW2oSFRO0HtSEeW2FZ1wsq9sjuRdTDVAXnNuWLY
|
||||
6JnAl0sYa/Q5q1dhq35ci+Bkq2HJvbZpxGeybAAuw4Fq+cnW1wPITgHFYxvBUw+qHEIL1yq1vDKhVlH3
|
||||
NQwF4JkcFRWiUAB7IVW2FFPO3YqlgPd+LJf02e8Fdi3rMdIAcLDuf9UpeT0IS0G/hvhPm305vSl7EQFY
|
||||
B6zCvozvYGzRM8zEoeg5TPZwDaGvpHQni1yzSxbXPW9q+hF13ROHuJnQcjbhtQAAAABJRU5ErkJggg==
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAATdJREFUWEftloENAiEMRW8ER3AEN9ANdARHcAPdwBF0A91AN9INtC+5JvUCJwWM
|
||||
mvCTFw3QUiiU65qa/lUTYT6Ato9rJZyERwT6GFNdU+EihCYNwVhsqmgm3AR1fheOAitd9PCfNvp0HDbY
|
||||
FolV2MmZZCzX9J0FG0TRTlwFdbahIVE7Qe1IR5bYVnXCyr2yO5F1MNUBec25YtjomcCXSxhr9DmrV2Gr
|
||||
flyL4GSrYcm9tmnEZ7JsAC7DgWr5ydbXA8hOAcVjG8FTD6ocQgvXKrW8MqFWUfc1DAXgmRwVFaJQAHsh
|
||||
VbYUU87diqWA934sl/TZ7wV2Lesx0gBwsO5/1Sl5PQhLQb+G+E+bfTm9KXsRAVgHrMK+jO9gbNEzzMSh
|
||||
6DlM9nANoa+kdCeLXLNLFtc9b2r6EXXdE4e4mdByNuG1AAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="tsbService.Size" type="System.Drawing.Size, System.Drawing">
|
||||
@@ -499,9 +499,9 @@
|
||||
</data>
|
||||
<data name="tsbClose.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAySURBVFhH7c6xDQAgCEVBRnVTHU2ZABuMxV3yOvJDAAA/
|
||||
GqfZVG6X8mg1dfUAAPBQxAZd0SJruVXHWwAAAABJRU5ErkJggg==
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAADJJREFUWEftzrENACAIRUFGdVMdTZkAG4zFXfI68kMAAD8ap9lUbpfyaDV19QAA
|
||||
8FDEBl3RImu5VcdbAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="tsbClose.Size" type="System.Drawing.Size, System.Drawing">
|
||||
@@ -510,4 +510,7 @@
|
||||
<data name="tsbClose.Text" xml:space="preserve">
|
||||
<value> 关闭窗口 </value>
|
||||
</data>
|
||||
<data name="tsbQRCodeSwitch.Text" xml:space="preserve">
|
||||
<value> 分享 </value>
|
||||
</data>
|
||||
</root>
|
||||
27
v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs
generated
27
v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs
generated
@@ -33,6 +33,7 @@
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.chkdefAllowInsecure = new System.Windows.Forms.CheckBox();
|
||||
this.label16 = new System.Windows.Forms.Label();
|
||||
this.cmblistenerType = new System.Windows.Forms.ComboBox();
|
||||
this.chksniffingEnabled2 = new System.Windows.Forms.CheckBox();
|
||||
@@ -65,10 +66,10 @@
|
||||
this.tabPage8 = new System.Windows.Forms.TabPage();
|
||||
this.cmbroutingMode = new System.Windows.Forms.ComboBox();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.linkLabelRoutingDoc = new System.Windows.Forms.LinkLabel();
|
||||
this.btnSetDefRountingRule = new System.Windows.Forms.Button();
|
||||
this.labRoutingTips = new System.Windows.Forms.Label();
|
||||
this.cmbdomainStrategy = new System.Windows.Forms.ComboBox();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.tabPage6 = new System.Windows.Forms.TabPage();
|
||||
this.chkKcpcongestion = new System.Windows.Forms.CheckBox();
|
||||
this.txtKcpwriteBufferSize = new System.Windows.Forms.TextBox();
|
||||
@@ -146,6 +147,7 @@
|
||||
// groupBox1
|
||||
//
|
||||
resources.ApplyResources(this.groupBox1, "groupBox1");
|
||||
this.groupBox1.Controls.Add(this.chkdefAllowInsecure);
|
||||
this.groupBox1.Controls.Add(this.label16);
|
||||
this.groupBox1.Controls.Add(this.cmblistenerType);
|
||||
this.groupBox1.Controls.Add(this.chksniffingEnabled2);
|
||||
@@ -169,6 +171,12 @@
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.TabStop = false;
|
||||
//
|
||||
// chkdefAllowInsecure
|
||||
//
|
||||
resources.ApplyResources(this.chkdefAllowInsecure, "chkdefAllowInsecure");
|
||||
this.chkdefAllowInsecure.Name = "chkdefAllowInsecure";
|
||||
this.chkdefAllowInsecure.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label16
|
||||
//
|
||||
resources.ApplyResources(this.label16, "label16");
|
||||
@@ -388,12 +396,19 @@
|
||||
// panel3
|
||||
//
|
||||
resources.ApplyResources(this.panel3, "panel3");
|
||||
this.panel3.Controls.Add(this.linkLabelRoutingDoc);
|
||||
this.panel3.Controls.Add(this.btnSetDefRountingRule);
|
||||
this.panel3.Controls.Add(this.labRoutingTips);
|
||||
this.panel3.Controls.Add(this.cmbdomainStrategy);
|
||||
this.panel3.Controls.Add(this.label15);
|
||||
this.panel3.Name = "panel3";
|
||||
//
|
||||
// linkLabelRoutingDoc
|
||||
//
|
||||
resources.ApplyResources(this.linkLabelRoutingDoc, "linkLabelRoutingDoc");
|
||||
this.linkLabelRoutingDoc.Name = "linkLabelRoutingDoc";
|
||||
this.linkLabelRoutingDoc.TabStop = true;
|
||||
this.linkLabelRoutingDoc.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelRoutingDoc_LinkClicked);
|
||||
//
|
||||
// btnSetDefRountingRule
|
||||
//
|
||||
resources.ApplyResources(this.btnSetDefRountingRule, "btnSetDefRountingRule");
|
||||
@@ -418,11 +433,6 @@
|
||||
resources.GetString("cmbdomainStrategy.Items2")});
|
||||
this.cmbdomainStrategy.Name = "cmbdomainStrategy";
|
||||
//
|
||||
// label15
|
||||
//
|
||||
resources.ApplyResources(this.label15, "label15");
|
||||
this.label15.Name = "label15";
|
||||
//
|
||||
// tabPage6
|
||||
//
|
||||
resources.ApplyResources(this.tabPage6, "tabPage6");
|
||||
@@ -707,7 +717,6 @@
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.Panel panel3;
|
||||
private System.Windows.Forms.ComboBox cmbdomainStrategy;
|
||||
private System.Windows.Forms.Label label15;
|
||||
private System.Windows.Forms.ComboBox cmbroutingMode;
|
||||
private System.Windows.Forms.CheckBox chksniffingEnabled;
|
||||
private System.Windows.Forms.CheckBox chksniffingEnabled2;
|
||||
@@ -723,5 +732,7 @@
|
||||
private System.Windows.Forms.Panel panel4;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.CheckBox chkKeepOlderDedupl;
|
||||
private System.Windows.Forms.LinkLabel linkLabelRoutingDoc;
|
||||
private System.Windows.Forms.CheckBox chkdefAllowInsecure;
|
||||
}
|
||||
}
|
||||
@@ -69,6 +69,8 @@ namespace v2rayN.Forms
|
||||
txtremoteDNS.Text = config.remoteDNS;
|
||||
|
||||
cmblistenerType.SelectedIndex = (int)config.listenerType;
|
||||
|
||||
chkdefAllowInsecure.Checked = config.defAllowInsecure;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -265,6 +267,8 @@ namespace v2rayN.Forms
|
||||
|
||||
config.listenerType = (ListenerType)Enum.ToObject(typeof(ListenerType), cmblistenerType.SelectedIndex);
|
||||
|
||||
config.defAllowInsecure = chkdefAllowInsecure.Checked;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -437,6 +441,11 @@ namespace v2rayN.Forms
|
||||
{
|
||||
labRoutingTips.Text = text;
|
||||
}
|
||||
|
||||
private void linkLabelRoutingDoc_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("https://www.v2fly.org/chapter_02/03_routing.html");
|
||||
}
|
||||
}
|
||||
|
||||
class ComboItem
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -117,95 +117,24 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>参数设置</value>
|
||||
</data>
|
||||
<data name="btnClose.Text" xml:space="preserve">
|
||||
<value>取消(&C)</value>
|
||||
</data>
|
||||
<data name="btnOK.Text" xml:space="preserve">
|
||||
<value>确定(&O)</value>
|
||||
<data name="tabPage1.Text" xml:space="preserve">
|
||||
<value> Core:基础设置 </value>
|
||||
</data>
|
||||
<data name="btnSetDefRountingRule.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="chkdefAllowInsecure.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>222, 16</value>
|
||||
</data>
|
||||
<data name="btnSetDefRountingRule.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>351, 14</value>
|
||||
<data name="chkdefAllowInsecure.Text" xml:space="preserve">
|
||||
<value>底层传输安全选tls时,默认允许不安全连接(allowInsecure)</value>
|
||||
</data>
|
||||
<data name="btnSetDefRountingRule.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>201, 23</value>
|
||||
<data name="label16.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 12</value>
|
||||
</data>
|
||||
<data name="btnSetDefRountingRule.Text" xml:space="preserve">
|
||||
<value>一键设置默认自定义路由规则</value>
|
||||
</data>
|
||||
<data name="chkAllowIn2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>102, 16</value>
|
||||
</data>
|
||||
<data name="chkAllowIn2.Text" xml:space="preserve">
|
||||
<value>本地监听端口2</value>
|
||||
</data>
|
||||
<data name="chkAllowLANConn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>144, 16</value>
|
||||
</data>
|
||||
<data name="chkAllowLANConn.Text" xml:space="preserve">
|
||||
<value>允许来自局域网的连接</value>
|
||||
</data>
|
||||
<data name="chkAutoRun.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 16</value>
|
||||
</data>
|
||||
<data name="chkAutoRun.Text" xml:space="preserve">
|
||||
<value>开机自动启动(可能会不成功)</value>
|
||||
</data>
|
||||
<data name="chkEnableStatistics.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>384, 16</value>
|
||||
</data>
|
||||
<data name="chkEnableStatistics.Text" xml:space="preserve">
|
||||
<value>启用统计(实时网速显示和使用流量显示,需要重启v2rayN客户端)</value>
|
||||
</data>
|
||||
<data name="chkKeepOlderDedupl.Text" xml:space="preserve">
|
||||
<value>去重时保留序号较小的项</value>
|
||||
</data>
|
||||
<data name="chklogEnabled.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>156, 16</value>
|
||||
</data>
|
||||
<data name="chklogEnabled.Text" xml:space="preserve">
|
||||
<value>记录本地日志(默认关闭)</value>
|
||||
</data>
|
||||
<data name="chkmuxEnabled.Text" xml:space="preserve">
|
||||
<value>开启Mux多路复用(默认开启)</value>
|
||||
</data>
|
||||
<data name="chksniffingEnabled.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>96, 16</value>
|
||||
</data>
|
||||
<data name="chksniffingEnabled.Text" xml:space="preserve">
|
||||
<value>开启流量探测</value>
|
||||
</data>
|
||||
<data name="chksniffingEnabled2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>96, 16</value>
|
||||
</data>
|
||||
<data name="chksniffingEnabled2.Text" xml:space="preserve">
|
||||
<value>开启流量探测</value>
|
||||
</data>
|
||||
<data name="chkudpEnabled.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>66, 16</value>
|
||||
</data>
|
||||
<data name="chkudpEnabled.Text" xml:space="preserve">
|
||||
<value>开启UDP</value>
|
||||
</data>
|
||||
<data name="chkudpEnabled2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>66, 16</value>
|
||||
</data>
|
||||
<data name="chkudpEnabled2.Text" xml:space="preserve">
|
||||
<value>开启UDP</value>
|
||||
</data>
|
||||
<data name="cmbdomainStrategy.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>81, 14</value>
|
||||
</data>
|
||||
<data name="cmbdomainStrategy.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>186, 20</value>
|
||||
<data name="label16.Text" xml:space="preserve">
|
||||
<value>Http代理</value>
|
||||
</data>
|
||||
<data name="cmblistenerType.Items" xml:space="preserve">
|
||||
<value>关闭Http代理</value>
|
||||
@@ -228,6 +157,117 @@
|
||||
<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>
|
||||
</data>
|
||||
<data name="chksniffingEnabled2.Text" xml:space="preserve">
|
||||
<value>开启流量探测</value>
|
||||
</data>
|
||||
<data name="chksniffingEnabled.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>96, 16</value>
|
||||
</data>
|
||||
<data name="chksniffingEnabled.Text" xml:space="preserve">
|
||||
<value>开启流量探测</value>
|
||||
</data>
|
||||
<data name="label14.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>191, 12</value>
|
||||
</data>
|
||||
<data name="label14.Text" xml:space="preserve">
|
||||
<value>自定义DNS(可多个,用逗号(,)隔开)</value>
|
||||
</data>
|
||||
<data name="chkmuxEnabled.Text" xml:space="preserve">
|
||||
<value>开启Mux多路复用(默认开启)</value>
|
||||
</data>
|
||||
<data name="chkAllowIn2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>102, 16</value>
|
||||
</data>
|
||||
<data name="chkAllowIn2.Text" xml:space="preserve">
|
||||
<value>本地监听端口2</value>
|
||||
</data>
|
||||
<data name="chkudpEnabled2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>66, 16</value>
|
||||
</data>
|
||||
<data name="chkudpEnabled2.Text" xml:space="preserve">
|
||||
<value>开启UDP</value>
|
||||
</data>
|
||||
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>29, 12</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>协议</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>29, 12</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>协议</value>
|
||||
</data>
|
||||
<data name="chkudpEnabled.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>66, 16</value>
|
||||
</data>
|
||||
<data name="chkudpEnabled.Text" xml:space="preserve">
|
||||
<value>开启UDP</value>
|
||||
</data>
|
||||
<data name="chklogEnabled.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>156, 16</value>
|
||||
</data>
|
||||
<data name="chklogEnabled.Text" xml:space="preserve">
|
||||
<value>记录本地日志(默认关闭)</value>
|
||||
</data>
|
||||
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 12</value>
|
||||
</data>
|
||||
<data name="label5.Text" xml:space="preserve">
|
||||
<value>日志等级</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>77, 12</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>本地监听端口</value>
|
||||
</data>
|
||||
<data name="tabPage2.Text" xml:space="preserve">
|
||||
<value> Core:路由设置 </value>
|
||||
</data>
|
||||
<data name="tabControl2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 89</value>
|
||||
</data>
|
||||
<data name="tabControl2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>642, 481</value>
|
||||
</data>
|
||||
<data name="tabPage3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>634, 455</value>
|
||||
</data>
|
||||
<data name="tabPage3.Text" xml:space="preserve">
|
||||
<value> 1.代理的Domain或IP </value>
|
||||
</data>
|
||||
<data name="txtUseragent.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>628, 449</value>
|
||||
</data>
|
||||
<data name="tabPage4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>634, 455</value>
|
||||
</data>
|
||||
<data name="tabPage4.Text" xml:space="preserve">
|
||||
<value> 2.直连的Domain或IP </value>
|
||||
</data>
|
||||
<data name="txtUserdirect.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>628, 449</value>
|
||||
</data>
|
||||
<data name="tabPage5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>634, 455</value>
|
||||
</data>
|
||||
<data name="tabPage5.Text" xml:space="preserve">
|
||||
<value> 3.阻止的Domain或IP </value>
|
||||
</data>
|
||||
<data name="txtUserblock.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>628, 449</value>
|
||||
</data>
|
||||
<data name="tabPage8.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>634, 455</value>
|
||||
</data>
|
||||
<data name="tabPage8.Text" xml:space="preserve">
|
||||
<value> 4.预定义规则 </value>
|
||||
</data>
|
||||
<data name="cmbroutingMode.Items" xml:space="preserve">
|
||||
<value>全局</value>
|
||||
</data>
|
||||
@@ -246,57 +286,29 @@
|
||||
<data name="cmbroutingMode.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>244, 20</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>29, 12</value>
|
||||
<data name="panel3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>642, 72</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>协议</value>
|
||||
</data>
|
||||
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>227, 12</value>
|
||||
</data>
|
||||
<data name="label13.Text" xml:space="preserve">
|
||||
<value>自定义GFWList地址(不需自定义请填空白)</value>
|
||||
</data>
|
||||
<data name="label14.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>191, 12</value>
|
||||
</data>
|
||||
<data name="label14.Text" xml:space="preserve">
|
||||
<value>自定义DNS(可多个,用逗号(,)隔开)</value>
|
||||
</data>
|
||||
<data name="label15.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 12</value>
|
||||
</data>
|
||||
<data name="label15.Text" xml:space="preserve">
|
||||
<value>域名策略</value>
|
||||
</data>
|
||||
<data name="label16.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 12</value>
|
||||
</data>
|
||||
<data name="label16.Text" xml:space="preserve">
|
||||
<value>Http代理</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<data name="linkLabelRoutingDoc.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>77, 12</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>本地监听端口</value>
|
||||
<data name="linkLabelRoutingDoc.Text" xml:space="preserve">
|
||||
<value>域名解析策略</value>
|
||||
</data>
|
||||
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>29, 12</value>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="btnSetDefRountingRule.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>协议</value>
|
||||
<data name="btnSetDefRountingRule.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>351, 14</value>
|
||||
</data>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>*设置用户PAC规则,用逗号(,)隔开</value>
|
||||
<data name="btnSetDefRountingRule.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>201, 23</value>
|
||||
</data>
|
||||
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 12</value>
|
||||
</data>
|
||||
<data name="label5.Text" xml:space="preserve">
|
||||
<value>日志等级</value>
|
||||
<data name="btnSetDefRountingRule.Text" xml:space="preserve">
|
||||
<value>一键设置默认自定义路由规则</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="labRoutingTips.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
@@ -309,67 +321,58 @@
|
||||
<data name="labRoutingTips.Text" xml:space="preserve">
|
||||
<value>*设置的规则,用逗号(,)隔开;支持Domain(纯字符串/正则/子域名)和IP</value>
|
||||
</data>
|
||||
<data name="lbFreshrate.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>77, 12</value>
|
||||
</data>
|
||||
<data name="lbFreshrate.Text" xml:space="preserve">
|
||||
<value>统计刷新频率</value>
|
||||
</data>
|
||||
<data name="panel3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>642, 72</value>
|
||||
</data>
|
||||
<data name="tabControl2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 89</value>
|
||||
</data>
|
||||
<data name="tabControl2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>642, 481</value>
|
||||
</data>
|
||||
<data name="tabPage1.Text" xml:space="preserve">
|
||||
<value> Core:基础设置 </value>
|
||||
</data>
|
||||
<data name="tabPage2.Text" xml:space="preserve">
|
||||
<value> Core:路由设置 </value>
|
||||
</data>
|
||||
<data name="tabPage3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>634, 455</value>
|
||||
</data>
|
||||
<data name="tabPage3.Text" xml:space="preserve">
|
||||
<value> 1.代理的Domain或IP </value>
|
||||
</data>
|
||||
<data name="tabPage4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>634, 455</value>
|
||||
</data>
|
||||
<data name="tabPage4.Text" xml:space="preserve">
|
||||
<value> 2.直连的Domain或IP </value>
|
||||
</data>
|
||||
<data name="tabPage5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>634, 455</value>
|
||||
</data>
|
||||
<data name="tabPage5.Text" xml:space="preserve">
|
||||
<value> 3.阻止的Domain或IP </value>
|
||||
</data>
|
||||
<data name="tabPage6.Text" xml:space="preserve">
|
||||
<value> Core:KCP设置 </value>
|
||||
</data>
|
||||
<data name="tabPage7.Text" xml:space="preserve">
|
||||
<value> v2rayN设置 </value>
|
||||
</data>
|
||||
<data name="tabPage8.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>634, 455</value>
|
||||
<data name="chkKeepOlderDedupl.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>156, 16</value>
|
||||
</data>
|
||||
<data name="tabPage8.Text" xml:space="preserve">
|
||||
<value> 4.预定义规则 </value>
|
||||
<data name="chkKeepOlderDedupl.Text" xml:space="preserve">
|
||||
<value>去重时保留序号较小的项</value>
|
||||
</data>
|
||||
<data name="lbFreshrate.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>77, 12</value>
|
||||
</data>
|
||||
<data name="lbFreshrate.Text" xml:space="preserve">
|
||||
<value>统计刷新频率</value>
|
||||
</data>
|
||||
<data name="chkEnableStatistics.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>372, 16</value>
|
||||
</data>
|
||||
<data name="chkEnableStatistics.Text" xml:space="preserve">
|
||||
<value>启用统计(实时网速显示和使用流量显示,需要重启v2rayN客户端)</value>
|
||||
</data>
|
||||
<data name="chkAllowLANConn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>144, 16</value>
|
||||
</data>
|
||||
<data name="chkAllowLANConn.Text" xml:space="preserve">
|
||||
<value>允许来自局域网的连接</value>
|
||||
</data>
|
||||
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>227, 12</value>
|
||||
</data>
|
||||
<data name="label13.Text" xml:space="preserve">
|
||||
<value>自定义GFWList地址(不需自定义请填空白)</value>
|
||||
</data>
|
||||
<data name="chkAutoRun.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 16</value>
|
||||
</data>
|
||||
<data name="chkAutoRun.Text" xml:space="preserve">
|
||||
<value>开机自动启动(可能会不成功)</value>
|
||||
</data>
|
||||
<data name="tabPage9.Text" xml:space="preserve">
|
||||
<value> 用户PAC设置 </value>
|
||||
</data>
|
||||
<data name="txtUseragent.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>628, 449</value>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>*设置用户PAC规则,用逗号(,)隔开</value>
|
||||
</data>
|
||||
<data name="txtUserblock.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>628, 449</value>
|
||||
<data name="btnOK.Text" xml:space="preserve">
|
||||
<value>确定(&O)</value>
|
||||
</data>
|
||||
<data name="txtUserdirect.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>628, 449</value>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>参数设置</value>
|
||||
</data>
|
||||
</root>
|
||||
10
v2rayN/v2rayN/Forms/QRCodeControl.Designer.cs
generated
10
v2rayN/v2rayN/Forms/QRCodeControl.Designer.cs
generated
@@ -31,7 +31,6 @@
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(QRCodeControl));
|
||||
this.txtUrl = new System.Windows.Forms.TextBox();
|
||||
this.picQRCode = new System.Windows.Forms.PictureBox();
|
||||
this.chkShow = new System.Windows.Forms.CheckBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picQRCode)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@@ -47,20 +46,12 @@
|
||||
this.picQRCode.Name = "picQRCode";
|
||||
this.picQRCode.TabStop = false;
|
||||
//
|
||||
// chkShow
|
||||
//
|
||||
resources.ApplyResources(this.chkShow, "chkShow");
|
||||
this.chkShow.Name = "chkShow";
|
||||
this.chkShow.UseVisualStyleBackColor = true;
|
||||
this.chkShow.CheckedChanged += new System.EventHandler(this.chkShow_CheckedChanged);
|
||||
//
|
||||
// QRCodeControl
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.picQRCode);
|
||||
this.Controls.Add(this.txtUrl);
|
||||
this.Controls.Add(this.chkShow);
|
||||
this.Name = "QRCodeControl";
|
||||
this.Load += new System.EventHandler(this.QRCodeControl_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.picQRCode)).EndInit();
|
||||
@@ -73,6 +64,5 @@
|
||||
|
||||
private System.Windows.Forms.TextBox txtUrl;
|
||||
private System.Windows.Forms.PictureBox picQRCode;
|
||||
private System.Windows.Forms.CheckBox chkShow;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ namespace v2rayN.Forms
|
||||
}
|
||||
private void QRCodeControl_Load(object sender, System.EventArgs e)
|
||||
{
|
||||
chkShow_CheckedChanged(null, null);
|
||||
txtUrl.MouseUp += txtUrl_MouseUp;
|
||||
}
|
||||
|
||||
@@ -32,16 +31,9 @@ namespace v2rayN.Forms
|
||||
txtUrl.Text = string.Empty;
|
||||
return;
|
||||
}
|
||||
picQRCode.Image = QRCodeHelper.GetQRCode(url);
|
||||
txtUrl.Text = url;
|
||||
picQRCode.Image = QRCodeHelper.GetQRCode(url);
|
||||
}
|
||||
}
|
||||
|
||||
private void chkShow_CheckedChanged(object sender, System.EventArgs e)
|
||||
{
|
||||
picQRCode.Visible =
|
||||
txtUrl.Visible = chkShow.Checked;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,60 +117,15 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 12</value>
|
||||
</data>
|
||||
<data name="$this.Localizable" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>QRCodeControl</value>
|
||||
</data>
|
||||
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>356, 441</value>
|
||||
</data>
|
||||
<data name="chkShow.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="chkShow.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Top</value>
|
||||
</data>
|
||||
<data name="chkShow.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="chkShow.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>356, 16</value>
|
||||
</data>
|
||||
<data name="chkShow.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>25</value>
|
||||
</data>
|
||||
<data name="chkShow.Text" xml:space="preserve">
|
||||
<value>Sharing panel</value>
|
||||
</data>
|
||||
<data name="picQRCode.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="picQRCode.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 16</value>
|
||||
</data>
|
||||
<data name="picQRCode.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>356, 355</value>
|
||||
</data>
|
||||
<data name="picQRCode.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
|
||||
<value>Zoom</value>
|
||||
</data>
|
||||
<data name="picQRCode.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>24</value>
|
||||
</data>
|
||||
<data name="txtUrl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Bottom</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="txtUrl.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 371</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="txtUrl.Multiline" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
@@ -180,4 +135,58 @@
|
||||
<data name="txtUrl.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>txtUrl.Name" xml:space="preserve">
|
||||
<value>txtUrl</value>
|
||||
</data>
|
||||
<data name=">>txtUrl.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtUrl.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>txtUrl.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="picQRCode.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="picQRCode.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="picQRCode.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>356, 371</value>
|
||||
</data>
|
||||
<data name="picQRCode.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
|
||||
<value>Zoom</value>
|
||||
</data>
|
||||
<data name="picQRCode.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>24</value>
|
||||
</data>
|
||||
<data name=">>picQRCode.Name" xml:space="preserve">
|
||||
<value>picQRCode</value>
|
||||
</data>
|
||||
<data name=">>picQRCode.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>picQRCode.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>picQRCode.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 12</value>
|
||||
</data>
|
||||
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>356, 441</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>QRCodeControl</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>
|
||||
</data>
|
||||
</root>
|
||||
@@ -117,7 +117,4 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="chkShow.Text" xml:space="preserve">
|
||||
<value>显示分享内容</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -28,7 +28,7 @@ namespace v2rayN
|
||||
/// <summary>
|
||||
/// PromotionUrl
|
||||
/// </summary>
|
||||
public const string PromotionUrl = @"aHR0cHM6Ly8xLjIzNDQ1Ni54eXovYWJjLmh0bWw=";
|
||||
public const string PromotionUrl = @"aHR0cHM6Ly85LjIzNDQ1Ni54eXovYWJjLmh0bWw=";
|
||||
|
||||
/// <summary>
|
||||
/// 本软件配置文件名
|
||||
|
||||
@@ -4,6 +4,8 @@ using System.IO;
|
||||
using System.Net;
|
||||
using v2rayN.Mode;
|
||||
using v2rayN.Base;
|
||||
using System.Linq;
|
||||
using v2rayN.Tool;
|
||||
|
||||
namespace v2rayN.Handler
|
||||
{
|
||||
@@ -119,6 +121,11 @@ namespace v2rayN.Handler
|
||||
{
|
||||
config.uiItem = new UIItem();
|
||||
}
|
||||
if (config.uiItem.mainLvColWidth == null)
|
||||
{
|
||||
config.uiItem.mainLvColWidth = new Dictionary<string, int>();
|
||||
}
|
||||
|
||||
//// 如果是用户升级,首次会有端口号为0的情况,不可用,这里处理
|
||||
//if (config.pacPort == 0)
|
||||
//{
|
||||
@@ -206,6 +213,10 @@ namespace v2rayN.Handler
|
||||
else
|
||||
{
|
||||
//添加
|
||||
if (Utils.IsNullOrEmpty(vmessItem.allowInsecure))
|
||||
{
|
||||
vmessItem.allowInsecure = config.defAllowInsecure.ToString();
|
||||
}
|
||||
config.vmess.Add(vmessItem);
|
||||
if (config.vmess.Count == 1)
|
||||
{
|
||||
@@ -276,18 +287,19 @@ namespace v2rayN.Handler
|
||||
VmessItem vmessItem = new VmessItem
|
||||
{
|
||||
configVersion = config.vmess[index].configVersion,
|
||||
configType = config.vmess[index].configType,
|
||||
address = config.vmess[index].address,
|
||||
port = config.vmess[index].port,
|
||||
id = config.vmess[index].id,
|
||||
alterId = config.vmess[index].alterId,
|
||||
security = config.vmess[index].security,
|
||||
network = config.vmess[index].network,
|
||||
remarks = string.Format("{0}-clone", config.vmess[index].remarks),
|
||||
headerType = config.vmess[index].headerType,
|
||||
requestHost = config.vmess[index].requestHost,
|
||||
path = config.vmess[index].path,
|
||||
streamSecurity = config.vmess[index].streamSecurity,
|
||||
remarks = string.Format("{0}-clone", config.vmess[index].remarks)
|
||||
allowInsecure = config.vmess[index].allowInsecure,
|
||||
configType = config.vmess[index].configType
|
||||
};
|
||||
|
||||
config.vmess.Insert(index + 1, vmessItem); // 插入到下一项
|
||||
@@ -875,5 +887,78 @@ namespace v2rayN.Handler
|
||||
ToJsonFile(config);
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int AddformMainLvColWidth(ref Config config, string name, int width)
|
||||
{
|
||||
if (config.uiItem.mainLvColWidth == null)
|
||||
{
|
||||
config.uiItem.mainLvColWidth = new Dictionary<string, int>();
|
||||
}
|
||||
if (config.uiItem.mainLvColWidth.ContainsKey(name))
|
||||
{
|
||||
config.uiItem.mainLvColWidth[name] = width;
|
||||
}
|
||||
else
|
||||
{
|
||||
config.uiItem.mainLvColWidth.Add(name, width);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
public static int GetformMainLvColWidth(ref Config config, string name, int width)
|
||||
{
|
||||
if (config.uiItem.mainLvColWidth == null)
|
||||
{
|
||||
config.uiItem.mainLvColWidth = new Dictionary<string, int>();
|
||||
}
|
||||
if (config.uiItem.mainLvColWidth.ContainsKey(name))
|
||||
{
|
||||
return config.uiItem.mainLvColWidth[name];
|
||||
}
|
||||
else
|
||||
{
|
||||
return width;
|
||||
}
|
||||
}
|
||||
|
||||
public static int SortServers(ref Config config, EServerColName name, bool asc)
|
||||
{
|
||||
if (config.vmess.Count <= 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
switch (name)
|
||||
{
|
||||
case EServerColName.configType:
|
||||
case EServerColName.remarks:
|
||||
case EServerColName.address:
|
||||
case EServerColName.port:
|
||||
case EServerColName.security:
|
||||
case EServerColName.network:
|
||||
case EServerColName.testResult:
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
string itemId = config.getItemId();
|
||||
var items = config.vmess.AsQueryable();
|
||||
|
||||
if (asc)
|
||||
{
|
||||
config.vmess = items.OrderBy(name.ToString()).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
config.vmess = items.OrderByDescending(name.ToString()).ToList();
|
||||
}
|
||||
|
||||
var index_ = config.vmess.FindIndex(it => it.getItemId() == itemId);
|
||||
if (index_ >= 0)
|
||||
{
|
||||
config.index = index_;
|
||||
}
|
||||
|
||||
ToJsonFile(config);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,13 +136,15 @@ namespace v2rayN.Handler
|
||||
string curVersion;
|
||||
string message;
|
||||
string url;
|
||||
if (type == "Core") {
|
||||
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") {
|
||||
else if (type == "v2rayN")
|
||||
{
|
||||
curVersion = FileVersionInfo.GetVersionInfo(Utils.GetExePath()).FileVersion.ToString();
|
||||
message = string.Format(UIRes.I18N("IsLatestN"), curVersion);
|
||||
url = string.Format(nUrl, version);
|
||||
@@ -172,8 +174,9 @@ namespace v2rayN.Handler
|
||||
|
||||
#region Download
|
||||
|
||||
public void DownloadFileAsync(string url, WebProxy webProxy, int downloadTimeout)
|
||||
public WebClientEx DownloadFileAsync(string url, WebProxy webProxy, int downloadTimeout)
|
||||
{
|
||||
WebClientEx ws = new WebClientEx();
|
||||
try
|
||||
{
|
||||
Utils.SetSecurityProtocol();
|
||||
@@ -182,7 +185,7 @@ namespace v2rayN.Handler
|
||||
progressPercentage = -1;
|
||||
totalBytesToReceive = 0;
|
||||
|
||||
WebClientEx ws = new WebClientEx();
|
||||
//WebClientEx ws = new WebClientEx();
|
||||
DownloadTimeout = downloadTimeout;
|
||||
if (webProxy != null)
|
||||
{
|
||||
@@ -199,6 +202,7 @@ namespace v2rayN.Handler
|
||||
|
||||
Error?.Invoke(this, new ErrorEventArgs(ex));
|
||||
}
|
||||
return ws;
|
||||
}
|
||||
|
||||
void ws_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
|
||||
@@ -228,7 +232,6 @@ namespace v2rayN.Handler
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ws_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
|
||||
{
|
||||
try
|
||||
@@ -239,7 +242,7 @@ namespace v2rayN.Handler
|
||||
{
|
||||
((WebClientEx)sender).Dispose();
|
||||
TimeSpan ts = (DateTime.Now - totalDatetime);
|
||||
string speed = string.Format("<{0} M/s", (totalBytesToReceive / ts.TotalMilliseconds / 1000).ToString("#0.##"));
|
||||
string speed = string.Format("{0} M/s", (totalBytesToReceive / ts.TotalMilliseconds / 1000).ToString("#0.##"));
|
||||
UpdateCompleted(this, new ResultEventArgs(true, speed));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -11,26 +11,17 @@ namespace v2rayN.Handler
|
||||
{
|
||||
class SpeedtestHandler
|
||||
{
|
||||
private DownloadHandle downloadHandle2;
|
||||
private Config _config;
|
||||
private V2rayHandler _v2rayHandler;
|
||||
private List<int> _selecteds;
|
||||
Action<int, string> _updateFunc;
|
||||
|
||||
private int testCounter = 0;
|
||||
private int ItemIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
return _selecteds[testCounter - 1];
|
||||
}
|
||||
}
|
||||
|
||||
public SpeedtestHandler(ref Config config, ref V2rayHandler v2rayHandler, List<int> selecteds, string actionType, Action<int, string> update)
|
||||
{
|
||||
_config = config;
|
||||
_v2rayHandler = v2rayHandler;
|
||||
_selecteds = selecteds;
|
||||
_selecteds = Utils.DeepCopy(selecteds);
|
||||
_updateFunc = update;
|
||||
|
||||
if (actionType == "ping")
|
||||
@@ -85,7 +76,7 @@ namespace v2rayN.Handler
|
||||
RunPingSub((int index) =>
|
||||
{
|
||||
long time = Utils.Ping(_config.vmess[index].address);
|
||||
_updateFunc(index, string.Format("{0}ms", time));
|
||||
_updateFunc(index, FormatOut(time, "ms"));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -94,7 +85,7 @@ namespace v2rayN.Handler
|
||||
RunPingSub((int index) =>
|
||||
{
|
||||
int time = GetTcpingTime(_config.vmess[index].address, _config.vmess[index].port);
|
||||
_updateFunc(index, string.Format("{0}ms", time));
|
||||
_updateFunc(index, FormatOut(time, "ms"));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -109,36 +100,31 @@ namespace v2rayN.Handler
|
||||
|
||||
//Thread.Sleep(5000);
|
||||
int httpPort = _config.GetLocalPort("speedtest");
|
||||
Task[] tasks = new Task[_selecteds.Count];
|
||||
int i = -1;
|
||||
List<Task> tasks = new List<Task>();
|
||||
foreach (int itemIndex in _selecteds)
|
||||
{
|
||||
if (_config.vmess[itemIndex].configType == (int)EConfigType.Custom)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
i++;
|
||||
tasks[i] = Task.Run(() =>
|
||||
tasks.Add(Task.Run(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
WebProxy webProxy = new WebProxy(Global.Loopback, httpPort + itemIndex);
|
||||
int responseTime = -1;
|
||||
string status = GetRealPingTime(_config.speedPingTestUrl, webProxy, out responseTime);
|
||||
string output = Utils.IsNullOrEmpty(status) ? string.Format("{0}ms", responseTime) : string.Format("{0}", status);
|
||||
string output = Utils.IsNullOrEmpty(status) ? FormatOut(responseTime, "ms") : FormatOut(status, "");
|
||||
_updateFunc(itemIndex, output);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
});
|
||||
}));
|
||||
//Thread.Sleep(100);
|
||||
}
|
||||
Task.WaitAll(tasks);
|
||||
|
||||
Thread.Sleep(100);
|
||||
Task.WaitAll(tasks.ToArray());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -183,6 +169,7 @@ namespace v2rayN.Handler
|
||||
|
||||
private void RunSpeedTest()
|
||||
{
|
||||
int testCounter = 0;
|
||||
int pid = -1;
|
||||
|
||||
if (_config.vmess.Count <= 0)
|
||||
@@ -193,39 +180,41 @@ namespace v2rayN.Handler
|
||||
pid = _v2rayHandler.LoadV2rayConfigString(_config, _selecteds);
|
||||
|
||||
string url = _config.speedTestUrl;
|
||||
testCounter = 0;
|
||||
if (downloadHandle2 == null)
|
||||
DownloadHandle downloadHandle2 = new DownloadHandle();
|
||||
downloadHandle2.UpdateCompleted += (sender2, args) =>
|
||||
{
|
||||
downloadHandle2 = new DownloadHandle();
|
||||
downloadHandle2.UpdateCompleted += (sender2, args) =>
|
||||
{
|
||||
_updateFunc(ItemIndex, args.Msg);
|
||||
if (args.Success) StartNext();
|
||||
};
|
||||
downloadHandle2.Error += (sender2, args) =>
|
||||
{
|
||||
_updateFunc(ItemIndex, args.GetException().Message);
|
||||
StartNext();
|
||||
};
|
||||
}
|
||||
|
||||
StartNext();
|
||||
|
||||
void StartNext()
|
||||
_updateFunc(testCounter, args.Msg);
|
||||
};
|
||||
downloadHandle2.Error += (sender2, args) =>
|
||||
{
|
||||
if (testCounter >= _selecteds.Count)
|
||||
_updateFunc(testCounter, args.GetException().Message);
|
||||
};
|
||||
|
||||
var timeout = 12;
|
||||
foreach (int itemIndex in _selecteds)
|
||||
{
|
||||
if (itemIndex >= _config.vmess.Count)
|
||||
{
|
||||
if (pid > 0) _v2rayHandler.V2rayStopPid(pid);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
if (_config.vmess[itemIndex].configType == (int)EConfigType.Custom)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
testCounter = itemIndex;
|
||||
int httpPort = _config.GetLocalPort("speedtest");
|
||||
int index = _selecteds[testCounter];
|
||||
|
||||
testCounter++;
|
||||
WebProxy webProxy = new WebProxy(Global.Loopback, httpPort + index);
|
||||
downloadHandle2.DownloadFileAsync(url, webProxy, 20);
|
||||
WebProxy webProxy = new WebProxy(Global.Loopback, httpPort + itemIndex);
|
||||
var ws = downloadHandle2.DownloadFileAsync(url, webProxy, timeout - 2);
|
||||
|
||||
Thread.Sleep(1000 * timeout);
|
||||
|
||||
ws.CancelAsync();
|
||||
|
||||
Thread.Sleep(1000 * 2);
|
||||
}
|
||||
if (pid > 0) _v2rayHandler.V2rayStopPid(pid);
|
||||
}
|
||||
|
||||
|
||||
@@ -294,5 +283,13 @@ namespace v2rayN.Handler
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
private string FormatOut(object time, string unit)
|
||||
{
|
||||
if (time.ToString().Equals("-1"))
|
||||
{
|
||||
return "Timeout";
|
||||
}
|
||||
return string.Format("{0}{1}", time, unit).PadLeft(6, ' ');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace v2rayN.Handler
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowMsg(true, msg);
|
||||
ShowMsg(false, msg);
|
||||
pid = V2rayStartNew(configStr);
|
||||
//V2rayRestart();
|
||||
// start with -config
|
||||
@@ -175,7 +175,7 @@ namespace v2rayN.Handler
|
||||
if (Utils.IsNullOrEmpty(fileName))
|
||||
{
|
||||
string msg = string.Format(UIRes.I18N("NotFoundCore"), @"https://github.com/v2ray/v2ray-core/releases");
|
||||
ShowMsg(true, msg);
|
||||
ShowMsg(false, msg);
|
||||
}
|
||||
return fileName;
|
||||
}
|
||||
@@ -200,6 +200,7 @@ namespace v2rayN.Handler
|
||||
WorkingDirectory = Utils.StartupPath(),
|
||||
UseShellExecute = false,
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
CreateNoWindow = true,
|
||||
StandardOutputEncoding = Encoding.UTF8
|
||||
}
|
||||
@@ -213,10 +214,16 @@ namespace v2rayN.Handler
|
||||
}
|
||||
});
|
||||
p.Start();
|
||||
p.PriorityClass = ProcessPriorityClass.High;
|
||||
p.BeginOutputReadLine();
|
||||
//processId = p.Id;
|
||||
_process = p;
|
||||
|
||||
if (p.WaitForExit(1000))
|
||||
{
|
||||
throw new Exception(p.StandardError.ReadToEnd());
|
||||
}
|
||||
|
||||
Global.processJob.AddProcess(p.Handle);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -248,6 +255,7 @@ namespace v2rayN.Handler
|
||||
UseShellExecute = false,
|
||||
RedirectStandardInput = true,
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
CreateNoWindow = true,
|
||||
StandardOutputEncoding = Encoding.UTF8
|
||||
}
|
||||
@@ -266,6 +274,11 @@ namespace v2rayN.Handler
|
||||
p.StandardInput.Write(configStr);
|
||||
p.StandardInput.Close();
|
||||
|
||||
if (p.WaitForExit(1000))
|
||||
{
|
||||
throw new Exception(p.StandardError.ReadToEnd());
|
||||
}
|
||||
|
||||
Global.processJob.AddProcess(p.Handle);
|
||||
return p.Id;
|
||||
}
|
||||
@@ -273,7 +286,7 @@ namespace v2rayN.Handler
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
string msg = ex.Message;
|
||||
ShowMsg(true, msg);
|
||||
ShowMsg(false, msg);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -169,7 +169,7 @@ namespace v2rayN.Mode
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 自定义远程DNS
|
||||
@@ -178,6 +178,15 @@ namespace v2rayN.Mode
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否允许不安全连接
|
||||
/// </summary>
|
||||
public bool defAllowInsecure
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 订阅
|
||||
/// </summary>
|
||||
@@ -196,7 +205,7 @@ namespace v2rayN.Mode
|
||||
public List<string> userPacRule
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
}
|
||||
|
||||
#region 函数
|
||||
|
||||
@@ -297,7 +306,7 @@ namespace v2rayN.Mode
|
||||
{
|
||||
if (index < 0 || Utils.IsNullOrEmpty(vmess[index].allowInsecure))
|
||||
{
|
||||
return true;
|
||||
return defAllowInsecure;
|
||||
}
|
||||
return Convert.ToBoolean(vmess[index].allowInsecure);
|
||||
}
|
||||
@@ -695,10 +704,16 @@ namespace v2rayN.Mode
|
||||
[Serializable]
|
||||
public class UIItem
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int mainQRCodeWidth { get; set; } = 600;
|
||||
|
||||
|
||||
public System.Drawing.Size mainSize
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public Dictionary<string, int> mainLvColWidth
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
21
v2rayN/v2rayN/Mode/EServerColName.cs
Normal file
21
v2rayN/v2rayN/Mode/EServerColName.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
namespace v2rayN.Mode
|
||||
{
|
||||
public enum EServerColName
|
||||
{
|
||||
def = 0,
|
||||
configType,
|
||||
remarks,
|
||||
address,
|
||||
port,
|
||||
security,
|
||||
network,
|
||||
subRemarks,
|
||||
testResult,
|
||||
|
||||
todayDown,
|
||||
todayUp,
|
||||
totalDown,
|
||||
totalUp
|
||||
}
|
||||
}
|
||||
@@ -33,11 +33,6 @@ namespace v2rayN
|
||||
|
||||
if (!IsDuplicateInstance())
|
||||
{
|
||||
if (!UnzipLibs())
|
||||
{
|
||||
UI.ShowError($"Error preparing the environment(准备运行环境出错)");
|
||||
return;
|
||||
}
|
||||
|
||||
Utils.SaveLog("v2rayN start up " + Utils.GetVersion());
|
||||
|
||||
@@ -100,21 +95,5 @@ namespace v2rayN
|
||||
{
|
||||
Utils.SaveLog("CurrentDomain_UnhandledException", (Exception)e.ExceptionObject);
|
||||
}
|
||||
|
||||
static bool UnzipLibs()
|
||||
{
|
||||
string fileName = Utils.GetPath("libs.zip");
|
||||
if (!FileManager.ByteArrayToFile(fileName, Resources.libs))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!FileManager.ZipExtractToFile(fileName))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,4 +32,4 @@ using System.Runtime.InteropServices;
|
||||
// 方法是按如下所示使用“*”:
|
||||
//[assembly: AssemblyVersion("1.0.*")]
|
||||
//[assembly: AssemblyVersion("1.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.10")]
|
||||
[assembly: AssemblyFileVersion("3.17")]
|
||||
|
||||
20
v2rayN/v2rayN/Properties/Resources.Designer.cs
generated
20
v2rayN/v2rayN/Properties/Resources.Designer.cs
generated
@@ -100,16 +100,6 @@ namespace v2rayN.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Byte[] 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static byte[] libs {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("libs", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
@@ -207,6 +197,16 @@ namespace v2rayN.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap share {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("share", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
|
||||
@@ -118,55 +118,55 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="privoxy_exe" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\privoxy.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="about" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\about.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="abp_js" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\abp.js.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="checkupdate" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\checkupdate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="help" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\help.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="libs" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\lib\libs.zip;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="minimize" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\minimize.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="notify" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\notify.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="option" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\option.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="pac_txt" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\pac.txt.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="privoxy_conf" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\privoxy_conf.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;gb2312</value>
|
||||
</data>
|
||||
<data name="privoxy_exe" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\privoxy.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="promotion" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\promotion.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="restart" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\restart.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="server" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\server.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<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>
|
||||
<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="server" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\server.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="notify" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\notify.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="checkupdate" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\checkupdate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="promotion" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\promotion.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="privoxy_conf" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\privoxy_conf.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;gb2312</value>
|
||||
</data>
|
||||
<data name="minimize" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\minimize.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="pac_txt" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\pac.txt.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="help" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\help.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="abp_js" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\abp.js.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="share" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\share.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
BIN
v2rayN/v2rayN/Resources/share.png
Normal file
BIN
v2rayN/v2rayN/Resources/share.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 802 B |
6
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
6
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
@@ -475,11 +475,11 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Resolve V2ray successfully 的本地化字符串。
|
||||
/// 查找类似 Resolve {0} successfully 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string MsgParsingV2rayCoreSuccessfully {
|
||||
internal static string MsgParsingSuccessfully {
|
||||
get {
|
||||
return ResourceManager.GetString("MsgParsingV2rayCoreSuccessfully", resourceCulture);
|
||||
return ResourceManager.GetString("MsgParsingSuccessfully", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -255,8 +255,8 @@
|
||||
<data name="MsgPACUpdateSuccessfully" xml:space="preserve">
|
||||
<value>PAC update succeeded</value>
|
||||
</data>
|
||||
<data name="MsgParsingV2rayCoreSuccessfully" xml:space="preserve">
|
||||
<value>Resolve V2ray successfully</value>
|
||||
<data name="MsgParsingSuccessfully" xml:space="preserve">
|
||||
<value>Resolve {0} successfully</value>
|
||||
</data>
|
||||
<data name="MsgSimplifyPAC" xml:space="preserve">
|
||||
<value>Simplify PAC Success</value>
|
||||
|
||||
@@ -255,8 +255,8 @@
|
||||
<data name="MsgPACUpdateSuccessfully" xml:space="preserve">
|
||||
<value>PAC更新成功</value>
|
||||
</data>
|
||||
<data name="MsgParsingV2rayCoreSuccessfully" xml:space="preserve">
|
||||
<value>解析V2ray成功</value>
|
||||
<data name="MsgParsingSuccessfully" xml:space="preserve">
|
||||
<value>解析{0}成功</value>
|
||||
</data>
|
||||
<data name="MsgSimplifyPAC" xml:space="preserve">
|
||||
<value>简化PAC成功</value>
|
||||
|
||||
48
v2rayN/v2rayN/Tool/QueryableExtension.cs
Normal file
48
v2rayN/v2rayN/Tool/QueryableExtension.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
|
||||
namespace v2rayN.Tool
|
||||
{
|
||||
public static class QueryableExtension
|
||||
{
|
||||
public static IOrderedQueryable<T> OrderBy<T>(this IQueryable<T> query, string propertyName)
|
||||
{
|
||||
return _OrderBy<T>(query, propertyName, false);
|
||||
}
|
||||
public static IOrderedQueryable<T> OrderByDescending<T>(this IQueryable<T> query, string propertyName)
|
||||
{
|
||||
return _OrderBy<T>(query, propertyName, true);
|
||||
}
|
||||
|
||||
static IOrderedQueryable<T> _OrderBy<T>(IQueryable<T> query, string propertyName, bool isDesc)
|
||||
{
|
||||
string methodname = (isDesc) ? "OrderByDescendingInternal" : "OrderByInternal";
|
||||
|
||||
var memberProp = typeof(T).GetProperty(propertyName);
|
||||
|
||||
var method = typeof(QueryableExtension).GetMethod(methodname)
|
||||
.MakeGenericMethod(typeof(T), memberProp.PropertyType);
|
||||
|
||||
return (IOrderedQueryable<T>)method.Invoke(null, new object[] { query, memberProp });
|
||||
}
|
||||
public static IOrderedQueryable<T> OrderByInternal<T, TProp>(IQueryable<T> query, PropertyInfo memberProperty)
|
||||
{//public
|
||||
return query.OrderBy(_GetLamba<T, TProp>(memberProperty));
|
||||
}
|
||||
public static IOrderedQueryable<T> OrderByDescendingInternal<T, TProp>(IQueryable<T> query, PropertyInfo memberProperty)
|
||||
{//public
|
||||
return query.OrderByDescending(_GetLamba<T, TProp>(memberProperty));
|
||||
}
|
||||
static Expression<Func<T, TProp>> _GetLamba<T, TProp>(PropertyInfo memberProperty)
|
||||
{
|
||||
if (memberProperty.PropertyType != typeof(TProp)) throw new Exception();
|
||||
|
||||
var thisArg = Expression.Parameter(typeof(T));
|
||||
var lamba = Expression.Lambda<Func<T, TProp>>(Expression.Property(thisArg, memberProperty), thisArg);
|
||||
|
||||
return lamba;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -285,14 +285,14 @@ namespace v2rayN
|
||||
if (GBs > 0)
|
||||
{
|
||||
// multi GB
|
||||
ulong TBs = GBs / factor;
|
||||
/*ulong TBs = GBs / factor;
|
||||
if (TBs > 0)
|
||||
{
|
||||
// 你是魔鬼吗? 用这么多流量
|
||||
result = TBs + GBs % factor / (factor + 0.0);
|
||||
unit = "TB";
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
result = GBs + MBs % factor / (factor + 0.0);
|
||||
unit = "GB";
|
||||
return;
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Grpc.Tools" version="2.24.0" targetFramework="net46" developmentDependency="true" />
|
||||
</packages>
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\Grpc.Tools.2.24.0\build\Grpc.Tools.props" Condition="Exists('..\packages\Grpc.Tools.2.24.0\build\Grpc.Tools.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -45,7 +44,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
@@ -74,33 +73,14 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<PropertyGroup>
|
||||
<StartupObject>v2rayN.Program</StartupObject>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Google.Protobuf, Version=3.9.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>LIB\Google.Protobuf.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Grpc.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>LIB\Grpc.Core.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Grpc.Core.Api, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>LIB\Grpc.Core.Api.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>LIB\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>LIB\System.Buffers.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
@@ -109,32 +89,12 @@
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.IO.Compression.FileSystem" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>LIB\System.Memory.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</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>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="zxing, Version=0.16.2.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>LIB\zxing.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="zxing.presentation, Version=0.16.2.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>LIB\zxing.presentation.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Forms\AddServer4Form.cs">
|
||||
@@ -197,6 +157,7 @@
|
||||
</Compile>
|
||||
<Compile Include="HttpProxyHandler\SysProxyHandle.cs" />
|
||||
<Compile Include="Mode\EMove.cs" />
|
||||
<Compile Include="Mode\EServerColName.cs" />
|
||||
<Compile Include="Mode\ServerStatistics.cs" />
|
||||
<Compile Include="Mode\SysproxyConfig.cs" />
|
||||
<Compile Include="Mode\EConfigType.cs" />
|
||||
@@ -248,6 +209,7 @@
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Tool\FileManager.cs" />
|
||||
<Compile Include="Tool\Job.cs" />
|
||||
<Compile Include="Tool\QueryableExtension.cs" />
|
||||
<Compile Include="Tool\UIRes.cs" />
|
||||
<Compile Include="Tool\UI.cs" />
|
||||
<Compile Include="Tool\Utils.cs" />
|
||||
@@ -332,8 +294,6 @@
|
||||
<EmbeddedResource Include="app.config">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<None Include="LIB\libs.zip" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
@@ -411,41 +371,43 @@
|
||||
<None Include="Resources\minimize.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\share.png" />
|
||||
<None Include="Resources\promotion.png" />
|
||||
<EmbeddedResource Include="Sample\BlankPac.txt" />
|
||||
<None Include="Resources\sub.png" />
|
||||
<None Include="Resources\checkupdate.png" />
|
||||
<None Include="Resources\about.png" />
|
||||
<None Include="LIB\Google.Protobuf.dll" />
|
||||
<None Include="LIB\Grpc.Core.Api.dll" />
|
||||
<None Include="LIB\Grpc.Core.dll" />
|
||||
<None Include="LIB\Newtonsoft.Json.dll" />
|
||||
<None Include="LIB\System.Buffers.dll" />
|
||||
<None Include="LIB\System.Memory.dll" />
|
||||
<None Include="LIB\System.Runtime.CompilerServices.Unsafe.dll" />
|
||||
<None Include="LIB\zxing.dll" />
|
||||
<None Include="LIB\zxing.presentation.dll" />
|
||||
<None Include="LIB\netstandard.dll" />
|
||||
<Content Include="LIB\grpc_csharp_ext.x64.dll" />
|
||||
<Content Include="LIB\grpc_csharp_ext.x86.dll" />
|
||||
<Content Include="Resources\help.png" />
|
||||
<None Include="Resources\notify.png" />
|
||||
<Content Include="Resources\privoxy_conf.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Google.Protobuf">
|
||||
<Version>3.11.4</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Grpc.Core">
|
||||
<Version>2.27.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Grpc.Tools">
|
||||
<Version>2.27.0</Version>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Newtonsoft.Json">
|
||||
<Version>12.0.3</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="ZXing.Net">
|
||||
<Version>0.16.5</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
<PostBuildEvent>copy /y $(SolutionDir)v2rayUpgrade\$(OutDir)* $(TargetDir)
|
||||
|
||||
del $(TargetDir)*.xml $(TargetDir)*.so $(TargetDir)*.dylib
|
||||
if not "$(ConfigurationName)" == "Debug" del $(TargetDir)*.pdb</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\packages\Grpc.Core.2.23.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.2.23.0\build\net45\Grpc.Core.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\Grpc.Tools.2.24.0\build\Grpc.Tools.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Tools.2.24.0\build\Grpc.Tools.props'))" />
|
||||
<Error Condition="!Exists('..\packages\Grpc.Tools.2.24.0\build\Grpc.Tools.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Tools.2.24.0\build\Grpc.Tools.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\Grpc.Tools.2.24.0\build\Grpc.Tools.targets" Condition="Exists('..\packages\Grpc.Tools.2.24.0\build\Grpc.Tools.targets')" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace v2rayUpgrade
|
||||
@@ -46,9 +47,9 @@ namespace v2rayUpgrade
|
||||
"Close it manually, or the upgrade may fail.(请手动关闭正在运行的v2rayN,否则可能升级失败。\n\n" + ex.StackTrace);
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
try
|
||||
{
|
||||
|
||||
if (!File.Exists(fileName))
|
||||
{
|
||||
if (File.Exists(defaultFilename))
|
||||
@@ -62,27 +63,41 @@ namespace v2rayUpgrade
|
||||
}
|
||||
}
|
||||
|
||||
string thisAppOldFile = Application.ExecutablePath + ".tmp";
|
||||
File.Delete(thisAppOldFile);
|
||||
string startKey = "v2rayN/";
|
||||
|
||||
|
||||
using (ZipArchive archive = ZipFile.OpenRead(fileName))
|
||||
{
|
||||
foreach (ZipArchiveEntry entry in archive.Entries)
|
||||
{
|
||||
if (entry.Length == 0)
|
||||
try
|
||||
{
|
||||
continue;
|
||||
if (entry.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
string fullName = entry.FullName;
|
||||
if (fullName.StartsWith(startKey))
|
||||
{
|
||||
fullName = fullName.Substring(startKey.Length, fullName.Length - startKey.Length);
|
||||
}
|
||||
if (Application.ExecutablePath.ToLower() == GetPath(fullName).ToLower())
|
||||
{
|
||||
File.Move(Application.ExecutablePath, thisAppOldFile);
|
||||
}
|
||||
|
||||
string entryOuputPath = GetPath(fullName);
|
||||
|
||||
FileInfo fileInfo = new FileInfo(entryOuputPath);
|
||||
fileInfo.Directory.Create();
|
||||
entry.ExtractToFile(entryOuputPath, true);
|
||||
}
|
||||
string fullName = entry.FullName;
|
||||
if (fullName.StartsWith(startKey))
|
||||
catch (Exception ex)
|
||||
{
|
||||
fullName = fullName.Substring(startKey.Length, fullName.Length - startKey.Length);
|
||||
sb.Append(ex.StackTrace);
|
||||
}
|
||||
|
||||
string entryOuputPath = GetPath(fullName);
|
||||
|
||||
FileInfo fileInfo = new FileInfo(entryOuputPath);
|
||||
fileInfo.Directory.Create();
|
||||
entry.ExtractToFile(entryOuputPath, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -91,6 +106,12 @@ namespace v2rayUpgrade
|
||||
showWarn("Upgrade Failed(升级失败)." + ex.StackTrace);
|
||||
return;
|
||||
}
|
||||
if (sb.Length > 0)
|
||||
{
|
||||
showWarn("Upgrade Failed,Hold ctrl + c to copy to clipboard.\n" +
|
||||
"(升级失败,按住ctrl+c可以复制到剪贴板)." + sb.ToString());
|
||||
return;
|
||||
}
|
||||
|
||||
Process.Start("v2rayN.exe");
|
||||
MessageBox.Show("Upgrade successed(升级成功)", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
|
||||
Reference in New Issue
Block a user