Compare commits
61 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02a3b25963 | ||
|
|
cfb93a9ff2 | ||
|
|
1943757f43 | ||
|
|
f41fe6d7a3 | ||
|
|
b53ce37b0a | ||
|
|
9fd56605f9 | ||
|
|
19ad24c2d5 | ||
|
|
1dc1d4dccd | ||
|
|
a4174805f6 | ||
|
|
aa5f00e67b | ||
|
|
b921dd3610 | ||
|
|
1526b2435a | ||
|
|
486b0920af | ||
|
|
59a6e1862c | ||
|
|
8ddddb66df | ||
|
|
55d540d556 | ||
|
|
a2cf1cef16 | ||
|
|
01fdb08dd3 | ||
|
|
a8f1a992c5 | ||
|
|
1bbc73f963 | ||
|
|
2676ce0357 | ||
|
|
b22bb90d2d | ||
|
|
d0ca8b2996 | ||
|
|
3154df1bde | ||
|
|
3cdff624ba | ||
|
|
3cd80a20bb | ||
|
|
8986a96100 | ||
|
|
612ad30660 | ||
|
|
bc6517626e | ||
|
|
99e9425942 | ||
|
|
d555081820 | ||
|
|
a3f42e1e25 | ||
|
|
52b31fba1e | ||
|
|
328c0be6e9 | ||
|
|
65d2db55f8 | ||
|
|
54bebd9a6b | ||
|
|
dcd050eee1 | ||
|
|
7d5dcc307e | ||
|
|
7459ada9c0 | ||
|
|
f9c3003cc9 | ||
|
|
c1354600c7 | ||
|
|
86b45d18af | ||
|
|
26c9cd4d27 | ||
|
|
1be22a1a2c | ||
|
|
83e7ad9360 | ||
|
|
fe015b0227 | ||
|
|
2861bff5a0 | ||
|
|
f036f12925 | ||
|
|
56bb63a012 | ||
|
|
f1e9737080 | ||
|
|
649f0af6ec | ||
|
|
025a4491ed | ||
|
|
197d8f1ace | ||
|
|
f51e651410 | ||
|
|
a091616790 | ||
|
|
150fa91ff3 | ||
|
|
33a25d8b49 | ||
|
|
dd1a01556f | ||
|
|
5a1e5707b8 | ||
|
|
5ec275a7e0 | ||
|
|
d1644bb591 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,13 +2,14 @@
|
||||
# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
|
||||
################################################################################
|
||||
|
||||
/v2rayN/.vs/v2rayN/v15
|
||||
/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/packages
|
||||
.vs/ProjectSettings.json
|
||||
.vs/slnx.sqlite
|
||||
.vs/VSWorkspaceState.json
|
||||
|
||||
44
v2rayN/v2rayN/Forms/AddServer4Form.Designer.cs
generated
44
v2rayN/v2rayN/Forms/AddServer4Form.Designer.cs
generated
@@ -31,6 +31,10 @@
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddServer4Form));
|
||||
this.btnClose = new System.Windows.Forms.Button();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.txtSecurity = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.txtId = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.txtRemarks = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
@@ -51,15 +55,18 @@
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
resources.ApplyResources(this.btnClose, "btnClose");
|
||||
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.btnClose, "btnClose");
|
||||
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.txtSecurity);
|
||||
this.groupBox1.Controls.Add(this.label4);
|
||||
this.groupBox1.Controls.Add(this.txtId);
|
||||
this.groupBox1.Controls.Add(this.label3);
|
||||
this.groupBox1.Controls.Add(this.label13);
|
||||
this.groupBox1.Controls.Add(this.txtRemarks);
|
||||
this.groupBox1.Controls.Add(this.label6);
|
||||
@@ -67,9 +74,30 @@
|
||||
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;
|
||||
//
|
||||
// txtSecurity
|
||||
//
|
||||
resources.ApplyResources(this.txtSecurity, "txtSecurity");
|
||||
this.txtSecurity.Name = "txtSecurity";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
resources.ApplyResources(this.label4, "label4");
|
||||
this.label4.Name = "label4";
|
||||
//
|
||||
// txtId
|
||||
//
|
||||
resources.ApplyResources(this.txtId, "txtId");
|
||||
this.txtId.Name = "txtId";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
resources.ApplyResources(this.label3, "label3");
|
||||
this.label3.Name = "label3";
|
||||
//
|
||||
// label13
|
||||
//
|
||||
resources.ApplyResources(this.label13, "label13");
|
||||
@@ -107,9 +135,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
|
||||
@@ -126,22 +154,22 @@
|
||||
//
|
||||
// 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.menuItemImportClipboard});
|
||||
this.MenuItem1.Name = "MenuItem1";
|
||||
resources.ApplyResources(this.MenuItem1, "MenuItem1");
|
||||
//
|
||||
// menuItemImportClipboard
|
||||
//
|
||||
resources.ApplyResources(this.menuItemImportClipboard, "menuItemImportClipboard");
|
||||
this.menuItemImportClipboard.Name = "menuItemImportClipboard";
|
||||
resources.ApplyResources(this.menuItemImportClipboard, "menuItemImportClipboard");
|
||||
this.menuItemImportClipboard.Click += new System.EventHandler(this.menuItemImportClipboard_Click);
|
||||
//
|
||||
// AddServer4Form
|
||||
@@ -184,5 +212,9 @@
|
||||
private System.Windows.Forms.MenuStrip menuServer;
|
||||
private System.Windows.Forms.ToolStripMenuItem MenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem menuItemImportClipboard;
|
||||
private System.Windows.Forms.TextBox txtId;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox txtSecurity;
|
||||
private System.Windows.Forms.Label label4;
|
||||
}
|
||||
}
|
||||
@@ -36,6 +36,8 @@ namespace v2rayN.Forms
|
||||
{
|
||||
txtAddress.Text = vmessItem.address;
|
||||
txtPort.Text = vmessItem.port.ToString();
|
||||
txtId.Text = vmessItem.id;
|
||||
txtSecurity.Text = vmessItem.security;
|
||||
txtRemarks.Text = vmessItem.remarks;
|
||||
}
|
||||
|
||||
@@ -47,6 +49,8 @@ namespace v2rayN.Forms
|
||||
{
|
||||
txtAddress.Text = "";
|
||||
txtPort.Text = "";
|
||||
txtId.Text = "";
|
||||
txtSecurity.Text = "";
|
||||
txtRemarks.Text = "";
|
||||
}
|
||||
|
||||
@@ -54,6 +58,8 @@ namespace v2rayN.Forms
|
||||
{
|
||||
string address = txtAddress.Text;
|
||||
string port = txtPort.Text;
|
||||
string id = txtId.Text;
|
||||
string security = txtSecurity.Text;
|
||||
string remarks = txtRemarks.Text;
|
||||
|
||||
if (Utils.IsNullOrEmpty(address))
|
||||
@@ -69,6 +75,8 @@ namespace v2rayN.Forms
|
||||
|
||||
vmessItem.address = address;
|
||||
vmessItem.port = Utils.ToInt(port);
|
||||
vmessItem.id = id;
|
||||
vmessItem.security = security;
|
||||
vmessItem.remarks = remarks;
|
||||
|
||||
if (ConfigHandler.AddSocksServer(ref config, vmessItem, EditIndex) == 0)
|
||||
@@ -112,6 +120,8 @@ namespace v2rayN.Forms
|
||||
|
||||
txtAddress.Text = vmessItem.address;
|
||||
txtPort.Text = vmessItem.port.ToString();
|
||||
txtSecurity.Text = vmessItem.security;
|
||||
txtId.Text = vmessItem.id;
|
||||
txtRemarks.Text = vmessItem.remarks;
|
||||
}
|
||||
|
||||
|
||||
@@ -117,367 +117,472 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name=">>txtAddress.Name" xml:space="preserve">
|
||||
<value>txtAddress</value>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>396, 17</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Server address</value>
|
||||
<data name="btnClose.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="txtPort.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
<data name="btnClose.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name=">>label6.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="btnClose.Text" xml:space="preserve">
|
||||
<value>&Cancel</value>
|
||||
</data>
|
||||
<data name=">>btnClose.Name" xml:space="preserve">
|
||||
<value>btnClose</value>
|
||||
</data>
|
||||
<data name=">>btnClose.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>btnClose.Parent" xml:space="preserve">
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>btnClose.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="txtSecurity.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 84</value>
|
||||
</data>
|
||||
<data name="txtSecurity.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 21</value>
|
||||
</data>
|
||||
<data name="txtSecurity.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>26</value>
|
||||
</data>
|
||||
<data name=">>txtSecurity.Name" xml:space="preserve">
|
||||
<value>txtSecurity</value>
|
||||
</data>
|
||||
<data name=">>txtSecurity.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=">>txtSecurity.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>txtSecurity.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Bottom</value>
|
||||
<data name="label4.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name=">>txtPort.Parent" xml:space="preserve">
|
||||
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 88</value>
|
||||
</data>
|
||||
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>89, 12</value>
|
||||
</data>
|
||||
<data name="label4.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>25</value>
|
||||
</data>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>User(Optional)</value>
|
||||
</data>
|
||||
<data name=">>label4.Name" xml:space="preserve">
|
||||
<value>label4</value>
|
||||
</data>
|
||||
<data name=">>label4.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label4.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>label4.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="txtId.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 117</value>
|
||||
</data>
|
||||
<data name="txtId.PasswordChar" type="System.Char, mscorlib" xml:space="preserve">
|
||||
<value>*</value>
|
||||
</data>
|
||||
<data name="txtId.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 21</value>
|
||||
</data>
|
||||
<data name="txtId.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>24</value>
|
||||
</data>
|
||||
<data name=">>txtId.Name" xml:space="preserve">
|
||||
<value>txtId</value>
|
||||
</data>
|
||||
<data name=">>txtId.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=">>txtId.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>txtId.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 121</value>
|
||||
</data>
|
||||
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>113, 12</value>
|
||||
</data>
|
||||
<data name="label3.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>23</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>Password(Optional)</value>
|
||||
</data>
|
||||
<data name=">>label3.Name" xml:space="preserve">
|
||||
<value>label3</value>
|
||||
</data>
|
||||
<data name=">>label3.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label3.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>label3.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="label13.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>menuServer.Name" xml:space="preserve">
|
||||
<value>menuServer</value>
|
||||
<data name="label13.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>337, 158</value>
|
||||
</data>
|
||||
<data name=">>btnOK.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>113, 12</value>
|
||||
</data>
|
||||
<data name=">>btnOK.Name" xml:space="preserve">
|
||||
<value>btnOK</value>
|
||||
<data name="label13.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name="label13.Text" xml:space="preserve">
|
||||
<value>* Fill in manually</value>
|
||||
</data>
|
||||
<data name=">>label13.Name" xml:space="preserve">
|
||||
<value>label13</value>
|
||||
</data>
|
||||
<data name=">>label13.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label13.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>label13.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 154</value>
|
||||
</data>
|
||||
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>194, 21</value>
|
||||
</data>
|
||||
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name=">>txtRemarks.Name" xml:space="preserve">
|
||||
<value>txtRemarks</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="txtPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>194, 21</value>
|
||||
</data>
|
||||
<data name=">>panel2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>AddServer4Form</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>89, 12</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>txtRemarks.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=">>txtRemarks.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>btnClose.Parent" xml:space="preserve">
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 158</value>
|
||||
</data>
|
||||
<data name=">>txtPort.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="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>194, 21</value>
|
||||
</data>
|
||||
<data name=">>label13.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 12</value>
|
||||
</data>
|
||||
<data name="menuServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 25</value>
|
||||
<data name=">>txtRemarks.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>Alias (remarks)</value>
|
||||
</data>
|
||||
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 154</value>
|
||||
</data>
|
||||
<data name=">>label2.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>113, 12</value>
|
||||
</data>
|
||||
<data name=">>MenuItem1.Name" xml:space="preserve">
|
||||
<value>MenuItem1</value>
|
||||
</data>
|
||||
<data name="groupBox1.Text" xml:space="preserve">
|
||||
<value>Server</value>
|
||||
</data>
|
||||
<data name="MenuItem1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>162, 21</value>
|
||||
</data>
|
||||
<data name=">>btnClose.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 60</value>
|
||||
</data>
|
||||
<data name=">>txtAddress.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="$this.Text" xml:space="preserve">
|
||||
<value>Edit or add a [Socks] server</value>
|
||||
</data>
|
||||
<data name="txtAddress.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>359, 21</value>
|
||||
</data>
|
||||
<data name=">>label2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 10</value>
|
||||
</data>
|
||||
<data name="label13.Text" xml:space="preserve">
|
||||
<value>* Fill in manually</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="label6.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>71, 12</value>
|
||||
</data>
|
||||
<data name=">>label13.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>panel1.Name" xml:space="preserve">
|
||||
<value>panel1</value>
|
||||
</data>
|
||||
<data name="btnClose.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 60</value>
|
||||
</data>
|
||||
<data name=">>txtRemarks.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>panel1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>btnClose.Name" xml:space="preserve">
|
||||
<value>btnClose</value>
|
||||
</data>
|
||||
<data name=">>label6.Name" xml:space="preserve">
|
||||
<value>label6</value>
|
||||
</data>
|
||||
<data name="menuServer.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>303, 17</value>
|
||||
</data>
|
||||
<data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 27</value>
|
||||
</data>
|
||||
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<data name=">>label13.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Top</value>
|
||||
</data>
|
||||
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 35</value>
|
||||
</data>
|
||||
<data name=">>label6.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>menuServer.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>btnOK.Parent" xml:space="preserve">
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 196</value>
|
||||
</data>
|
||||
<data name=">>panel1.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="menuItemImportClipboard.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>235, 22</value>
|
||||
</data>
|
||||
<data name="btnClose.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name=">>txtAddress.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>txtPort.Name" xml:space="preserve">
|
||||
<value>txtPort</value>
|
||||
</data>
|
||||
<data name="txtPort.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 56</value>
|
||||
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 158</value>
|
||||
</data>
|
||||
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>95, 12</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="label6.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>Alias (remarks)</value>
|
||||
</data>
|
||||
<data name=">>label6.Name" xml:space="preserve">
|
||||
<value>label6</value>
|
||||
</data>
|
||||
<data name=">>label6.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label6.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>label6.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="txtPort.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 56</value>
|
||||
</data>
|
||||
<data name="txtPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>194, 21</value>
|
||||
</data>
|
||||
<data name="txtPort.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name=">>txtPort.Name" xml:space="preserve">
|
||||
<value>txtPort</value>
|
||||
</data>
|
||||
<data name=">>txtPort.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=">>txtPort.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>txtPort.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="menuItemImportClipboard.Text" xml:space="preserve">
|
||||
<value>Import URL from clipboard</value>
|
||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 60</value>
|
||||
</data>
|
||||
<data name=">>menuItemImportClipboard.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>71, 12</value>
|
||||
</data>
|
||||
<data name="btnClose.Text" xml:space="preserve">
|
||||
<value>&Cancel</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 31</value>
|
||||
</data>
|
||||
<data name="btnOK.Text" xml:space="preserve">
|
||||
<value>&OK</value>
|
||||
</data>
|
||||
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name=">>btnClose.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>Server port</value>
|
||||
</data>
|
||||
<data name="label13.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>337, 158</value>
|
||||
<data name=">>label2.Name" xml:space="preserve">
|
||||
<value>label2</value>
|
||||
</data>
|
||||
<data name=">>label6.Parent" xml:space="preserve">
|
||||
<data name=">>label2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label2.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 27</value>
|
||||
</data>
|
||||
<data name="txtAddress.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>359, 21</value>
|
||||
</data>
|
||||
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>txtAddress.Name" xml:space="preserve">
|
||||
<value>txtAddress</value>
|
||||
</data>
|
||||
<data name=">>txtAddress.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=">>txtAddress.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>txtAddress.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 31</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>89, 12</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Server address</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 35</value>
|
||||
</data>
|
||||
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 196</value>
|
||||
</data>
|
||||
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="groupBox1.Text" xml:space="preserve">
|
||||
<value>Server</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Name" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>303, 17</value>
|
||||
</data>
|
||||
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="btnOK.Text" xml:space="preserve">
|
||||
<value>&OK</value>
|
||||
</data>
|
||||
<data name=">>btnOK.Name" xml:space="preserve">
|
||||
<value>btnOK</value>
|
||||
</data>
|
||||
<data name=">>btnOK.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>btnOK.Parent" xml:space="preserve">
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>btnOK.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Bottom</value>
|
||||
</data>
|
||||
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 231</value>
|
||||
</data>
|
||||
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 60</value>
|
||||
</data>
|
||||
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name=">>panel2.Name" xml:space="preserve">
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panel2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>panel2.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>panel2.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Top</value>
|
||||
</data>
|
||||
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 25</value>
|
||||
</data>
|
||||
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 10</value>
|
||||
</data>
|
||||
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name=">>panel1.Name" xml:space="preserve">
|
||||
<value>panel1</value>
|
||||
</data>
|
||||
<data name=">>panel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>panel1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>panel1.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<metadata name="menuServer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="menuItemImportClipboard.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>235, 22</value>
|
||||
</data>
|
||||
<data name="menuItemImportClipboard.Text" xml:space="preserve">
|
||||
<value>Import URL from clipboard</value>
|
||||
</data>
|
||||
<data name="MenuItem1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>162, 21</value>
|
||||
</data>
|
||||
<data name="MenuItem1.Text" xml:space="preserve">
|
||||
<value>Import configuration file</value>
|
||||
</data>
|
||||
<data name="menuServer.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name=">>MenuItem1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="menuServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 25</value>
|
||||
</data>
|
||||
<data name=">>txtAddress.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
<data name="menuServer.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name=">>menuServer.Name" xml:space="preserve">
|
||||
<value>menuServer</value>
|
||||
</data>
|
||||
<data name=">>menuServer.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>menuServer.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name=">>btnOK.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 25</value>
|
||||
</data>
|
||||
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>label13.Name" xml:space="preserve">
|
||||
<value>label13</value>
|
||||
</data>
|
||||
<data name=">>txtPort.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name=">>label2.Name" xml:space="preserve">
|
||||
<value>label2</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Name" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>panel2.Name" xml:space="preserve">
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 231</value>
|
||||
</data>
|
||||
<data name="label13.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 291</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>menuItemImportClipboard.Name" xml:space="preserve">
|
||||
<value>menuItemImportClipboard</value>
|
||||
</data>
|
||||
<data name=">>panel2.Parent" xml:space="preserve">
|
||||
<data name=">>menuServer.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>396, 17</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>panel2.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>panel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name=">>menuServer.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="menuServer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 12</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 291</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Edit or add a [Socks] server</value>
|
||||
</data>
|
||||
<data name=">>MenuItem1.Name" xml:space="preserve">
|
||||
<value>MenuItem1</value>
|
||||
</data>
|
||||
<data name=">>MenuItem1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>menuItemImportClipboard.Name" xml:space="preserve">
|
||||
<value>menuItemImportClipboard</value>
|
||||
</data>
|
||||
<data name=">>menuItemImportClipboard.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>AddServer4Form</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -123,10 +123,34 @@
|
||||
<data name="groupBox1.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="txtSecurity.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 85</value>
|
||||
</data>
|
||||
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 89</value>
|
||||
</data>
|
||||
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>77, 12</value>
|
||||
</data>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>用户名(可选)</value>
|
||||
</data>
|
||||
<data name="txtId.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 115</value>
|
||||
</data>
|
||||
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 119</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>密码(可选)</value>
|
||||
</data>
|
||||
<data name="label13.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="label6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>83, 12</value>
|
||||
</data>
|
||||
|
||||
56
v2rayN/v2rayN/Forms/ListViewFlickerFree.cs
Normal file
56
v2rayN/v2rayN/Forms/ListViewFlickerFree.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace v2rayN.Forms
|
||||
{
|
||||
class ListViewFlickerFree : ListView
|
||||
{
|
||||
public ListViewFlickerFree()
|
||||
{
|
||||
SetStyle(ControlStyles.OptimizedDoubleBuffer
|
||||
| ControlStyles.AllPaintingInWmPaint
|
||||
, true);
|
||||
UpdateStyles();
|
||||
}
|
||||
|
||||
|
||||
public void AutoResizeColumns()
|
||||
{
|
||||
try
|
||||
{
|
||||
int count = this.Columns.Count;
|
||||
int MaxWidth = 0;
|
||||
Graphics graphics = this.CreateGraphics();
|
||||
Font font = this.Font;
|
||||
ListView.ListViewItemCollection items = this.Items;
|
||||
|
||||
string str;
|
||||
int width;
|
||||
|
||||
this.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
str = this.Columns[i].Text;
|
||||
MaxWidth = this.Columns[i].Width;
|
||||
|
||||
foreach (ListViewItem item in items)
|
||||
{
|
||||
str = item.SubItems[i].Text;
|
||||
width = (int)graphics.MeasureString(str, font).Width;
|
||||
if (width > MaxWidth)
|
||||
{
|
||||
MaxWidth = width;
|
||||
}
|
||||
}
|
||||
if (i == 0)
|
||||
{
|
||||
this.Columns[i].Width = MaxWidth;
|
||||
}
|
||||
this.Columns[i].Width = MaxWidth;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
120
v2rayN/v2rayN/Forms/MainForm.Designer.cs
generated
120
v2rayN/v2rayN/Forms/MainForm.Designer.cs
generated
@@ -31,7 +31,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.lvServers = new System.Windows.Forms.ListView();
|
||||
this.lvServers = new v2rayN.Forms.ListViewFlickerFree();
|
||||
this.cmsLv = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.menuAddVmessServer = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuAddShadowsocksServer = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -41,6 +41,7 @@
|
||||
this.menuScanScreen = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.menuRemoveServer = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuRemoveDuplicateServer = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuCopyServer = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuSetDefaultServer = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
@@ -78,6 +79,18 @@
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.txtMsgBox = new System.Windows.Forms.TextBox();
|
||||
this.ssMain = new System.Windows.Forms.StatusStrip();
|
||||
this.toolSslSocksPortLab = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolSslSocksPort = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolSslBlank1 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolSslHttpPortLab = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolSslHttpPort = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolSslBlank2 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolSslPacPortLab = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolSslPacPort = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolSslBlank3 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolSslServerSpeed = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolSslBlank4 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.tsMain = new System.Windows.Forms.ToolStrip();
|
||||
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
@@ -111,6 +124,7 @@
|
||||
this.cmsMain.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.ssMain.SuspendLayout();
|
||||
this.tsMain.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@@ -138,6 +152,7 @@
|
||||
this.lvServers.FullRowSelect = true;
|
||||
this.lvServers.GridLines = true;
|
||||
this.lvServers.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
|
||||
this.lvServers.HideSelection = false;
|
||||
this.lvServers.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
|
||||
((System.Windows.Forms.ListViewItem)(resources.GetObject("lvServers.Items")))});
|
||||
this.lvServers.MultiSelect = false;
|
||||
@@ -161,6 +176,7 @@
|
||||
this.menuScanScreen,
|
||||
this.toolStripSeparator1,
|
||||
this.menuRemoveServer,
|
||||
this.menuRemoveDuplicateServer,
|
||||
this.menuCopyServer,
|
||||
this.menuSetDefaultServer,
|
||||
this.toolStripSeparator3,
|
||||
@@ -227,6 +243,12 @@
|
||||
this.menuRemoveServer.Name = "menuRemoveServer";
|
||||
this.menuRemoveServer.Click += new System.EventHandler(this.menuRemoveServer_Click);
|
||||
//
|
||||
// menuRemoveDuplicateServer
|
||||
//
|
||||
resources.ApplyResources(this.menuRemoveDuplicateServer, "menuRemoveDuplicateServer");
|
||||
this.menuRemoveDuplicateServer.Name = "menuRemoveDuplicateServer";
|
||||
this.menuRemoveDuplicateServer.Click += new System.EventHandler(this.menuRemoveDuplicateServer_Click);
|
||||
//
|
||||
// menuCopyServer
|
||||
//
|
||||
resources.ApplyResources(this.menuCopyServer, "menuCopyServer");
|
||||
@@ -453,6 +475,7 @@
|
||||
//
|
||||
resources.ApplyResources(this.groupBox2, "groupBox2");
|
||||
this.groupBox2.Controls.Add(this.txtMsgBox);
|
||||
this.groupBox2.Controls.Add(this.ssMain);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.TabStop = false;
|
||||
//
|
||||
@@ -465,6 +488,83 @@
|
||||
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,
|
||||
this.toolSslBlank1,
|
||||
this.toolSslHttpPortLab,
|
||||
this.toolSslHttpPort,
|
||||
this.toolSslBlank2,
|
||||
this.toolSslPacPortLab,
|
||||
this.toolSslPacPort,
|
||||
this.toolSslBlank3,
|
||||
this.toolSslServerSpeed,
|
||||
this.toolSslBlank4});
|
||||
this.ssMain.Name = "ssMain";
|
||||
this.ssMain.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.ssMain_ItemClicked);
|
||||
//
|
||||
// toolSslSocksPortLab
|
||||
//
|
||||
resources.ApplyResources(this.toolSslSocksPortLab, "toolSslSocksPortLab");
|
||||
this.toolSslSocksPortLab.Name = "toolSslSocksPortLab";
|
||||
//
|
||||
// toolSslSocksPort
|
||||
//
|
||||
resources.ApplyResources(this.toolSslSocksPort, "toolSslSocksPort");
|
||||
this.toolSslSocksPort.Name = "toolSslSocksPort";
|
||||
//
|
||||
// toolSslBlank1
|
||||
//
|
||||
resources.ApplyResources(this.toolSslBlank1, "toolSslBlank1");
|
||||
this.toolSslBlank1.Name = "toolSslBlank1";
|
||||
this.toolSslBlank1.Spring = true;
|
||||
//
|
||||
// toolSslHttpPortLab
|
||||
//
|
||||
resources.ApplyResources(this.toolSslHttpPortLab, "toolSslHttpPortLab");
|
||||
this.toolSslHttpPortLab.Name = "toolSslHttpPortLab";
|
||||
//
|
||||
// toolSslHttpPort
|
||||
//
|
||||
resources.ApplyResources(this.toolSslHttpPort, "toolSslHttpPort");
|
||||
this.toolSslHttpPort.Name = "toolSslHttpPort";
|
||||
//
|
||||
// toolSslBlank2
|
||||
//
|
||||
resources.ApplyResources(this.toolSslBlank2, "toolSslBlank2");
|
||||
this.toolSslBlank2.Name = "toolSslBlank2";
|
||||
this.toolSslBlank2.Spring = true;
|
||||
//
|
||||
// toolSslPacPortLab
|
||||
//
|
||||
resources.ApplyResources(this.toolSslPacPortLab, "toolSslPacPortLab");
|
||||
this.toolSslPacPortLab.Name = "toolSslPacPortLab";
|
||||
//
|
||||
// toolSslPacPort
|
||||
//
|
||||
resources.ApplyResources(this.toolSslPacPort, "toolSslPacPort");
|
||||
this.toolSslPacPort.Name = "toolSslPacPort";
|
||||
//
|
||||
// toolSslBlank3
|
||||
//
|
||||
resources.ApplyResources(this.toolSslBlank3, "toolSslBlank3");
|
||||
this.toolSslBlank3.Name = "toolSslBlank3";
|
||||
this.toolSslBlank3.Spring = true;
|
||||
//
|
||||
// toolSslServerSpeed
|
||||
//
|
||||
resources.ApplyResources(this.toolSslServerSpeed, "toolSslServerSpeed");
|
||||
this.toolSslServerSpeed.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.toolSslServerSpeed.Name = "toolSslServerSpeed";
|
||||
//
|
||||
// toolSslBlank4
|
||||
//
|
||||
resources.ApplyResources(this.toolSslBlank4, "toolSslBlank4");
|
||||
this.toolSslBlank4.Name = "toolSslBlank4";
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
resources.ApplyResources(this.panel1, "panel1");
|
||||
@@ -652,6 +752,7 @@
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
|
||||
this.Load += new System.EventHandler(this.MainForm_Load);
|
||||
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);
|
||||
@@ -662,6 +763,8 @@
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox2.PerformLayout();
|
||||
this.ssMain.ResumeLayout(false);
|
||||
this.ssMain.PerformLayout();
|
||||
this.tsMain.ResumeLayout(false);
|
||||
this.tsMain.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
@@ -674,7 +777,7 @@
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.TextBox txtMsgBox;
|
||||
private System.Windows.Forms.ListView lvServers;
|
||||
private v2rayN.Forms.ListViewFlickerFree lvServers;
|
||||
private System.Windows.Forms.NotifyIcon notifyMain;
|
||||
private System.Windows.Forms.ContextMenuStrip cmsMain;
|
||||
private System.Windows.Forms.ToolStripMenuItem menuExit;
|
||||
@@ -744,6 +847,19 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem tsbLanguageZhHans;
|
||||
private System.Windows.Forms.ToolStripButton tsbPromotion;
|
||||
private System.Windows.Forms.ToolStripMenuItem menuAddSocksServer;
|
||||
private System.Windows.Forms.StatusStrip ssMain;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolSslSocksPort;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolSslHttpPort;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolSslBlank2;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolSslBlank1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolSslPacPort;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolSslBlank3;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolSslSocksPortLab;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolSslHttpPortLab;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolSslPacPortLab;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolSslServerSpeed;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolSslBlank4;
|
||||
private System.Windows.Forms.ToolStripMenuItem menuRemoveDuplicateServer;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using v2rayN.Handler;
|
||||
using v2rayN.HttpProxyHandler;
|
||||
using v2rayN.Mode;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace v2rayN.Forms
|
||||
{
|
||||
@@ -17,6 +17,7 @@ namespace v2rayN.Forms
|
||||
private V2rayUpdateHandle v2rayUpdateHandle;
|
||||
private V2rayUpdateHandle v2rayUpdateHandle2;
|
||||
private List<int> lvSelecteds = new List<int>();
|
||||
private StatisticsHandler statistics = null;
|
||||
|
||||
#region Window 事件
|
||||
|
||||
@@ -31,6 +32,7 @@ namespace v2rayN.Forms
|
||||
Application.ApplicationExit += (sender, args) =>
|
||||
{
|
||||
Utils.ClearTempPath();
|
||||
statistics?.Close();
|
||||
};
|
||||
}
|
||||
|
||||
@@ -39,13 +41,82 @@ namespace v2rayN.Forms
|
||||
ConfigHandler.LoadConfig(ref config);
|
||||
v2rayHandler = new V2rayHandler();
|
||||
v2rayHandler.ProcessEvent += v2rayHandler_ProcessEvent;
|
||||
if (config.enableStatistics)
|
||||
{
|
||||
statistics = new StatisticsHandler(config, UpdateStatisticsHandler);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateStatisticsHandler(ulong totalUp, ulong totalDown, ulong up, ulong down, List<Mode.ServerStatistics> statistics)
|
||||
{
|
||||
try
|
||||
{
|
||||
up /= (ulong)(config.statisticsFreshRate / 1000f);
|
||||
down /= (ulong)(config.statisticsFreshRate / 1000f);
|
||||
toolSslServerSpeed.Text = string.Format(
|
||||
"{0}/s↑ | {1}/s↓",
|
||||
Utils.HumanFy(up),
|
||||
Utils.HumanFy(down)
|
||||
);
|
||||
|
||||
List<string[]> datas = new List<string[]>();
|
||||
for (int i = 0; i < config.vmess.Count; i++)
|
||||
{
|
||||
string totalUp_ = string.Empty,
|
||||
totalDown_ = string.Empty,
|
||||
todayUp_ = string.Empty,
|
||||
todayDown_ = string.Empty;
|
||||
var index = statistics.FindIndex(item_ => Utils.IsIdenticalServer(item_, new ServerStatistics(config.vmess[i].remarks, config.vmess[i].address, config.vmess[i].port, config.vmess[i].path, config.vmess[i].requestHost, 0, 0, 0, 0)));
|
||||
if (index != -1)
|
||||
{
|
||||
totalUp_ = Utils.HumanFy(statistics[index].totalUp);
|
||||
totalDown_ = Utils.HumanFy(statistics[index].totalDown);
|
||||
todayUp_ = Utils.HumanFy(statistics[index].todayUp);
|
||||
todayDown_ = Utils.HumanFy(statistics[index].todayDown);
|
||||
}
|
||||
|
||||
datas.Add(new string[] { totalUp_, totalDown_, todayUp_, todayDown_ });
|
||||
}
|
||||
|
||||
lvServers.Invoke((MethodInvoker)delegate
|
||||
{
|
||||
lvServers.SuspendLayout();
|
||||
for (int i = 0; i < datas.Count; i++)
|
||||
{
|
||||
var indexStart = 9;
|
||||
lvServers.Items[i].SubItems[indexStart++].Text = datas[i][0];
|
||||
lvServers.Items[i].SubItems[indexStart++].Text = datas[i][1];
|
||||
lvServers.Items[i].SubItems[indexStart++].Text = datas[i][2];
|
||||
lvServers.Items[i].SubItems[indexStart++].Text = datas[i][3];
|
||||
}
|
||||
lvServers.ResumeLayout();
|
||||
});
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
|
||||
private void MainForm_VisibleChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (statistics == null || !statistics.Enable) return;
|
||||
if ((sender as Form).Visible)
|
||||
{
|
||||
statistics.UpdateUI = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
statistics.UpdateUI = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void MainForm_Shown(object sender, EventArgs e)
|
||||
{
|
||||
InitServersView();
|
||||
RefreshServers();
|
||||
lvServers.AutoResizeColumns();
|
||||
|
||||
LoadV2ray();
|
||||
|
||||
@@ -59,9 +130,17 @@ namespace v2rayN.Forms
|
||||
{
|
||||
e.Cancel = true;
|
||||
|
||||
statistics?.SaveToFile();
|
||||
|
||||
HideForm();
|
||||
return;
|
||||
}
|
||||
if (e.CloseReason == CloseReason.ApplicationExitCall)
|
||||
{
|
||||
ConfigHandler.SaveConfig(ref config);
|
||||
statistics?.SaveToFile();
|
||||
statistics?.Close();
|
||||
}
|
||||
}
|
||||
|
||||
private void MainForm_Resize(object sender, EventArgs e)
|
||||
@@ -81,21 +160,24 @@ namespace v2rayN.Forms
|
||||
//config.uiItem.mainQRCodeWidth = splitContainer1.SplitterDistance;
|
||||
}
|
||||
|
||||
|
||||
//private const int WM_QUERYENDSESSION = 0x0011;
|
||||
//protected override void WndProc(ref Message m)
|
||||
//{
|
||||
// switch (m.Msg)
|
||||
// {
|
||||
// case WM_QUERYENDSESSION:
|
||||
// CloseV2ray();
|
||||
// m.Result = (IntPtr)1;
|
||||
// break;
|
||||
// default:
|
||||
// base.WndProc(ref m);
|
||||
// break;
|
||||
// }
|
||||
//}
|
||||
private const int WM_QUERYENDSESSION = 0x0011;
|
||||
protected override void WndProc(ref Message m)
|
||||
{
|
||||
switch (m.Msg)
|
||||
{
|
||||
case WM_QUERYENDSESSION:
|
||||
Utils.SaveLog("Windows shutdown UnsetProxy");
|
||||
//CloseV2ray();
|
||||
ConfigHandler.ToJsonFile(config);
|
||||
statistics?.SaveToFile();
|
||||
ProxySetting.UnsetProxy();
|
||||
m.Result = (IntPtr)1;
|
||||
break;
|
||||
default:
|
||||
base.WndProc(ref m);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 显示服务器 listview 和 menu
|
||||
@@ -131,8 +213,15 @@ namespace v2rayN.Forms
|
||||
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"), 100, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTestResults"), 70, HorizontalAlignment.Left);
|
||||
|
||||
if (statistics != null && statistics.Enable)
|
||||
{
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTotalUploadDataAmount"), 70, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTotalDownloadDataAmount"), 70, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTodayUploadDataAmount"), 70, HorizontalAlignment.Left);
|
||||
lvServers.Columns.Add(UIRes.I18N("LvTodayDownloadDataAmount"), 70, HorizontalAlignment.Left);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -145,14 +234,52 @@ namespace v2rayN.Forms
|
||||
for (int k = 0; k < config.vmess.Count; k++)
|
||||
{
|
||||
string def = string.Empty;
|
||||
string totalUp = string.Empty,
|
||||
totalDown = string.Empty,
|
||||
todayUp = string.Empty,
|
||||
todayDown = string.Empty;
|
||||
if (config.index.Equals(k))
|
||||
{
|
||||
def = "√";
|
||||
}
|
||||
|
||||
VmessItem item = config.vmess[k];
|
||||
ListViewItem lvItem = new ListViewItem(new string[]
|
||||
|
||||
ListViewItem lvItem = null;
|
||||
if (statistics != null && statistics.Enable)
|
||||
{
|
||||
var index = statistics.Statistic.FindIndex(item_ => item_.address == item.address);
|
||||
if (index != -1)
|
||||
{
|
||||
totalUp = Utils.HumanFy(statistics.Statistic[index].totalUp);
|
||||
totalDown = Utils.HumanFy(statistics.Statistic[index].totalDown);
|
||||
todayUp = Utils.HumanFy(statistics.Statistic[index].todayUp);
|
||||
todayDown = Utils.HumanFy(statistics.Statistic[index].todayDown);
|
||||
}
|
||||
|
||||
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,
|
||||
totalUp,
|
||||
totalDown,
|
||||
todayUp,
|
||||
todayDown
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
lvItem = new ListViewItem(new string[]
|
||||
{
|
||||
def,
|
||||
((EConfigType)item.configType).ToString(),
|
||||
item.remarks,
|
||||
@@ -164,8 +291,14 @@ namespace v2rayN.Forms
|
||||
item.network,
|
||||
item.getSubRemarks(config),
|
||||
item.testResult
|
||||
});
|
||||
lvServers.Items.Add(lvItem);
|
||||
//totalUp,
|
||||
//totalDown,
|
||||
//todayUp,
|
||||
//todayDown,
|
||||
});
|
||||
}
|
||||
|
||||
if (lvItem != null) lvServers.Items.Add(lvItem);
|
||||
}
|
||||
|
||||
//if (lvServers.Items.Count > 0)
|
||||
@@ -235,6 +368,38 @@ namespace v2rayN.Forms
|
||||
qrCodeControl.showQRCode(index, config);
|
||||
}
|
||||
|
||||
private void DisplayToolStatus()
|
||||
{
|
||||
var localIP = "127.0.0.1";
|
||||
toolSslSocksPort.Text =
|
||||
toolSslHttpPort.Text =
|
||||
toolSslPacPort.Text = "NONE";
|
||||
|
||||
toolSslSocksPort.Text = $"{localIP}:{config.inbound[0].localPort}";
|
||||
|
||||
if (config.sysAgentEnabled)
|
||||
{
|
||||
toolSslHttpPort.Text = $"{localIP}:{Global.sysAgentPort}";
|
||||
if (config.listenerType == 2 || config.listenerType == 4)
|
||||
{
|
||||
if (PACServerHandle.IsRunning)
|
||||
{
|
||||
toolSslPacPort.Text = $"{HttpProxyHandle.GetPacUrl()}";
|
||||
}
|
||||
else
|
||||
{
|
||||
toolSslPacPort.Text = UIRes.I18N("StartPacFailed");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private void ssMain_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
|
||||
{
|
||||
if (!Utils.IsNullOrEmpty(e.ClickedItem.Text))
|
||||
{
|
||||
Utils.SetClipboardData(e.ClickedItem.Text);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region v2ray 操作
|
||||
@@ -252,6 +417,7 @@ namespace v2rayN.Forms
|
||||
Global.reloadV2ray = false;
|
||||
|
||||
ChangeSysAgent(config.sysAgentEnabled);
|
||||
DisplayToolStatus();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -331,6 +497,12 @@ namespace v2rayN.Forms
|
||||
case Keys.A:
|
||||
menuSelectAll_Click(null, null);
|
||||
break;
|
||||
case Keys.T:
|
||||
menuSpeedServer_Click(null, null);
|
||||
break;
|
||||
case Keys.P:
|
||||
menuPingServer_Click(null, null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch (e.KeyCode)
|
||||
@@ -384,6 +556,22 @@ namespace v2rayN.Forms
|
||||
|
||||
}
|
||||
|
||||
private void menuRemoveDuplicateServer_Click(object sender, EventArgs e)
|
||||
{
|
||||
List<Mode.VmessItem> servers = null;
|
||||
Utils.DedupServerList(config.vmess, out servers);
|
||||
if (servers != null)
|
||||
{
|
||||
config.vmess = servers;
|
||||
}
|
||||
//刷新
|
||||
RefreshServers();
|
||||
LoadV2ray();
|
||||
|
||||
// save to config file
|
||||
ConfigHandler.ToJsonFile(config);
|
||||
}
|
||||
|
||||
private void menuCopyServer_Click(object sender, EventArgs e)
|
||||
{
|
||||
int index = GetLvSelectedIndex();
|
||||
@@ -807,6 +995,9 @@ namespace v2rayN.Forms
|
||||
|
||||
this.Visible = false;
|
||||
this.Close();
|
||||
|
||||
statistics?.Close();
|
||||
|
||||
//this.Dispose();
|
||||
//System.Environment.Exit(System.Environment.ExitCode);
|
||||
Application.Exit();
|
||||
@@ -856,6 +1047,7 @@ namespace v2rayN.Forms
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -874,7 +1066,7 @@ namespace v2rayN.Forms
|
||||
private void SetTestResult(int k, string txt)
|
||||
{
|
||||
config.vmess[k].testResult = txt;
|
||||
lvServers.Items[k].SubItems[lvServers.Items[k].SubItems.Count - 1].Text = txt;
|
||||
lvServers.Items[k].SubItems[8].Text = txt;
|
||||
}
|
||||
private void ClearTestResult()
|
||||
{
|
||||
@@ -1073,7 +1265,7 @@ namespace v2rayN.Forms
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DisplayToolStatus();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1097,6 +1289,8 @@ namespace v2rayN.Forms
|
||||
|
||||
menuSysAgentEnabled.Checked =
|
||||
menuSysAgentMode.Enabled = isChecked;
|
||||
|
||||
DisplayToolStatus();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -1254,7 +1448,7 @@ namespace v2rayN.Forms
|
||||
ShowForm();
|
||||
|
||||
string result = Convert.ToString(e.UserState);
|
||||
if (string.IsNullOrEmpty(result))
|
||||
if (Utils.IsNullOrEmpty(result))
|
||||
{
|
||||
UI.Show(UIRes.I18N("NoValidQRcodeFound"));
|
||||
}
|
||||
@@ -1291,8 +1485,8 @@ namespace v2rayN.Forms
|
||||
|
||||
for (int k = 1; k <= config.subItem.Count; k++)
|
||||
{
|
||||
string id = config.subItem[k - 1].id.Trim();
|
||||
string url = config.subItem[k - 1].url.Trim();
|
||||
string id = config.subItem[k - 1].id.TrimEx();
|
||||
string url = config.subItem[k - 1].url.TrimEx();
|
||||
string hashCode = $"{k}->";
|
||||
if (config.subItem[k - 1].enabled == false)
|
||||
{
|
||||
@@ -1364,7 +1558,7 @@ namespace v2rayN.Forms
|
||||
Utils.RegWriteValue(Global.MyRegPath, Global.MyRegKeyLanguage, value);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,6 +117,9 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="menuRemoveDuplicateServer.Text" xml:space="preserve">
|
||||
<value>Remove duplicate server</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="menuAddCustomServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
@@ -136,8 +139,8 @@
|
||||
<data name="menuScanScreen.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
</data>
|
||||
<data name=">>menuServers.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name=">>groupBox1.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="tsbReload.Text" xml:space="preserve">
|
||||
<value>Restart service</value>
|
||||
@@ -145,15 +148,27 @@
|
||||
<data name=">>tsbSubSetting.Name" xml:space="preserve">
|
||||
<value>tsbSubSetting</value>
|
||||
</data>
|
||||
<data name=">>ssMain.Parent" xml:space="preserve">
|
||||
<value>groupBox2</value>
|
||||
</data>
|
||||
<data name=">>menuMoveUp.Name" xml:space="preserve">
|
||||
<value>menuMoveUp</value>
|
||||
</data>
|
||||
<data name="menuAddSocksServer.Text" xml:space="preserve">
|
||||
<value>Add [Socks] server</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator4.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>groupBox2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="toolSslPacPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>0, 17</value>
|
||||
</data>
|
||||
<data name=">>toolSslBlank1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="tsbLanguageZhHans.Text" xml:space="preserve">
|
||||
<value>语言-[中文简体]</value>
|
||||
</data>
|
||||
@@ -167,8 +182,9 @@
|
||||
<data name=">>tsbHelp.Name" xml:space="preserve">
|
||||
<value>tsbHelp</value>
|
||||
</data>
|
||||
<data name="tsbCheckClearPACList.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>338, 22</value>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
@@ -185,6 +201,9 @@
|
||||
<data name="tsbAbout.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>187, 22</value>
|
||||
</data>
|
||||
<data name=">>toolSslBlank2.Name" xml:space="preserve">
|
||||
<value>toolSslBlank2</value>
|
||||
</data>
|
||||
<data name=">>menuSysAgentEnabled.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
@@ -218,11 +237,14 @@
|
||||
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="toolSslSocksPortLab.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>49, 17</value>
|
||||
</data>
|
||||
<data name="tsbSub.Text" xml:space="preserve">
|
||||
<value>Subscription</value>
|
||||
</data>
|
||||
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>992, 351</value>
|
||||
<value>952, 351</value>
|
||||
</data>
|
||||
<data name="menuMoveTop.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
@@ -236,8 +258,8 @@
|
||||
<data name=">>tsbPromotion.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tsbCheckUpdatePACList.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="tsbAbout.Text" xml:space="preserve">
|
||||
<value>About</value>
|
||||
</data>
|
||||
<data name=">>menuAddVmessServer.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
@@ -248,27 +270,29 @@
|
||||
<data name=">>splitContainer1.Panel2.Parent" xml:space="preserve">
|
||||
<value>splitContainer1</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdate.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
||||
<value>ImageAboveText</value>
|
||||
<data name="toolSslSocksPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>0, 17</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="tsMain.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>992, 56</value>
|
||||
<value>952, 56</value>
|
||||
</data>
|
||||
<data name="groupBox2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Bottom</value>
|
||||
</data>
|
||||
<data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>992, 176</value>
|
||||
<data name=">>menuAddServers2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdate.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
||||
<value>ImageAboveText</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="splitContainer1.Panel2MinSize" type="System.Int32, mscorlib">
|
||||
<value>100</value>
|
||||
</data>
|
||||
<data name="cmsLv.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>448, 468</value>
|
||||
<value>448, 490</value>
|
||||
</data>
|
||||
<data name=">>menuExit.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
@@ -276,9 +300,6 @@
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>v2rayN</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>444, 6</value>
|
||||
</data>
|
||||
<data name="menuExport2ClientConfig.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
</data>
|
||||
@@ -294,6 +315,12 @@
|
||||
<data name="tsbCheckUpdateN.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>338, 22</value>
|
||||
</data>
|
||||
<data name=">>menuRemoveDuplicateServer.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="menuPingServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
</data>
|
||||
<data name=">>tsbCheckUpdateN.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
@@ -335,6 +362,12 @@
|
||||
<data name="txtMsgBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 17</value>
|
||||
</data>
|
||||
<data name=">>menuServers.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolSslBlank4.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="lvServers.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
@@ -344,8 +377,8 @@
|
||||
<data name=">>toolStripSeparator9.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>menuExport2ClientConfig.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="toolSslServerSpeed.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>220, 17</value>
|
||||
</data>
|
||||
<data name=">>menuAddCustomServer.Name" xml:space="preserve">
|
||||
<value>menuAddCustomServer</value>
|
||||
@@ -359,29 +392,41 @@
|
||||
<data name=">>menuGlobalPAC.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tsbSubSetting.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="menuMoveBottom.Text" xml:space="preserve">
|
||||
<value>Moves down to the bottom</value>
|
||||
</data>
|
||||
<data name=">>toolSslSocksPort.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 12</value>
|
||||
</data>
|
||||
<data name="tsbHelp.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>48, 53</value>
|
||||
</data>
|
||||
<data name=">>tsbCheckUpdatePACList.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtMsgBox.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=">>bgwScan.Type" xml:space="preserve">
|
||||
<value>System.ComponentModel.BackgroundWorker, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>menuGlobalPAC.Name" xml:space="preserve">
|
||||
<value>menuGlobalPAC</value>
|
||||
<data name=">>panel1.Name" xml:space="preserve">
|
||||
<value>panel1</value>
|
||||
</data>
|
||||
<data name="toolSslBlank3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>198, 17</value>
|
||||
</data>
|
||||
<data name="splitContainer1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="lvServers.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>726, 331</value>
|
||||
<value>686, 331</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator4.Name" xml:space="preserve">
|
||||
<value>toolStripSeparator4</value>
|
||||
@@ -398,20 +443,23 @@
|
||||
<data name="tsbSubUpdate.Text" xml:space="preserve">
|
||||
<value>Update subscription</value>
|
||||
</data>
|
||||
<data name=">>tsbCheckUpdate.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripDropDownButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="toolSslHttpPortLab.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>36, 17</value>
|
||||
</data>
|
||||
<data name=">>menuAddServers2.Name" xml:space="preserve">
|
||||
<value>menuAddServers2</value>
|
||||
</data>
|
||||
<data name="txtMsgBox.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="txtMsgBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="menuAddVmessServer.Text" xml:space="preserve">
|
||||
<value>Add [VMess] server</value>
|
||||
</data>
|
||||
<data name="menuServers.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>264, 22</value>
|
||||
<data name=">>splitContainer1.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>tsbLanguageZhHans.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
@@ -422,12 +470,18 @@
|
||||
<data name=">>tsbAbout.Name" xml:space="preserve">
|
||||
<value>tsbAbout</value>
|
||||
</data>
|
||||
<data name="toolSslBlank2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>198, 17</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator5.Name" xml:space="preserve">
|
||||
<value>toolStripSeparator5</value>
|
||||
</data>
|
||||
<data name=">>menuExport2ClientConfig.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="txtMsgBox.Multiline" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
@@ -452,8 +506,8 @@
|
||||
<data name=">>groupBox1.Name" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name="menuAddSocksServer.Text" xml:space="preserve">
|
||||
<value>Add [Socks] server</value>
|
||||
<data name="toolSslBlank1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>198, 17</value>
|
||||
</data>
|
||||
<data name="qrCodeControl.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@@ -474,7 +528,10 @@
|
||||
<value>6, 56</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer.Text" xml:space="preserve">
|
||||
<value>Test server speed (multiple choice)</value>
|
||||
<value>Test server speed (multiple choice)(Ctrl+T)</value>
|
||||
</data>
|
||||
<data name=">>ssMain.Name" xml:space="preserve">
|
||||
<value>ssMain</value>
|
||||
</data>
|
||||
<data name="tsbOptionSetting.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
||||
<value>ImageAboveText</value>
|
||||
@@ -494,17 +551,26 @@
|
||||
<data name=">>groupBox1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="tsbCheckClearPACList.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>338, 22</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdate.Text" xml:space="preserve">
|
||||
<value>Check for updates</value>
|
||||
</data>
|
||||
<data name=">>tsbAbout.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tsbLanguageDef.Name" xml:space="preserve">
|
||||
<value>tsbLanguageDef</value>
|
||||
</data>
|
||||
<data name=">>panel1.Name" xml:space="preserve">
|
||||
<value>panel1</value>
|
||||
<data name="toolSslHttpPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>0, 17</value>
|
||||
</data>
|
||||
<data name="splitContainer1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 17</value>
|
||||
<data name=">>toolSslServerSpeed.Name" xml:space="preserve">
|
||||
<value>toolSslServerSpeed</value>
|
||||
</data>
|
||||
<data name=">>menuGlobal.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>panel1.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
@@ -524,6 +590,9 @@
|
||||
<data name="menuRemoveServer.Text" xml:space="preserve">
|
||||
<value>Remove selected server (multiple choice) (Delete)</value>
|
||||
</data>
|
||||
<data name=">>menuKeepPAC.Name" xml:space="preserve">
|
||||
<value>menuKeepPAC</value>
|
||||
</data>
|
||||
<data name=">>lvServers.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
@@ -542,8 +611,8 @@
|
||||
<data name=">>tsbOptionSetting.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>menuAddServers2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="toolSslPacPortLab.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>30, 17</value>
|
||||
</data>
|
||||
<data name="menuScanScreen.Text" xml:space="preserve">
|
||||
<value>Scan QR code on the screen</value>
|
||||
@@ -575,6 +644,9 @@
|
||||
<data name=">>tsbLanguageZhHans.Name" xml:space="preserve">
|
||||
<value>tsbLanguageZhHans</value>
|
||||
</data>
|
||||
<data name=">>menuExport2ShareUrl.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator9.Name" xml:space="preserve">
|
||||
<value>toolStripSeparator9</value>
|
||||
</data>
|
||||
@@ -587,8 +659,8 @@
|
||||
<data name=">>menuAddSocksServer.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tsbReload.Name" xml:space="preserve">
|
||||
<value>tsbReload</value>
|
||||
<data name="toolSslSocksPortLab.Text" xml:space="preserve">
|
||||
<value>SOCKS5</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdateN.Text" xml:space="preserve">
|
||||
<value>Check for updates to v2rayN</value>
|
||||
@@ -609,7 +681,7 @@
|
||||
<value>Server</value>
|
||||
</data>
|
||||
<data name=">>lvServers.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>v2rayN.Forms.ListViewFlickerFree, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>menuAddShadowsocksServer.Name" xml:space="preserve">
|
||||
<value>menuAddShadowsocksServer</value>
|
||||
@@ -617,6 +689,9 @@
|
||||
<data name=">>txtMsgBox.Name" xml:space="preserve">
|
||||
<value>txtMsgBox</value>
|
||||
</data>
|
||||
<data name=">>toolSslBlank4.Name" xml:space="preserve">
|
||||
<value>toolSslBlank4</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>261, 6</value>
|
||||
</data>
|
||||
@@ -638,9 +713,15 @@
|
||||
<data name=">>qrCodeControl.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>toolSslBlank3.Name" xml:space="preserve">
|
||||
<value>toolSslBlank3</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdate.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>128, 53</value>
|
||||
</data>
|
||||
<data name=">>tsbReload.Name" xml:space="preserve">
|
||||
<value>tsbReload</value>
|
||||
</data>
|
||||
<data name=">>menuSysAgentMode.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
@@ -653,12 +734,24 @@
|
||||
<data name="groupBox2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 417</value>
|
||||
</data>
|
||||
<data name=">>toolSslPacPortLab.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>444, 6</value>
|
||||
</data>
|
||||
<data name=">>toolSslSocksPortLab.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="menuSysAgentEnabled.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="toolSslServerSpeed.RightToLeft" type="System.Windows.Forms.RightToLeft, System.Windows.Forms">
|
||||
<value>No</value>
|
||||
</data>
|
||||
<data name=">>toolSslPacPort.Name" xml:space="preserve">
|
||||
<value>toolSslPacPort</value>
|
||||
</data>
|
||||
<data name="tsbOptionSetting.Text" xml:space="preserve">
|
||||
<value>Setting</value>
|
||||
</data>
|
||||
@@ -697,8 +790,11 @@
|
||||
<data name="toolStripSeparator5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>6, 56</value>
|
||||
</data>
|
||||
<data name=">>tsbSubSetting.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name=">>toolSslBlank1.Name" xml:space="preserve">
|
||||
<value>toolSslBlank1</value>
|
||||
</data>
|
||||
<data name=">>lvServers.Parent" xml:space="preserve">
|
||||
<value>splitContainer1.Panel1</value>
|
||||
</data>
|
||||
<data name=">>tsbSubUpdate.Name" xml:space="preserve">
|
||||
<value>tsbSubUpdate</value>
|
||||
@@ -709,8 +805,8 @@
|
||||
<data name="splitContainer1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>tsbAbout.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="toolSslServerSpeed.Text" xml:space="preserve">
|
||||
<value>SPEED Disabled</value>
|
||||
</data>
|
||||
<data name=">>menuRemoveServer.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
@@ -719,11 +815,14 @@
|
||||
<value>menuSysAgentMode</value>
|
||||
</data>
|
||||
<data name="splitContainer1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>986, 331</value>
|
||||
<value>946, 331</value>
|
||||
</data>
|
||||
<data name="tsbClose.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
||||
<value>ImageAboveText</value>
|
||||
</data>
|
||||
<data name=">>toolSslBlank3.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="menuRemoveServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
</data>
|
||||
@@ -754,8 +853,14 @@
|
||||
<data name=">>tsbClose.Name" xml:space="preserve">
|
||||
<value>tsbClose</value>
|
||||
</data>
|
||||
<data name=">>menuExport2ClientConfig.Name" xml:space="preserve">
|
||||
<value>menuExport2ClientConfig</value>
|
||||
<data name=">>ssMain.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>toolSslHttpPort.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="ssMain.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 151</value>
|
||||
</data>
|
||||
<data name="notifyMain.Visible" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -764,13 +869,10 @@
|
||||
<value>6, 56</value>
|
||||
</data>
|
||||
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>992, 10</value>
|
||||
<value>952, 10</value>
|
||||
</data>
|
||||
<data name=">>menuKeepPAC.Name" xml:space="preserve">
|
||||
<value>menuKeepPAC</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="menuServers.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name=">>txtMsgBox.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
@@ -785,10 +887,13 @@
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="menuPingServer.Text" xml:space="preserve">
|
||||
<value>Test server delay (multiple choice)</value>
|
||||
<value>Test server delay (multiple choice)(Ctrl+P)</value>
|
||||
</data>
|
||||
<data name=">>menuExport2ShareUrl.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name=">>toolSslPacPort.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="toolSslHttpPortLab.Text" xml:space="preserve">
|
||||
<value>HTTP</value>
|
||||
</data>
|
||||
<data name="menuExport2SubContent.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
@@ -802,9 +907,15 @@
|
||||
<data name=">>tsbHelp.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripDropDownButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tsbOptionSetting.Name" xml:space="preserve">
|
||||
<value>tsbOptionSetting</value>
|
||||
</data>
|
||||
<data name="menuSysAgentEnabled.Text" xml:space="preserve">
|
||||
<value>Enable Http proxy</value>
|
||||
</data>
|
||||
<data name=">>toolSslServerSpeed.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>menuMoveDown.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
@@ -817,6 +928,9 @@
|
||||
<data name=">>menuCopyServer.Name" xml:space="preserve">
|
||||
<value>menuCopyServer</value>
|
||||
</data>
|
||||
<data name=">>toolSslBlank2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="menuSysAgentMode.Text" xml:space="preserve">
|
||||
<value>Http proxy mode</value>
|
||||
</data>
|
||||
@@ -832,27 +946,36 @@
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>MainForm</value>
|
||||
</data>
|
||||
<data name=">>tsbCheckUpdate.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripDropDownButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="toolSslHttpPortLab.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>微软雅黑, 8pt</value>
|
||||
</data>
|
||||
<data name=">>menuExit.Name" xml:space="preserve">
|
||||
<value>menuExit</value>
|
||||
</data>
|
||||
<data name="toolSslServerSpeed.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator11.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>menuExport2ServerConfig.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="groupBox1.Text" xml:space="preserve">
|
||||
<value>Server list</value>
|
||||
</data>
|
||||
<data name=">>toolSslHttpPortLab.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>lvServers.Name" xml:space="preserve">
|
||||
<value>lvServers</value>
|
||||
</data>
|
||||
<data name=">>lvServers.Parent" xml:space="preserve">
|
||||
<value>splitContainer1.Panel1</value>
|
||||
</data>
|
||||
<data name="tsbSub.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
|
||||
<value>Magenta</value>
|
||||
</data>
|
||||
<data name=">>toolSslPacPortLab.Name" xml:space="preserve">
|
||||
<value>toolSslPacPortLab</value>
|
||||
</data>
|
||||
<data name=">>menuGlobal.Name" xml:space="preserve">
|
||||
<value>menuGlobal</value>
|
||||
</data>
|
||||
@@ -871,11 +994,11 @@
|
||||
<data name="menuMoveUp.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
</data>
|
||||
<data name="tsbAbout.Text" xml:space="preserve">
|
||||
<value>About</value>
|
||||
<data name=">>ssMain.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.StatusStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tsbSub.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripDropDownButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name=">>toolStripSeparator2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="menuSelectAll.Text" xml:space="preserve">
|
||||
<value>Select All (Ctrl+A)</value>
|
||||
@@ -883,8 +1006,8 @@
|
||||
<data name="groupBox2.Text" xml:space="preserve">
|
||||
<value>Information</value>
|
||||
</data>
|
||||
<data name=">>tsMain.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
<data name="txtMsgBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>tsbClose.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
@@ -892,14 +1015,23 @@
|
||||
<data name=">>tsbCheckUpdateCore.Name" xml:space="preserve">
|
||||
<value>tsbCheckUpdateCore</value>
|
||||
</data>
|
||||
<data name="menuPingServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<data name=">>menuSpeedServer.Name" xml:space="preserve">
|
||||
<value>menuSpeedServer</value>
|
||||
</data>
|
||||
<data name="toolSslPacPortLab.Text" xml:space="preserve">
|
||||
<value>PAC</value>
|
||||
</data>
|
||||
<data name="menuRemoveDuplicateServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
</data>
|
||||
<data name=">>menuRemoveServer.Name" xml:space="preserve">
|
||||
<value>menuRemoveServer</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator10.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="txtMsgBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>986, 156</value>
|
||||
<value>946, 134</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator3.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
@@ -916,8 +1048,8 @@
|
||||
<data name=">>menuCopyPACUrl.Name" xml:space="preserve">
|
||||
<value>menuCopyPACUrl</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
<data name="toolStripSeparator3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>444, 6</value>
|
||||
</data>
|
||||
<data name="menuSelectAll.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
@@ -952,6 +1084,9 @@
|
||||
<data name=">>menuAddCustomServer.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="toolSslBlank3.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>微软雅黑, 8pt</value>
|
||||
</data>
|
||||
<data name="txtMsgBox.ScrollBars" type="System.Windows.Forms.ScrollBars, System.Windows.Forms">
|
||||
<value>Vertical</value>
|
||||
</data>
|
||||
@@ -961,6 +1096,9 @@
|
||||
<data name=">>qrCodeControl.Type" xml:space="preserve">
|
||||
<value>v2rayN.Forms.QRCodeControl, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name="toolSslSocksPortLab.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>微软雅黑, 8pt</value>
|
||||
</data>
|
||||
<data name=">>tsMain.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
@@ -988,6 +1126,9 @@
|
||||
<data name=">>panel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="toolSslBlank2.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>微软雅黑, 8pt</value>
|
||||
</data>
|
||||
<data name=">>txtMsgBox.Parent" xml:space="preserve">
|
||||
<value>groupBox2</value>
|
||||
</data>
|
||||
@@ -1018,8 +1159,11 @@
|
||||
<data name="menuGlobal.Text" xml:space="preserve">
|
||||
<value>Open Http proxy and automatically configure proxy server (global mode)</value>
|
||||
</data>
|
||||
<data name=">>tsbOptionSetting.Name" xml:space="preserve">
|
||||
<value>tsbOptionSetting</value>
|
||||
<data name="toolSslServerSpeed.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>MiddleRight</value>
|
||||
</data>
|
||||
<data name="splitContainer1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 17</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator7.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
@@ -1027,12 +1171,18 @@
|
||||
<data name=">>menuAddSocksServer.Name" xml:space="preserve">
|
||||
<value>menuAddSocksServer</value>
|
||||
</data>
|
||||
<data name="toolSslBlank1.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>微软雅黑, 8pt</value>
|
||||
</data>
|
||||
<data name="tsbServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>64, 53</value>
|
||||
</data>
|
||||
<data name="tsbClose.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
|
||||
<value>Magenta</value>
|
||||
</data>
|
||||
<data name="ssMain.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>946, 22</value>
|
||||
</data>
|
||||
<data name="menuGlobalPAC.Text" xml:space="preserve">
|
||||
<value>Open PAC and automatically configure PAC (PAC mode)</value>
|
||||
</data>
|
||||
@@ -1046,7 +1196,7 @@
|
||||
<value>bgwPing</value>
|
||||
</data>
|
||||
<data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib">
|
||||
<value>726</value>
|
||||
<value>686</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator10.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>6, 56</value>
|
||||
@@ -1054,11 +1204,14 @@
|
||||
<data name="menuAddShadowsocksServer.Text" xml:space="preserve">
|
||||
<value>Add [Shadowsocks] server</value>
|
||||
</data>
|
||||
<data name="toolSslServerSpeed.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>微软雅黑, 8pt</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Name" xml:space="preserve">
|
||||
<value>splitContainer1</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>992, 593</value>
|
||||
<value>952, 593</value>
|
||||
</data>
|
||||
<data name="menuKeep.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 22</value>
|
||||
@@ -1069,9 +1222,15 @@
|
||||
<data name="menuScanScreen2.Text" xml:space="preserve">
|
||||
<value>Scan QR code on the screen</value>
|
||||
</data>
|
||||
<data name=">>toolSslSocksPort.Name" xml:space="preserve">
|
||||
<value>toolSslSocksPort</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator10.Name" xml:space="preserve">
|
||||
<value>toolStripSeparator10</value>
|
||||
</data>
|
||||
<data name=">>toolSslHttpPortLab.Name" xml:space="preserve">
|
||||
<value>toolSslHttpPortLab</value>
|
||||
</data>
|
||||
<data name=">>menuMoveBottom.Name" xml:space="preserve">
|
||||
<value>menuMoveBottom</value>
|
||||
</data>
|
||||
@@ -1084,6 +1243,9 @@
|
||||
<data name="tsbServer.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
|
||||
<value>Magenta</value>
|
||||
</data>
|
||||
<data name=">>menuExport2ClientConfig.Name" xml:space="preserve">
|
||||
<value>menuExport2ClientConfig</value>
|
||||
</data>
|
||||
<data name="tsbLanguageDef.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>187, 22</value>
|
||||
</data>
|
||||
@@ -1108,8 +1270,8 @@
|
||||
<data name="tsbClose.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>52, 53</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator11.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name=">>menuRemoveDuplicateServer.Name" xml:space="preserve">
|
||||
<value>menuRemoveDuplicateServer</value>
|
||||
</data>
|
||||
<data name=">>menuScanScreen.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
@@ -1132,32 +1294,41 @@
|
||||
<data name="menuAddServers2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator10.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="toolSslBlank4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>0, 17</value>
|
||||
</data>
|
||||
<data name="ssMain.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="menuAddServers.Text" xml:space="preserve">
|
||||
<value>Import bulk URL from clipboard</value>
|
||||
</data>
|
||||
<data name=">>tsMain.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator2.Name" xml:space="preserve">
|
||||
<value>toolStripSeparator2</value>
|
||||
</data>
|
||||
<data name=">>toolSslSocksPortLab.Name" xml:space="preserve">
|
||||
<value>toolSslSocksPortLab</value>
|
||||
</data>
|
||||
<data name="menuAddCustomServer.Text" xml:space="preserve">
|
||||
<value>Add a custom configuration server</value>
|
||||
</data>
|
||||
<data name=">>toolSslHttpPort.Name" xml:space="preserve">
|
||||
<value>toolSslHttpPort</value>
|
||||
</data>
|
||||
<data name=">>tsbReload.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>952, 176</value>
|
||||
</data>
|
||||
<data name=">>menuGlobal.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="ssMain.Text" xml:space="preserve">
|
||||
<value>statusStrip1</value>
|
||||
</data>
|
||||
<data name=">>menuSpeedServer.Name" xml:space="preserve">
|
||||
<value>menuSpeedServer</value>
|
||||
</data>
|
||||
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
<data name=">>tsbSub.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripDropDownButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="qrCodeControl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
@@ -1168,6 +1339,9 @@
|
||||
<data name=">>toolStripSeparator3.Name" xml:space="preserve">
|
||||
<value>toolStripSeparator3</value>
|
||||
</data>
|
||||
<data name=">>menuGlobalPAC.Name" xml:space="preserve">
|
||||
<value>menuGlobalPAC</value>
|
||||
</data>
|
||||
<data name="tsbClose.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
@@ -1178,6 +1352,9 @@
|
||||
<data name="menuAddServers.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
</data>
|
||||
<data name="toolSslPacPortLab.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>微软雅黑, 8pt</value>
|
||||
</data>
|
||||
<data name="menuMoveBottom.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
</data>
|
||||
@@ -1190,12 +1367,12 @@
|
||||
<metadata name="bgwPing.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>232, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>zh-Hans</value>
|
||||
</metadata>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ssMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>603, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>65</value>
|
||||
</metadata>
|
||||
|
||||
@@ -163,6 +163,12 @@
|
||||
<data name="menuRemoveServer.Text" xml:space="preserve">
|
||||
<value>移除所选服务器(多选) (Delete)</value>
|
||||
</data>
|
||||
<data name="menuRemoveDuplicateServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>252, 22</value>
|
||||
</data>
|
||||
<data name="menuRemoveDuplicateServer.Text" xml:space="preserve">
|
||||
<value>移除重复的服务器</value>
|
||||
</data>
|
||||
<data name="menuCopyServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>252, 22</value>
|
||||
</data>
|
||||
@@ -215,13 +221,13 @@
|
||||
<value>252, 22</value>
|
||||
</data>
|
||||
<data name="menuPingServer.Text" xml:space="preserve">
|
||||
<value>测试服务器延迟(多选)</value>
|
||||
<value>测试服务器延迟(多选)(Ctrl+P)</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>252, 22</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer.Text" xml:space="preserve">
|
||||
<value>测试服务器速度(多选)</value>
|
||||
<value>测试服务器速度(多选)(Ctrl+T)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>249, 6</value>
|
||||
@@ -257,7 +263,7 @@
|
||||
<value> 服务器 </value>
|
||||
</data>
|
||||
<data name="cmsLv.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>253, 468</value>
|
||||
<value>253, 490</value>
|
||||
</data>
|
||||
<data name="lvServers.Items" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
@@ -351,6 +357,9 @@
|
||||
<data name="groupBox1.Text" xml:space="preserve">
|
||||
<value>服务器列表</value>
|
||||
</data>
|
||||
<data name="toolSslServerSpeed.Text" xml:space="preserve">
|
||||
<value>网速显示未启用</value>
|
||||
</data>
|
||||
<data name="groupBox2.Text" xml:space="preserve">
|
||||
<value>信息</value>
|
||||
</data>
|
||||
|
||||
52
v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs
generated
52
v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs
generated
@@ -28,6 +28,7 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OptionSettingForm));
|
||||
this.btnClose = new System.Windows.Forms.Button();
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
@@ -82,6 +83,11 @@
|
||||
this.txtKcpmtu = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.tabPage7 = new System.Windows.Forms.TabPage();
|
||||
this.cbFreshrate = new System.Windows.Forms.ComboBox();
|
||||
this.tbCacheDays = new System.Windows.Forms.TextBox();
|
||||
this.lbFreshrate = new System.Windows.Forms.Label();
|
||||
this.lbCacheDays = new System.Windows.Forms.Label();
|
||||
this.chkEnableStatistics = new System.Windows.Forms.CheckBox();
|
||||
this.chkAllowLANConn = new System.Windows.Forms.CheckBox();
|
||||
this.txturlGFWList = new System.Windows.Forms.TextBox();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
@@ -89,6 +95,7 @@
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.btnOK = new System.Windows.Forms.Button();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.configBindingSource = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
@@ -102,6 +109,7 @@
|
||||
this.tabPage6.SuspendLayout();
|
||||
this.tabPage7.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.configBindingSource)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnClose
|
||||
@@ -473,6 +481,11 @@
|
||||
//
|
||||
// tabPage7
|
||||
//
|
||||
this.tabPage7.Controls.Add(this.cbFreshrate);
|
||||
this.tabPage7.Controls.Add(this.tbCacheDays);
|
||||
this.tabPage7.Controls.Add(this.lbFreshrate);
|
||||
this.tabPage7.Controls.Add(this.lbCacheDays);
|
||||
this.tabPage7.Controls.Add(this.chkEnableStatistics);
|
||||
this.tabPage7.Controls.Add(this.chkAllowLANConn);
|
||||
this.tabPage7.Controls.Add(this.txturlGFWList);
|
||||
this.tabPage7.Controls.Add(this.label13);
|
||||
@@ -481,6 +494,34 @@
|
||||
this.tabPage7.Name = "tabPage7";
|
||||
this.tabPage7.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbFreshrate
|
||||
//
|
||||
this.cbFreshrate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbFreshrate.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.cbFreshrate, "cbFreshrate");
|
||||
this.cbFreshrate.Name = "cbFreshrate";
|
||||
//
|
||||
// tbCacheDays
|
||||
//
|
||||
resources.ApplyResources(this.tbCacheDays, "tbCacheDays");
|
||||
this.tbCacheDays.Name = "tbCacheDays";
|
||||
//
|
||||
// lbFreshrate
|
||||
//
|
||||
resources.ApplyResources(this.lbFreshrate, "lbFreshrate");
|
||||
this.lbFreshrate.Name = "lbFreshrate";
|
||||
//
|
||||
// lbCacheDays
|
||||
//
|
||||
resources.ApplyResources(this.lbCacheDays, "lbCacheDays");
|
||||
this.lbCacheDays.Name = "lbCacheDays";
|
||||
//
|
||||
// chkEnableStatistics
|
||||
//
|
||||
resources.ApplyResources(this.chkEnableStatistics, "chkEnableStatistics");
|
||||
this.chkEnableStatistics.Name = "chkEnableStatistics";
|
||||
this.chkEnableStatistics.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkAllowLANConn
|
||||
//
|
||||
resources.ApplyResources(this.chkAllowLANConn, "chkAllowLANConn");
|
||||
@@ -522,6 +563,10 @@
|
||||
resources.ApplyResources(this.panel1, "panel1");
|
||||
this.panel1.Name = "panel1";
|
||||
//
|
||||
// configBindingSource
|
||||
//
|
||||
this.configBindingSource.DataSource = typeof(v2rayN.Mode.Config);
|
||||
//
|
||||
// OptionSettingForm
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
@@ -553,6 +598,7 @@
|
||||
this.tabPage7.ResumeLayout(false);
|
||||
this.tabPage7.PerformLayout();
|
||||
this.panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.configBindingSource)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@@ -619,5 +665,11 @@
|
||||
private System.Windows.Forms.CheckBox chksniffingEnabled;
|
||||
private System.Windows.Forms.CheckBox chksniffingEnabled2;
|
||||
private System.Windows.Forms.Button btnSetDefRountingRule;
|
||||
private System.Windows.Forms.CheckBox chkEnableStatistics;
|
||||
private System.Windows.Forms.TextBox tbCacheDays;
|
||||
private System.Windows.Forms.Label lbCacheDays;
|
||||
private System.Windows.Forms.ComboBox cbFreshrate;
|
||||
private System.Windows.Forms.Label lbFreshrate;
|
||||
private System.Windows.Forms.BindingSource configBindingSource;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Text;
|
||||
using System.Windows.Forms;
|
||||
using v2rayN.Handler;
|
||||
|
||||
@@ -106,6 +104,37 @@ namespace v2rayN.Forms
|
||||
|
||||
chkAllowLANConn.Checked = config.allowLANConn;
|
||||
|
||||
|
||||
var enableStatistics = config.enableStatistics;
|
||||
chkEnableStatistics.Checked = enableStatistics;
|
||||
|
||||
tbCacheDays.Text = config.CacheDays.ToString();
|
||||
|
||||
|
||||
var cbSource = new ComboItem[]
|
||||
{
|
||||
new ComboItem{ID = (int)Global.StatisticsFreshRate.quick, Text = UIRes.I18N("QuickFresh")},
|
||||
new ComboItem{ID = (int)Global.StatisticsFreshRate.medium, Text = UIRes.I18N("MediumFresh")},
|
||||
new ComboItem{ID = (int)Global.StatisticsFreshRate.slow, Text = UIRes.I18N("SlowFresh")},
|
||||
};
|
||||
cbFreshrate.DataSource = cbSource;
|
||||
|
||||
cbFreshrate.DisplayMember = "Text";
|
||||
cbFreshrate.ValueMember = "ID";
|
||||
|
||||
switch(config.statisticsFreshRate)
|
||||
{
|
||||
case (int)Global.StatisticsFreshRate.quick:
|
||||
cbFreshrate.SelectedItem = cbSource[0];
|
||||
break;
|
||||
case (int)Global.StatisticsFreshRate.medium:
|
||||
cbFreshrate.SelectedItem = cbSource[1];
|
||||
break;
|
||||
case (int)Global.StatisticsFreshRate.slow:
|
||||
cbFreshrate.SelectedItem = cbSource[2];
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void btnOK_Click(object sender, EventArgs e)
|
||||
@@ -148,14 +177,14 @@ namespace v2rayN.Forms
|
||||
{
|
||||
//日志
|
||||
bool logEnabled = chklogEnabled.Checked;
|
||||
string loglevel = cmbloglevel.Text.Trim();
|
||||
string loglevel = cmbloglevel.Text.TrimEx();
|
||||
|
||||
//Mux
|
||||
bool muxEnabled = chkmuxEnabled.Checked;
|
||||
|
||||
//本地监听
|
||||
string localPort = txtlocalPort.Text.Trim();
|
||||
string protocol = cmbprotocol.Text.Trim();
|
||||
string localPort = txtlocalPort.Text.TrimEx();
|
||||
string protocol = cmbprotocol.Text.TrimEx();
|
||||
bool udpEnabled = chkudpEnabled.Checked;
|
||||
bool sniffingEnabled = chksniffingEnabled.Checked;
|
||||
if (Utils.IsNullOrEmpty(localPort) || !Utils.IsNumberic(localPort))
|
||||
@@ -174,8 +203,8 @@ namespace v2rayN.Forms
|
||||
config.inbound[0].sniffingEnabled = sniffingEnabled;
|
||||
|
||||
//本地监听2
|
||||
string localPort2 = txtlocalPort2.Text.Trim();
|
||||
string protocol2 = cmbprotocol2.Text.Trim();
|
||||
string localPort2 = txtlocalPort2.Text.TrimEx();
|
||||
string protocol2 = cmbprotocol2.Text.TrimEx();
|
||||
bool udpEnabled2 = chkudpEnabled2.Checked;
|
||||
bool sniffingEnabled2 = chksniffingEnabled2.Checked;
|
||||
if (chkAllowIn2.Checked)
|
||||
@@ -215,7 +244,7 @@ namespace v2rayN.Forms
|
||||
config.muxEnabled = muxEnabled;
|
||||
|
||||
//remoteDNS
|
||||
config.remoteDNS = txtremoteDNS.Text.Trim();
|
||||
config.remoteDNS = txtremoteDNS.Text.TrimEx();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -230,9 +259,9 @@ namespace v2rayN.Forms
|
||||
string domainStrategy = cmbdomainStrategy.Text;
|
||||
string routingMode = cmbroutingMode.SelectedIndex.ToString();
|
||||
|
||||
string useragent = txtUseragent.Text.Trim();
|
||||
string userdirect = txtUserdirect.Text.Trim();
|
||||
string userblock = txtUserblock.Text.Trim();
|
||||
string useragent = txtUseragent.Text.TrimEx();
|
||||
string userdirect = txtUserdirect.Text.TrimEx();
|
||||
string userblock = txtUserblock.Text.TrimEx();
|
||||
|
||||
config.domainStrategy = domainStrategy;
|
||||
config.routingMode = routingMode;
|
||||
@@ -250,12 +279,12 @@ namespace v2rayN.Forms
|
||||
/// <returns></returns>
|
||||
private int SaveKCP()
|
||||
{
|
||||
string mtu = txtKcpmtu.Text.Trim();
|
||||
string tti = txtKcptti.Text.Trim();
|
||||
string uplinkCapacity = txtKcpuplinkCapacity.Text.Trim();
|
||||
string downlinkCapacity = txtKcpdownlinkCapacity.Text.Trim();
|
||||
string readBufferSize = txtKcpreadBufferSize.Text.Trim();
|
||||
string writeBufferSize = txtKcpwriteBufferSize.Text.Trim();
|
||||
string mtu = txtKcpmtu.Text.TrimEx();
|
||||
string tti = txtKcptti.Text.TrimEx();
|
||||
string uplinkCapacity = txtKcpuplinkCapacity.Text.TrimEx();
|
||||
string downlinkCapacity = txtKcpdownlinkCapacity.Text.TrimEx();
|
||||
string readBufferSize = txtKcpreadBufferSize.Text.TrimEx();
|
||||
string writeBufferSize = txtKcpwriteBufferSize.Text.TrimEx();
|
||||
bool congestion = chkKcpcongestion.Checked;
|
||||
|
||||
if (Utils.IsNullOrEmpty(mtu) || !Utils.IsNumberic(mtu)
|
||||
@@ -289,10 +318,30 @@ namespace v2rayN.Forms
|
||||
Utils.SetAutoRun(chkAutoRun.Checked);
|
||||
|
||||
//自定义GFWList
|
||||
config.urlGFWList = txturlGFWList.Text.Trim();
|
||||
config.urlGFWList = txturlGFWList.Text.TrimEx();
|
||||
|
||||
config.allowLANConn = chkAllowLANConn.Checked;
|
||||
|
||||
var lastEnableStatistics = config.enableStatistics;
|
||||
config.enableStatistics = chkEnableStatistics.Checked;
|
||||
|
||||
uint days = 0;
|
||||
var valid = uint.TryParse(tbCacheDays.Text, out days);
|
||||
if (!valid)
|
||||
days = 7;
|
||||
config.CacheDays = days;
|
||||
|
||||
config.statisticsFreshRate = (int)cbFreshrate.SelectedValue;
|
||||
|
||||
//if(lastEnableStatistics != config.enableStatistics)
|
||||
//{
|
||||
// /// https://stackoverflow.com/questions/779405/how-do-i-restart-my-c-sharp-winform-application
|
||||
// // Shut down the current app instance.
|
||||
// Application.Exit();
|
||||
|
||||
// // Restart the app passing "/restart [processId]" as cmd line args
|
||||
// Process.Start(Application.ExecutablePath, "/restart " + Process.GetCurrentProcess().Id);
|
||||
//}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -358,4 +407,10 @@ namespace v2rayN.Forms
|
||||
labRoutingTips.Text = text;
|
||||
}
|
||||
}
|
||||
|
||||
class ComboItem
|
||||
{
|
||||
public int ID { get; set; }
|
||||
public string Text { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -288,4 +288,13 @@
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>参数设置</value>
|
||||
</data>
|
||||
<data name="chkEnableStatistics.Text" xml:space="preserve">
|
||||
<value>启用统计(实时网速显示和使用流量显示,需要重启v2rayN客户端)</value>
|
||||
</data>
|
||||
<data name="lbCacheDays.Text" xml:space="preserve">
|
||||
<value>缓存天数(0-30, 0关闭缓存单独每天的数据使用情况)</value>
|
||||
</data>
|
||||
<data name="lbFreshrate.Text" xml:space="preserve">
|
||||
<value>统计刷新频率</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -26,7 +26,7 @@ namespace v2rayN.Forms
|
||||
if (Index >= 0)
|
||||
{
|
||||
string url = ConfigHandler.GetVmessQRCode(config, Index);
|
||||
if (string.IsNullOrEmpty(url))
|
||||
if (Utils.IsNullOrEmpty(url))
|
||||
{
|
||||
picQRCode.Image = null;
|
||||
txtUrl.Text = string.Empty;
|
||||
|
||||
@@ -35,8 +35,8 @@ namespace v2rayN.Forms
|
||||
{
|
||||
if (subItem != null)
|
||||
{
|
||||
subItem.remarks = txtRemarks.Text.Trim();
|
||||
subItem.url = txtUrl.Text.Trim();
|
||||
subItem.remarks = txtRemarks.Text.TrimEx();
|
||||
subItem.url = txtUrl.Text.TrimEx();
|
||||
subItem.enabled = chkEnabled.Checked;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,6 +95,11 @@ namespace v2rayN
|
||||
/// 阻止 tag值
|
||||
/// </summary>
|
||||
public const string blockTag = "block";
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public const string StreamSecurity = "tls";
|
||||
|
||||
/// <summary>
|
||||
/// vmess
|
||||
@@ -108,6 +113,14 @@ namespace v2rayN
|
||||
/// socks
|
||||
/// </summary>
|
||||
public const string socksProtocol = "socks://";
|
||||
/// <summary>
|
||||
/// http
|
||||
/// </summary>
|
||||
public const string httpProtocol = "http://";
|
||||
/// <summary>
|
||||
/// https
|
||||
/// </summary>
|
||||
public const string httpsProtocol = "https://";
|
||||
|
||||
/// <summary>
|
||||
/// pac
|
||||
@@ -133,6 +146,21 @@ namespace v2rayN
|
||||
/// </summary>
|
||||
public const string CustomIconName = "v2rayN.ico";
|
||||
|
||||
|
||||
public const string InboundAPITagName = "api";
|
||||
public const string InboundProxyTagName = "proxy";
|
||||
public const string Loopback = "127.0.0.1";
|
||||
public const string InboundAPIProtocal = "dokodemo-door";
|
||||
|
||||
public enum StatisticsFreshRate
|
||||
{
|
||||
quick = 1000,
|
||||
medium = 2000,
|
||||
slow = 3000
|
||||
}
|
||||
public const string StatisticLogDirectory = "Statistics";
|
||||
public const string StatisticLogOverall = "overall.txt";
|
||||
|
||||
#endregion
|
||||
|
||||
#region 全局变量
|
||||
@@ -162,6 +190,11 @@ namespace v2rayN
|
||||
/// </summary>
|
||||
public static int pacPort { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static int statePort { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
@@ -40,6 +40,15 @@ namespace v2rayN.Handler
|
||||
|
||||
////默认监听端口
|
||||
//config.pacPort = 8888;
|
||||
|
||||
// 默认缓存七天
|
||||
config.CacheDays = 7;
|
||||
|
||||
// 默认不开启统计
|
||||
config.enableStatistics = false;
|
||||
|
||||
// 默认中等刷新率
|
||||
config.statisticsFreshRate = (int)Global.StatisticsFreshRate.medium;
|
||||
}
|
||||
|
||||
//本地监听
|
||||
@@ -112,6 +121,11 @@ namespace v2rayN.Handler
|
||||
// config.pacPort = 8888;
|
||||
//}
|
||||
|
||||
if (config.subItem == null)
|
||||
{
|
||||
config.subItem = new List<SubItem>();
|
||||
}
|
||||
|
||||
if (config == null
|
||||
|| config.index < 0
|
||||
|| config.vmess.Count <= 0
|
||||
@@ -146,6 +160,16 @@ namespace v2rayN.Handler
|
||||
{
|
||||
vmessItem.configVersion = 2;
|
||||
vmessItem.configType = (int)EConfigType.Vmess;
|
||||
|
||||
vmessItem.address = vmessItem.address.TrimEx();
|
||||
vmessItem.id = vmessItem.id.TrimEx();
|
||||
vmessItem.security = vmessItem.security.TrimEx();
|
||||
vmessItem.network = vmessItem.network.TrimEx();
|
||||
vmessItem.headerType = vmessItem.headerType.TrimEx();
|
||||
vmessItem.requestHost = vmessItem.requestHost.TrimEx();
|
||||
vmessItem.path = vmessItem.path.TrimEx();
|
||||
vmessItem.streamSecurity = vmessItem.streamSecurity.TrimEx();
|
||||
|
||||
if (index >= 0)
|
||||
{
|
||||
//修改
|
||||
@@ -313,7 +337,7 @@ namespace v2rayN.Handler
|
||||
{
|
||||
VmessQRCode vmessQRCode = new VmessQRCode();
|
||||
vmessQRCode.v = vmessItem.configVersion.ToString();
|
||||
vmessQRCode.ps = vmessItem.remarks.Trim(); //备注也许很长 ;
|
||||
vmessQRCode.ps = vmessItem.remarks.TrimEx(); //备注也许很长 ;
|
||||
vmessQRCode.add = vmessItem.address;
|
||||
vmessQRCode.port = vmessItem.port.ToString();
|
||||
vmessQRCode.id = vmessItem.id;
|
||||
@@ -351,7 +375,9 @@ namespace v2rayN.Handler
|
||||
{
|
||||
remark = "#" + WebUtility.UrlEncode(vmessItem.remarks);
|
||||
}
|
||||
url = string.Format("{0}:{1}",
|
||||
url = string.Format("{0}:{1}@{2}:{3}",
|
||||
vmessItem.security,
|
||||
vmessItem.id,
|
||||
vmessItem.address,
|
||||
vmessItem.port);
|
||||
url = Utils.Base64Encode(url);
|
||||
@@ -548,6 +574,11 @@ namespace v2rayN.Handler
|
||||
{
|
||||
vmessItem.configVersion = 2;
|
||||
vmessItem.configType = (int)EConfigType.Shadowsocks;
|
||||
|
||||
vmessItem.address = vmessItem.address.TrimEx();
|
||||
vmessItem.id = vmessItem.id.TrimEx();
|
||||
vmessItem.security = vmessItem.security.TrimEx();
|
||||
|
||||
if (index >= 0)
|
||||
{
|
||||
//修改
|
||||
@@ -584,6 +615,9 @@ namespace v2rayN.Handler
|
||||
{
|
||||
vmessItem.configVersion = 2;
|
||||
vmessItem.configType = (int)EConfigType.Socks;
|
||||
|
||||
vmessItem.address = vmessItem.address.TrimEx();
|
||||
|
||||
if (index >= 0)
|
||||
{
|
||||
//修改
|
||||
@@ -698,6 +732,15 @@ namespace v2rayN.Handler
|
||||
foreach (string str in arrData)
|
||||
{
|
||||
string msg;
|
||||
//maybe sub
|
||||
if (str.StartsWith(Global.httpsProtocol) || str.StartsWith(Global.httpProtocol))
|
||||
{
|
||||
if (AddSubItem(ref config, str) == 0)
|
||||
{
|
||||
countServers++;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(str, out msg);
|
||||
if (vmessItem == null)
|
||||
{
|
||||
@@ -733,6 +776,32 @@ namespace v2rayN.Handler
|
||||
return -1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// add sub
|
||||
/// </summary>
|
||||
/// <param name="config"></param>
|
||||
/// <param name="url"></param>
|
||||
/// <returns></returns>
|
||||
public static int AddSubItem(ref Config config, string url)
|
||||
{
|
||||
//already exists
|
||||
foreach (var sub in config.subItem)
|
||||
{
|
||||
if (url == sub.url)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
var subItem = new SubItem();
|
||||
subItem.id = string.Empty;
|
||||
subItem.remarks = "import sub";
|
||||
subItem.url = url;
|
||||
config.subItem.Add(subItem);
|
||||
|
||||
return SaveSubItem(ref config);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// save sub
|
||||
/// </summary>
|
||||
|
||||
446
v2rayN/v2rayN/Handler/StatisticsHandler.cs
Normal file
446
v2rayN/v2rayN/Handler/StatisticsHandler.cs
Normal file
@@ -0,0 +1,446 @@
|
||||
using Grpc.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Threading;
|
||||
using v2rayN.Mode;
|
||||
using v2rayN.Protos.Statistics;
|
||||
|
||||
namespace v2rayN.Handler
|
||||
{
|
||||
class StatisticsHandler
|
||||
{
|
||||
private Mode.Config config_;
|
||||
|
||||
private Channel channel_;
|
||||
private StatsService.StatsServiceClient client_;
|
||||
private Thread workThread_;
|
||||
|
||||
Action<ulong, ulong, ulong, ulong, List<Mode.ServerStatistics>> updateFunc_;
|
||||
|
||||
private bool enabled_;
|
||||
public bool Enable
|
||||
{
|
||||
get
|
||||
{
|
||||
return enabled_;
|
||||
}
|
||||
set
|
||||
{
|
||||
enabled_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool UpdateUI;
|
||||
|
||||
public ulong TotalUp
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public ulong TotalDown
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public List<Mode.ServerStatistics> Statistic
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public ulong Up
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public ulong Down
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
private string logPath_;
|
||||
|
||||
private bool exitFlag_; // true to close workThread_
|
||||
|
||||
public StatisticsHandler(Mode.Config config, Action<ulong, ulong, ulong, ulong, List<Mode.ServerStatistics>> update)
|
||||
{
|
||||
config_ = config;
|
||||
enabled_ = config.enableStatistics;
|
||||
UpdateUI = false;
|
||||
updateFunc_ = update;
|
||||
logPath_ = Utils.GetPath(Global.StatisticLogDirectory);
|
||||
Statistic = new List<Mode.ServerStatistics>();
|
||||
exitFlag_ = false;
|
||||
|
||||
DeleteExpiredLog();
|
||||
foreach (var server in config.vmess)
|
||||
{
|
||||
var statistic = new ServerStatistics(server.remarks, server.address, server.port, server.path, server.requestHost, 0, 0, 0, 0);
|
||||
Statistic.Add(statistic);
|
||||
}
|
||||
|
||||
LoadFromFile();
|
||||
|
||||
GrpcInit();
|
||||
|
||||
workThread_ = new Thread(new ThreadStart(Run));
|
||||
workThread_.Start();
|
||||
}
|
||||
|
||||
private void GrpcInit()
|
||||
{
|
||||
if (channel_ == null)
|
||||
{
|
||||
Global.statePort = GetFreePort();
|
||||
|
||||
channel_ = new Channel($"127.0.0.1:{Global.statePort}", ChannelCredentials.Insecure);
|
||||
channel_.ConnectAsync();
|
||||
client_ = new StatsService.StatsServiceClient(channel_);
|
||||
}
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
exitFlag_ = true;
|
||||
channel_.ShutdownAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void Run()
|
||||
{
|
||||
while (!exitFlag_)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (enabled_ && channel_.State == ChannelState.Ready)
|
||||
{
|
||||
QueryStatsResponse res = null;
|
||||
try
|
||||
{
|
||||
res = client_.QueryStats(new QueryStatsRequest() { Pattern = "", Reset = true });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
|
||||
if (res != null)
|
||||
{
|
||||
var addr = config_.address();
|
||||
var port = config_.port();
|
||||
var path = config_.path();
|
||||
var cur = Statistic.FindIndex(item => item.address == addr && item.port == port && item.path == path);
|
||||
ulong up = 0,
|
||||
down = 0;
|
||||
|
||||
//TODO: parse output
|
||||
ParseOutput(res.Stat, out up, out down);
|
||||
|
||||
Up = up;
|
||||
Down = down;
|
||||
|
||||
TotalUp += up;
|
||||
TotalDown += down;
|
||||
|
||||
if (cur != -1)
|
||||
{
|
||||
Statistic[cur].todayUp += up;
|
||||
Statistic[cur].todayDown += down;
|
||||
Statistic[cur].totalUp += up;
|
||||
Statistic[cur].totalDown += down;
|
||||
}
|
||||
|
||||
if (UpdateUI)
|
||||
updateFunc_(TotalUp, TotalDown, Up, Down, Statistic);
|
||||
}
|
||||
}
|
||||
Thread.Sleep(config_.statisticsFreshRate);
|
||||
channel_.ConnectAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ParseOutput(Google.Protobuf.Collections.RepeatedField<Stat> source, out ulong up, out ulong down)
|
||||
{
|
||||
|
||||
up = 0; down = 0;
|
||||
try
|
||||
{
|
||||
|
||||
foreach (var stat in source)
|
||||
{
|
||||
var name = stat.Name;
|
||||
var value = stat.Value;
|
||||
var nStr = name.Split(">>>".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
||||
var type = "";
|
||||
|
||||
name = name.Trim();
|
||||
|
||||
name = nStr[1];
|
||||
type = nStr[3];
|
||||
|
||||
if (name == Global.InboundProxyTagName)
|
||||
{
|
||||
if (type == "uplink")
|
||||
{
|
||||
up = (ulong)value;
|
||||
}
|
||||
else if (type == "downlink")
|
||||
{
|
||||
down = (ulong)value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void SaveToFile()
|
||||
{
|
||||
if (!Directory.Exists(logPath_))
|
||||
{
|
||||
Directory.CreateDirectory(logPath_);
|
||||
}
|
||||
|
||||
// 总流量统计文件
|
||||
var overallPath = Path.Combine(logPath_, Global.StatisticLogOverall);
|
||||
if (!File.Exists(overallPath))
|
||||
{
|
||||
File.Create(overallPath);
|
||||
}
|
||||
try
|
||||
{
|
||||
using (var overallWriter = new StreamWriter(overallPath))
|
||||
{
|
||||
double up_amount, down_amount;
|
||||
string up_unit, down_unit;
|
||||
|
||||
Utils.ToHumanReadable(TotalUp, out up_amount, out up_unit);
|
||||
Utils.ToHumanReadable(TotalDown, out down_amount, out down_unit);
|
||||
|
||||
overallWriter.WriteLine($"LastUpdate {DateTime.Now.ToString("yyyy-MM-dd")} {DateTime.Now.ToLongTimeString()}");
|
||||
overallWriter.WriteLine($"UP {string.Format("{0:f2}", up_amount)}{up_unit} {TotalUp}");
|
||||
overallWriter.WriteLine($"DOWN {string.Format("{0:f2}", down_amount)}{down_unit} {TotalDown}");
|
||||
foreach (var s in Statistic)
|
||||
{
|
||||
overallWriter.WriteLine($"* {s.name} {s.address} {s.port} {s.path} {s.host} {s.totalUp} {s.totalDown}");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
|
||||
// 当天流量记录文件
|
||||
var dailyPath = Path.Combine(logPath_, $"{DateTime.Now.ToString("yyyy-MM-dd")}.txt");
|
||||
if (!File.Exists(dailyPath))
|
||||
{
|
||||
File.Create(dailyPath);
|
||||
}
|
||||
try
|
||||
{
|
||||
using (var dailyWriter = new StreamWriter(dailyPath))
|
||||
{
|
||||
dailyWriter.WriteLine($"LastUpdate {DateTime.Now.ToString("yyyy-MM-dd")} {DateTime.Now.ToLongTimeString()}");
|
||||
foreach (var s in Statistic)
|
||||
{
|
||||
dailyWriter.WriteLine($"* {s.name} {s.address} {s.port} {s.path} {s.host} {s.todayUp} {s.todayDown}");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadFromFile()
|
||||
{
|
||||
if (!Directory.Exists(logPath_)) return;
|
||||
|
||||
// 总流量统计文件
|
||||
///
|
||||
/// 文件结构
|
||||
/// LastUpdate [date] [time]
|
||||
/// UP [readable string] [amount]
|
||||
/// DOWN [readable string] [amount]
|
||||
/// 每行每个数据空格分隔
|
||||
|
||||
try
|
||||
{
|
||||
Utils.SaveLog(logPath_ + Global.StatisticLogOverall);
|
||||
var overallPath = Path.Combine(logPath_, Global.StatisticLogOverall);
|
||||
if (File.Exists(overallPath))
|
||||
{
|
||||
using (var overallReader = new StreamReader(overallPath))
|
||||
{
|
||||
while (!overallReader.EndOfStream)
|
||||
{
|
||||
var line = overallReader.ReadLine();
|
||||
if (line.StartsWith("LastUpdate"))
|
||||
{
|
||||
|
||||
}
|
||||
else if (line.StartsWith("UP"))
|
||||
{
|
||||
var datas = line.Split(' ');
|
||||
if (datas.Length < 3) return;
|
||||
TotalUp = ulong.Parse(datas[2]);
|
||||
}
|
||||
else if (line.StartsWith("DOWN"))
|
||||
{
|
||||
var datas = line.Split(' ');
|
||||
if (datas.Length < 3) return;
|
||||
TotalDown = ulong.Parse(datas[2]);
|
||||
}
|
||||
else if (line.StartsWith("*"))
|
||||
{
|
||||
var datas = line.Split(' ');
|
||||
if (datas.Length < 8) return;
|
||||
var name = datas[1];
|
||||
var address = datas[2];
|
||||
var port = int.Parse(datas[3]);
|
||||
var path = datas[4];
|
||||
var host = datas[5];
|
||||
var totalUp = ulong.Parse(datas[6]);
|
||||
var totalDown = ulong.Parse(datas[7]);
|
||||
|
||||
var temp = new ServerStatistics(name, address, port, path, host, 0, 0, 0, 0);
|
||||
var index = Statistic.FindIndex(item => Utils.IsIdenticalServer(item, temp));
|
||||
if (index != -1)
|
||||
{
|
||||
Statistic[index].totalUp = totalUp;
|
||||
Statistic[index].totalDown = totalDown;
|
||||
}
|
||||
else
|
||||
{
|
||||
var s = new Mode.ServerStatistics(name, address, port, path, host, totalUp, totalDown, 0, 0);
|
||||
Statistic.Add(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Utils.SaveLog(logPath_ + $"{DateTime.Now.ToString("yyyy-MM-dd")}.txt");
|
||||
var dailyPath = Path.Combine(logPath_, $"{DateTime.Now.ToString("yyyy-MM-dd")}.txt");
|
||||
if (File.Exists(dailyPath))
|
||||
{
|
||||
|
||||
using (var dailyReader = new StreamReader(dailyPath))
|
||||
{
|
||||
while (!dailyReader.EndOfStream)
|
||||
{
|
||||
var line = dailyReader.ReadLine();
|
||||
if (line.StartsWith("LastUpdate"))
|
||||
{
|
||||
|
||||
}
|
||||
else if (line.StartsWith("*"))
|
||||
{
|
||||
var datas = line.Split(' ');
|
||||
if (datas.Length < 8) return;
|
||||
var name = datas[1];
|
||||
var address = datas[2];
|
||||
var port = int.Parse(datas[3]);
|
||||
var path = datas[4];
|
||||
var host = datas[5];
|
||||
var todayUp = ulong.Parse(datas[6]);
|
||||
var todayDown = ulong.Parse(datas[7]);
|
||||
|
||||
var temp = new ServerStatistics(name, address, port, path, host, 0, 0, 0, 0);
|
||||
var index = Statistic.FindIndex(item => Utils.IsIdenticalServer(item, temp));
|
||||
if (index != -1)
|
||||
{
|
||||
Statistic[index].todayUp = todayUp;
|
||||
Statistic[index].todayDown = todayDown;
|
||||
}
|
||||
else
|
||||
{
|
||||
var s = new Mode.ServerStatistics(name, address, port, path, host, 0, 0, todayUp, todayDown);
|
||||
Statistic.Add(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void DeleteExpiredLog()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!Directory.Exists(logPath_)) return;
|
||||
var dirInfo = new DirectoryInfo(logPath_);
|
||||
var files = dirInfo.GetFiles();
|
||||
foreach (var file in files)
|
||||
{
|
||||
if (file.Name == "overall.txt") continue;
|
||||
var name = file.Name.Split('.')[0];
|
||||
var ft = DateTime.Parse(name);
|
||||
var ct = DateTime.Now;
|
||||
var dur = ct - ft;
|
||||
if (dur.Days > config_.CacheDays)
|
||||
{
|
||||
file.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
|
||||
private int GetFreePort()
|
||||
{
|
||||
int defaultPort = 28123;
|
||||
try
|
||||
{
|
||||
// TCP stack please do me a favor
|
||||
TcpListener l = new TcpListener(IPAddress.Loopback, 0);
|
||||
l.Start();
|
||||
var port = ((IPEndPoint)l.LocalEndpoint).Port;
|
||||
l.Stop();
|
||||
return port;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// in case access denied
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
return defaultPort;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ using System.IO;
|
||||
using v2rayN.Mode;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
|
||||
namespace v2rayN.Handler
|
||||
{
|
||||
@@ -78,6 +79,9 @@ namespace v2rayN.Handler
|
||||
//dns
|
||||
dns(config, ref v2rayConfig);
|
||||
|
||||
// TODO: 统计配置
|
||||
statistic(config, ref v2rayConfig);
|
||||
|
||||
Utils.ToJsonFile(v2rayConfig, fileName);
|
||||
|
||||
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), config.getSummary());
|
||||
@@ -235,7 +239,7 @@ namespace v2rayN.Handler
|
||||
|
||||
for (int k = 0; k < userRule.Count; k++)
|
||||
{
|
||||
string url = userRule[k].Trim();
|
||||
string url = userRule[k].TrimEx();
|
||||
if (Utils.IsNullOrEmpty(url))
|
||||
{
|
||||
continue;
|
||||
@@ -400,6 +404,17 @@ namespace v2rayN.Handler
|
||||
serversItem.address = config.address();
|
||||
serversItem.port = config.port();
|
||||
|
||||
if (!Utils.IsNullOrEmpty(config.security())
|
||||
&& !Utils.IsNullOrEmpty(config.id()))
|
||||
{
|
||||
var socksUsersItem = new SocksUsersItem();
|
||||
socksUsersItem.user = config.security();
|
||||
socksUsersItem.pass = config.id();
|
||||
socksUsersItem.level = 1;
|
||||
|
||||
serversItem.users = new List<SocksUsersItem>() { socksUsersItem };
|
||||
}
|
||||
|
||||
outbound.mux.enabled = false;
|
||||
|
||||
outbound.protocol = "socks";
|
||||
@@ -425,7 +440,21 @@ namespace v2rayN.Handler
|
||||
{
|
||||
//远程服务器底层传输配置
|
||||
streamSettings.network = config.network();
|
||||
streamSettings.security = config.streamSecurity();
|
||||
var host = config.requestHost();
|
||||
|
||||
//if tls
|
||||
if (config.streamSecurity() == Global.StreamSecurity)
|
||||
{
|
||||
streamSettings.security = config.streamSecurity();
|
||||
|
||||
TlsSettings tlsSettings = new TlsSettings();
|
||||
tlsSettings.allowInsecure = config.allowInsecure();
|
||||
if (!string.IsNullOrWhiteSpace(host))
|
||||
{
|
||||
tlsSettings.serverName = host;
|
||||
}
|
||||
streamSettings.tlsSettings = tlsSettings;
|
||||
}
|
||||
|
||||
//streamSettings
|
||||
switch (config.network())
|
||||
@@ -463,12 +492,11 @@ namespace v2rayN.Handler
|
||||
WsSettings wsSettings = new WsSettings();
|
||||
wsSettings.connectionReuse = true;
|
||||
|
||||
string host2 = config.requestHost();
|
||||
string path = config.path();
|
||||
if (!string.IsNullOrWhiteSpace(host2))
|
||||
if (!string.IsNullOrWhiteSpace(host))
|
||||
{
|
||||
wsSettings.headers = new Headers();
|
||||
wsSettings.headers.Host = host2;
|
||||
wsSettings.headers.Host = host;
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(path))
|
||||
{
|
||||
@@ -476,35 +504,34 @@ namespace v2rayN.Handler
|
||||
}
|
||||
streamSettings.wsSettings = wsSettings;
|
||||
|
||||
TlsSettings tlsSettings = new TlsSettings();
|
||||
tlsSettings.allowInsecure = config.allowInsecure();
|
||||
if (!string.IsNullOrWhiteSpace(host2))
|
||||
{
|
||||
tlsSettings.serverName = host2;
|
||||
}
|
||||
streamSettings.tlsSettings = tlsSettings;
|
||||
//TlsSettings tlsSettings = new TlsSettings();
|
||||
//tlsSettings.allowInsecure = config.allowInsecure();
|
||||
//if (!string.IsNullOrWhiteSpace(host))
|
||||
//{
|
||||
// tlsSettings.serverName = host;
|
||||
//}
|
||||
//streamSettings.tlsSettings = tlsSettings;
|
||||
break;
|
||||
//h2
|
||||
case "h2":
|
||||
HttpSettings httpSettings = new HttpSettings();
|
||||
|
||||
string host3 = config.requestHost();
|
||||
if (!string.IsNullOrWhiteSpace(host3))
|
||||
if (!string.IsNullOrWhiteSpace(host))
|
||||
{
|
||||
httpSettings.host = Utils.String2List(host3);
|
||||
httpSettings.host = Utils.String2List(host);
|
||||
}
|
||||
httpSettings.path = config.path();
|
||||
|
||||
streamSettings.httpSettings = httpSettings;
|
||||
|
||||
TlsSettings tlsSettings2 = new TlsSettings();
|
||||
tlsSettings2.allowInsecure = config.allowInsecure();
|
||||
streamSettings.tlsSettings = tlsSettings2;
|
||||
//TlsSettings tlsSettings2 = new TlsSettings();
|
||||
//tlsSettings2.allowInsecure = config.allowInsecure();
|
||||
//streamSettings.tlsSettings = tlsSettings2;
|
||||
break;
|
||||
//quic
|
||||
case "quic":
|
||||
QuicSettings quicsettings = new QuicSettings();
|
||||
quicsettings.security = config.requestHost();
|
||||
quicsettings.security = host;
|
||||
quicsettings.key = config.path();
|
||||
quicsettings.header = new Header();
|
||||
quicsettings.header.type = config.headerType();
|
||||
@@ -524,9 +551,9 @@ namespace v2rayN.Handler
|
||||
{
|
||||
//request填入自定义Host
|
||||
string request = Utils.GetEmbedText(Global.v2raySampleHttprequestFileName);
|
||||
string[] arrHost = config.requestHost().Split(',');
|
||||
string host = string.Join("\",\"", arrHost);
|
||||
request = request.Replace("$requestHost$", string.Format("\"{0}\"", host));
|
||||
string[] arrHost = host.Split(',');
|
||||
string host2 = string.Join("\",\"", arrHost);
|
||||
request = request.Replace("$requestHost$", string.Format("\"{0}\"", host2));
|
||||
//request = request.Replace("$requestHost$", string.Format("\"{0}\"", config.requestHost()));
|
||||
|
||||
//填入自定义Path
|
||||
@@ -590,6 +617,53 @@ namespace v2rayN.Handler
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int statistic(Config config, ref V2rayConfig v2rayConfig)
|
||||
{
|
||||
if (config.enableStatistics)
|
||||
{
|
||||
var tag = Global.InboundAPITagName;
|
||||
var apiObj = new Mode.API();
|
||||
var policyObj = new Mode.Policy();
|
||||
var policySystemSetting = new Mode.SystemPolicy();
|
||||
|
||||
string[] services = { "StatsService" };
|
||||
|
||||
v2rayConfig.stats = new Stats();
|
||||
|
||||
apiObj.tag = tag;
|
||||
apiObj.services = services.ToList();
|
||||
v2rayConfig.api = apiObj;
|
||||
|
||||
policySystemSetting.statsInboundDownlink = true;
|
||||
policySystemSetting.statsInboundUplink = true;
|
||||
policyObj.system = policySystemSetting;
|
||||
v2rayConfig.policy = policyObj;
|
||||
|
||||
if (!v2rayConfig.inbounds.Exists(item => { return item.tag == tag; }))
|
||||
{
|
||||
var apiInbound = new Mode.Inbounds();
|
||||
var apiInboundSettings = new Mode.Inboundsettings();
|
||||
apiInbound.tag = tag;
|
||||
apiInbound.listen = Global.Loopback;
|
||||
apiInbound.port = Global.statePort;
|
||||
apiInbound.protocol = Global.InboundAPIProtocal;
|
||||
apiInboundSettings.address = Global.Loopback;
|
||||
apiInbound.settings = apiInboundSettings;
|
||||
v2rayConfig.inbounds.Add(apiInbound);
|
||||
}
|
||||
|
||||
if (!v2rayConfig.routing.rules.Exists(item => { return item.outboundTag == tag; }))
|
||||
{
|
||||
var apiRoutingRule = new Mode.RulesItem();
|
||||
apiRoutingRule.inboundTag = tag;
|
||||
apiRoutingRule.outboundTag = tag;
|
||||
apiRoutingRule.type = "field";
|
||||
v2rayConfig.routing.rules.Add(apiRoutingRule);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生成v2ray的客户端配置文件(自定义配置)
|
||||
/// </summary>
|
||||
@@ -890,6 +964,13 @@ namespace v2rayN.Handler
|
||||
}
|
||||
}
|
||||
|
||||
//tls
|
||||
if (outbound.streamSettings != null
|
||||
&& outbound.streamSettings.security != null
|
||||
&& outbound.streamSettings.security == Global.StreamSecurity)
|
||||
{
|
||||
vmessItem.streamSecurity = Global.StreamSecurity;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -1027,6 +1108,14 @@ namespace v2rayN.Handler
|
||||
vmessItem.requestHost = Utils.List2String(inbound.streamSettings.httpSettings.host);
|
||||
}
|
||||
}
|
||||
|
||||
//tls
|
||||
if (inbound.streamSettings != null
|
||||
&& inbound.streamSettings.security != null
|
||||
&& inbound.streamSettings.security == Global.StreamSecurity)
|
||||
{
|
||||
vmessItem.streamSecurity = Global.StreamSecurity;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -1050,7 +1139,7 @@ namespace v2rayN.Handler
|
||||
try
|
||||
{
|
||||
//载入配置文件
|
||||
string result = clipboardData.Trim();// Utils.GetClipboardData();
|
||||
string result = clipboardData.TrimEx();// Utils.GetClipboardData();
|
||||
if (Utils.IsNullOrEmpty(result))
|
||||
{
|
||||
msg = UIRes.I18N("FailedReadConfiguration");
|
||||
@@ -1081,17 +1170,26 @@ namespace v2rayN.Handler
|
||||
vmessItem.network = Global.DefaultNetwork;
|
||||
vmessItem.headerType = Global.None;
|
||||
|
||||
|
||||
vmessItem.configVersion = Utils.ToInt(vmessQRCode.v);
|
||||
vmessItem.remarks = vmessQRCode.ps;
|
||||
vmessItem.address = vmessQRCode.add;
|
||||
vmessItem.remarks = Utils.ToString(vmessQRCode.ps);
|
||||
vmessItem.address = Utils.ToString(vmessQRCode.add);
|
||||
vmessItem.port = Utils.ToInt(vmessQRCode.port);
|
||||
vmessItem.id = vmessQRCode.id;
|
||||
vmessItem.id = Utils.ToString(vmessQRCode.id);
|
||||
vmessItem.alterId = Utils.ToInt(vmessQRCode.aid);
|
||||
vmessItem.network = vmessQRCode.net;
|
||||
vmessItem.headerType = vmessQRCode.type;
|
||||
vmessItem.requestHost = vmessQRCode.host;
|
||||
vmessItem.path = vmessQRCode.path;
|
||||
vmessItem.streamSecurity = vmessQRCode.tls;
|
||||
|
||||
if (!Utils.IsNullOrEmpty(vmessQRCode.net))
|
||||
{
|
||||
vmessItem.network = vmessQRCode.net;
|
||||
}
|
||||
if (!Utils.IsNullOrEmpty(vmessQRCode.type))
|
||||
{
|
||||
vmessItem.headerType = vmessQRCode.type;
|
||||
}
|
||||
|
||||
vmessItem.requestHost = Utils.ToString(vmessQRCode.host);
|
||||
vmessItem.path = Utils.ToString(vmessQRCode.path);
|
||||
vmessItem.streamSecurity = Utils.ToString(vmessQRCode.tls);
|
||||
}
|
||||
|
||||
ConfigHandler.UpgradeServerVersion(ref vmessItem);
|
||||
@@ -1159,7 +1257,7 @@ namespace v2rayN.Handler
|
||||
result = result.Substring(0, indexRemark);
|
||||
}
|
||||
//part decode
|
||||
int indexS = result.IndexOf(":");
|
||||
int indexS = result.IndexOf("@");
|
||||
if (indexS > 0)
|
||||
{
|
||||
}
|
||||
@@ -1168,15 +1266,22 @@ namespace v2rayN.Handler
|
||||
result = Utils.Base64Decode(result);
|
||||
}
|
||||
|
||||
|
||||
string[] arr21 = result.Split(':');
|
||||
int indexPort = result.LastIndexOf(":");
|
||||
string[] arr1 = result.Split('@');
|
||||
if (arr1.Length != 2)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
string[] arr21 = arr1[0].Split(':');
|
||||
//string[] arr22 = arr1[1].Split(':');
|
||||
int indexPort = arr1[1].LastIndexOf(":");
|
||||
if (arr21.Length != 2 || indexPort < 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
vmessItem.address = result.Substring(0, indexPort);
|
||||
vmessItem.port = Utils.ToInt(result.Substring(indexPort + 1, result.Length - (indexPort + 1)));
|
||||
vmessItem.address = arr1[1].Substring(0, indexPort);
|
||||
vmessItem.port = Utils.ToInt(arr1[1].Substring(indexPort + 1, arr1[1].Length - (indexPort + 1)));
|
||||
vmessItem.security = arr21[0];
|
||||
vmessItem.id = arr21[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace v2rayN.HttpProxyHandler
|
||||
{
|
||||
private static string GetTimestamp(DateTime value)
|
||||
{
|
||||
return value.ToString("yyyyMMddHHmmssfff");
|
||||
return value.ToString("MMddHHmmssfff");
|
||||
}
|
||||
|
||||
public static void ReSetPACProxy(Config config)
|
||||
|
||||
@@ -8,9 +8,9 @@ namespace v2rayN.HttpProxyHandler
|
||||
public class HttpWebServer
|
||||
{
|
||||
private HttpListener _listener;
|
||||
private Func<HttpListenerRequest, string> _responderMethod;
|
||||
private Func<string, string> _responderMethod;
|
||||
|
||||
public HttpWebServer(string[] prefixes, Func<HttpListenerRequest, string> method)
|
||||
public HttpWebServer(string[] prefixes, Func<string, string> method)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -39,10 +39,11 @@ namespace v2rayN.HttpProxyHandler
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public HttpWebServer(Func<HttpListenerRequest, string> method, params string[] prefixes)
|
||||
public HttpWebServer(Func<string, string> method, params string[] prefixes)
|
||||
: this(prefixes, method) { }
|
||||
|
||||
public void Run()
|
||||
@@ -59,8 +60,9 @@ namespace v2rayN.HttpProxyHandler
|
||||
var ctx = c as HttpListenerContext;
|
||||
try
|
||||
{
|
||||
string rstr = _responderMethod(ctx.Request);
|
||||
byte[] buf = Encoding.UTF8.GetBytes(rstr);
|
||||
string address = ctx.Request.LocalEndPoint.Address.ToString();
|
||||
string rstr = _responderMethod(address);
|
||||
byte[] buf = Encoding.ASCII.GetBytes(rstr);
|
||||
ctx.Response.StatusCode = 200;
|
||||
ctx.Response.ContentType = "application/x-ns-proxy-autoconfig";
|
||||
ctx.Response.ContentLength64 = buf.Length;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using v2rayN.Mode;
|
||||
using v2rayN.Properties;
|
||||
@@ -15,64 +15,73 @@ namespace v2rayN.HttpProxyHandler
|
||||
/// </summary>
|
||||
class PACServerHandle
|
||||
{
|
||||
private static Hashtable httpWebServer = new Hashtable();
|
||||
private static Hashtable pacList = new Hashtable();
|
||||
private static int pacPort = 0;
|
||||
private static HttpWebServer server;
|
||||
|
||||
public static void Init(Config config)
|
||||
public static bool IsRunning
|
||||
{
|
||||
InitServer("127.0.0.1");
|
||||
|
||||
if (config.allowLANConn)
|
||||
get
|
||||
{
|
||||
List<string> lstIPAddress = Utils.GetHostIPAddress();
|
||||
if (lstIPAddress.Count <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
foreach (string str in lstIPAddress)
|
||||
{
|
||||
InitServer(str);
|
||||
}
|
||||
return (server != null && pacPort > 0);
|
||||
}
|
||||
}
|
||||
|
||||
public static void InitServer(string address)
|
||||
public static void Init(Config config)
|
||||
{
|
||||
if (InitServer("*"))
|
||||
{
|
||||
pacPort = Global.pacPort;
|
||||
}
|
||||
else if (InitServer("127.0.0.1"))
|
||||
{
|
||||
pacPort = Global.pacPort;
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.SaveLog("Webserver init failed ");
|
||||
pacPort = 0;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool InitServer(string address)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!pacList.ContainsKey(address))
|
||||
if (pacPort != Global.pacPort)
|
||||
{
|
||||
pacList.Add(address, GetPacList(address));
|
||||
}
|
||||
|
||||
string prefixes = string.Format("http://{0}:{1}/pac/", address, Global.pacPort);
|
||||
Utils.SaveLog("Webserver prefixes " + prefixes);
|
||||
|
||||
HttpWebServer ws = new HttpWebServer(SendResponse, prefixes);
|
||||
ws.Run();
|
||||
|
||||
if (!httpWebServer.ContainsKey(address) && ws != null)
|
||||
{
|
||||
httpWebServer.Add(address, ws);
|
||||
if (server != null)
|
||||
{
|
||||
server.Stop();
|
||||
server = null;
|
||||
}
|
||||
|
||||
if (server == null)
|
||||
{
|
||||
string prefixes = string.Format("http://{0}:{1}/pac/", address, Global.pacPort);
|
||||
Utils.SaveLog("Webserver prefixes " + prefixes);
|
||||
|
||||
server = new HttpWebServer(SendResponse, prefixes);
|
||||
server.Run();
|
||||
|
||||
//pacPort = Global.pacPort;
|
||||
}
|
||||
}
|
||||
Utils.SaveLog("Webserver at " + address);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog("Webserver InitServer " + ex.Message);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static string SendResponse(HttpListenerRequest request)
|
||||
public static string SendResponse(string address)
|
||||
{
|
||||
try
|
||||
{
|
||||
string[] arrAddress = request.UserHostAddress.Split(':');
|
||||
string address = "127.0.0.1";
|
||||
if (arrAddress.Length > 0)
|
||||
{
|
||||
address = arrAddress[0];
|
||||
}
|
||||
return pacList[address].ToString();
|
||||
var pac = GetPacList(address);
|
||||
return pac;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -81,28 +90,41 @@ namespace v2rayN.HttpProxyHandler
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void Stop()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (httpWebServer == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
foreach (var key in httpWebServer.Keys)
|
||||
{
|
||||
Utils.SaveLog("Webserver Stop " + key.ToString());
|
||||
((HttpWebServer)httpWebServer[key]).Stop();
|
||||
}
|
||||
httpWebServer.Clear();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog("Webserver Stop " + ex.Message);
|
||||
}
|
||||
//try
|
||||
//{
|
||||
// if (server != null)
|
||||
// {
|
||||
// server.Stop();
|
||||
// server = null;
|
||||
// }
|
||||
//}
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
// Utils.SaveLog("Webserver Stop " + ex.Message);
|
||||
//}
|
||||
|
||||
//try
|
||||
//{
|
||||
// if (httpWebServer == null)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// foreach (var key in httpWebServer.Keys)
|
||||
// {
|
||||
// Utils.SaveLog("Webserver Stop " + key.ToString());
|
||||
// ((HttpWebServer)httpWebServer[key]).Stop();
|
||||
// }
|
||||
// httpWebServer.Clear();
|
||||
//}
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
// Utils.SaveLog("Webserver Stop " + ex.Message);
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
private static string GetPacList(string address)
|
||||
{
|
||||
var port = Global.sysAgentPort;
|
||||
@@ -126,8 +148,10 @@ namespace v2rayN.HttpProxyHandler
|
||||
return pac;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
{
|
||||
}
|
||||
return "No pac content";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
187
v2rayN/v2rayN/HttpProxyHandler/ProxySetting.cs
Normal file
187
v2rayN/v2rayN/HttpProxyHandler/ProxySetting.cs
Normal file
@@ -0,0 +1,187 @@
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace v2rayN.HttpProxyHandler
|
||||
{
|
||||
class ProxySetting
|
||||
{
|
||||
public static bool UnsetProxy()
|
||||
{
|
||||
return SetProxy(null, null);
|
||||
}
|
||||
public static bool SetProxy(string strProxy)
|
||||
{
|
||||
return SetProxy(strProxy, null);
|
||||
}
|
||||
|
||||
public static bool SetProxy(string strProxy, string exceptions)
|
||||
{
|
||||
InternetPerConnOptionList list = new InternetPerConnOptionList();
|
||||
|
||||
int optionCount = Utils.IsNullOrEmpty(strProxy) ? 1 : (Utils.IsNullOrEmpty(exceptions) ? 2 : 3);
|
||||
InternetConnectionOption[] options = new InternetConnectionOption[optionCount];
|
||||
// USE a proxy server ...
|
||||
options[0].m_Option = PerConnOption.INTERNET_PER_CONN_FLAGS;
|
||||
options[0].m_Value.m_Int = (int)((optionCount < 2) ? PerConnFlags.PROXY_TYPE_DIRECT : (PerConnFlags.PROXY_TYPE_DIRECT | PerConnFlags.PROXY_TYPE_PROXY));
|
||||
// use THIS proxy server
|
||||
if (optionCount > 1)
|
||||
{
|
||||
options[1].m_Option = PerConnOption.INTERNET_PER_CONN_PROXY_SERVER;
|
||||
options[1].m_Value.m_StringPtr = Marshal.StringToHGlobalAuto(strProxy);
|
||||
// except for these addresses ...
|
||||
if (optionCount > 2)
|
||||
{
|
||||
options[2].m_Option = PerConnOption.INTERNET_PER_CONN_PROXY_BYPASS;
|
||||
options[2].m_Value.m_StringPtr = Marshal.StringToHGlobalAuto(exceptions);
|
||||
}
|
||||
}
|
||||
|
||||
// default stuff
|
||||
list.dwSize = Marshal.SizeOf(list);
|
||||
list.szConnection = IntPtr.Zero;
|
||||
list.dwOptionCount = options.Length;
|
||||
list.dwOptionError = 0;
|
||||
|
||||
|
||||
int optSize = Marshal.SizeOf(typeof(InternetConnectionOption));
|
||||
// make a pointer out of all that ...
|
||||
IntPtr optionsPtr = Marshal.AllocCoTaskMem(optSize * options.Length);
|
||||
// copy the array over into that spot in memory ...
|
||||
for (int i = 0; i < options.Length; ++i)
|
||||
{
|
||||
IntPtr opt = new IntPtr(optionsPtr.ToInt32() + (i * optSize));
|
||||
Marshal.StructureToPtr(options[i], opt, false);
|
||||
}
|
||||
|
||||
list.options = optionsPtr;
|
||||
|
||||
// and then make a pointer out of the whole list
|
||||
IntPtr ipcoListPtr = Marshal.AllocCoTaskMem((Int32)list.dwSize);
|
||||
Marshal.StructureToPtr(list, ipcoListPtr, false);
|
||||
|
||||
// and finally, call the API method!
|
||||
int returnvalue = NativeMethods.InternetSetOption(IntPtr.Zero,
|
||||
InternetOption.INTERNET_OPTION_PER_CONNECTION_OPTION,
|
||||
ipcoListPtr, list.dwSize) ? -1 : 0;
|
||||
if (returnvalue == 0)
|
||||
{ // get the error codes, they might be helpful
|
||||
returnvalue = Marshal.GetLastWin32Error();
|
||||
}
|
||||
// FREE the data ASAP
|
||||
Marshal.FreeCoTaskMem(optionsPtr);
|
||||
Marshal.FreeCoTaskMem(ipcoListPtr);
|
||||
if (returnvalue > 0)
|
||||
{ // throw the error codes, they might be helpful
|
||||
//throw new Win32Exception(Marshal.GetLastWin32Error());
|
||||
}
|
||||
|
||||
return (returnvalue < 0);
|
||||
}
|
||||
|
||||
|
||||
#region WinInet structures
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||
public struct InternetPerConnOptionList
|
||||
{
|
||||
public int dwSize; // size of the INTERNET_PER_CONN_OPTION_LIST struct
|
||||
public IntPtr szConnection; // connection name to set/query options
|
||||
public int dwOptionCount; // number of options to set/query
|
||||
public int dwOptionError; // on error, which option failed
|
||||
//[MarshalAs(UnmanagedType.)]
|
||||
public IntPtr options;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||
public struct InternetConnectionOption
|
||||
{
|
||||
static readonly int Size;
|
||||
public PerConnOption m_Option;
|
||||
public InternetConnectionOptionValue m_Value;
|
||||
static InternetConnectionOption()
|
||||
{
|
||||
InternetConnectionOption.Size = Marshal.SizeOf(typeof(InternetConnectionOption));
|
||||
}
|
||||
|
||||
// Nested Types
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
public struct InternetConnectionOptionValue
|
||||
{
|
||||
// Fields
|
||||
[FieldOffset(0)]
|
||||
public System.Runtime.InteropServices.ComTypes.FILETIME m_FileTime;
|
||||
[FieldOffset(0)]
|
||||
public int m_Int;
|
||||
[FieldOffset(0)]
|
||||
public IntPtr m_StringPtr;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region WinInet enums
|
||||
//
|
||||
// options manifests for Internet{Query|Set}Option
|
||||
//
|
||||
public enum InternetOption : uint
|
||||
{
|
||||
INTERNET_OPTION_PER_CONNECTION_OPTION = 75
|
||||
}
|
||||
|
||||
//
|
||||
// Options used in INTERNET_PER_CONN_OPTON struct
|
||||
//
|
||||
public enum PerConnOption
|
||||
{
|
||||
INTERNET_PER_CONN_FLAGS = 1, // Sets or retrieves the connection type. The Value member will contain one or more of the values from PerConnFlags
|
||||
INTERNET_PER_CONN_PROXY_SERVER = 2, // Sets or retrieves a string containing the proxy servers.
|
||||
INTERNET_PER_CONN_PROXY_BYPASS = 3, // Sets or retrieves a string containing the URLs that do not use the proxy server.
|
||||
INTERNET_PER_CONN_AUTOCONFIG_URL = 4//, // Sets or retrieves a string containing the URL to the automatic configuration script.
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// PER_CONN_FLAGS
|
||||
//
|
||||
[Flags]
|
||||
public enum PerConnFlags
|
||||
{
|
||||
PROXY_TYPE_DIRECT = 0x00000001, // direct to net
|
||||
PROXY_TYPE_PROXY = 0x00000002, // via named proxy
|
||||
PROXY_TYPE_AUTO_PROXY_URL = 0x00000004, // autoproxy URL
|
||||
PROXY_TYPE_AUTO_DETECT = 0x00000008 // use autoproxy detection
|
||||
}
|
||||
#endregion
|
||||
|
||||
internal static class NativeMethods
|
||||
{
|
||||
[DllImport("WinInet.dll", SetLastError = true, CharSet = CharSet.Auto)]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static extern bool InternetSetOption(IntPtr hInternet, InternetOption dwOption, IntPtr lpBuffer, int dwBufferLength);
|
||||
}
|
||||
|
||||
//判断是否使用代理
|
||||
public static bool UsedProxy()
|
||||
{
|
||||
RegistryKey rk = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Internet Settings", true);
|
||||
if (rk.GetValue("ProxyEnable").ToString() == "1")
|
||||
{
|
||||
rk.Close();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
rk.Close();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//获得代理的IP和端口
|
||||
public static string GetProxyProxyServer()
|
||||
{
|
||||
RegistryKey rk = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Internet Settings", true);
|
||||
string ProxyServer = rk.GetValue("ProxyServer").ToString();
|
||||
rk.Close();
|
||||
return ProxyServer;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
v2rayN/v2rayN/LIB/Google.Protobuf.dll
Normal file
BIN
v2rayN/v2rayN/LIB/Google.Protobuf.dll
Normal file
Binary file not shown.
BIN
v2rayN/v2rayN/LIB/Grpc.Core.Api.dll
Normal file
BIN
v2rayN/v2rayN/LIB/Grpc.Core.Api.dll
Normal file
Binary file not shown.
BIN
v2rayN/v2rayN/LIB/Grpc.Core.dll
Normal file
BIN
v2rayN/v2rayN/LIB/Grpc.Core.dll
Normal file
Binary file not shown.
BIN
v2rayN/v2rayN/LIB/System.Buffers.dll
Normal file
BIN
v2rayN/v2rayN/LIB/System.Buffers.dll
Normal file
Binary file not shown.
BIN
v2rayN/v2rayN/LIB/System.Memory.dll
Normal file
BIN
v2rayN/v2rayN/LIB/System.Memory.dll
Normal file
Binary file not shown.
BIN
v2rayN/v2rayN/LIB/System.Runtime.CompilerServices.Unsafe.dll
Normal file
BIN
v2rayN/v2rayN/LIB/System.Runtime.CompilerServices.Unsafe.dll
Normal file
Binary file not shown.
BIN
v2rayN/v2rayN/LIB/grpc_csharp_ext.x64.dll
Normal file
BIN
v2rayN/v2rayN/LIB/grpc_csharp_ext.x64.dll
Normal file
Binary file not shown.
BIN
v2rayN/v2rayN/LIB/grpc_csharp_ext.x86.dll
Normal file
BIN
v2rayN/v2rayN/LIB/grpc_csharp_ext.x86.dll
Normal file
Binary file not shown.
BIN
v2rayN/v2rayN/LIB/netstandard.dll
Normal file
BIN
v2rayN/v2rayN/LIB/netstandard.dll
Normal file
Binary file not shown.
@@ -91,6 +91,32 @@ namespace v2rayN.Mode
|
||||
/// </summary>
|
||||
public bool allowLANConn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 启用实时网速和流量统计
|
||||
/// </summary>
|
||||
public bool enableStatistics { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 视图刷新率
|
||||
/// </summary>
|
||||
public int statisticsFreshRate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 统计数据缓存天数 [0, 30]
|
||||
/// * 0 关闭单独每天使用流量的缓存
|
||||
/// * 无论如何不会关闭总流量的缓存
|
||||
/// </summary>
|
||||
private uint cacheDays;
|
||||
public uint CacheDays {
|
||||
get { return cacheDays; }
|
||||
set
|
||||
{
|
||||
if (value < 0) cacheDays = 0;
|
||||
else if (value > 30) cacheDays = 30;
|
||||
else cacheDays = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 自定义远程DNS
|
||||
/// </summary>
|
||||
@@ -112,7 +138,7 @@ namespace v2rayN.Mode
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
return vmess[index].address;
|
||||
return vmess[index].address.TrimEx();
|
||||
}
|
||||
|
||||
public int port()
|
||||
@@ -130,7 +156,7 @@ namespace v2rayN.Mode
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
return vmess[index].id;
|
||||
return vmess[index].id.TrimEx();
|
||||
}
|
||||
|
||||
public int alterId()
|
||||
@@ -148,7 +174,7 @@ namespace v2rayN.Mode
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
return vmess[index].security;
|
||||
return vmess[index].security.TrimEx();
|
||||
}
|
||||
|
||||
public string remarks()
|
||||
@@ -157,7 +183,7 @@ namespace v2rayN.Mode
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
return vmess[index].remarks;
|
||||
return vmess[index].remarks.TrimEx();
|
||||
}
|
||||
public string network()
|
||||
{
|
||||
@@ -165,7 +191,7 @@ namespace v2rayN.Mode
|
||||
{
|
||||
return Global.DefaultNetwork;
|
||||
}
|
||||
return vmess[index].network;
|
||||
return vmess[index].network.TrimEx();
|
||||
}
|
||||
public string headerType()
|
||||
{
|
||||
@@ -173,7 +199,7 @@ namespace v2rayN.Mode
|
||||
{
|
||||
return Global.None;
|
||||
}
|
||||
return vmess[index].headerType.Replace(" ", "").Trim();
|
||||
return vmess[index].headerType.Replace(" ", "").TrimEx();
|
||||
}
|
||||
public string requestHost()
|
||||
{
|
||||
@@ -181,7 +207,7 @@ namespace v2rayN.Mode
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
return vmess[index].requestHost.Replace(" ", "").Trim();
|
||||
return vmess[index].requestHost.Replace(" ", "").TrimEx();
|
||||
}
|
||||
public string path()
|
||||
{
|
||||
@@ -189,7 +215,7 @@ namespace v2rayN.Mode
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
return vmess[index].path.Replace(" ", "").Trim();
|
||||
return vmess[index].path.Replace(" ", "").TrimEx();
|
||||
}
|
||||
public string streamSecurity()
|
||||
{
|
||||
|
||||
35
v2rayN/v2rayN/Mode/ServerStatistics.cs
Normal file
35
v2rayN/v2rayN/Mode/ServerStatistics.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace v2rayN.Mode
|
||||
{
|
||||
class ServerStatistics
|
||||
{
|
||||
public string name;
|
||||
public string address;
|
||||
public int port;
|
||||
public string path;
|
||||
public string host;
|
||||
public ulong totalUp;
|
||||
public ulong totalDown;
|
||||
public ulong todayUp;
|
||||
public ulong todayDown;
|
||||
|
||||
public ServerStatistics() { }
|
||||
public ServerStatistics(string name, string addr, int port, string path, string host, ulong totalUp, ulong totalDown, ulong todayUp, ulong todayDown)
|
||||
{
|
||||
this.name = name;
|
||||
this.address = addr;
|
||||
this.port = port;
|
||||
this.path = path;
|
||||
this.host = host;
|
||||
this.totalUp = totalUp;
|
||||
this.totalDown = totalDown;
|
||||
this.todayUp = todayUp;
|
||||
this.todayDown = todayDown;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,17 @@ namespace v2rayN.Mode
|
||||
/// </summary>
|
||||
public List<Outbounds> outbounds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 统计需要, 空对象
|
||||
/// </summary>
|
||||
public Stats stats { get; set; }
|
||||
|
||||
/// </summary>
|
||||
public API api { get; set; }
|
||||
|
||||
/// </summary>
|
||||
public Policy policy;
|
||||
|
||||
/// <summary>
|
||||
/// DNS 配置
|
||||
/// </summary>
|
||||
@@ -31,6 +42,25 @@ namespace v2rayN.Mode
|
||||
public Routing routing { get; set; }
|
||||
}
|
||||
|
||||
public class Stats { };
|
||||
|
||||
public class API
|
||||
{
|
||||
public string tag { get; set; }
|
||||
public List<string> services { get; set; }
|
||||
}
|
||||
|
||||
public class Policy
|
||||
{
|
||||
public SystemPolicy system;
|
||||
}
|
||||
|
||||
public class SystemPolicy
|
||||
{
|
||||
public bool statsInboundUplink;
|
||||
public bool statsInboundDownlink;
|
||||
}
|
||||
|
||||
public class Log
|
||||
{
|
||||
/// <summary>
|
||||
@@ -49,6 +79,7 @@ namespace v2rayN.Mode
|
||||
|
||||
public class Inbounds
|
||||
{
|
||||
public string tag { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -92,6 +123,11 @@ namespace v2rayN.Mode
|
||||
/// </summary>
|
||||
public string ip { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// api 使用
|
||||
/// </summary>
|
||||
public string address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -215,8 +251,30 @@ namespace v2rayN.Mode
|
||||
///
|
||||
/// </summary>
|
||||
public int level { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<SocksUsersItem> users { get; set; }
|
||||
}
|
||||
|
||||
public class SocksUsersItem
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string user { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string pass { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int level { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class Mux
|
||||
{
|
||||
/// <summary>
|
||||
@@ -251,6 +309,8 @@ namespace v2rayN.Mode
|
||||
///
|
||||
/// </summary>
|
||||
public string port { get; set; }
|
||||
|
||||
public string inboundTag { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
@@ -8,46 +8,46 @@ namespace v2rayN.Mode
|
||||
/// <summary>
|
||||
/// 版本
|
||||
/// </summary>
|
||||
public string v { get; set; }
|
||||
public string v { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string ps { get; set; }
|
||||
public string ps { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 远程服务器地址
|
||||
/// </summary>
|
||||
public string add { get; set; }
|
||||
public string add { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 远程服务器端口
|
||||
/// </summary>
|
||||
public string port { get; set; }
|
||||
public string port { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 远程服务器ID
|
||||
/// </summary>
|
||||
public string id { get; set; }
|
||||
public string id { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 远程服务器额外ID
|
||||
/// </summary>
|
||||
public string aid { get; set; }
|
||||
public string aid { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 传输协议tcp,kcp,ws
|
||||
/// </summary>
|
||||
public string net { get; set; }
|
||||
public string net { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 伪装类型
|
||||
/// </summary>
|
||||
public string type { get; set; }
|
||||
public string type { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 伪装的域名
|
||||
/// </summary>
|
||||
public string host { get; set; }
|
||||
public string host { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// path
|
||||
/// </summary>
|
||||
public string path { get; set; }
|
||||
public string path { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 底层传输安全
|
||||
/// </summary>
|
||||
public string tls { get; set; }
|
||||
}
|
||||
public string tls { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace v2rayN
|
||||
|
||||
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
|
||||
|
||||
|
||||
Process instance = RunningInstance();
|
||||
if (instance == null)
|
||||
{
|
||||
@@ -43,7 +44,7 @@ namespace v2rayN
|
||||
}
|
||||
else
|
||||
{
|
||||
UI.Show("v2rayN is already running(v2rayN已经运行)");
|
||||
UI.Show($"v2rayN is already running(v2rayN已经运行)");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +52,7 @@ namespace v2rayN
|
||||
{
|
||||
try
|
||||
{
|
||||
string resourceName = "v2rayN." + new AssemblyName(args.Name).Name + ".dll";
|
||||
string resourceName = "v2rayN.LIB." + new AssemblyName(args.Name).Name + ".dll";
|
||||
using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))
|
||||
{
|
||||
if (stream == null)
|
||||
|
||||
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("v2rayN")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2018")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -33,4 +33,4 @@ using System.Runtime.InteropServices;
|
||||
// 方法是按如下所示使用“*”:
|
||||
//[assembly: AssemblyVersion("1.0.*")]
|
||||
//[assembly: AssemblyVersion("1.0.0")]
|
||||
[assembly: AssemblyFileVersion("2.30")]
|
||||
[assembly: AssemblyFileVersion("2.41")]
|
||||
|
||||
53
v2rayN/v2rayN/Protos/Statistics.proto
Normal file
53
v2rayN/v2rayN/Protos/Statistics.proto
Normal file
@@ -0,0 +1,53 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package v2ray.core.app.stats.command;
|
||||
option csharp_namespace = "v2rayN.Protos.Statistics";
|
||||
|
||||
message GetStatsRequest {
|
||||
// Name of the stat counter.
|
||||
string name = 1;
|
||||
// Whether or not to reset the counter to fetching its value.
|
||||
bool reset = 2;
|
||||
}
|
||||
|
||||
message Stat {
|
||||
string name = 1;
|
||||
int64 value = 2;
|
||||
}
|
||||
|
||||
message GetStatsResponse {
|
||||
Stat stat = 1;
|
||||
}
|
||||
|
||||
message QueryStatsRequest {
|
||||
string pattern = 1;
|
||||
bool reset = 2;
|
||||
}
|
||||
|
||||
message QueryStatsResponse {
|
||||
repeated Stat stat = 1;
|
||||
}
|
||||
|
||||
message SysStatsRequest {
|
||||
}
|
||||
|
||||
message SysStatsResponse {
|
||||
uint32 NumGoroutine = 1;
|
||||
uint32 NumGC = 2;
|
||||
uint64 Alloc = 3;
|
||||
uint64 TotalAlloc = 4;
|
||||
uint64 Sys = 5;
|
||||
uint64 Mallocs = 6;
|
||||
uint64 Frees = 7;
|
||||
uint64 LiveObjects = 8;
|
||||
uint64 PauseTotalNs = 9;
|
||||
uint32 Uptime = 10;
|
||||
}
|
||||
|
||||
service StatsService {
|
||||
rpc GetStats(GetStatsRequest) returns (GetStatsResponse) {}
|
||||
rpc QueryStats(QueryStatsRequest) returns (QueryStatsResponse) {}
|
||||
rpc GetSysStats(SysStatsRequest) returns (SysStatsResponse) {}
|
||||
}
|
||||
|
||||
message Config {}
|
||||
85
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
85
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
@@ -19,7 +19,7 @@ namespace v2rayN.Resx {
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class ResUI {
|
||||
@@ -47,7 +47,7 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 使用此强类型资源类,为所有资源查找
|
||||
/// 重写当前线程的 CurrentUICulture 属性
|
||||
/// 重写当前线程的 CurrentUICulture 属性。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
@@ -105,6 +105,15 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 DOWN 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string downloadSpeed {
|
||||
get {
|
||||
return ResourceManager.GetString("downloadSpeed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Whether to download? {0} 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -321,6 +330,42 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Today download traffic 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string LvTodayDownloadDataAmount {
|
||||
get {
|
||||
return ResourceManager.GetString("LvTodayDownloadDataAmount", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Today upload traffic 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string LvTodayUploadDataAmount {
|
||||
get {
|
||||
return ResourceManager.GetString("LvTodayUploadDataAmount", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Total download traffic 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string LvTotalDownloadDataAmount {
|
||||
get {
|
||||
return ResourceManager.GetString("LvTotalDownloadDataAmount", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Total upload traffic 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string LvTotalUploadDataAmount {
|
||||
get {
|
||||
return ResourceManager.GetString("LvTotalUploadDataAmount", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Transport 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -330,6 +375,15 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 MediumFresh 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string MediumFresh {
|
||||
get {
|
||||
return ResourceManager.GetString("MediumFresh", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Clear original subscription content 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -582,6 +636,15 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 QuickFresh 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string QuickFresh {
|
||||
get {
|
||||
return ResourceManager.GetString("QuickFresh", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Are you sure to remove the server? 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -609,6 +672,15 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 SlowFresh 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string SlowFresh {
|
||||
get {
|
||||
return ResourceManager.GetString("SlowFresh", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Note: After this function relies on the Http global proxy test, please manually adjust the Http global proxy and active node! 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -618,6 +690,15 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 PAC failed to start. Pls with an administrator. 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string StartPacFailed {
|
||||
get {
|
||||
return ResourceManager.GetString("StartPacFailed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Start service ({0})...... 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -319,4 +319,31 @@
|
||||
<data name="MsgUpdateV2rayCoreSuccessfullyMore" xml:space="preserve">
|
||||
<value>Update V2rayCore successfully! Restarting service...</value>
|
||||
</data>
|
||||
<data name="MediumFresh" xml:space="preserve">
|
||||
<value>MediumFresh</value>
|
||||
</data>
|
||||
<data name="QuickFresh" xml:space="preserve">
|
||||
<value>QuickFresh</value>
|
||||
</data>
|
||||
<data name="SlowFresh" xml:space="preserve">
|
||||
<value>SlowFresh</value>
|
||||
</data>
|
||||
<data name="downloadSpeed" xml:space="preserve">
|
||||
<value>DOWN</value>
|
||||
</data>
|
||||
<data name="LvTodayDownloadDataAmount" xml:space="preserve">
|
||||
<value>Today download traffic</value>
|
||||
</data>
|
||||
<data name="LvTodayUploadDataAmount" xml:space="preserve">
|
||||
<value>Today upload traffic</value>
|
||||
</data>
|
||||
<data name="LvTotalDownloadDataAmount" xml:space="preserve">
|
||||
<value>Total download traffic</value>
|
||||
</data>
|
||||
<data name="LvTotalUploadDataAmount" xml:space="preserve">
|
||||
<value>Total upload traffic</value>
|
||||
</data>
|
||||
<data name="StartPacFailed" xml:space="preserve">
|
||||
<value>PAC failed to start. Pls with an administrator.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -319,4 +319,31 @@
|
||||
<data name="MsgUpdateV2rayCoreSuccessfullyMore" xml:space="preserve">
|
||||
<value>更新V2rayCore成功!正在重启服务...</value>
|
||||
</data>
|
||||
<data name="MediumFresh" xml:space="preserve">
|
||||
<value>中等</value>
|
||||
</data>
|
||||
<data name="QuickFresh" xml:space="preserve">
|
||||
<value>快</value>
|
||||
</data>
|
||||
<data name="SlowFresh" xml:space="preserve">
|
||||
<value>慢</value>
|
||||
</data>
|
||||
<data name="downloadSpeed" xml:space="preserve">
|
||||
<value>下载</value>
|
||||
</data>
|
||||
<data name="LvTodayDownloadDataAmount" xml:space="preserve">
|
||||
<value>今日下载</value>
|
||||
</data>
|
||||
<data name="LvTodayUploadDataAmount" xml:space="preserve">
|
||||
<value>今日上传</value>
|
||||
</data>
|
||||
<data name="LvTotalDownloadDataAmount" xml:space="preserve">
|
||||
<value>总下载</value>
|
||||
</data>
|
||||
<data name="LvTotalUploadDataAmount" xml:space="preserve">
|
||||
<value>总上传</value>
|
||||
</data>
|
||||
<data name="StartPacFailed" xml:space="preserve">
|
||||
<value>PAC服务启动失败,请用管理员启动</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,25 +1,33 @@
|
||||
{
|
||||
{
|
||||
"log": {
|
||||
"access": "",
|
||||
"error": "",
|
||||
"loglevel": "error"
|
||||
},
|
||||
"log": {
|
||||
"access": "Vaccess.log",
|
||||
"error": "Verror.log",
|
||||
"loglevel": "warning"
|
||||
},
|
||||
"inbounds": [{
|
||||
"port": 10808,
|
||||
"protocol": "socks",
|
||||
"listen": "127.0.0.1",
|
||||
"settings": {
|
||||
"auth": "noauth",
|
||||
"udp": true
|
||||
},
|
||||
"sniffing": {
|
||||
"enabled": true,
|
||||
"destOverride": [
|
||||
"http",
|
||||
"tls"
|
||||
]
|
||||
"inbounds": [
|
||||
{
|
||||
"tag": "proxy",
|
||||
"port": 10808,
|
||||
"protocol": "socks",
|
||||
"listen": "127.0.0.1",
|
||||
"settings": {
|
||||
"auth": "noauth",
|
||||
"udp": true
|
||||
},
|
||||
"sniffing": {
|
||||
"enabled": true,
|
||||
"destOverride": [
|
||||
"http",
|
||||
"tls"
|
||||
]
|
||||
}
|
||||
}
|
||||
}],
|
||||
],
|
||||
"outbounds": [{
|
||||
"tag": "proxy",
|
||||
"protocol": "vmess",
|
||||
@@ -66,6 +74,12 @@
|
||||
],
|
||||
"routing": {
|
||||
"domainStrategy": "IPIfNonMatch",
|
||||
"rules": []
|
||||
"rules": [
|
||||
{
|
||||
"inboundTag": "api",
|
||||
"outboundTag": "api",
|
||||
"type": "field"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -43,5 +43,10 @@ namespace v2rayN
|
||||
yield return line;
|
||||
}
|
||||
}
|
||||
|
||||
public static string TrimEx(this string value)
|
||||
{
|
||||
return value == null ? string.Empty : value.Trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ using System.Drawing;
|
||||
using ZXing;
|
||||
using ZXing.Common;
|
||||
using ZXing.QrCode;
|
||||
using System.Security.Principal;
|
||||
|
||||
namespace v2rayN
|
||||
{
|
||||
@@ -211,7 +212,7 @@ namespace v2rayN
|
||||
{
|
||||
try
|
||||
{
|
||||
plainText = plainText.Trim()
|
||||
plainText = plainText.TrimEx()
|
||||
.Replace("\n", "")
|
||||
.Replace("\r\n", "")
|
||||
.Replace("\r", "")
|
||||
@@ -249,6 +250,89 @@ namespace v2rayN
|
||||
}
|
||||
}
|
||||
|
||||
public static string ToString(object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
return (obj == null ? string.Empty : obj.ToString());
|
||||
}
|
||||
catch
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// byte 转成 有两位小数点的 方便阅读的数据
|
||||
/// 比如 2.50 MB
|
||||
/// </summary>
|
||||
/// <param name="amount">bytes</param>
|
||||
/// <param name="result">转换之后的数据</param>
|
||||
/// <param name="unit">单位</param>
|
||||
public static void ToHumanReadable(ulong amount, out double result, out string unit)
|
||||
{
|
||||
var factor = 1024u;
|
||||
var KBs = amount / factor;
|
||||
if (KBs > 0)
|
||||
{
|
||||
// multi KB
|
||||
var MBs = KBs / factor;
|
||||
if (MBs > 0)
|
||||
{
|
||||
// multi MB
|
||||
var GBs = MBs / factor;
|
||||
if (GBs > 0)
|
||||
{
|
||||
// multi GB
|
||||
var 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;
|
||||
}
|
||||
result = MBs + KBs % factor / (factor + 0.0);
|
||||
unit = "MB";
|
||||
return;
|
||||
}
|
||||
result = KBs + amount % factor / (factor + 0.0);
|
||||
unit = "KB";
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = amount;
|
||||
unit = "B";
|
||||
}
|
||||
}
|
||||
|
||||
public static string HumanFy(ulong amount)
|
||||
{
|
||||
double result;
|
||||
string unit;
|
||||
ToHumanReadable(amount, out result, out unit);
|
||||
return $"{string.Format("{0:f1}", result)}{unit}";
|
||||
}
|
||||
|
||||
public static void DedupServerList(List<Mode.VmessItem> source, out List<Mode.VmessItem> result)
|
||||
{
|
||||
var list = new List<Mode.VmessItem>();
|
||||
foreach (var item in source)
|
||||
{
|
||||
if (!list.Exists(i => item.address == i.address && item.port == i.port && item.path == i.path))
|
||||
{
|
||||
list.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
result = list;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -303,7 +387,7 @@ namespace v2rayN
|
||||
}
|
||||
|
||||
//清除要验证字符串中的空格
|
||||
//ip = ip.Trim();
|
||||
//ip = ip.TrimEx();
|
||||
//可能是CIDR
|
||||
if (ip.IndexOf(@"/") > 0)
|
||||
{
|
||||
@@ -339,7 +423,7 @@ namespace v2rayN
|
||||
}
|
||||
|
||||
//清除要验证字符串中的空格
|
||||
//domain = domain.Trim();
|
||||
//domain = domain.TrimEx();
|
||||
|
||||
//模式字符串
|
||||
string pattern = @"^(?=^.{3,255}$)[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$";
|
||||
@@ -358,6 +442,15 @@ namespace v2rayN
|
||||
return Regex.IsMatch(input, pattern, RegexOptions.IgnoreCase);
|
||||
}
|
||||
|
||||
public static bool IsIdenticalServer(Mode.ServerStatistics a, Mode.ServerStatistics b)
|
||||
{
|
||||
return (a.address == b.address
|
||||
&& a.port == b.port
|
||||
&& a.path == b.path
|
||||
&& a.host == b.host
|
||||
);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 开机自动启动
|
||||
@@ -671,6 +764,25 @@ namespace v2rayN
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// IsAdministrator
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static bool IsAdministrator()
|
||||
{
|
||||
try
|
||||
{
|
||||
WindowsIdentity current = WindowsIdentity.GetCurrent();
|
||||
WindowsPrincipal windowsPrincipal = new WindowsPrincipal(current);
|
||||
//WindowsBuiltInRole可以枚举出很多权限,例如系统用户、User、Guest等等
|
||||
return windowsPrincipal.IsInRole(WindowsBuiltInRole.Administrator);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region TempPath
|
||||
|
||||
BIN
v2rayN/v2rayN/grpc_csharp_ext.x64.dll
Normal file
BIN
v2rayN/v2rayN/grpc_csharp_ext.x64.dll
Normal file
Binary file not shown.
BIN
v2rayN/v2rayN/grpc_csharp_ext.x86.dll
Normal file
BIN
v2rayN/v2rayN/grpc_csharp_ext.x86.dll
Normal file
Binary file not shown.
4
v2rayN/v2rayN/packages.config
Normal file
4
v2rayN/v2rayN/packages.config
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Grpc.Tools" version="2.23.0" targetFramework="net46" developmentDependency="true" />
|
||||
</packages>
|
||||
@@ -1,560 +0,0 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: command.proto
|
||||
#pragma warning disable 1591, 0612, 3021
|
||||
#region Designer generated code
|
||||
|
||||
using pb = global::Google.Protobuf;
|
||||
using pbc = global::Google.Protobuf.Collections;
|
||||
using pbr = global::Google.Protobuf.Reflection;
|
||||
using scg = global::System.Collections.Generic;
|
||||
namespace V2Ray.Core.App.Stats.Command {
|
||||
|
||||
/// <summary>Holder for reflection information generated from command.proto</summary>
|
||||
public static partial class CommandReflection {
|
||||
|
||||
#region Descriptor
|
||||
/// <summary>File descriptor for command.proto</summary>
|
||||
public static pbr::FileDescriptor Descriptor {
|
||||
get { return descriptor; }
|
||||
}
|
||||
private static pbr::FileDescriptor descriptor;
|
||||
|
||||
static CommandReflection() {
|
||||
byte[] descriptorData = global::System.Convert.FromBase64String(
|
||||
string.Concat(
|
||||
"Cg1jb21tYW5kLnByb3RvEhx2MnJheS5jb3JlLmFwcC5zdGF0cy5jb21tYW5k",
|
||||
"Ii4KD0dldFN0YXRzUmVxdWVzdBIMCgRuYW1lGAEgASgJEg0KBXJlc2V0GAIg",
|
||||
"ASgIIiMKBFN0YXQSDAoEbmFtZRgBIAEoCRINCgV2YWx1ZRgCIAEoAyJEChBH",
|
||||
"ZXRTdGF0c1Jlc3BvbnNlEjAKBHN0YXQYASABKAsyIi52MnJheS5jb3JlLmFw",
|
||||
"cC5zdGF0cy5jb21tYW5kLlN0YXQiCAoGQ29uZmlnMnsKDFN0YXRzU2Vydmlj",
|
||||
"ZRJrCghHZXRTdGF0cxItLnYycmF5LmNvcmUuYXBwLnN0YXRzLmNvbW1hbmQu",
|
||||
"R2V0U3RhdHNSZXF1ZXN0Gi4udjJyYXkuY29yZS5hcHAuc3RhdHMuY29tbWFu",
|
||||
"ZC5HZXRTdGF0c1Jlc3BvbnNlIgBCTAogY29tLnYycmF5LmNvcmUuYXBwLnN0",
|
||||
"YXRzLmNvbW1hbmRQAVoHY29tbWFuZKoCHFYyUmF5LkNvcmUuQXBwLlN0YXRz",
|
||||
"LkNvbW1hbmRiBnByb3RvMw=="));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { },
|
||||
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::V2Ray.Core.App.Stats.Command.GetStatsRequest), global::V2Ray.Core.App.Stats.Command.GetStatsRequest.Parser, new[]{ "Name", "Reset" }, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::V2Ray.Core.App.Stats.Command.Stat), global::V2Ray.Core.App.Stats.Command.Stat.Parser, new[]{ "Name", "Value" }, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::V2Ray.Core.App.Stats.Command.GetStatsResponse), global::V2Ray.Core.App.Stats.Command.GetStatsResponse.Parser, new[]{ "Stat" }, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::V2Ray.Core.App.Stats.Command.Config), global::V2Ray.Core.App.Stats.Command.Config.Parser, null, null, null, null)
|
||||
}));
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
#region Messages
|
||||
public sealed partial class GetStatsRequest : pb::IMessage<GetStatsRequest> {
|
||||
private static readonly pb::MessageParser<GetStatsRequest> _parser = new pb::MessageParser<GetStatsRequest>(() => new GetStatsRequest());
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public static pb::MessageParser<GetStatsRequest> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::V2Ray.Core.App.Stats.Command.CommandReflection.Descriptor.MessageTypes[0]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public GetStatsRequest() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public GetStatsRequest(GetStatsRequest other) : this() {
|
||||
name_ = other.name_;
|
||||
reset_ = other.reset_;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public GetStatsRequest Clone() {
|
||||
return new GetStatsRequest(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "name" field.</summary>
|
||||
public const int NameFieldNumber = 1;
|
||||
private string name_ = "";
|
||||
/// <summary>
|
||||
/// Name of the stat counter.
|
||||
/// </summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public string Name {
|
||||
get { return name_; }
|
||||
set {
|
||||
name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "reset" field.</summary>
|
||||
public const int ResetFieldNumber = 2;
|
||||
private bool reset_;
|
||||
/// <summary>
|
||||
/// Whether or not to reset the counter to fetching its value.
|
||||
/// </summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public bool Reset {
|
||||
get { return reset_; }
|
||||
set {
|
||||
reset_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as GetStatsRequest);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public bool Equals(GetStatsRequest other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (Name != other.Name) return false;
|
||||
if (Reset != other.Reset) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
if (Name.Length != 0) hash ^= Name.GetHashCode();
|
||||
if (Reset != false) hash ^= Reset.GetHashCode();
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
if (Name.Length != 0) {
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(Name);
|
||||
}
|
||||
if (Reset != false) {
|
||||
output.WriteRawTag(16);
|
||||
output.WriteBool(Reset);
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
if (Name.Length != 0) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
|
||||
}
|
||||
if (Reset != false) {
|
||||
size += 1 + 1;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public void MergeFrom(GetStatsRequest other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.Name.Length != 0) {
|
||||
Name = other.Name;
|
||||
}
|
||||
if (other.Reset != false) {
|
||||
Reset = other.Reset;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
switch(tag) {
|
||||
default:
|
||||
input.SkipLastField();
|
||||
break;
|
||||
case 10: {
|
||||
Name = input.ReadString();
|
||||
break;
|
||||
}
|
||||
case 16: {
|
||||
Reset = input.ReadBool();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public sealed partial class Stat : pb::IMessage<Stat> {
|
||||
private static readonly pb::MessageParser<Stat> _parser = new pb::MessageParser<Stat>(() => new Stat());
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public static pb::MessageParser<Stat> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::V2Ray.Core.App.Stats.Command.CommandReflection.Descriptor.MessageTypes[1]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public Stat() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public Stat(Stat other) : this() {
|
||||
name_ = other.name_;
|
||||
value_ = other.value_;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public Stat Clone() {
|
||||
return new Stat(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "name" field.</summary>
|
||||
public const int NameFieldNumber = 1;
|
||||
private string name_ = "";
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public string Name {
|
||||
get { return name_; }
|
||||
set {
|
||||
name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "value" field.</summary>
|
||||
public const int ValueFieldNumber = 2;
|
||||
private long value_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public long Value {
|
||||
get { return value_; }
|
||||
set {
|
||||
value_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as Stat);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public bool Equals(Stat other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (Name != other.Name) return false;
|
||||
if (Value != other.Value) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
if (Name.Length != 0) hash ^= Name.GetHashCode();
|
||||
if (Value != 0L) hash ^= Value.GetHashCode();
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
if (Name.Length != 0) {
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(Name);
|
||||
}
|
||||
if (Value != 0L) {
|
||||
output.WriteRawTag(16);
|
||||
output.WriteInt64(Value);
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
if (Name.Length != 0) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
|
||||
}
|
||||
if (Value != 0L) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Value);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public void MergeFrom(Stat other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.Name.Length != 0) {
|
||||
Name = other.Name;
|
||||
}
|
||||
if (other.Value != 0L) {
|
||||
Value = other.Value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
switch(tag) {
|
||||
default:
|
||||
input.SkipLastField();
|
||||
break;
|
||||
case 10: {
|
||||
Name = input.ReadString();
|
||||
break;
|
||||
}
|
||||
case 16: {
|
||||
Value = input.ReadInt64();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public sealed partial class GetStatsResponse : pb::IMessage<GetStatsResponse> {
|
||||
private static readonly pb::MessageParser<GetStatsResponse> _parser = new pb::MessageParser<GetStatsResponse>(() => new GetStatsResponse());
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public static pb::MessageParser<GetStatsResponse> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::V2Ray.Core.App.Stats.Command.CommandReflection.Descriptor.MessageTypes[2]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public GetStatsResponse() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public GetStatsResponse(GetStatsResponse other) : this() {
|
||||
Stat = other.stat_ != null ? other.Stat.Clone() : null;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public GetStatsResponse Clone() {
|
||||
return new GetStatsResponse(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "stat" field.</summary>
|
||||
public const int StatFieldNumber = 1;
|
||||
private global::V2Ray.Core.App.Stats.Command.Stat stat_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public global::V2Ray.Core.App.Stats.Command.Stat Stat {
|
||||
get { return stat_; }
|
||||
set {
|
||||
stat_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as GetStatsResponse);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public bool Equals(GetStatsResponse other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (!object.Equals(Stat, other.Stat)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
if (stat_ != null) hash ^= Stat.GetHashCode();
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
if (stat_ != null) {
|
||||
output.WriteRawTag(10);
|
||||
output.WriteMessage(Stat);
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
if (stat_ != null) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Stat);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public void MergeFrom(GetStatsResponse other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.stat_ != null) {
|
||||
if (stat_ == null) {
|
||||
stat_ = new global::V2Ray.Core.App.Stats.Command.Stat();
|
||||
}
|
||||
Stat.MergeFrom(other.Stat);
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
switch(tag) {
|
||||
default:
|
||||
input.SkipLastField();
|
||||
break;
|
||||
case 10: {
|
||||
if (stat_ == null) {
|
||||
stat_ = new global::V2Ray.Core.App.Stats.Command.Stat();
|
||||
}
|
||||
input.ReadMessage(stat_);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public sealed partial class Config : pb::IMessage<Config> {
|
||||
private static readonly pb::MessageParser<Config> _parser = new pb::MessageParser<Config>(() => new Config());
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public static pb::MessageParser<Config> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::V2Ray.Core.App.Stats.Command.CommandReflection.Descriptor.MessageTypes[3]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public Config() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public Config(Config other) : this() {
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public Config Clone() {
|
||||
return new Config(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as Config);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public bool Equals(Config other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public void MergeFrom(Config other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
switch(tag) {
|
||||
default:
|
||||
input.SkipLastField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
#endregion Designer generated code
|
||||
@@ -1,97 +0,0 @@
|
||||
// <auto-generated>
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: command.proto
|
||||
// </auto-generated>
|
||||
#pragma warning disable 1591
|
||||
#region Designer generated code
|
||||
|
||||
using grpc = global::Grpc.Core;
|
||||
|
||||
namespace V2Ray.Core.App.Stats.Command {
|
||||
public static partial class StatsService
|
||||
{
|
||||
static readonly string __ServiceName = "v2ray.core.app.stats.command.StatsService";
|
||||
|
||||
static readonly grpc::Marshaller<global::V2Ray.Core.App.Stats.Command.GetStatsRequest> __Marshaller_GetStatsRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::V2Ray.Core.App.Stats.Command.GetStatsRequest.Parser.ParseFrom);
|
||||
static readonly grpc::Marshaller<global::V2Ray.Core.App.Stats.Command.GetStatsResponse> __Marshaller_GetStatsResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::V2Ray.Core.App.Stats.Command.GetStatsResponse.Parser.ParseFrom);
|
||||
|
||||
static readonly grpc::Method<global::V2Ray.Core.App.Stats.Command.GetStatsRequest, global::V2Ray.Core.App.Stats.Command.GetStatsResponse> __Method_GetStats = new grpc::Method<global::V2Ray.Core.App.Stats.Command.GetStatsRequest, global::V2Ray.Core.App.Stats.Command.GetStatsResponse>(
|
||||
grpc::MethodType.Unary,
|
||||
__ServiceName,
|
||||
"GetStats",
|
||||
__Marshaller_GetStatsRequest,
|
||||
__Marshaller_GetStatsResponse);
|
||||
|
||||
/// <summary>Service descriptor</summary>
|
||||
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
|
||||
{
|
||||
get { return global::V2Ray.Core.App.Stats.Command.CommandReflection.Descriptor.Services[0]; }
|
||||
}
|
||||
|
||||
/// <summary>Base class for server-side implementations of StatsService</summary>
|
||||
public abstract partial class StatsServiceBase
|
||||
{
|
||||
public virtual global::System.Threading.Tasks.Task<global::V2Ray.Core.App.Stats.Command.GetStatsResponse> GetStats(global::V2Ray.Core.App.Stats.Command.GetStatsRequest request, grpc::ServerCallContext context)
|
||||
{
|
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Client for StatsService</summary>
|
||||
public partial class StatsServiceClient : grpc::ClientBase<StatsServiceClient>
|
||||
{
|
||||
/// <summary>Creates a new client for StatsService</summary>
|
||||
/// <param name="channel">The channel to use to make remote calls.</param>
|
||||
public StatsServiceClient(grpc::Channel channel) : base(channel)
|
||||
{
|
||||
}
|
||||
/// <summary>Creates a new client for StatsService that uses a custom <c>CallInvoker</c>.</summary>
|
||||
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
|
||||
public StatsServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
|
||||
{
|
||||
}
|
||||
/// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
|
||||
protected StatsServiceClient() : base()
|
||||
{
|
||||
}
|
||||
/// <summary>Protected constructor to allow creation of configured clients.</summary>
|
||||
/// <param name="configuration">The client configuration.</param>
|
||||
protected StatsServiceClient(ClientBaseConfiguration configuration) : base(configuration)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual global::V2Ray.Core.App.Stats.Command.GetStatsResponse GetStats(global::V2Ray.Core.App.Stats.Command.GetStatsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
|
||||
{
|
||||
return GetStats(request, new grpc::CallOptions(headers, deadline, cancellationToken));
|
||||
}
|
||||
public virtual global::V2Ray.Core.App.Stats.Command.GetStatsResponse GetStats(global::V2Ray.Core.App.Stats.Command.GetStatsRequest request, grpc::CallOptions options)
|
||||
{
|
||||
return CallInvoker.BlockingUnaryCall(__Method_GetStats, null, options, request);
|
||||
}
|
||||
public virtual grpc::AsyncUnaryCall<global::V2Ray.Core.App.Stats.Command.GetStatsResponse> GetStatsAsync(global::V2Ray.Core.App.Stats.Command.GetStatsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
|
||||
{
|
||||
return GetStatsAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
|
||||
}
|
||||
public virtual grpc::AsyncUnaryCall<global::V2Ray.Core.App.Stats.Command.GetStatsResponse> GetStatsAsync(global::V2Ray.Core.App.Stats.Command.GetStatsRequest request, grpc::CallOptions options)
|
||||
{
|
||||
return CallInvoker.AsyncUnaryCall(__Method_GetStats, null, options, request);
|
||||
}
|
||||
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
|
||||
protected override StatsServiceClient NewInstance(ClientBaseConfiguration configuration)
|
||||
{
|
||||
return new StatsServiceClient(configuration);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Creates service definition that can be registered with a server</summary>
|
||||
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
|
||||
public static grpc::ServerServiceDefinition BindService(StatsServiceBase serviceImpl)
|
||||
{
|
||||
return grpc::ServerServiceDefinition.CreateBuilder()
|
||||
.AddMethod(__Method_GetStats, serviceImpl.GetStats).Build();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -1,5 +1,6 @@
|
||||
<?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.23.0\build\Grpc.Tools.props" Condition="Exists('..\packages\Grpc.Tools.2.23.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>
|
||||
@@ -74,11 +75,32 @@
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>.\Newtonsoft.Json.dll</HintPath>
|
||||
<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" />
|
||||
@@ -87,15 +109,27 @@
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.IO.Compression.FileSystem" />
|
||||
<Reference Include="System.Net" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="zxing">
|
||||
<HintPath>.\zxing.dll</HintPath>
|
||||
<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="zxing.presentation">
|
||||
<HintPath>.\zxing.presentation.dll</HintPath>
|
||||
<Reference Include="System.Net" />
|
||||
<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>
|
||||
@@ -106,6 +140,9 @@
|
||||
<Compile Include="Forms\AddServer4Form.Designer.cs">
|
||||
<DependentUpon>AddServer4Form.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\ListViewFlickerFree.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\MainForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -142,18 +179,21 @@
|
||||
<Compile Include="Forms\SubSettingControl.Designer.cs">
|
||||
<DependentUpon>SubSettingControl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Handler\StatisticsHandler.cs" />
|
||||
<Compile Include="Handler\V2rayUpdateHandle.cs" />
|
||||
<Compile Include="HttpProxyHandler\HttpWebServer.cs" />
|
||||
<Compile Include="HttpProxyHandler\PACFileWatcherHandle.cs" />
|
||||
<Compile Include="HttpProxyHandler\PrivoxyHandler.cs" />
|
||||
<Compile Include="HttpProxyHandler\PACListHandle.cs" />
|
||||
<Compile Include="HttpProxyHandler\PACServerHandle.cs" />
|
||||
<Compile Include="HttpProxyHandler\ProxySetting.cs" />
|
||||
<Compile Include="HttpProxyHandler\SysProxyHandle.cs" />
|
||||
<Compile Include="HttpProxyHandler\HttpProxyHandle.cs" />
|
||||
<Compile Include="HttpProxyHandler\WebClientEx.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Mode\EMove.cs" />
|
||||
<Compile Include="Mode\ServerStatistics.cs" />
|
||||
<Compile Include="Mode\SysproxyConfig.cs" />
|
||||
<Compile Include="Mode\EConfigType.cs" />
|
||||
<Compile Include="Resx\ResUI.zh-Hans.Designer.cs">
|
||||
@@ -288,6 +328,7 @@
|
||||
<EmbeddedResource Include="app.config">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
@@ -297,6 +338,7 @@
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Protobuf Include="Protos\Statistics.proto" />
|
||||
<None Include="Resources\abp.js.gz" />
|
||||
<None Include="Resources\pac.txt.gz" />
|
||||
<None Include="Resources\sysproxy.exe.gz" />
|
||||
@@ -318,9 +360,6 @@
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Sample\SampleClientConfig.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Newtonsoft.Json.dll" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Sample\SampleHttprequest.txt" />
|
||||
<EmbeddedResource Include="Sample\SampleHttpresponse.txt" />
|
||||
@@ -370,19 +409,39 @@
|
||||
<None Include="Resources\sub.png" />
|
||||
<None Include="Resources\checkupdate.png" />
|
||||
<None Include="Resources\about.png" />
|
||||
<EmbeddedResource Include="LIB\Google.Protobuf.dll" />
|
||||
<EmbeddedResource Include="LIB\Grpc.Core.Api.dll" />
|
||||
<EmbeddedResource Include="LIB\Grpc.Core.dll" />
|
||||
<EmbeddedResource Include="LIB\Newtonsoft.Json.dll" />
|
||||
<EmbeddedResource Include="LIB\System.Buffers.dll" />
|
||||
<EmbeddedResource Include="LIB\System.Memory.dll" />
|
||||
<EmbeddedResource Include="LIB\System.Runtime.CompilerServices.Unsafe.dll" />
|
||||
<EmbeddedResource Include="LIB\zxing.dll" />
|
||||
<EmbeddedResource Include="LIB\zxing.presentation.dll" />
|
||||
<Content Include="grpc_csharp_ext.x64.dll">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="grpc_csharp_ext.x86.dll">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<EmbeddedResource Include="LIB\netstandard.dll" />
|
||||
<Content Include="Resources\help.png" />
|
||||
<Content Include="Resources\privoxy_conf.txt" />
|
||||
<EmbeddedResource Include="zxing.presentation.dll" />
|
||||
<EmbeddedResource Include="zxing.dll" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="protos\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</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>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\Grpc.Tools.2.23.0\build\Grpc.Tools.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Tools.2.23.0\build\Grpc.Tools.props'))" />
|
||||
<Error Condition="!Exists('..\packages\Grpc.Tools.2.23.0\build\Grpc.Tools.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Tools.2.23.0\build\Grpc.Tools.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\Grpc.Tools.2.23.0\build\Grpc.Tools.targets" Condition="Exists('..\packages\Grpc.Tools.2.23.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">
|
||||
|
||||
@@ -14,4 +14,9 @@
|
||||
<PropertyGroup>
|
||||
<EnableSecurityDebugging>false</EnableSecurityDebugging>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||
<StartAction>Project</StartAction>
|
||||
<StartArguments>
|
||||
</StartArguments>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user