Compare commits

...

63 Commits
4.24 ... 5.2

Author SHA1 Message Date
2dust
ac79466041 Update AssemblyInfo.cs 2022-03-17 19:07:24 +08:00
2dust
291fd491ff Improve speedtest 2022-03-17 19:07:06 +08:00
2dust
6408d51c85 Improve custom configuration 2022-03-17 18:41:51 +08:00
2dust
b693873619 Subscription support authentication 2022-03-17 18:41:07 +08:00
2dust
c2af982272 add all servers group 2022-03-15 20:32:14 +08:00
2dust
1f0a77bde2 Update AssemblyInfo.cs 2022-03-15 19:17:54 +08:00
2dust
0463c1a6e7 bug fix 2022-03-15 19:17:32 +08:00
2dust
6517f66876 Update AssemblyInfo.cs 2022-03-14 20:41:39 +08:00
2dust
82682d4474 Update MainForm.cs 2022-03-14 20:36:09 +08:00
2dust
e030fae1c4 Update GroupSettingForm.cs 2022-03-14 20:16:59 +08:00
2dust
4d7cf140cd fix speed test display 2022-03-13 18:47:17 +08:00
2dust
f6ccee1976 Refactor Scan Screen Task 2022-03-13 16:15:11 +08:00
2dust
d42346d500 Add server group 2022-03-13 10:41:04 +08:00
2dust
887dd8da3b Update AssemblyInfo.cs 2022-03-08 18:29:04 +08:00
2dust
731db2541d load core async, remove Ssl3 2022-03-08 18:28:39 +08:00
2dust
bfdc0a2e77 Update MainForm.cs 2022-03-06 20:24:35 +08:00
2dust
03ea24f29b Update AssemblyInfo.cs 2022-03-05 18:01:01 +08:00
2dust
61bd48fd1e Merge pull request #2077 from PragmaTwice/add-xchacha20-poly1305
add xchacha20-poly1305 to shadowsocks ciphers for xray
2022-03-05 17:58:26 +08:00
Twice
f05b5d7fff Merge branch 'master' into add-xchacha20-poly1305 2022-03-05 16:35:36 +08:00
2dust
0b8d66a87e Add Global Hotkey 2022-03-05 15:00:02 +08:00
2dust
c0b7a8c33e clear 2022-03-05 07:29:58 +08:00
PragmaTwice
32a07bceb2 add xchacha20-poly1305 to shadowsocks ciphers for xray 2022-03-03 17:13:34 +08:00
2dust
ba8f24d398 Update AssemblyInfo.cs 2022-03-02 19:50:17 +08:00
2dust
31b7857238 bug fix 2022-03-02 19:49:57 +08:00
2dust
fada5f99bb enable Security Protocol Tls13 option 2022-02-26 12:27:59 +08:00
2dust
734df5def5 Update subscription is to keep the same item 2022-02-25 19:05:54 +08:00
2dust
03ad07733f Refactor some code 2022-02-24 20:45:24 +08:00
2dust
b2d538d02a Update AssemblyInfo.cs 2022-02-23 18:59:11 +08:00
2dust
b9435a4b01 Automatically adjust column width after updating subscription 2022-02-23 17:31:32 +08:00
2dust
d27566686c add network data check 2022-02-23 10:01:35 +08:00
2dust
ca883c164d Update Subscription via proxy, add default user-agent 2022-02-20 15:16:00 +08:00
2dust
0f6cd76f28 Update AssemblyInfo.cs 2022-02-14 08:59:11 +08:00
2dust
7778af65aa re-add alterId 2022-02-14 08:58:43 +08:00
2dust
828246130b Update v2rayN.csproj 2022-02-12 19:54:48 +08:00
2dust
4eb1801f50 Update AssemblyInfo.cs 2022-02-12 19:53:41 +08:00
2dust
80b68dcf84 fix some bugs 2022-02-12 19:53:26 +08:00
2dust
685baa576b Update AssemblyInfo.cs 2022-02-03 20:57:29 +08:00
2dust
7cdead8cb1 Optimized config 2022-02-03 20:57:02 +08:00
2dust
f220825b80 add xtls Flows 2022-02-03 17:45:09 +08:00
2dust
2b00490dd6 re-add alterId 2022-02-03 17:19:53 +08:00
2dust
d361afa3f3 Improve server test 2022-01-28 21:07:07 +08:00
2dust
8d5bd5a80c Improve server test 2022-01-28 21:05:41 +08:00
2dust
002283899f add VmessItem indexId 2022-01-28 21:02:25 +08:00
2dust
206b440966 add vmess Securitys 2022-01-28 20:58:28 +08:00
2dust
b5b5eb25a1 Enhanced share link 2022-01-23 19:18:20 +08:00
2dust
f84e538b6a Update MainFormHandler.cs 2022-01-23 19:16:24 +08:00
2dust
5b9cdec156 remove alterId 2022-01-23 19:16:14 +08:00
2dust
cf0bd7f1e6 up 4.29 2022-01-12 21:06:32 +08:00
2dust
f3a86a2173 Added port in used check at speedtest 2022-01-12 21:06:22 +08:00
2dust
0a1d4d5193 Add tls13 settings in the registry 2022-01-12 21:05:03 +08:00
2dust
88e2288298 Added tls display to the main form 2022-01-12 21:04:10 +08:00
2dust
fec47d4b72 add alpn/userAgent/ 2022-01-08 20:27:36 +08:00
2dust
f7f23e7980 Update AssemblyInfo.cs 2021-12-26 17:44:53 +08:00
2dust
32100db3fc Some improvements 2021-12-26 17:44:36 +08:00
2dust
dd2bed49f1 Update AssemblyInfo.cs 2021-12-19 20:48:20 +08:00
2dust
6a427a2158 Join log4net 2021-12-19 20:47:58 +08:00
2dust
716029def8 DNS settings check 2021-12-19 20:47:19 +08:00
2dust
610a610ee0 Enhanced trojan settings 2021-12-19 20:46:54 +08:00
2dust
4fc0738dad Routing rule display 2021-12-02 19:39:02 +08:00
2dust
fe29771870 Routing rule add custom icon 2021-12-02 18:04:22 +08:00
2dust
19be43d2d9 Update AssemblyInfo.cs 2021-12-02 16:48:15 +08:00
2dust
cb01809093 Optimize Duplicate Server 2021-12-02 16:47:35 +08:00
2dust
1138d660b2 Routing rule add custom icon 2021-12-02 16:05:54 +08:00
105 changed files with 8537 additions and 9692 deletions

View File

@@ -31,6 +31,7 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddServer2Form));
this.btnClose = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnBrowse = new System.Windows.Forms.Button();
this.txtAddress = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.txtRemarks = new System.Windows.Forms.TextBox();
@@ -45,23 +46,31 @@
//
// 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.btnBrowse);
this.groupBox1.Controls.Add(this.txtAddress);
this.groupBox1.Controls.Add(this.label13);
this.groupBox1.Controls.Add(this.txtRemarks);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.label1);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
// btnBrowse
//
resources.ApplyResources(this.btnBrowse, "btnBrowse");
this.btnBrowse.Name = "btnBrowse";
this.btnBrowse.UseVisualStyleBackColor = true;
this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click);
//
// txtAddress
//
resources.ApplyResources(this.txtAddress, "txtAddress");
@@ -89,9 +98,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
@@ -136,5 +145,6 @@
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txtAddress;
private System.Windows.Forms.Button btnBrowse;
}
}

View File

@@ -6,7 +6,7 @@ using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class AddServer2Form : BaseServerForm
{
{
public AddServer2Form()
{
@@ -15,12 +15,15 @@ namespace v2rayN.Forms
private void AddServer2Form_Load(object sender, EventArgs e)
{
if (EditIndex >= 0)
txtAddress.ReadOnly = true;
if (vmessItem != null)
{
BindingServer();
}
else
{
vmessItem = new VmessItem();
vmessItem.groupId = groupId;
ClearServer();
}
}
@@ -30,10 +33,8 @@ namespace v2rayN.Forms
/// </summary>
private void BindingServer()
{
vmessItem = config.vmess[EditIndex];
txtRemarks.Text = vmessItem.remarks;
txtAddress.Text = vmessItem.address;
txtAddress.ReadOnly = true;
}
@@ -55,7 +56,7 @@ namespace v2rayN.Forms
}
vmessItem.remarks = remarks;
if (ConfigHandler.EditCustomServer(ref config, vmessItem, EditIndex) == 0)
if (ConfigHandler.EditCustomServer(ref config, vmessItem) == 0)
{
this.DialogResult = DialogResult.OK;
}
@@ -67,7 +68,47 @@ namespace v2rayN.Forms
private void btnClose_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
if (Utils.IsNullOrEmpty(vmessItem.indexId))
{
this.DialogResult = DialogResult.Cancel;
}
else
{
this.DialogResult = DialogResult.OK;
}
}
private void btnBrowse_Click(object sender, EventArgs e)
{
UI.Show(UIRes.I18N("CustomServerTips"));
OpenFileDialog fileDialog = new OpenFileDialog
{
Multiselect = false,
Filter = "Config|*.json|All|*.*"
};
if (fileDialog.ShowDialog() != DialogResult.OK)
{
return;
}
string fileName = fileDialog.FileName;
if (Utils.IsNullOrEmpty(fileName))
{
return;
}
vmessItem.address = fileName;
vmessItem.remarks = txtRemarks.Text;
if (ConfigHandler.AddCustomServer(ref config, vmessItem) == 0)
{
BindingServer();
UI.Show(UIRes.I18N("SuccessfullyImportedCustomServer"));
}
else
{
UI.ShowWarning(UIRes.I18N("FailedImportedCustomServer"));
}
}
}
}

View File

@@ -117,74 +117,83 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<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>611, 271</value>
</data>
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Edit custom configuration server</value>
</data>
<data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
<value>396, 17</value>
<value>450, 17</value>
</data>
<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="btnClose.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="btnClose.Text" xml:space="preserve">
<value>&amp;Cancel</value>
</data>
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
<value>303, 17</value>
<data name="&gt;&gt;btnClose.Name" xml:space="preserve">
<value>btnClose</value>
</data>
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
<data name="&gt;&gt;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="btnOK.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
<data name="&gt;&gt;btnClose.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>&amp;OK</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, 10</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>611, 201</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="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 62</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Address</value>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="btnBrowse.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnBrowse.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 121</value>
</data>
<data name="btnBrowse.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="btnBrowse.TabIndex" type="System.Int32, mscorlib">
<value>40</value>
</data>
<data name="btnBrowse.Text" xml:space="preserve">
<value>&amp;Browse</value>
</data>
<data name="&gt;&gt;btnBrowse.Name" xml:space="preserve">
<value>btnBrowse</value>
</data>
<data name="&gt;&gt;btnBrowse.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="&gt;&gt;btnBrowse.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;btnBrowse.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 62</value>
</data>
<data name="txtAddress.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="txtAddress.Size" type="System.Drawing.Size, System.Drawing">
<value>432, 37</value>
</data>
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
<value>23</value>
</data>
<data name="&gt;&gt;txtAddress.Name" xml:space="preserve">
<value>txtAddress</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;txtAddress.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtAddress.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="label13.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -201,6 +210,39 @@
<data name="label13.Text" xml:space="preserve">
<value>* Fill in manually</value>
</data>
<data name="&gt;&gt;label13.Name" xml:space="preserve">
<value>label13</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;label13.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label13.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 23</value>
</data>
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
<value>313, 21</value>
</data>
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="&gt;&gt;txtRemarks.Name" xml:space="preserve">
<value>txtRemarks</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;txtRemarks.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtRemarks.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@@ -208,7 +250,7 @@
<value>12, 27</value>
</data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value>
<value>95, 12</value>
</data>
<data name="label6.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
@@ -216,6 +258,120 @@
<data name="label6.Text" xml:space="preserve">
<value>Alias (remarks)</value>
</data>
<data name="&gt;&gt;label6.Name" xml:space="preserve">
<value>label6</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;label6.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label6.ZOrder" xml:space="preserve">
<value>4</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, 62</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>47, 12</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Address</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;label1.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>5</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, 10</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>611, 189</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="&gt;&gt;groupBox1.Name" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;groupBox1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
<value>357, 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>&amp;OK</value>
</data>
<data name="&gt;&gt;btnOK.Name" xml:space="preserve">
<value>btnOK</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;btnOK.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;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, 199</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>611, 60</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="&gt;&gt;panel2.Name" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;panel2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;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>
@@ -228,37 +384,34 @@
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
<data name="&gt;&gt;panel1.Name" xml:space="preserve">
<value>panel1</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 211</value>
<data name="&gt;&gt;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="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>611, 60</value>
<data name="&gt;&gt;panel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 62</value>
</data>
<data name="txtAddress.Multiline" type="System.Boolean, mscorlib">
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 12</value>
</data>
<data name="txtAddress.Size" type="System.Drawing.Size, System.Drawing">
<value>432, 104</value>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>611, 259</value>
</data>
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
<value>23</value>
<data name="$this.Text" xml:space="preserve">
<value>Edit custom configuration server</value>
</data>
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 23</value>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>AddServer2Form</value>
</data>
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
<value>313, 21</value>
</data>
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>v2rayN.Forms.BaseServerForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>

View File

@@ -83,13 +83,6 @@
//
this.cmbSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbSecurity.FormattingEnabled = true;
this.cmbSecurity.Items.AddRange(new object[] {
resources.GetString("cmbSecurity.Items"),
resources.GetString("cmbSecurity.Items1"),
resources.GetString("cmbSecurity.Items2"),
resources.GetString("cmbSecurity.Items3"),
resources.GetString("cmbSecurity.Items4"),
resources.GetString("cmbSecurity.Items5")});
resources.ApplyResources(this.cmbSecurity, "cmbSecurity");
this.cmbSecurity.Name = "cmbSecurity";
//

View File

@@ -6,7 +6,7 @@ using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class AddServer3Form : BaseServerForm
{
{
public AddServer3Form()
{
@@ -15,14 +15,15 @@ namespace v2rayN.Forms
private void AddServer3Form_Load(object sender, EventArgs e)
{
if (EditIndex >= 0)
cmbSecurity.Items.AddRange(config.GetShadowsocksSecuritys().ToArray());
if (vmessItem != null)
{
vmessItem = config.vmess[EditIndex];
BindingServer();
}
else
{
vmessItem = new VmessItem();
vmessItem.groupId = groupId;
ClearServer();
}
}
@@ -88,7 +89,7 @@ namespace v2rayN.Forms
vmessItem.security = security;
vmessItem.remarks = remarks;
if (ConfigHandler.AddShadowsocksServer(ref config, vmessItem, EditIndex) == 0)
if (ConfigHandler.AddShadowsocksServer(ref config, vmessItem) == 0)
{
this.DialogResult = DialogResult.OK;
}
@@ -100,7 +101,7 @@ namespace v2rayN.Forms
private void btnClose_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
}
}
}

View File

@@ -126,7 +126,7 @@
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="btnClose.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
<value>1</value>
</data>
<data name="btnClose.Text" xml:space="preserve">
<value>&amp;Cancel</value>
@@ -174,24 +174,6 @@
<data name="&gt;&gt;label13.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="cmbSecurity.Items" xml:space="preserve">
<value>aes-256-gcm</value>
</data>
<data name="cmbSecurity.Items1" xml:space="preserve">
<value>aes-128-gcm</value>
</data>
<data name="cmbSecurity.Items2" xml:space="preserve">
<value>chacha20-poly1305</value>
</data>
<data name="cmbSecurity.Items3" xml:space="preserve">
<value>chacha20-ietf-poly1305</value>
</data>
<data name="cmbSecurity.Items4" xml:space="preserve">
<value>none</value>
</data>
<data name="cmbSecurity.Items5" xml:space="preserve">
<value>plain</value>
</data>
<data name="cmbSecurity.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 123</value>
</data>
@@ -199,7 +181,7 @@
<value>278, 20</value>
</data>
<data name="cmbSecurity.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
<value>3</value>
</data>
<data name="&gt;&gt;cmbSecurity.Name" xml:space="preserve">
<value>cmbSecurity</value>
@@ -220,7 +202,7 @@
<value>278, 21</value>
</data>
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
<value>4</value>
</data>
<data name="&gt;&gt;txtRemarks.Name" xml:space="preserve">
<value>txtRemarks</value>
@@ -295,7 +277,7 @@
<value>278, 21</value>
</data>
<data name="txtId.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
<value>2</value>
</data>
<data name="&gt;&gt;txtId.Name" xml:space="preserve">
<value>txtId</value>
@@ -343,7 +325,7 @@
<value>194, 21</value>
</data>
<data name="txtPort.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
<value>1</value>
</data>
<data name="&gt;&gt;txtPort.Name" xml:space="preserve">
<value>txtPort</value>
@@ -391,7 +373,7 @@
<value>359, 21</value>
</data>
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
<value>0</value>
</data>
<data name="&gt;&gt;txtAddress.Name" xml:space="preserve">
<value>txtAddress</value>
@@ -466,7 +448,7 @@
<value>75, 23</value>
</data>
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
<value>0</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>&amp;OK</value>

View File

@@ -6,7 +6,7 @@ using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class AddServer4Form : BaseServerForm
{
{
public AddServer4Form()
{
@@ -15,14 +15,14 @@ namespace v2rayN.Forms
private void AddServer4Form_Load(object sender, EventArgs e)
{
if (EditIndex >= 0)
if (vmessItem != null)
{
vmessItem = config.vmess[EditIndex];
BindingServer();
}
else
{
vmessItem = new VmessItem();
vmessItem.groupId = groupId;
ClearServer();
}
}
@@ -77,7 +77,7 @@ namespace v2rayN.Forms
vmessItem.security = security;
vmessItem.remarks = remarks;
if (ConfigHandler.AddSocksServer(ref config, vmessItem, EditIndex) == 0)
if (ConfigHandler.AddSocksServer(ref config, vmessItem) == 0)
{
this.DialogResult = DialogResult.OK;
}
@@ -90,7 +90,7 @@ namespace v2rayN.Forms
{
this.DialogResult = DialogResult.Cancel;
}
}
}

View File

@@ -126,7 +126,7 @@
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="btnClose.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
<value>1</value>
</data>
<data name="btnClose.Text" xml:space="preserve">
<value>&amp;Cancel</value>
@@ -150,7 +150,7 @@
<value>278, 21</value>
</data>
<data name="txtSecurity.TabIndex" type="System.Int32, mscorlib">
<value>26</value>
<value>2</value>
</data>
<data name="&gt;&gt;txtSecurity.Name" xml:space="preserve">
<value>txtSecurity</value>
@@ -202,7 +202,7 @@
<value>278, 21</value>
</data>
<data name="txtId.TabIndex" type="System.Int32, mscorlib">
<value>24</value>
<value>3</value>
</data>
<data name="&gt;&gt;txtId.Name" xml:space="preserve">
<value>txtId</value>
@@ -280,7 +280,7 @@
<value>278, 21</value>
</data>
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
<value>4</value>
</data>
<data name="&gt;&gt;txtRemarks.Name" xml:space="preserve">
<value>txtRemarks</value>
@@ -328,7 +328,7 @@
<value>194, 21</value>
</data>
<data name="txtPort.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
<value>1</value>
</data>
<data name="&gt;&gt;txtPort.Name" xml:space="preserve">
<value>txtPort</value>
@@ -376,7 +376,7 @@
<value>359, 21</value>
</data>
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
<value>0</value>
</data>
<data name="&gt;&gt;txtAddress.Name" xml:space="preserve">
<value>txtAddress</value>
@@ -451,7 +451,7 @@
<value>75, 23</value>
</data>
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
<value>0</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>&amp;OK</value>

View File

@@ -35,32 +35,6 @@
this.label4 = new System.Windows.Forms.Label();
this.btnGUID = new System.Windows.Forms.Button();
this.label13 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label25 = new System.Windows.Forms.Label();
this.label24 = new System.Windows.Forms.Label();
this.label23 = new System.Windows.Forms.Label();
this.panTlsMore = new System.Windows.Forms.Panel();
this.txtSNI = new System.Windows.Forms.TextBox();
this.label22 = new System.Windows.Forms.Label();
this.label21 = new System.Windows.Forms.Label();
this.cmbAllowInsecure = new System.Windows.Forms.ComboBox();
this.label9 = new System.Windows.Forms.Label();
this.label20 = new System.Windows.Forms.Label();
this.txtPath = new System.Windows.Forms.TextBox();
this.cmbNetwork = new System.Windows.Forms.ComboBox();
this.label7 = new System.Windows.Forms.Label();
this.label19 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.cmbStreamSecurity = new System.Windows.Forms.ComboBox();
this.label12 = new System.Windows.Forms.Label();
this.txtRequestHost = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.cmbHeaderType = new System.Windows.Forms.ComboBox();
this.label8 = new System.Windows.Forms.Label();
this.cmbSecurity = new System.Windows.Forms.ComboBox();
this.txtRemarks = new System.Windows.Forms.TextBox();
@@ -75,10 +49,11 @@
this.panel2 = new System.Windows.Forms.Panel();
this.btnOK = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.transportControl = new v2rayN.Forms.ServerTransportControl();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.panTlsMore.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
this.SuspendLayout();
//
// btnClose
@@ -95,7 +70,6 @@
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.btnGUID);
this.groupBox1.Controls.Add(this.label13);
this.groupBox1.Controls.Add(this.groupBox2);
this.groupBox1.Controls.Add(this.label8);
this.groupBox1.Controls.Add(this.cmbSecurity);
this.groupBox1.Controls.Add(this.txtRemarks);
@@ -114,12 +88,6 @@
// cmbFlow
//
this.cmbFlow.FormattingEnabled = true;
this.cmbFlow.Items.AddRange(new object[] {
resources.GetString("cmbFlow.Items"),
resources.GetString("cmbFlow.Items1"),
resources.GetString("cmbFlow.Items2"),
resources.GetString("cmbFlow.Items3"),
resources.GetString("cmbFlow.Items4")});
resources.ApplyResources(this.cmbFlow, "cmbFlow");
this.cmbFlow.Name = "cmbFlow";
//
@@ -140,195 +108,6 @@
resources.ApplyResources(this.label13, "label13");
this.label13.Name = "label13";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.label25);
this.groupBox2.Controls.Add(this.label24);
this.groupBox2.Controls.Add(this.label23);
this.groupBox2.Controls.Add(this.panTlsMore);
this.groupBox2.Controls.Add(this.label9);
this.groupBox2.Controls.Add(this.label20);
this.groupBox2.Controls.Add(this.txtPath);
this.groupBox2.Controls.Add(this.cmbNetwork);
this.groupBox2.Controls.Add(this.label7);
this.groupBox2.Controls.Add(this.label19);
this.groupBox2.Controls.Add(this.label18);
this.groupBox2.Controls.Add(this.label17);
this.groupBox2.Controls.Add(this.label16);
this.groupBox2.Controls.Add(this.label14);
this.groupBox2.Controls.Add(this.label15);
this.groupBox2.Controls.Add(this.cmbStreamSecurity);
this.groupBox2.Controls.Add(this.label12);
this.groupBox2.Controls.Add(this.txtRequestHost);
this.groupBox2.Controls.Add(this.label11);
this.groupBox2.Controls.Add(this.label10);
this.groupBox2.Controls.Add(this.cmbHeaderType);
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.Name = "groupBox2";
this.groupBox2.TabStop = false;
//
// label25
//
resources.ApplyResources(this.label25, "label25");
this.label25.Name = "label25";
//
// label24
//
resources.ApplyResources(this.label24, "label24");
this.label24.Name = "label24";
//
// label23
//
resources.ApplyResources(this.label23, "label23");
this.label23.Name = "label23";
//
// panTlsMore
//
this.panTlsMore.Controls.Add(this.txtSNI);
this.panTlsMore.Controls.Add(this.label22);
this.panTlsMore.Controls.Add(this.label21);
this.panTlsMore.Controls.Add(this.cmbAllowInsecure);
resources.ApplyResources(this.panTlsMore, "panTlsMore");
this.panTlsMore.Name = "panTlsMore";
//
// txtSNI
//
resources.ApplyResources(this.txtSNI, "txtSNI");
this.txtSNI.Name = "txtSNI";
//
// label22
//
resources.ApplyResources(this.label22, "label22");
this.label22.Name = "label22";
//
// label21
//
resources.ApplyResources(this.label21, "label21");
this.label21.Name = "label21";
//
// cmbAllowInsecure
//
this.cmbAllowInsecure.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbAllowInsecure.FormattingEnabled = true;
this.cmbAllowInsecure.Items.AddRange(new object[] {
resources.GetString("cmbAllowInsecure.Items"),
resources.GetString("cmbAllowInsecure.Items1"),
resources.GetString("cmbAllowInsecure.Items2")});
resources.ApplyResources(this.cmbAllowInsecure, "cmbAllowInsecure");
this.cmbAllowInsecure.Name = "cmbAllowInsecure";
//
// label9
//
resources.ApplyResources(this.label9, "label9");
this.label9.Name = "label9";
//
// label20
//
resources.ApplyResources(this.label20, "label20");
this.label20.Name = "label20";
//
// txtPath
//
resources.ApplyResources(this.txtPath, "txtPath");
this.txtPath.Name = "txtPath";
//
// cmbNetwork
//
this.cmbNetwork.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbNetwork.FormattingEnabled = true;
this.cmbNetwork.Items.AddRange(new object[] {
resources.GetString("cmbNetwork.Items"),
resources.GetString("cmbNetwork.Items1"),
resources.GetString("cmbNetwork.Items2"),
resources.GetString("cmbNetwork.Items3"),
resources.GetString("cmbNetwork.Items4"),
resources.GetString("cmbNetwork.Items5")});
resources.ApplyResources(this.cmbNetwork, "cmbNetwork");
this.cmbNetwork.Name = "cmbNetwork";
this.cmbNetwork.SelectedIndexChanged += new System.EventHandler(this.cmbNetwork_SelectedIndexChanged);
//
// label7
//
resources.ApplyResources(this.label7, "label7");
this.label7.Name = "label7";
//
// label19
//
resources.ApplyResources(this.label19, "label19");
this.label19.Name = "label19";
//
// label18
//
resources.ApplyResources(this.label18, "label18");
this.label18.Name = "label18";
//
// label17
//
resources.ApplyResources(this.label17, "label17");
this.label17.Name = "label17";
//
// label16
//
resources.ApplyResources(this.label16, "label16");
this.label16.Name = "label16";
//
// label14
//
resources.ApplyResources(this.label14, "label14");
this.label14.Name = "label14";
//
// label15
//
resources.ApplyResources(this.label15, "label15");
this.label15.Name = "label15";
//
// cmbStreamSecurity
//
this.cmbStreamSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbStreamSecurity.FormattingEnabled = true;
this.cmbStreamSecurity.Items.AddRange(new object[] {
resources.GetString("cmbStreamSecurity.Items"),
resources.GetString("cmbStreamSecurity.Items1"),
resources.GetString("cmbStreamSecurity.Items2")});
resources.ApplyResources(this.cmbStreamSecurity, "cmbStreamSecurity");
this.cmbStreamSecurity.Name = "cmbStreamSecurity";
this.cmbStreamSecurity.SelectedIndexChanged += new System.EventHandler(this.cmbStreamSecurity_SelectedIndexChanged);
//
// label12
//
resources.ApplyResources(this.label12, "label12");
this.label12.Name = "label12";
//
// txtRequestHost
//
resources.ApplyResources(this.txtRequestHost, "txtRequestHost");
this.txtRequestHost.Name = "txtRequestHost";
//
// label11
//
resources.ApplyResources(this.label11, "label11");
this.label11.Name = "label11";
//
// label10
//
resources.ApplyResources(this.label10, "label10");
this.label10.Name = "label10";
//
// cmbHeaderType
//
this.cmbHeaderType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbHeaderType.FormattingEnabled = true;
this.cmbHeaderType.Items.AddRange(new object[] {
resources.GetString("cmbHeaderType.Items"),
resources.GetString("cmbHeaderType.Items1"),
resources.GetString("cmbHeaderType.Items2"),
resources.GetString("cmbHeaderType.Items3"),
resources.GetString("cmbHeaderType.Items4"),
resources.GetString("cmbHeaderType.Items5"),
resources.GetString("cmbHeaderType.Items6")});
resources.ApplyResources(this.cmbHeaderType, "cmbHeaderType");
this.cmbHeaderType.Name = "cmbHeaderType";
//
// label8
//
resources.ApplyResources(this.label8, "label8");
@@ -407,12 +186,25 @@
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// panel3
//
this.panel3.Controls.Add(this.transportControl);
resources.ApplyResources(this.panel3, "panel3");
this.panel3.Name = "panel3";
//
// transportControl
//
this.transportControl.AllowXtls = false;
resources.ApplyResources(this.transportControl, "transportControl");
this.transportControl.Name = "transportControl";
//
// AddServer5Form
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnClose;
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.panel3);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
@@ -420,11 +212,8 @@
this.Load += new System.EventHandler(this.AddServer5Form_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.panTlsMore.ResumeLayout(false);
this.panTlsMore.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -444,38 +233,14 @@
private System.Windows.Forms.TextBox txtAddress;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox cmbSecurity;
private System.Windows.Forms.ComboBox cmbNetwork;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.TextBox txtRequestHost;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.ComboBox cmbHeaderType;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.ComboBox cmbStreamSecurity;
private System.Windows.Forms.Button btnGUID;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.TextBox txtPath;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.ComboBox cmbAllowInsecure;
private System.Windows.Forms.Panel panTlsMore;
private System.Windows.Forms.Label label24;
private System.Windows.Forms.Label label23;
private System.Windows.Forms.ComboBox cmbFlow;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtSNI;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.Label label25;
private System.Windows.Forms.Panel panel3;
private ServerTransportControl transportControl;
}
}

View File

@@ -15,14 +15,16 @@ namespace v2rayN.Forms
private void AddServer5Form_Load(object sender, EventArgs e)
{
if (EditIndex >= 0)
cmbFlow.Items.AddRange(Global.xtlsFlows.ToArray());
transportControl.AllowXtls = true;
if (vmessItem != null)
{
vmessItem = config.vmess[EditIndex];
BindingServer();
}
else
{
vmessItem = new VmessItem();
vmessItem.groupId = groupId;
ClearServer();
}
}
@@ -37,15 +39,9 @@ namespace v2rayN.Forms
txtId.Text = vmessItem.id;
cmbFlow.Text = vmessItem.flow;
cmbSecurity.Text = vmessItem.security;
cmbNetwork.Text = vmessItem.network;
txtRemarks.Text = vmessItem.remarks;
cmbHeaderType.Text = vmessItem.headerType;
txtRequestHost.Text = vmessItem.requestHost;
txtPath.Text = vmessItem.path;
cmbStreamSecurity.Text = vmessItem.streamSecurity;
cmbAllowInsecure.Text = vmessItem.allowInsecure;
txtSNI.Text = vmessItem.sni;
transportControl.BindingServer(vmessItem);
}
@@ -59,62 +55,9 @@ namespace v2rayN.Forms
txtId.Text = "";
cmbFlow.Text = "";
cmbSecurity.Text = Global.None;
cmbNetwork.Text = Global.DefaultNetwork;
txtRemarks.Text = "";
cmbHeaderType.Text = Global.None;
txtRequestHost.Text = "";
cmbStreamSecurity.Text = "";
cmbAllowInsecure.Text = "";
txtPath.Text = "";
txtSNI.Text = "";
}
private void cmbNetwork_SelectedIndexChanged(object sender, EventArgs e)
{
SetHeaderType();
}
/// <summary>
/// 设置伪装选项
/// </summary>
private void SetHeaderType()
{
cmbHeaderType.Items.Clear();
string network = cmbNetwork.Text;
if (Utils.IsNullOrEmpty(network))
{
cmbHeaderType.Items.Add(Global.None);
return;
}
if (network.Equals(Global.DefaultNetwork))
{
cmbHeaderType.Items.Add(Global.None);
cmbHeaderType.Items.Add(Global.TcpHeaderHttp);
}
else if (network.Equals("kcp") || network.Equals("quic"))
{
cmbHeaderType.Items.Add(Global.None);
cmbHeaderType.Items.Add("srtp");
cmbHeaderType.Items.Add("utp");
cmbHeaderType.Items.Add("wechat-video");
cmbHeaderType.Items.Add("dtls");
cmbHeaderType.Items.Add("wireguard");
}
else if (network.Equals("grpc"))
{
cmbHeaderType.Items.Add(Global.GrpcgunMode);
cmbHeaderType.Items.Add(Global.GrpcmultiMode);
}
else
{
cmbHeaderType.Items.Add(Global.None);
}
cmbHeaderType.SelectedIndex = 0;
transportControl.ClearServer(vmessItem);
}
private void btnOK_Click(object sender, EventArgs e)
@@ -124,16 +67,8 @@ namespace v2rayN.Forms
string id = txtId.Text;
string flow = cmbFlow.Text;
string security = cmbSecurity.Text;
string network = cmbNetwork.Text;
string remarks = txtRemarks.Text;
string headerType = cmbHeaderType.Text;
string requestHost = txtRequestHost.Text;
string path = txtPath.Text;
string streamSecurity = cmbStreamSecurity.Text;
string allowInsecure = cmbAllowInsecure.Text;
string sni = txtSNI.Text;
if (Utils.IsNullOrEmpty(address))
{
UI.Show(UIRes.I18N("FillServerAddress"));
@@ -150,23 +85,16 @@ namespace v2rayN.Forms
return;
}
transportControl.EndBindingServer();
vmessItem.address = address;
vmessItem.port = Utils.ToInt(port);
vmessItem.id = id;
vmessItem.flow = flow;
vmessItem.security = security;
vmessItem.network = network;
vmessItem.remarks = remarks;
vmessItem.headerType = headerType;
vmessItem.requestHost = requestHost.Replace(" ", "");
vmessItem.path = path.Replace(" ", "");
vmessItem.streamSecurity = streamSecurity;
vmessItem.allowInsecure = allowInsecure;
vmessItem.sni = sni;
if (ConfigHandler.AddVlessServer(ref config, vmessItem, EditIndex) == 0)
if (ConfigHandler.AddVlessServer(ref config, vmessItem) == 0)
{
this.DialogResult = DialogResult.OK;
}
@@ -185,18 +113,5 @@ namespace v2rayN.Forms
{
this.DialogResult = DialogResult.Cancel;
}
private void cmbStreamSecurity_SelectedIndexChanged(object sender, EventArgs e)
{
string security = cmbStreamSecurity.Text;
if (Utils.IsNullOrEmpty(security))
{
panTlsMore.Hide();
}
else
{
panTlsMore.Show();
}
}
}
}
}

View File

@@ -143,21 +143,6 @@
<data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="cmbFlow.Items" xml:space="preserve">
<value />
</data>
<data name="cmbFlow.Items1" xml:space="preserve">
<value>xtls-rprx-origin</value>
</data>
<data name="cmbFlow.Items2" xml:space="preserve">
<value>xtls-rprx-origin-udp443</value>
</data>
<data name="cmbFlow.Items3" xml:space="preserve">
<value>xtls-rprx-direct</value>
</data>
<data name="cmbFlow.Items4" xml:space="preserve">
<value>xtls-rprx-direct-udp443</value>
</data>
<data name="cmbFlow.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 123</value>
</data>
@@ -165,7 +150,7 @@
<value>211, 20</value>
</data>
<data name="cmbFlow.TabIndex" type="System.Int32, mscorlib">
<value>24</value>
<value>3</value>
</data>
<data name="&gt;&gt;cmbFlow.Name" xml:space="preserve">
<value>cmbFlow</value>
@@ -261,738 +246,6 @@
<data name="&gt;&gt;label13.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="label25.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label25.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label25.Location" type="System.Drawing.Point, System.Drawing">
<value>529, 210</value>
</data>
<data name="label25.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 12</value>
</data>
<data name="label25.TabIndex" type="System.Int32, mscorlib">
<value>37</value>
</data>
<data name="label25.Text" xml:space="preserve">
<value>4)grpc serviceName</value>
</data>
<data name="&gt;&gt;label25.Name" xml:space="preserve">
<value>label25</value>
</data>
<data name="&gt;&gt;label25.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="&gt;&gt;label25.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label25.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label24.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label24.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label24.Location" type="System.Drawing.Point, System.Drawing">
<value>529, 197</value>
</data>
<data name="label24.Size" type="System.Drawing.Size, System.Drawing">
<value>119, 12</value>
</data>
<data name="label24.TabIndex" type="System.Int32, mscorlib">
<value>35</value>
</data>
<data name="label24.Text" xml:space="preserve">
<value>3)QUIC key/Kcp seed</value>
</data>
<data name="&gt;&gt;label24.Name" xml:space="preserve">
<value>label24</value>
</data>
<data name="&gt;&gt;label24.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="&gt;&gt;label24.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label24.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="label23.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label23.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label23.Location" type="System.Drawing.Point, System.Drawing">
<value>465, 140</value>
</data>
<data name="label23.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value>
</data>
<data name="label23.TabIndex" type="System.Int32, mscorlib">
<value>34</value>
</data>
<data name="label23.Text" xml:space="preserve">
<value>4)QUIC securty</value>
</data>
<data name="&gt;&gt;label23.Name" xml:space="preserve">
<value>label23</value>
</data>
<data name="&gt;&gt;label23.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="&gt;&gt;label23.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label23.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="txtSNI.Location" type="System.Drawing.Point, System.Drawing">
<value>297, 7</value>
</data>
<data name="txtSNI.Size" type="System.Drawing.Size, System.Drawing">
<value>200, 21</value>
</data>
<data name="txtSNI.TabIndex" type="System.Int32, mscorlib">
<value>35</value>
</data>
<data name="&gt;&gt;txtSNI.Name" xml:space="preserve">
<value>txtSNI</value>
</data>
<data name="&gt;&gt;txtSNI.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="&gt;&gt;txtSNI.Parent" xml:space="preserve">
<value>panTlsMore</value>
</data>
<data name="&gt;&gt;txtSNI.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label22.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label22.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label22.Location" type="System.Drawing.Point, System.Drawing">
<value>267, 11</value>
</data>
<data name="label22.Size" type="System.Drawing.Size, System.Drawing">
<value>23, 12</value>
</data>
<data name="label22.TabIndex" type="System.Int32, mscorlib">
<value>34</value>
</data>
<data name="label22.Text" xml:space="preserve">
<value>SNI</value>
</data>
<data name="&gt;&gt;label22.Name" xml:space="preserve">
<value>label22</value>
</data>
<data name="&gt;&gt;label22.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="&gt;&gt;label22.Parent" xml:space="preserve">
<value>panTlsMore</value>
</data>
<data name="&gt;&gt;label22.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="label21.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label21.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label21.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 11</value>
</data>
<data name="label21.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value>
</data>
<data name="label21.TabIndex" type="System.Int32, mscorlib">
<value>31</value>
</data>
<data name="label21.Text" xml:space="preserve">
<value>allowInsecure</value>
</data>
<data name="&gt;&gt;label21.Name" xml:space="preserve">
<value>label21</value>
</data>
<data name="&gt;&gt;label21.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="&gt;&gt;label21.Parent" xml:space="preserve">
<value>panTlsMore</value>
</data>
<data name="&gt;&gt;label21.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="cmbAllowInsecure.Items" xml:space="preserve">
<value />
</data>
<data name="cmbAllowInsecure.Items1" xml:space="preserve">
<value>true</value>
</data>
<data name="cmbAllowInsecure.Items2" xml:space="preserve">
<value>false</value>
</data>
<data name="cmbAllowInsecure.Location" type="System.Drawing.Point, System.Drawing">
<value>100, 7</value>
</data>
<data name="cmbAllowInsecure.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 20</value>
</data>
<data name="cmbAllowInsecure.TabIndex" type="System.Int32, mscorlib">
<value>30</value>
</data>
<data name="&gt;&gt;cmbAllowInsecure.Name" xml:space="preserve">
<value>cmbAllowInsecure</value>
</data>
<data name="&gt;&gt;cmbAllowInsecure.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cmbAllowInsecure.Parent" xml:space="preserve">
<value>panTlsMore</value>
</data>
<data name="&gt;&gt;cmbAllowInsecure.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="panTlsMore.Location" type="System.Drawing.Point, System.Drawing">
<value>200, 232</value>
</data>
<data name="panTlsMore.Size" type="System.Drawing.Size, System.Drawing">
<value>500, 35</value>
</data>
<data name="panTlsMore.TabIndex" type="System.Int32, mscorlib">
<value>33</value>
</data>
<data name="&gt;&gt;panTlsMore.Name" xml:space="preserve">
<value>panTlsMore</value>
</data>
<data name="&gt;&gt;panTlsMore.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="&gt;&gt;panTlsMore.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;panTlsMore.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="label9.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label9.Location" type="System.Drawing.Point, System.Drawing">
<value>353, 32</value>
</data>
<data name="label9.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 12</value>
</data>
<data name="label9.TabIndex" type="System.Int32, mscorlib">
<value>15</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>*Default value tcp</value>
</data>
<data name="&gt;&gt;label9.Name" xml:space="preserve">
<value>label9</value>
</data>
<data name="&gt;&gt;label9.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="&gt;&gt;label9.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label9.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="label20.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label20.Location" type="System.Drawing.Point, System.Drawing">
<value>464, 124</value>
</data>
<data name="label20.Size" type="System.Drawing.Size, System.Drawing">
<value>203, 12</value>
</data>
<data name="label20.TabIndex" type="System.Int32, mscorlib">
<value>29</value>
</data>
<data name="label20.Text" xml:space="preserve">
<value>3)h2 host Separated by commas (,)</value>
</data>
<data name="&gt;&gt;label20.Name" xml:space="preserve">
<value>label20</value>
</data>
<data name="&gt;&gt;label20.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="&gt;&gt;label20.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label20.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="txtPath.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 169</value>
</data>
<data name="txtPath.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="txtPath.Size" type="System.Drawing.Size, System.Drawing">
<value>396, 54</value>
</data>
<data name="txtPath.TabIndex" type="System.Int32, mscorlib">
<value>28</value>
</data>
<data name="&gt;&gt;txtPath.Name" xml:space="preserve">
<value>txtPath</value>
</data>
<data name="&gt;&gt;txtPath.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="&gt;&gt;txtPath.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;txtPath.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="cmbNetwork.Items" xml:space="preserve">
<value>tcp</value>
</data>
<data name="cmbNetwork.Items1" xml:space="preserve">
<value>kcp</value>
</data>
<data name="cmbNetwork.Items2" xml:space="preserve">
<value>ws</value>
</data>
<data name="cmbNetwork.Items3" xml:space="preserve">
<value>h2</value>
</data>
<data name="cmbNetwork.Items4" xml:space="preserve">
<value>quic</value>
</data>
<data name="cmbNetwork.Items5" xml:space="preserve">
<value>grpc</value>
</data>
<data name="cmbNetwork.Location" type="System.Drawing.Point, System.Drawing">
<value>192, 28</value>
</data>
<data name="cmbNetwork.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 20</value>
</data>
<data name="cmbNetwork.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
</data>
<data name="&gt;&gt;cmbNetwork.Name" xml:space="preserve">
<value>cmbNetwork</value>
</data>
<data name="&gt;&gt;cmbNetwork.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cmbNetwork.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;cmbNetwork.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="label7.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label7.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 32</value>
</data>
<data name="label7.Size" type="System.Drawing.Size, System.Drawing">
<value>167, 12</value>
</data>
<data name="label7.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>Transport protocol(network)</value>
</data>
<data name="&gt;&gt;label7.Name" xml:space="preserve">
<value>label7</value>
</data>
<data name="&gt;&gt;label7.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="&gt;&gt;label7.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label7.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="label19.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label19.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 169</value>
</data>
<data name="label19.Size" type="System.Drawing.Size, System.Drawing">
<value>29, 12</value>
</data>
<data name="label19.TabIndex" type="System.Int32, mscorlib">
<value>27</value>
</data>
<data name="label19.Text" xml:space="preserve">
<value>Path</value>
</data>
<data name="&gt;&gt;label19.Name" xml:space="preserve">
<value>label19</value>
</data>
<data name="&gt;&gt;label19.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="&gt;&gt;label19.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label19.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="label18.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label18.Location" type="System.Drawing.Point, System.Drawing">
<value>529, 183</value>
</data>
<data name="label18.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 12</value>
</data>
<data name="label18.TabIndex" type="System.Int32, mscorlib">
<value>26</value>
</data>
<data name="label18.Text" xml:space="preserve">
<value>2)h2 path</value>
</data>
<data name="&gt;&gt;label18.Name" xml:space="preserve">
<value>label18</value>
</data>
<data name="&gt;&gt;label18.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="&gt;&gt;label18.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label18.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="label17.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label17.Location" type="System.Drawing.Point, System.Drawing">
<value>464, 109</value>
</data>
<data name="label17.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 12</value>
</data>
<data name="label17.TabIndex" type="System.Int32, mscorlib">
<value>25</value>
</data>
<data name="label17.Text" xml:space="preserve">
<value>2)ws host</value>
</data>
<data name="&gt;&gt;label17.Name" xml:space="preserve">
<value>label17</value>
</data>
<data name="&gt;&gt;label17.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="&gt;&gt;label17.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label17.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="label16.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label16.Location" type="System.Drawing.Point, System.Drawing">
<value>529, 169</value>
</data>
<data name="label16.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 12</value>
</data>
<data name="label16.TabIndex" type="System.Int32, mscorlib">
<value>24</value>
</data>
<data name="label16.Text" xml:space="preserve">
<value>1)ws path</value>
</data>
<data name="&gt;&gt;label16.Name" xml:space="preserve">
<value>label16</value>
</data>
<data name="&gt;&gt;label16.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="&gt;&gt;label16.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label16.ZOrder" xml:space="preserve">
<value>12</value>
</data>
<data name="label14.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label14.Location" type="System.Drawing.Point, System.Drawing">
<value>464, 94</value>
</data>
<data name="label14.Size" type="System.Drawing.Size, System.Drawing">
<value>215, 12</value>
</data>
<data name="label14.TabIndex" type="System.Int32, mscorlib">
<value>23</value>
</data>
<data name="label14.Text" xml:space="preserve">
<value>1)http host Separated by commas (,)</value>
</data>
<data name="&gt;&gt;label14.Name" xml:space="preserve">
<value>label14</value>
</data>
<data name="&gt;&gt;label14.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="&gt;&gt;label14.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label14.ZOrder" xml:space="preserve">
<value>13</value>
</data>
<data name="label15.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label15.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 243</value>
</data>
<data name="label15.Size" type="System.Drawing.Size, System.Drawing">
<value>23, 12</value>
</data>
<data name="label15.TabIndex" type="System.Int32, mscorlib">
<value>22</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>TLS</value>
</data>
<data name="&gt;&gt;label15.Name" xml:space="preserve">
<value>label15</value>
</data>
<data name="&gt;&gt;label15.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="&gt;&gt;label15.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label15.ZOrder" xml:space="preserve">
<value>14</value>
</data>
<data name="cmbStreamSecurity.Items" xml:space="preserve">
<value />
</data>
<data name="cmbStreamSecurity.Items1" xml:space="preserve">
<value>tls</value>
</data>
<data name="cmbStreamSecurity.Items2" xml:space="preserve">
<value>xtls</value>
</data>
<data name="cmbStreamSecurity.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 239</value>
</data>
<data name="cmbStreamSecurity.Size" type="System.Drawing.Size, System.Drawing">
<value>60, 20</value>
</data>
<data name="cmbStreamSecurity.TabIndex" type="System.Int32, mscorlib">
<value>21</value>
</data>
<data name="&gt;&gt;cmbStreamSecurity.Name" xml:space="preserve">
<value>cmbStreamSecurity</value>
</data>
<data name="&gt;&gt;cmbStreamSecurity.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cmbStreamSecurity.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;cmbStreamSecurity.ZOrder" xml:space="preserve">
<value>15</value>
</data>
<data name="label12.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label12.Location" type="System.Drawing.Point, System.Drawing">
<value>282, 68</value>
</data>
<data name="label12.Size" type="System.Drawing.Size, System.Drawing">
<value>293, 12</value>
</data>
<data name="label12.TabIndex" type="System.Int32, mscorlib">
<value>20</value>
</data>
<data name="label12.Text" xml:space="preserve">
<value>*tcp or kcp or QUIC camouflage type or grpc mode</value>
</data>
<data name="&gt;&gt;label12.Name" xml:space="preserve">
<value>label12</value>
</data>
<data name="&gt;&gt;label12.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="&gt;&gt;label12.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label12.ZOrder" xml:space="preserve">
<value>16</value>
</data>
<data name="txtRequestHost.Location" type="System.Drawing.Point, System.Drawing">
<value>158, 100</value>
</data>
<data name="txtRequestHost.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="txtRequestHost.Size" type="System.Drawing.Size, System.Drawing">
<value>300, 53</value>
</data>
<data name="txtRequestHost.TabIndex" type="System.Int32, mscorlib">
<value>16</value>
</data>
<data name="&gt;&gt;txtRequestHost.Name" xml:space="preserve">
<value>txtRequestHost</value>
</data>
<data name="&gt;&gt;txtRequestHost.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="&gt;&gt;txtRequestHost.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;txtRequestHost.ZOrder" xml:space="preserve">
<value>17</value>
</data>
<data name="label11.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label11.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 68</value>
</data>
<data name="label11.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value>
</data>
<data name="label11.TabIndex" type="System.Int32, mscorlib">
<value>19</value>
</data>
<data name="label11.Text" xml:space="preserve">
<value>Camouflage type</value>
</data>
<data name="&gt;&gt;label11.Name" xml:space="preserve">
<value>label11</value>
</data>
<data name="&gt;&gt;label11.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="&gt;&gt;label11.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label11.ZOrder" xml:space="preserve">
<value>18</value>
</data>
<data name="label10.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label10.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 100</value>
</data>
<data name="label10.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 12</value>
</data>
<data name="label10.TabIndex" type="System.Int32, mscorlib">
<value>17</value>
</data>
<data name="label10.Text" xml:space="preserve">
<value>Camouflage domain(host)</value>
</data>
<data name="&gt;&gt;label10.Name" xml:space="preserve">
<value>label10</value>
</data>
<data name="&gt;&gt;label10.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="&gt;&gt;label10.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label10.ZOrder" xml:space="preserve">
<value>19</value>
</data>
<data name="cmbHeaderType.Items" xml:space="preserve">
<value>none</value>
</data>
<data name="cmbHeaderType.Items1" xml:space="preserve">
<value>http</value>
</data>
<data name="cmbHeaderType.Items2" xml:space="preserve">
<value>srtp</value>
</data>
<data name="cmbHeaderType.Items3" xml:space="preserve">
<value>utp</value>
</data>
<data name="cmbHeaderType.Items4" xml:space="preserve">
<value>wechat-video</value>
</data>
<data name="cmbHeaderType.Items5" xml:space="preserve">
<value>dtls</value>
</data>
<data name="cmbHeaderType.Items6" xml:space="preserve">
<value>wireguard</value>
</data>
<data name="cmbHeaderType.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 64</value>
</data>
<data name="cmbHeaderType.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 20</value>
</data>
<data name="cmbHeaderType.TabIndex" type="System.Int32, mscorlib">
<value>18</value>
</data>
<data name="&gt;&gt;cmbHeaderType.Name" xml:space="preserve">
<value>cmbHeaderType</value>
</data>
<data name="&gt;&gt;cmbHeaderType.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cmbHeaderType.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;cmbHeaderType.ZOrder" xml:space="preserve">
<value>20</value>
</data>
<data name="groupBox2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="groupBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 240</value>
</data>
<data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>723, 281</value>
</data>
<data name="groupBox2.TabIndex" type="System.Int32, mscorlib">
<value>21</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>Transport</value>
</data>
<data name="&gt;&gt;groupBox2.Name" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;groupBox2.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;groupBox2.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="label8.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@@ -1021,7 +274,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label8.ZOrder" xml:space="preserve">
<value>5</value>
<value>4</value>
</data>
<data name="cmbSecurity.Items" xml:space="preserve">
<value>none</value>
@@ -1033,7 +286,7 @@
<value>211, 20</value>
</data>
<data name="cmbSecurity.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
<value>4</value>
</data>
<data name="&gt;&gt;cmbSecurity.Name" xml:space="preserve">
<value>cmbSecurity</value>
@@ -1045,7 +298,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cmbSecurity.ZOrder" xml:space="preserve">
<value>6</value>
<value>5</value>
</data>
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 185</value>
@@ -1054,7 +307,7 @@
<value>211, 21</value>
</data>
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
<value>5</value>
</data>
<data name="&gt;&gt;txtRemarks.Name" xml:space="preserve">
<value>txtRemarks</value>
@@ -1066,7 +319,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtRemarks.ZOrder" xml:space="preserve">
<value>7</value>
<value>6</value>
</data>
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1093,7 +346,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label6.ZOrder" xml:space="preserve">
<value>8</value>
<value>7</value>
</data>
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1120,7 +373,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label5.ZOrder" xml:space="preserve">
<value>9</value>
<value>8</value>
</data>
<data name="txtId.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 91</value>
@@ -1129,7 +382,7 @@
<value>278, 21</value>
</data>
<data name="txtId.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
<value>2</value>
</data>
<data name="&gt;&gt;txtId.Name" xml:space="preserve">
<value>txtId</value>
@@ -1141,7 +394,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtId.ZOrder" xml:space="preserve">
<value>10</value>
<value>9</value>
</data>
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1168,7 +421,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>11</value>
<value>10</value>
</data>
<data name="txtPort.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 59</value>
@@ -1177,7 +430,7 @@
<value>143, 21</value>
</data>
<data name="txtPort.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
<value>1</value>
</data>
<data name="&gt;&gt;txtPort.Name" xml:space="preserve">
<value>txtPort</value>
@@ -1189,7 +442,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtPort.ZOrder" xml:space="preserve">
<value>12</value>
<value>11</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1216,7 +469,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>13</value>
<value>12</value>
</data>
<data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 27</value>
@@ -1225,7 +478,7 @@
<value>359, 21</value>
</data>
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
<value>0</value>
</data>
<data name="&gt;&gt;txtAddress.Name" xml:space="preserve">
<value>txtAddress</value>
@@ -1237,7 +490,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtAddress.ZOrder" xml:space="preserve">
<value>14</value>
<value>13</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1264,7 +517,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>15</value>
<value>14</value>
</data>
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@@ -1273,7 +526,7 @@
<value>0, 10</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>729, 524</value>
<value>729, 221</value>
</data>
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
@@ -1321,7 +574,7 @@
<value>Bottom</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 534</value>
<value>0, 461</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>729, 60</value>
@@ -1339,7 +592,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>1</value>
<value>2</value>
</data>
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
@@ -1363,7 +616,55 @@
<value>$this</value>
</data>
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>2</value>
<value>3</value>
</data>
<data name="transportControl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="transportControl.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="transportControl.Size" type="System.Drawing.Size, System.Drawing">
<value>729, 230</value>
</data>
<data name="transportControl.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;transportControl.Name" xml:space="preserve">
<value>transportControl</value>
</data>
<data name="&gt;&gt;transportControl.Type" xml:space="preserve">
<value>v2rayN.Forms.ServerTransportControl, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;transportControl.Parent" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;transportControl.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="panel3.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="panel3.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 231</value>
</data>
<data name="panel3.Size" type="System.Drawing.Size, System.Drawing">
<value>729, 230</value>
</data>
<data name="panel3.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="&gt;&gt;panel3.Name" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;panel3.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="&gt;&gt;panel3.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel3.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@@ -1375,7 +676,7 @@
<value>6, 12</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>729, 594</value>
<value>729, 521</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Edit or add a [VLESS] server</value>

View File

@@ -136,126 +136,6 @@
<data name="label13.Text" xml:space="preserve">
<value>*手填,方便识别管理</value>
</data>
<data name="label24.Size" type="System.Drawing.Size, System.Drawing">
<value>149, 12</value>
</data>
<data name="label24.Text" xml:space="preserve">
<value>3)QUIC 加密密钥/Kcp seed</value>
</data>
<data name="label23.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value>
</data>
<data name="label23.Text" xml:space="preserve">
<value>4)QUIC 加密方式</value>
</data>
<data name="label21.Size" type="System.Drawing.Size, System.Drawing">
<value>167, 12</value>
</data>
<data name="label21.Text" xml:space="preserve">
<value>跳过证书验证(allowInsecure)</value>
</data>
<data name="cmbAllowInsecure.Location" type="System.Drawing.Point, System.Drawing">
<value>181, 7</value>
</data>
<data name="label9.Location" type="System.Drawing.Point, System.Drawing">
<value>353, 36</value>
</data>
<data name="label9.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 12</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>*默认tcp,选错会无法连接</value>
</data>
<data name="label20.Size" type="System.Drawing.Size, System.Drawing">
<value>149, 12</value>
</data>
<data name="label20.Text" xml:space="preserve">
<value>3)h2 host中间逗号(,)隔开</value>
</data>
<data name="txtPath.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 168</value>
</data>
<data name="cmbNetwork.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 32</value>
</data>
<data name="cmbNetwork.Size" type="System.Drawing.Size, System.Drawing">
<value>220, 20</value>
</data>
<data name="label7.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 36</value>
</data>
<data name="label7.Size" type="System.Drawing.Size, System.Drawing">
<value>107, 12</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>传输协议(network)</value>
</data>
<data name="label19.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 168</value>
</data>
<data name="label19.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label19.Text" xml:space="preserve">
<value>路径(path)</value>
</data>
<data name="label14.Size" type="System.Drawing.Size, System.Drawing">
<value>161, 12</value>
</data>
<data name="label14.Text" xml:space="preserve">
<value>1)http host中间逗号(,)隔开</value>
</data>
<data name="label15.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 241</value>
</data>
<data name="label15.Size" type="System.Drawing.Size, System.Drawing">
<value>107, 12</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>底层传输安全(tls)</value>
</data>
<data name="cmbStreamSecurity.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 237</value>
</data>
<data name="label12.Location" type="System.Drawing.Point, System.Drawing">
<value>282, 71</value>
</data>
<data name="label12.Size" type="System.Drawing.Size, System.Drawing">
<value>197, 12</value>
</data>
<data name="label12.Text" xml:space="preserve">
<value>*tcp或kcp或QUIC伪装类型或grpc模式</value>
</data>
<data name="txtRequestHost.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 102</value>
</data>
<data name="txtRequestHost.Size" type="System.Drawing.Size, System.Drawing">
<value>334, 51</value>
</data>
<data name="label11.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 71</value>
</data>
<data name="label11.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value>
</data>
<data name="label11.Text" xml:space="preserve">
<value>伪装类型(type)</value>
</data>
<data name="label10.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 102</value>
</data>
<data name="label10.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value>
</data>
<data name="label10.Text" xml:space="preserve">
<value>伪装域名(host)</value>
</data>
<data name="cmbHeaderType.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 67</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>底层传输方式(transport)</value>
</data>
<data name="label8.Location" type="System.Drawing.Point, System.Drawing">
<value>353, 158</value>
</data>
@@ -307,37 +187,6 @@
<data name="btnOK.Text" xml:space="preserve">
<value>确定(&amp;O)</value>
</data>
<data name="MenuItemImportClient.Size" type="System.Drawing.Size, System.Drawing">
<value>171, 22</value>
</data>
<data name="MenuItemImportClient.Text" xml:space="preserve">
<value>导入客户端配置</value>
</data>
<data name="MenuItemImportServer.Size" type="System.Drawing.Size, System.Drawing">
<value>171, 22</value>
</data>
<data name="MenuItemImportServer.Text" xml:space="preserve">
<value>导入服务端配置</value>
</data>
<data name="toolStripSeparator1.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 6</value>
</data>
<data name="MenuItemImportClipboard.Size" type="System.Drawing.Size, System.Drawing">
<value>171, 22</value>
</data>
<data name="MenuItemImportClipboard.Text" xml:space="preserve">
<value>从剪贴板导入URL</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="MenuItem1.Enabled" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="MenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>92, 21</value>
</data>
<data name="MenuItem1.Text" xml:space="preserve">
<value>导入配置文件</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>编辑或添加[VLESS]服务器</value>
</data>

View File

@@ -31,12 +31,8 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddServer6Form));
this.btnClose = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label21 = new System.Windows.Forms.Label();
this.cmbAllowInsecure = new System.Windows.Forms.ComboBox();
this.label15 = new System.Windows.Forms.Label();
this.cmbStreamSecurity = new System.Windows.Forms.ComboBox();
this.cmbFlow = new System.Windows.Forms.ComboBox();
this.label4 = new System.Windows.Forms.Label();
this.txtSNI = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.txtRemarks = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
@@ -46,10 +42,13 @@
this.label2 = new System.Windows.Forms.Label();
this.txtAddress = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.panel3 = new System.Windows.Forms.Panel();
this.transportControl = new v2rayN.Forms.ServerTransportControl();
this.panel2 = new System.Windows.Forms.Panel();
this.btnOK = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.groupBox1.SuspendLayout();
this.panel3.SuspendLayout();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
@@ -63,12 +62,8 @@
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label21);
this.groupBox1.Controls.Add(this.cmbAllowInsecure);
this.groupBox1.Controls.Add(this.label15);
this.groupBox1.Controls.Add(this.cmbStreamSecurity);
this.groupBox1.Controls.Add(this.cmbFlow);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.txtSNI);
this.groupBox1.Controls.Add(this.label13);
this.groupBox1.Controls.Add(this.txtRemarks);
this.groupBox1.Controls.Add(this.label6);
@@ -82,47 +77,17 @@
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
// label21
// cmbFlow
//
resources.ApplyResources(this.label21, "label21");
this.label21.Name = "label21";
//
// cmbAllowInsecure
//
this.cmbAllowInsecure.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbAllowInsecure.FormattingEnabled = true;
this.cmbAllowInsecure.Items.AddRange(new object[] {
resources.GetString("cmbAllowInsecure.Items"),
resources.GetString("cmbAllowInsecure.Items1"),
resources.GetString("cmbAllowInsecure.Items2")});
resources.ApplyResources(this.cmbAllowInsecure, "cmbAllowInsecure");
this.cmbAllowInsecure.Name = "cmbAllowInsecure";
//
// label15
//
resources.ApplyResources(this.label15, "label15");
this.label15.Name = "label15";
//
// cmbStreamSecurity
//
this.cmbStreamSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbStreamSecurity.FormattingEnabled = true;
this.cmbStreamSecurity.Items.AddRange(new object[] {
resources.GetString("cmbStreamSecurity.Items"),
resources.GetString("cmbStreamSecurity.Items1")});
resources.ApplyResources(this.cmbStreamSecurity, "cmbStreamSecurity");
this.cmbStreamSecurity.Name = "cmbStreamSecurity";
this.cmbFlow.FormattingEnabled = true;
resources.ApplyResources(this.cmbFlow, "cmbFlow");
this.cmbFlow.Name = "cmbFlow";
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// txtSNI
//
resources.ApplyResources(this.txtSNI, "txtSNI");
this.txtSNI.Name = "txtSNI";
//
// label13
//
resources.ApplyResources(this.label13, "label13");
@@ -168,6 +133,18 @@
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// panel3
//
this.panel3.Controls.Add(this.transportControl);
resources.ApplyResources(this.panel3, "panel3");
this.panel3.Name = "panel3";
//
// transportControl
//
this.transportControl.AllowXtls = false;
resources.ApplyResources(this.transportControl, "transportControl");
this.transportControl.Name = "transportControl";
//
// panel2
//
this.panel2.Controls.Add(this.btnClose);
@@ -193,6 +170,7 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnClose;
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.panel3);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
@@ -201,6 +179,7 @@
this.Load += new System.EventHandler(this.AddServer6Form_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.panel3.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
@@ -222,11 +201,9 @@
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Panel panel3;
private ServerTransportControl transportControl;
private System.Windows.Forms.ComboBox cmbFlow;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtSNI;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.ComboBox cmbStreamSecurity;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.ComboBox cmbAllowInsecure;
}
}

View File

@@ -14,14 +14,16 @@ namespace v2rayN.Forms
private void AddServer6Form_Load(object sender, EventArgs e)
{
if (EditIndex >= 0)
cmbFlow.Items.AddRange(Global.xtlsFlows.ToArray());
transportControl.AllowXtls = true;
if (vmessItem != null)
{
vmessItem = config.vmess[EditIndex];
BindingServer();
}
else
{
vmessItem = new VmessItem();
vmessItem.groupId = groupId;
ClearServer();
}
}
@@ -31,14 +33,13 @@ namespace v2rayN.Forms
/// </summary>
private void BindingServer()
{
txtAddress.Text = vmessItem.address;
txtPort.Text = vmessItem.port.ToString();
txtId.Text = vmessItem.id;
txtSNI.Text = vmessItem.sni;
cmbFlow.Text = vmessItem.flow;
txtRemarks.Text = vmessItem.remarks;
cmbStreamSecurity.Text = vmessItem.streamSecurity;
cmbAllowInsecure.Text = vmessItem.allowInsecure;
transportControl.BindingServer(vmessItem);
}
@@ -50,10 +51,10 @@ namespace v2rayN.Forms
txtAddress.Text = "";
txtPort.Text = "";
txtId.Text = "";
txtSNI.Text = "";
txtRemarks.Text = "";
cmbStreamSecurity.Text = "tls";
cmbAllowInsecure.Text = "";
cmbFlow.Text = "";
txtRemarks.Text = "";
transportControl.ClearServer(vmessItem);
}
private void btnOK_Click(object sender, EventArgs e)
@@ -61,10 +62,8 @@ namespace v2rayN.Forms
string address = txtAddress.Text;
string port = txtPort.Text;
string id = txtId.Text;
string sni = txtSNI.Text;
string flow = cmbFlow.Text;
string remarks = txtRemarks.Text;
string streamSecurity = cmbStreamSecurity.Text;
string allowInsecure = cmbAllowInsecure.Text;
if (Utils.IsNullOrEmpty(address))
{
@@ -80,17 +79,17 @@ namespace v2rayN.Forms
{
UI.Show(UIRes.I18N("FillPassword"));
return;
}
}
transportControl.EndBindingServer();
vmessItem.address = address;
vmessItem.port = Utils.ToInt(port);
vmessItem.id = id;
vmessItem.sni = sni.Replace(" ", "");
vmessItem.flow = flow;
vmessItem.remarks = remarks;
vmessItem.streamSecurity = streamSecurity;
vmessItem.allowInsecure = allowInsecure;
if (ConfigHandler.AddTrojanServer(ref config, vmessItem, EditIndex) == 0)
if (ConfigHandler.AddTrojanServer(ref config, vmessItem) == 0)
{
this.DialogResult = DialogResult.OK;
}

View File

@@ -117,6 +117,10 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="btnClose.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<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>
@@ -143,124 +147,27 @@
<data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label21.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
<data name="cmbFlow.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 123</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label21.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
<data name="cmbFlow.Size" type="System.Drawing.Size, System.Drawing">
<value>211, 20</value>
</data>
<data name="label21.Location" type="System.Drawing.Point, System.Drawing">
<value>224, 189</value>
</data>
<data name="label21.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value>
</data>
<data name="label21.TabIndex" type="System.Int32, mscorlib">
<value>33</value>
</data>
<data name="label21.Text" xml:space="preserve">
<value>allowInsecure</value>
</data>
<data name="&gt;&gt;label21.Name" xml:space="preserve">
<value>label21</value>
</data>
<data name="&gt;&gt;label21.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="&gt;&gt;label21.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label21.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="cmbAllowInsecure.Items" xml:space="preserve">
<value />
</data>
<data name="cmbAllowInsecure.Items1" xml:space="preserve">
<value>true</value>
</data>
<data name="cmbAllowInsecure.Items2" xml:space="preserve">
<value>false</value>
</data>
<data name="cmbAllowInsecure.Location" type="System.Drawing.Point, System.Drawing">
<value>312, 185</value>
</data>
<data name="cmbAllowInsecure.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 20</value>
</data>
<data name="cmbAllowInsecure.TabIndex" type="System.Int32, mscorlib">
<value>32</value>
</data>
<data name="&gt;&gt;cmbAllowInsecure.Name" xml:space="preserve">
<value>cmbAllowInsecure</value>
</data>
<data name="&gt;&gt;cmbAllowInsecure.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cmbAllowInsecure.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cmbAllowInsecure.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="label15.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label15.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label15.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 189</value>
</data>
<data name="label15.Size" type="System.Drawing.Size, System.Drawing">
<value>23, 12</value>
</data>
<data name="label15.TabIndex" type="System.Int32, mscorlib">
<value>26</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>TLS</value>
</data>
<data name="&gt;&gt;label15.Name" xml:space="preserve">
<value>label15</value>
</data>
<data name="&gt;&gt;label15.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="&gt;&gt;label15.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label15.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="cmbStreamSecurity.Items" xml:space="preserve">
<value>tls</value>
</data>
<data name="cmbStreamSecurity.Items1" xml:space="preserve">
<value>xtls</value>
</data>
<data name="cmbStreamSecurity.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 185</value>
</data>
<data name="cmbStreamSecurity.Size" type="System.Drawing.Size, System.Drawing">
<value>60, 20</value>
</data>
<data name="cmbStreamSecurity.TabIndex" type="System.Int32, mscorlib">
<value>25</value>
</data>
<data name="&gt;&gt;cmbStreamSecurity.Name" xml:space="preserve">
<value>cmbStreamSecurity</value>
</data>
<data name="&gt;&gt;cmbStreamSecurity.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cmbStreamSecurity.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cmbStreamSecurity.ZOrder" xml:space="preserve">
<data name="cmbFlow.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;cmbFlow.Name" xml:space="preserve">
<value>cmbFlow</value>
</data>
<data name="&gt;&gt;cmbFlow.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cmbFlow.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cmbFlow.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@@ -268,16 +175,16 @@
<value>NoControl</value>
</data>
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 156</value>
<value>12, 127</value>
</data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>23, 12</value>
<value>29, 12</value>
</data>
<data name="label4.TabIndex" type="System.Int32, mscorlib">
<value>24</value>
<value>27</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>SNI</value>
<value>Flow</value>
</data>
<data name="&gt;&gt;label4.Name" xml:space="preserve">
<value>label4</value>
@@ -289,34 +196,16 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="txtSNI.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 152</value>
</data>
<data name="txtSNI.Size" type="System.Drawing.Size, System.Drawing">
<value>359, 21</value>
</data>
<data name="txtSNI.TabIndex" type="System.Int32, mscorlib">
<value>23</value>
</data>
<data name="&gt;&gt;txtSNI.Name" xml:space="preserve">
<value>txtSNI</value>
</data>
<data name="&gt;&gt;txtSNI.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="&gt;&gt;txtSNI.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtSNI.ZOrder" xml:space="preserve">
<value>5</value>
<value>1</value>
</data>
<data name="label13.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label13.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label13.Location" type="System.Drawing.Point, System.Drawing">
<value>428, 124</value>
<value>428, 158</value>
</data>
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 12</value>
@@ -337,16 +226,16 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label13.ZOrder" xml:space="preserve">
<value>6</value>
<value>2</value>
</data>
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 121</value>
<value>127, 155</value>
</data>
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
<value>265, 21</value>
</data>
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
<value>4</value>
</data>
<data name="&gt;&gt;txtRemarks.Name" xml:space="preserve">
<value>txtRemarks</value>
@@ -358,13 +247,16 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtRemarks.ZOrder" xml:space="preserve">
<value>7</value>
<value>3</value>
</data>
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label6.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 125</value>
<value>12, 159</value>
</data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value>
@@ -385,7 +277,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label6.ZOrder" xml:space="preserve">
<value>8</value>
<value>4</value>
</data>
<data name="txtId.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 91</value>
@@ -394,7 +286,7 @@
<value>265, 21</value>
</data>
<data name="txtId.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
<value>2</value>
</data>
<data name="&gt;&gt;txtId.Name" xml:space="preserve">
<value>txtId</value>
@@ -406,11 +298,14 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtId.ZOrder" xml:space="preserve">
<value>9</value>
<value>5</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, 93</value>
</data>
@@ -433,7 +328,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>10</value>
<value>6</value>
</data>
<data name="txtPort.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 59</value>
@@ -442,7 +337,7 @@
<value>194, 21</value>
</data>
<data name="txtPort.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
<value>1</value>
</data>
<data name="&gt;&gt;txtPort.Name" xml:space="preserve">
<value>txtPort</value>
@@ -454,11 +349,14 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtPort.ZOrder" xml:space="preserve">
<value>11</value>
<value>7</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 62</value>
</data>
@@ -481,7 +379,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>12</value>
<value>8</value>
</data>
<data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 27</value>
@@ -490,7 +388,7 @@
<value>359, 21</value>
</data>
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
<value>0</value>
</data>
<data name="&gt;&gt;txtAddress.Name" xml:space="preserve">
<value>txtAddress</value>
@@ -502,11 +400,14 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtAddress.ZOrder" xml:space="preserve">
<value>13</value>
<value>9</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 31</value>
</data>
@@ -529,7 +430,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>14</value>
<value>10</value>
</data>
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@@ -538,7 +439,7 @@
<value>0, 10</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>547, 221</value>
<value>707, 191</value>
</data>
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
@@ -558,6 +459,57 @@
<data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="transportControl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="transportControl.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="transportControl.Size" type="System.Drawing.Size, System.Drawing">
<value>707, 230</value>
</data>
<data name="transportControl.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;transportControl.Name" xml:space="preserve">
<value>transportControl</value>
</data>
<data name="&gt;&gt;transportControl.Type" xml:space="preserve">
<value>v2rayN.Forms.ServerTransportControl, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;transportControl.Parent" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;transportControl.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="panel3.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="panel3.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 201</value>
</data>
<data name="panel3.Size" type="System.Drawing.Size, System.Drawing">
<value>707, 230</value>
</data>
<data name="panel3.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="&gt;&gt;panel3.Name" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;panel3.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="&gt;&gt;panel3.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel3.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="btnOK.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
<value>303, 17</value>
</data>
@@ -586,10 +538,10 @@
<value>Bottom</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 231</value>
<value>0, 431</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>547, 60</value>
<value>707, 60</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
@@ -604,7 +556,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>1</value>
<value>2</value>
</data>
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
@@ -613,7 +565,7 @@
<value>0, 0</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>547, 10</value>
<value>707, 10</value>
</data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
@@ -628,7 +580,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>2</value>
<value>3</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@@ -637,7 +589,7 @@
<value>6, 12</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>547, 291</value>
<value>707, 491</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Edit or add a [Trojan] server</value>

View File

@@ -121,24 +121,11 @@
<value>取消(&amp;C)</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label21.Size" type="System.Drawing.Size, System.Drawing">
<value>167, 12</value>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label21.Text" xml:space="preserve">
<value>跳过证书验证(allowInsecure)</value>
</data>
<data name="cmbAllowInsecure.Location" type="System.Drawing.Point, System.Drawing">
<value>406, 185</value>
</data>
<data name="label15.Size" type="System.Drawing.Size, System.Drawing">
<value>107, 12</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>底层传输安全(tls)</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="cmbStreamSecurity.Enabled" type="System.Boolean, mscorlib">
<value>False</value>
<data name="label4.Text" xml:space="preserve">
<value>流控(flow)</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>*手填,方便识别管理</value>

View File

@@ -33,32 +33,6 @@
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnGUID = new System.Windows.Forms.Button();
this.label13 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label25 = new System.Windows.Forms.Label();
this.label24 = new System.Windows.Forms.Label();
this.label23 = new System.Windows.Forms.Label();
this.panTlsMore = new System.Windows.Forms.Panel();
this.txtSNI = new System.Windows.Forms.TextBox();
this.label22 = new System.Windows.Forms.Label();
this.label21 = new System.Windows.Forms.Label();
this.cmbAllowInsecure = new System.Windows.Forms.ComboBox();
this.label9 = new System.Windows.Forms.Label();
this.label20 = new System.Windows.Forms.Label();
this.txtPath = new System.Windows.Forms.TextBox();
this.cmbNetwork = new System.Windows.Forms.ComboBox();
this.label7 = new System.Windows.Forms.Label();
this.label19 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.cmbStreamSecurity = new System.Windows.Forms.ComboBox();
this.label12 = new System.Windows.Forms.Label();
this.txtRequestHost = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.cmbHeaderType = new System.Windows.Forms.ComboBox();
this.label8 = new System.Windows.Forms.Label();
this.cmbSecurity = new System.Windows.Forms.ComboBox();
this.txtRemarks = new System.Windows.Forms.TextBox();
@@ -81,11 +55,12 @@
this.MenuItemImportServer = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.MenuItemImportClipboard = new System.Windows.Forms.ToolStripMenuItem();
this.panel3 = new System.Windows.Forms.Panel();
this.transportControl = new v2rayN.Forms.ServerTransportControl();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.panTlsMore.SuspendLayout();
this.panel2.SuspendLayout();
this.menuServer.SuspendLayout();
this.panel3.SuspendLayout();
this.SuspendLayout();
//
// btnClose
@@ -100,7 +75,6 @@
//
this.groupBox1.Controls.Add(this.btnGUID);
this.groupBox1.Controls.Add(this.label13);
this.groupBox1.Controls.Add(this.groupBox2);
this.groupBox1.Controls.Add(this.label8);
this.groupBox1.Controls.Add(this.cmbSecurity);
this.groupBox1.Controls.Add(this.txtRemarks);
@@ -130,194 +104,6 @@
resources.ApplyResources(this.label13, "label13");
this.label13.Name = "label13";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.label25);
this.groupBox2.Controls.Add(this.label24);
this.groupBox2.Controls.Add(this.label23);
this.groupBox2.Controls.Add(this.panTlsMore);
this.groupBox2.Controls.Add(this.label9);
this.groupBox2.Controls.Add(this.label20);
this.groupBox2.Controls.Add(this.txtPath);
this.groupBox2.Controls.Add(this.cmbNetwork);
this.groupBox2.Controls.Add(this.label7);
this.groupBox2.Controls.Add(this.label19);
this.groupBox2.Controls.Add(this.label18);
this.groupBox2.Controls.Add(this.label17);
this.groupBox2.Controls.Add(this.label16);
this.groupBox2.Controls.Add(this.label14);
this.groupBox2.Controls.Add(this.label15);
this.groupBox2.Controls.Add(this.cmbStreamSecurity);
this.groupBox2.Controls.Add(this.label12);
this.groupBox2.Controls.Add(this.txtRequestHost);
this.groupBox2.Controls.Add(this.label11);
this.groupBox2.Controls.Add(this.label10);
this.groupBox2.Controls.Add(this.cmbHeaderType);
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.Name = "groupBox2";
this.groupBox2.TabStop = false;
//
// label25
//
resources.ApplyResources(this.label25, "label25");
this.label25.Name = "label25";
//
// label24
//
resources.ApplyResources(this.label24, "label24");
this.label24.Name = "label24";
//
// label23
//
resources.ApplyResources(this.label23, "label23");
this.label23.Name = "label23";
//
// panTlsMore
//
this.panTlsMore.Controls.Add(this.txtSNI);
this.panTlsMore.Controls.Add(this.label22);
this.panTlsMore.Controls.Add(this.label21);
this.panTlsMore.Controls.Add(this.cmbAllowInsecure);
resources.ApplyResources(this.panTlsMore, "panTlsMore");
this.panTlsMore.Name = "panTlsMore";
//
// txtSNI
//
resources.ApplyResources(this.txtSNI, "txtSNI");
this.txtSNI.Name = "txtSNI";
//
// label22
//
resources.ApplyResources(this.label22, "label22");
this.label22.Name = "label22";
//
// label21
//
resources.ApplyResources(this.label21, "label21");
this.label21.Name = "label21";
//
// cmbAllowInsecure
//
this.cmbAllowInsecure.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbAllowInsecure.FormattingEnabled = true;
this.cmbAllowInsecure.Items.AddRange(new object[] {
resources.GetString("cmbAllowInsecure.Items"),
resources.GetString("cmbAllowInsecure.Items1"),
resources.GetString("cmbAllowInsecure.Items2")});
resources.ApplyResources(this.cmbAllowInsecure, "cmbAllowInsecure");
this.cmbAllowInsecure.Name = "cmbAllowInsecure";
//
// label9
//
resources.ApplyResources(this.label9, "label9");
this.label9.Name = "label9";
//
// label20
//
resources.ApplyResources(this.label20, "label20");
this.label20.Name = "label20";
//
// txtPath
//
resources.ApplyResources(this.txtPath, "txtPath");
this.txtPath.Name = "txtPath";
//
// cmbNetwork
//
this.cmbNetwork.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbNetwork.FormattingEnabled = true;
this.cmbNetwork.Items.AddRange(new object[] {
resources.GetString("cmbNetwork.Items"),
resources.GetString("cmbNetwork.Items1"),
resources.GetString("cmbNetwork.Items2"),
resources.GetString("cmbNetwork.Items3"),
resources.GetString("cmbNetwork.Items4"),
resources.GetString("cmbNetwork.Items5")});
resources.ApplyResources(this.cmbNetwork, "cmbNetwork");
this.cmbNetwork.Name = "cmbNetwork";
this.cmbNetwork.SelectedIndexChanged += new System.EventHandler(this.cmbNetwork_SelectedIndexChanged);
//
// label7
//
resources.ApplyResources(this.label7, "label7");
this.label7.Name = "label7";
//
// label19
//
resources.ApplyResources(this.label19, "label19");
this.label19.Name = "label19";
//
// label18
//
resources.ApplyResources(this.label18, "label18");
this.label18.Name = "label18";
//
// label17
//
resources.ApplyResources(this.label17, "label17");
this.label17.Name = "label17";
//
// label16
//
resources.ApplyResources(this.label16, "label16");
this.label16.Name = "label16";
//
// label14
//
resources.ApplyResources(this.label14, "label14");
this.label14.Name = "label14";
//
// label15
//
resources.ApplyResources(this.label15, "label15");
this.label15.Name = "label15";
//
// cmbStreamSecurity
//
this.cmbStreamSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbStreamSecurity.FormattingEnabled = true;
this.cmbStreamSecurity.Items.AddRange(new object[] {
resources.GetString("cmbStreamSecurity.Items"),
resources.GetString("cmbStreamSecurity.Items1")});
resources.ApplyResources(this.cmbStreamSecurity, "cmbStreamSecurity");
this.cmbStreamSecurity.Name = "cmbStreamSecurity";
this.cmbStreamSecurity.SelectedIndexChanged += new System.EventHandler(this.cmbStreamSecurity_SelectedIndexChanged);
//
// label12
//
resources.ApplyResources(this.label12, "label12");
this.label12.Name = "label12";
//
// txtRequestHost
//
resources.ApplyResources(this.txtRequestHost, "txtRequestHost");
this.txtRequestHost.Name = "txtRequestHost";
//
// label11
//
resources.ApplyResources(this.label11, "label11");
this.label11.Name = "label11";
//
// label10
//
resources.ApplyResources(this.label10, "label10");
this.label10.Name = "label10";
//
// cmbHeaderType
//
this.cmbHeaderType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbHeaderType.FormattingEnabled = true;
this.cmbHeaderType.Items.AddRange(new object[] {
resources.GetString("cmbHeaderType.Items"),
resources.GetString("cmbHeaderType.Items1"),
resources.GetString("cmbHeaderType.Items2"),
resources.GetString("cmbHeaderType.Items3"),
resources.GetString("cmbHeaderType.Items4"),
resources.GetString("cmbHeaderType.Items5"),
resources.GetString("cmbHeaderType.Items6")});
resources.ApplyResources(this.cmbHeaderType, "cmbHeaderType");
this.cmbHeaderType.Name = "cmbHeaderType";
//
// label8
//
resources.ApplyResources(this.label8, "label8");
@@ -327,12 +113,6 @@
//
this.cmbSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbSecurity.FormattingEnabled = true;
this.cmbSecurity.Items.AddRange(new object[] {
resources.GetString("cmbSecurity.Items"),
resources.GetString("cmbSecurity.Items1"),
resources.GetString("cmbSecurity.Items2"),
resources.GetString("cmbSecurity.Items3"),
resources.GetString("cmbSecurity.Items4")});
resources.ApplyResources(this.cmbSecurity, "cmbSecurity");
this.cmbSecurity.Name = "cmbSecurity";
//
@@ -450,12 +230,25 @@
resources.ApplyResources(this.MenuItemImportClipboard, "MenuItemImportClipboard");
this.MenuItemImportClipboard.Click += new System.EventHandler(this.MenuItemImportClipboard_Click);
//
// panel3
//
this.panel3.Controls.Add(this.transportControl);
resources.ApplyResources(this.panel3, "panel3");
this.panel3.Name = "panel3";
//
// transportControl
//
this.transportControl.AllowXtls = false;
resources.ApplyResources(this.transportControl, "transportControl");
this.transportControl.Name = "transportControl";
//
// AddServerForm
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnClose;
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.panel3);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Controls.Add(this.menuServer);
@@ -464,13 +257,10 @@
this.Load += new System.EventHandler(this.AddServerForm_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.panTlsMore.ResumeLayout(false);
this.panTlsMore.PerformLayout();
this.panel2.ResumeLayout(false);
this.menuServer.ResumeLayout(false);
this.menuServer.PerformLayout();
this.panel3.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@@ -493,42 +283,18 @@
private System.Windows.Forms.TextBox txtAddress;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox cmbSecurity;
private System.Windows.Forms.ComboBox cmbNetwork;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.TextBox txtRequestHost;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.ComboBox cmbHeaderType;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.MenuStrip menuServer;
private System.Windows.Forms.ToolStripMenuItem MenuItem1;
private System.Windows.Forms.ToolStripMenuItem MenuItemImportClient;
private System.Windows.Forms.ToolStripMenuItem MenuItemImportServer;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.ComboBox cmbStreamSecurity;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem MenuItemImportClipboard;
private System.Windows.Forms.Button btnGUID;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.TextBox txtPath;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.ComboBox cmbAllowInsecure;
private System.Windows.Forms.Panel panTlsMore;
private System.Windows.Forms.Label label24;
private System.Windows.Forms.Label label23;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.TextBox txtSNI;
private System.Windows.Forms.Label label25;
private System.Windows.Forms.Panel panel3;
private ServerTransportControl transportControl;
}
}

View File

@@ -15,14 +15,17 @@ namespace v2rayN.Forms
private void AddServerForm_Load(object sender, EventArgs e)
{
if (EditIndex >= 0)
cmbSecurity.Items.AddRange(Global.vmessSecuritys.ToArray());
//FillCoreType(cmbCoreType);
if (vmessItem != null)
{
vmessItem = config.vmess[EditIndex];
BindingServer();
}
else
{
vmessItem = new VmessItem();
vmessItem.groupId = groupId;
ClearServer();
}
}
@@ -37,15 +40,10 @@ namespace v2rayN.Forms
txtId.Text = vmessItem.id;
txtAlterId.Text = vmessItem.alterId.ToString();
cmbSecurity.Text = vmessItem.security;
cmbNetwork.Text = vmessItem.network;
txtRemarks.Text = vmessItem.remarks;
// BindingCoreType(cmbCoreType, vmessItem);
cmbHeaderType.Text = vmessItem.headerType;
txtRequestHost.Text = vmessItem.requestHost;
txtPath.Text = vmessItem.path;
cmbStreamSecurity.Text = vmessItem.streamSecurity;
cmbAllowInsecure.Text = vmessItem.allowInsecure;
txtSNI.Text = vmessItem.sni;
transportControl.BindingServer(vmessItem);
}
@@ -59,61 +57,9 @@ namespace v2rayN.Forms
txtId.Text = "";
txtAlterId.Text = "0";
cmbSecurity.Text = Global.DefaultSecurity;
cmbNetwork.Text = Global.DefaultNetwork;
txtRemarks.Text = "";
cmbHeaderType.Text = Global.None;
txtRequestHost.Text = "";
cmbStreamSecurity.Text = "";
cmbAllowInsecure.Text = "";
txtPath.Text = "";
txtSNI.Text = "";
}
private void cmbNetwork_SelectedIndexChanged(object sender, EventArgs e)
{
SetHeaderType();
}
/// <summary>
/// 设置伪装选项
/// </summary>
private void SetHeaderType()
{
cmbHeaderType.Items.Clear();
string network = cmbNetwork.Text;
if (Utils.IsNullOrEmpty(network))
{
cmbHeaderType.Items.Add(Global.None);
return;
}
if (network.Equals(Global.DefaultNetwork))
{
cmbHeaderType.Items.Add(Global.None);
cmbHeaderType.Items.Add(Global.TcpHeaderHttp);
}
else if (network.Equals("kcp") || network.Equals("quic"))
{
cmbHeaderType.Items.Add(Global.None);
cmbHeaderType.Items.Add("srtp");
cmbHeaderType.Items.Add("utp");
cmbHeaderType.Items.Add("wechat-video");
cmbHeaderType.Items.Add("dtls");
cmbHeaderType.Items.Add("wireguard");
}
else if (network.Equals("grpc"))
{
cmbHeaderType.Items.Add(Global.GrpcgunMode);
cmbHeaderType.Items.Add(Global.GrpcmultiMode);
}
else
{
cmbHeaderType.Items.Add(Global.None);
}
cmbHeaderType.SelectedIndex = 0;
transportControl.ClearServer(vmessItem);
}
private void btnOK_Click(object sender, EventArgs e)
@@ -123,16 +69,8 @@ namespace v2rayN.Forms
string id = txtId.Text;
string alterId = txtAlterId.Text;
string security = cmbSecurity.Text;
string network = cmbNetwork.Text;
string remarks = txtRemarks.Text;
string headerType = cmbHeaderType.Text;
string requestHost = txtRequestHost.Text;
string path = txtPath.Text;
string streamSecurity = cmbStreamSecurity.Text;
string allowInsecure = cmbAllowInsecure.Text;
string sni = txtSNI.Text;
if (Utils.IsNullOrEmpty(address))
{
UI.Show(UIRes.I18N("FillServerAddress"));
@@ -148,28 +86,18 @@ namespace v2rayN.Forms
UI.Show(UIRes.I18N("FillUUID"));
return;
}
if (Utils.IsNullOrEmpty(alterId) || !Utils.IsNumberic(alterId))
{
UI.Show(UIRes.I18N("FillCorrectAlterId"));
return;
}
transportControl.EndBindingServer();
vmessItem.address = address;
vmessItem.port = Utils.ToInt(port);
vmessItem.id = id;
vmessItem.alterId = Utils.ToInt(alterId);
vmessItem.security = security;
vmessItem.network = network;
vmessItem.remarks = remarks;
//vmessItem.coreType = GetCoreType(cmbCoreType);
vmessItem.headerType = headerType;
vmessItem.requestHost = requestHost.Replace(" ", "");
vmessItem.path = path.Replace(" ", "");
vmessItem.streamSecurity = streamSecurity;
vmessItem.allowInsecure = allowInsecure;
vmessItem.sni = sni;
if (ConfigHandler.AddServer(ref config, vmessItem, EditIndex) == 0)
if (ConfigHandler.AddServer(ref config, vmessItem) == 0)
{
this.DialogResult = DialogResult.OK;
}
@@ -189,19 +117,6 @@ namespace v2rayN.Forms
this.DialogResult = DialogResult.Cancel;
}
private void cmbStreamSecurity_SelectedIndexChanged(object sender, EventArgs e)
{
string security = cmbStreamSecurity.Text;
if (Utils.IsNullOrEmpty(security))
{
panTlsMore.Hide();
}
else
{
panTlsMore.Show();
}
}
#region /
/// <summary>
@@ -243,31 +158,29 @@ namespace v2rayN.Forms
return;
}
string msg;
VmessItem vmessItem;
VmessItem vmessItemTemp;
if (type.Equals(1))
{
vmessItem = V2rayConfigHandler.ImportFromClientConfig(fileName, out msg);
vmessItemTemp = V2rayConfigHandler.ImportFromClientConfig(fileName, out msg);
}
else
{
vmessItem = V2rayConfigHandler.ImportFromServerConfig(fileName, out msg);
vmessItemTemp = V2rayConfigHandler.ImportFromServerConfig(fileName, out msg);
}
if (vmessItem == null)
if (vmessItemTemp == null)
{
UI.ShowWarning(msg);
return;
}
vmessItem = vmessItemTemp;
txtAddress.Text = vmessItem.address;
txtPort.Text = vmessItem.port.ToString();
txtId.Text = vmessItem.id;
txtAlterId.Text = vmessItem.alterId.ToString();
txtRemarks.Text = vmessItem.remarks;
cmbNetwork.Text = vmessItem.network;
cmbHeaderType.Text = vmessItem.headerType;
txtRequestHost.Text = vmessItem.requestHost;
txtPath.Text = vmessItem.path;
cmbStreamSecurity.Text = vmessItem.streamSecurity;
transportControl.BindingServer(vmessItem);
}
/// <summary>
@@ -279,23 +192,21 @@ namespace v2rayN.Forms
{
ClearServer();
VmessItem vmessItem = ShareHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg);
if (vmessItem == null)
VmessItem vmessItemTemp = ShareHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg);
if (vmessItemTemp == null)
{
UI.ShowWarning(msg);
return;
}
vmessItem = vmessItemTemp;
txtAddress.Text = vmessItem.address;
txtPort.Text = vmessItem.port.ToString();
txtId.Text = vmessItem.id;
txtAlterId.Text = vmessItem.alterId.ToString();
txtRemarks.Text = vmessItem.remarks;
cmbNetwork.Text = vmessItem.network;
cmbHeaderType.Text = vmessItem.headerType;
txtRequestHost.Text = vmessItem.requestHost;
txtPath.Text = vmessItem.path;
cmbStreamSecurity.Text = vmessItem.streamSecurity;
transportControl.BindingServer(vmessItem);
}
#endregion

View File

@@ -194,733 +194,6 @@
<data name="&gt;&gt;label13.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="label25.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="label25.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label25.Location" type="System.Drawing.Point, System.Drawing">
<value>529, 211</value>
</data>
<data name="label25.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 12</value>
</data>
<data name="label25.TabIndex" type="System.Int32, mscorlib">
<value>36</value>
</data>
<data name="label25.Text" xml:space="preserve">
<value>4)grpc serviceName</value>
</data>
<data name="&gt;&gt;label25.Name" xml:space="preserve">
<value>label25</value>
</data>
<data name="&gt;&gt;label25.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="&gt;&gt;label25.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label25.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label24.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label24.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label24.Location" type="System.Drawing.Point, System.Drawing">
<value>529, 197</value>
</data>
<data name="label24.Size" type="System.Drawing.Size, System.Drawing">
<value>119, 12</value>
</data>
<data name="label24.TabIndex" type="System.Int32, mscorlib">
<value>35</value>
</data>
<data name="label24.Text" xml:space="preserve">
<value>3)QUIC key/Kcp seed</value>
</data>
<data name="&gt;&gt;label24.Name" xml:space="preserve">
<value>label24</value>
</data>
<data name="&gt;&gt;label24.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="&gt;&gt;label24.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label24.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="label23.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label23.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label23.Location" type="System.Drawing.Point, System.Drawing">
<value>465, 146</value>
</data>
<data name="label23.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value>
</data>
<data name="label23.TabIndex" type="System.Int32, mscorlib">
<value>34</value>
</data>
<data name="label23.Text" xml:space="preserve">
<value>4)QUIC securty</value>
</data>
<data name="&gt;&gt;label23.Name" xml:space="preserve">
<value>label23</value>
</data>
<data name="&gt;&gt;label23.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="&gt;&gt;label23.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label23.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="txtSNI.Location" type="System.Drawing.Point, System.Drawing">
<value>300, 7</value>
</data>
<data name="txtSNI.Size" type="System.Drawing.Size, System.Drawing">
<value>197, 21</value>
</data>
<data name="txtSNI.TabIndex" type="System.Int32, mscorlib">
<value>33</value>
</data>
<data name="&gt;&gt;txtSNI.Name" xml:space="preserve">
<value>txtSNI</value>
</data>
<data name="&gt;&gt;txtSNI.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="&gt;&gt;txtSNI.Parent" xml:space="preserve">
<value>panTlsMore</value>
</data>
<data name="&gt;&gt;txtSNI.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label22.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label22.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label22.Location" type="System.Drawing.Point, System.Drawing">
<value>270, 11</value>
</data>
<data name="label22.Size" type="System.Drawing.Size, System.Drawing">
<value>23, 12</value>
</data>
<data name="label22.TabIndex" type="System.Int32, mscorlib">
<value>32</value>
</data>
<data name="label22.Text" xml:space="preserve">
<value>SNI</value>
</data>
<data name="&gt;&gt;label22.Name" xml:space="preserve">
<value>label22</value>
</data>
<data name="&gt;&gt;label22.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="&gt;&gt;label22.Parent" xml:space="preserve">
<value>panTlsMore</value>
</data>
<data name="&gt;&gt;label22.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="label21.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label21.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 11</value>
</data>
<data name="label21.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value>
</data>
<data name="label21.TabIndex" type="System.Int32, mscorlib">
<value>31</value>
</data>
<data name="label21.Text" xml:space="preserve">
<value>allowInsecure</value>
</data>
<data name="&gt;&gt;label21.Name" xml:space="preserve">
<value>label21</value>
</data>
<data name="&gt;&gt;label21.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="&gt;&gt;label21.Parent" xml:space="preserve">
<value>panTlsMore</value>
</data>
<data name="&gt;&gt;label21.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="cmbAllowInsecure.Items" xml:space="preserve">
<value />
</data>
<data name="cmbAllowInsecure.Items1" xml:space="preserve">
<value>true</value>
</data>
<data name="cmbAllowInsecure.Items2" xml:space="preserve">
<value>false</value>
</data>
<data name="cmbAllowInsecure.Location" type="System.Drawing.Point, System.Drawing">
<value>100, 7</value>
</data>
<data name="cmbAllowInsecure.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 20</value>
</data>
<data name="cmbAllowInsecure.TabIndex" type="System.Int32, mscorlib">
<value>30</value>
</data>
<data name="&gt;&gt;cmbAllowInsecure.Name" xml:space="preserve">
<value>cmbAllowInsecure</value>
</data>
<data name="&gt;&gt;cmbAllowInsecure.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cmbAllowInsecure.Parent" xml:space="preserve">
<value>panTlsMore</value>
</data>
<data name="&gt;&gt;cmbAllowInsecure.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="panTlsMore.Location" type="System.Drawing.Point, System.Drawing">
<value>200, 234</value>
</data>
<data name="panTlsMore.Size" type="System.Drawing.Size, System.Drawing">
<value>500, 35</value>
</data>
<data name="panTlsMore.TabIndex" type="System.Int32, mscorlib">
<value>33</value>
</data>
<data name="&gt;&gt;panTlsMore.Name" xml:space="preserve">
<value>panTlsMore</value>
</data>
<data name="&gt;&gt;panTlsMore.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="&gt;&gt;panTlsMore.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;panTlsMore.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="label9.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label9.Location" type="System.Drawing.Point, System.Drawing">
<value>350, 32</value>
</data>
<data name="label9.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 12</value>
</data>
<data name="label9.TabIndex" type="System.Int32, mscorlib">
<value>15</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>*Default value tcp</value>
</data>
<data name="&gt;&gt;label9.Name" xml:space="preserve">
<value>label9</value>
</data>
<data name="&gt;&gt;label9.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="&gt;&gt;label9.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label9.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="label20.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label20.Location" type="System.Drawing.Point, System.Drawing">
<value>464, 130</value>
</data>
<data name="label20.Size" type="System.Drawing.Size, System.Drawing">
<value>203, 12</value>
</data>
<data name="label20.TabIndex" type="System.Int32, mscorlib">
<value>29</value>
</data>
<data name="label20.Text" xml:space="preserve">
<value>3)h2 host Separated by commas (,)</value>
</data>
<data name="&gt;&gt;label20.Name" xml:space="preserve">
<value>label20</value>
</data>
<data name="&gt;&gt;label20.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="&gt;&gt;label20.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label20.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="txtPath.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 169</value>
</data>
<data name="txtPath.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="txtPath.Size" type="System.Drawing.Size, System.Drawing">
<value>396, 54</value>
</data>
<data name="txtPath.TabIndex" type="System.Int32, mscorlib">
<value>28</value>
</data>
<data name="&gt;&gt;txtPath.Name" xml:space="preserve">
<value>txtPath</value>
</data>
<data name="&gt;&gt;txtPath.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="&gt;&gt;txtPath.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;txtPath.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="cmbNetwork.Items" xml:space="preserve">
<value>tcp</value>
</data>
<data name="cmbNetwork.Items1" xml:space="preserve">
<value>kcp</value>
</data>
<data name="cmbNetwork.Items2" xml:space="preserve">
<value>ws</value>
</data>
<data name="cmbNetwork.Items3" xml:space="preserve">
<value>h2</value>
</data>
<data name="cmbNetwork.Items4" xml:space="preserve">
<value>quic</value>
</data>
<data name="cmbNetwork.Items5" xml:space="preserve">
<value>grpc</value>
</data>
<data name="cmbNetwork.Location" type="System.Drawing.Point, System.Drawing">
<value>192, 28</value>
</data>
<data name="cmbNetwork.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 20</value>
</data>
<data name="cmbNetwork.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
</data>
<data name="&gt;&gt;cmbNetwork.Name" xml:space="preserve">
<value>cmbNetwork</value>
</data>
<data name="&gt;&gt;cmbNetwork.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cmbNetwork.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;cmbNetwork.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="label7.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label7.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 32</value>
</data>
<data name="label7.Size" type="System.Drawing.Size, System.Drawing">
<value>167, 12</value>
</data>
<data name="label7.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>Transport protocol(network)</value>
</data>
<data name="&gt;&gt;label7.Name" xml:space="preserve">
<value>label7</value>
</data>
<data name="&gt;&gt;label7.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="&gt;&gt;label7.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label7.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="label19.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label19.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 169</value>
</data>
<data name="label19.Size" type="System.Drawing.Size, System.Drawing">
<value>29, 12</value>
</data>
<data name="label19.TabIndex" type="System.Int32, mscorlib">
<value>27</value>
</data>
<data name="label19.Text" xml:space="preserve">
<value>Path</value>
</data>
<data name="&gt;&gt;label19.Name" xml:space="preserve">
<value>label19</value>
</data>
<data name="&gt;&gt;label19.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="&gt;&gt;label19.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label19.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="label18.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label18.Location" type="System.Drawing.Point, System.Drawing">
<value>529, 183</value>
</data>
<data name="label18.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 12</value>
</data>
<data name="label18.TabIndex" type="System.Int32, mscorlib">
<value>26</value>
</data>
<data name="label18.Text" xml:space="preserve">
<value>2)h2 path</value>
</data>
<data name="&gt;&gt;label18.Name" xml:space="preserve">
<value>label18</value>
</data>
<data name="&gt;&gt;label18.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="&gt;&gt;label18.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label18.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="label17.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label17.Location" type="System.Drawing.Point, System.Drawing">
<value>464, 115</value>
</data>
<data name="label17.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 12</value>
</data>
<data name="label17.TabIndex" type="System.Int32, mscorlib">
<value>25</value>
</data>
<data name="label17.Text" xml:space="preserve">
<value>2)ws host</value>
</data>
<data name="&gt;&gt;label17.Name" xml:space="preserve">
<value>label17</value>
</data>
<data name="&gt;&gt;label17.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="&gt;&gt;label17.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label17.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="label16.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label16.Location" type="System.Drawing.Point, System.Drawing">
<value>529, 169</value>
</data>
<data name="label16.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 12</value>
</data>
<data name="label16.TabIndex" type="System.Int32, mscorlib">
<value>24</value>
</data>
<data name="label16.Text" xml:space="preserve">
<value>1)ws path</value>
</data>
<data name="&gt;&gt;label16.Name" xml:space="preserve">
<value>label16</value>
</data>
<data name="&gt;&gt;label16.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="&gt;&gt;label16.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label16.ZOrder" xml:space="preserve">
<value>12</value>
</data>
<data name="label14.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label14.Location" type="System.Drawing.Point, System.Drawing">
<value>464, 100</value>
</data>
<data name="label14.Size" type="System.Drawing.Size, System.Drawing">
<value>215, 12</value>
</data>
<data name="label14.TabIndex" type="System.Int32, mscorlib">
<value>23</value>
</data>
<data name="label14.Text" xml:space="preserve">
<value>1)http host Separated by commas (,)</value>
</data>
<data name="&gt;&gt;label14.Name" xml:space="preserve">
<value>label14</value>
</data>
<data name="&gt;&gt;label14.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="&gt;&gt;label14.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label14.ZOrder" xml:space="preserve">
<value>13</value>
</data>
<data name="label15.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label15.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 243</value>
</data>
<data name="label15.Size" type="System.Drawing.Size, System.Drawing">
<value>23, 12</value>
</data>
<data name="label15.TabIndex" type="System.Int32, mscorlib">
<value>22</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>TLS</value>
</data>
<data name="&gt;&gt;label15.Name" xml:space="preserve">
<value>label15</value>
</data>
<data name="&gt;&gt;label15.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="&gt;&gt;label15.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label15.ZOrder" xml:space="preserve">
<value>14</value>
</data>
<data name="cmbStreamSecurity.Items" xml:space="preserve">
<value />
</data>
<data name="cmbStreamSecurity.Items1" xml:space="preserve">
<value>tls</value>
</data>
<data name="cmbStreamSecurity.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 239</value>
</data>
<data name="cmbStreamSecurity.Size" type="System.Drawing.Size, System.Drawing">
<value>60, 20</value>
</data>
<data name="cmbStreamSecurity.TabIndex" type="System.Int32, mscorlib">
<value>21</value>
</data>
<data name="&gt;&gt;cmbStreamSecurity.Name" xml:space="preserve">
<value>cmbStreamSecurity</value>
</data>
<data name="&gt;&gt;cmbStreamSecurity.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cmbStreamSecurity.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;cmbStreamSecurity.ZOrder" xml:space="preserve">
<value>15</value>
</data>
<data name="label12.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label12.Location" type="System.Drawing.Point, System.Drawing">
<value>282, 66</value>
</data>
<data name="label12.Size" type="System.Drawing.Size, System.Drawing">
<value>293, 12</value>
</data>
<data name="label12.TabIndex" type="System.Int32, mscorlib">
<value>20</value>
</data>
<data name="label12.Text" xml:space="preserve">
<value>*tcp or kcp or QUIC camouflage type or grpc mode</value>
</data>
<data name="&gt;&gt;label12.Name" xml:space="preserve">
<value>label12</value>
</data>
<data name="&gt;&gt;label12.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="&gt;&gt;label12.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label12.ZOrder" xml:space="preserve">
<value>16</value>
</data>
<data name="txtRequestHost.Location" type="System.Drawing.Point, System.Drawing">
<value>158, 100</value>
</data>
<data name="txtRequestHost.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="txtRequestHost.Size" type="System.Drawing.Size, System.Drawing">
<value>300, 53</value>
</data>
<data name="txtRequestHost.TabIndex" type="System.Int32, mscorlib">
<value>16</value>
</data>
<data name="&gt;&gt;txtRequestHost.Name" xml:space="preserve">
<value>txtRequestHost</value>
</data>
<data name="&gt;&gt;txtRequestHost.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="&gt;&gt;txtRequestHost.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;txtRequestHost.ZOrder" xml:space="preserve">
<value>17</value>
</data>
<data name="label11.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label11.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 66</value>
</data>
<data name="label11.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value>
</data>
<data name="label11.TabIndex" type="System.Int32, mscorlib">
<value>19</value>
</data>
<data name="label11.Text" xml:space="preserve">
<value>Camouflage type</value>
</data>
<data name="&gt;&gt;label11.Name" xml:space="preserve">
<value>label11</value>
</data>
<data name="&gt;&gt;label11.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="&gt;&gt;label11.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label11.ZOrder" xml:space="preserve">
<value>18</value>
</data>
<data name="label10.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label10.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 100</value>
</data>
<data name="label10.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 12</value>
</data>
<data name="label10.TabIndex" type="System.Int32, mscorlib">
<value>17</value>
</data>
<data name="label10.Text" xml:space="preserve">
<value>Camouflage domain(host)</value>
</data>
<data name="&gt;&gt;label10.Name" xml:space="preserve">
<value>label10</value>
</data>
<data name="&gt;&gt;label10.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="&gt;&gt;label10.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label10.ZOrder" xml:space="preserve">
<value>19</value>
</data>
<data name="cmbHeaderType.Items" xml:space="preserve">
<value>none</value>
</data>
<data name="cmbHeaderType.Items1" xml:space="preserve">
<value>http</value>
</data>
<data name="cmbHeaderType.Items2" xml:space="preserve">
<value>srtp</value>
</data>
<data name="cmbHeaderType.Items3" xml:space="preserve">
<value>utp</value>
</data>
<data name="cmbHeaderType.Items4" xml:space="preserve">
<value>wechat-video</value>
</data>
<data name="cmbHeaderType.Items5" xml:space="preserve">
<value>dtls</value>
</data>
<data name="cmbHeaderType.Items6" xml:space="preserve">
<value>wireguard</value>
</data>
<data name="cmbHeaderType.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 64</value>
</data>
<data name="cmbHeaderType.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 20</value>
</data>
<data name="cmbHeaderType.TabIndex" type="System.Int32, mscorlib">
<value>18</value>
</data>
<data name="&gt;&gt;cmbHeaderType.Name" xml:space="preserve">
<value>cmbHeaderType</value>
</data>
<data name="&gt;&gt;cmbHeaderType.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cmbHeaderType.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;cmbHeaderType.ZOrder" xml:space="preserve">
<value>20</value>
</data>
<data name="groupBox2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="groupBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 215</value>
</data>
<data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>723, 281</value>
</data>
<data name="groupBox2.TabIndex" type="System.Int32, mscorlib">
<value>21</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>Transport</value>
</data>
<data name="&gt;&gt;groupBox2.Name" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;groupBox2.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;groupBox2.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="label8.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@@ -946,22 +219,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label8.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="cmbSecurity.Items" xml:space="preserve">
<value>aes-128-gcm</value>
</data>
<data name="cmbSecurity.Items1" xml:space="preserve">
<value>chacha20-poly1305</value>
</data>
<data name="cmbSecurity.Items2" xml:space="preserve">
<value>auto</value>
</data>
<data name="cmbSecurity.Items3" xml:space="preserve">
<value>none</value>
</data>
<data name="cmbSecurity.Items4" xml:space="preserve">
<value>zero</value>
<value>2</value>
</data>
<data name="cmbSecurity.Location" type="System.Drawing.Point, System.Drawing">
<value>195, 143</value>
@@ -970,7 +228,7 @@
<value>210, 20</value>
</data>
<data name="cmbSecurity.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
<value>4</value>
</data>
<data name="&gt;&gt;cmbSecurity.Name" xml:space="preserve">
<value>cmbSecurity</value>
@@ -982,7 +240,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cmbSecurity.ZOrder" xml:space="preserve">
<value>4</value>
<value>3</value>
</data>
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 171</value>
@@ -991,7 +249,7 @@
<value>278, 21</value>
</data>
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
<value>5</value>
</data>
<data name="&gt;&gt;txtRemarks.Name" xml:space="preserve">
<value>txtRemarks</value>
@@ -1003,7 +261,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtRemarks.ZOrder" xml:space="preserve">
<value>5</value>
<value>4</value>
</data>
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1030,7 +288,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label6.ZOrder" xml:space="preserve">
<value>6</value>
<value>5</value>
</data>
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1057,7 +315,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label5.ZOrder" xml:space="preserve">
<value>7</value>
<value>6</value>
</data>
<data name="txtAlterId.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 114</value>
@@ -1066,7 +324,7 @@
<value>143, 21</value>
</data>
<data name="txtAlterId.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
<value>3</value>
</data>
<data name="&gt;&gt;txtAlterId.Name" xml:space="preserve">
<value>txtAlterId</value>
@@ -1078,7 +336,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtAlterId.ZOrder" xml:space="preserve">
<value>8</value>
<value>7</value>
</data>
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1105,7 +363,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<value>9</value>
<value>8</value>
</data>
<data name="txtId.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 85</value>
@@ -1114,7 +372,7 @@
<value>278, 21</value>
</data>
<data name="txtId.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
<value>2</value>
</data>
<data name="&gt;&gt;txtId.Name" xml:space="preserve">
<value>txtId</value>
@@ -1126,7 +384,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtId.ZOrder" xml:space="preserve">
<value>10</value>
<value>9</value>
</data>
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1153,7 +411,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>11</value>
<value>10</value>
</data>
<data name="txtPort.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 56</value>
@@ -1162,7 +420,7 @@
<value>143, 21</value>
</data>
<data name="txtPort.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
<value>1</value>
</data>
<data name="&gt;&gt;txtPort.Name" xml:space="preserve">
<value>txtPort</value>
@@ -1174,7 +432,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtPort.ZOrder" xml:space="preserve">
<value>12</value>
<value>11</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1201,7 +459,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>13</value>
<value>12</value>
</data>
<data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 27</value>
@@ -1210,7 +468,7 @@
<value>359, 21</value>
</data>
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
<value>0</value>
</data>
<data name="&gt;&gt;txtAddress.Name" xml:space="preserve">
<value>txtAddress</value>
@@ -1222,7 +480,7 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtAddress.ZOrder" xml:space="preserve">
<value>14</value>
<value>13</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1249,8 +507,9 @@
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>15</value>
<value>14</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@@ -1258,7 +517,7 @@
<value>0, 35</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>729, 499</value>
<value>729, 216</value>
</data>
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
@@ -1306,7 +565,7 @@
<value>Bottom</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 534</value>
<value>0, 481</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>729, 60</value>
@@ -1324,7 +583,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>1</value>
<value>2</value>
</data>
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
@@ -1348,7 +607,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>2</value>
<value>3</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>
@@ -1399,7 +658,55 @@
<value>$this</value>
</data>
<data name="&gt;&gt;menuServer.ZOrder" xml:space="preserve">
<value>3</value>
<value>4</value>
</data>
<data name="transportControl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="transportControl.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="transportControl.Size" type="System.Drawing.Size, System.Drawing">
<value>729, 230</value>
</data>
<data name="transportControl.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;transportControl.Name" xml:space="preserve">
<value>transportControl</value>
</data>
<data name="&gt;&gt;transportControl.Type" xml:space="preserve">
<value>v2rayN.Forms.ServerTransportControl, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;transportControl.Parent" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;transportControl.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="panel3.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="panel3.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 251</value>
</data>
<data name="panel3.Size" type="System.Drawing.Size, System.Drawing">
<value>729, 230</value>
</data>
<data name="panel3.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="&gt;&gt;panel3.Name" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;panel3.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="&gt;&gt;panel3.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel3.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@@ -1411,7 +718,7 @@
<value>6, 12</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>729, 594</value>
<value>729, 541</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Edit or add a [VMess] server</value>

View File

@@ -130,21 +130,12 @@
<data name="label24.Size" type="System.Drawing.Size, System.Drawing">
<value>149, 12</value>
</data>
<data name="label24.Text" xml:space="preserve">
<value>3)QUIC 加密密钥/Kcp seed</value>
</data>
<data name="label23.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value>
</data>
<data name="label23.Text" xml:space="preserve">
<value>4)QUIC 加密方式</value>
</data>
<data name="label21.Size" type="System.Drawing.Size, System.Drawing">
<value>167, 12</value>
</data>
<data name="label21.Text" xml:space="preserve">
<value>跳过证书验证(allowInsecure)</value>
</data>
<data name="cmbAllowInsecure.Location" type="System.Drawing.Point, System.Drawing">
<value>180, 7</value>
</data>
@@ -154,15 +145,9 @@
<data name="label9.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 12</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>*默认tcp,选错会无法连接</value>
</data>
<data name="label20.Size" type="System.Drawing.Size, System.Drawing">
<value>149, 12</value>
</data>
<data name="label20.Text" xml:space="preserve">
<value>3)h2 host中间逗号(,)隔开</value>
</data>
<data name="txtPath.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 168</value>
</data>
@@ -178,33 +163,21 @@
<data name="label7.Size" type="System.Drawing.Size, System.Drawing">
<value>107, 12</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>传输协议(network)</value>
</data>
<data name="label19.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 168</value>
</data>
<data name="label19.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label19.Text" xml:space="preserve">
<value>路径(path)</value>
</data>
<data name="label14.Size" type="System.Drawing.Size, System.Drawing">
<value>161, 12</value>
</data>
<data name="label14.Text" xml:space="preserve">
<value>1)http host中间逗号(,)隔开</value>
</data>
<data name="label15.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 237</value>
</data>
<data name="label15.Size" type="System.Drawing.Size, System.Drawing">
<value>107, 12</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>底层传输安全(tls)</value>
</data>
<data name="cmbStreamSecurity.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 237</value>
</data>
@@ -214,9 +187,6 @@
<data name="label12.Size" type="System.Drawing.Size, System.Drawing">
<value>197, 12</value>
</data>
<data name="label12.Text" xml:space="preserve">
<value>*tcp或kcp或QUIC伪装类型或grpc模式</value>
</data>
<data name="txtRequestHost.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 102</value>
</data>
@@ -229,24 +199,15 @@
<data name="label11.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value>
</data>
<data name="label11.Text" xml:space="preserve">
<value>伪装类型(type)</value>
</data>
<data name="label10.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 102</value>
</data>
<data name="label10.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value>
</data>
<data name="label10.Text" xml:space="preserve">
<value>伪装域名(host)</value>
</data>
<data name="cmbHeaderType.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 67</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>底层传输方式(transport)</value>
</data>
<data name="label8.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 12</value>
</data>

View File

@@ -36,7 +36,6 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(292, 273);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "BaseServerForm";

View File

@@ -6,8 +6,8 @@ namespace v2rayN.Forms
{
public partial class BaseServerForm : BaseForm
{
public int EditIndex { get; set; }
protected VmessItem vmessItem = null;
public VmessItem vmessItem = null;
public string groupId;
public BaseServerForm()
{

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,186 @@
namespace v2rayN.Forms
{
partial class GlobalHotkeySettingForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GlobalHotkeySettingForm));
this.btnClose = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel();
this.btnReset = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.txtGlobalHotkey3 = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.txtGlobalHotkey2 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.txtGlobalHotkey1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.txtGlobalHotkey0 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.panel2.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// btnClose
//
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnClose.Name = "btnClose";
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// panel2
//
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Controls.Add(this.btnReset);
this.panel2.Controls.Add(this.btnClose);
this.panel2.Controls.Add(this.btnOK);
this.panel2.Name = "panel2";
//
// btnReset
//
resources.ApplyResources(this.btnReset, "btnReset");
this.btnReset.Name = "btnReset";
this.btnReset.UseVisualStyleBackColor = true;
this.btnReset.Click += new System.EventHandler(this.btnReset_Click);
//
// btnOK
//
resources.ApplyResources(this.btnOK, "btnOK");
this.btnOK.Name = "btnOK";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// panel1
//
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Controls.Add(this.label6);
this.panel1.Controls.Add(this.label5);
this.panel1.Controls.Add(this.txtGlobalHotkey3);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.txtGlobalHotkey2);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.txtGlobalHotkey1);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.txtGlobalHotkey0);
this.panel1.Controls.Add(this.label2);
this.panel1.Name = "panel1";
//
// label6
//
resources.ApplyResources(this.label6, "label6");
this.label6.ForeColor = System.Drawing.Color.Red;
this.label6.Name = "label6";
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.ForeColor = System.Drawing.Color.Red;
this.label5.Name = "label5";
//
// txtGlobalHotkey3
//
resources.ApplyResources(this.txtGlobalHotkey3, "txtGlobalHotkey3");
this.txtGlobalHotkey3.Name = "txtGlobalHotkey3";
this.txtGlobalHotkey3.ReadOnly = true;
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// txtGlobalHotkey2
//
resources.ApplyResources(this.txtGlobalHotkey2, "txtGlobalHotkey2");
this.txtGlobalHotkey2.Name = "txtGlobalHotkey2";
this.txtGlobalHotkey2.ReadOnly = true;
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// txtGlobalHotkey1
//
resources.ApplyResources(this.txtGlobalHotkey1, "txtGlobalHotkey1");
this.txtGlobalHotkey1.Name = "txtGlobalHotkey1";
this.txtGlobalHotkey1.ReadOnly = true;
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// txtGlobalHotkey0
//
resources.ApplyResources(this.txtGlobalHotkey0, "txtGlobalHotkey0");
this.txtGlobalHotkey0.Name = "txtGlobalHotkey0";
this.txtGlobalHotkey0.ReadOnly = true;
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// GlobalHotkeySettingForm
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnClose;
this.Controls.Add(this.panel1);
this.Controls.Add(this.panel2);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "GlobalHotkeySettingForm";
this.Load += new System.EventHandler(this.GlobalHotkeySettingForm_Load);
this.panel2.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.TextBox txtGlobalHotkey0;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtGlobalHotkey3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtGlobalHotkey2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtGlobalHotkey1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Button btnReset;
private System.Windows.Forms.Label label6;
}
}

View File

@@ -0,0 +1,138 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using v2rayN.Base;
using v2rayN.Handler;
using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class GlobalHotkeySettingForm : BaseForm
{
List<KeyEventItem> lstKey;
public GlobalHotkeySettingForm()
{
InitializeComponent();
}
private void GlobalHotkeySettingForm_Load(object sender, EventArgs e)
{
if (config.globalHotkeys == null)
{
config.globalHotkeys = new List<KeyEventItem>();
}
foreach (EGlobalHotkey it in Enum.GetValues(typeof(EGlobalHotkey)))
{
if (config.globalHotkeys.FindIndex(t => t.eGlobalHotkey == it) >= 0)
{
continue;
}
config.globalHotkeys.Add(new KeyEventItem()
{
eGlobalHotkey = it,
Alt = false,
Control = false,
Shift = false,
KeyCode = null
});
}
lstKey = Utils.DeepCopy(config.globalHotkeys);
txtGlobalHotkey0.KeyDown += TxtGlobalHotkey_KeyDown;
txtGlobalHotkey1.KeyDown += TxtGlobalHotkey_KeyDown;
txtGlobalHotkey2.KeyDown += TxtGlobalHotkey_KeyDown;
txtGlobalHotkey3.KeyDown += TxtGlobalHotkey_KeyDown;
BindingData(-1);
}
private void TxtGlobalHotkey_KeyDown(object sender, KeyEventArgs e)
{
var txt = ((TextBox)sender);
var index = Utils.ToInt(txt.Name.Substring(txt.Name.Length - 1, 1));
lstKey[index].KeyCode = e.KeyCode;
lstKey[index].Alt = e.Alt;
lstKey[index].Control = e.Control;
lstKey[index].Shift = e.Shift;
BindingData(index);
}
private void BindingData(int index)
{
for (int k = 0; k < lstKey.Count; k++)
{
if (index >= 0 && index != k)
{
continue;
}
var item = lstKey[k];
var keys = string.Empty;
if (item.Control)
{
keys += $"{Keys.Control.ToString()} + ";
}
if (item.Alt)
{
keys += $"{Keys.Alt.ToString()} + ";
}
if (item.Shift)
{
keys += $"{Keys.Shift.ToString()} + ";
}
if (item.KeyCode != null)
{
keys += $"{item.KeyCode.ToString()}";
}
panel1.Controls[$"txtGlobalHotkey{k}"].Text = keys;
}
}
private void btnOK_Click(object sender, EventArgs e)
{
config.globalHotkeys = lstKey;
if (ConfigHandler.SaveConfig(ref config, false) == 0)
{
this.DialogResult = DialogResult.OK;
}
else
{
UI.ShowWarning(UIRes.I18N("OperationFailed"));
}
}
private void btnClose_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
private void btnReset_Click(object sender, EventArgs e)
{
lstKey.Clear();
foreach (EGlobalHotkey it in Enum.GetValues(typeof(EGlobalHotkey)))
{
if (lstKey.FindIndex(t => t.eGlobalHotkey == it) >= 0)
{
continue;
}
lstKey.Add(new KeyEventItem()
{
eGlobalHotkey = it,
Alt = false,
Control = false,
Shift = false,
KeyCode = null
});
}
BindingData(-1);
}
}
}

View File

@@ -117,346 +117,421 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="&gt;&gt;txtIP.Name" xml:space="preserve">
<value>txtIP</value>
<data name="label1.Text" xml:space="preserve">
<value>Clear system proxy</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>Fill</value>
<data name="label2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="panel3.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
<data name="&gt;&gt;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="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="cmbOutboundTag.Size" type="System.Drawing.Size, System.Drawing">
<value>119, 20</value>
<data name="btnReset.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="&gt;&gt;panel4.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="&gt;&gt;panel2.Name" xml:space="preserve">
<value>panel2</value>
</data>
<data name="txtDomain.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
<data name="&gt;&gt;label3.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="txtDomain.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 17</value>
<data name="btnReset.Text" xml:space="preserve">
<value>&amp;Reset</value>
</data>
<data name="txtIP.Size" type="System.Drawing.Size, System.Drawing">
<value>220, 207</value>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="&gt;&gt;btnReset.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;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="panel4.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
<data name="btnClose.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="&gt;&gt;btnOK.Name" xml:space="preserve">
<value>btnOK</value>
</data>
<data name="&gt;&gt;btnReset.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>RoutingRuleQuicklyAddForm</value>
<value>GlobalHotkeySettingForm</value>
</data>
<data name="&gt;&gt;panel4.Parent" xml:space="preserve">
<value>$this</value>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="panel4.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 288</value>
<data name="txtGlobalHotkey3.Location" type="System.Drawing.Point, System.Drawing">
<value>189, 138</value>
</data>
<data name="panel4.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="txtIP.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
<data name="txtGlobalHotkey1.TabIndex" type="System.Int32, mscorlib">
<value>34</value>
</data>
<data name="label4.TabIndex" type="System.Int32, mscorlib">
<value>32</value>
<value>37</value>
</data>
<data name="&gt;&gt;btnClose.Parent" xml:space="preserve">
<value>panel4</value>
<value>panel2</value>
</data>
<data name="cmbOutboundTag.Items" xml:space="preserve">
<value>proxy</value>
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
<value>18, 215</value>
</data>
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Left</value>
<data name="&gt;&gt;txtGlobalHotkey1.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="txtDomain.TabIndex" type="System.Int32, mscorlib">
<value>24</value>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>101, 12</value>
</data>
<data name="&gt;&gt;txtGlobalHotkey0.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 12</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>506, 10</value>
</data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="&gt;&gt;txtIP.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="panel2.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="&gt;&gt;panel1.Name" xml:space="preserve">
<value>panel1</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>Domain</value>
</data>
<data name="&gt;&gt;txtDomain.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="panel3.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 10</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;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="&gt;&gt;panel3.Name" xml:space="preserve">
<value>panel3</value>
</data>
<data name="cmbOutboundTag.TabIndex" type="System.Int32, mscorlib">
<value>31</value>
</data>
<data name="&gt;&gt;cmbOutboundTag.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="panel3.Size" type="System.Drawing.Size, System.Drawing">
<value>506, 51</value>
</data>
<data name="groupBox2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="&gt;&gt;txtDomain.Name" xml:space="preserve">
<value>txtDomain</value>
</data>
<data name="&gt;&gt;cmbOutboundTag.Parent" xml:space="preserve">
<value>panel3</value>
<data name="label6.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label4.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
<data name="label6.Text" xml:space="preserve">
<value>Take effect after restart</value>
</data>
<data name="panel3.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
<data name="txtGlobalHotkey0.Size" type="System.Drawing.Size, System.Drawing">
<value>278, 21</value>
</data>
<data name="&gt;&gt;panel4.Name" xml:space="preserve">
<value>panel4</value>
<data name="txtGlobalHotkey0.Location" type="System.Drawing.Point, System.Drawing">
<value>189, 18</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>IP</value>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="groupBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>280, 0</value>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<value>18, 103</value>
</data>
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
<value>18, 190</value>
</data>
<data name="&gt;&gt;txtGlobalHotkey3.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="txtGlobalHotkey1.Size" type="System.Drawing.Size, System.Drawing">
<value>278, 21</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;label5.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="&gt;&gt;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="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>527, 60</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 12</value>
</data>
<data name="txtGlobalHotkey0.TabIndex" type="System.Int32, mscorlib">
<value>32</value>
</data>
<data name="&gt;&gt;txtGlobalHotkey2.Name" xml:space="preserve">
<value>txtGlobalHotkey2</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;label5.Name" xml:space="preserve">
<value>label5</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>527, 242</value>
</data>
<data name="btnReset.Location" type="System.Drawing.Point, System.Drawing">
<value>211, 17</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="label6.TabIndex" type="System.Int32, mscorlib">
<value>40</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>71, 12</value>
</data>
<data name="&gt;&gt;label5.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;txtGlobalHotkey1.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="btnClose.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="txtIP.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 17</value>
<data name="&gt;&gt;label5.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;txtGlobalHotkey0.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>18, 22</value>
</data>
<data name="&gt;&gt;label4.Name" xml:space="preserve">
<value>label4</value>
</data>
<data name="&gt;&gt;txtGlobalHotkey1.Name" xml:space="preserve">
<value>txtGlobalHotkey1</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>33</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>outboundTag</value>
<value>Do not change system proxy</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Set system proxy</value>
</data>
<data name="&gt;&gt;txtGlobalHotkey3.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="label1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="&gt;&gt;txtGlobalHotkey0.Name" xml:space="preserve">
<value>txtGlobalHotkey0</value>
</data>
<data name="label5.TabIndex" type="System.Int32, mscorlib">
<value>39</value>
</data>
<data name="&gt;&gt;btnClose.Name" xml:space="preserve">
<value>btnClose</value>
</data>
<data name="cmbOutboundTag.Items2" xml:space="preserve">
<value>block</value>
</data>
<data name="cmbOutboundTag.Items1" xml:space="preserve">
<value>direct</value>
</data>
<data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;panel3.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;txtIP.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
<value>305, 25</value>
<value>303, 17</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 242</value>
</data>
<data name="&gt;&gt;btnReset.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="&gt;&gt;label4.Parent" xml:space="preserve">
<value>panel3</value>
<value>panel1</value>
</data>
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
<value>Fill</value>
</data>
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>506, 227</value>
<data name="&gt;&gt;btnReset.Name" xml:space="preserve">
<value>btnReset</value>
</data>
<data name="txtDomain.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 12</value>
</data>
<data name="btnReset.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="txtGlobalHotkey1.Location" type="System.Drawing.Point, System.Drawing">
<value>189, 58</value>
</data>
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>3</value>
<value>0</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>280, 227</value>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="&gt;&gt;txtDomain.Type" xml:space="preserve">
<data name="&gt;&gt;label2.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="label5.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="txtGlobalHotkey2.TabIndex" type="System.Int32, mscorlib">
<value>36</value>
</data>
<data name="&gt;&gt;txtGlobalHotkey2.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="btnClose.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>31</value>
</data>
<data name="btnOK.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>&amp;OK</value>
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="&gt;&gt;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="txtGlobalHotkey2.Size" type="System.Drawing.Size, System.Drawing">
<value>278, 21</value>
</data>
<data name="&gt;&gt;cmbOutboundTag.Name" xml:space="preserve">
<value>cmbOutboundTag</value>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="&gt;&gt;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="label3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="panel4.Size" type="System.Drawing.Size, System.Drawing">
<value>506, 60</value>
<data name="txtGlobalHotkey2.Location" type="System.Drawing.Point, System.Drawing">
<value>189, 99</value>
</data>
<data name="&gt;&gt;cmbOutboundTag.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="&gt;&gt;label2.Name" xml:space="preserve">
<value>label2</value>
</data>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<data name="&gt;&gt;label3.Name" xml:space="preserve">
<value>label3</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Set directly by pressing the keyboard</value>
</data>
<data name="&gt;&gt;txtGlobalHotkey1.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="&gt;&gt;label6.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;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="btnClose.Text" xml:space="preserve">
<value>&amp;Cancel</value>
</data>
<data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>226, 227</value>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>18, 62</value>
</data>
<data name="cmbOutboundTag.Location" type="System.Drawing.Point, System.Drawing">
<value>107, 16</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>RoutingRuleQuicklyAddForm</value>
</data>
<data name="btnClose.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
<data name="btnOK.Text" xml:space="preserve">
<value>&amp;OK</value>
</data>
<data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;btnOK.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
<data name="label2.Text" xml:space="preserve">
<value>Display GUI</value>
</data>
<data name="label3.TabIndex" type="System.Int32, mscorlib">
<value>35</value>
</data>
<data name="btnReset.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="&gt;&gt;groupBox2.Name" xml:space="preserve">
<value>groupBox2</value>
<data name="&gt;&gt;label6.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
<value>19, 20</value>
<value>18, 142</value>
</data>
<data name="&gt;&gt;txtGlobalHotkey3.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;panel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>71, 12</value>
<value>161, 12</value>
</data>
<data name="&gt;&gt;groupBox1.Parent" xml:space="preserve">
<value>panel2</value>
<data name="&gt;&gt;txtGlobalHotkey0.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="&gt;&gt;txtIP.Parent" xml:space="preserve">
<value>groupBox2</value>
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
<value>227, 12</value>
</data>
<data name="groupBox2.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="&gt;&gt;btnOK.Parent" xml:space="preserve">
<value>panel4</value>
</data>
<data name="&gt;&gt;panel3.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;groupBox1.Name" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;panel2.Name" xml:space="preserve">
<value>panel2</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 61</value>
<data name="&gt;&gt;txtGlobalHotkey2.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="&gt;&gt;txtDomain.ZOrder" xml:space="preserve">
<value>0</value>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>155, 12</value>
</data>
<data name="&gt;&gt;panel4.ZOrder" xml:space="preserve">
<value>1</value>
<data name="$this.Text" xml:space="preserve">
<value>GlobalHotkey Setting</value>
</data>
<data name="txtDomain.Size" type="System.Drawing.Size, System.Drawing">
<value>274, 207</value>
<data name="&gt;&gt;btnOK.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>506, 348</value>
<value>527, 302</value>
</data>
<data name="txtIP.TabIndex" type="System.Int32, mscorlib">
<value>25</value>
<data name="btnClose.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<data name="txtGlobalHotkey3.TabIndex" type="System.Int32, mscorlib">
<value>38</value>
</data>
<data name="&gt;&gt;groupBox2.ZOrder" xml:space="preserve">
<value>0</value>
<data name="&gt;&gt;txtGlobalHotkey3.Name" xml:space="preserve">
<value>txtGlobalHotkey3</value>
</data>
<data name="&gt;&gt;groupBox2.Parent" xml:space="preserve">
<value>panel2</value>
<data name="txtGlobalHotkey3.Size" type="System.Drawing.Size, System.Drawing">
<value>278, 21</value>
</data>
<data name="&gt;&gt;panel2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
<value>398, 25</value>
<value>396, 17</value>
</data>
<data name="txtIP.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
<data name="&gt;&gt;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="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>0</value>
<data name="&gt;&gt;label6.Name" xml:space="preserve">
<value>label6</value>
</data>
<data name="&gt;&gt;panel3.Type" xml:space="preserve">
<data name="&gt;&gt;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="&gt;&gt;panel1.Name" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;txtGlobalHotkey2.Parent" xml:space="preserve">
<value>panel1</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="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>zh-Hans</value>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</value>
</metadata>
</root>

View File

@@ -117,29 +117,50 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="labRoutingTips.Text" xml:space="preserve">
<value>*设置的路由规则,用逗号(,)分隔;正则中的逗号用&lt;COMMA&gt;替代</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>71, 12</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>OutboundTag</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>29, 12</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>别名</value>
</data>
<data name="btnClose.Text" xml:space="preserve">
<value>取消(&amp;C)</value>
</data>
<data name="btnReset.Text" xml:space="preserve">
<value>重置(&amp;R)</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>确定(&amp;O)</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>65, 12</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>重启后生效</value>
</data>
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 12</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>直接按键盘进行设置</value>
</data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>不改变系统代理</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>自动配置系统代理</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>77, 12</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>清除系统代理</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>显示主界面</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>路由规则详情设置</value>
<value>全局热键设置</value>
</data>
</root>

View File

@@ -0,0 +1,86 @@
namespace v2rayN.Forms
{
partial class GroupSettingControl
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GroupSettingControl));
this.grbMain = new System.Windows.Forms.GroupBox();
this.btnRemove = new System.Windows.Forms.Button();
this.txtRemarks = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.grbMain.SuspendLayout();
this.SuspendLayout();
//
// grbMain
//
resources.ApplyResources(this.grbMain, "grbMain");
this.grbMain.Controls.Add(this.btnRemove);
this.grbMain.Controls.Add(this.txtRemarks);
this.grbMain.Controls.Add(this.label2);
this.grbMain.Name = "grbMain";
this.grbMain.TabStop = false;
//
// btnRemove
//
resources.ApplyResources(this.btnRemove, "btnRemove");
this.btnRemove.Name = "btnRemove";
this.btnRemove.UseVisualStyleBackColor = true;
this.btnRemove.Click += new System.EventHandler(this.btnRemove_Click);
//
// txtRemarks
//
resources.ApplyResources(this.txtRemarks, "txtRemarks");
this.txtRemarks.Name = "txtRemarks";
this.txtRemarks.Leave += new System.EventHandler(this.txtRemarks_Leave);
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// GroupSettingControl
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.grbMain);
this.Name = "GroupSettingControl";
this.Load += new System.EventHandler(this.GroupSettingControl_Load);
this.grbMain.ResumeLayout(false);
this.grbMain.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox grbMain;
private System.Windows.Forms.TextBox txtRemarks;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button btnRemove;
}
}

View File

@@ -0,0 +1,59 @@
using System;
using System.Windows.Forms;
using v2rayN.Base;
using v2rayN.Handler;
using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class GroupSettingControl : UserControl
{
public event ChangeEventHandler OnButtonClicked;
public GroupItem groupItem
{
get; set;
}
public GroupSettingControl()
{
InitializeComponent();
}
private void GroupSettingControl_Load(object sender, EventArgs e)
{
this.Height = grbMain.Height;
BindingSub();
}
private void BindingSub()
{
if (groupItem != null)
{
txtRemarks.Text = groupItem.remarks.ToString();
}
}
private void EndBindingSub()
{
if (groupItem != null)
{
groupItem.remarks = txtRemarks.Text.TrimEx();
}
}
private void txtRemarks_Leave(object sender, EventArgs e)
{
EndBindingSub();
}
private void btnRemove_Click(object sender, EventArgs e)
{
if (groupItem != null)
{
groupItem.remarks = string.Empty;
}
OnButtonClicked?.Invoke(sender, e);
}
}
}

View File

@@ -0,0 +1,243 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="grbMain.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 12</value>
</data>
<data name="&gt;&gt;grbMain.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
<value>292, 21</value>
</data>
<data name="btnRemove.Location" type="System.Drawing.Point, System.Drawing">
<value>525, 21</value>
</data>
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 21</value>
</data>
<data name="&gt;&gt;btnRemove.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 25</value>
</data>
<data name="btnRemove.TabIndex" type="System.Int32, mscorlib">
<value>24</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>GroupSettingControl</value>
</data>
<data name="&gt;&gt;label2.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="&gt;&gt;btnRemove.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="&gt;&gt;grbMain.Name" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;label2.Name" xml:space="preserve">
<value>label2</value>
</data>
<data name="btnRemove.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="grbMain.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="grbMain.Size" type="System.Drawing.Size, System.Drawing">
<value>619, 61</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Remarks</value>
</data>
<data name="&gt;&gt;txtRemarks.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="grbMain.Text" xml:space="preserve">
<value>Group details</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;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="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>47, 12</value>
</data>
<data name="&gt;&gt;txtRemarks.Name" xml:space="preserve">
<value>txtRemarks</value>
</data>
<data name="&gt;&gt;btnRemove.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;btnRemove.Name" xml:space="preserve">
<value>btnRemove</value>
</data>
<data name="grbMain.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="btnRemove.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="&gt;&gt;grbMain.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="&gt;&gt;txtRemarks.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;grbMain.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>619, 61</value>
</data>
<data name="btnRemove.Text" xml:space="preserve">
<value>Remove</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@@ -117,17 +117,17 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnClose.Text" xml:space="preserve">
<value>取消(&amp;C)</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>确定(&amp;O)</value>
<data name="btnRemove.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="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>29, 12</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>地址 (url)</value>
<data name="label2.Text" xml:space="preserve">
<value>备注</value>
</data>
<data name="grbMain.Text" xml:space="preserve">
<value>分组详情</value>
</data>
</root>

View File

@@ -1,6 +1,6 @@
namespace v2rayN.Forms
{
partial class RoutingSubSettingForm
partial class GroupSettingForm
{
/// <summary>
/// Required designer variable.
@@ -28,24 +28,15 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RoutingSubSettingForm));
this.panel2 = new System.Windows.Forms.Panel();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GroupSettingForm));
this.btnClose = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.panCon = new System.Windows.Forms.Panel();
this.txtUrl = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.btnAdd = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.panel2.SuspendLayout();
this.panCon.SuspendLayout();
this.SuspendLayout();
//
// panel2
//
this.panel2.Controls.Add(this.btnClose);
this.panel2.Controls.Add(this.btnOK);
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Name = "panel2";
//
// btnClose
//
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
@@ -54,6 +45,26 @@
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// panCon
//
resources.ApplyResources(this.panCon, "panCon");
this.panCon.Name = "panCon";
//
// panel2
//
this.panel2.Controls.Add(this.btnAdd);
this.panel2.Controls.Add(this.btnClose);
this.panel2.Controls.Add(this.btnOK);
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Name = "panel2";
//
// btnAdd
//
resources.ApplyResources(this.btnAdd, "btnAdd");
this.btnAdd.Name = "btnAdd";
this.btnAdd.UseVisualStyleBackColor = true;
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
//
// btnOK
//
resources.ApplyResources(this.btnOK, "btnOK");
@@ -61,46 +72,26 @@
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// panCon
//
resources.ApplyResources(this.panCon, "panCon");
this.panCon.Controls.Add(this.txtUrl);
this.panCon.Controls.Add(this.label3);
this.panCon.Name = "panCon";
//
// txtUrl
//
resources.ApplyResources(this.txtUrl, "txtUrl");
this.txtUrl.Name = "txtUrl";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// RoutingSubSettingForm
// GroupSettingForm
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnClose;
this.Controls.Add(this.panCon);
this.Controls.Add(this.panel2);
this.Name = "RoutingSubSettingForm";
this.Load += new System.EventHandler(this.RoutingSubSettingForm_Load);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "GroupSettingForm";
this.Load += new System.EventHandler(this.GroupSettingForm_Load);
this.panel2.ResumeLayout(false);
this.panCon.ResumeLayout(false);
this.panCon.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Button btnAdd;
private System.Windows.Forms.Panel panCon;
private System.Windows.Forms.TextBox txtUrl;
private System.Windows.Forms.Label label3;
}
}

View File

@@ -0,0 +1,103 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using v2rayN.Handler;
using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class GroupSettingForm : BaseForm
{
List<GroupSettingControl> lstControls = new List<GroupSettingControl>();
public GroupSettingForm()
{
InitializeComponent();
}
private void GroupSettingForm_Load(object sender, EventArgs e)
{
if (config.groupItem == null)
{
config.groupItem = new List<GroupItem>();
}
RefreshGroupsView();
}
/// <summary>
/// 刷新列表
/// </summary>
private void RefreshGroupsView()
{
panCon.Controls.Clear();
lstControls.Clear();
for (int k = config.groupItem.Count - 1; k >= 0; k--)
{
GroupItem item = config.groupItem[k];
if (Utils.IsNullOrEmpty(item.remarks))
{
if (!Utils.IsNullOrEmpty(item.id))
{
ConfigHandler.RemoveGroupItem(ref config, item.id);
}
config.groupItem.RemoveAt(k);
}
}
foreach (GroupItem item in config.groupItem)
{
GroupSettingControl control = new GroupSettingControl();
control.OnButtonClicked += Control_OnButtonClicked;
control.groupItem = item;
control.Dock = DockStyle.Top;
panCon.Controls.Add(control);
panCon.Controls.SetChildIndex(control, 0);
lstControls.Add(control);
}
}
private void Control_OnButtonClicked(object sender, EventArgs e)
{
RefreshGroupsView();
}
private void btnOK_Click(object sender, EventArgs e)
{
if (ConfigHandler.SaveGroupItem(ref config) == 0)
{
this.DialogResult = DialogResult.OK;
}
else
{
UI.ShowWarning(UIRes.I18N("OperationFailed"));
}
}
private void btnClose_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
private void btnAdd_Click(object sender, EventArgs e)
{
AddGroup();
RefreshGroupsView();
}
private void AddGroup()
{
GroupItem groupItem = new GroupItem
{
id = string.Empty,
remarks = "Group"
};
config.groupItem.Add(groupItem);
}
}
}

View File

@@ -145,6 +145,60 @@
<value>panel2</value>
</data>
<data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="panCon.AutoScroll" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="panCon.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="panCon.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="panCon.Size" type="System.Drawing.Size, System.Drawing">
<value>614, 351</value>
</data>
<data name="panCon.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="&gt;&gt;panCon.Name" xml:space="preserve">
<value>panCon</value>
</data>
<data name="&gt;&gt;panCon.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="&gt;&gt;panCon.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panCon.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="btnAdd.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnAdd.Location" type="System.Drawing.Point, System.Drawing">
<value>47, 17</value>
</data>
<data name="btnAdd.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="btnAdd.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="btnAdd.Text" xml:space="preserve">
<value>&amp;Add</value>
</data>
<data name="&gt;&gt;btnAdd.Name" xml:space="preserve">
<value>btnAdd</value>
</data>
<data name="&gt;&gt;btnAdd.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="&gt;&gt;btnAdd.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;btnAdd.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="btnOK.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
@@ -172,19 +226,19 @@
<value>panel2</value>
</data>
<data name="&gt;&gt;btnOK.ZOrder" xml:space="preserve">
<value>1</value>
<value>2</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, 166</value>
<value>0, 351</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>545, 60</value>
<value>614, 60</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
<value>7</value>
</data>
<data name="&gt;&gt;panel2.Name" xml:space="preserve">
<value>panel2</value>
@@ -198,87 +252,6 @@
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="panCon.AutoScroll" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="txtUrl.Location" type="System.Drawing.Point, System.Drawing">
<value>83, 19</value>
</data>
<data name="txtUrl.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="txtUrl.Size" type="System.Drawing.Size, System.Drawing">
<value>450, 113</value>
</data>
<data name="txtUrl.TabIndex" type="System.Int32, mscorlib">
<value>25</value>
</data>
<data name="&gt;&gt;txtUrl.Name" xml:space="preserve">
<value>txtUrl</value>
</data>
<data name="&gt;&gt;txtUrl.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtUrl.Parent" xml:space="preserve">
<value>panCon</value>
</data>
<data name="&gt;&gt;txtUrl.ZOrder" xml:space="preserve">
<value>0</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, 19</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>23, 12</value>
</data>
<data name="label3.TabIndex" type="System.Int32, mscorlib">
<value>24</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Url</value>
</data>
<data name="&gt;&gt;label3.Name" xml:space="preserve">
<value>label3</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;label3.Parent" xml:space="preserve">
<value>panCon</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="panCon.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="panCon.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="panCon.Size" type="System.Drawing.Size, System.Drawing">
<value>545, 166</value>
</data>
<data name="panCon.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="&gt;&gt;panCon.Name" xml:space="preserve">
<value>panCon</value>
</data>
<data name="&gt;&gt;panCon.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="&gt;&gt;panCon.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panCon.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@@ -286,13 +259,13 @@
<value>6, 12</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>545, 226</value>
<value>614, 411</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>RoutingSubSetting</value>
<value>Group settings</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>RoutingSubSettingForm</value>
<value>GroupSettingForm</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>

View File

@@ -117,16 +117,16 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="label4.Text" xml:space="preserve">
<value>OutboundTag</value>
</data>
<data name="btnClose.Text" xml:space="preserve">
<value>取消(&amp;C)</value>
</data>
<data name="btnAdd.Text" xml:space="preserve">
<value>添加(&amp;A)</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>确定(&amp;O)</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>快速添加路由规则</value>
<value>服务器分组设置</value>
</data>
</root>

View File

@@ -64,8 +64,9 @@
this.menuExport2ServerConfig = new System.Windows.Forms.ToolStripMenuItem();
this.menuExport2ShareUrl = new System.Windows.Forms.ToolStripMenuItem();
this.menuExport2SubContent = new System.Windows.Forms.ToolStripMenuItem();
this.tsbServer = new System.Windows.Forms.ToolStripDropDownButton();
this.tabGroup = new System.Windows.Forms.TabControl();
this.qrCodeControl = new v2rayN.Forms.QRCodeControl();
this.tsbServer = new System.Windows.Forms.ToolStripDropDownButton();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.gbMsgTitle = new System.Windows.Forms.GroupBox();
@@ -74,14 +75,13 @@
this.menuMsgBoxSelectAll = new System.Windows.Forms.ToolStripMenuItem();
this.menuMsgBoxCopy = new System.Windows.Forms.ToolStripMenuItem();
this.menuMsgBoxCopyAll = new System.Windows.Forms.ToolStripMenuItem();
this.menuMsgBoxClear = new System.Windows.Forms.ToolStripMenuItem();
this.menuMsgBoxAddRoutingRule = new System.Windows.Forms.ToolStripMenuItem();
this.menuMsgBoxFilter = new System.Windows.Forms.ToolStripMenuItem();
this.ssMain = new System.Windows.Forms.StatusStrip();
this.toolSslSocksPortLab = new System.Windows.Forms.ToolStripStatusLabel();
this.toolSslSocksPort = new System.Windows.Forms.ToolStripStatusLabel();
this.toolSslInboundInfo = 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.toolSslRoutingRule = new System.Windows.Forms.ToolStripStatusLabel();
this.toolSslBlank2 = new System.Windows.Forms.ToolStripStatusLabel();
this.toolSslServerSpeed = new System.Windows.Forms.ToolStripStatusLabel();
this.toolSslBlank4 = new System.Windows.Forms.ToolStripStatusLabel();
@@ -93,24 +93,28 @@
this.menuKeepNothing = new System.Windows.Forms.ToolStripMenuItem();
this.menuRoutings = new System.Windows.Forms.ToolStripMenuItem();
this.menuServers = new System.Windows.Forms.ToolStripMenuItem();
this.menuServers2 = new System.Windows.Forms.ToolStripComboBox();
this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator();
this.menuAddServers2 = new System.Windows.Forms.ToolStripMenuItem();
this.menuScanScreen2 = new System.Windows.Forms.ToolStripMenuItem();
this.menuUpdateSubscriptions = new System.Windows.Forms.ToolStripMenuItem();
this.menuUpdateSubViaProxy = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.menuExit = new System.Windows.Forms.ToolStripMenuItem();
this.bgwScan = new System.ComponentModel.BackgroundWorker();
this.panel1 = new System.Windows.Forms.Panel();
this.tsMain = new System.Windows.Forms.ToolStrip();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.tsbSub = new System.Windows.Forms.ToolStripDropDownButton();
this.tsbSubSetting = new System.Windows.Forms.ToolStripMenuItem();
this.tsbSubUpdate = new System.Windows.Forms.ToolStripMenuItem();
this.tsbSubUpdateViaProxy = new System.Windows.Forms.ToolStripMenuItem();
this.tsbQRCodeSwitch = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.tsbSetting = new System.Windows.Forms.ToolStripDropDownButton();
this.tsbOptionSetting = new System.Windows.Forms.ToolStripMenuItem();
this.tsbRoutingSetting = new System.Windows.Forms.ToolStripMenuItem();
this.tsbGlobalHotkeySetting = new System.Windows.Forms.ToolStripMenuItem();
this.tsbGroupSetting = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator14 = new System.Windows.Forms.ToolStripSeparator();
this.tsbBackupGuiNConfig = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
@@ -159,6 +163,7 @@
// scMain.Panel1
//
this.scMain.Panel1.Controls.Add(this.lvServers);
this.scMain.Panel1.Controls.Add(this.tabGroup);
//
// scMain.Panel2
//
@@ -405,6 +410,18 @@
resources.ApplyResources(this.menuExport2SubContent, "menuExport2SubContent");
this.menuExport2SubContent.Click += new System.EventHandler(this.menuExport2SubContent_Click);
//
// tabGroup
//
resources.ApplyResources(this.tabGroup, "tabGroup");
this.tabGroup.Name = "tabGroup";
this.tabGroup.SelectedIndex = 0;
this.tabGroup.SelectedIndexChanged += new System.EventHandler(this.tabGroup_SelectedIndexChanged);
//
// qrCodeControl
//
resources.ApplyResources(this.qrCodeControl, "qrCodeControl");
this.qrCodeControl.Name = "qrCodeControl";
//
// tsbServer
//
this.tsbServer.DropDown = this.cmsLv;
@@ -412,11 +429,6 @@
resources.ApplyResources(this.tsbServer, "tsbServer");
this.tsbServer.Name = "tsbServer";
//
// qrCodeControl
//
resources.ApplyResources(this.qrCodeControl, "qrCodeControl");
this.qrCodeControl.Name = "qrCodeControl";
//
// splitContainer1
//
resources.ApplyResources(this.splitContainer1, "splitContainer1");
@@ -462,6 +474,7 @@
this.menuMsgBoxSelectAll,
this.menuMsgBoxCopy,
this.menuMsgBoxCopyAll,
this.menuMsgBoxClear,
this.menuMsgBoxAddRoutingRule,
this.menuMsgBoxFilter});
this.cmsMsgBox.Name = "cmsMsgBox";
@@ -485,6 +498,12 @@
resources.ApplyResources(this.menuMsgBoxCopyAll, "menuMsgBoxCopyAll");
this.menuMsgBoxCopyAll.Click += new System.EventHandler(this.menuMsgBoxCopyAll_Click);
//
// menuMsgBoxClear
//
this.menuMsgBoxClear.Name = "menuMsgBoxClear";
resources.ApplyResources(this.menuMsgBoxClear, "menuMsgBoxClear");
this.menuMsgBoxClear.Click += new System.EventHandler(this.menuMsgBoxClear_Click);
//
// menuMsgBoxAddRoutingRule
//
this.menuMsgBoxAddRoutingRule.Name = "menuMsgBoxAddRoutingRule";
@@ -501,11 +520,9 @@
//
this.ssMain.ImageScalingSize = new System.Drawing.Size(20, 20);
this.ssMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolSslSocksPortLab,
this.toolSslSocksPort,
this.toolSslInboundInfo,
this.toolSslBlank1,
this.toolSslHttpPortLab,
this.toolSslHttpPort,
this.toolSslRoutingRule,
this.toolSslBlank2,
this.toolSslServerSpeed,
this.toolSslBlank4});
@@ -513,15 +530,10 @@
this.ssMain.Name = "ssMain";
this.ssMain.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.ssMain_ItemClicked);
//
// toolSslSocksPortLab
// toolSslInboundInfo
//
resources.ApplyResources(this.toolSslSocksPortLab, "toolSslSocksPortLab");
this.toolSslSocksPortLab.Name = "toolSslSocksPortLab";
//
// toolSslSocksPort
//
this.toolSslSocksPort.Name = "toolSslSocksPort";
resources.ApplyResources(this.toolSslSocksPort, "toolSslSocksPort");
this.toolSslInboundInfo.Name = "toolSslInboundInfo";
resources.ApplyResources(this.toolSslInboundInfo, "toolSslInboundInfo");
//
// toolSslBlank1
//
@@ -529,20 +541,15 @@
this.toolSslBlank1.Name = "toolSslBlank1";
this.toolSslBlank1.Spring = true;
//
// toolSslHttpPortLab
// toolSslRoutingRule
//
resources.ApplyResources(this.toolSslHttpPortLab, "toolSslHttpPortLab");
this.toolSslHttpPortLab.Name = "toolSslHttpPortLab";
//
// toolSslHttpPort
//
this.toolSslHttpPort.Name = "toolSslHttpPort";
resources.ApplyResources(this.toolSslHttpPort, "toolSslHttpPort");
this.toolSslRoutingRule.Name = "toolSslRoutingRule";
resources.ApplyResources(this.toolSslRoutingRule, "toolSslRoutingRule");
//
// toolSslBlank2
//
resources.ApplyResources(this.toolSslBlank2, "toolSslBlank2");
this.toolSslBlank2.Name = "toolSslBlank2";
resources.ApplyResources(this.toolSslBlank2, "toolSslBlank2");
this.toolSslBlank2.Spring = true;
//
// toolSslServerSpeed
@@ -570,10 +577,12 @@
this.menuSysAgentMode,
this.menuRoutings,
this.menuServers,
this.menuServers2,
this.toolStripSeparator13,
this.menuAddServers2,
this.menuScanScreen2,
this.menuUpdateSubscriptions,
this.menuUpdateSubViaProxy,
this.toolStripSeparator2,
this.menuExit});
this.cmsMain.Name = "contextMenuStrip1";
@@ -618,6 +627,14 @@
this.menuServers.Name = "menuServers";
resources.ApplyResources(this.menuServers, "menuServers");
//
// menuServers2
//
this.menuServers2.BackColor = System.Drawing.SystemColors.Window;
this.menuServers2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.menuServers2.DropDownWidth = 500;
resources.ApplyResources(this.menuServers2, "menuServers2");
this.menuServers2.Name = "menuServers2";
//
// toolStripSeparator13
//
this.toolStripSeparator13.Name = "toolStripSeparator13";
@@ -641,6 +658,12 @@
resources.ApplyResources(this.menuUpdateSubscriptions, "menuUpdateSubscriptions");
this.menuUpdateSubscriptions.Click += new System.EventHandler(this.menuUpdateSubscriptions_Click);
//
// menuUpdateSubViaProxy
//
this.menuUpdateSubViaProxy.Name = "menuUpdateSubViaProxy";
resources.ApplyResources(this.menuUpdateSubViaProxy, "menuUpdateSubViaProxy");
this.menuUpdateSubViaProxy.Click += new System.EventHandler(this.menuUpdateSubViaProxy_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
@@ -652,12 +675,6 @@
resources.ApplyResources(this.menuExit, "menuExit");
this.menuExit.Click += new System.EventHandler(this.menuExit_Click);
//
// bgwScan
//
this.bgwScan.WorkerReportsProgress = true;
this.bgwScan.DoWork += new System.ComponentModel.DoWorkEventHandler(this.bgwScan_DoWork);
this.bgwScan.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.bgwScan_ProgressChanged);
//
// panel1
//
resources.ApplyResources(this.panel1, "panel1");
@@ -695,7 +712,8 @@
//
this.tsbSub.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbSubSetting,
this.tsbSubUpdate});
this.tsbSubUpdate,
this.tsbSubUpdateViaProxy});
this.tsbSub.Image = global::v2rayN.Properties.Resources.sub;
resources.ApplyResources(this.tsbSub, "tsbSub");
this.tsbSub.Name = "tsbSub";
@@ -712,6 +730,12 @@
resources.ApplyResources(this.tsbSubUpdate, "tsbSubUpdate");
this.tsbSubUpdate.Click += new System.EventHandler(this.tsbSubUpdate_Click);
//
// tsbSubUpdateViaProxy
//
this.tsbSubUpdateViaProxy.Name = "tsbSubUpdateViaProxy";
resources.ApplyResources(this.tsbSubUpdateViaProxy, "tsbSubUpdateViaProxy");
this.tsbSubUpdateViaProxy.Click += new System.EventHandler(this.tsbSubUpdateViaProxy_Click);
//
// tsbQRCodeSwitch
//
this.tsbQRCodeSwitch.CheckOnClick = true;
@@ -731,6 +755,8 @@
this.tsbSetting.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbOptionSetting,
this.tsbRoutingSetting,
this.tsbGlobalHotkeySetting,
this.tsbGroupSetting,
this.toolStripSeparator14,
this.tsbBackupGuiNConfig});
this.tsbSetting.Image = global::v2rayN.Properties.Resources.option;
@@ -749,6 +775,18 @@
resources.ApplyResources(this.tsbRoutingSetting, "tsbRoutingSetting");
this.tsbRoutingSetting.Click += new System.EventHandler(this.tsbRoutingSetting_Click);
//
// tsbGlobalHotkeySetting
//
this.tsbGlobalHotkeySetting.Name = "tsbGlobalHotkeySetting";
resources.ApplyResources(this.tsbGlobalHotkeySetting, "tsbGlobalHotkeySetting");
this.tsbGlobalHotkeySetting.Click += new System.EventHandler(this.tsbGlobalHotkeySetting_Click);
//
// tsbGroupSetting
//
this.tsbGroupSetting.Name = "tsbGroupSetting";
resources.ApplyResources(this.tsbGroupSetting, "tsbGroupSetting");
this.tsbGroupSetting.Click += new System.EventHandler(this.tsbGroupSetting_Click);
//
// toolStripSeparator14
//
this.toolStripSeparator14.Name = "toolStripSeparator14";
@@ -767,6 +805,7 @@
//
// tsbReload
//
this.tsbReload.Image = global::v2rayN.Properties.Resources.restart;
resources.ApplyResources(this.tsbReload, "tsbReload");
this.tsbReload.Name = "tsbReload";
this.tsbReload.Click += new System.EventHandler(this.tsbReload_Click);
@@ -885,6 +924,7 @@
//
// tsbClose
//
this.tsbClose.Image = global::v2rayN.Properties.Resources.minimize;
resources.ApplyResources(this.tsbClose, "tsbClose");
this.tsbClose.Name = "tsbClose";
this.tsbClose.Click += new System.EventHandler(this.tsbClose_Click);
@@ -979,7 +1019,6 @@
private System.Windows.Forms.ToolStripDropDownButton tsbHelp;
private System.Windows.Forms.ToolStripMenuItem tsbAbout;
private System.Windows.Forms.ToolStripMenuItem menuAddServers2;
private System.ComponentModel.BackgroundWorker bgwScan;
private System.Windows.Forms.ToolStripMenuItem menuScanScreen;
private System.Windows.Forms.ToolStripMenuItem menuScanScreen2;
private System.Windows.Forms.ToolStripDropDownButton tsbSub;
@@ -994,12 +1033,7 @@
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 toolSslSocksPortLab;
private System.Windows.Forms.ToolStripStatusLabel toolSslHttpPortLab;
private System.Windows.Forms.ToolStripStatusLabel toolSslServerSpeed;
private System.Windows.Forms.ToolStripStatusLabel toolSslBlank4;
private System.Windows.Forms.ToolStripMenuItem menuRemoveDuplicateServer;
@@ -1032,6 +1066,16 @@
private System.Windows.Forms.ToolStripMenuItem tsbCheckUpdateGeoIP;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.ToolStripMenuItem menuMsgBoxFilter;
private System.Windows.Forms.ToolStripStatusLabel toolSslInboundInfo;
private System.Windows.Forms.ToolStripStatusLabel toolSslRoutingRule;
private System.Windows.Forms.ToolStripStatusLabel toolSslBlank2;
private System.Windows.Forms.ToolStripComboBox menuServers2;
private System.Windows.Forms.ToolStripMenuItem tsbSubUpdateViaProxy;
private System.Windows.Forms.ToolStripMenuItem menuUpdateSubViaProxy;
private System.Windows.Forms.ToolStripMenuItem menuMsgBoxClear;
private System.Windows.Forms.ToolStripMenuItem tsbGlobalHotkeySetting;
private System.Windows.Forms.TabControl tabGroup;
private System.Windows.Forms.ToolStripMenuItem tsbGroupSetting;
}
}

View File

@@ -1,26 +1,28 @@
using System;
using NHotkey;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Windows.Forms;
using v2rayN.Handler;
using v2rayN.HttpProxyHandler;
using v2rayN.Mode;
using v2rayN.Base;
using v2rayN.Tool;
using System.Diagnostics;
using System.Drawing;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;
using v2rayN.Base;
using v2rayN.Handler;
using v2rayN.Mode;
using v2rayN.Tool;
using System.Linq;
namespace v2rayN.Forms
{
public partial class MainForm : BaseForm
{
private V2rayHandler v2rayHandler;
private List<int> lvSelecteds = new List<int>();
private List<VmessItem> lstSelecteds = new List<VmessItem>();
private StatisticsHandler statistics = null;
private string MsgFilter = string.Empty;
private List<VmessItem> lstVmess = null;
private string groupId = string.Empty;
#region Window
@@ -47,6 +49,7 @@ namespace v2rayN.Forms
Environment.Exit(0);
return;
}
ConfigHandler.InitBuiltinRouting(ref config);
MainFormHandler.Instance.BackupGuiNConfig(config, true);
v2rayHandler = new V2rayHandler();
@@ -56,7 +59,6 @@ namespace v2rayN.Forms
{
statistics = new StatisticsHandler(config, UpdateStatisticsHandler);
}
MainFormHandler.Instance.UpdateTask(config, UpdateTaskHandler);
}
private void MainForm_VisibleChanged(object sender, EventArgs e)
@@ -74,15 +76,18 @@ namespace v2rayN.Forms
private void MainForm_Shown(object sender, EventArgs e)
{
InitGroupView();
InitServersView();
RefreshServers();
RefreshRoutingsMenu();
RestoreUI();
LoadV2ray();
_ = LoadV2ray();
HideForm();
MainFormHandler.Instance.UpdateTask(config, UpdateTaskHandler);
MainFormHandler.Instance.RegisterGlobalHotkey(config, OnHotkeyHandler, UpdateTaskHandler);
}
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
@@ -125,13 +130,14 @@ namespace v2rayN.Forms
//HttpProxyHandle.CloseHttpAgent(config);
if (blWindowsShutDown)
{
HttpProxyHandle.ResetIEProxy4WindowsShutDown();
SysProxyHandle.ResetIEProxy4WindowsShutDown();
}
else
{
HttpProxyHandle.UpdateSysProxy(config, true);
SysProxyHandle.UpdateSysProxy(config, true);
}
StorageUI();
ConfigHandler.SaveConfig(ref config);
statistics?.SaveToFile();
statistics?.Close();
@@ -166,6 +172,26 @@ namespace v2rayN.Forms
}
}
private void OnHotkeyHandler(object sender, HotkeyEventArgs e)
{
switch (Utils.ToInt(e.Name))
{
case (int)EGlobalHotkey.ShowForm:
if (this.ShowInTaskbar) HideForm(); else ShowForm();
break;
case (int)EGlobalHotkey.SystemProxyClear:
SetListenerType(ESysProxyType.ForcedClear);
break;
case (int)EGlobalHotkey.SystemProxySet:
SetListenerType(ESysProxyType.ForcedChange);
break;
case (int)EGlobalHotkey.SystemProxyUnchanged:
SetListenerType(ESysProxyType.Unchanged);
break;
}
e.Handled = true;
}
#endregion
#region listview menu
@@ -175,8 +201,13 @@ namespace v2rayN.Forms
/// </summary>
private void RefreshServers()
{
lstVmess = config.vmess
.Where(it => Utils.IsNullOrEmpty(groupId) ? true : it.groupId == groupId)
.OrderBy(it => it.sort)
.ToList();
ConfigHandler.SetDefaultServer(config, lstVmess);
RefreshServersView();
//lvServers.AutoResizeColumns();
RefreshServersMenu();
}
@@ -199,11 +230,12 @@ namespace v2rayN.Forms
lvServers.Columns.Add(UIRes.I18N("LvServiceType"), 80);
lvServers.Columns.Add(UIRes.I18N("LvAlias"), 100);
lvServers.Columns.Add(UIRes.I18N("LvAddress"), 120);
lvServers.Columns.Add(UIRes.I18N("LvPort"), 50);
lvServers.Columns.Add(UIRes.I18N("LvEncryptionMethod"), 90);
lvServers.Columns.Add(UIRes.I18N("LvTransportProtocol"), 70);
lvServers.Columns.Add(UIRes.I18N("LvSubscription"), 50);
lvServers.Columns.Add(UIRes.I18N("LvTestResults"), 70, HorizontalAlignment.Right);
lvServers.Columns.Add(UIRes.I18N("LvPort"), 100);
lvServers.Columns.Add(UIRes.I18N("LvEncryptionMethod"), 120);
lvServers.Columns.Add(UIRes.I18N("LvTransportProtocol"), 120);
lvServers.Columns.Add(UIRes.I18N("LvTLS"), 100);
lvServers.Columns.Add(UIRes.I18N("LvSubscription"), 100);
lvServers.Columns.Add(UIRes.I18N("LvTestResults"), 120, HorizontalAlignment.Right);
if (statistics != null && statistics.Enable)
{
@@ -225,24 +257,24 @@ namespace v2rayN.Forms
lvServers.BeginUpdate();
lvServers.Items.Clear();
for (int k = 0; k < config.vmess.Count; k++)
for (int k = 0; k < lstVmess.Count; k++)
{
string def = string.Empty;
string totalUp = string.Empty,
totalDown = string.Empty,
todayUp = string.Empty,
todayDown = string.Empty;
if (config.index.Equals(k))
VmessItem item = lstVmess[k];
if (config.IsActiveNode(item))
{
def = "√";
}
VmessItem item = config.vmess[k];
bool stats = statistics != null && statistics.Enable;
if (stats)
{
ServerStatItem sItem = statistics.Statistic.Find(item_ => item_.itemId == item.getItemId());
ServerStatItem sItem = statistics.Statistic.Find(item_ => item_.itemId == item.indexId);
if (sItem != null)
{
totalUp = Utils.HumanFy(sItem.totalUp);
@@ -258,7 +290,8 @@ namespace v2rayN.Forms
Utils.AddSubItem(lvItem, EServerColName.port.ToString(), item.port.ToString());
Utils.AddSubItem(lvItem, EServerColName.security.ToString(), item.security);
Utils.AddSubItem(lvItem, EServerColName.network.ToString(), item.network);
Utils.AddSubItem(lvItem, EServerColName.subRemarks.ToString(), item.getSubRemarks(config));
Utils.AddSubItem(lvItem, EServerColName.streamSecurity.ToString(), item.streamSecurity);
Utils.AddSubItem(lvItem, EServerColName.subRemarks.ToString(), item.GetSubRemarks(config));
Utils.AddSubItem(lvItem, EServerColName.testResult.ToString(), item.testResult);
if (stats)
{
@@ -272,7 +305,7 @@ namespace v2rayN.Forms
{
lvItem.BackColor = Color.WhiteSmoke;
}
if (config.index.Equals(k))
if (config.IsActiveNode(item))
{
//lvItem.Checked = true;
lvItem.ForeColor = Color.DodgerBlue;
@@ -296,25 +329,56 @@ namespace v2rayN.Forms
private void RefreshServersMenu()
{
menuServers.DropDownItems.Clear();
menuServers2.SelectedIndexChanged -= MenuServers2_SelectedIndexChanged;
menuServers2.Items.Clear();
menuServers.Visible = false;
menuServers2.Visible = false;
List<ToolStripMenuItem> lst = new List<ToolStripMenuItem>();
for (int k = 0; k < config.vmess.Count; k++)
if (lstVmess.Count > 20)
{
VmessItem item = config.vmess[k];
string name = item.getSummary();
for (int k = 0; k < lstVmess.Count; k++)
{
VmessItem item = lstVmess[k];
string name = item.GetSummary();
if (config.IsActiveNode(item))
{
name = $"√ {name}";
}
menuServers2.Items.Add(name);
ToolStripMenuItem ts = new ToolStripMenuItem(name)
{
Tag = k
};
if (config.index.Equals(k))
{
ts.Checked = true;
}
ts.Click += new EventHandler(ts_Click);
lst.Add(ts);
menuServers2.SelectedIndex = lstVmess.FindIndex(it => it.indexId == config.indexId);
menuServers2.SelectedIndexChanged += MenuServers2_SelectedIndexChanged;
menuServers2.Visible = true;
}
menuServers.DropDownItems.AddRange(lst.ToArray());
else
{
List<ToolStripMenuItem> lst = new List<ToolStripMenuItem>();
for (int k = 0; k < lstVmess.Count; k++)
{
VmessItem item = lstVmess[k];
string name = item.GetSummary();
ToolStripMenuItem ts = new ToolStripMenuItem(name)
{
Tag = k
};
if (config.IsActiveNode(item))
{
ts.Checked = true;
}
ts.Click += new EventHandler(ts_Click);
lst.Add(ts);
}
menuServers.DropDownItems.AddRange(lst.ToArray());
menuServers.Visible = true;
}
}
private void MenuServers2_SelectedIndexChanged(object sender, EventArgs e)
{
SetDefaultServer(((ToolStripComboBox)sender).SelectedIndex);
}
private void ts_Click(object sender, EventArgs e)
@@ -352,8 +416,8 @@ namespace v2rayN.Forms
private void DisplayToolStatus()
{
toolSslSocksPort.Text = $"{Global.Loopback}:{config.inbound[0].localPort}";
toolSslHttpPort.Text = $"{Global.Loopback}:{Global.httpPort}";
toolSslInboundInfo.Text = $"{Global.InboundSocks} {Global.Loopback}:{config.inbound[0].localPort} | "
+ $"{ Global.InboundHttp} { Global.Loopback}:{Global.httpPort}";
notifyMain.Icon = MainFormHandler.Instance.GetNotifyIcon(config, this.Icon);
}
@@ -374,9 +438,18 @@ namespace v2rayN.Forms
try
{
if ((EServerColName)e.Column == EServerColName.def)
{
foreach (ColumnHeader it in lvServers.Columns)
{
it.Width = -2;
}
return;
}
var tag = lvServers.Columns[e.Column].Tag?.ToString();
bool asc = Utils.IsNullOrEmpty(tag) ? true : !Convert.ToBoolean(tag);
if (ConfigHandler.SortServers(ref config, (EServerColName)e.Column, asc) != 0)
if (ConfigHandler.SortServers(ref config, ref lstVmess, (EServerColName)e.Column, asc) != 0)
{
return;
}
@@ -394,6 +467,40 @@ namespace v2rayN.Forms
}
}
private void InitGroupView()
{
tabGroup.TabPages.Clear();
string title = $" {UIRes.I18N("AllGroupServers")} ";
var tabPage = new TabPage(title);
tabPage.Name = "";
tabGroup.TabPages.Add(tabPage);
foreach (var item in config.groupItem)
{
var tabPage2 = new TabPage($" {item.remarks} ");
tabPage2.Name = item.id;
tabGroup.TabPages.Add(tabPage2);
}
tabGroup.SelectedIndex = 0;
}
private void tabGroup_SelectedIndexChanged(object sender, EventArgs e)
{
if (tabGroup.SelectedIndex < 0)
{
return;
}
groupId = string.Empty;
//groupId = tabGroup.TabPages[tabGroup.SelectedIndex].Name;
groupId = tabGroup.SelectedTab.Name;
RefreshServers();
lvServers.Focus();
}
#endregion
#region v2ray
@@ -401,7 +508,7 @@ namespace v2rayN.Forms
/// <summary>
/// 载入V2ray
/// </summary>
private void LoadV2ray()
async Task LoadV2ray()
{
tsbReload.Enabled = false;
@@ -409,7 +516,11 @@ namespace v2rayN.Forms
{
ClearMsg();
}
v2rayHandler.LoadV2ray(config);
await Task.Run(() =>
{
v2rayHandler.LoadV2ray(config);
});
Global.reloadV2ray = false;
ConfigHandler.SaveConfig(ref config, false);
statistics?.SaveToFile();
@@ -427,7 +538,7 @@ namespace v2rayN.Forms
ConfigHandler.SaveConfig(ref config, false);
statistics?.SaveToFile();
ChangePACButtonStatus(0);
ChangePACButtonStatus(ESysProxyType.ForcedClear);
v2rayHandler.V2rayStop();
}
@@ -453,7 +564,7 @@ namespace v2rayN.Forms
{
return;
}
qrCodeControl.showQRCode(index, config);
qrCodeControl.showQRCode(lstVmess[index]);
}
private void lvServers_DoubleClick(object sender, EventArgs e)
@@ -463,7 +574,7 @@ namespace v2rayN.Forms
{
return;
}
ShowServerForm(config.vmess[index].configType, index);
ShowServerForm(lstVmess[index].configType, index);
}
private void ShowServerForm(int configType, int index)
{
@@ -489,11 +600,12 @@ namespace v2rayN.Forms
fm = new AddServer2Form();
break;
}
fm.EditIndex = index;
fm.vmessItem = index >= 0 ? lstVmess[index] : null;
fm.groupId = groupId;
if (fm.ShowDialog() == DialogResult.OK)
{
RefreshServers();
LoadV2ray();
_ = LoadV2ray();
}
}
@@ -579,23 +691,19 @@ namespace v2rayN.Forms
return;
}
ConfigHandler.RemoveServer(ref config, lvSelecteds);
ConfigHandler.RemoveServer(config, lstSelecteds);
RefreshServers();
LoadV2ray();
_ = LoadV2ray();
}
private void menuRemoveDuplicateServer_Click(object sender, EventArgs e)
{
Utils.DedupServerList(config.vmess, out List<VmessItem> servers, config.keepOlderDedupl);
int oldCount = config.vmess.Count;
int newCount = servers.Count;
if (servers != null)
{
config.vmess = servers;
}
int oldCount = lstVmess.Count;
ConfigHandler.DedupServerList(ref config, ref lstVmess);
int newCount = lstVmess.Count;
RefreshServers();
LoadV2ray();
_ = LoadV2ray();
UI.Show(string.Format(UIRes.I18N("RemoveDuplicateServerResult"), oldCount, newCount));
}
@@ -606,7 +714,7 @@ namespace v2rayN.Forms
{
return;
}
if (ConfigHandler.CopyServer(ref config, index) == 0)
if (ConfigHandler.CopyServer(ref config, lstVmess[index]) == 0)
{
RefreshServers();
}
@@ -661,7 +769,7 @@ namespace v2rayN.Forms
{
if (GetLvSelectedIndex() < 0) return;
ClearTestResult();
SpeedtestHandler statistics = new SpeedtestHandler(ref config, ref v2rayHandler, lvSelecteds, actionType, UpdateSpeedtestHandler);
SpeedtestHandler statistics = new SpeedtestHandler(ref config, ref v2rayHandler, lstSelecteds, actionType, UpdateSpeedtestHandler);
}
private void tsbTestMe_Click(object sender, EventArgs e)
@@ -682,13 +790,13 @@ namespace v2rayN.Forms
private void menuExport2ClientConfig_Click(object sender, EventArgs e)
{
int index = GetLvSelectedIndex();
MainFormHandler.Instance.Export2ClientConfig(index, config);
MainFormHandler.Instance.Export2ClientConfig(lstVmess[index], config);
}
private void menuExport2ServerConfig_Click(object sender, EventArgs e)
{
int index = GetLvSelectedIndex();
MainFormHandler.Instance.Export2ServerConfig(index, config);
MainFormHandler.Instance.Export2ServerConfig(lstVmess[index], config);
}
private void menuExport2ShareUrl_Click(object sender, EventArgs e)
@@ -696,9 +804,9 @@ namespace v2rayN.Forms
GetLvSelectedIndex();
StringBuilder sb = new StringBuilder();
foreach (int v in lvSelecteds)
foreach (var it in lstSelecteds)
{
string url = ShareHandler.GetShareUrl(config, v);
string url = ShareHandler.GetShareUrl(it);
if (Utils.IsNullOrEmpty(url))
{
continue;
@@ -719,9 +827,9 @@ namespace v2rayN.Forms
GetLvSelectedIndex();
StringBuilder sb = new StringBuilder();
foreach (int v in lvSelecteds)
foreach (var it in lstSelecteds)
{
string url = ShareHandler.GetShareUrl(config, v);
string url = ShareHandler.GetShareUrl(it);
if (Utils.IsNullOrEmpty(url))
{
continue;
@@ -742,7 +850,7 @@ namespace v2rayN.Forms
if (fm.ShowDialog() == DialogResult.OK)
{
RefreshServers();
LoadV2ray();
_ = LoadV2ray();
}
}
@@ -753,18 +861,42 @@ namespace v2rayN.Forms
{
RefreshRoutingsMenu();
RefreshServers();
LoadV2ray();
_ = LoadV2ray();
}
}
private void tsbGlobalHotkeySetting_Click(object sender, EventArgs e)
{
var fm = new GlobalHotkeySettingForm();
if (fm.ShowDialog() == DialogResult.OK)
{
RefreshRoutingsMenu();
RefreshServers();
_ = LoadV2ray();
}
}
private void tsbGroupSetting_Click(object sender, EventArgs e)
{
var fm = new GroupSettingForm();
if (fm.ShowDialog() == DialogResult.OK)
{
InitGroupView();
RefreshServers();
}
}
private void tsbReload_Click(object sender, EventArgs e)
{
Global.reloadV2ray = true;
LoadV2ray();
_ = LoadV2ray();
}
private void tsbClose_Click(object sender, EventArgs e)
{
StorageUI();
HideForm();
//this.WindowState = FormWindowState.Minimized;
}
@@ -781,10 +913,10 @@ namespace v2rayN.Forms
UI.Show(UIRes.I18N("PleaseSelectServer"));
return -1;
}
if (ConfigHandler.SetDefaultServer(ref config, index) == 0)
if (ConfigHandler.SetDefaultServer(ref config, lstVmess[index]) == 0)
{
RefreshServers();
LoadV2ray();
_ = LoadV2ray();
}
return 0;
}
@@ -796,7 +928,7 @@ namespace v2rayN.Forms
private int GetLvSelectedIndex()
{
int index = -1;
lvSelecteds.Clear();
lstSelecteds.Clear();
try
{
if (lvServers.SelectedIndices.Count <= 0)
@@ -808,7 +940,7 @@ namespace v2rayN.Forms
index = lvServers.SelectedIndices[0];
foreach (int i in lvServers.SelectedIndices)
{
lvSelecteds.Add(i);
lstSelecteds.Add(lstVmess[i]);
}
return index;
}
@@ -820,33 +952,7 @@ namespace v2rayN.Forms
private void menuAddCustomServer_Click(object sender, EventArgs e)
{
UI.Show(UIRes.I18N("CustomServerTips"));
OpenFileDialog fileDialog = new OpenFileDialog
{
Multiselect = false,
Filter = "Config|*.json|All|*.*"
};
if (fileDialog.ShowDialog() != DialogResult.OK)
{
return;
}
string fileName = fileDialog.FileName;
if (Utils.IsNullOrEmpty(fileName))
{
return;
}
if (ConfigHandler.AddCustomServer(ref config, fileName) == 0)
{
RefreshServers();
//LoadV2ray();
UI.Show(UIRes.I18N("SuccessfullyImportedCustomServer"));
}
else
{
UI.ShowWarning(UIRes.I18N("FailedImportedCustomServer"));
}
ShowServerForm((int)EConfigType.Custom, -1);
}
private void menuAddShadowsocksServer_Click(object sender, EventArgs e)
@@ -870,7 +976,7 @@ namespace v2rayN.Forms
private void menuAddServers_Click(object sender, EventArgs e)
{
string clipboardData = Utils.GetClipboardData();
int ret = MainFormHandler.Instance.AddBatchServers(config, clipboardData);
int ret = MainFormHandler.Instance.AddBatchServers(config, clipboardData, "", groupId);
if (ret > 0)
{
RefreshServers();
@@ -879,14 +985,43 @@ namespace v2rayN.Forms
}
private void menuScanScreen_Click(object sender, EventArgs e)
{
_ = ScanScreenTaskAsync();
}
public async Task ScanScreenTaskAsync()
{
HideForm();
bgwScan.RunWorkerAsync();
string result = await Task.Run(() =>
{
return Utils.ScanScreen();
});
ShowForm();
if (Utils.IsNullOrEmpty(result))
{
UI.ShowWarning(UIRes.I18N("NoValidQRcodeFound"));
}
else
{
int ret = MainFormHandler.Instance.AddBatchServers(config, result, "", groupId);
if (ret > 0)
{
RefreshServers();
UI.Show(UIRes.I18N("SuccessfullyImportedServerViaScan"));
}
}
}
private void menuUpdateSubscriptions_Click(object sender, EventArgs e)
{
UpdateSubscriptionProcess();
UpdateSubscriptionProcess(false);
}
private void menuUpdateSubViaProxy_Click(object sender, EventArgs e)
{
UpdateSubscriptionProcess(true);
}
private void tsbBackupGuiNConfig_Click(object sender, EventArgs e)
@@ -1006,7 +1141,10 @@ namespace v2rayN.Forms
private void ShowForm()
{
this.Show();
this.WindowState = FormWindowState.Normal;
if (this.WindowState == FormWindowState.Minimized)
{
this.WindowState = FormWindowState.Normal;
}
this.Activate();
this.ShowInTaskbar = true;
//this.notifyIcon1.Visible = false;
@@ -1034,27 +1172,35 @@ namespace v2rayN.Forms
#endregion
#region
private void SetTestResult(string indexId, string txt)
{
int k = lstVmess.FindIndex(it => it.indexId == indexId);
if (k >= 0 && k < lvServers.Items.Count)
{
lstVmess[k].testResult = txt;
lvServers.Items[k].SubItems["testResult"].Text = txt;
}
}
private void SetTestResult(int k, string txt)
{
if (k < lvServers.Items.Count)
{
config.vmess[k].testResult = txt;
lstVmess[k].testResult = txt;
lvServers.Items[k].SubItems["testResult"].Text = txt;
}
}
private void ClearTestResult()
{
foreach (int s in lvSelecteds)
foreach (var it in lstSelecteds)
{
SetTestResult(s, "");
SetTestResult(it.indexId, "");
}
}
private void UpdateSpeedtestHandler(int index, string msg)
private void UpdateSpeedtestHandler(string indexId, string msg)
{
lvServers.Invoke((MethodInvoker)delegate
{
SetTestResult(index, msg);
SetTestResult(indexId, msg);
});
}
@@ -1067,9 +1213,9 @@ namespace v2rayN.Forms
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++)
for (int i = 0; i < lstVmess.Count; i++)
{
int index = statistics.FindIndex(item_ => item_.itemId == config.vmess[i].getItemId());
int index = statistics.FindIndex(item_ => item_.itemId == lstVmess[i].indexId);
if (index != -1)
{
lvServers.Invoke((MethodInvoker)delegate
@@ -1098,7 +1244,7 @@ namespace v2rayN.Forms
if (success)
{
Global.reloadV2ray = true;
LoadV2ray();
_ = LoadV2ray();
}
}
#endregion
@@ -1133,7 +1279,7 @@ namespace v2rayN.Forms
UI.Show(UIRes.I18N("PleaseSelectServer"));
return;
}
if (ConfigHandler.MoveServer(ref config, index, eMove) == 0)
if (ConfigHandler.MoveServer(ref config, ref lstVmess, index, eMove) == 0)
{
//TODO: reload is not good.
RefreshServers();
@@ -1172,15 +1318,7 @@ namespace v2rayN.Forms
private void ChangePACButtonStatus(ESysProxyType type)
{
HttpProxyHandle.UpdateSysProxy(config, false);
//if (type != ListenerType.noHttpProxy)
//{
// HttpProxyHandle.RestartHttpAgent(config, false);
//}
//else
//{
// HttpProxyHandle.CloseHttpAgent(config);
//}
SysProxyHandle.UpdateSysProxy(config, false);
for (int k = 0; k < menuSysAgentMode.DropDownItems.Count; k++)
{
@@ -1235,7 +1373,7 @@ namespace v2rayN.Forms
AppendText(false, UIRes.I18N("MsgUpdateV2rayCoreSuccessfullyMore"));
Global.reloadV2ray = true;
LoadV2ray();
_ = LoadV2ray();
AppendText(false, UIRes.I18N("MsgUpdateV2rayCoreSuccessfully"));
}
@@ -1251,7 +1389,7 @@ namespace v2rayN.Forms
if (success)
{
Global.reloadV2ray = true;
LoadV2ray();
_ = LoadV2ray();
}
});
}
@@ -1264,7 +1402,7 @@ namespace v2rayN.Forms
if (success)
{
Global.reloadV2ray = true;
LoadV2ray();
_ = LoadV2ray();
}
});
}
@@ -1289,37 +1427,6 @@ namespace v2rayN.Forms
}
#endregion
#region ScanScreen
private void bgwScan_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
{
string ret = Utils.ScanScreen();
bgwScan.ReportProgress(0, ret);
}
private void bgwScan_ProgressChanged(object sender, System.ComponentModel.ProgressChangedEventArgs e)
{
ShowForm();
string result = Convert.ToString(e.UserState);
if (Utils.IsNullOrEmpty(result))
{
UI.ShowWarning(UIRes.I18N("NoValidQRcodeFound"));
}
else
{
int ret = MainFormHandler.Instance.AddBatchServers(config, result);
if (ret > 0)
{
RefreshServers();
UI.Show(UIRes.I18N("SuccessfullyImportedServerViaScan"));
}
}
}
#endregion
#region
private void tsbSubSetting_Click(object sender, EventArgs e)
{
@@ -1332,13 +1439,18 @@ namespace v2rayN.Forms
private void tsbSubUpdate_Click(object sender, EventArgs e)
{
UpdateSubscriptionProcess();
UpdateSubscriptionProcess(false);
}
private void tsbSubUpdateViaProxy_Click(object sender, EventArgs e)
{
UpdateSubscriptionProcess(true);
}
/// <summary>
/// the subscription update process
/// </summary>
private void UpdateSubscriptionProcess()
private void UpdateSubscriptionProcess(bool blProxy)
{
void _updateUI(bool success, string msg)
{
@@ -1346,10 +1458,17 @@ namespace v2rayN.Forms
if (success)
{
RefreshServers();
if (config.uiItem.enableAutoAdjustMainLvColWidth)
{
foreach (ColumnHeader it in lvServers.Columns)
{
it.Width = -2;
}
}
}
};
(new UpdateHandle()).UpdateSubscriptionProcess(config, _updateUI);
(new UpdateHandle()).UpdateSubscriptionProcess(config, blProxy, _updateUI);
}
private void tsbQRCodeSwitch_CheckedChanged(object sender, EventArgs e)
@@ -1393,6 +1512,7 @@ namespace v2rayN.Forms
menuRoutings.Visible = config.enableRoutingAdvanced;
if (!config.enableRoutingAdvanced)
{
toolSslRoutingRule.Text = string.Empty;
return;
}
@@ -1415,6 +1535,7 @@ namespace v2rayN.Forms
if (config.routingIndex.Equals(k))
{
ts.Checked = true;
toolSslRoutingRule.Text = item.remarks;
}
ts.Click += new EventHandler(ts_Routing_Click);
lst.Add(ts);
@@ -1432,7 +1553,7 @@ namespace v2rayN.Forms
if (ConfigHandler.SetDefaultRouting(ref config, index) == 0)
{
RefreshRoutingsMenu();
LoadV2ray();
_ = LoadV2ray();
}
}
catch
@@ -1459,6 +1580,10 @@ namespace v2rayN.Forms
var data = this.txtMsgBox.Text;
Utils.SetClipboardData(data);
}
private void menuMsgBoxClear_Click(object sender, EventArgs e)
{
this.txtMsgBox.Clear();
}
private void menuMsgBoxAddRoutingRule_Click(object sender, EventArgs e)
{
menuMsgBoxCopy_Click(null, null);

View File

@@ -332,10 +332,10 @@
</value>
</data>
<data name="lvServers.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
<value>0, 20</value>
</data>
<data name="lvServers.Size" type="System.Drawing.Size, System.Drawing">
<value>686, 280</value>
<value>686, 260</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="lvServers.TabIndex" type="System.Int32, mscorlib">
@@ -353,6 +353,30 @@
<data name="&gt;&gt;lvServers.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tabGroup.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="tabGroup.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="tabGroup.Size" type="System.Drawing.Size, System.Drawing">
<value>686, 20</value>
</data>
<data name="tabGroup.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;tabGroup.Name" xml:space="preserve">
<value>tabGroup</value>
</data>
<data name="&gt;&gt;tabGroup.Type" xml:space="preserve">
<value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tabGroup.Parent" xml:space="preserve">
<value>scMain.Panel1</value>
</data>
<data name="&gt;&gt;tabGroup.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;scMain.Panel1.Name" xml:space="preserve">
<value>scMain.Panel1</value>
</data>
@@ -461,9 +485,6 @@
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>Servers list</value>
</data>
<data name="&gt;&gt;groupBox1.Name" xml:space="preserve">
<value>groupBox1</value>
</data>
@@ -489,7 +510,7 @@
<value>0</value>
</data>
<metadata name="cmsMsgBox.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>603, 17</value>
<value>493, 20</value>
</metadata>
<data name="menuMsgBoxSelectAll.Size" type="System.Drawing.Size, System.Drawing">
<value>227, 22</value>
@@ -509,6 +530,12 @@
<data name="menuMsgBoxCopyAll.Text" xml:space="preserve">
<value>Copy All</value>
</data>
<data name="menuMsgBoxClear.Size" type="System.Drawing.Size, System.Drawing">
<value>227, 22</value>
</data>
<data name="menuMsgBoxClear.Text" xml:space="preserve">
<value>Clear All</value>
</data>
<data name="menuMsgBoxAddRoutingRule.Size" type="System.Drawing.Size, System.Drawing">
<value>227, 22</value>
</data>
@@ -522,7 +549,7 @@
<value>Set message filters</value>
</data>
<data name="cmsMsgBox.Size" type="System.Drawing.Size, System.Drawing">
<value>228, 114</value>
<value>228, 158</value>
</data>
<data name="&gt;&gt;cmsMsgBox.Name" xml:space="preserve">
<value>cmsMsgBox</value>
@@ -566,41 +593,23 @@
<metadata name="ssMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>228, 18</value>
</metadata>
<data name="toolSslSocksPortLab.Font" type="System.Drawing.Font, System.Drawing">
<value>微软雅黑, 8pt</value>
<data name="toolSslInboundInfo.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 21</value>
</data>
<data name="toolSslSocksPortLab.Size" type="System.Drawing.Size, System.Drawing">
<value>52, 21</value>
</data>
<data name="toolSslSocksPortLab.Text" xml:space="preserve">
<value>SOCKS5:</value>
</data>
<data name="toolSslSocksPort.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 21</value>
<data name="toolSslInboundInfo.Text" xml:space="preserve">
<value>InboundInfo</value>
</data>
<data name="toolSslBlank1.Font" type="System.Drawing.Font, System.Drawing">
<value>微软雅黑, 8pt</value>
</data>
<data name="toolSslBlank1.Size" type="System.Drawing.Size, System.Drawing">
<value>279, 21</value>
<value>300, 21</value>
</data>
<data name="toolSslHttpPortLab.Font" type="System.Drawing.Font, System.Drawing">
<value>微软雅黑, 8pt</value>
</data>
<data name="toolSslHttpPortLab.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 21</value>
</data>
<data name="toolSslHttpPortLab.Text" xml:space="preserve">
<value>HTTP:</value>
</data>
<data name="toolSslHttpPort.Size" type="System.Drawing.Size, System.Drawing">
<data name="toolSslRoutingRule.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 21</value>
</data>
<data name="toolSslBlank2.Font" type="System.Drawing.Font, System.Drawing">
<value>微软雅黑, 8pt</value>
</data>
<data name="toolSslBlank2.Size" type="System.Drawing.Size, System.Drawing">
<value>279, 21</value>
<value>300, 21</value>
</data>
<data name="toolSslServerSpeed.AutoSize" type="System.Boolean, mscorlib">
<value>False</value>
@@ -738,7 +747,7 @@
<value>264, 22</value>
</data>
<data name="menuSysAgentMode.Text" xml:space="preserve">
<value>Http proxy</value>
<value>System proxy</value>
</data>
<data name="menuRoutings.Size" type="System.Drawing.Size, System.Drawing">
<value>264, 22</value>
@@ -752,6 +761,18 @@
<data name="menuServers.Text" xml:space="preserve">
<value>Server</value>
</data>
<data name="menuServers2.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Standard</value>
</data>
<data name="menuServers2.MaxDropDownItems" type="System.Int32, mscorlib">
<value>50</value>
</data>
<data name="menuServers2.Size" type="System.Drawing.Size, System.Drawing">
<value>200, 25</value>
</data>
<data name="menuServers2.ToolTipText" xml:space="preserve">
<value>Server</value>
</data>
<data name="toolStripSeparator13.Size" type="System.Drawing.Size, System.Drawing">
<value>261, 6</value>
</data>
@@ -773,6 +794,12 @@
<data name="menuUpdateSubscriptions.Text" xml:space="preserve">
<value>Update subscriptions</value>
</data>
<data name="menuUpdateSubViaProxy.Size" type="System.Drawing.Size, System.Drawing">
<value>264, 22</value>
</data>
<data name="menuUpdateSubViaProxy.Text" xml:space="preserve">
<value>Update subscriptions via proxy</value>
</data>
<data name="toolStripSeparator2.Size" type="System.Drawing.Size, System.Drawing">
<value>261, 6</value>
</data>
@@ -783,7 +810,7 @@
<value>Exit</value>
</data>
<data name="cmsMain.Size" type="System.Drawing.Size, System.Drawing">
<value>265, 170</value>
<value>265, 221</value>
</data>
<data name="&gt;&gt;cmsMain.Name" xml:space="preserve">
<value>cmsMain</value>
@@ -797,9 +824,6 @@
<data name="notifyMain.Visible" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<metadata name="bgwScan.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>498, 17</value>
</metadata>
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
@@ -831,17 +855,23 @@
<value>6, 56</value>
</data>
<data name="tsbSubSetting.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>182, 22</value>
</data>
<data name="tsbSubSetting.Text" xml:space="preserve">
<value>Settings</value>
</data>
<data name="tsbSubUpdate.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>182, 22</value>
</data>
<data name="tsbSubUpdate.Text" xml:space="preserve">
<value>Updates</value>
</data>
<data name="tsbSubUpdateViaProxy.Size" type="System.Drawing.Size, System.Drawing">
<value>182, 22</value>
</data>
<data name="tsbSubUpdateViaProxy.Text" xml:space="preserve">
<value>Updates via proxy</value>
</data>
<data name="tsbSub.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
<value>Magenta</value>
</data>
@@ -873,22 +903,34 @@
<value>6, 56</value>
</data>
<data name="tsbOptionSetting.Size" type="System.Drawing.Size, System.Drawing">
<value>176, 22</value>
<value>195, 22</value>
</data>
<data name="tsbOptionSetting.Text" xml:space="preserve">
<value>OptionSetting</value>
</data>
<data name="tsbRoutingSetting.Size" type="System.Drawing.Size, System.Drawing">
<value>176, 22</value>
<value>195, 22</value>
</data>
<data name="tsbRoutingSetting.Text" xml:space="preserve">
<value>RoutingSetting</value>
</data>
<data name="tsbGlobalHotkeySetting.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
</data>
<data name="tsbGlobalHotkeySetting.Text" xml:space="preserve">
<value>GlobalHotkeySetting</value>
</data>
<data name="tsbGroupSetting.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
</data>
<data name="tsbGroupSetting.Text" xml:space="preserve">
<value>GroupSetting</value>
</data>
<data name="toolStripSeparator14.Size" type="System.Drawing.Size, System.Drawing">
<value>173, 6</value>
<value>192, 6</value>
</data>
<data name="tsbBackupGuiNConfig.Size" type="System.Drawing.Size, System.Drawing">
<value>176, 22</value>
<value>195, 22</value>
</data>
<data name="tsbBackupGuiNConfig.Text" xml:space="preserve">
<value>BackupGuiConfig</value>
@@ -908,17 +950,6 @@
<data name="toolStripSeparator5.Size" type="System.Drawing.Size, System.Drawing">
<value>6, 56</value>
</data>
<data name="tsbReload.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAE3SURBVFhH7ZaBDQIhDEVvBEdwBDfQDXQER3AD3cARdAPd
QDfSDbQvuSb1AicFjJrwkxcN0FIolOuamv5VE2E+gLaPayWchEcE+hhTXVPhIoQmDcFYbKpoJtwEdX4X
jgIrXfTwnzb6dBw22BaJVdjJmWQs1/SdBRtE0U5cBXW2oSFRO0HtSEeW2FZ1wsq9sjuRdTDVAXnNuWLY
6JnAl0sYa/Q5q1dhq35ci+Bkq2HJvbZpxGeybAAuw4Fq+cnW1wPITgHFYxvBUw+qHEIL1yq1vDKhVlH3
NQwF4JkcFRWiUAB7IVW2FFPO3YqlgPd+LJf02e8Fdi3rMdIAcLDuf9UpeT0IS0G/hvhPm305vSl7EQFY
B6zCvozvYGzRM8zEoeg5TPZwDaGvpHQni1yzSxbXPW9q+hF13ROHuJnQcjbhtQAAAABJRU5ErkJggg==
</value>
</data>
<data name="tsbReload.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>BottomCenter</value>
</data>
@@ -1039,13 +1070,6 @@
<data name="toolStripSeparator11.Size" type="System.Drawing.Size, System.Drawing">
<value>6, 56</value>
</data>
<data name="tsbClose.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAySURBVFhH7c6xDQAgCEVBRnVTHU2ZABuMxV3yOvJDAAA/
GqfZVG6X8mg1dfUAAPBQxAZd0SJruVXHWwAAAABJRU5ErkJggg==
</value>
</data>
<data name="tsbClose.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
<value>Magenta</value>
</data>
@@ -1083,7 +1107,7 @@
<value>True</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>65</value>
<value>90</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 12</value>
@@ -1307,6 +1331,12 @@
<data name="&gt;&gt;menuMsgBoxCopyAll.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="&gt;&gt;menuMsgBoxClear.Name" xml:space="preserve">
<value>menuMsgBoxClear</value>
</data>
<data name="&gt;&gt;menuMsgBoxClear.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="&gt;&gt;menuMsgBoxAddRoutingRule.Name" xml:space="preserve">
<value>menuMsgBoxAddRoutingRule</value>
</data>
@@ -1319,16 +1349,10 @@
<data name="&gt;&gt;menuMsgBoxFilter.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="&gt;&gt;toolSslSocksPortLab.Name" xml:space="preserve">
<value>toolSslSocksPortLab</value>
<data name="&gt;&gt;toolSslInboundInfo.Name" xml:space="preserve">
<value>toolSslInboundInfo</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;toolSslSocksPort.Name" xml:space="preserve">
<value>toolSslSocksPort</value>
</data>
<data name="&gt;&gt;toolSslSocksPort.Type" xml:space="preserve">
<data name="&gt;&gt;toolSslInboundInfo.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="&gt;&gt;toolSslBlank1.Name" xml:space="preserve">
@@ -1337,16 +1361,10 @@
<data name="&gt;&gt;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="&gt;&gt;toolSslHttpPortLab.Name" xml:space="preserve">
<value>toolSslHttpPortLab</value>
<data name="&gt;&gt;toolSslRoutingRule.Name" xml:space="preserve">
<value>toolSslRoutingRule</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;toolSslHttpPort.Name" xml:space="preserve">
<value>toolSslHttpPort</value>
</data>
<data name="&gt;&gt;toolSslHttpPort.Type" xml:space="preserve">
<data name="&gt;&gt;toolSslRoutingRule.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="&gt;&gt;toolSslBlank2.Name" xml:space="preserve">
@@ -1409,6 +1427,12 @@
<data name="&gt;&gt;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="&gt;&gt;menuServers2.Name" xml:space="preserve">
<value>menuServers2</value>
</data>
<data name="&gt;&gt;menuServers2.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolStripSeparator13.Name" xml:space="preserve">
<value>toolStripSeparator13</value>
</data>
@@ -1433,6 +1457,12 @@
<data name="&gt;&gt;menuUpdateSubscriptions.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="&gt;&gt;menuUpdateSubViaProxy.Name" xml:space="preserve">
<value>menuUpdateSubViaProxy</value>
</data>
<data name="&gt;&gt;menuUpdateSubViaProxy.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="&gt;&gt;toolStripSeparator2.Name" xml:space="preserve">
<value>toolStripSeparator2</value>
</data>
@@ -1445,12 +1475,6 @@
<data name="&gt;&gt;menuExit.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="&gt;&gt;bgwScan.Name" xml:space="preserve">
<value>bgwScan</value>
</data>
<data name="&gt;&gt;bgwScan.Type" xml:space="preserve">
<value>System.ComponentModel.BackgroundWorker, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolStripSeparator4.Name" xml:space="preserve">
<value>toolStripSeparator4</value>
</data>
@@ -1475,6 +1499,12 @@
<data name="&gt;&gt;tsbSubUpdate.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="&gt;&gt;tsbSubUpdateViaProxy.Name" xml:space="preserve">
<value>tsbSubUpdateViaProxy</value>
</data>
<data name="&gt;&gt;tsbSubUpdateViaProxy.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="&gt;&gt;tsbQRCodeSwitch.Name" xml:space="preserve">
<value>tsbQRCodeSwitch</value>
</data>
@@ -1505,6 +1535,18 @@
<data name="&gt;&gt;tsbRoutingSetting.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="&gt;&gt;tsbGlobalHotkeySetting.Name" xml:space="preserve">
<value>tsbGlobalHotkeySetting</value>
</data>
<data name="&gt;&gt;tsbGlobalHotkeySetting.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="&gt;&gt;tsbGroupSetting.Name" xml:space="preserve">
<value>tsbGroupSetting</value>
</data>
<data name="&gt;&gt;tsbGroupSetting.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="&gt;&gt;toolStripSeparator14.Name" xml:space="preserve">
<value>toolStripSeparator14</value>
</data>

View File

@@ -318,9 +318,6 @@
ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAMAAAADAAAACw==
</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>服务器列表</value>
</data>
<data name="menuMsgBoxSelectAll.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 22</value>
</data>
@@ -339,6 +336,12 @@
<data name="menuMsgBoxCopyAll.Text" xml:space="preserve">
<value>复制所有</value>
</data>
<data name="menuMsgBoxClear.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 22</value>
</data>
<data name="menuMsgBoxClear.Text" xml:space="preserve">
<value>清除所有</value>
</data>
<data name="menuMsgBoxAddRoutingRule.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 22</value>
</data>
@@ -352,7 +355,7 @@
<value>设置信息过滤器</value>
</data>
<data name="cmsMsgBox.Size" type="System.Drawing.Size, System.Drawing">
<value>222, 114</value>
<value>222, 136</value>
</data>
<data name="toolSslServerSpeed.Text" xml:space="preserve">
<value>网速显示未启用</value>
@@ -379,68 +382,83 @@
<value>不改变系统代理</value>
</data>
<data name="menuSysAgentMode.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
<value>260, 22</value>
</data>
<data name="menuSysAgentMode.Text" xml:space="preserve">
<value>系统代理</value>
</data>
<data name="menuRoutings.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
<value>260, 22</value>
</data>
<data name="menuRoutings.Text" xml:space="preserve">
<value>路由</value>
</data>
<data name="menuServers.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
<value>260, 22</value>
</data>
<data name="menuServers.Text" xml:space="preserve">
<value>服务器</value>
</data>
<data name="menuServers2.ToolTipText" xml:space="preserve">
<value>服务器</value>
</data>
<data name="toolStripSeparator13.Size" type="System.Drawing.Size, System.Drawing">
<value>192, 6</value>
<value>257, 6</value>
</data>
<data name="menuAddServers2.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
<value>260, 22</value>
</data>
<data name="menuAddServers2.Text" xml:space="preserve">
<value>从剪贴板导入批量URL</value>
</data>
<data name="menuScanScreen2.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
<value>260, 22</value>
</data>
<data name="menuScanScreen2.Text" xml:space="preserve">
<value>扫描屏幕上的二维码</value>
</data>
<data name="menuUpdateSubscriptions.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
<value>260, 22</value>
</data>
<data name="menuUpdateSubscriptions.Text" xml:space="preserve">
<value>更新订阅</value>
</data>
<data name="menuUpdateSubViaProxy.Size" type="System.Drawing.Size, System.Drawing">
<value>260, 22</value>
</data>
<data name="menuUpdateSubViaProxy.Text" xml:space="preserve">
<value>更新订阅(通过代理)</value>
</data>
<data name="toolStripSeparator2.Size" type="System.Drawing.Size, System.Drawing">
<value>192, 6</value>
<value>257, 6</value>
</data>
<data name="menuExit.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
<value>260, 22</value>
</data>
<data name="menuExit.Text" xml:space="preserve">
<value>退出</value>
</data>
<data name="cmsMain.Size" type="System.Drawing.Size, System.Drawing">
<value>196, 170</value>
<value>261, 221</value>
</data>
<data name="tsbSubSetting.Size" type="System.Drawing.Size, System.Drawing">
<value>124, 22</value>
<value>180, 22</value>
</data>
<data name="tsbSubSetting.Text" xml:space="preserve">
<value>订阅设置</value>
</data>
<data name="tsbSubUpdate.Size" type="System.Drawing.Size, System.Drawing">
<value>124, 22</value>
<value>180, 22</value>
</data>
<data name="tsbSubUpdate.Text" xml:space="preserve">
<value>更新订阅</value>
</data>
<data name="tsbSubUpdateViaProxy.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
</data>
<data name="tsbSubUpdateViaProxy.Text" xml:space="preserve">
<value>更新订阅(通过代理)</value>
</data>
<data name="tsbSub.Size" type="System.Drawing.Size, System.Drawing">
<value>61, 53</value>
</data>
@@ -465,6 +483,18 @@
<data name="tsbRoutingSetting.Text" xml:space="preserve">
<value>路由设置</value>
</data>
<data name="tsbGlobalHotkeySetting.Size" type="System.Drawing.Size, System.Drawing">
<value>189, 22</value>
</data>
<data name="tsbGlobalHotkeySetting.Text" xml:space="preserve">
<value>全局热键设置</value>
</data>
<data name="tsbGroupSetting.Size" type="System.Drawing.Size, System.Drawing">
<value>189, 22</value>
</data>
<data name="tsbGroupSetting.Text" xml:space="preserve">
<value>服务器分组设置</value>
</data>
<data name="toolStripSeparator14.Size" type="System.Drawing.Size, System.Drawing">
<value>186, 6</value>
</data>
@@ -480,17 +510,6 @@
<data name="tsbSetting.Text" xml:space="preserve">
<value> 设置 </value>
</data>
<data name="tsbReload.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAE3SURBVFhH7ZaBDQIhDEVvBEdwBDfQDXQER3AD3cARdAPd
QDfSDbQvuSb1AicFjJrwkxcN0FIolOuamv5VE2E+gLaPayWchEcE+hhTXVPhIoQmDcFYbKpoJtwEdX4X
jgIrXfTwnzb6dBw22BaJVdjJmWQs1/SdBRtE0U5cBXW2oSFRO0HtSEeW2FZ1wsq9sjuRdTDVAXnNuWLY
6JnAl0sYa/Q5q1dhq35ci+Bkq2HJvbZpxGeybAAuw4Fq+cnW1wPITgHFYxvBUw+qHEIL1yq1vDKhVlH3
NQwF4JkcFRWiUAB7IVW2FFPO3YqlgPd+LJf02e8Fdi3rMdIAcLDuf9UpeT0IS0G/hvhPm305vSl7EQFY
B6zCvozvYGzRM8zEoeg5TPZwDaGvpHQni1yzSxbXPW9q+hF13ROHuJnQcjbhtQAAAABJRU5ErkJggg==
</value>
</data>
<data name="tsbReload.Size" type="System.Drawing.Size, System.Drawing">
<value>76, 53</value>
</data>
@@ -548,13 +567,6 @@
<data name="tsbPromotion.Text" xml:space="preserve">
<value> 推广 </value>
</data>
<data name="tsbClose.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAySURBVFhH7c6xDQAgCEVBRnVTHU2ZABuMxV3yOvJDAAA/
GqfZVG6X8mg1dfUAAPBQxAZd0SJruVXHWwAAAABJRU5ErkJggg==
</value>
</data>
<data name="tsbClose.Size" type="System.Drawing.Size, System.Drawing">
<value>76, 53</value>
</data>

View File

@@ -69,6 +69,9 @@
this.txtKcpmtu = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.tabPage7 = new System.Windows.Forms.TabPage();
this.chkEnableSecurityProtocolTls13 = new System.Windows.Forms.CheckBox();
this.chkEnableAutoAdjustMainLvColWidth = new System.Windows.Forms.CheckBox();
this.btnSetLoopback = new System.Windows.Forms.Button();
this.txtautoUpdateInterval = new System.Windows.Forms.TextBox();
this.label15 = new System.Windows.Forms.Label();
this.chkIgnoreGeoUpdateCore = new System.Windows.Forms.CheckBox();
@@ -373,6 +376,9 @@
//
// tabPage7
//
this.tabPage7.Controls.Add(this.chkEnableSecurityProtocolTls13);
this.tabPage7.Controls.Add(this.chkEnableAutoAdjustMainLvColWidth);
this.tabPage7.Controls.Add(this.btnSetLoopback);
this.tabPage7.Controls.Add(this.txtautoUpdateInterval);
this.tabPage7.Controls.Add(this.label15);
this.tabPage7.Controls.Add(this.chkIgnoreGeoUpdateCore);
@@ -388,6 +394,25 @@
this.tabPage7.Name = "tabPage7";
this.tabPage7.UseVisualStyleBackColor = true;
//
// chkEnableSecurityProtocolTls13
//
resources.ApplyResources(this.chkEnableSecurityProtocolTls13, "chkEnableSecurityProtocolTls13");
this.chkEnableSecurityProtocolTls13.Name = "chkEnableSecurityProtocolTls13";
this.chkEnableSecurityProtocolTls13.UseVisualStyleBackColor = true;
//
// chkEnableAutoAdjustMainLvColWidth
//
resources.ApplyResources(this.chkEnableAutoAdjustMainLvColWidth, "chkEnableAutoAdjustMainLvColWidth");
this.chkEnableAutoAdjustMainLvColWidth.Name = "chkEnableAutoAdjustMainLvColWidth";
this.chkEnableAutoAdjustMainLvColWidth.UseVisualStyleBackColor = true;
//
// btnSetLoopback
//
resources.ApplyResources(this.btnSetLoopback, "btnSetLoopback");
this.btnSetLoopback.Name = "btnSetLoopback";
this.btnSetLoopback.UseVisualStyleBackColor = true;
this.btnSetLoopback.Click += new System.EventHandler(this.btnSetLoopback_Click);
//
// txtautoUpdateInterval
//
resources.ApplyResources(this.txtautoUpdateInterval, "txtautoUpdateInterval");
@@ -408,9 +433,6 @@
//
this.cmbCoreType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCoreType.FormattingEnabled = true;
this.cmbCoreType.Items.AddRange(new object[] {
resources.GetString("cmbCoreType.Items"),
resources.GetString("cmbCoreType.Items1")});
resources.ApplyResources(this.cmbCoreType, "cmbCoreType");
this.cmbCoreType.Name = "cmbCoreType";
//
@@ -595,5 +617,8 @@
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txtautoUpdateInterval;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Button btnSetLoopback;
private System.Windows.Forms.CheckBox chkEnableAutoAdjustMainLvColWidth;
private System.Windows.Forms.CheckBox chkEnableSecurityProtocolTls13;
}
}

View File

@@ -1,9 +1,8 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows.Forms;
using v2rayN.Handler;
using v2rayN.Base;
using v2rayN.HttpProxyHandler;
using v2rayN.Handler;
using v2rayN.Mode;
namespace v2rayN.Forms
@@ -17,6 +16,8 @@ namespace v2rayN.Forms
private void OptionSettingForm_Load(object sender, EventArgs e)
{
cmbCoreType.Items.AddRange(Global.coreTypes.ToArray());
InitBase();
InitKCP();
@@ -124,6 +125,8 @@ namespace v2rayN.Forms
chkIgnoreGeoUpdateCore.Checked = config.ignoreGeoUpdateCore;
cmbCoreType.SelectedIndex = (int)config.coreType;
txtautoUpdateInterval.Text = config.autoUpdateInterval.ToString();
chkEnableAutoAdjustMainLvColWidth.Checked = config.uiItem.enableAutoAdjustMainLvColWidth;
chkEnableSecurityProtocolTls13.Checked = config.enableSecurityProtocolTls13;
}
private void btnOK_Click(object sender, EventArgs e)
{
@@ -181,6 +184,21 @@ namespace v2rayN.Forms
UI.Show(UIRes.I18N("PleaseSelectProtocol"));
return -1;
}
var remoteDNS = txtremoteDNS.Text.TrimEx();
var obj = Utils.ParseJson(remoteDNS);
if (obj != null && obj.ContainsKey("servers"))
{
}
else
{
if (remoteDNS.Contains("{") || remoteDNS.Contains("}"))
{
UI.Show(UIRes.I18N("FillCorrectDNSText"));
return -1;
}
}
config.inbound[0].localPort = Utils.ToInt(localPort);
config.inbound[0].protocol = protocol;
config.inbound[0].udpEnabled = udpEnabled;
@@ -227,7 +245,7 @@ namespace v2rayN.Forms
//Mux
config.muxEnabled = muxEnabled;
//remoteDNS
//remoteDNS
config.remoteDNS = txtremoteDNS.Text.TrimEx();
config.defAllowInsecure = chkdefAllowInsecure.Checked;
@@ -292,6 +310,8 @@ namespace v2rayN.Forms
config.ignoreGeoUpdateCore = chkIgnoreGeoUpdateCore.Checked;
config.coreType = (ECoreType)cmbCoreType.SelectedIndex;
config.autoUpdateInterval = Utils.ToInt(txtautoUpdateInterval.Text);
config.uiItem.enableAutoAdjustMainLvColWidth = chkEnableAutoAdjustMainLvColWidth.Checked;
config.enableSecurityProtocolTls13 = chkEnableSecurityProtocolTls13.Checked;
return 0;
}
@@ -315,7 +335,12 @@ namespace v2rayN.Forms
private void linkDnsObjectDoc_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("https://www.v2fly.org/config/dns.html#dnsobject");
Process.Start("https://www.v2fly.org/config/dns.html#dnsobject");
}
private void btnSetLoopback_Click(object sender, EventArgs e)
{
Process.Start(Utils.GetPath("EnableLoopback.exe"));
}
}
}

View File

@@ -1137,6 +1137,87 @@
<data name="&gt;&gt;tabPage6.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="chkEnableSecurityProtocolTls13.Location" type="System.Drawing.Point, System.Drawing">
<value>15, 211</value>
</data>
<data name="chkEnableSecurityProtocolTls13.Size" type="System.Drawing.Size, System.Drawing">
<value>506, 16</value>
</data>
<data name="chkEnableSecurityProtocolTls13.TabIndex" type="System.Int32, mscorlib">
<value>41</value>
</data>
<data name="chkEnableSecurityProtocolTls13.Text" xml:space="preserve">
<value>Enable Security Protocol TLS v1.3 (subscription/update/speedtest)</value>
</data>
<data name="&gt;&gt;chkEnableSecurityProtocolTls13.Name" xml:space="preserve">
<value>chkEnableSecurityProtocolTls13</value>
</data>
<data name="&gt;&gt;chkEnableSecurityProtocolTls13.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;chkEnableSecurityProtocolTls13.Parent" xml:space="preserve">
<value>tabPage7</value>
</data>
<data name="&gt;&gt;chkEnableSecurityProtocolTls13.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="chkEnableAutoAdjustMainLvColWidth.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="chkEnableAutoAdjustMainLvColWidth.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="chkEnableAutoAdjustMainLvColWidth.Location" type="System.Drawing.Point, System.Drawing">
<value>15, 189</value>
</data>
<data name="chkEnableAutoAdjustMainLvColWidth.Size" type="System.Drawing.Size, System.Drawing">
<value>390, 16</value>
</data>
<data name="chkEnableAutoAdjustMainLvColWidth.TabIndex" type="System.Int32, mscorlib">
<value>40</value>
</data>
<data name="chkEnableAutoAdjustMainLvColWidth.Text" xml:space="preserve">
<value>Automatically adjust column width after updating subscription</value>
</data>
<data name="&gt;&gt;chkEnableAutoAdjustMainLvColWidth.Name" xml:space="preserve">
<value>chkEnableAutoAdjustMainLvColWidth</value>
</data>
<data name="&gt;&gt;chkEnableAutoAdjustMainLvColWidth.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;chkEnableAutoAdjustMainLvColWidth.Parent" xml:space="preserve">
<value>tabPage7</value>
</data>
<data name="&gt;&gt;chkEnableAutoAdjustMainLvColWidth.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="btnSetLoopback.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnSetLoopback.Location" type="System.Drawing.Point, System.Drawing">
<value>30, 376</value>
</data>
<data name="btnSetLoopback.Size" type="System.Drawing.Size, System.Drawing">
<value>282, 23</value>
</data>
<data name="btnSetLoopback.TabIndex" type="System.Int32, mscorlib">
<value>39</value>
</data>
<data name="btnSetLoopback.Text" xml:space="preserve">
<value>Set Windows10 UWP Loopback </value>
</data>
<data name="&gt;&gt;btnSetLoopback.Name" xml:space="preserve">
<value>btnSetLoopback</value>
</data>
<data name="&gt;&gt;btnSetLoopback.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="&gt;&gt;btnSetLoopback.Parent" xml:space="preserve">
<value>tabPage7</value>
</data>
<data name="&gt;&gt;btnSetLoopback.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="txtautoUpdateInterval.Location" type="System.Drawing.Point, System.Drawing">
<value>325, 156</value>
</data>
@@ -1156,7 +1237,7 @@
<value>tabPage7</value>
</data>
<data name="&gt;&gt;txtautoUpdateInterval.ZOrder" xml:space="preserve">
<value>0</value>
<value>3</value>
</data>
<data name="label15.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1186,7 +1267,7 @@
<value>tabPage7</value>
</data>
<data name="&gt;&gt;label15.ZOrder" xml:space="preserve">
<value>1</value>
<value>4</value>
</data>
<data name="chkIgnoreGeoUpdateCore.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1216,13 +1297,7 @@
<value>tabPage7</value>
</data>
<data name="&gt;&gt;chkIgnoreGeoUpdateCore.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="cmbCoreType.Items" xml:space="preserve">
<value>v2fly_core</value>
</data>
<data name="cmbCoreType.Items1" xml:space="preserve">
<value>Xray_core</value>
<value>5</value>
</data>
<data name="cmbCoreType.Location" type="System.Drawing.Point, System.Drawing">
<value>325, 130</value>
@@ -1243,7 +1318,7 @@
<value>tabPage7</value>
</data>
<data name="&gt;&gt;cmbCoreType.ZOrder" xml:space="preserve">
<value>3</value>
<value>6</value>
</data>
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1273,7 +1348,7 @@
<value>tabPage7</value>
</data>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<value>4</value>
<value>7</value>
</data>
<data name="chkKeepOlderDedupl.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1303,7 +1378,7 @@
<value>tabPage7</value>
</data>
<data name="&gt;&gt;chkKeepOlderDedupl.ZOrder" xml:space="preserve">
<value>5</value>
<value>8</value>
</data>
<data name="cbFreshrate.Location" type="System.Drawing.Point, System.Drawing">
<value>161, 84</value>
@@ -1324,7 +1399,7 @@
<value>tabPage7</value>
</data>
<data name="&gt;&gt;cbFreshrate.ZOrder" xml:space="preserve">
<value>6</value>
<value>9</value>
</data>
<data name="lbFreshrate.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1354,7 +1429,7 @@
<value>tabPage7</value>
</data>
<data name="&gt;&gt;lbFreshrate.ZOrder" xml:space="preserve">
<value>7</value>
<value>10</value>
</data>
<data name="chkEnableStatistics.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1384,7 +1459,7 @@
<value>tabPage7</value>
</data>
<data name="&gt;&gt;chkEnableStatistics.ZOrder" xml:space="preserve">
<value>8</value>
<value>11</value>
</data>
<data name="chkAllowLANConn.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1411,7 +1486,7 @@
<value>tabPage7</value>
</data>
<data name="&gt;&gt;chkAllowLANConn.ZOrder" xml:space="preserve">
<value>9</value>
<value>12</value>
</data>
<data name="chkAutoRun.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -1438,7 +1513,7 @@
<value>tabPage7</value>
</data>
<data name="&gt;&gt;chkAutoRun.ZOrder" xml:space="preserve">
<value>10</value>
<value>13</value>
</data>
<data name="tabPage7.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>

View File

@@ -121,23 +121,11 @@
<value>取消(&amp;C)</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="tabControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>662, 469</value>
</data>
<data name="tabPage1.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value>
</data>
<data name="tabPage1.Text" xml:space="preserve">
<value> Core:基础设置 </value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>648, 437</value>
</data>
<data name="chkdefAllowInsecure.Size" type="System.Drawing.Size, System.Drawing">
<value>336, 16</value>
<value>324, 16</value>
</data>
<data name="chkdefAllowInsecure.Text" xml:space="preserve">
<value>底层传输安全选tls时默认跳过证书验证(allowInsecure)</value>
<value>传输安全选tls时默认跳过证书验证(allowInsecure)</value>
</data>
<data name="chksniffingEnabled2.Size" type="System.Drawing.Size, System.Drawing">
<value>96, 16</value>
@@ -205,11 +193,14 @@
<data name="label2.Text" xml:space="preserve">
<value>本地监听端口</value>
</data>
<data name="tabPage2.Size" type="System.Drawing.Size, System.Drawing">
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>648, 437</value>
</data>
<data name="tabPage1.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value>
</data>
<data name="tabPage2.Text" xml:space="preserve">
<value> Core:DNS设置 </value>
<data name="tabPage1.Text" xml:space="preserve">
<value> Core:基础设置 </value>
</data>
<data name="linkDnsObjectDoc.Size" type="System.Drawing.Size, System.Drawing">
<value>161, 12</value>
@@ -223,17 +214,29 @@
<data name="label14.Text" xml:space="preserve">
<value>自定义DNS(可多个,用逗号(,)隔开)</value>
</data>
<data name="tabPage2.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value>
</data>
<data name="tabPage2.Text" xml:space="preserve">
<value> Core:DNS设置 </value>
</data>
<data name="tabPage6.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value>
</data>
<data name="tabPage6.Text" xml:space="preserve">
<value> Core:KCP设置 </value>
</data>
<data name="tabPage7.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value>
<data name="chkEnableSecurityProtocolTls13.Text" xml:space="preserve">
<value>启用安全协议TLS v1.3 (订阅/检查更新/测速)</value>
</data>
<data name="tabPage7.Text" xml:space="preserve">
<value> v2rayN设置 </value>
<data name="chkEnableAutoAdjustMainLvColWidth.Size" type="System.Drawing.Size, System.Drawing">
<value>204, 16</value>
</data>
<data name="chkEnableAutoAdjustMainLvColWidth.Text" xml:space="preserve">
<value>自动调整服务器列宽在更新订阅后</value>
</data>
<data name="btnSetLoopback.Text" xml:space="preserve">
<value>解除Windows10 UWP应用回环代理限制</value>
</data>
<data name="txtautoUpdateInterval.Location" type="System.Drawing.Point, System.Drawing">
<value>255, 156</value>
@@ -286,17 +289,11 @@
<data name="chkAutoRun.Text" xml:space="preserve">
<value>开机自动启动(可能会不成功)</value>
</data>
<data name="tabPage3.Size" type="System.Drawing.Size, System.Drawing">
<data name="tabPage7.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value>
</data>
<data name="tabPage3.Text" xml:space="preserve">
<value> 系统代理设置 </value>
</data>
<data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>例外</value>
<data name="tabPage7.Text" xml:space="preserve">
<value> v2rayN设置 </value>
</data>
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value>
@@ -310,12 +307,27 @@
<data name="label12.Text" xml:space="preserve">
<value>对于下列字符开头的地址不使用代理服务器:</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 479</value>
<data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>例外</value>
</data>
<data name="tabPage3.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value>
</data>
<data name="tabPage3.Text" xml:space="preserve">
<value> 系统代理设置 </value>
</data>
<data name="tabControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>662, 469</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>确定(&amp;O)</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 479</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>662, 539</value>
</data>

View File

@@ -12,7 +12,7 @@ namespace v2rayN.Forms
}
private void QRCodeControl_Load(object sender, System.EventArgs e)
{
txtUrl.MouseUp += txtUrl_MouseUp;
txtUrl.MouseUp += txtUrl_MouseUp;
}
void txtUrl_MouseUp(object sender, MouseEventArgs e)
@@ -20,11 +20,11 @@ namespace v2rayN.Forms
txtUrl.SelectAll();
}
public void showQRCode(int Index, Config config)
public void showQRCode(VmessItem item)
{
if (Index >= 0)
if (item != null)
{
string url = ShareHandler.GetShareUrl(config, Index);
string url = ShareHandler.GetShareUrl(item);
if (Utils.IsNullOrEmpty(url))
{
picQRCode.Image = null;
@@ -32,7 +32,7 @@ namespace v2rayN.Forms
return;
}
txtUrl.Text = url;
picQRCode.Image = QRCodeHelper.GetQRCode(url);
picQRCode.Image = QRCodeHelper.GetQRCode(url);
}
}
}

View File

@@ -1,94 +0,0 @@
namespace v2rayN.Forms
{
partial class QRCodeForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.picQRCode = new System.Windows.Forms.PictureBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txtUrl = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.picQRCode)).BeginInit();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// picQRCode
//
this.picQRCode.Dock = System.Windows.Forms.DockStyle.Fill;
this.picQRCode.Location = new System.Drawing.Point(0, 0);
this.picQRCode.Name = "picQRCode";
this.picQRCode.Size = new System.Drawing.Size(482, 483);
this.picQRCode.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.picQRCode.TabIndex = 23;
this.picQRCode.TabStop = false;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.txtUrl);
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.groupBox1.Location = new System.Drawing.Point(0, 483);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(482, 90);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "URL";
//
// txtUrl
//
this.txtUrl.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtUrl.Location = new System.Drawing.Point(3, 17);
this.txtUrl.Multiline = true;
this.txtUrl.Name = "txtUrl";
this.txtUrl.ReadOnly = true;
this.txtUrl.Size = new System.Drawing.Size(476, 70);
this.txtUrl.TabIndex = 0;
//
// QRCodeForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(482, 573);
this.Controls.Add(this.picQRCode);
this.Controls.Add(this.groupBox1);
this.Name = "QRCodeForm";
this.Text = "服务器配置二维码和URL";
this.Load += new System.EventHandler(this.QRCodeForm_Load);
this.Shown += new System.EventHandler(this.QRCodeForm_Shown);
((System.ComponentModel.ISupportInitialize)(this.picQRCode)).EndInit();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox txtUrl;
private System.Windows.Forms.PictureBox picQRCode;
}
}

View File

@@ -1,51 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using v2rayN.Handler;
using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class QRCodeForm : BaseForm
{
public int Index { get; set; }
public QRCodeForm()
{
InitializeComponent();
}
private void QRCodeForm_Load(object sender, EventArgs e)
{
txtUrl.MouseUp += txtUrl_MouseUp;
}
void txtUrl_MouseUp(object sender, MouseEventArgs e)
{
txtUrl.SelectAll();
}
private void QRCodeForm_Shown(object sender, EventArgs e)
{
if (Index >= 0)
{
VmessQRCode vmessQRCode = null;
if (ConfigHandler.GetVmessQRCode(config, Index, ref vmessQRCode) != 0)
{
return;
}
string url = Utils.ToJson(vmessQRCode);
url = Utils.Base64Encode(url);
url = string.Format("{0}{1}", Global.vmessProtocol, url);
picQRCode.Image = QRCodeHelper.GetQRCode(url);
txtUrl.Text = url;
}
}
}
}

View File

@@ -1,170 +0,0 @@
namespace v2rayN.Forms
{
partial class RoutingRuleQuicklyAddForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RoutingRuleQuicklyAddForm));
this.panel1 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.label4 = new System.Windows.Forms.Label();
this.cmbOutboundTag = new System.Windows.Forms.ComboBox();
this.panel4 = new System.Windows.Forms.Panel();
this.btnClose = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.txtIP = new System.Windows.Forms.TextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txtDomain = new System.Windows.Forms.TextBox();
this.panel3.SuspendLayout();
this.panel4.SuspendLayout();
this.panel2.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// panel3
//
resources.ApplyResources(this.panel3, "panel3");
this.panel3.Controls.Add(this.label4);
this.panel3.Controls.Add(this.cmbOutboundTag);
this.panel3.Name = "panel3";
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// cmbOutboundTag
//
resources.ApplyResources(this.cmbOutboundTag, "cmbOutboundTag");
this.cmbOutboundTag.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbOutboundTag.FormattingEnabled = true;
this.cmbOutboundTag.Items.AddRange(new object[] {
resources.GetString("cmbOutboundTag.Items"),
resources.GetString("cmbOutboundTag.Items1"),
resources.GetString("cmbOutboundTag.Items2")});
this.cmbOutboundTag.Name = "cmbOutboundTag";
//
// panel4
//
resources.ApplyResources(this.panel4, "panel4");
this.panel4.Controls.Add(this.btnClose);
this.panel4.Controls.Add(this.btnOK);
this.panel4.Name = "panel4";
//
// btnClose
//
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnClose.Name = "btnClose";
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// btnOK
//
resources.ApplyResources(this.btnOK, "btnOK");
this.btnOK.Name = "btnOK";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// panel2
//
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Controls.Add(this.groupBox2);
this.panel2.Controls.Add(this.groupBox1);
this.panel2.Name = "panel2";
//
// groupBox2
//
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.Controls.Add(this.txtIP);
this.groupBox2.Name = "groupBox2";
this.groupBox2.TabStop = false;
//
// txtIP
//
resources.ApplyResources(this.txtIP, "txtIP");
this.txtIP.Name = "txtIP";
//
// groupBox1
//
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Controls.Add(this.txtDomain);
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
// txtDomain
//
resources.ApplyResources(this.txtDomain, "txtDomain");
this.txtDomain.Name = "txtDomain";
//
// RoutingRuleQuicklyAddForm
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnClose;
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel4);
this.Controls.Add(this.panel3);
this.Controls.Add(this.panel1);
this.Name = "RoutingRuleQuicklyAddForm";
this.Load += new System.EventHandler(this.RoutingRuleQuicklyAddForm_Load);
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.panel4.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ComboBox cmbOutboundTag;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox txtDomain;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.TextBox txtIP;
}
}

View File

@@ -1,73 +0,0 @@
using System;
using System.Windows.Forms;
using v2rayN.Handler;
using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class RoutingRuleQuicklyAddForm : BaseForm
{
public string domain
{
get; set;
}
private RulesItem rulesItem;
public RoutingRuleQuicklyAddForm()
{
InitializeComponent();
}
private void RoutingRuleQuicklyAddForm_Load(object sender, EventArgs e)
{
rulesItem = new RulesItem();
ClearBind();
}
private void EndBindingData()
{
if (rulesItem != null)
{
rulesItem.outboundTag = cmbOutboundTag.Text;
rulesItem.domain = Utils.String2List(txtDomain.Text);
rulesItem.ip = Utils.String2List(txtIP.Text);
}
}
private void ClearBind()
{
cmbOutboundTag.Text = Global.agentTag;
txtDomain.Text = domain;
}
private void btnOK_Click(object sender, EventArgs e)
{
EndBindingData();
var hasRule = false;
if (rulesItem.domain != null && rulesItem.domain.Count > 0)
{
hasRule = true;
}
if (rulesItem.ip != null && rulesItem.ip.Count > 0)
{
hasRule = true;
}
if (!hasRule)
{
return;
}
if (ConfigHandler.InsertRoutingRuleItem(ref config, rulesItem) == 0)
{
this.DialogResult = DialogResult.OK;
}
else
{
UI.ShowWarning(UIRes.I18N("OperationFailed"));
}
}
private void btnClose_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
}
}

View File

@@ -34,6 +34,10 @@
this.panel2 = new System.Windows.Forms.Panel();
this.btnOK = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.label5 = new System.Windows.Forms.Label();
this.btnBrowse = new System.Windows.Forms.Button();
this.txtCustomIcon = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.txtUrl = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
@@ -68,17 +72,17 @@
//
// btnClose
//
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnClose.Name = "btnClose";
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// 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
@@ -90,14 +94,40 @@
//
// panel1
//
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Controls.Add(this.label5);
this.panel1.Controls.Add(this.btnBrowse);
this.panel1.Controls.Add(this.txtCustomIcon);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.txtUrl);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.txtRemarks);
this.panel1.Controls.Add(this.label2);
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.Name = "label5";
//
// btnBrowse
//
resources.ApplyResources(this.btnBrowse, "btnBrowse");
this.btnBrowse.Name = "btnBrowse";
this.btnBrowse.UseVisualStyleBackColor = true;
this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click);
//
// txtCustomIcon
//
resources.ApplyResources(this.txtCustomIcon, "txtCustomIcon");
this.txtCustomIcon.Name = "txtCustomIcon";
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// label1
//
resources.ApplyResources(this.label1, "label1");
@@ -125,8 +155,8 @@
//
// lvRoutings
//
this.lvRoutings.ContextMenuStrip = this.cmsLv;
resources.ApplyResources(this.lvRoutings, "lvRoutings");
this.lvRoutings.ContextMenuStrip = this.cmsLv;
this.lvRoutings.FullRowSelect = true;
this.lvRoutings.GridLines = true;
this.lvRoutings.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
@@ -142,6 +172,7 @@
//
// cmsLv
//
resources.ApplyResources(this.cmsLv, "cmsLv");
this.cmsLv.ImageScalingSize = new System.Drawing.Size(20, 20);
this.cmsLv.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuAdd,
@@ -155,114 +186,113 @@
this.menuMoveBottom});
this.cmsLv.Name = "cmsLv";
this.cmsLv.OwnerItem = this.MenuItem1;
resources.ApplyResources(this.cmsLv, "cmsLv");
//
// menuAdd
//
this.menuAdd.Name = "menuAdd";
resources.ApplyResources(this.menuAdd, "menuAdd");
this.menuAdd.Name = "menuAdd";
this.menuAdd.Click += new System.EventHandler(this.menuAdd_Click);
//
// menuRemove
//
this.menuRemove.Name = "menuRemove";
resources.ApplyResources(this.menuRemove, "menuRemove");
this.menuRemove.Name = "menuRemove";
this.menuRemove.Click += new System.EventHandler(this.menuRemove_Click);
//
// menuSelectAll
//
this.menuSelectAll.Name = "menuSelectAll";
resources.ApplyResources(this.menuSelectAll, "menuSelectAll");
this.menuSelectAll.Name = "menuSelectAll";
this.menuSelectAll.Click += new System.EventHandler(this.menuSelectAll_Click);
//
// menuExportSelectedRules
//
this.menuExportSelectedRules.Name = "menuExportSelectedRules";
resources.ApplyResources(this.menuExportSelectedRules, "menuExportSelectedRules");
this.menuExportSelectedRules.Name = "menuExportSelectedRules";
this.menuExportSelectedRules.Click += new System.EventHandler(this.menuExportSelectedRules_Click);
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
resources.ApplyResources(this.toolStripSeparator3, "toolStripSeparator3");
this.toolStripSeparator3.Name = "toolStripSeparator3";
//
// menuMoveTop
//
this.menuMoveTop.Name = "menuMoveTop";
resources.ApplyResources(this.menuMoveTop, "menuMoveTop");
this.menuMoveTop.Name = "menuMoveTop";
this.menuMoveTop.Click += new System.EventHandler(this.menuMoveTop_Click);
//
// menuMoveUp
//
this.menuMoveUp.Name = "menuMoveUp";
resources.ApplyResources(this.menuMoveUp, "menuMoveUp");
this.menuMoveUp.Name = "menuMoveUp";
this.menuMoveUp.Click += new System.EventHandler(this.menuMoveUp_Click);
//
// menuMoveDown
//
this.menuMoveDown.Name = "menuMoveDown";
resources.ApplyResources(this.menuMoveDown, "menuMoveDown");
this.menuMoveDown.Name = "menuMoveDown";
this.menuMoveDown.Click += new System.EventHandler(this.menuMoveDown_Click);
//
// menuMoveBottom
//
this.menuMoveBottom.Name = "menuMoveBottom";
resources.ApplyResources(this.menuMoveBottom, "menuMoveBottom");
this.menuMoveBottom.Name = "menuMoveBottom";
this.menuMoveBottom.Click += new System.EventHandler(this.menuMoveBottom_Click);
//
// MenuItem1
//
resources.ApplyResources(this.MenuItem1, "MenuItem1");
this.MenuItem1.DropDown = this.cmsLv;
this.MenuItem1.Name = "MenuItem1";
resources.ApplyResources(this.MenuItem1, "MenuItem1");
//
// tabControl2
//
this.tabControl2.Controls.Add(this.tabPage2);
resources.ApplyResources(this.tabControl2, "tabControl2");
this.tabControl2.Controls.Add(this.tabPage2);
this.tabControl2.Name = "tabControl2";
this.tabControl2.SelectedIndex = 0;
//
// tabPage2
//
this.tabPage2.Controls.Add(this.lvRoutings);
resources.ApplyResources(this.tabPage2, "tabPage2");
this.tabPage2.Controls.Add(this.lvRoutings);
this.tabPage2.Name = "tabPage2";
this.tabPage2.UseVisualStyleBackColor = true;
//
// menuServer
//
resources.ApplyResources(this.menuServer, "menuServer");
this.menuServer.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.MenuItem1,
this.toolStripMenuItem1});
resources.ApplyResources(this.menuServer, "menuServer");
this.menuServer.Name = "menuServer";
//
// toolStripMenuItem1
//
resources.ApplyResources(this.toolStripMenuItem1, "toolStripMenuItem1");
this.toolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuImportRulesFromFile,
this.menuImportRulesFromClipboard,
this.menuImportRulesFromUrl});
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
resources.ApplyResources(this.toolStripMenuItem1, "toolStripMenuItem1");
//
// menuImportRulesFromFile
//
this.menuImportRulesFromFile.Name = "menuImportRulesFromFile";
resources.ApplyResources(this.menuImportRulesFromFile, "menuImportRulesFromFile");
this.menuImportRulesFromFile.Name = "menuImportRulesFromFile";
this.menuImportRulesFromFile.Click += new System.EventHandler(this.menuImportRulesFromFile_Click);
//
// menuImportRulesFromClipboard
//
this.menuImportRulesFromClipboard.Name = "menuImportRulesFromClipboard";
resources.ApplyResources(this.menuImportRulesFromClipboard, "menuImportRulesFromClipboard");
this.menuImportRulesFromClipboard.Name = "menuImportRulesFromClipboard";
this.menuImportRulesFromClipboard.Click += new System.EventHandler(this.menuImportRulesFromClipboard_Click);
//
// menuImportRulesFromUrl
//
this.menuImportRulesFromUrl.Name = "menuImportRulesFromUrl";
resources.ApplyResources(this.menuImportRulesFromUrl, "menuImportRulesFromUrl");
this.menuImportRulesFromUrl.Name = "menuImportRulesFromUrl";
this.menuImportRulesFromUrl.Click += new System.EventHandler(this.menuImportRulesFromUrl_Click);
//
// RoutingRuleSettingForm
@@ -319,5 +349,9 @@
private System.Windows.Forms.TextBox txtUrl;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtCustomIcon;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button btnBrowse;
private System.Windows.Forms.Label label5;
}
}

View File

@@ -38,6 +38,7 @@ namespace v2rayN.Forms
txtRemarks.Text = routingItem.remarks ?? string.Empty;
txtUrl.Text = routingItem.url ?? string.Empty;
txtCustomIcon.Text = routingItem.customIcon ?? string.Empty;
InitRoutingsView();
RefreshRoutingsView();
@@ -93,6 +94,7 @@ namespace v2rayN.Forms
{
routingItem.remarks = txtRemarks.Text.Trim();
routingItem.url = txtUrl.Text.Trim();
routingItem.customIcon = txtCustomIcon.Text.Trim();
if (ConfigHandler.AddRoutingItem(ref config, routingItem, EditIndex) == 0)
{
@@ -108,6 +110,14 @@ namespace v2rayN.Forms
{
this.DialogResult = DialogResult.Cancel;
}
private void btnBrowse_Click(object sender, EventArgs e)
{
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.Filter = "PNG|*.png";
openFileDialog1.ShowDialog();
txtCustomIcon.Text = openFileDialog1.FileName;
}
private void lvRoutings_DoubleClick(object sender, EventArgs e)
{
@@ -340,8 +350,9 @@ namespace v2rayN.Forms
return ConfigHandler.AddBatchRoutingRules(ref routingItem, clipboardData, blReplace);
}
#endregion
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -120,16 +120,34 @@
<data name="btnClose.Text" xml:space="preserve">
<value>取消(&amp;C)</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>确定(&amp;O)</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 613</value>
<value>0, 501</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>785, 60</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>确定(&amp;O)</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>785, 147</value>
</data>
<data name="btnBrowse.Location" type="System.Drawing.Point, System.Drawing">
<value>670, 104</value>
</data>
<data name="btnBrowse.Text" xml:space="preserve">
<value>浏览(&amp;B)</value>
</data>
<data name="txtCustomIcon.Location" type="System.Drawing.Point, System.Drawing">
<value>101, 105</value>
</data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>自定义图标</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>29, 12</value>
</data>
@@ -154,9 +172,6 @@
<data name="label2.Text" xml:space="preserve">
<value>别名</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>785, 109</value>
</data>
<data name="menuAdd.Size" type="System.Drawing.Size, System.Drawing">
<value>196, 22</value>
</data>
@@ -235,19 +250,28 @@
</value>
</data>
<data name="lvRoutings.Size" type="System.Drawing.Size, System.Drawing">
<value>771, 447</value>
<value>771, 297</value>
</data>
<data name="tabControl2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 172</value>
</data>
<data name="tabControl2.Size" type="System.Drawing.Size, System.Drawing">
<value>785, 329</value>
</data>
<data name="tabPage2.Size" type="System.Drawing.Size, System.Drawing">
<value>777, 453</value>
<value>777, 303</value>
</data>
<data name="tabPage2.Text" xml:space="preserve">
<value>规则列表</value>
</data>
<data name="tabControl2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 134</value>
<data name="menuServer.Size" type="System.Drawing.Size, System.Drawing">
<value>785, 25</value>
</data>
<data name="tabControl2.Size" type="System.Drawing.Size, System.Drawing">
<value>785, 479</value>
<data name="toolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>68, 21</value>
</data>
<data name="toolStripMenuItem1.Text" xml:space="preserve">
<value>导入规则</value>
</data>
<data name="menuImportRulesFromFile.Size" type="System.Drawing.Size, System.Drawing">
<value>189, 22</value>
@@ -267,17 +291,8 @@
<data name="menuImportRulesFromUrl.Text" xml:space="preserve">
<value>从订阅Url中导入规则</value>
</data>
<data name="toolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>68, 21</value>
</data>
<data name="toolStripMenuItem1.Text" xml:space="preserve">
<value>导入规则</value>
</data>
<data name="menuServer.Size" type="System.Drawing.Size, System.Drawing">
<value>785, 25</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>785, 673</value>
<value>785, 561</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>规则集设置</value>

View File

@@ -1,234 +0,0 @@
namespace v2rayN.Forms
{
partial class RoutingSettingDetailsForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RoutingSettingDetailsForm));
this.panel1 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.clbProtocol = new System.Windows.Forms.CheckedListBox();
this.label3 = new System.Windows.Forms.Label();
this.txtPort = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.labRoutingTips = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.cmbOutboundTag = new System.Windows.Forms.ComboBox();
this.txtRemarks = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.panel4 = new System.Windows.Forms.Panel();
this.btnClose = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.txtIP = new System.Windows.Forms.TextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txtDomain = new System.Windows.Forms.TextBox();
this.panel3.SuspendLayout();
this.panel4.SuspendLayout();
this.panel2.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// panel3
//
this.panel3.Controls.Add(this.clbProtocol);
this.panel3.Controls.Add(this.label3);
this.panel3.Controls.Add(this.txtPort);
this.panel3.Controls.Add(this.label1);
this.panel3.Controls.Add(this.labRoutingTips);
this.panel3.Controls.Add(this.label4);
this.panel3.Controls.Add(this.cmbOutboundTag);
this.panel3.Controls.Add(this.txtRemarks);
this.panel3.Controls.Add(this.label2);
resources.ApplyResources(this.panel3, "panel3");
this.panel3.Name = "panel3";
//
// clbProtocol
//
this.clbProtocol.CheckOnClick = true;
resources.ApplyResources(this.clbProtocol, "clbProtocol");
this.clbProtocol.FormattingEnabled = true;
this.clbProtocol.Items.AddRange(new object[] {
resources.GetString("clbProtocol.Items"),
resources.GetString("clbProtocol.Items1"),
resources.GetString("clbProtocol.Items2")});
this.clbProtocol.MultiColumn = true;
this.clbProtocol.Name = "clbProtocol";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// txtPort
//
resources.ApplyResources(this.txtPort, "txtPort");
this.txtPort.Name = "txtPort";
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// labRoutingTips
//
this.labRoutingTips.ForeColor = System.Drawing.Color.Brown;
resources.ApplyResources(this.labRoutingTips, "labRoutingTips");
this.labRoutingTips.Name = "labRoutingTips";
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// cmbOutboundTag
//
this.cmbOutboundTag.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbOutboundTag.FormattingEnabled = true;
this.cmbOutboundTag.Items.AddRange(new object[] {
resources.GetString("cmbOutboundTag.Items"),
resources.GetString("cmbOutboundTag.Items1"),
resources.GetString("cmbOutboundTag.Items2")});
resources.ApplyResources(this.cmbOutboundTag, "cmbOutboundTag");
this.cmbOutboundTag.Name = "cmbOutboundTag";
//
// txtRemarks
//
resources.ApplyResources(this.txtRemarks, "txtRemarks");
this.txtRemarks.Name = "txtRemarks";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// panel4
//
this.panel4.Controls.Add(this.btnClose);
this.panel4.Controls.Add(this.btnOK);
resources.ApplyResources(this.panel4, "panel4");
this.panel4.Name = "panel4";
//
// 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);
//
// btnOK
//
resources.ApplyResources(this.btnOK, "btnOK");
this.btnOK.Name = "btnOK";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// panel2
//
this.panel2.Controls.Add(this.groupBox2);
this.panel2.Controls.Add(this.groupBox1);
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Name = "panel2";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.txtIP);
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.Name = "groupBox2";
this.groupBox2.TabStop = false;
//
// txtIP
//
resources.ApplyResources(this.txtIP, "txtIP");
this.txtIP.Name = "txtIP";
//
// groupBox1
//
this.groupBox1.Controls.Add(this.txtDomain);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
// txtDomain
//
resources.ApplyResources(this.txtDomain, "txtDomain");
this.txtDomain.Name = "txtDomain";
//
// RoutingSettingDetailsForm
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnClose;
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel4);
this.Controls.Add(this.panel3);
this.Controls.Add(this.panel1);
this.Name = "RoutingSettingDetailsForm";
this.Load += new System.EventHandler(this.RoutingSettingDetailsForm_Load);
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.panel4.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ComboBox cmbOutboundTag;
private System.Windows.Forms.TextBox txtRemarks;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox txtDomain;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.TextBox txtIP;
private System.Windows.Forms.Label labRoutingTips;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtPort;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.CheckedListBox clbProtocol;
}
}

View File

@@ -1,131 +0,0 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using v2rayN.Base;
using v2rayN.Handler;
using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class RoutingSettingDetailsForm : BaseForm
{
public int EditIndex
{
get; set;
}
protected RulesItem routingItem = null;
public RoutingSettingDetailsForm()
{
InitializeComponent();
}
private void RoutingSettingDetailsForm_Load(object sender, EventArgs e)
{
if (EditIndex >= 0)
{
routingItem = config.rules[EditIndex];
BindingData();
}
else
{
routingItem = new RulesItem();
ClearBind();
}
}
private void EndBindingData()
{
if (routingItem != null)
{
routingItem.remarks = txtRemarks.Text.TrimEx();
routingItem.port = txtPort.Text.TrimEx();
routingItem.outboundTag = cmbOutboundTag.Text;
routingItem.domain = Utils.String2List(txtDomain.Text);
routingItem.ip = Utils.String2List(txtIP.Text);
var protocol = new List<string>();
for (int i = 0; i < clbProtocol.Items.Count; i++)
{
if (clbProtocol.GetItemChecked(i))
{
protocol.Add(clbProtocol.Items[i].ToString());
}
}
routingItem.protocol = protocol;
}
}
private void BindingData()
{
if (routingItem != null)
{
txtRemarks.Text = routingItem.remarks ?? string.Empty;
txtPort.Text = routingItem.port ?? string.Empty;
cmbOutboundTag.Text = routingItem.outboundTag;
txtDomain.Text = Utils.List2String(routingItem.domain, true);
txtIP.Text = Utils.List2String(routingItem.ip, true);
if (routingItem.protocol != null)
{
for (int i = 0; i < clbProtocol.Items.Count; i++)
{
if (routingItem.protocol.Contains(clbProtocol.Items[i].ToString()))
{
clbProtocol.SetItemChecked(i, true);
}
}
}
}
}
private void ClearBind()
{
txtRemarks.Text = string.Empty;
txtPort.Text = string.Empty;
cmbOutboundTag.Text = Global.agentTag;
txtDomain.Text = string.Empty;
txtIP.Text = string.Empty;
}
private void btnOK_Click(object sender, EventArgs e)
{
EndBindingData();
var hasRule = false;
if (routingItem.domain != null && routingItem.domain.Count > 0)
{
hasRule = true;
}
if (routingItem.ip != null && routingItem.ip.Count > 0)
{
hasRule = true;
}
if (routingItem.protocol != null && routingItem.protocol.Count > 0)
{
hasRule = true;
}
if (!Utils.IsNullOrEmpty(routingItem.port))
{
hasRule = true;
}
if (!hasRule)
{
UI.ShowWarning(string.Format(UIRes.I18N("RoutingRuleDetailRequiredTips"), "Port/Protocol/Domain/IP"));
return;
}
if (ConfigHandler.AddRoutingRule(ref config, routingItem, EditIndex) == 0)
{
this.DialogResult = DialogResult.OK;
}
else
{
UI.ShowWarning(UIRes.I18N("OperationFailed"));
}
this.DialogResult = DialogResult.OK;
}
private void btnClose_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
}
}

View File

@@ -1,723 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>742, 10</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="&gt;&gt;panel1.Name" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;panel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="clbProtocol.ColumnWidth" type="System.Int32, mscorlib">
<value>80</value>
</data>
<data name="clbProtocol.Items" xml:space="preserve">
<value>http</value>
</data>
<data name="clbProtocol.Items1" xml:space="preserve">
<value>tls</value>
</data>
<data name="clbProtocol.Items2" xml:space="preserve">
<value>bittorrent</value>
</data>
<data name="clbProtocol.Location" type="System.Drawing.Point, System.Drawing">
<value>347, 43</value>
</data>
<data name="clbProtocol.Size" type="System.Drawing.Size, System.Drawing">
<value>245, 20</value>
</data>
<data name="clbProtocol.TabIndex" type="System.Int32, mscorlib">
<value>39</value>
</data>
<data name="&gt;&gt;clbProtocol.Name" xml:space="preserve">
<value>clbProtocol</value>
</data>
<data name="&gt;&gt;clbProtocol.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckedListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;clbProtocol.Parent" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;clbProtocol.ZOrder" xml:space="preserve">
<value>0</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>274, 47</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 12</value>
</data>
<data name="label3.TabIndex" type="System.Int32, mscorlib">
<value>36</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Protocol</value>
</data>
<data name="&gt;&gt;label3.Name" xml:space="preserve">
<value>label3</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;label3.Parent" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="txtPort.Location" type="System.Drawing.Point, System.Drawing">
<value>84, 43</value>
</data>
<data name="txtPort.Size" type="System.Drawing.Size, System.Drawing">
<value>166, 21</value>
</data>
<data name="txtPort.TabIndex" type="System.Int32, mscorlib">
<value>35</value>
</data>
<data name="&gt;&gt;txtPort.Name" xml:space="preserve">
<value>txtPort</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;txtPort.Parent" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;txtPort.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>19, 47</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>29, 12</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>34</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Port</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;label1.Parent" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="labRoutingTips.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labRoutingTips.Location" type="System.Drawing.Point, System.Drawing">
<value>19, 82</value>
</data>
<data name="labRoutingTips.Size" type="System.Drawing.Size, System.Drawing">
<value>598, 16</value>
</data>
<data name="labRoutingTips.TabIndex" type="System.Int32, mscorlib">
<value>33</value>
</data>
<data name="labRoutingTips.Text" xml:space="preserve">
<value>*Set the rules, separated by commas (,); The comma in the regular is replaced by &lt;COMMA&gt;</value>
</data>
<data name="&gt;&gt;labRoutingTips.Name" xml:space="preserve">
<value>labRoutingTips</value>
</data>
<data name="&gt;&gt;labRoutingTips.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="&gt;&gt;labRoutingTips.Parent" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;labRoutingTips.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label4.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
<value>274, 20</value>
</data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>47, 12</value>
</data>
<data name="label4.TabIndex" type="System.Int32, mscorlib">
<value>32</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Out Tag</value>
</data>
<data name="&gt;&gt;label4.Name" xml:space="preserve">
<value>label4</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;label4.Parent" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="cmbOutboundTag.Items" xml:space="preserve">
<value>proxy</value>
</data>
<data name="cmbOutboundTag.Items1" xml:space="preserve">
<value>direct</value>
</data>
<data name="cmbOutboundTag.Items2" xml:space="preserve">
<value>block</value>
</data>
<data name="cmbOutboundTag.Location" type="System.Drawing.Point, System.Drawing">
<value>347, 16</value>
</data>
<data name="cmbOutboundTag.Size" type="System.Drawing.Size, System.Drawing">
<value>119, 20</value>
</data>
<data name="cmbOutboundTag.TabIndex" type="System.Int32, mscorlib">
<value>31</value>
</data>
<data name="&gt;&gt;cmbOutboundTag.Name" xml:space="preserve">
<value>cmbOutboundTag</value>
</data>
<data name="&gt;&gt;cmbOutboundTag.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cmbOutboundTag.Parent" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;cmbOutboundTag.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
<value>84, 16</value>
</data>
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
<value>166, 21</value>
</data>
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
<value>30</value>
</data>
<data name="&gt;&gt;txtRemarks.Name" xml:space="preserve">
<value>txtRemarks</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;txtRemarks.Parent" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;txtRemarks.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>19, 20</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>47, 12</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>29</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Remarks</value>
</data>
<data name="&gt;&gt;label2.Name" xml:space="preserve">
<value>label2</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;label2.Parent" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="panel3.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="panel3.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 10</value>
</data>
<data name="panel3.Size" type="System.Drawing.Size, System.Drawing">
<value>742, 111</value>
</data>
<data name="panel3.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="&gt;&gt;panel3.Name" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;panel3.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="&gt;&gt;panel3.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel3.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;btnClose.Name" xml:space="preserve">
<value>btnClose</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;btnClose.Parent" xml:space="preserve">
<value>panel4</value>
</data>
<data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;btnOK.Name" xml:space="preserve">
<value>btnOK</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;btnOK.Parent" xml:space="preserve">
<value>panel4</value>
</data>
<data name="&gt;&gt;btnOK.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="panel4.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="panel4.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 516</value>
</data>
<data name="panel4.Size" type="System.Drawing.Size, System.Drawing">
<value>742, 60</value>
</data>
<data name="panel4.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="&gt;&gt;panel4.Name" xml:space="preserve">
<value>panel4</value>
</data>
<data name="&gt;&gt;panel4.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="&gt;&gt;panel4.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel4.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="btnClose.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
<value>504, 15</value>
</data>
<data name="btnClose.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="btnClose.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="btnClose.Text" xml:space="preserve">
<value>&amp;Cancel</value>
</data>
<data name="&gt;&gt;btnClose.Name" xml:space="preserve">
<value>btnClose</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;btnClose.Parent" xml:space="preserve">
<value>panel4</value>
</data>
<data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="btnOK.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
<value>411, 15</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>&amp;OK</value>
</data>
<data name="&gt;&gt;btnOK.Name" xml:space="preserve">
<value>btnOK</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;btnOK.Parent" xml:space="preserve">
<value>panel4</value>
</data>
<data name="&gt;&gt;btnOK.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;groupBox2.Name" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;groupBox2.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;groupBox2.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;groupBox1.Name" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;groupBox1.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 121</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>742, 395</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="&gt;&gt;panel2.Name" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;panel2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;txtIP.Name" xml:space="preserve">
<value>txtIP</value>
</data>
<data name="&gt;&gt;txtIP.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="&gt;&gt;txtIP.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;txtIP.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="groupBox2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="groupBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>392, 0</value>
</data>
<data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>350, 395</value>
</data>
<data name="groupBox2.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>IP</value>
</data>
<data name="&gt;&gt;groupBox2.Name" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;groupBox2.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;groupBox2.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="txtIP.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="txtIP.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 17</value>
</data>
<data name="txtIP.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="txtIP.Size" type="System.Drawing.Size, System.Drawing">
<value>344, 375</value>
</data>
<data name="txtIP.TabIndex" type="System.Int32, mscorlib">
<value>25</value>
</data>
<data name="&gt;&gt;txtIP.Name" xml:space="preserve">
<value>txtIP</value>
</data>
<data name="&gt;&gt;txtIP.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="&gt;&gt;txtIP.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;txtIP.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;txtDomain.Name" xml:space="preserve">
<value>txtDomain</value>
</data>
<data name="&gt;&gt;txtDomain.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="&gt;&gt;txtDomain.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtDomain.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Left</value>
</data>
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>392, 395</value>
</data>
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>Domain</value>
</data>
<data name="&gt;&gt;groupBox1.Name" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;groupBox1.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="txtDomain.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="txtDomain.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 17</value>
</data>
<data name="txtDomain.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="txtDomain.Size" type="System.Drawing.Size, System.Drawing">
<value>386, 375</value>
</data>
<data name="txtDomain.TabIndex" type="System.Int32, mscorlib">
<value>24</value>
</data>
<data name="&gt;&gt;txtDomain.Name" xml:space="preserve">
<value>txtDomain</value>
</data>
<data name="&gt;&gt;txtDomain.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="&gt;&gt;txtDomain.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtDomain.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 12</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>742, 576</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>RoutingSettingDetailsForm</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>RoutingSettingDetailsForm</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>

View File

@@ -45,6 +45,7 @@
this.menuRemove = new System.Windows.Forms.ToolStripMenuItem();
this.menuSelectAll = new System.Windows.Forms.ToolStripMenuItem();
this.menuSetDefaultRouting = new System.Windows.Forms.ToolStripMenuItem();
this.menuImportAdvancedRules = new System.Windows.Forms.ToolStripMenuItem();
this.MenuItemAdvanced = new System.Windows.Forms.ToolStripMenuItem();
this.menuServer = new System.Windows.Forms.MenuStrip();
this.MenuItemBasic = new System.Windows.Forms.ToolStripMenuItem();
@@ -70,6 +71,7 @@
this.txtBlockDomain = new System.Windows.Forms.TextBox();
this.tabPageRuleList = new System.Windows.Forms.TabPage();
this.lvRoutings = new v2rayN.Base.ListViewFlickerFree();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.panel2.SuspendLayout();
this.panel1.SuspendLayout();
this.cmsLv.SuspendLayout();
@@ -92,24 +94,24 @@
//
// 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);
//
// panel2
//
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Controls.Add(this.labRoutingTips);
this.panel2.Controls.Add(this.btnClose);
this.panel2.Controls.Add(this.btnOK);
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Name = "panel2";
//
// labRoutingTips
//
resources.ApplyResources(this.labRoutingTips, "labRoutingTips");
this.labRoutingTips.ForeColor = System.Drawing.Color.Brown;
resources.ApplyResources(this.labRoutingTips, "labRoutingTips");
this.labRoutingTips.Name = "labRoutingTips";
//
// btnOK
@@ -121,22 +123,22 @@
//
// panel1
//
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Controls.Add(this.cmbdomainMatcher);
this.panel1.Controls.Add(this.label6);
this.panel1.Controls.Add(this.chkenableRoutingAdvanced);
this.panel1.Controls.Add(this.linkLabelRoutingDoc);
this.panel1.Controls.Add(this.cmbdomainStrategy);
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// cmbdomainMatcher
//
resources.ApplyResources(this.cmbdomainMatcher, "cmbdomainMatcher");
this.cmbdomainMatcher.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbdomainMatcher.FormattingEnabled = true;
this.cmbdomainMatcher.Items.AddRange(new object[] {
resources.GetString("cmbdomainMatcher.Items"),
resources.GetString("cmbdomainMatcher.Items1")});
resources.ApplyResources(this.cmbdomainMatcher, "cmbdomainMatcher");
this.cmbdomainMatcher.Name = "cmbdomainMatcher";
//
// label6
@@ -160,107 +162,115 @@
//
// cmbdomainStrategy
//
resources.ApplyResources(this.cmbdomainStrategy, "cmbdomainStrategy");
this.cmbdomainStrategy.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbdomainStrategy.FormattingEnabled = true;
this.cmbdomainStrategy.Items.AddRange(new object[] {
resources.GetString("cmbdomainStrategy.Items"),
resources.GetString("cmbdomainStrategy.Items1"),
resources.GetString("cmbdomainStrategy.Items2")});
resources.ApplyResources(this.cmbdomainStrategy, "cmbdomainStrategy");
this.cmbdomainStrategy.Name = "cmbdomainStrategy";
//
// cmsLv
//
resources.ApplyResources(this.cmsLv, "cmsLv");
this.cmsLv.ImageScalingSize = new System.Drawing.Size(20, 20);
this.cmsLv.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuAdd,
this.menuRemove,
this.menuSelectAll,
this.menuSetDefaultRouting});
this.menuSetDefaultRouting,
this.toolStripSeparator1,
this.menuImportAdvancedRules});
this.cmsLv.Name = "cmsLv";
this.cmsLv.OwnerItem = this.MenuItemAdvanced;
resources.ApplyResources(this.cmsLv, "cmsLv");
//
// menuAdd
//
resources.ApplyResources(this.menuAdd, "menuAdd");
this.menuAdd.Name = "menuAdd";
resources.ApplyResources(this.menuAdd, "menuAdd");
this.menuAdd.Click += new System.EventHandler(this.menuAdd_Click);
//
// menuRemove
//
resources.ApplyResources(this.menuRemove, "menuRemove");
this.menuRemove.Name = "menuRemove";
resources.ApplyResources(this.menuRemove, "menuRemove");
this.menuRemove.Click += new System.EventHandler(this.menuRemove_Click);
//
// menuSelectAll
//
resources.ApplyResources(this.menuSelectAll, "menuSelectAll");
this.menuSelectAll.Name = "menuSelectAll";
resources.ApplyResources(this.menuSelectAll, "menuSelectAll");
this.menuSelectAll.Click += new System.EventHandler(this.menuSelectAll_Click);
//
// menuSetDefaultRouting
//
resources.ApplyResources(this.menuSetDefaultRouting, "menuSetDefaultRouting");
this.menuSetDefaultRouting.Name = "menuSetDefaultRouting";
resources.ApplyResources(this.menuSetDefaultRouting, "menuSetDefaultRouting");
this.menuSetDefaultRouting.Click += new System.EventHandler(this.menuSetDefaultRouting_Click);
//
// menuImportAdvancedRules
//
this.menuImportAdvancedRules.Name = "menuImportAdvancedRules";
resources.ApplyResources(this.menuImportAdvancedRules, "menuImportAdvancedRules");
this.menuImportAdvancedRules.Click += new System.EventHandler(this.menuImportAdvancedRules_Click);
//
// MenuItemAdvanced
//
resources.ApplyResources(this.MenuItemAdvanced, "MenuItemAdvanced");
this.MenuItemAdvanced.DropDown = this.cmsLv;
this.MenuItemAdvanced.Name = "MenuItemAdvanced";
resources.ApplyResources(this.MenuItemAdvanced, "MenuItemAdvanced");
//
// menuServer
//
resources.ApplyResources(this.menuServer, "menuServer");
this.menuServer.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.MenuItemBasic,
this.MenuItemAdvanced});
resources.ApplyResources(this.menuServer, "menuServer");
this.menuServer.Name = "menuServer";
//
// MenuItemBasic
//
resources.ApplyResources(this.MenuItemBasic, "MenuItemBasic");
this.MenuItemBasic.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuImportBasicRules});
this.MenuItemBasic.Name = "MenuItemBasic";
resources.ApplyResources(this.MenuItemBasic, "MenuItemBasic");
//
// menuImportBasicRules
//
resources.ApplyResources(this.menuImportBasicRules, "menuImportBasicRules");
this.menuImportBasicRules.Name = "menuImportBasicRules";
resources.ApplyResources(this.menuImportBasicRules, "menuImportBasicRules");
this.menuImportBasicRules.Click += new System.EventHandler(this.menuImportBasicRules_Click);
//
// tabNormal
//
resources.ApplyResources(this.tabNormal, "tabNormal");
this.tabNormal.Controls.Add(this.tabPageProxy);
this.tabNormal.Controls.Add(this.tabPageDirect);
this.tabNormal.Controls.Add(this.tabPageBlock);
this.tabNormal.Controls.Add(this.tabPageRuleList);
resources.ApplyResources(this.tabNormal, "tabNormal");
this.tabNormal.Name = "tabNormal";
this.tabNormal.SelectedIndex = 0;
this.tabNormal.Selecting += new System.Windows.Forms.TabControlCancelEventHandler(this.tabNormal_Selecting);
//
// tabPageProxy
//
resources.ApplyResources(this.tabPageProxy, "tabPageProxy");
this.tabPageProxy.Controls.Add(this.panel5);
resources.ApplyResources(this.tabPageProxy, "tabPageProxy");
this.tabPageProxy.Name = "tabPageProxy";
this.tabPageProxy.UseVisualStyleBackColor = true;
//
// panel5
//
resources.ApplyResources(this.panel5, "panel5");
this.panel5.Controls.Add(this.groupBox5);
this.panel5.Controls.Add(this.groupBox6);
resources.ApplyResources(this.panel5, "panel5");
this.panel5.Name = "panel5";
//
// groupBox5
//
resources.ApplyResources(this.groupBox5, "groupBox5");
this.groupBox5.Controls.Add(this.txtProxyIp);
resources.ApplyResources(this.groupBox5, "groupBox5");
this.groupBox5.Name = "groupBox5";
this.groupBox5.TabStop = false;
//
@@ -271,8 +281,8 @@
//
// groupBox6
//
resources.ApplyResources(this.groupBox6, "groupBox6");
this.groupBox6.Controls.Add(this.txtProxyDomain);
resources.ApplyResources(this.groupBox6, "groupBox6");
this.groupBox6.Name = "groupBox6";
this.groupBox6.TabStop = false;
//
@@ -283,22 +293,22 @@
//
// tabPageDirect
//
resources.ApplyResources(this.tabPageDirect, "tabPageDirect");
this.tabPageDirect.Controls.Add(this.panel4);
resources.ApplyResources(this.tabPageDirect, "tabPageDirect");
this.tabPageDirect.Name = "tabPageDirect";
this.tabPageDirect.UseVisualStyleBackColor = true;
//
// panel4
//
resources.ApplyResources(this.panel4, "panel4");
this.panel4.Controls.Add(this.groupBox3);
this.panel4.Controls.Add(this.groupBox4);
resources.ApplyResources(this.panel4, "panel4");
this.panel4.Name = "panel4";
//
// groupBox3
//
resources.ApplyResources(this.groupBox3, "groupBox3");
this.groupBox3.Controls.Add(this.txtDirectIp);
resources.ApplyResources(this.groupBox3, "groupBox3");
this.groupBox3.Name = "groupBox3";
this.groupBox3.TabStop = false;
//
@@ -309,8 +319,8 @@
//
// groupBox4
//
resources.ApplyResources(this.groupBox4, "groupBox4");
this.groupBox4.Controls.Add(this.txtDirectDomain);
resources.ApplyResources(this.groupBox4, "groupBox4");
this.groupBox4.Name = "groupBox4";
this.groupBox4.TabStop = false;
//
@@ -321,22 +331,22 @@
//
// tabPageBlock
//
resources.ApplyResources(this.tabPageBlock, "tabPageBlock");
this.tabPageBlock.Controls.Add(this.panel3);
resources.ApplyResources(this.tabPageBlock, "tabPageBlock");
this.tabPageBlock.Name = "tabPageBlock";
this.tabPageBlock.UseVisualStyleBackColor = true;
//
// panel3
//
resources.ApplyResources(this.panel3, "panel3");
this.panel3.Controls.Add(this.groupBox2);
this.panel3.Controls.Add(this.groupBox1);
resources.ApplyResources(this.panel3, "panel3");
this.panel3.Name = "panel3";
//
// groupBox2
//
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.Controls.Add(this.txtBlockIp);
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.Name = "groupBox2";
this.groupBox2.TabStop = false;
//
@@ -347,8 +357,8 @@
//
// groupBox1
//
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Controls.Add(this.txtBlockDomain);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
@@ -359,15 +369,15 @@
//
// tabPageRuleList
//
resources.ApplyResources(this.tabPageRuleList, "tabPageRuleList");
this.tabPageRuleList.Controls.Add(this.lvRoutings);
resources.ApplyResources(this.tabPageRuleList, "tabPageRuleList");
this.tabPageRuleList.Name = "tabPageRuleList";
this.tabPageRuleList.UseVisualStyleBackColor = true;
//
// lvRoutings
//
resources.ApplyResources(this.lvRoutings, "lvRoutings");
this.lvRoutings.ContextMenuStrip = this.cmsLv;
resources.ApplyResources(this.lvRoutings, "lvRoutings");
this.lvRoutings.FullRowSelect = true;
this.lvRoutings.GridLines = true;
this.lvRoutings.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
@@ -380,6 +390,11 @@
this.lvRoutings.View = System.Windows.Forms.View.Details;
this.lvRoutings.DoubleClick += new System.EventHandler(this.lvRoutings_DoubleClick);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
//
// RoutingSettingForm
//
resources.ApplyResources(this, "$this");
@@ -464,5 +479,7 @@
private System.Windows.Forms.ToolStripMenuItem menuImportBasicRules;
private System.Windows.Forms.ComboBox cmbdomainMatcher;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.ToolStripMenuItem menuImportAdvancedRules;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
}
}

View File

@@ -147,6 +147,7 @@ namespace v2rayN.Forms
lvRoutings.Columns.Add(UIRes.I18N("LvAlias"), 200);
lvRoutings.Columns.Add(UIRes.I18N("LvCount"), 60);
lvRoutings.Columns.Add(UIRes.I18N("LvUrl"), 240);
lvRoutings.Columns.Add(UIRes.I18N("LvCustomIcon"), 240);
lvRoutings.EndUpdate();
}
@@ -174,6 +175,7 @@ namespace v2rayN.Forms
Utils.AddSubItem(lvItem, "remarks", item.remarks);
Utils.AddSubItem(lvItem, "count", item.rules.Count.ToString());
Utils.AddSubItem(lvItem, "url", item.url);
Utils.AddSubItem(lvItem, "customIcon", item.customIcon);
if (lvItem != null) lvRoutings.Items.Add(lvItem);
}
@@ -302,6 +304,14 @@ namespace v2rayN.Forms
UI.Show(UIRes.I18N("OperationSuccess"));
}
private void menuImportAdvancedRules_Click(object sender, EventArgs e)
{
if (ConfigHandler.InitBuiltinRouting(ref config, true) == 0)
{
RefreshRoutingsView();
}
}
#endregion
}

File diff suppressed because it is too large Load Diff

View File

@@ -124,6 +124,12 @@
<data name="btnClose.Text" xml:space="preserve">
<value>取消(&amp;C)</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 545</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>817, 60</value>
</data>
<data name="labRoutingTips.Size" type="System.Drawing.Size, System.Drawing">
<value>518, 16</value>
</data>
@@ -136,11 +142,8 @@
<data name="btnOK.Text" xml:space="preserve">
<value>确定(&amp;O)</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 545</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>817, 60</value>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>817, 51</value>
</data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>77, 12</value>
@@ -160,8 +163,8 @@
<data name="linkLabelRoutingDoc.Text" xml:space="preserve">
<value>域名解析策略</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>817, 51</value>
<data name="cmsLv.Size" type="System.Drawing.Size, System.Drawing">
<value>149, 114</value>
</data>
<data name="menuAdd.Size" type="System.Drawing.Size, System.Drawing">
<value>148, 22</value>
@@ -193,14 +196,8 @@
<data name="MenuItemAdvanced.Text" xml:space="preserve">
<value>高级功能</value>
</data>
<data name="cmsLv.Size" type="System.Drawing.Size, System.Drawing">
<value>149, 92</value>
</data>
<data name="menuImportBasicRules.Size" type="System.Drawing.Size, System.Drawing">
<value>172, 22</value>
</data>
<data name="menuImportBasicRules.Text" xml:space="preserve">
<value>一键导入基础规则</value>
<data name="menuServer.Size" type="System.Drawing.Size, System.Drawing">
<value>817, 25</value>
</data>
<data name="MenuItemBasic.Size" type="System.Drawing.Size, System.Drawing">
<value>68, 21</value>
@@ -208,23 +205,14 @@
<data name="MenuItemBasic.Text" xml:space="preserve">
<value>基础功能</value>
</data>
<data name="menuServer.Size" type="System.Drawing.Size, System.Drawing">
<value>817, 25</value>
<data name="menuImportBasicRules.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
</data>
<data name="txtProxyIp.Size" type="System.Drawing.Size, System.Drawing">
<value>405, 417</value>
<data name="menuImportBasicRules.Text" xml:space="preserve">
<value>一键导入基础规则</value>
</data>
<data name="groupBox5.Size" type="System.Drawing.Size, System.Drawing">
<value>411, 437</value>
</data>
<data name="txtProxyDomain.Size" type="System.Drawing.Size, System.Drawing">
<value>386, 417</value>
</data>
<data name="groupBox6.Size" type="System.Drawing.Size, System.Drawing">
<value>392, 437</value>
</data>
<data name="panel5.Size" type="System.Drawing.Size, System.Drawing">
<value>803, 437</value>
<data name="tabNormal.Size" type="System.Drawing.Size, System.Drawing">
<value>817, 469</value>
</data>
<data name="tabPageProxy.Size" type="System.Drawing.Size, System.Drawing">
<value>809, 443</value>
@@ -232,20 +220,20 @@
<data name="tabPageProxy.Text" xml:space="preserve">
<value> 1.代理的Domain或IP </value>
</data>
<data name="txtDirectIp.Size" type="System.Drawing.Size, System.Drawing">
<value>405, 417</value>
<data name="panel5.Size" type="System.Drawing.Size, System.Drawing">
<value>803, 437</value>
</data>
<data name="groupBox3.Size" type="System.Drawing.Size, System.Drawing">
<data name="groupBox5.Size" type="System.Drawing.Size, System.Drawing">
<value>411, 437</value>
</data>
<data name="txtDirectDomain.Size" type="System.Drawing.Size, System.Drawing">
<value>386, 417</value>
<data name="txtProxyIp.Size" type="System.Drawing.Size, System.Drawing">
<value>405, 417</value>
</data>
<data name="groupBox4.Size" type="System.Drawing.Size, System.Drawing">
<data name="groupBox6.Size" type="System.Drawing.Size, System.Drawing">
<value>392, 437</value>
</data>
<data name="panel4.Size" type="System.Drawing.Size, System.Drawing">
<value>803, 437</value>
<data name="txtProxyDomain.Size" type="System.Drawing.Size, System.Drawing">
<value>386, 417</value>
</data>
<data name="tabPageDirect.Size" type="System.Drawing.Size, System.Drawing">
<value>809, 443</value>
@@ -253,20 +241,20 @@
<data name="tabPageDirect.Text" xml:space="preserve">
<value> 2.直连的Domain或IP </value>
</data>
<data name="txtBlockIp.Size" type="System.Drawing.Size, System.Drawing">
<value>405, 417</value>
<data name="panel4.Size" type="System.Drawing.Size, System.Drawing">
<value>803, 437</value>
</data>
<data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
<data name="groupBox3.Size" type="System.Drawing.Size, System.Drawing">
<value>411, 437</value>
</data>
<data name="txtBlockDomain.Size" type="System.Drawing.Size, System.Drawing">
<value>386, 417</value>
<data name="txtDirectIp.Size" type="System.Drawing.Size, System.Drawing">
<value>405, 417</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<data name="groupBox4.Size" type="System.Drawing.Size, System.Drawing">
<value>392, 437</value>
</data>
<data name="panel3.Size" type="System.Drawing.Size, System.Drawing">
<value>803, 437</value>
<data name="txtDirectDomain.Size" type="System.Drawing.Size, System.Drawing">
<value>386, 417</value>
</data>
<data name="tabPageBlock.Size" type="System.Drawing.Size, System.Drawing">
<value>809, 443</value>
@@ -274,6 +262,27 @@
<data name="tabPageBlock.Text" xml:space="preserve">
<value> 3.阻止的Domain或IP </value>
</data>
<data name="panel3.Size" type="System.Drawing.Size, System.Drawing">
<value>803, 437</value>
</data>
<data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>411, 437</value>
</data>
<data name="txtBlockIp.Size" type="System.Drawing.Size, System.Drawing">
<value>405, 417</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>392, 437</value>
</data>
<data name="txtBlockDomain.Size" type="System.Drawing.Size, System.Drawing">
<value>386, 417</value>
</data>
<data name="tabPageRuleList.Size" type="System.Drawing.Size, System.Drawing">
<value>809, 443</value>
</data>
<data name="tabPageRuleList.Text" xml:space="preserve">
<value> 预定义规则集列表</value>
</data>
<data name="lvRoutings.Items" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
@@ -294,14 +303,8 @@
<data name="lvRoutings.Size" type="System.Drawing.Size, System.Drawing">
<value>803, 437</value>
</data>
<data name="tabPageRuleList.Size" type="System.Drawing.Size, System.Drawing">
<value>809, 443</value>
</data>
<data name="tabPageRuleList.Text" xml:space="preserve">
<value> 预定义规则集列表</value>
</data>
<data name="tabNormal.Size" type="System.Drawing.Size, System.Drawing">
<value>817, 469</value>
<data name="menuImportAdvancedRules.Text" xml:space="preserve">
<value>一键导入高级规则</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>817, 605</value>

View File

@@ -1,61 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using v2rayN.Handler;
using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class RoutingSubSettingForm : BaseForm
{
public string Url;
public RoutingSubSettingForm()
{
InitializeComponent();
}
private void RoutingSubSettingForm_Load(object sender, EventArgs e)
{
if (config.ruleSubItem == null)
{
config.ruleSubItem = new List<SubItem>();
}
if (config.ruleSubItem.Count <= 0)
{
config.ruleSubItem.Add(new SubItem
{
remarks = "def",
url = Global.CustomRoutingListUrl + "custom_routing_rules"
});
}
txtUrl.Text = config.ruleSubItem[0].url;
}
private void btnOK_Click(object sender, EventArgs e)
{
var url = txtUrl.Text.Trim();
if (Utils.IsNullOrEmpty(url))
{
return;
}
Url = url;
config.ruleSubItem[0].url = url;
ConfigHandler.SaveRuleSubItem(ref config);
this.DialogResult = DialogResult.OK;
}
private void btnClose_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
}
}

View File

@@ -0,0 +1,250 @@
namespace v2rayN.Forms
{
partial class ServerTransportControl
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ServerTransportControl));
this.gbTransport = new System.Windows.Forms.GroupBox();
this.panTlsMore = new System.Windows.Forms.Panel();
this.clbAlpn = new System.Windows.Forms.CheckedListBox();
this.label1 = new System.Windows.Forms.Label();
this.txtSNI = new System.Windows.Forms.TextBox();
this.labSNI = new System.Windows.Forms.Label();
this.labAllowInsecure = new System.Windows.Forms.Label();
this.cmbAllowInsecure = new System.Windows.Forms.ComboBox();
this.tipNetwork = new System.Windows.Forms.Label();
this.txtPath = new System.Windows.Forms.TextBox();
this.cmbNetwork = new System.Windows.Forms.ComboBox();
this.labNetwork = new System.Windows.Forms.Label();
this.labPath = new System.Windows.Forms.Label();
this.tipPath = new System.Windows.Forms.Label();
this.tipRequestHost = new System.Windows.Forms.Label();
this.labStreamSecurity = new System.Windows.Forms.Label();
this.cmbStreamSecurity = new System.Windows.Forms.ComboBox();
this.tipHeaderType = new System.Windows.Forms.Label();
this.txtRequestHost = new System.Windows.Forms.TextBox();
this.labHeaderType = new System.Windows.Forms.Label();
this.labRequestHost = new System.Windows.Forms.Label();
this.cmbHeaderType = new System.Windows.Forms.ComboBox();
this.gbTransport.SuspendLayout();
this.panTlsMore.SuspendLayout();
this.SuspendLayout();
//
// gbTransport
//
this.gbTransport.Controls.Add(this.panTlsMore);
this.gbTransport.Controls.Add(this.tipNetwork);
this.gbTransport.Controls.Add(this.txtPath);
this.gbTransport.Controls.Add(this.cmbNetwork);
this.gbTransport.Controls.Add(this.labNetwork);
this.gbTransport.Controls.Add(this.labPath);
this.gbTransport.Controls.Add(this.tipPath);
this.gbTransport.Controls.Add(this.tipRequestHost);
this.gbTransport.Controls.Add(this.labStreamSecurity);
this.gbTransport.Controls.Add(this.cmbStreamSecurity);
this.gbTransport.Controls.Add(this.tipHeaderType);
this.gbTransport.Controls.Add(this.txtRequestHost);
this.gbTransport.Controls.Add(this.labHeaderType);
this.gbTransport.Controls.Add(this.labRequestHost);
this.gbTransport.Controls.Add(this.cmbHeaderType);
resources.ApplyResources(this.gbTransport, "gbTransport");
this.gbTransport.Name = "gbTransport";
this.gbTransport.TabStop = false;
//
// panTlsMore
//
this.panTlsMore.Controls.Add(this.clbAlpn);
this.panTlsMore.Controls.Add(this.label1);
this.panTlsMore.Controls.Add(this.txtSNI);
this.panTlsMore.Controls.Add(this.labSNI);
this.panTlsMore.Controls.Add(this.labAllowInsecure);
this.panTlsMore.Controls.Add(this.cmbAllowInsecure);
resources.ApplyResources(this.panTlsMore, "panTlsMore");
this.panTlsMore.Name = "panTlsMore";
//
// clbAlpn
//
this.clbAlpn.CheckOnClick = true;
resources.ApplyResources(this.clbAlpn, "clbAlpn");
this.clbAlpn.FormattingEnabled = true;
this.clbAlpn.Items.AddRange(new object[] {
resources.GetString("clbAlpn.Items"),
resources.GetString("clbAlpn.Items1")});
this.clbAlpn.MultiColumn = true;
this.clbAlpn.Name = "clbAlpn";
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// txtSNI
//
resources.ApplyResources(this.txtSNI, "txtSNI");
this.txtSNI.Name = "txtSNI";
//
// labSNI
//
resources.ApplyResources(this.labSNI, "labSNI");
this.labSNI.Name = "labSNI";
//
// labAllowInsecure
//
resources.ApplyResources(this.labAllowInsecure, "labAllowInsecure");
this.labAllowInsecure.Name = "labAllowInsecure";
//
// cmbAllowInsecure
//
this.cmbAllowInsecure.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbAllowInsecure.FormattingEnabled = true;
this.cmbAllowInsecure.Items.AddRange(new object[] {
resources.GetString("cmbAllowInsecure.Items"),
resources.GetString("cmbAllowInsecure.Items1"),
resources.GetString("cmbAllowInsecure.Items2")});
resources.ApplyResources(this.cmbAllowInsecure, "cmbAllowInsecure");
this.cmbAllowInsecure.Name = "cmbAllowInsecure";
//
// tipNetwork
//
resources.ApplyResources(this.tipNetwork, "tipNetwork");
this.tipNetwork.Name = "tipNetwork";
//
// txtPath
//
resources.ApplyResources(this.txtPath, "txtPath");
this.txtPath.Name = "txtPath";
//
// cmbNetwork
//
this.cmbNetwork.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbNetwork.FormattingEnabled = true;
resources.ApplyResources(this.cmbNetwork, "cmbNetwork");
this.cmbNetwork.Name = "cmbNetwork";
this.cmbNetwork.SelectedIndexChanged += new System.EventHandler(this.cmbNetwork_SelectedIndexChanged);
//
// labNetwork
//
resources.ApplyResources(this.labNetwork, "labNetwork");
this.labNetwork.Name = "labNetwork";
//
// labPath
//
resources.ApplyResources(this.labPath, "labPath");
this.labPath.Name = "labPath";
//
// tipPath
//
resources.ApplyResources(this.tipPath, "tipPath");
this.tipPath.Name = "tipPath";
//
// tipRequestHost
//
resources.ApplyResources(this.tipRequestHost, "tipRequestHost");
this.tipRequestHost.Name = "tipRequestHost";
//
// labStreamSecurity
//
resources.ApplyResources(this.labStreamSecurity, "labStreamSecurity");
this.labStreamSecurity.Name = "labStreamSecurity";
//
// cmbStreamSecurity
//
this.cmbStreamSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbStreamSecurity.FormattingEnabled = true;
resources.ApplyResources(this.cmbStreamSecurity, "cmbStreamSecurity");
this.cmbStreamSecurity.Name = "cmbStreamSecurity";
this.cmbStreamSecurity.SelectedIndexChanged += new System.EventHandler(this.cmbStreamSecurity_SelectedIndexChanged);
//
// tipHeaderType
//
resources.ApplyResources(this.tipHeaderType, "tipHeaderType");
this.tipHeaderType.Name = "tipHeaderType";
//
// txtRequestHost
//
resources.ApplyResources(this.txtRequestHost, "txtRequestHost");
this.txtRequestHost.Name = "txtRequestHost";
//
// labHeaderType
//
resources.ApplyResources(this.labHeaderType, "labHeaderType");
this.labHeaderType.Name = "labHeaderType";
//
// labRequestHost
//
resources.ApplyResources(this.labRequestHost, "labRequestHost");
this.labRequestHost.Name = "labRequestHost";
//
// cmbHeaderType
//
this.cmbHeaderType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbHeaderType.FormattingEnabled = true;
resources.ApplyResources(this.cmbHeaderType, "cmbHeaderType");
this.cmbHeaderType.Name = "cmbHeaderType";
//
// ServerTransportControl
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.gbTransport);
this.Name = "ServerTransportControl";
this.Load += new System.EventHandler(this.ServerTransportControl_Load);
this.gbTransport.ResumeLayout(false);
this.gbTransport.PerformLayout();
this.panTlsMore.ResumeLayout(false);
this.panTlsMore.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox gbTransport;
private System.Windows.Forms.Panel panTlsMore;
private System.Windows.Forms.TextBox txtSNI;
private System.Windows.Forms.Label labSNI;
private System.Windows.Forms.Label labAllowInsecure;
private System.Windows.Forms.ComboBox cmbAllowInsecure;
private System.Windows.Forms.Label tipNetwork;
private System.Windows.Forms.TextBox txtPath;
private System.Windows.Forms.ComboBox cmbNetwork;
private System.Windows.Forms.Label labNetwork;
private System.Windows.Forms.Label labPath;
private System.Windows.Forms.Label tipPath;
private System.Windows.Forms.Label tipRequestHost;
private System.Windows.Forms.Label labStreamSecurity;
private System.Windows.Forms.ComboBox cmbStreamSecurity;
private System.Windows.Forms.Label tipHeaderType;
private System.Windows.Forms.TextBox txtRequestHost;
private System.Windows.Forms.Label labHeaderType;
private System.Windows.Forms.Label labRequestHost;
private System.Windows.Forms.ComboBox cmbHeaderType;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.CheckedListBox clbAlpn;
}
}

View File

@@ -0,0 +1,204 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class ServerTransportControl : UserControl
{
public bool AllowXtls { get; set; }
private VmessItem vmessItem = null;
public ServerTransportControl()
{
InitializeComponent();
}
private void ServerTransportControl_Load(object sender, EventArgs e)
{
}
private void Init(VmessItem item)
{
vmessItem = item;
cmbNetwork.Items.AddRange(Global.networks.ToArray());
cmbStreamSecurity.Items.Clear();
cmbStreamSecurity.Items.Add(string.Empty);
cmbStreamSecurity.Items.Add(Global.StreamSecurity);
if (AllowXtls)
{
cmbStreamSecurity.Items.Add(Global.StreamSecurityX);
}
}
public void BindingServer(VmessItem item)
{
Init(item);
cmbNetwork.Text = vmessItem.network;
cmbHeaderType.Text = vmessItem.headerType;
txtRequestHost.Text = vmessItem.requestHost;
txtPath.Text = vmessItem.path;
cmbStreamSecurity.Text = vmessItem.streamSecurity;
cmbAllowInsecure.Text = vmessItem.allowInsecure;
txtSNI.Text = vmessItem.sni;
if (vmessItem.alpn != null)
{
for (int i = 0; i < clbAlpn.Items.Count; i++)
{
if (vmessItem.alpn.Contains(clbAlpn.Items[i].ToString()))
{
clbAlpn.SetItemChecked(i, true);
}
}
}
}
public void ClearServer(VmessItem item)
{
Init(item);
cmbNetwork.Text = Global.DefaultNetwork;
cmbHeaderType.Text = Global.None;
txtRequestHost.Text = "";
cmbStreamSecurity.Text = "";
cmbAllowInsecure.Text = "";
txtPath.Text = "";
txtSNI.Text = "";
for (int i = 0; i < clbAlpn.Items.Count; i++)
{
clbAlpn.SetItemChecked(i, false);
}
}
public void EndBindingServer()
{
string network = cmbNetwork.Text;
string headerType = cmbHeaderType.Text;
string requestHost = txtRequestHost.Text;
string path = txtPath.Text;
string streamSecurity = cmbStreamSecurity.Text;
string allowInsecure = cmbAllowInsecure.Text;
string sni = txtSNI.Text;
vmessItem.network = network;
vmessItem.headerType = headerType;
vmessItem.requestHost = requestHost.Replace(" ", "");
vmessItem.path = path.Replace(" ", "");
vmessItem.streamSecurity = streamSecurity;
vmessItem.allowInsecure = allowInsecure;
vmessItem.sni = sni;
var alpn = new List<string>();
for (int i = 0; i < clbAlpn.Items.Count; i++)
{
if (clbAlpn.GetItemChecked(i))
{
alpn.Add(clbAlpn.Items[i].ToString());
}
}
vmessItem.alpn = alpn;
}
private void cmbNetwork_SelectedIndexChanged(object sender, EventArgs e)
{
SetHeaderType();
SetTips();
}
private void SetHeaderType()
{
cmbHeaderType.Items.Clear();
string network = cmbNetwork.Text;
if (Utils.IsNullOrEmpty(network))
{
cmbHeaderType.Items.Add(Global.None);
return;
}
if (network.Equals(Global.DefaultNetwork))
{
cmbHeaderType.Items.Add(Global.None);
cmbHeaderType.Items.Add(Global.TcpHeaderHttp);
}
else if (network.Equals("kcp") || network.Equals("quic"))
{
cmbHeaderType.Items.Add(Global.None);
cmbHeaderType.Items.AddRange(Global.kcpHeaderTypes.ToArray());
}
else if (network.Equals("grpc"))
{
cmbHeaderType.Items.Add(Global.GrpcgunMode);
cmbHeaderType.Items.Add(Global.GrpcmultiMode);
}
else
{
cmbHeaderType.Items.Add(Global.None);
}
cmbHeaderType.SelectedIndex = 0;
}
private void SetTips()
{
string network = cmbNetwork.Text;
if (Utils.IsNullOrEmpty(network))
{
network = Global.DefaultNetwork;
}
labHeaderType.Visible = true;
tipRequestHost.Text =
tipPath.Text =
tipHeaderType.Text = string.Empty;
if (network.Equals(Global.DefaultNetwork))
{
tipRequestHost.Text = UIRes.I18N("TransportRequestHostTip1");
tipHeaderType.Text = UIRes.I18N("TransportHeaderTypeTip1");
}
else if (network.Equals("kcp"))
{
tipHeaderType.Text = UIRes.I18N("TransportHeaderTypeTip2");
tipPath.Text = UIRes.I18N("TransportPathTip5");
}
else if (network.Equals("ws"))
{
tipRequestHost.Text = UIRes.I18N("TransportRequestHostTip2");
tipPath.Text = UIRes.I18N("TransportPathTip1");
}
else if (network.Equals("h2"))
{
tipRequestHost.Text = UIRes.I18N("TransportRequestHostTip3");
tipPath.Text = UIRes.I18N("TransportPathTip2");
}
else if (network.Equals("quic"))
{
tipRequestHost.Text = UIRes.I18N("TransportRequestHostTip4");
tipPath.Text = UIRes.I18N("TransportPathTip3");
tipHeaderType.Text = UIRes.I18N("TransportHeaderTypeTip3");
}
else if (network.Equals("grpc"))
{
tipPath.Text = UIRes.I18N("TransportPathTip4");
tipHeaderType.Text = UIRes.I18N("TransportHeaderTypeTip4");
labHeaderType.Visible = false;
}
}
private void cmbStreamSecurity_SelectedIndexChanged(object sender, EventArgs e)
{
string security = cmbStreamSecurity.Text;
if (Utils.IsNullOrEmpty(security))
{
panTlsMore.Hide();
}
else
{
panTlsMore.Show();
}
}
}
}

View File

@@ -0,0 +1,738 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="clbAlpn.ColumnWidth" type="System.Int32, mscorlib">
<value>70</value>
</data>
<data name="clbAlpn.Items" xml:space="preserve">
<value>h2</value>
</data>
<data name="clbAlpn.Items1" xml:space="preserve">
<value>http/1.1</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="clbAlpn.Location" type="System.Drawing.Point, System.Drawing">
<value>313, 7</value>
</data>
<data name="clbAlpn.Size" type="System.Drawing.Size, System.Drawing">
<value>172, 20</value>
</data>
<data name="clbAlpn.TabIndex" type="System.Int32, mscorlib">
<value>44</value>
</data>
<data name="&gt;&gt;clbAlpn.Name" xml:space="preserve">
<value>clbAlpn</value>
</data>
<data name="&gt;&gt;clbAlpn.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckedListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;clbAlpn.Parent" xml:space="preserve">
<value>panTlsMore</value>
</data>
<data name="&gt;&gt;clbAlpn.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label1.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="label1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>241, 11</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>29, 12</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>43</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>alpn</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;label1.Parent" xml:space="preserve">
<value>panTlsMore</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="txtSNI.Location" type="System.Drawing.Point, System.Drawing">
<value>100, 39</value>
</data>
<data name="txtSNI.Size" type="System.Drawing.Size, System.Drawing">
<value>385, 21</value>
</data>
<data name="txtSNI.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;txtSNI.Name" xml:space="preserve">
<value>txtSNI</value>
</data>
<data name="&gt;&gt;txtSNI.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="&gt;&gt;txtSNI.Parent" xml:space="preserve">
<value>panTlsMore</value>
</data>
<data name="&gt;&gt;txtSNI.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="labSNI.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labSNI.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labSNI.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 43</value>
</data>
<data name="labSNI.Size" type="System.Drawing.Size, System.Drawing">
<value>23, 12</value>
</data>
<data name="labSNI.TabIndex" type="System.Int32, mscorlib">
<value>32</value>
</data>
<data name="labSNI.Text" xml:space="preserve">
<value>SNI</value>
</data>
<data name="&gt;&gt;labSNI.Name" xml:space="preserve">
<value>labSNI</value>
</data>
<data name="&gt;&gt;labSNI.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="&gt;&gt;labSNI.Parent" xml:space="preserve">
<value>panTlsMore</value>
</data>
<data name="&gt;&gt;labSNI.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="labAllowInsecure.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labAllowInsecure.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labAllowInsecure.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 11</value>
</data>
<data name="labAllowInsecure.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value>
</data>
<data name="labAllowInsecure.TabIndex" type="System.Int32, mscorlib">
<value>31</value>
</data>
<data name="labAllowInsecure.Text" xml:space="preserve">
<value>allowInsecure</value>
</data>
<data name="&gt;&gt;labAllowInsecure.Name" xml:space="preserve">
<value>labAllowInsecure</value>
</data>
<data name="&gt;&gt;labAllowInsecure.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="&gt;&gt;labAllowInsecure.Parent" xml:space="preserve">
<value>panTlsMore</value>
</data>
<data name="&gt;&gt;labAllowInsecure.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="cmbAllowInsecure.Items" xml:space="preserve">
<value />
</data>
<data name="cmbAllowInsecure.Items1" xml:space="preserve">
<value>true</value>
</data>
<data name="cmbAllowInsecure.Items2" xml:space="preserve">
<value>false</value>
</data>
<data name="cmbAllowInsecure.Location" type="System.Drawing.Point, System.Drawing">
<value>100, 7</value>
</data>
<data name="cmbAllowInsecure.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 20</value>
</data>
<data name="cmbAllowInsecure.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;cmbAllowInsecure.Name" xml:space="preserve">
<value>cmbAllowInsecure</value>
</data>
<data name="&gt;&gt;cmbAllowInsecure.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cmbAllowInsecure.Parent" xml:space="preserve">
<value>panTlsMore</value>
</data>
<data name="&gt;&gt;cmbAllowInsecure.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="panTlsMore.Location" type="System.Drawing.Point, System.Drawing">
<value>200, 149</value>
</data>
<data name="panTlsMore.Size" type="System.Drawing.Size, System.Drawing">
<value>500, 71</value>
</data>
<data name="panTlsMore.TabIndex" type="System.Int32, mscorlib">
<value>33</value>
</data>
<data name="&gt;&gt;panTlsMore.Name" xml:space="preserve">
<value>panTlsMore</value>
</data>
<data name="&gt;&gt;panTlsMore.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="&gt;&gt;panTlsMore.Parent" xml:space="preserve">
<value>gbTransport</value>
</data>
<data name="&gt;&gt;panTlsMore.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tipNetwork.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="tipNetwork.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="tipNetwork.Location" type="System.Drawing.Point, System.Drawing">
<value>350, 32</value>
</data>
<data name="tipNetwork.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 12</value>
</data>
<data name="tipNetwork.TabIndex" type="System.Int32, mscorlib">
<value>15</value>
</data>
<data name="tipNetwork.Text" xml:space="preserve">
<value>*Default value tcp</value>
</data>
<data name="&gt;&gt;tipNetwork.Name" xml:space="preserve">
<value>tipNetwork</value>
</data>
<data name="&gt;&gt;tipNetwork.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="&gt;&gt;tipNetwork.Parent" xml:space="preserve">
<value>gbTransport</value>
</data>
<data name="&gt;&gt;tipNetwork.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="txtPath.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 124</value>
</data>
<data name="txtPath.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="txtPath.Size" type="System.Drawing.Size, System.Drawing">
<value>396, 20</value>
</data>
<data name="txtPath.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;txtPath.Name" xml:space="preserve">
<value>txtPath</value>
</data>
<data name="&gt;&gt;txtPath.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="&gt;&gt;txtPath.Parent" xml:space="preserve">
<value>gbTransport</value>
</data>
<data name="&gt;&gt;txtPath.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="cmbNetwork.Location" type="System.Drawing.Point, System.Drawing">
<value>192, 28</value>
</data>
<data name="cmbNetwork.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 20</value>
</data>
<data name="cmbNetwork.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;cmbNetwork.Name" xml:space="preserve">
<value>cmbNetwork</value>
</data>
<data name="&gt;&gt;cmbNetwork.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cmbNetwork.Parent" xml:space="preserve">
<value>gbTransport</value>
</data>
<data name="&gt;&gt;cmbNetwork.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="labNetwork.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labNetwork.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labNetwork.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 32</value>
</data>
<data name="labNetwork.Size" type="System.Drawing.Size, System.Drawing">
<value>167, 12</value>
</data>
<data name="labNetwork.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
</data>
<data name="labNetwork.Text" xml:space="preserve">
<value>Transport protocol(network)</value>
</data>
<data name="&gt;&gt;labNetwork.Name" xml:space="preserve">
<value>labNetwork</value>
</data>
<data name="&gt;&gt;labNetwork.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="&gt;&gt;labNetwork.Parent" xml:space="preserve">
<value>gbTransport</value>
</data>
<data name="&gt;&gt;labNetwork.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="labPath.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labPath.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labPath.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 128</value>
</data>
<data name="labPath.Size" type="System.Drawing.Size, System.Drawing">
<value>29, 12</value>
</data>
<data name="labPath.TabIndex" type="System.Int32, mscorlib">
<value>27</value>
</data>
<data name="labPath.Text" xml:space="preserve">
<value>Path</value>
</data>
<data name="&gt;&gt;labPath.Name" xml:space="preserve">
<value>labPath</value>
</data>
<data name="&gt;&gt;labPath.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="&gt;&gt;labPath.Parent" xml:space="preserve">
<value>gbTransport</value>
</data>
<data name="&gt;&gt;labPath.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="tipPath.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="tipPath.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="tipPath.Location" type="System.Drawing.Point, System.Drawing">
<value>529, 128</value>
</data>
<data name="tipPath.Size" type="System.Drawing.Size, System.Drawing">
<value>11, 12</value>
</data>
<data name="tipPath.TabIndex" type="System.Int32, mscorlib">
<value>24</value>
</data>
<data name="tipPath.Text" xml:space="preserve">
<value>*</value>
</data>
<data name="&gt;&gt;tipPath.Name" xml:space="preserve">
<value>tipPath</value>
</data>
<data name="&gt;&gt;tipPath.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="&gt;&gt;tipPath.Parent" xml:space="preserve">
<value>gbTransport</value>
</data>
<data name="&gt;&gt;tipPath.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="tipRequestHost.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="tipRequestHost.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="tipRequestHost.Location" type="System.Drawing.Point, System.Drawing">
<value>464, 96</value>
</data>
<data name="tipRequestHost.Size" type="System.Drawing.Size, System.Drawing">
<value>11, 12</value>
</data>
<data name="tipRequestHost.TabIndex" type="System.Int32, mscorlib">
<value>23</value>
</data>
<data name="tipRequestHost.Text" xml:space="preserve">
<value>*</value>
</data>
<data name="&gt;&gt;tipRequestHost.Name" xml:space="preserve">
<value>tipRequestHost</value>
</data>
<data name="&gt;&gt;tipRequestHost.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="&gt;&gt;tipRequestHost.Parent" xml:space="preserve">
<value>gbTransport</value>
</data>
<data name="&gt;&gt;tipRequestHost.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="labStreamSecurity.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labStreamSecurity.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labStreamSecurity.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 160</value>
</data>
<data name="labStreamSecurity.Size" type="System.Drawing.Size, System.Drawing">
<value>23, 12</value>
</data>
<data name="labStreamSecurity.TabIndex" type="System.Int32, mscorlib">
<value>22</value>
</data>
<data name="labStreamSecurity.Text" xml:space="preserve">
<value>TLS</value>
</data>
<data name="&gt;&gt;labStreamSecurity.Name" xml:space="preserve">
<value>labStreamSecurity</value>
</data>
<data name="&gt;&gt;labStreamSecurity.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="&gt;&gt;labStreamSecurity.Parent" xml:space="preserve">
<value>gbTransport</value>
</data>
<data name="&gt;&gt;labStreamSecurity.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="cmbStreamSecurity.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 156</value>
</data>
<data name="cmbStreamSecurity.Size" type="System.Drawing.Size, System.Drawing">
<value>60, 20</value>
</data>
<data name="cmbStreamSecurity.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;cmbStreamSecurity.Name" xml:space="preserve">
<value>cmbStreamSecurity</value>
</data>
<data name="&gt;&gt;cmbStreamSecurity.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cmbStreamSecurity.Parent" xml:space="preserve">
<value>gbTransport</value>
</data>
<data name="&gt;&gt;cmbStreamSecurity.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="tipHeaderType.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="tipHeaderType.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="tipHeaderType.Location" type="System.Drawing.Point, System.Drawing">
<value>282, 64</value>
</data>
<data name="tipHeaderType.Size" type="System.Drawing.Size, System.Drawing">
<value>11, 12</value>
</data>
<data name="tipHeaderType.TabIndex" type="System.Int32, mscorlib">
<value>20</value>
</data>
<data name="tipHeaderType.Text" xml:space="preserve">
<value>*</value>
</data>
<data name="&gt;&gt;tipHeaderType.Name" xml:space="preserve">
<value>tipHeaderType</value>
</data>
<data name="&gt;&gt;tipHeaderType.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="&gt;&gt;tipHeaderType.Parent" xml:space="preserve">
<value>gbTransport</value>
</data>
<data name="&gt;&gt;tipHeaderType.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="txtRequestHost.Location" type="System.Drawing.Point, System.Drawing">
<value>158, 92</value>
</data>
<data name="txtRequestHost.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="txtRequestHost.Size" type="System.Drawing.Size, System.Drawing">
<value>300, 20</value>
</data>
<data name="txtRequestHost.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;txtRequestHost.Name" xml:space="preserve">
<value>txtRequestHost</value>
</data>
<data name="&gt;&gt;txtRequestHost.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="&gt;&gt;txtRequestHost.Parent" xml:space="preserve">
<value>gbTransport</value>
</data>
<data name="&gt;&gt;txtRequestHost.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="labHeaderType.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labHeaderType.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labHeaderType.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 64</value>
</data>
<data name="labHeaderType.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value>
</data>
<data name="labHeaderType.TabIndex" type="System.Int32, mscorlib">
<value>19</value>
</data>
<data name="labHeaderType.Text" xml:space="preserve">
<value>Camouflage type</value>
</data>
<data name="&gt;&gt;labHeaderType.Name" xml:space="preserve">
<value>labHeaderType</value>
</data>
<data name="&gt;&gt;labHeaderType.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="&gt;&gt;labHeaderType.Parent" xml:space="preserve">
<value>gbTransport</value>
</data>
<data name="&gt;&gt;labHeaderType.ZOrder" xml:space="preserve">
<value>12</value>
</data>
<data name="labRequestHost.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labRequestHost.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labRequestHost.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 96</value>
</data>
<data name="labRequestHost.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 12</value>
</data>
<data name="labRequestHost.TabIndex" type="System.Int32, mscorlib">
<value>17</value>
</data>
<data name="labRequestHost.Text" xml:space="preserve">
<value>Camouflage domain(host)</value>
</data>
<data name="&gt;&gt;labRequestHost.Name" xml:space="preserve">
<value>labRequestHost</value>
</data>
<data name="&gt;&gt;labRequestHost.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="&gt;&gt;labRequestHost.Parent" xml:space="preserve">
<value>gbTransport</value>
</data>
<data name="&gt;&gt;labRequestHost.ZOrder" xml:space="preserve">
<value>13</value>
</data>
<data name="cmbHeaderType.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 60</value>
</data>
<data name="cmbHeaderType.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 20</value>
</data>
<data name="cmbHeaderType.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;cmbHeaderType.Name" xml:space="preserve">
<value>cmbHeaderType</value>
</data>
<data name="&gt;&gt;cmbHeaderType.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cmbHeaderType.Parent" xml:space="preserve">
<value>gbTransport</value>
</data>
<data name="&gt;&gt;cmbHeaderType.ZOrder" xml:space="preserve">
<value>14</value>
</data>
<data name="gbTransport.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="gbTransport.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="gbTransport.Size" type="System.Drawing.Size, System.Drawing">
<value>723, 223</value>
</data>
<data name="gbTransport.TabIndex" type="System.Int32, mscorlib">
<value>22</value>
</data>
<data name="gbTransport.Text" xml:space="preserve">
<value>Transport</value>
</data>
<data name="&gt;&gt;gbTransport.Name" xml:space="preserve">
<value>gbTransport</value>
</data>
<data name="&gt;&gt;gbTransport.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="&gt;&gt;gbTransport.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;gbTransport.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 12</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>723, 223</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>ServerTransportControl</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View File

@@ -117,4 +117,77 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="tipNetwork.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 12</value>
</data>
<data name="tipNetwork.Text" xml:space="preserve">
<value>*默认tcp,选错会无法连接</value>
</data>
<data name="cmbNetwork.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 28</value>
</data>
<data name="cmbNetwork.Size" type="System.Drawing.Size, System.Drawing">
<value>208, 20</value>
</data>
<data name="labNetwork.Size" type="System.Drawing.Size, System.Drawing">
<value>107, 12</value>
</data>
<data name="labNetwork.Text" xml:space="preserve">
<value>传输协议(network)</value>
</data>
<data name="labPath.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="labPath.Text" xml:space="preserve">
<value>路径(path)</value>
</data>
<data name="labStreamSecurity.Size" type="System.Drawing.Size, System.Drawing">
<value>107, 12</value>
</data>
<data name="labStreamSecurity.Text" xml:space="preserve">
<value>传输层安全(tls)</value>
</data>
<data name="txtRequestHost.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 92</value>
</data>
<data name="txtRequestHost.Size" type="System.Drawing.Size, System.Drawing">
<value>331, 20</value>
</data>
<data name="labHeaderType.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value>
</data>
<data name="labHeaderType.Text" xml:space="preserve">
<value>伪装类型(type)</value>
</data>
<data name="labRequestHost.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value>
</data>
<data name="labRequestHost.Text" xml:space="preserve">
<value>伪装域名(host)</value>
</data>
<data name="gbTransport.Text" xml:space="preserve">
<value>底层传输方式(transport)</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>282, 11</value>
</data>
<data name="clbAlpn.Location" type="System.Drawing.Point, System.Drawing">
<value>331, 7</value>
</data>
<data name="clbAlpn.Size" type="System.Drawing.Size, System.Drawing">
<value>160, 20</value>
</data>
<data name="txtSNI.Size" type="System.Drawing.Size, System.Drawing">
<value>391, 21</value>
</data>
<data name="labAllowInsecure.Size" type="System.Drawing.Size, System.Drawing">
<value>167, 12</value>
</data>
<data name="labAllowInsecure.Text" xml:space="preserve">
<value>跳过证书验证(allowInsecure)</value>
</data>
<data name="cmbAllowInsecure.Location" type="System.Drawing.Point, System.Drawing">
<value>183, 7</value>
</data>
</root>

View File

@@ -30,6 +30,10 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SubSettingControl));
this.grbMain = new System.Windows.Forms.GroupBox();
this.label4 = new System.Windows.Forms.Label();
this.cmbGroup = new System.Windows.Forms.ComboBox();
this.txtUserAgent = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.btnShare = new System.Windows.Forms.Button();
this.chkEnabled = new System.Windows.Forms.CheckBox();
this.btnRemove = new System.Windows.Forms.Button();
@@ -44,6 +48,11 @@
//
// grbMain
//
resources.ApplyResources(this.grbMain, "grbMain");
this.grbMain.Controls.Add(this.label4);
this.grbMain.Controls.Add(this.cmbGroup);
this.grbMain.Controls.Add(this.txtUserAgent);
this.grbMain.Controls.Add(this.label1);
this.grbMain.Controls.Add(this.btnShare);
this.grbMain.Controls.Add(this.chkEnabled);
this.grbMain.Controls.Add(this.btnRemove);
@@ -51,10 +60,33 @@
this.grbMain.Controls.Add(this.txtRemarks);
this.grbMain.Controls.Add(this.label2);
this.grbMain.Controls.Add(this.label3);
resources.ApplyResources(this.grbMain, "grbMain");
this.grbMain.Name = "grbMain";
this.grbMain.TabStop = false;
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// cmbGroup
//
resources.ApplyResources(this.cmbGroup, "cmbGroup");
this.cmbGroup.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbGroup.FormattingEnabled = true;
this.cmbGroup.Name = "cmbGroup";
this.cmbGroup.Leave += new System.EventHandler(this.txtRemarks_Leave);
//
// txtUserAgent
//
resources.ApplyResources(this.txtUserAgent, "txtUserAgent");
this.txtUserAgent.Name = "txtUserAgent";
this.txtUserAgent.Leave += new System.EventHandler(this.txtRemarks_Leave);
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// btnShare
//
resources.ApplyResources(this.btnShare, "btnShare");
@@ -130,5 +162,9 @@
private System.Windows.Forms.CheckBox chkEnabled;
private System.Windows.Forms.Button btnShare;
private System.Windows.Forms.PictureBox picQRCode;
private System.Windows.Forms.TextBox txtUserAgent;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ComboBox cmbGroup;
}
}

View File

@@ -3,6 +3,8 @@ using System.Windows.Forms;
using v2rayN.Base;
using v2rayN.Handler;
using v2rayN.Mode;
using System.Linq;
using System.Collections.Generic;
namespace v2rayN.Forms
{
@@ -10,7 +12,7 @@ namespace v2rayN.Forms
public partial class SubSettingControl : UserControl
{
public event ChangeEventHandler OnButtonClicked;
private List<GroupItem> groupItem;
public SubItem subItem
{
@@ -25,6 +27,12 @@ namespace v2rayN.Forms
private void SubSettingControl_Load(object sender, EventArgs e)
{
this.Height = grbMain.Height;
groupItem = LazyConfig.Instance.GetConfig().groupItem;
cmbGroup.Items.AddRange(groupItem.Select(t => t.remarks).ToArray());
cmbGroup.Items.Add(string.Empty);
BindingSub();
}
@@ -35,6 +43,13 @@ namespace v2rayN.Forms
txtRemarks.Text = subItem.remarks.ToString();
txtUrl.Text = subItem.url.ToString();
chkEnabled.Checked = subItem.enabled;
txtUserAgent.Text = subItem.userAgent;
var index = groupItem.FindIndex(t => t.id == subItem.groupId);
if (index >= 0)
{
cmbGroup.SelectedIndex = index;
}
}
}
private void EndBindingSub()
@@ -44,6 +59,17 @@ namespace v2rayN.Forms
subItem.remarks = txtRemarks.Text.TrimEx();
subItem.url = txtUrl.Text.TrimEx();
subItem.enabled = chkEnabled.Checked;
subItem.userAgent = txtUserAgent.Text.TrimEx();
var index = groupItem.FindIndex(t => t.remarks == cmbGroup.Text);
if (index >= 0)
{
subItem.groupId = groupItem[index].id;
}
else
{
subItem.groupId = string.Empty;
}
}
}
private void txtRemarks_Leave(object sender, EventArgs e)

View File

@@ -117,50 +117,185 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="label1.Text" xml:space="preserve">
<value>User Agent(optional)</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="btnShare.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<data name="label2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="btnShare.Location" type="System.Drawing.Point, System.Drawing">
<value>434, 21</value>
</data>
<data name="btnShare.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="btnShare.TabIndex" type="System.Int32, mscorlib">
<value>26</value>
</data>
<data name="btnShare.Text" xml:space="preserve">
<value>Share</value>
</data>
<data name="&gt;&gt;btnShare.Name" xml:space="preserve">
<value>btnShare</value>
</data>
<data name="&gt;&gt;btnShare.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="&gt;&gt;btnShare.Parent" xml:space="preserve">
<data name="&gt;&gt;txtUrl.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="&gt;&gt;btnShare.ZOrder" xml:space="preserve">
<value>0</value>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="picQRCode.Size" type="System.Drawing.Size, System.Drawing">
<value>619, 162</value>
</data>
<data name="chkEnabled.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="chkEnabled.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="chkEnabled.Location" type="System.Drawing.Point, System.Drawing">
<value>368, 23</value>
<data name="cmbGroup.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 147</value>
</data>
<data name="chkEnabled.Size" type="System.Drawing.Size, System.Drawing">
<value>60, 16</value>
</data>
<data name="chkEnabled.TabIndex" type="System.Int32, mscorlib">
<value>25</value>
<data name="&gt;&gt;cmbGroup.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtUrl.Name" xml:space="preserve">
<value>txtUrl</value>
</data>
<data name="&gt;&gt;cmbGroup.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="&gt;&gt;picQRCode.Name" xml:space="preserve">
<value>picQRCode</value>
</data>
<data name="&gt;&gt;btnShare.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="btnRemove.Text" xml:space="preserve">
<value>Remove</value>
</data>
<data name="btnRemove.Location" type="System.Drawing.Point, System.Drawing">
<value>525, 21</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="btnRemove.TabIndex" type="System.Int32, mscorlib">
<value>24</value>
</data>
<data name="&gt;&gt;txtUserAgent.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="txtUserAgent.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 111</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>SubSettingControl</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="grbMain.Text" xml:space="preserve">
<value>Subscription details</value>
</data>
<data name="btnShare.TabIndex" type="System.Int32, mscorlib">
<value>26</value>
</data>
<data name="&gt;&gt;grbMain.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="&gt;&gt;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="txtUrl.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="&gt;&gt;txtRemarks.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="label4.TabIndex" type="System.Int32, mscorlib">
<value>36</value>
</data>
<data name="btnShare.Location" type="System.Drawing.Point, System.Drawing">
<value>434, 21</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value>
</data>
<data name="&gt;&gt;cmbGroup.Name" xml:space="preserve">
<value>cmbGroup</value>
</data>
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
<value>232, 21</value>
</data>
<data name="grbMain.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 12</value>
</data>
<data name="&gt;&gt;label3.Name" xml:space="preserve">
<value>label3</value>
</data>
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 21</value>
</data>
<data name="btnShare.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnShare.Text" xml:space="preserve">
<value>Share</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="&gt;&gt;chkEnabled.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 53</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="picQRCode.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>27</value>
</data>
<data name="&gt;&gt;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="txtUserAgent.Size" type="System.Drawing.Size, System.Drawing">
<value>473, 21</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>125, 12</value>
</data>
<data name="&gt;&gt;label4.Name" xml:space="preserve">
<value>label4</value>
</data>
<data name="txtUrl.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 53</value>
</data>
<data name="txtUserAgent.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;txtUrl.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="&gt;&gt;chkEnabled.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="cmbGroup.Size" type="System.Drawing.Size, System.Drawing">
<value>232, 20</value>
</data>
<data name="&gt;&gt;txtUserAgent.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="label4.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>47, 12</value>
</data>
<data name="txtUrl.ScrollBars" type="System.Windows.Forms.ScrollBars, System.Windows.Forms">
<value>Vertical</value>
</data>
<data name="&gt;&gt;btnRemove.Name" xml:space="preserve">
<value>btnRemove</value>
</data>
<data name="&gt;&gt;txtUrl.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="chkEnabled.Text" xml:space="preserve">
<value>Enable</value>
@@ -168,220 +303,187 @@
<data name="&gt;&gt;chkEnabled.Name" xml:space="preserve">
<value>chkEnabled</value>
</data>
<data name="&gt;&gt;chkEnabled.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;chkEnabled.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="&gt;&gt;chkEnabled.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="btnRemove.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnRemove.Location" type="System.Drawing.Point, System.Drawing">
<value>525, 21</value>
</data>
<data name="btnRemove.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="btnRemove.TabIndex" type="System.Int32, mscorlib">
<value>24</value>
</data>
<data name="btnRemove.Text" xml:space="preserve">
<value>Remove</value>
</data>
<data name="&gt;&gt;btnRemove.Name" xml:space="preserve">
<value>btnRemove</value>
</data>
<data name="&gt;&gt;btnRemove.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="&gt;&gt;btnRemove.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="&gt;&gt;btnRemove.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="txtUrl.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 55</value>
</data>
<data name="txtUrl.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="txtUrl.ScrollBars" type="System.Windows.Forms.ScrollBars, System.Windows.Forms">
<value>Vertical</value>
</data>
<data name="txtUrl.Size" type="System.Drawing.Size, System.Drawing">
<value>473, 46</value>
</data>
<data name="txtUrl.TabIndex" type="System.Int32, mscorlib">
<value>23</value>
</data>
<data name="&gt;&gt;txtUrl.Name" xml:space="preserve">
<value>txtUrl</value>
</data>
<data name="&gt;&gt;txtUrl.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtUrl.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="&gt;&gt;txtUrl.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 21</value>
</data>
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
<value>232, 21</value>
</data>
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="&gt;&gt;txtRemarks.Name" xml:space="preserve">
<value>txtRemarks</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;txtRemarks.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="&gt;&gt;txtRemarks.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 25</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>47, 12</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Remarks</value>
</data>
<data name="&gt;&gt;label2.Name" xml:space="preserve">
<value>label2</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;label2.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>5</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, 55</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value>
</data>
<data name="label3.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Address (url)</value>
</data>
<data name="&gt;&gt;label3.Name" xml:space="preserve">
<value>label3</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;label3.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="grbMain.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="grbMain.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="grbMain.Size" type="System.Drawing.Size, System.Drawing">
<value>619, 110</value>
</data>
<data name="grbMain.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="grbMain.Text" xml:space="preserve">
<value>Subscription details</value>
</data>
<data name="&gt;&gt;grbMain.Name" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="&gt;&gt;grbMain.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="&gt;&gt;grbMain.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;grbMain.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="picQRCode.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="picQRCode.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="picQRCode.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 110</value>
</data>
<data name="picQRCode.Size" type="System.Drawing.Size, System.Drawing">
<value>619, 200</value>
</data>
<data name="picQRCode.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="&gt;&gt;txtRemarks.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="picQRCode.TabIndex" type="System.Int32, mscorlib">
<value>25</value>
</data>
<data name="&gt;&gt;picQRCode.Name" xml:space="preserve">
<value>picQRCode</value>
<data name="label4.Text" xml:space="preserve">
<value>Belong to Group</value>
</data>
<data name="&gt;&gt;picQRCode.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="cmbGroup.TabIndex" type="System.Int32, mscorlib">
<value>35</value>
</data>
<data name="&gt;&gt;picQRCode.Parent" xml:space="preserve">
<value>$this</value>
<data name="&gt;&gt;txtRemarks.Name" xml:space="preserve">
<value>txtRemarks</value>
</data>
<data name="label1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnShare.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="&gt;&gt;btnRemove.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="&gt;&gt;btnShare.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="chkEnabled.TabIndex" type="System.Int32, mscorlib">
<value>25</value>
</data>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;txtUserAgent.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="&gt;&gt;cmbGroup.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="txtUrl.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="grbMain.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="&gt;&gt;label2.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="&gt;&gt;btnRemove.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="chkEnabled.Location" type="System.Drawing.Point, System.Drawing">
<value>368, 23</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="chkEnabled.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="grbMain.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="&gt;&gt;picQRCode.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<data name="label3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="&gt;&gt;label2.Name" xml:space="preserve">
<value>label2</value>
</data>
<data name="&gt;&gt;grbMain.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 12</value>
</data>
<data name="grbMain.Size" type="System.Drawing.Size, System.Drawing">
<value>619, 188</value>
</data>
<data name="&gt;&gt;btnShare.Name" xml:space="preserve">
<value>btnShare</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>619, 310</value>
<value>619, 350</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>SubSettingControl</value>
<data name="&gt;&gt;btnShare.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="chkEnabled.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 115</value>
</data>
<data name="picQRCode.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 188</value>
</data>
<data name="&gt;&gt;txtUserAgent.Name" xml:space="preserve">
<value>txtUserAgent</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Remarks</value>
</data>
<data name="&gt;&gt;label4.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="picQRCode.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="txtUrl.Size" type="System.Drawing.Size, System.Drawing">
<value>473, 46</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 25</value>
</data>
<data name="btnRemove.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 151</value>
</data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value>
</data>
<data name="&gt;&gt;label3.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="&gt;&gt;grbMain.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Address (url)</value>
</data>
<data name="&gt;&gt;picQRCode.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;btnRemove.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="label3.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;picQRCode.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;grbMain.Name" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="btnRemove.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;chkEnabled.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;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="label2.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@@ -117,10 +117,22 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 12</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>所属分组</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>101, 12</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>User Agent(可选)</value>
</data>
<data name="btnShare.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="chkEnabled.Size" type="System.Drawing.Size, System.Drawing">
<value>48, 16</value>
</data>

View File

@@ -68,11 +68,6 @@ namespace v2rayN.Forms
private void btnOK_Click(object sender, EventArgs e)
{
if (config.subItem.Count <= 0)
{
AddSub();
}
if (ConfigHandler.SaveSubItem(ref config) == 0)
{
this.DialogResult = DialogResult.OK;

View File

@@ -157,7 +157,7 @@
<value>0, 0</value>
</data>
<data name="panCon.Size" type="System.Drawing.Size, System.Drawing">
<value>614, 351</value>
<value>634, 401</value>
</data>
<data name="panCon.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
@@ -232,10 +232,10 @@
<value>Bottom</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 351</value>
<value>0, 401</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>614, 60</value>
<value>634, 60</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
@@ -259,7 +259,7 @@
<value>6, 12</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>614, 411</value>
<value>634, 461</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Subscription settings</value>

View File

@@ -21,7 +21,6 @@ namespace v2rayN
/// </summary>
public const string SpeedTestUrl = @"http://cachefly.cachefly.net/10mb.test";
public const string SpeedPingTestUrl = @"https://www.google.com/generate_204";
public const string AvailabilityTestUrl = @"https://www.google.com/generate_204";
/// <summary>
/// CustomRoutingListUrl
@@ -176,6 +175,7 @@ namespace v2rayN
/// Language
/// </summary>
public const string MyRegKeyLanguage = "CurrentLanguage";
/// <summary>
/// Icon
/// </summary>
@@ -193,11 +193,17 @@ namespace v2rayN
public const string RoutingRuleComma = "<COMMA>";
public static readonly IEnumerable<string> ssSecuritys = new HashSet<string> { "aes-256-gcm", "aes-128-gcm", "chacha20-poly1305", "chacha20-ietf-poly1305", "none", "plain" };
public static readonly List<string> vmessSecuritys = new List<string> { "aes-128-gcm", "chacha20-poly1305", "auto", "none", "zero" };
public static readonly List<string> ssSecuritys = new List<string> { "aes-256-gcm", "aes-128-gcm", "chacha20-poly1305", "chacha20-ietf-poly1305", "none", "plain" };
public static readonly List<string> ssSecuritysInXray = new List<string> { "aes-256-gcm", "aes-128-gcm", "chacha20-poly1305", "chacha20-ietf-poly1305", "xchacha20-poly1305", "xchacha20-ietf-poly1305", "none", "plain" };
public static readonly List<string> xtlsFlows = new List<string> { "", "xtls-rprx-origin", "xtls-rprx-origin-udp443", "xtls-rprx-direct", "xtls-rprx-direct-udp443" };
public static readonly List<string> networks = new List<string> { "tcp", "kcp", "ws", "h2", "quic", "grpc" };
public static readonly List<string> kcpHeaderTypes = new List<string> { "srtp", "utp", "wechat-video", "dtls", "wireguard" };
public static readonly List<string> coreTypes = new List<string> { "v2fly_core", "Xray_core" };
public const string GrpcgunMode = "gun";
public const string GrpcmultiMode = "multi";
#endregion
#region

File diff suppressed because it is too large Load Diff

View File

@@ -13,7 +13,7 @@ namespace v2rayN.Handler
public event EventHandler<ResultEventArgs> UpdateCompleted;
public event ErrorEventHandler Error;
public class ResultEventArgs : EventArgs
{
@@ -31,13 +31,13 @@ namespace v2rayN.Handler
private long totalBytesToReceive = 0;
private DateTime totalDatetime = new DateTime();
private int DownloadTimeout = -1;
public WebClientEx DownloadFileAsync(string url, WebProxy webProxy, int downloadTimeout)
{
WebClientEx ws = new WebClientEx();
try
{
Utils.SetSecurityProtocol();
Utils.SetSecurityProtocol(LazyConfig.Instance.GetConfig().enableSecurityProtocolTls13);
UpdateCompleted?.Invoke(this, new ResultEventArgs(false, UIRes.I18N("Downloading")));
progressPercentage = -1;
@@ -62,7 +62,7 @@ namespace v2rayN.Handler
}
return ws;
}
void ws_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
{
if (UpdateCompleted != null)
@@ -131,16 +131,34 @@ namespace v2rayN.Handler
/// DownloadString
/// </summary>
/// <param name="url"></param>
public void WebDownloadString(string url)
public void WebDownloadString(string url, WebProxy webProxy, string userAgent)
{
string source = string.Empty;
try
{
Utils.SetSecurityProtocol();
Utils.SetSecurityProtocol(LazyConfig.Instance.GetConfig().enableSecurityProtocolTls13);
WebClientEx ws = new WebClientEx();
if (webProxy != null)
{
ws.Proxy = webProxy;
}
if (Utils.IsNullOrEmpty(userAgent))
{
userAgent = $"{Utils.GetVersion(false)}";
}
ws.Headers.Add("user-agent", userAgent);
Uri uri = new Uri(url);
//Authorization Header
if (!Utils.IsNullOrEmpty(uri.UserInfo))
{
ws.Headers.Add(HttpRequestHeader.Authorization, "Basic " + Utils.Base64Encode(uri.UserInfo));
}
ws.DownloadStringCompleted += Ws_DownloadStringCompleted;
ws.DownloadStringAsync(new Uri(url));
ws.DownloadStringAsync(uri);
}
catch (Exception ex)
{
@@ -176,7 +194,7 @@ namespace v2rayN.Handler
string source = string.Empty;
try
{
Utils.SetSecurityProtocol();
Utils.SetSecurityProtocol(LazyConfig.Instance.GetConfig().enableSecurityProtocolTls13);
WebClientEx ws = new WebClientEx();
@@ -194,7 +212,7 @@ namespace v2rayN.Handler
WebClientEx ws = new WebClientEx();
try
{
Utils.SetSecurityProtocol();
Utils.SetSecurityProtocol(LazyConfig.Instance.GetConfig().enableSecurityProtocolTls13);
UpdateCompleted?.Invoke(this, new ResultEventArgs(false, UIRes.I18N("Downloading")));
progressPercentage = -1;

View File

@@ -0,0 +1,24 @@
using System;
using v2rayN.Mode;
namespace v2rayN.Handler
{
public sealed class LazyConfig
{
private static readonly Lazy<LazyConfig> _instance = new Lazy<LazyConfig>(() => new LazyConfig());
private Config _config;
public static LazyConfig Instance
{
get { return _instance.Value; }
}
public void SetConfig(ref Config config)
{
_config = config;
}
public Config GetConfig()
{
return _config;
}
}
}

View File

@@ -1,17 +1,19 @@
using System;
using NHotkey;
using NHotkey.WindowsForms;
using System;
using System.Drawing;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using v2rayN.Base;
using v2rayN.Mode;
namespace v2rayN.Handler
{
class MainFormHandler
public sealed class MainFormHandler
{
private static MainFormHandler instance;
Action<bool, string> _updateUI;
private static readonly Lazy<MainFormHandler> instance = new Lazy<MainFormHandler>(() => new MainFormHandler());
//Action<bool, string> _updateUI;
//private DownloadHandle downloadHandle2;
//private Config _config;
@@ -21,16 +23,8 @@ namespace v2rayN.Handler
//Action<int, string> _updateFunc;
public static MainFormHandler Instance
{
get
{
if (instance == null)
{
instance = new MainFormHandler();
}
return instance;
}
get { return instance.Value; }
}
public Icon GetNotifyIcon(Config config, Icon def)
{
try
@@ -50,9 +44,23 @@ namespace v2rayN.Handler
Graphics graphics = Graphics.FromImage(bitmap);
SolidBrush drawBrush = new SolidBrush(color);
graphics.FillEllipse(drawBrush, new Rectangle(0, 0, width, height));
int zoom = 16;
graphics.DrawImage(new Bitmap(Properties.Resources.notify, width - zoom, width - zoom), zoom / 2, zoom / 2);
var customIcon = false;
if (config.enableRoutingAdvanced)
{
var item = config.routings[config.routingIndex];
if (!Utils.IsNullOrEmpty(item.customIcon) && File.Exists(item.customIcon))
{
graphics.FillRectangle(drawBrush, new Rectangle(0, 0, width, height));
graphics.DrawImage(new Bitmap(item.customIcon), 0, 0);
customIcon = true;
}
}
if (!customIcon)
{
graphics.FillEllipse(drawBrush, new Rectangle(0, 0, width, height));
int zoom = 16;
graphics.DrawImage(new Bitmap(Properties.Resources.notify, width - zoom, width - zoom), zoom / 2, zoom / 2);
}
Icon createdIcon = Icon.FromHandle(bitmap.GetHicon());
@@ -69,15 +77,14 @@ namespace v2rayN.Handler
}
}
public void Export2ClientConfig(int index, Config config)
public void Export2ClientConfig(VmessItem item, Config config)
{
//int index = GetLvSelectedIndex();
if (index < 0)
if (item == null)
{
return;
}
if (config.vmess[index].configType != (int)EConfigType.Vmess
&& config.vmess[index].configType != (int)EConfigType.VLESS)
if (item.configType != (int)EConfigType.Vmess
&& item.configType != (int)EConfigType.VLESS)
{
UI.Show(UIRes.I18N("NonVmessService"));
return;
@@ -98,9 +105,9 @@ namespace v2rayN.Handler
{
return;
}
Config configCopy = Utils.DeepCopy(config);
configCopy.index = index;
if (V2rayConfigHandler.Export2ClientConfig(configCopy, fileName, out string msg) != 0)
//Config configCopy = Utils.DeepCopy(config);
//configCopy.index = index;
if (V2rayConfigHandler.Export2ClientConfig(item, fileName, out string msg) != 0)
{
UI.Show(msg);
}
@@ -110,15 +117,14 @@ namespace v2rayN.Handler
}
}
public void Export2ServerConfig(int index, Config config)
public void Export2ServerConfig(VmessItem item, Config config)
{
//int index = GetLvSelectedIndex();
if (index < 0)
if (item == null)
{
return;
}
if (config.vmess[index].configType != (int)EConfigType.Vmess
&& config.vmess[index].configType != (int)EConfigType.VLESS)
if (item.configType != (int)EConfigType.Vmess
&& item.configType != (int)EConfigType.VLESS)
{
UI.Show(UIRes.I18N("NonVmessService"));
return;
@@ -139,9 +145,9 @@ namespace v2rayN.Handler
{
return;
}
Config configCopy = Utils.DeepCopy(config);
configCopy.index = index;
if (V2rayConfigHandler.Export2ServerConfig(configCopy, fileName, out string msg) != 0)
//Config configCopy = Utils.DeepCopy(config);
//configCopy.index = index;
if (V2rayConfigHandler.Export2ServerConfig(item, fileName, out string msg) != 0)
{
UI.Show(msg);
}
@@ -151,12 +157,12 @@ namespace v2rayN.Handler
}
}
public int AddBatchServers(Config config, string clipboardData, string subid = "")
public int AddBatchServers(Config config, string clipboardData, string subid, string groupId)
{
int counter;
int _Add()
{
return ConfigHandler.AddBatchServers(ref config, clipboardData, subid);
return ConfigHandler.AddBatchServers(ref config, clipboardData, subid, groupId);
}
counter = _Add();
if (counter < 1)
@@ -170,15 +176,16 @@ namespace v2rayN.Handler
public void BackupGuiNConfig(Config config, bool auto = false)
{
string fileName = string.Empty;
string fileName = $"guiNConfig_{DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss_fff")}.json";
if (auto)
{
fileName = Utils.GetTempPath($"guiNConfig{DateTime.Now.ToString("yyyyMMddHHmmssfff")}.json");
fileName = Utils.GetTempPath(fileName);
}
else
{
SaveFileDialog fileDialog = new SaveFileDialog
{
FileName = fileName,
Filter = "guiNConfig|*.json",
FilterIndex = 2,
RestoreDirectory = true
@@ -210,25 +217,24 @@ namespace v2rayN.Handler
public void UpdateTask(Config config, Action<bool, string> update)
{
_updateUI = update;
Task.Run(() => UpdateTaskRun(config));
Task.Run(() => UpdateTaskRun(config, update));
}
private void UpdateTaskRun(Config config)
private void UpdateTaskRun(Config config, Action<bool, string> update)
{
var updateHandle = new UpdateHandle();
while (true)
{
Utils.SaveLog("UpdateTaskRun");
Thread.Sleep(60000);
if (config.autoUpdateInterval <= 0)
{
continue;
}
Utils.SaveLog("UpdateTaskRun");
updateHandle.UpdateGeoFile("geosite", config, (bool success, string msg) =>
{
_updateUI(false, msg);
update(false, msg);
if (success)
Utils.SaveLog("geosite" + msg);
});
@@ -237,7 +243,7 @@ namespace v2rayN.Handler
updateHandle.UpdateGeoFile("geoip", config, (bool success, string msg) =>
{
_updateUI(false, msg);
update(false, msg);
if (success)
Utils.SaveLog("geoip" + msg);
});
@@ -245,5 +251,49 @@ namespace v2rayN.Handler
Thread.Sleep(1000 * 3600 * config.autoUpdateInterval);
}
}
public void RegisterGlobalHotkey(Config config, EventHandler<HotkeyEventArgs> handler, Action<bool, string> update)
{
if (config.globalHotkeys == null)
{
return;
}
foreach (var item in config.globalHotkeys)
{
if (item.KeyCode == null)
{
continue;
}
Keys keys = (Keys)item.KeyCode;
if (item.Control)
{
keys |= Keys.Control;
}
if (item.Alt)
{
keys |= Keys.Alt;
}
if (item.Shift)
{
keys |= Keys.Shift;
}
try
{
HotkeyManager.Current.AddOrReplace(((int)item.eGlobalHotkey).ToString(), keys, handler);
var msg = string.Format(UIRes.I18N("RegisterGlobalHotkeySuccessfully"), $"{item.eGlobalHotkey.ToString()} = {keys}");
update(false, msg);
}
catch (Exception ex)
{
var msg = string.Format(UIRes.I18N("RegisterGlobalHotkeyFailed"), $"{item.eGlobalHotkey.ToString()} = {keys}", ex.Message);
update(false, msg);
Utils.SaveLog(msg);
}
}
}
}
}

View File

@@ -2,7 +2,7 @@
using System;
using System.Runtime.InteropServices;
namespace v2rayN.HttpProxyHandler
namespace v2rayN.Handler
{
class ProxySetting
{

File diff suppressed because it is too large Load Diff

View File

@@ -13,21 +13,33 @@ namespace v2rayN.Handler
{
private Config _config;
private V2rayHandler _v2rayHandler;
private List<int> _selecteds;
Action<int, string> _updateFunc;
private List<ServerTestItem> _selecteds;
Action<string, string> _updateFunc;
public SpeedtestHandler(ref Config config)
{
_config = config;
}
public SpeedtestHandler(ref Config config, ref V2rayHandler v2rayHandler, List<int> selecteds, string actionType, Action<int, string> update)
public SpeedtestHandler(ref Config config, ref V2rayHandler v2rayHandler, List<VmessItem> selecteds, string actionType, Action<string, string> update)
{
_config = config;
_v2rayHandler = v2rayHandler;
_selecteds = Utils.DeepCopy(selecteds);
//_selecteds = Utils.DeepCopy(selecteds);
_updateFunc = update;
_selecteds = new List<ServerTestItem>();
foreach (var it in selecteds)
{
_selecteds.Add(new ServerTestItem()
{
indexId = it.indexId,
address = it.address,
port = it.port,
configType = it.configType
});
}
if (actionType == "ping")
{
Task.Run(() => RunPing());
@@ -46,19 +58,19 @@ namespace v2rayN.Handler
}
}
private void RunPingSub(Action<int> updateFun)
private void RunPingSub(Action<ServerTestItem> updateFun)
{
try
{
foreach (int index in _selecteds)
foreach (var it in _selecteds)
{
if (_config.vmess[index].configType == (int)EConfigType.Custom)
if (it.configType == (int)EConfigType.Custom)
{
continue;
}
try
{
updateFun(index);
updateFun(it);
}
catch (Exception ex)
{
@@ -77,19 +89,21 @@ namespace v2rayN.Handler
private void RunPing()
{
RunPingSub((int index) =>
RunPingSub((ServerTestItem it) =>
{
long time = Utils.Ping(_config.vmess[index].address);
_updateFunc(index, FormatOut(time, "ms"));
long time = Utils.Ping(it.address);
_updateFunc(it.indexId, FormatOut(time, "ms"));
});
}
private void RunTcping()
{
RunPingSub((int index) =>
RunPingSub((ServerTestItem it) =>
{
int time = GetTcpingTime(_config.vmess[index].address, _config.vmess[index].port);
_updateFunc(index, FormatOut(time, "ms"));
int time = GetTcpingTime(it.address, it.port);
_updateFunc(it.indexId, FormatOut(time, "ms"));
});
}
@@ -103,16 +117,19 @@ namespace v2rayN.Handler
pid = _v2rayHandler.LoadV2rayConfigString(_config, _selecteds);
if (pid < 0)
{
_updateFunc(_selecteds[0], UIRes.I18N("OperationFailed"));
_updateFunc(_selecteds[0].indexId, UIRes.I18N("OperationFailed"));
return;
}
//Thread.Sleep(5000);
int httpPort = _config.GetLocalPort("speedtest");
List<Task> tasks = new List<Task>();
foreach (int itemIndex in _selecteds)
foreach (var it in _selecteds)
{
if (_config.vmess[itemIndex].configType == (int)EConfigType.Custom)
if (!it.allowTest)
{
continue;
}
if (it.configType == (int)EConfigType.Custom)
{
continue;
}
@@ -120,11 +137,13 @@ namespace v2rayN.Handler
{
try
{
WebProxy webProxy = new WebProxy(Global.Loopback, httpPort + itemIndex);
WebProxy webProxy = new WebProxy(Global.Loopback, it.port);
int responseTime = -1;
string status = GetRealPingTime(_config.speedPingTestUrl, webProxy, out responseTime);
string output = Utils.IsNullOrEmpty(status) ? FormatOut(responseTime, "ms") : FormatOut(status, "");
_updateFunc(itemIndex, output);
string status = GetRealPingTime(_config.constItem.speedPingTestUrl, webProxy, out responseTime);
string output = Utils.IsNullOrEmpty(status) ? FormatOut(responseTime, "ms") : status;
_config.GetVmessItem(it.indexId)?.SetTestResult(output);
_updateFunc(it.indexId, output);
}
catch (Exception ex)
{
@@ -157,7 +176,7 @@ namespace v2rayN.Handler
{
WebProxy webProxy = new WebProxy(Global.Loopback, httpPort);
int responseTime = -1;
string status = GetRealPingTime(Global.AvailabilityTestUrl, webProxy, out responseTime);
string status = GetRealPingTime(Global.SpeedPingTestUrl, webProxy, out responseTime);
bool noError = Utils.IsNullOrEmpty(status);
return noError ? responseTime : -1;
}
@@ -178,48 +197,43 @@ namespace v2rayN.Handler
private void RunSpeedTest()
{
int testCounter = 0;
string testIndexId = string.Empty;
int pid = -1;
if (_config.vmess.Count <= 0)
{
return;
}
pid = _v2rayHandler.LoadV2rayConfigString(_config, _selecteds);
if (pid < 0)
{
_updateFunc(_selecteds[0], UIRes.I18N("OperationFailed"));
_updateFunc(_selecteds[0].indexId, UIRes.I18N("OperationFailed"));
return;
}
string url = _config.speedTestUrl;
string url = _config.constItem.speedTestUrl;
DownloadHandle downloadHandle2 = new DownloadHandle();
downloadHandle2.UpdateCompleted += (sender2, args) =>
{
_updateFunc(testCounter, args.Msg);
_config.GetVmessItem(testIndexId)?.SetTestResult(args.Msg);
_updateFunc(testIndexId, args.Msg);
};
downloadHandle2.Error += (sender2, args) =>
{
_updateFunc(testCounter, args.GetException().Message);
_updateFunc(testIndexId, args.GetException().Message);
};
var timeout = 10;
foreach (int itemIndex in _selecteds)
foreach (var it in _selecteds)
{
if (itemIndex >= _config.vmess.Count)
{
break;
}
if (_config.vmess[itemIndex].configType == (int)EConfigType.Custom)
if (!it.allowTest)
{
continue;
}
testCounter = itemIndex;
int httpPort = _config.GetLocalPort("speedtest");
if (it.configType == (int)EConfigType.Custom)
{
continue;
}
testIndexId = it.indexId;
if (_config.FindIndexId(it.indexId) < 0) continue;
WebProxy webProxy = new WebProxy(Global.Loopback, httpPort + itemIndex);
WebProxy webProxy = new WebProxy(Global.Loopback, it.port);
var ws = downloadHandle2.DownloadDataAsync(url, webProxy, timeout - 2);
Thread.Sleep(1000 * timeout);

View File

@@ -116,7 +116,7 @@ namespace v2rayN.Handler
if (res != null)
{
string itemId = config_.getItemId();
string itemId = config_.indexId;
ServerStatItem serverStatItem = GetServerStatItem(itemId);
//TODO: parse output

View File

@@ -8,7 +8,7 @@ using v2rayN.Mode;
using v2rayN.Properties;
using v2rayN.Tool;
namespace v2rayN.HttpProxyHandler
namespace v2rayN.Handler
{
public static class SysProxyHandle
{
@@ -47,6 +47,56 @@ namespace v2rayN.HttpProxyHandler
}
}
public static bool UpdateSysProxy(Config config, bool forceDisable)
{
var type = config.sysProxyType;
if (forceDisable && type == ESysProxyType.ForcedChange)
{
type = ESysProxyType.ForcedClear;
}
try
{
Global.httpPort = config.GetLocalPort(Global.InboundHttp);
int port = Global.httpPort;
if (port <= 0)
{
return false;
}
if (type == ESysProxyType.ForcedChange)
{
var strExceptions = $"{config.constItem.defIEProxyExceptions};{config.systemProxyExceptions}";
SetIEProxy(true, $"{Global.Loopback}:{port}", strExceptions);
}
else if (type == ESysProxyType.ForcedClear)
{
ResetIEProxy();
}
else if (type == ESysProxyType.Unchanged)
{
}
}
catch (Exception ex)
{
Utils.SaveLog(ex.Message, ex);
}
return true;
}
public static void ResetIEProxy4WindowsShutDown()
{
try
{
//TODO To be verified
Utils.RegWriteValue(@"Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", 0);
}
catch
{
}
}
public static void SetIEProxy(bool enable, bool global, string strProxy)
{
//Read();
@@ -85,15 +135,6 @@ namespace v2rayN.HttpProxyHandler
public static void SetIEProxy(bool global, string strProxy, string strExceptions)
{
if (Utils.IsNullOrEmpty(strExceptions))
{
strExceptions = Global.IEProxyExceptions;
}
else
{
strExceptions = $"{Global.IEProxyExceptions};{strExceptions}";
}
string arguments = global
? $"global {strProxy} {strExceptions}"
: $"pac {strProxy}";

View File

@@ -6,6 +6,7 @@ using System.Net.Http;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using v2rayN.Base;
using v2rayN.Mode;
namespace v2rayN.Handler
@@ -43,7 +44,7 @@ namespace v2rayN.Handler
_updateFunc = update;
var url = string.Empty;
DownloadHandle downloadHandle = null;
DownloadHandle downloadHandle = null;
if (downloadHandle == null)
{
downloadHandle = new DownloadHandle();
@@ -162,7 +163,7 @@ namespace v2rayN.Handler
}
public void UpdateSubscriptionProcess(Config config, Action<bool, string> update)
public void UpdateSubscriptionProcess(Config config, bool blProxy, Action<bool, string> update)
{
_config = config;
_updateFunc = update;
@@ -177,8 +178,10 @@ namespace v2rayN.Handler
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 userAgent = config.subItem[k - 1].userAgent.TrimEx();
string groupId = config.subItem[k - 1].groupId.TrimEx();
string hashCode = $"{k}->";
if (config.subItem[k - 1].enabled == false)
{
@@ -196,17 +199,18 @@ namespace v2rayN.Handler
if (args.Success)
{
_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgGetSubscriptionSuccessfully")}");
string result = Utils.Base64Decode(args.Msg);
//string result = Utils.Base64Decode(args.Msg);
string result = args.Msg;
if (Utils.IsNullOrEmpty(result))
{
_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgSubscriptionDecodingFailed")}");
return;
}
ConfigHandler.RemoveServerViaSubid(ref config, id);
_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgClearSubscription")}");
//ConfigHandler.RemoveServerViaSubid(ref config, id);
//_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgClearSubscription")}");
// RefreshServers();
int ret = MainFormHandler.Instance.AddBatchServers(config, result, id);
int ret = MainFormHandler.Instance.AddBatchServers(config, result, id, groupId);
if (ret > 0)
{
// RefreshServers();
@@ -227,7 +231,9 @@ namespace v2rayN.Handler
_updateFunc(false, args.GetException().Message);
};
downloadHandle3.WebDownloadString(url);
WebProxy webProxy = blProxy ? new WebProxy(Global.Loopback, _config.GetLocalPort(Global.InboundHttp)) : null;
downloadHandle3.WebDownloadString(url, webProxy, userAgent);
_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgStartGettingSubscriptions")}");
}
@@ -290,7 +296,7 @@ namespace v2rayN.Handler
{
try
{
Utils.SetSecurityProtocol();
Utils.SetSecurityProtocol(LazyConfig.Instance.GetConfig().enableSecurityProtocolTls13);
WebRequestHandler webRequestHandler = new WebRequestHandler
{
AllowAutoRedirect = false

View File

@@ -2,6 +2,9 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.NetworkInformation;
using v2rayN.Base;
using v2rayN.Mode;
namespace v2rayN.Handler
@@ -19,29 +22,24 @@ namespace v2rayN.Handler
/// <summary>
/// 生成v2ray的客户端配置文件
/// </summary>
/// <param name="config"></param>
/// <param name="node"></param>
/// <param name="fileName"></param>
/// <param name="msg"></param>
/// <returns></returns>
public static int GenerateClientConfig(Config config, string fileName, bool blExport, out string msg)
public static int GenerateClientConfig(VmessItem node, string fileName, bool blExport, out string msg)
{
try
{
//检查GUI设置
if (config == null
|| config.index < 0
|| config.vmess.Count <= 0
|| config.index > config.vmess.Count - 1
)
if (node == null)
{
msg = UIRes.I18N("CheckServerSettings");
return -1;
}
msg = UIRes.I18N("InitialConfiguration");
if (config.configType() == (int)EConfigType.Custom)
if (node.configType == (int)EConfigType.Custom)
{
return GenerateClientCustomConfig(config, fileName, out msg);
return GenerateClientCustomConfig(node, fileName, out msg);
}
//取得默认配置
@@ -60,6 +58,8 @@ namespace v2rayN.Handler
return -1;
}
var config = LazyConfig.Instance.GetConfig();
//开始修改配置
log(config, ref v2rayConfig, blExport);
@@ -70,7 +70,7 @@ namespace v2rayN.Handler
routing(config, ref v2rayConfig);
//outbound
outbound(config, ref v2rayConfig);
outbound(node, ref v2rayConfig);
//dns
dns(config, ref v2rayConfig);
@@ -80,7 +80,7 @@ namespace v2rayN.Handler
Utils.ToJsonFile(v2rayConfig, fileName, false);
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), config.getSummary());
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), $"[{config.GetGroupRemarks(node.groupId)}] {node.GetSummary()}");
}
catch
{
@@ -325,15 +325,16 @@ namespace v2rayN.Handler
/// <summary>
/// vmess协议服务器配置
/// </summary>
/// <param name="config"></param>
/// <param name="node"></param>
/// <param name="v2rayConfig"></param>
/// <returns></returns>
private static int outbound(Config config, ref V2rayConfig v2rayConfig)
private static int outbound(VmessItem node, ref V2rayConfig v2rayConfig)
{
try
{
var config = LazyConfig.Instance.GetConfig();
Outbounds outbound = v2rayConfig.outbounds[0];
if (config.configType() == (int)EConfigType.Vmess)
if (node.configType == (int)EConfigType.Vmess)
{
VnextItem vnextItem;
if (outbound.settings.vnext.Count <= 0)
@@ -346,8 +347,8 @@ namespace v2rayN.Handler
vnextItem = outbound.settings.vnext[0];
}
//远程服务器地址和端口
vnextItem.address = config.address();
vnextItem.port = config.port();
vnextItem.address = node.address;
vnextItem.port = node.port;
UsersItem usersItem;
if (vnextItem.users.Count <= 0)
@@ -360,10 +361,17 @@ namespace v2rayN.Handler
usersItem = vnextItem.users[0];
}
//远程服务器用户ID
usersItem.id = config.id();
usersItem.alterId = config.alterId();
usersItem.id = node.id;
usersItem.alterId = node.alterId;
usersItem.email = Global.userEMail;
usersItem.security = config.security();
if (Global.vmessSecuritys.Contains(node.security))
{
usersItem.security = node.security;
}
else
{
usersItem.security = Global.DefaultSecurity;
}
//Mux
outbound.mux.enabled = config.muxEnabled;
@@ -371,12 +379,12 @@ namespace v2rayN.Handler
//远程服务器底层传输配置
StreamSettings streamSettings = outbound.streamSettings;
boundStreamSettings(config, "out", ref streamSettings);
boundStreamSettings(node, "out", ref streamSettings);
outbound.protocol = Global.vmessProtocolLite;
outbound.settings.servers = null;
}
else if (config.configType() == (int)EConfigType.Shadowsocks)
else if (node.configType == (int)EConfigType.Shadowsocks)
{
ServersItem serversItem;
if (outbound.settings.servers.Count <= 0)
@@ -389,12 +397,12 @@ namespace v2rayN.Handler
serversItem = outbound.settings.servers[0];
}
//远程服务器地址和端口
serversItem.address = config.address();
serversItem.port = config.port();
serversItem.password = config.id();
if (Global.ssSecuritys.Contains(config.security()))
serversItem.address = node.address;
serversItem.port = node.port;
serversItem.password = node.id;
if (config.GetShadowsocksSecuritys().Contains(node.security))
{
serversItem.method = config.security();
serversItem.method = node.security;
}
else
{
@@ -412,7 +420,7 @@ namespace v2rayN.Handler
outbound.protocol = Global.ssProtocolLite;
outbound.settings.vnext = null;
}
else if (config.configType() == (int)EConfigType.Socks)
else if (node.configType == (int)EConfigType.Socks)
{
ServersItem serversItem;
if (outbound.settings.servers.Count <= 0)
@@ -425,18 +433,18 @@ namespace v2rayN.Handler
serversItem = outbound.settings.servers[0];
}
//远程服务器地址和端口
serversItem.address = config.address();
serversItem.port = config.port();
serversItem.address = node.address;
serversItem.port = node.port;
serversItem.method = null;
serversItem.password = null;
if (!Utils.IsNullOrEmpty(config.security())
&& !Utils.IsNullOrEmpty(config.id()))
if (!Utils.IsNullOrEmpty(node.security)
&& !Utils.IsNullOrEmpty(node.id))
{
SocksUsersItem socksUsersItem = new SocksUsersItem
{
user = config.security(),
pass = config.id(),
user = node.security,
pass = node.id,
level = 1
};
@@ -449,7 +457,7 @@ namespace v2rayN.Handler
outbound.protocol = Global.socksProtocolLite;
outbound.settings.vnext = null;
}
else if (config.configType() == (int)EConfigType.VLESS)
else if (node.configType == (int)EConfigType.VLESS)
{
VnextItem vnextItem;
if (outbound.settings.vnext.Count <= 0)
@@ -462,8 +470,8 @@ namespace v2rayN.Handler
vnextItem = outbound.settings.vnext[0];
}
//远程服务器地址和端口
vnextItem.address = config.address();
vnextItem.port = config.port();
vnextItem.address = node.address;
vnextItem.port = node.port;
UsersItem usersItem;
if (vnextItem.users.Count <= 0)
@@ -476,11 +484,10 @@ namespace v2rayN.Handler
usersItem = vnextItem.users[0];
}
//远程服务器用户ID
usersItem.id = config.id();
usersItem.alterId = 0;
usersItem.id = node.id;
usersItem.flow = string.Empty;
usersItem.email = Global.userEMail;
usersItem.encryption = config.security();
usersItem.encryption = node.security;
//Mux
outbound.mux.enabled = config.muxEnabled;
@@ -488,18 +495,18 @@ namespace v2rayN.Handler
//远程服务器底层传输配置
StreamSettings streamSettings = outbound.streamSettings;
boundStreamSettings(config, "out", ref streamSettings);
boundStreamSettings(node, "out", ref streamSettings);
//if xtls
if (config.streamSecurity() == Global.StreamSecurityX)
if (node.streamSecurity == Global.StreamSecurityX)
{
if (Utils.IsNullOrEmpty(config.flow()))
if (Utils.IsNullOrEmpty(node.flow))
{
usersItem.flow = "xtls-rprx-origin";
usersItem.flow = Global.xtlsFlows[1];
}
else
{
usersItem.flow = config.flow().Replace("splice", "direct");
usersItem.flow = node.flow.Replace("splice", "direct");
}
outbound.mux.enabled = false;
@@ -509,7 +516,7 @@ namespace v2rayN.Handler
outbound.protocol = Global.vlessProtocolLite;
outbound.settings.servers = null;
}
else if (config.configType() == (int)EConfigType.Trojan)
else if (node.configType == (int)EConfigType.Trojan)
{
ServersItem serversItem;
if (outbound.settings.servers.Count <= 0)
@@ -522,20 +529,37 @@ namespace v2rayN.Handler
serversItem = outbound.settings.servers[0];
}
//远程服务器地址和端口
serversItem.address = config.address();
serversItem.port = config.port();
serversItem.password = config.id();
serversItem.address = node.address;
serversItem.port = node.port;
serversItem.password = node.id;
serversItem.flow = string.Empty;
serversItem.ota = false;
serversItem.level = 1;
//if xtls
if (node.streamSecurity == Global.StreamSecurityX)
{
if (Utils.IsNullOrEmpty(node.flow))
{
serversItem.flow = Global.xtlsFlows[1];
}
else
{
serversItem.flow = node.flow.Replace("splice", "direct");
}
outbound.mux.enabled = false;
outbound.mux.concurrency = -1;
}
outbound.mux.enabled = false;
outbound.mux.concurrency = -1;
//远程服务器底层传输配置
StreamSettings streamSettings = outbound.streamSettings;
boundStreamSettings(config, "out", ref streamSettings);
boundStreamSettings(node, "out", ref streamSettings);
outbound.protocol = Global.trojanProtocolLite;
outbound.settings.vnext = null;
@@ -550,27 +574,29 @@ namespace v2rayN.Handler
/// <summary>
/// vmess协议远程服务器底层传输配置
/// </summary>
/// <param name="config"></param>
/// <param name="node"></param>
/// <param name="iobound"></param>
/// <param name="streamSettings"></param>
/// <returns></returns>
private static int boundStreamSettings(Config config, string iobound, ref StreamSettings streamSettings)
private static int boundStreamSettings(VmessItem node, string iobound, ref StreamSettings streamSettings)
{
try
{
var config = LazyConfig.Instance.GetConfig();
//远程服务器底层传输配置
streamSettings.network = config.network();
string host = config.requestHost();
string sni = config.sni();
streamSettings.network = node.GetNetwork();
string host = node.requestHost.TrimEx();
string sni = node.sni;
//if tls
if (config.streamSecurity() == Global.StreamSecurity)
if (node.streamSecurity == Global.StreamSecurity)
{
streamSettings.security = config.streamSecurity();
streamSettings.security = node.streamSecurity;
TlsSettings tlsSettings = new TlsSettings
{
allowInsecure = config.allowInsecure()
allowInsecure = Utils.ToBool(node.allowInsecure),
alpn = node.GetAlpn()
};
if (!string.IsNullOrWhiteSpace(sni))
{
@@ -584,13 +610,14 @@ namespace v2rayN.Handler
}
//if xtls
if (config.streamSecurity() == Global.StreamSecurityX)
if (node.streamSecurity == Global.StreamSecurityX)
{
streamSettings.security = config.streamSecurity();
streamSettings.security = node.streamSecurity;
TlsSettings xtlsSettings = new TlsSettings
{
allowInsecure = config.allowInsecure()
allowInsecure = Utils.ToBool(node.allowInsecure),
alpn = node.GetAlpn()
};
if (!string.IsNullOrWhiteSpace(sni))
{
@@ -604,7 +631,7 @@ namespace v2rayN.Handler
}
//streamSettings
switch (config.network())
switch (node.GetNetwork())
{
//kcp基本配置暂时是默认值用户能自己设置伪装类型
case "kcp":
@@ -634,11 +661,11 @@ namespace v2rayN.Handler
kcpSettings.writeBufferSize = config.kcpItem.writeBufferSize;
kcpSettings.header = new Header
{
type = config.headerType()
type = node.headerType
};
if (!Utils.IsNullOrEmpty(config.path()))
if (!Utils.IsNullOrEmpty(node.path))
{
kcpSettings.seed = config.path();
kcpSettings.seed = node.path;
}
streamSettings.kcpSettings = kcpSettings;
break;
@@ -648,7 +675,7 @@ namespace v2rayN.Handler
{
};
string path = config.path();
string path = node.path;
if (!string.IsNullOrWhiteSpace(host))
{
wsSettings.headers = new Headers
@@ -678,7 +705,7 @@ namespace v2rayN.Handler
{
httpSettings.host = Utils.String2List(host);
}
httpSettings.path = config.path();
httpSettings.path = node.path;
streamSettings.httpSettings = httpSettings;
@@ -691,14 +718,14 @@ namespace v2rayN.Handler
QuicSettings quicsettings = new QuicSettings
{
security = host,
key = config.path(),
key = node.path,
header = new Header
{
type = config.headerType()
type = node.headerType
}
};
streamSettings.quicSettings = quicsettings;
if (config.streamSecurity() == Global.StreamSecurity)
if (node.streamSecurity == Global.StreamSecurity)
{
if (!string.IsNullOrWhiteSpace(sni))
{
@@ -706,26 +733,26 @@ namespace v2rayN.Handler
}
else
{
streamSettings.tlsSettings.serverName = config.address();
streamSettings.tlsSettings.serverName = node.address;
}
}
break;
case "grpc":
var grpcSettings = new GrpcSettings();
grpcSettings.serviceName = config.path();
grpcSettings.multiMode = (config.headerType() == Global.GrpcmultiMode ? true : false);
grpcSettings.serviceName = node.path;
grpcSettings.multiMode = (node.headerType == Global.GrpcmultiMode ? true : false);
streamSettings.grpcSettings = grpcSettings;
break;
default:
//tcp带http伪装
if (config.headerType().Equals(Global.TcpHeaderHttp))
if (node.headerType.Equals(Global.TcpHeaderHttp))
{
TcpSettings tcpSettings = new TcpSettings
{
header = new Header
{
type = config.headerType()
type = node.headerType
}
};
@@ -740,9 +767,9 @@ namespace v2rayN.Handler
//填入自定义Path
string pathHttp = @"/";
if (!Utils.IsNullOrEmpty(config.path()))
if (!Utils.IsNullOrEmpty(node.path))
{
string[] arrPath = config.path().Split(',');
string[] arrPath = node.path.Split(',');
pathHttp = string.Join("\",\"", arrPath);
}
request = request.Replace("$requestPath$", string.Format("\"{0}\"", pathHttp));
@@ -810,7 +837,7 @@ namespace v2rayN.Handler
return 0;
}
public static int statistic(Config config, ref V2rayConfig v2rayConfig)
private static int statistic(Config config, ref V2rayConfig v2rayConfig)
{
if (config.enableStatistics)
{
@@ -862,20 +889,16 @@ namespace v2rayN.Handler
/// <summary>
/// 生成v2ray的客户端配置文件(自定义配置)
/// </summary>
/// <param name="config"></param>
/// <param name="node"></param>
/// <param name="fileName"></param>
/// <param name="msg"></param>
/// <returns></returns>
public static int GenerateClientCustomConfig(Config config, string fileName, out string msg)
private static int GenerateClientCustomConfig(VmessItem node, string fileName, out string msg)
{
try
{
//检查GUI设置
if (config == null
|| config.index < 0
|| config.vmess.Count <= 0
|| config.index > config.vmess.Count - 1
)
if (node == null)
{
msg = UIRes.I18N("CheckServerSettings");
return -1;
@@ -886,7 +909,7 @@ namespace v2rayN.Handler
File.Delete(fileName);
}
string addressFileName = config.address();
string addressFileName = node.address;
if (!File.Exists(addressFileName))
{
addressFileName = Path.Combine(Utils.GetTempPath(), addressFileName);
@@ -898,7 +921,7 @@ namespace v2rayN.Handler
}
File.Copy(addressFileName, fileName);
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), config.getSummary());
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), $"[{LazyConfig.Instance.GetConfig().GetGroupRemarks(node.groupId)}] {node.GetSummary()}");
}
catch
{
@@ -915,20 +938,16 @@ namespace v2rayN.Handler
/// <summary>
/// 生成v2ray的客户端配置文件
/// </summary>
/// <param name="config"></param>
/// <param name="node"></param>
/// <param name="fileName"></param>
/// <param name="msg"></param>
/// <returns></returns>
public static int GenerateServerConfig(Config config, string fileName, out string msg)
public static int GenerateServerConfig(VmessItem node, string fileName, out string msg)
{
try
{
//检查GUI设置
if (config == null
|| config.index < 0
|| config.vmess.Count <= 0
|| config.index > config.vmess.Count - 1
)
if (node == null)
{
msg = UIRes.I18N("CheckServerSettings");
return -1;
@@ -952,18 +971,20 @@ namespace v2rayN.Handler
return -1;
}
var config = LazyConfig.Instance.GetConfig();
////开始修改配置
log(config, ref v2rayConfig, true);
//vmess协议服务器配置
ServerInbound(config, ref v2rayConfig);
ServerInbound(node, ref v2rayConfig);
//传出设置
ServerOutbound(config, ref v2rayConfig);
Utils.ToJsonFile(v2rayConfig, fileName, false);
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), config.getSummary());
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), node.GetSummary());
}
catch
{
@@ -976,10 +997,10 @@ namespace v2rayN.Handler
/// <summary>
/// vmess协议服务器配置
/// </summary>
/// <param name="config"></param>
/// <param name="node"></param>
/// <param name="v2rayConfig"></param>
/// <returns></returns>
private static int ServerInbound(Config config, ref V2rayConfig v2rayConfig)
private static int ServerInbound(VmessItem node, ref V2rayConfig v2rayConfig)
{
try
{
@@ -995,29 +1016,28 @@ namespace v2rayN.Handler
usersItem = inbound.settings.clients[0];
}
//远程服务器端口
inbound.port = config.port();
inbound.port = node.port;
//远程服务器用户ID
usersItem.id = config.id();
usersItem.id = node.id;
usersItem.email = Global.userEMail;
if (config.configType() == (int)EConfigType.Vmess)
if (node.configType == (int)EConfigType.Vmess)
{
inbound.protocol = Global.vmessProtocolLite;
usersItem.alterId = config.alterId();
usersItem.alterId = node.alterId;
}
else if (config.configType() == (int)EConfigType.VLESS)
else if (node.configType == (int)EConfigType.VLESS)
{
inbound.protocol = Global.vlessProtocolLite;
usersItem.alterId = 0;
usersItem.flow = config.flow();
inbound.settings.decryption = config.security();
usersItem.flow = node.flow;
inbound.settings.decryption = node.security;
}
//远程服务器底层传输配置
StreamSettings streamSettings = inbound.streamSettings;
boundStreamSettings(config, "in", ref streamSettings);
boundStreamSettings(node, "in", ref streamSettings);
}
catch
{
@@ -1028,7 +1048,7 @@ namespace v2rayN.Handler
/// <summary>
/// 传出设置
/// </summary>
/// <param name="config"></param>
/// <param name="node"></param>
/// <param name="v2rayConfig"></param>
/// <returns></returns>
private static int ServerOutbound(Config config, ref V2rayConfig v2rayConfig)
@@ -1342,25 +1362,25 @@ namespace v2rayN.Handler
/// <summary>
/// 导出为客户端配置
/// </summary>
/// <param name="config"></param>
/// <param name="node"></param>
/// <param name="fileName"></param>
/// <param name="msg"></param>
/// <returns></returns>
public static int Export2ClientConfig(Config config, string fileName, out string msg)
public static int Export2ClientConfig(VmessItem node, string fileName, out string msg)
{
return GenerateClientConfig(config, fileName, true, out msg);
return GenerateClientConfig(node, fileName, true, out msg);
}
/// <summary>
/// 导出为服务端配置
/// </summary>
/// <param name="config"></param>
/// <param name="node"></param>
/// <param name="fileName"></param>
/// <param name="msg"></param>
/// <returns></returns>
public static int Export2ServerConfig(Config config, string fileName, out string msg)
public static int Export2ServerConfig(VmessItem node, string fileName, out string msg)
{
return GenerateServerConfig(config, fileName, out msg);
return GenerateServerConfig(node, fileName, out msg);
}
#endregion
@@ -1368,15 +1388,11 @@ namespace v2rayN.Handler
#region Gen speedtest config
public static string GenerateClientSpeedtestConfigString(Config config, List<int> selecteds, out string msg)
public static string GenerateClientSpeedtestConfigString(Config config, List<ServerTestItem> selecteds, out string msg)
{
try
{
if (config == null
|| config.index < 0
|| config.vmess.Count <= 0
|| config.index > config.vmess.Count - 1
)
if (config == null)
{
msg = UIRes.I18N("CheckServerSettings");
return "";
@@ -1399,6 +1415,12 @@ namespace v2rayN.Handler
msg = UIRes.I18N("FailedGenDefaultConfiguration");
return "";
}
List<IPEndPoint> lstIpEndPoints = null;
try
{
lstIpEndPoints = new List<IPEndPoint>(IPGlobalProperties.GetIPGlobalProperties().GetActiveTcpListeners());
}
catch { }
log(configCopy, ref v2rayConfig, false);
//routing(config, ref v2rayConfig);
@@ -1407,27 +1429,58 @@ namespace v2rayN.Handler
v2rayConfig.inbounds.Clear(); // Remove "proxy" service for speedtest, avoiding port conflicts.
int httpPort = configCopy.GetLocalPort("speedtest");
foreach (int index in selecteds)
foreach (var it in selecteds)
{
if (configCopy.vmess[index].configType == (int)EConfigType.Custom)
if (it.configType == (int)EConfigType.Custom)
{
continue;
}
if (it.port <= 0)
{
continue;
}
if (it.configType == (int)EConfigType.Vmess || it.configType == (int)EConfigType.VLESS)
{
if (!Utils.IsGuidByParse(configCopy.GetVmessItem(it.indexId).id))
{
continue;
}
}
configCopy.index = index;
//find unuse port
var port = httpPort;
for (int k = httpPort; k < 65536; k++)
{
if (lstIpEndPoints != null && lstIpEndPoints.FindIndex(_it => _it.Port == k) >= 0)
{
continue;
}
//found
port = k;
httpPort = port + 1;
break;
}
//Port In Used
if (lstIpEndPoints != null && lstIpEndPoints.FindIndex(_it => _it.Port == port) >= 0)
{
continue;
}
it.port = port;
it.allowTest = true;
Inbounds inbound = new Inbounds
{
listen = Global.Loopback,
port = httpPort + index,
port = port,
protocol = Global.InboundHttp
};
inbound.tag = Global.InboundHttp + inbound.port.ToString();
v2rayConfig.inbounds.Add(inbound);
V2rayConfig v2rayConfigCopy = Utils.FromJson<V2rayConfig>(result);
outbound(configCopy, ref v2rayConfigCopy);
outbound(configCopy.GetVmessItem(it.indexId), ref v2rayConfigCopy);
v2rayConfigCopy.outbounds[0].tag = Global.agentTag + inbound.port.ToString();
v2rayConfig.outbounds.Add(v2rayConfigCopy.outbounds[0]);
@@ -1440,7 +1493,7 @@ namespace v2rayN.Handler
v2rayConfig.routing.rules.Add(rule);
}
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), configCopy.getSummary());
//msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), node.getSummary());
return Utils.ToJson(v2rayConfig);
}
catch

View File

@@ -56,8 +56,9 @@ namespace v2rayN.Handler
if (Global.reloadV2ray)
{
var item = ConfigHandler.GetDefaultServer(ref config);
string fileName = Utils.GetPath(v2rayConfigRes);
if (V2rayConfigHandler.GenerateClientConfig(config, fileName, false, out string msg) != 0)
if (V2rayConfigHandler.GenerateClientConfig(item, fileName, false, out string msg) != 0)
{
ShowMsg(false, msg);
}
@@ -73,7 +74,7 @@ namespace v2rayN.Handler
/// 新建进程载入V2ray配置文件字符串
/// 返回新进程pid。
/// </summary>
public int LoadV2rayConfigString(Config config, List<int> _selecteds)
public int LoadV2rayConfigString(Config config, List<ServerTestItem> _selecteds)
{
int pid = -1;
string configStr = V2rayConfigHandler.GenerateClientSpeedtestConfigString(config, _selecteds, out string msg);

View File

@@ -1,198 +0,0 @@
using System;
using v2rayN.Mode;
namespace v2rayN.HttpProxyHandler
{
/// <summary>
/// 系统代理(http)模式
/// </summary>
public enum ListenerType
{
noHttpProxy = 0,
GlobalHttp = 1,
HttpOpenAndClear = 2,
HttpOpenOnly = 3,
}
/// <summary>
/// 系统代理(http)总处理
/// 启动privoxy提供http协议
/// 设置IE系统代理
/// </summary>
class HttpProxyHandle
{
private static bool Update(Config config, bool forceDisable)
{
// ListenerType type = config.listenerType;
var type = ListenerType.noHttpProxy;
if (forceDisable)
{
type = ListenerType.noHttpProxy;
}
try
{
if (type != ListenerType.noHttpProxy)
{
int port = Global.httpPort;
if (port <= 0)
{
return false;
}
if (type == ListenerType.GlobalHttp)
{
//ProxySetting.SetProxy($"{Global.Loopback}:{port}", Global.IEProxyExceptions, 2);
SysProxyHandle.SetIEProxy(true, true, $"{Global.Loopback}:{port}");
}
else if (type == ListenerType.HttpOpenAndClear)
{
SysProxyHandle.ResetIEProxy();
}
else if (type == ListenerType.HttpOpenOnly)
{
//SysProxyHandle.ResetIEProxy();
}
}
else
{
SysProxyHandle.ResetIEProxy();
}
}
catch (Exception ex)
{
Utils.SaveLog(ex.Message, ex);
}
return true;
}
/// <summary>
/// 启用系统代理(http)
/// </summary>
/// <param name="config"></param>
private static void StartHttpAgent(Config config)
{
try
{
int localPort = config.GetLocalPort(Global.InboundSocks);
if (localPort > 0)
{
PrivoxyHandler.Instance.Restart(localPort, config);
if (PrivoxyHandler.Instance.RunningPort > 0)
{
Global.sysAgent = true;
Global.socksPort = localPort;
Global.httpPort = PrivoxyHandler.Instance.RunningPort;
}
}
}
catch
{
}
}
/// <summary>
/// 关闭系统代理
/// </summary>
/// <param name="config"></param>
public static void CloseHttpAgent(Config config)
{
try
{
//if (config.listenerType != ListenerType.HttpOpenOnly)
//{
// Update(config, true);
//}
PrivoxyHandler.Instance.Stop();
Global.sysAgent = false;
Global.socksPort = 0;
Global.httpPort = 0;
}
catch
{
}
}
/// <summary>
/// 重启系统代理(http)
/// </summary>
/// <param name="config"></param>
/// <param name="forced"></param>
public static void RestartHttpAgent(Config config, bool forced)
{
bool isRestart = false;
//if (config.listenerType == ListenerType.noHttpProxy)
//{
// // 关闭http proxy时直接返回
// return;
//}
//强制重启或者socks端口变化
if (forced)
{
isRestart = true;
}
else
{
int localPort = config.GetLocalPort(Global.InboundSocks);
if (localPort != Global.socksPort)
{
isRestart = true;
}
}
if (isRestart)
{
CloseHttpAgent(config);
StartHttpAgent(config);
}
Update(config, false);
}
public static bool UpdateSysProxy(Config config, bool forceDisable)
{
var type = config.sysProxyType;
if (forceDisable && type == ESysProxyType.ForcedChange)
{
type = ESysProxyType.ForcedClear;
}
try
{
Global.httpPort = config.GetLocalPort(Global.InboundHttp);
int port = Global.httpPort;
if (port <= 0)
{
return false;
}
if (type == ESysProxyType.ForcedChange)
{
SysProxyHandle.SetIEProxy(true, $"{Global.Loopback}:{port}", config.systemProxyExceptions);
}
else if (type == ESysProxyType.ForcedClear)
{
SysProxyHandle.ResetIEProxy();
}
else if (type == ESysProxyType.Unchanged)
{
}
}
catch (Exception ex)
{
Utils.SaveLog(ex.Message, ex);
}
return true;
}
public static void ResetIEProxy4WindowsShutDown()
{
try
{
//TODO To be verified
Utils.RegWriteValue(@"Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", 0);
}
catch
{
}
}
}
}

View File

@@ -1,194 +0,0 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using v2rayN.Mode;
using v2rayN.Properties;
using v2rayN.Tool;
namespace v2rayN.HttpProxyHandler
{
/// <summary>
/// Privoxy处理类提供http协议代理
/// </summary>
class PrivoxyHandler
{
/// <summary>
/// 单例
/// </summary>
private static PrivoxyHandler instance;
private static int _uid;
private static string _uniqueConfigFile;
private Process _process;
private static string _privoxyName = "v2ray_privoxy";
static PrivoxyHandler()
{
try
{
_uid = Application.StartupPath.GetHashCode();
_uniqueConfigFile = string.Format("privoxy_{0}.conf", _uid);
FileManager.UncompressFile(Utils.GetTempPath($"{_privoxyName}.exe"), Resources.privoxy_exe);
}
catch (IOException ex)
{
Utils.SaveLog(ex.Message, ex);
}
}
/// <summary>
/// 单例
/// </summary>
public static PrivoxyHandler Instance
{
get
{
if (instance == null)
{
instance = new PrivoxyHandler();
}
return instance;
}
}
public int RunningPort
{
get; set;
}
public void Restart(int localPort, Config config)
{
Stop();
Start(localPort, config);
}
public void Start(int localPort, Config config)
{
try
{
if (_process == null)
{
string privoxyConfig = "";//Resources.privoxy_conf;
RunningPort = config.GetLocalPort(Global.InboundHttp);
privoxyConfig = privoxyConfig.Replace("__SOCKS_PORT__", localPort.ToString());
privoxyConfig = privoxyConfig.Replace("__PRIVOXY_BIND_PORT__", RunningPort.ToString());
if (config.allowLANConn)
{
privoxyConfig = privoxyConfig.Replace("__PRIVOXY_BIND_IP__", "0.0.0.0");
}
else
{
privoxyConfig = privoxyConfig.Replace("__PRIVOXY_BIND_IP__", Global.Loopback);
}
FileManager.ByteArrayToFile(Utils.GetTempPath(_uniqueConfigFile), Encoding.UTF8.GetBytes(privoxyConfig));
_process = new Process
{
// Configure the process using the StartInfo properties.
StartInfo =
{
FileName = $"{_privoxyName}.exe",
Arguments = _uniqueConfigFile,
WorkingDirectory = Utils.GetTempPath(),
WindowStyle = ProcessWindowStyle.Hidden,
UseShellExecute = true,
CreateNoWindow = true
}
};
_process.Start();
/*
* Add this process to job obj associated with this ss process, so that
* when ss exit unexpectedly, this process will be forced killed by system.
*/
Global.processJob.AddProcess(_process.Handle);
}
}
catch (Exception ex)
{
RunningPort = 0;
Utils.SaveLog(ex.Message, ex);
}
}
public void Stop()
{
if (_process != null)
{
KillProcess(_process);
_process.Dispose();
_process = null;
RunningPort = 0;
}
else
{
Process[] existingPrivoxy = Process.GetProcessesByName(_privoxyName);
foreach (Process p in existingPrivoxy.Where(IsChildProcess))
{
KillProcess(p);
}
}
}
private static void KillProcess(Process p)
{
try
{
p.CloseMainWindow();
p.WaitForExit(100);
if (!p.HasExited)
{
p.Kill();
p.WaitForExit(100);
}
}
catch (Exception ex)
{
Utils.SaveLog(ex.Message, ex);
}
}
/*
* We won't like to kill other ss instances' v2ray_privoxy.exe.
* This function will check whether the given process is created
* by this process by checking the module path or command line.
*
* Since it's required to put ss in different dirs to run muti instances,
* different instance will create their unique "privoxy_UID.conf" where
* UID is hash of ss's location.
*/
private static bool IsChildProcess(Process process)
{
try
{
/*
* Under PortableMode, we could identify it by the path of v2ray_privoxy.exe.
*/
string path = process.MainModule.FileName;
return Utils.GetTempPath($"{_privoxyName}.exe").Equals(path);
}
catch (Exception ex)
{
Utils.SaveLog(ex.Message, ex);
/*
* Sometimes Process.GetProcessesByName will return some processes that
* are already dead, and that will cause exceptions here.
* We could simply ignore those exceptions.
*/
//Logging.LogUsefulException(ex);
return false;
}
}
}
}

View File

@@ -1,7 +1,8 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using v2rayN.Base;
using v2rayN.HttpProxyHandler;
using System.Linq;
namespace v2rayN.Mode
@@ -12,13 +13,7 @@ namespace v2rayN.Mode
[Serializable]
public class Config
{
/// <summary>
/// 本地监听
/// </summary>
public List<InItem> inbound
{
get; set;
}
#region property
/// <summary>
/// 允许日志
@@ -36,18 +31,7 @@ namespace v2rayN.Mode
get; set;
}
/// <summary>
/// 活动配置序号
/// </summary>
public int index
{
get; set;
}
/// <summary>
/// vmess服务器信息
/// </summary>
public List<VmessItem> vmess
public string indexId
{
get; set;
}
@@ -60,14 +44,6 @@ namespace v2rayN.Mode
get; set;
}
/// <summary>
/// KcpItem
/// </summary>
public KcpItem kcpItem
{
get; set;
}
/// <summary>
///
/// </summary>
@@ -76,21 +52,6 @@ namespace v2rayN.Mode
get; set;
}
/// <summary>
/// 自定义服务器下载测速url
/// </summary>
public string speedTestUrl
{
get; set;
}
/// <summary>
/// 自定义“服务器真连接延迟”测试url
/// </summary>
public string speedPingTestUrl
{
get; set;
}
/// <summary>
/// 允许来自局域网的连接
/// </summary>
@@ -123,7 +84,6 @@ namespace v2rayN.Mode
get; set;
}
/// <summary>
/// 自定义远程DNS
/// </summary>
@@ -140,20 +100,6 @@ namespace v2rayN.Mode
get; set;
}
/// <summary>
/// 订阅
/// </summary>
public List<SubItem> subItem
{
get; set;
}
/// <summary>
/// UI
/// </summary>
public UIItem uiItem
{
get; set;
}
/// <summary>
/// 域名解析策略
/// </summary>
@@ -169,10 +115,6 @@ namespace v2rayN.Mode
{
get; set;
}
public List<RoutingItem> routings
{
get; set;
}
public bool enableRoutingAdvanced
{
get; set;
@@ -200,109 +142,75 @@ namespace v2rayN.Mode
get; set;
} = 0;
#region
public string address()
public bool enableSecurityProtocolTls13
{
if (index < 0)
{
return string.Empty;
}
return vmess[index].address.TrimEx();
get; set;
}
public int port()
#endregion
#region other entities
/// <summary>
/// 本地监听
/// </summary>
public List<InItem> inbound
{
if (index < 0)
{
return 10808;
}
return vmess[index].port;
get; set;
}
public string id()
/// <summary>
/// vmess服务器信息
/// </summary>
public List<VmessItem> vmess
{
if (index < 0)
{
return string.Empty;
}
return vmess[index].id.TrimEx();
get; set;
}
public int alterId()
/// <summary>
/// KcpItem
/// </summary>
public KcpItem kcpItem
{
if (index < 0)
{
return 0;
}
return vmess[index].alterId;
get; set;
}
public string security()
/// <summary>
/// 订阅
/// </summary>
public List<SubItem> subItem
{
if (index < 0)
{
return string.Empty;
}
return vmess[index].security.TrimEx();
get; set;
}
/// <summary>
/// UI
/// </summary>
public UIItem uiItem
{
get; set;
}
public List<RoutingItem> routings
{
get; set;
}
public string remarks()
public ConstItem constItem
{
if (index < 0)
{
return string.Empty;
}
return vmess[index].remarks.TrimEx();
get; set;
}
public string network()
public List<KeyEventItem> globalHotkeys
{
if (index < 0 || Utils.IsNullOrEmpty(vmess[index].network))
{
return Global.DefaultNetwork;
}
return vmess[index].network.TrimEx();
get; set;
}
public string headerType()
public List<GroupItem> groupItem
{
if (index < 0 || Utils.IsNullOrEmpty(vmess[index].headerType))
{
return Global.None;
}
return vmess[index].headerType.Replace(" ", "").TrimEx();
}
public string requestHost()
{
if (index < 0 || Utils.IsNullOrEmpty(vmess[index].requestHost))
{
return string.Empty;
}
return vmess[index].requestHost.Replace(" ", "").TrimEx();
}
public string path()
{
if (index < 0 || Utils.IsNullOrEmpty(vmess[index].path))
{
return string.Empty;
}
return vmess[index].path.Replace(" ", "").TrimEx();
}
public string streamSecurity()
{
if (index < 0 || Utils.IsNullOrEmpty(vmess[index].streamSecurity))
{
return string.Empty;
}
return vmess[index].streamSecurity;
}
public bool allowInsecure()
{
if (index < 0 || Utils.IsNullOrEmpty(vmess[index].allowInsecure))
{
return defAllowInsecure;
}
return Convert.ToBoolean(vmess[index].allowInsecure);
get; set;
}
#endregion
#region function
public int GetLocalPort(string protocol)
{
@@ -328,49 +236,53 @@ namespace v2rayN.Mode
return localPort;
}
public int configType()
public int FindIndexId(string id)
{
if (index < 0)
if (string.IsNullOrEmpty(id))
{
return 0;
return -1;
}
return vmess[index].configType;
return vmess.FindIndex(it => it.indexId == id);
}
public string getSummary()
public VmessItem GetVmessItem(string id)
{
if (index < 0)
if (string.IsNullOrEmpty(id))
{
return string.Empty;
return null;
}
return vmess[index].getSummary();
return vmess.FirstOrDefault(it => it.indexId == id);
}
public string getItemId()
public List<string> GetShadowsocksSecuritys()
{
if (index < 0)
if (coreType == ECoreType.v2fly_core)
{
return string.Empty;
return Global.ssSecuritys;
}
return vmess[index].getItemId();
return Global.ssSecuritysInXray;
}
public string flow()
public bool IsActiveNode(VmessItem item)
{
if (index < 0)
if (!Utils.IsNullOrEmpty(item.indexId) && item.indexId == indexId)
{
return true;
}
return false;
}
public string GetGroupRemarks(string groupId)
{
if (string.IsNullOrEmpty(groupId))
{
return string.Empty;
}
return vmess[index].flow.TrimEx();
}
public string sni()
{
if (index < 0)
{
return string.Empty;
}
return vmess[index].sni.TrimEx();
return groupItem.Where(it => it.id == groupId).FirstOrDefault()?.remarks;
}
#endregion
}
@@ -380,7 +292,10 @@ namespace v2rayN.Mode
{
public VmessItem()
{
configVersion = 1;
indexId = string.Empty;
configType = (int)EConfigType.Vmess;
configVersion = 2;
sort = 0;
address = string.Empty;
port = 0;
id = string.Empty;
@@ -393,13 +308,14 @@ namespace v2rayN.Mode
path = string.Empty;
streamSecurity = string.Empty;
allowInsecure = string.Empty;
configType = (int)EConfigType.Vmess;
testResult = string.Empty;
subid = string.Empty;
flow = string.Empty;
groupId = string.Empty;
}
public string getSummary()
#region function
public string GetSummary()
{
string summary = string.Format("[{0}] ", ((EConfigType)configType).ToString());
string[] arrAddr = address.Split('.');
@@ -419,27 +335,37 @@ namespace v2rayN.Mode
switch (configType)
{
case (int)EConfigType.Vmess:
summary += string.Format("{0}({1}:{2})", remarks, addr, port);
break;
case (int)EConfigType.Shadowsocks:
summary += string.Format("{0}({1}:{2})", remarks, addr, port);
break;
case (int)EConfigType.Socks:
summary += string.Format("{0}({1}:{2})", remarks, addr, port);
break;
case (int)EConfigType.VLESS:
summary += string.Format("{0}({1}:{2})", remarks, addr, port);
break;
case (int)EConfigType.Trojan:
summary += string.Format("{0}({1}:{2})", remarks, addr, port);
break;
default:
summary += string.Format("{0}", remarks);
break;
//case (int)EConfigType.Vmess:
// summary += string.Format("{0}({1}:{2})", remarks, addr, port);
// break;
//case (int)EConfigType.Shadowsocks:
// summary += string.Format("{0}({1}:{2})", remarks, addr, port);
// break;
//case (int)EConfigType.Socks:
// summary += string.Format("{0}({1}:{2})", remarks, addr, port);
// break;
//case (int)EConfigType.VLESS:
// summary += string.Format("{0}({1}:{2})", remarks, addr, port);
// break;
//case (int)EConfigType.Trojan:
// summary += string.Format("{0}({1}:{2})", remarks, addr, port);
// break;
//default:
// summary += string.Format("{0}", remarks);
// break;
}
return summary;
}
public string getSubRemarks(Config config)
public string GetSubRemarks(Config config)
{
string subRemarks = string.Empty;
if (Utils.IsNullOrEmpty(subid))
@@ -460,11 +386,43 @@ namespace v2rayN.Mode
return subid.Substring(0, 4);
}
public string getItemId()
public List<string> GetAlpn()
{
string itemId = $"{address}{port}{requestHost}{path}";
itemId = Utils.Base64Encode(itemId);
return itemId;
if (alpn != null && alpn.Count > 0)
{
return alpn;
}
else
{
return null;
}
}
public string GetNetwork()
{
if (Utils.IsNullOrEmpty(network) || !Global.networks.Contains(network))
{
return Global.DefaultNetwork;
}
return network.TrimEx();
}
public void SetTestResult(string value)
{
testResult = value;
}
#endregion
public string indexId
{
get; set;
}
/// <summary>
/// config type(1=normal,2=custom)
/// </summary>
public int configType
{
get; set;
}
/// <summary>
@@ -475,6 +433,11 @@ namespace v2rayN.Mode
get; set;
}
public int sort
{
get; set;
}
/// <summary>
/// 远程服务器地址
/// </summary>
@@ -550,7 +513,7 @@ namespace v2rayN.Mode
}
/// <summary>
/// 底层传输安全
/// 传输安全
/// </summary>
public string streamSecurity
{
@@ -565,15 +528,6 @@ namespace v2rayN.Mode
get; set;
}
/// <summary>
/// config type(1=normal,2=custom)
/// </summary>
public int configType
{
get; set;
}
/// <summary>
///
/// </summary>
@@ -604,6 +558,18 @@ namespace v2rayN.Mode
{
get; set;
}
/// <summary>
/// tls alpn
/// </summary>
public List<string> alpn
{
get; set;
}
public string groupId
{
get; set;
} = string.Empty;
}
[Serializable]
@@ -725,12 +691,28 @@ namespace v2rayN.Mode
/// enable
/// </summary>
public bool enabled { get; set; } = true;
/// <summary>
///
/// </summary>
public string userAgent
{
get; set;
} = string.Empty;
public string groupId
{
get; set;
} = string.Empty;
}
[Serializable]
public class UIItem
{
public bool enableAutoAdjustMainLvColWidth
{
get; set;
}
public System.Drawing.Size mainSize
{
@@ -742,4 +724,62 @@ namespace v2rayN.Mode
get; set;
}
}
[Serializable]
public class ConstItem
{
/// <summary>
/// 自定义服务器下载测速url
/// </summary>
public string speedTestUrl
{
get; set;
}
/// <summary>
/// 自定义“服务器真连接延迟”测试url
/// </summary>
public string speedPingTestUrl
{
get; set;
}
public string defIEProxyExceptions
{
get; set;
}
}
[Serializable]
public class KeyEventItem
{
public EGlobalHotkey eGlobalHotkey { get; set; }
public bool Alt { get; set; }
public bool Control { get; set; }
public bool Shift { get; set; }
public Keys? KeyCode { get; set; }
}
[Serializable]
public class GroupItem
{
/// <summary>
///
/// </summary>
public string id
{
get; set;
}
/// <summary>
///
/// </summary>
public string remarks
{
get; set;
}
}
}

View File

@@ -0,0 +1,11 @@

namespace v2rayN.Mode
{
public enum EGlobalHotkey
{
ShowForm = 0,
SystemProxyClear = 1,
SystemProxySet = 2,
SystemProxyUnchanged = 3,
}
}

View File

@@ -10,6 +10,7 @@ namespace v2rayN.Mode
port,
security,
network,
streamSecurity,
subRemarks,
testResult,

View File

@@ -27,6 +27,9 @@ namespace v2rayN.Mode
{
get; set;
}
public string customIcon
{
get; set;
}
}
}

View File

@@ -0,0 +1,29 @@
using System;
namespace v2rayN.Mode
{
[Serializable]
class ServerTestItem
{
public string indexId
{
get; set;
}
public string address
{
get; set;
}
public int port
{
get; set;
}
public int configType
{
get; set;
}
public bool allowTest
{
get; set;
}
}
}

View File

@@ -25,7 +25,7 @@ namespace v2rayN.Mode
/// 统计需要, 空对象
/// </summary>
public Stats stats { get; set; }
/// </summary>
public API api { get; set; }
@@ -133,14 +133,14 @@ namespace v2rayN.Mode
/// </summary>
public List<UsersItem> clients { get; set; }
/// <summary>
/// VLESS
/// </summary>
public string decryption { get; set; }
public bool allowTransparent { get; set; }
}
public class UsersItem
@@ -170,7 +170,7 @@ namespace v2rayN.Mode
/// <summary>
/// VLESS
/// </summary>
public string flow { get; set; }
public string flow { get; set; }
}
public class Sniffing
{
@@ -271,6 +271,11 @@ namespace v2rayN.Mode
/// </summary>
public int level { get; set; }
/// <summary>
/// trojan
/// </summary>
public string flow { get; set; }
/// <summary>
///
/// </summary>
@@ -399,10 +404,17 @@ namespace v2rayN.Mode
///
/// </summary>
public string serverName { get; set; }
/// <summary>
///
/// </summary>
public List<string> alpn
{
get; set;
}
}
public class TcpSettings
{
{
/// <summary>
/// 数据包头部伪装设置
/// </summary>
@@ -466,7 +478,7 @@ namespace v2rayN.Mode
}
public class WsSettings
{
{
/// <summary>
///
/// </summary>

View File

@@ -2,61 +2,68 @@
namespace v2rayN.Mode
{
/// <summary>
/// https://github.com/2dust/v2rayN/wiki/
/// </summary>
[Serializable]
class VmessQRCode
{
/// <summary>
/// 版本
///
/// </summary>
public string v { get; set; } = string.Empty;
/// <summary>
/// 备注
///
/// </summary>
public string ps { get; set; } = string.Empty;
/// <summary>
/// VMess 远程服务器地址
///
/// </summary>
public string add { get; set; } = string.Empty;
/// <summary>
/// VMess 远程服务器端口
///
/// </summary>
public string port { get; set; } = string.Empty;
/// <summary>
/// VMess 远程服务器ID
///
/// </summary>
public string id { get; set; } = string.Empty;
/// <summary>
/// VMess 远程服务器额外ID
///
/// </summary>
public string aid { get; set; } = string.Empty;
/// <summary>
/// VMess Security
///
/// </summary>
public string scy { get; set; } = string.Empty;
/// <summary>
/// 传输协议tcp,kcp,ws
///
/// </summary>
public string net { get; set; } = string.Empty;
/// <summary>
/// 伪装类型
///
/// </summary>
public string type { get; set; } = string.Empty;
/// <summary>
/// 伪装的域名
///
/// </summary>
public string host { get; set; } = string.Empty;
/// <summary>
/// path
///
/// </summary>
public string path { get; set; } = string.Empty;
/// <summary>
/// 底层传输安全
/// TLS
/// </summary>
public string tls { get; set; } = string.Empty;
/// <summary>
/// SNI
/// TLS SNI
/// </summary>
public string sni { get; set; } = string.Empty;
/// <summary>
/// TLS alpn
/// </summary>
public string alpn { get; set; } = string.Empty;
}
}

View File

@@ -33,7 +33,7 @@ namespace v2rayN
if (!IsDuplicateInstance())
{
Logging.Setup();
Utils.SaveLog($"v2rayN start up | {Utils.GetVersion()} | {Utils.GetExePath()}");
//设置语言环境

View File

@@ -32,4 +32,4 @@ using System.Runtime.InteropServices;
// 方法是按如下所示使用“*”:
//[assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyFileVersion("4.24")]
[assembly: AssemblyFileVersion("5.2")]

View File

@@ -47,8 +47,8 @@ namespace v2rayN.Properties {
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
@@ -120,16 +120,6 @@ namespace v2rayN.Properties {
}
}
/// <summary>
/// 查找 System.Byte[] 类型的本地化资源。
/// </summary>
internal static byte[] privoxy_exe {
get {
object obj = ResourceManager.GetObject("privoxy_exe", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>

View File

@@ -118,9 +118,6 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="privoxy_exe" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\privoxy.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="about" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\about.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>

View File

@@ -47,8 +47,8 @@ namespace v2rayN.Resx {
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
@@ -69,6 +69,15 @@ namespace v2rayN.Resx {
}
}
/// <summary>
/// 查找类似 All servers 的本地化字符串。
/// </summary>
internal static string AllGroupServers {
get {
return ResourceManager.GetString("AllGroupServers", resourceCulture);
}
}
/// <summary>
/// 查找类似 Batch export subscription to clipboard successfully 的本地化字符串。
/// </summary>
@@ -187,11 +196,11 @@ namespace v2rayN.Resx {
}
/// <summary>
/// 查找类似 Please fill in the correct format extra ID 的本地化字符串。
/// 查找类似 Please fill in the correct custom DNS 的本地化字符串。
/// </summary>
internal static string FillCorrectAlterId {
internal static string FillCorrectDNSText {
get {
return ResourceManager.GetString("FillCorrectAlterId", resourceCulture);
return ResourceManager.GetString("FillCorrectDNSText", resourceCulture);
}
}
@@ -330,6 +339,15 @@ namespace v2rayN.Resx {
}
}
/// <summary>
/// 查找类似 Custom Icon 的本地化字符串。
/// </summary>
internal static string LvCustomIcon {
get {
return ResourceManager.GetString("LvCustomIcon", resourceCulture);
}
}
/// <summary>
/// 查找类似 Security 的本地化字符串。
/// </summary>
@@ -384,6 +402,15 @@ namespace v2rayN.Resx {
}
}
/// <summary>
/// 查找类似 TLS 的本地化字符串。
/// </summary>
internal static string LvTLS {
get {
return ResourceManager.GetString("LvTLS", resourceCulture);
}
}
/// <summary>
/// 查找类似 Today download traffic 的本地化字符串。
/// </summary>
@@ -583,7 +610,7 @@ namespace v2rayN.Resx {
}
/// <summary>
/// 查找类似 Subscription content decoding failed (non-BASE64 code) 的本地化字符串。
/// 查找类似 Failed to get subscription content 的本地化字符串。
/// </summary>
internal static string MsgSubscriptionDecodingFailed {
get {
@@ -753,6 +780,24 @@ namespace v2rayN.Resx {
}
}
/// <summary>
/// 查找类似 Global hotkey {0} registered failed, reason {1} 的本地化字符串。
/// </summary>
internal static string RegisterGlobalHotkeyFailed {
get {
return ResourceManager.GetString("RegisterGlobalHotkeyFailed", resourceCulture);
}
}
/// <summary>
/// 查找类似 Global hotkey {0} registered successfully 的本地化字符串。
/// </summary>
internal static string RegisterGlobalHotkeySuccessfully {
get {
return ResourceManager.GetString("RegisterGlobalHotkeySuccessfully", resourceCulture);
}
}
/// <summary>
/// 查找类似 Servers deduplication completed. Old: {0}, New: {1}. 的本地化字符串。
/// </summary>
@@ -888,5 +933,131 @@ namespace v2rayN.Resx {
return ResourceManager.GetString("TestMeOutput", resourceCulture);
}
}
/// <summary>
/// 查找类似 *tcp camouflage type 的本地化字符串。
/// </summary>
internal static string TransportHeaderTypeTip1 {
get {
return ResourceManager.GetString("TransportHeaderTypeTip1", resourceCulture);
}
}
/// <summary>
/// 查找类似 *kcp camouflage type 的本地化字符串。
/// </summary>
internal static string TransportHeaderTypeTip2 {
get {
return ResourceManager.GetString("TransportHeaderTypeTip2", resourceCulture);
}
}
/// <summary>
/// 查找类似 *QUIC camouflage type 的本地化字符串。
/// </summary>
internal static string TransportHeaderTypeTip3 {
get {
return ResourceManager.GetString("TransportHeaderTypeTip3", resourceCulture);
}
}
/// <summary>
/// 查找类似 *grpc mode 的本地化字符串。
/// </summary>
internal static string TransportHeaderTypeTip4 {
get {
return ResourceManager.GetString("TransportHeaderTypeTip4", resourceCulture);
}
}
/// <summary>
/// 查找类似 *ws path 的本地化字符串。
/// </summary>
internal static string TransportPathTip1 {
get {
return ResourceManager.GetString("TransportPathTip1", resourceCulture);
}
}
/// <summary>
/// 查找类似 *h2 path 的本地化字符串。
/// </summary>
internal static string TransportPathTip2 {
get {
return ResourceManager.GetString("TransportPathTip2", resourceCulture);
}
}
/// <summary>
/// 查找类似 *QUIC key/Kcp seed 的本地化字符串。
/// </summary>
internal static string TransportPathTip3 {
get {
return ResourceManager.GetString("TransportPathTip3", resourceCulture);
}
}
/// <summary>
/// 查找类似 *grpc serviceName 的本地化字符串。
/// </summary>
internal static string TransportPathTip4 {
get {
return ResourceManager.GetString("TransportPathTip4", resourceCulture);
}
}
/// <summary>
/// 查找类似 *Kcp seed 的本地化字符串。
/// </summary>
internal static string TransportPathTip5 {
get {
return ResourceManager.GetString("TransportPathTip5", resourceCulture);
}
}
/// <summary>
/// 查找类似 *http host Separated by commas (,) 的本地化字符串。
/// </summary>
internal static string TransportRequestHostTip1 {
get {
return ResourceManager.GetString("TransportRequestHostTip1", resourceCulture);
}
}
/// <summary>
/// 查找类似 *ws host 的本地化字符串。
/// </summary>
internal static string TransportRequestHostTip2 {
get {
return ResourceManager.GetString("TransportRequestHostTip2", resourceCulture);
}
}
/// <summary>
/// 查找类似 *h2 host Separated by commas (,) 的本地化字符串。
/// </summary>
internal static string TransportRequestHostTip3 {
get {
return ResourceManager.GetString("TransportRequestHostTip3", resourceCulture);
}
}
/// <summary>
/// 查找类似 *QUIC securty 的本地化字符串。
/// </summary>
internal static string TransportRequestHostTip4 {
get {
return ResourceManager.GetString("TransportRequestHostTip4", resourceCulture);
}
}
/// <summary>
/// 查找类似 Ungrouped 的本地化字符串。
/// </summary>
internal static string UngroupedServers {
get {
return ResourceManager.GetString("UngroupedServers", resourceCulture);
}
}
}
}

View File

@@ -156,9 +156,6 @@
<data name="FailedReadConfiguration" xml:space="preserve">
<value>Failed to read configuration file</value>
</data>
<data name="FillCorrectAlterId" xml:space="preserve">
<value>Please fill in the correct format extra ID</value>
</data>
<data name="FillCorrectServerPort" xml:space="preserve">
<value>Please fill in the correct format server port</value>
</data>
@@ -271,7 +268,7 @@
<value>Start updating PAC...</value>
</data>
<data name="MsgSubscriptionDecodingFailed" xml:space="preserve">
<value>Subscription content decoding failed (non-BASE64 code)</value>
<value>Failed to get subscription content</value>
</data>
<data name="MsgUnpacking" xml:space="preserve">
<value>is unpacking...</value>
@@ -394,4 +391,64 @@
<data name="MsgInformationTitle" xml:space="preserve">
<value>Informations (Filter : {0})</value>
</data>
<data name="LvCustomIcon" xml:space="preserve">
<value>Custom Icon</value>
</data>
<data name="FillCorrectDNSText" xml:space="preserve">
<value>Please fill in the correct custom DNS</value>
</data>
<data name="TransportPathTip1" xml:space="preserve">
<value>*ws path</value>
</data>
<data name="TransportPathTip2" xml:space="preserve">
<value>*h2 path</value>
</data>
<data name="TransportPathTip3" xml:space="preserve">
<value>*QUIC key/Kcp seed</value>
</data>
<data name="TransportPathTip4" xml:space="preserve">
<value>*grpc serviceName</value>
</data>
<data name="TransportRequestHostTip1" xml:space="preserve">
<value>*http host Separated by commas (,)</value>
</data>
<data name="TransportRequestHostTip2" xml:space="preserve">
<value>*ws host</value>
</data>
<data name="TransportRequestHostTip3" xml:space="preserve">
<value>*h2 host Separated by commas (,)</value>
</data>
<data name="TransportRequestHostTip4" xml:space="preserve">
<value>*QUIC securty</value>
</data>
<data name="TransportHeaderTypeTip1" xml:space="preserve">
<value>*tcp camouflage type</value>
</data>
<data name="TransportHeaderTypeTip2" xml:space="preserve">
<value>*kcp camouflage type</value>
</data>
<data name="TransportHeaderTypeTip3" xml:space="preserve">
<value>*QUIC camouflage type</value>
</data>
<data name="TransportHeaderTypeTip4" xml:space="preserve">
<value>*grpc mode</value>
</data>
<data name="LvTLS" xml:space="preserve">
<value>TLS</value>
</data>
<data name="TransportPathTip5" xml:space="preserve">
<value>*Kcp seed</value>
</data>
<data name="RegisterGlobalHotkeyFailed" xml:space="preserve">
<value>Global hotkey {0} registered failed, reason {1}</value>
</data>
<data name="RegisterGlobalHotkeySuccessfully" xml:space="preserve">
<value>Global hotkey {0} registered successfully</value>
</data>
<data name="UngroupedServers" xml:space="preserve">
<value>Ungrouped</value>
</data>
<data name="AllGroupServers" xml:space="preserve">
<value>All servers</value>
</data>
</root>

View File

@@ -156,9 +156,6 @@
<data name="FailedReadConfiguration" xml:space="preserve">
<value>读取配置文件失败</value>
</data>
<data name="FillCorrectAlterId" xml:space="preserve">
<value>请填写正确格式额外ID</value>
</data>
<data name="FillCorrectServerPort" xml:space="preserve">
<value>请填写正确格式服务器端口</value>
</data>
@@ -271,7 +268,7 @@
<value>开始更新 PAC...</value>
</data>
<data name="MsgSubscriptionDecodingFailed" xml:space="preserve">
<value>订阅内容解码失败(非BASE64码)</value>
<value>订阅内容获取失败</value>
</data>
<data name="MsgUnpacking" xml:space="preserve">
<value>正在解压......</value>
@@ -394,4 +391,64 @@
<data name="MsgInformationTitle" xml:space="preserve">
<value>信息 (过滤器 : {0})</value>
</data>
<data name="LvCustomIcon" xml:space="preserve">
<value>自定义图标</value>
</data>
<data name="FillCorrectDNSText" xml:space="preserve">
<value>请填写正确的自定义DNS</value>
</data>
<data name="TransportPathTip1" xml:space="preserve">
<value>*ws path</value>
</data>
<data name="TransportPathTip2" xml:space="preserve">
<value>*h2 path</value>
</data>
<data name="TransportPathTip3" xml:space="preserve">
<value>*QUIC 加密密钥</value>
</data>
<data name="TransportPathTip4" xml:space="preserve">
<value>*grpc serviceName</value>
</data>
<data name="TransportRequestHostTip1" xml:space="preserve">
<value>*http host中间逗号(,)隔开</value>
</data>
<data name="TransportRequestHostTip2" xml:space="preserve">
<value>*ws host</value>
</data>
<data name="TransportRequestHostTip3" xml:space="preserve">
<value>*h2 host中间逗号(,)隔开</value>
</data>
<data name="TransportRequestHostTip4" xml:space="preserve">
<value>*QUIC 加密方式</value>
</data>
<data name="TransportHeaderTypeTip1" xml:space="preserve">
<value>*tcp伪装类型</value>
</data>
<data name="TransportHeaderTypeTip2" xml:space="preserve">
<value>*kcp伪装类型</value>
</data>
<data name="TransportHeaderTypeTip3" xml:space="preserve">
<value>*QUIC伪装类型</value>
</data>
<data name="TransportHeaderTypeTip4" xml:space="preserve">
<value>*grpc 模式</value>
</data>
<data name="LvTLS" xml:space="preserve">
<value>传输层安全</value>
</data>
<data name="TransportPathTip5" xml:space="preserve">
<value>*Kcp seed</value>
</data>
<data name="RegisterGlobalHotkeyFailed" xml:space="preserve">
<value>注册全局热键 {0} 失败,原因 {1}</value>
</data>
<data name="RegisterGlobalHotkeySuccessfully" xml:space="preserve">
<value>注册全局热键 {0} 成功</value>
</data>
<data name="UngroupedServers" xml:space="preserve">
<value>未分组服务器</value>
</data>
<data name="AllGroupServers" xml:space="preserve">
<value>所有服务器</value>
</data>
</root>

Some files were not shown because too many files have changed in this diff Show More