Compare commits

...

13 Commits
5.2 ... 5.5

Author SHA1 Message Date
2dust
e58e0d6ac7 Update AssemblyInfo.cs 2022-03-21 20:36:07 +08:00
2dust
a2679e009d refactor some code 2022-03-21 20:20:29 +08:00
2dust
78d6bcd57a Full profile can be subscribed 2022-03-20 20:40:07 +08:00
2dust
026936c92f Update AssemblyInfo.cs 2022-03-19 19:27:14 +08:00
2dust
5e5893362c add clash core 2022-03-19 19:26:51 +08:00
2dust
5b8ce1836b Update AssemblyInfo.cs 2022-03-19 09:24:30 +08:00
2dust
d71f3fafcf Merge branch 'master' of https://github.com/2dust/v2rayN 2022-03-19 09:23:22 +08:00
2dust
828f93bc5c Improve custom configuration 2022-03-19 09:23:19 +08:00
2dust
f947c541c9 Update README.md 2022-03-19 08:55:43 +08:00
2dust
539b6aafd9 Refactor 2022-03-19 07:53:48 +08:00
2dust
c3971bda05 bug fix 2022-03-18 20:30:08 +08:00
2dust
8f17331db2 Refactor the server configuration 2022-03-18 18:54:42 +08:00
2dust
583e824337 Refactor core type 2022-03-18 18:52:06 +08:00
50 changed files with 2926 additions and 5694 deletions

View File

@@ -1,4 +1,5 @@
# v2rayN # v2rayN
A V2Ray client for Windows, support [Xray core](https://github.com/XTLS/Xray-core) and [v2fly core](https://github.com/v2fly/v2ray-core)
### How to use ### How to use
- If you are newbie please download v2rayN-Core.zip from releases - If you are newbie please download v2rayN-Core.zip from releases
@@ -7,4 +8,5 @@
### Requirements ### Requirements
- Microsoft [.NET Framework 4.8](https://docs.microsoft.com/zh-cn/dotnet/framework/install/guide-for-developers) - Microsoft [.NET Framework 4.8](https://docs.microsoft.com/zh-cn/dotnet/framework/install/guide-for-developers)
- Project V core [https://github.com/v2fly/v2ray-core/releases](https://github.com/v2fly/v2ray-core/releases) - v2fly core [https://github.com/v2fly/v2ray-core/releases](https://github.com/v2fly/v2ray-core/releases)
- Xray core [https://github.com/XTLS/Xray-core/releases](https://github.com/XTLS/Xray-core/releases)

View File

@@ -31,6 +31,9 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddServer2Form)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddServer2Form));
this.btnClose = new System.Windows.Forms.Button(); this.btnClose = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnEdit = new System.Windows.Forms.Button();
this.cmbCoreType = new System.Windows.Forms.ComboBox();
this.labCoreType = new System.Windows.Forms.Label();
this.btnBrowse = new System.Windows.Forms.Button(); this.btnBrowse = new System.Windows.Forms.Button();
this.txtAddress = new System.Windows.Forms.TextBox(); this.txtAddress = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label();
@@ -54,6 +57,9 @@
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.btnEdit);
this.groupBox1.Controls.Add(this.cmbCoreType);
this.groupBox1.Controls.Add(this.labCoreType);
this.groupBox1.Controls.Add(this.btnBrowse); this.groupBox1.Controls.Add(this.btnBrowse);
this.groupBox1.Controls.Add(this.txtAddress); this.groupBox1.Controls.Add(this.txtAddress);
this.groupBox1.Controls.Add(this.label13); this.groupBox1.Controls.Add(this.label13);
@@ -64,6 +70,25 @@
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
// //
// btnEdit
//
resources.ApplyResources(this.btnEdit, "btnEdit");
this.btnEdit.Name = "btnEdit";
this.btnEdit.UseVisualStyleBackColor = true;
this.btnEdit.Click += new System.EventHandler(this.btnEdit_Click);
//
// cmbCoreType
//
this.cmbCoreType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCoreType.FormattingEnabled = true;
resources.ApplyResources(this.cmbCoreType, "cmbCoreType");
this.cmbCoreType.Name = "cmbCoreType";
//
// labCoreType
//
resources.ApplyResources(this.labCoreType, "labCoreType");
this.labCoreType.Name = "labCoreType";
//
// btnBrowse // btnBrowse
// //
resources.ApplyResources(this.btnBrowse, "btnBrowse"); resources.ApplyResources(this.btnBrowse, "btnBrowse");
@@ -146,5 +171,8 @@
private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txtAddress; private System.Windows.Forms.TextBox txtAddress;
private System.Windows.Forms.Button btnBrowse; private System.Windows.Forms.Button btnBrowse;
private System.Windows.Forms.ComboBox cmbCoreType;
private System.Windows.Forms.Label labCoreType;
private System.Windows.Forms.Button btnEdit;
} }
} }

View File

@@ -1,4 +1,6 @@
using System; using System;
using System.Diagnostics;
using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
using v2rayN.Handler; using v2rayN.Handler;
using v2rayN.Mode; using v2rayN.Mode;
@@ -15,6 +17,10 @@ namespace v2rayN.Forms
private void AddServer2Form_Load(object sender, EventArgs e) private void AddServer2Form_Load(object sender, EventArgs e)
{ {
cmbCoreType.Items.AddRange(Global.coreTypes.ToArray());
cmbCoreType.Items.Add("clash");
cmbCoreType.Items.Add(string.Empty);
txtAddress.ReadOnly = true; txtAddress.ReadOnly = true;
if (vmessItem != null) if (vmessItem != null)
{ {
@@ -35,6 +41,15 @@ namespace v2rayN.Forms
{ {
txtRemarks.Text = vmessItem.remarks; txtRemarks.Text = vmessItem.remarks;
txtAddress.Text = vmessItem.address; txtAddress.Text = vmessItem.address;
if (vmessItem.coreType == null)
{
cmbCoreType.Text = string.Empty;
}
else
{
cmbCoreType.Text = vmessItem.coreType.ToString();
}
} }
@@ -54,7 +69,20 @@ namespace v2rayN.Forms
UI.Show(UIRes.I18N("PleaseFillRemarks")); UI.Show(UIRes.I18N("PleaseFillRemarks"));
return; return;
} }
if (Utils.IsNullOrEmpty(txtAddress.Text))
{
UI.Show(UIRes.I18N("FillServerAddressCustom"));
return;
}
vmessItem.remarks = remarks; vmessItem.remarks = remarks;
if (Utils.IsNullOrEmpty(cmbCoreType.Text))
{
vmessItem.coreType = null;
}
else
{
vmessItem.coreType = (ECoreType)Enum.Parse(typeof(ECoreType), cmbCoreType.Text);
}
if (ConfigHandler.EditCustomServer(ref config, vmessItem) == 0) if (ConfigHandler.EditCustomServer(ref config, vmessItem) == 0)
{ {
@@ -85,7 +113,7 @@ namespace v2rayN.Forms
OpenFileDialog fileDialog = new OpenFileDialog OpenFileDialog fileDialog = new OpenFileDialog
{ {
Multiselect = false, Multiselect = false,
Filter = "Config|*.json|All|*.*" Filter = "Config|*.json|YAML|*.yaml|All|*.*"
}; };
if (fileDialog.ShowDialog() != DialogResult.OK) if (fileDialog.ShowDialog() != DialogResult.OK)
{ {
@@ -100,7 +128,7 @@ namespace v2rayN.Forms
vmessItem.address = fileName; vmessItem.address = fileName;
vmessItem.remarks = txtRemarks.Text; vmessItem.remarks = txtRemarks.Text;
if (ConfigHandler.AddCustomServer(ref config, vmessItem) == 0) if (ConfigHandler.AddCustomServer(ref config, vmessItem, false) == 0)
{ {
BindingServer(); BindingServer();
UI.Show(UIRes.I18N("SuccessfullyImportedCustomServer")); UI.Show(UIRes.I18N("SuccessfullyImportedCustomServer"));
@@ -110,5 +138,18 @@ namespace v2rayN.Forms
UI.ShowWarning(UIRes.I18N("FailedImportedCustomServer")); UI.ShowWarning(UIRes.I18N("FailedImportedCustomServer"));
} }
} }
private void btnEdit_Click(object sender, EventArgs e)
{
var address = txtAddress.Text;
if (Utils.IsNullOrEmpty(address))
{
UI.Show(UIRes.I18N("FillServerAddressCustom"));
return;
}
address = Path.Combine(Utils.GetConfigPath(), address);
Process.Start(address);
}
} }
} }

View File

@@ -144,11 +144,89 @@
<value>0</value> <value>0</value>
</data> </data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="btnEdit.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnEdit.Location" type="System.Drawing.Point, System.Drawing">
<value>208, 110</value>
</data>
<data name="btnEdit.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="btnEdit.TabIndex" type="System.Int32, mscorlib">
<value>43</value>
</data>
<data name="btnEdit.Text" xml:space="preserve">
<value>&amp;Edit</value>
</data>
<data name="&gt;&gt;btnEdit.Name" xml:space="preserve">
<value>btnEdit</value>
</data>
<data name="&gt;&gt;btnEdit.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;btnEdit.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;btnEdit.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="cmbCoreType.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 157</value>
</data>
<data name="cmbCoreType.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 20</value>
</data>
<data name="cmbCoreType.TabIndex" type="System.Int32, mscorlib">
<value>41</value>
</data>
<data name="&gt;&gt;cmbCoreType.Name" xml:space="preserve">
<value>cmbCoreType</value>
</data>
<data name="&gt;&gt;cmbCoreType.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;cmbCoreType.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cmbCoreType.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="labCoreType.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labCoreType.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labCoreType.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 161</value>
</data>
<data name="labCoreType.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 12</value>
</data>
<data name="labCoreType.TabIndex" type="System.Int32, mscorlib">
<value>42</value>
</data>
<data name="labCoreType.Text" xml:space="preserve">
<value>Core Type</value>
</data>
<data name="&gt;&gt;labCoreType.Name" xml:space="preserve">
<value>labCoreType</value>
</data>
<data name="&gt;&gt;labCoreType.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;labCoreType.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;labCoreType.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="btnBrowse.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> <data name="btnBrowse.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="btnBrowse.Location" type="System.Drawing.Point, System.Drawing"> <data name="btnBrowse.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 121</value> <value>127, 110</value>
</data> </data>
<data name="btnBrowse.Size" type="System.Drawing.Size, System.Drawing"> <data name="btnBrowse.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value> <value>75, 23</value>
@@ -169,7 +247,7 @@
<value>groupBox1</value> <value>groupBox1</value>
</data> </data>
<data name="&gt;&gt;btnBrowse.ZOrder" xml:space="preserve"> <data name="&gt;&gt;btnBrowse.ZOrder" xml:space="preserve">
<value>0</value> <value>3</value>
</data> </data>
<data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing"> <data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 62</value> <value>127, 62</value>
@@ -193,7 +271,7 @@
<value>groupBox1</value> <value>groupBox1</value>
</data> </data>
<data name="&gt;&gt;txtAddress.ZOrder" xml:space="preserve"> <data name="&gt;&gt;txtAddress.ZOrder" xml:space="preserve">
<value>1</value> <value>4</value>
</data> </data>
<data name="label13.AutoSize" type="System.Boolean, mscorlib"> <data name="label13.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
@@ -220,7 +298,7 @@
<value>groupBox1</value> <value>groupBox1</value>
</data> </data>
<data name="&gt;&gt;label13.ZOrder" xml:space="preserve"> <data name="&gt;&gt;label13.ZOrder" xml:space="preserve">
<value>2</value> <value>5</value>
</data> </data>
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing"> <data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 23</value> <value>127, 23</value>
@@ -241,7 +319,7 @@
<value>groupBox1</value> <value>groupBox1</value>
</data> </data>
<data name="&gt;&gt;txtRemarks.ZOrder" xml:space="preserve"> <data name="&gt;&gt;txtRemarks.ZOrder" xml:space="preserve">
<value>3</value> <value>6</value>
</data> </data>
<data name="label6.AutoSize" type="System.Boolean, mscorlib"> <data name="label6.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
@@ -268,7 +346,7 @@
<value>groupBox1</value> <value>groupBox1</value>
</data> </data>
<data name="&gt;&gt;label6.ZOrder" xml:space="preserve"> <data name="&gt;&gt;label6.ZOrder" xml:space="preserve">
<value>4</value> <value>7</value>
</data> </data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib"> <data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
@@ -295,7 +373,7 @@
<value>groupBox1</value> <value>groupBox1</value>
</data> </data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve"> <data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>5</value> <value>8</value>
</data> </data>
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> <data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value> <value>Fill</value>
@@ -324,18 +402,6 @@
<data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve"> <data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
<value>0</value> <value>0</value>
</data> </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"> <data name="&gt;&gt;btnOK.Name" xml:space="preserve">
<value>btnOK</value> <value>btnOK</value>
</data> </data>
@@ -372,6 +438,30 @@
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve"> <data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>1</value> <value>1</value>
</data> </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="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> <data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value> <value>Top</value>
</data> </data>
@@ -406,7 +496,7 @@
<value>611, 259</value> <value>611, 259</value>
</data> </data>
<data name="$this.Text" xml:space="preserve"> <data name="$this.Text" xml:space="preserve">
<value>Edit custom configuration server</value> <value>Custom configuration server</value>
</data> </data>
<data name="&gt;&gt;$this.Name" xml:space="preserve"> <data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>AddServer2Form</value> <value>AddServer2Form</value>

View File

@@ -118,17 +118,26 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="$this.Text" xml:space="preserve"> <data name="$this.Text" xml:space="preserve">
<value>编辑自定义配置服务器</value> <value>自定义配置</value>
</data>
<data name="btnBrowse.Text" xml:space="preserve">
<value>浏览(&amp;B)</value>
</data> </data>
<data name="btnClose.Text" xml:space="preserve"> <data name="btnClose.Text" xml:space="preserve">
<value>取消(&amp;C)</value> <value>取消(&amp;C)</value>
</data> </data>
<data name="btnEdit.Text" xml:space="preserve">
<value>编辑(&amp;E)</value>
</data>
<data name="btnOK.Text" xml:space="preserve"> <data name="btnOK.Text" xml:space="preserve">
<value>确定(&amp;O)</value> <value>确定(&amp;O)</value>
</data> </data>
<data name="groupBox1.Text" xml:space="preserve"> <data name="groupBox1.Text" xml:space="preserve">
<value>服务器</value> <value>服务器</value>
</data> </data>
<data name="labCoreType.Text" xml:space="preserve">
<value>Core类型</value>
</data>
<data name="label1.Text" xml:space="preserve"> <data name="label1.Text" xml:space="preserve">
<value>地址(address)</value> <value>地址(address)</value>
</data> </data>

View File

@@ -1,191 +0,0 @@
namespace v2rayN.Forms
{
partial class AddServer3Form
{
/// <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(AddServer3Form));
this.btnClose = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label13 = new System.Windows.Forms.Label();
this.cmbSecurity = new System.Windows.Forms.ComboBox();
this.txtRemarks = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.txtId = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.txtPort = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtAddress = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
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.panel2.SuspendLayout();
this.SuspendLayout();
//
// 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
//
this.groupBox1.Controls.Add(this.label13);
this.groupBox1.Controls.Add(this.cmbSecurity);
this.groupBox1.Controls.Add(this.txtRemarks);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.txtId);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.txtPort);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.txtAddress);
this.groupBox1.Controls.Add(this.label1);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
// label13
//
resources.ApplyResources(this.label13, "label13");
this.label13.Name = "label13";
//
// cmbSecurity
//
this.cmbSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbSecurity.FormattingEnabled = true;
resources.ApplyResources(this.cmbSecurity, "cmbSecurity");
this.cmbSecurity.Name = "cmbSecurity";
//
// txtRemarks
//
resources.ApplyResources(this.txtRemarks, "txtRemarks");
this.txtRemarks.Name = "txtRemarks";
//
// label6
//
resources.ApplyResources(this.label6, "label6");
this.label6.Name = "label6";
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.Name = "label5";
//
// txtId
//
resources.ApplyResources(this.txtId, "txtId");
this.txtId.Name = "txtId";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// txtPort
//
resources.ApplyResources(this.txtPort, "txtPort");
this.txtPort.Name = "txtPort";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// txtAddress
//
resources.ApplyResources(this.txtAddress, "txtAddress");
this.txtAddress.Name = "txtAddress";
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// panel2
//
this.panel2.Controls.Add(this.btnClose);
this.panel2.Controls.Add(this.btnOK);
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Name = "panel2";
//
// 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.Name = "panel1";
//
// AddServer3Form
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnClose;
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MinimizeBox = true;
this.Name = "AddServer3Form";
this.Load += new System.EventHandler(this.AddServer3Form_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.TextBox txtRemarks;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtId;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtPort;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtAddress;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox cmbSecurity;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label13;
}
}

View File

@@ -1,107 +0,0 @@
using System;
using System.Windows.Forms;
using v2rayN.Handler;
using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class AddServer3Form : BaseServerForm
{
public AddServer3Form()
{
InitializeComponent();
}
private void AddServer3Form_Load(object sender, EventArgs e)
{
cmbSecurity.Items.AddRange(config.GetShadowsocksSecuritys().ToArray());
if (vmessItem != null)
{
BindingServer();
}
else
{
vmessItem = new VmessItem();
vmessItem.groupId = groupId;
ClearServer();
}
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindingServer()
{
txtAddress.Text = vmessItem.address;
txtPort.Text = vmessItem.port.ToString();
txtId.Text = vmessItem.id;
cmbSecurity.Text = vmessItem.security;
txtRemarks.Text = vmessItem.remarks;
}
/// <summary>
/// 清除设置
/// </summary>
private void ClearServer()
{
txtAddress.Text = "";
txtPort.Text = "";
txtId.Text = "";
cmbSecurity.Text = Global.DefaultSecurity;
txtRemarks.Text = "";
}
private void btnOK_Click(object sender, EventArgs e)
{
string address = txtAddress.Text;
string port = txtPort.Text;
string id = txtId.Text;
string security = cmbSecurity.Text;
string remarks = txtRemarks.Text;
if (Utils.IsNullOrEmpty(address))
{
UI.Show(UIRes.I18N("FillServerAddress"));
return;
}
if (Utils.IsNullOrEmpty(port) || !Utils.IsNumberic(port))
{
UI.Show(UIRes.I18N("FillCorrectServerPort"));
return;
}
if (Utils.IsNullOrEmpty(id))
{
UI.Show(UIRes.I18N("FillPassword"));
return;
}
if (Utils.IsNullOrEmpty(security))
{
UI.Show(UIRes.I18N("PleaseSelectEncryption"));
return;
}
vmessItem.address = address;
vmessItem.port = Utils.ToInt(port);
vmessItem.id = id;
vmessItem.security = security;
vmessItem.remarks = remarks;
if (ConfigHandler.AddShadowsocksServer(ref config, vmessItem) == 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

@@ -1,534 +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.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
<value>396, 17</value>
</data>
<data name="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>1</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>panel2</value>
</data>
<data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label13.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="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>426, 158</value>
</data>
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 12</value>
</data>
<data name="label13.TabIndex" type="System.Int32, mscorlib">
<value>22</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>* Fill in manually</value>
</data>
<data name="&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>0</value>
</data>
<data name="cmbSecurity.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 123</value>
</data>
<data name="cmbSecurity.Size" type="System.Drawing.Size, System.Drawing">
<value>278, 20</value>
</data>
<data name="cmbSecurity.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;cmbSecurity.Name" xml:space="preserve">
<value>cmbSecurity</value>
</data>
<data name="&gt;&gt;cmbSecurity.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;cmbSecurity.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cmbSecurity.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 154</value>
</data>
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
<value>278, 21</value>
</data>
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
<value>4</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>2</value>
</data>
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 155</value>
</data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value>
</data>
<data name="label6.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<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>3</value>
</data>
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 124</value>
</data>
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label5.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Encryption</value>
</data>
<data name="&gt;&gt;label5.Name" xml:space="preserve">
<value>label5</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;label5.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label5.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="txtId.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 91</value>
</data>
<data name="txtId.Size" type="System.Drawing.Size, System.Drawing">
<value>278, 21</value>
</data>
<data name="txtId.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;txtId.Name" xml:space="preserve">
<value>txtId</value>
</data>
<data name="&gt;&gt;txtId.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtId.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtId.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 93</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>4</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Password</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>groupBox1</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="txtPort.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 59</value>
</data>
<data name="txtPort.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 21</value>
</data>
<data name="txtPort.TabIndex" type="System.Int32, mscorlib">
<value>1</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>groupBox1</value>
</data>
<data name="&gt;&gt;txtPort.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 62</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>71, 12</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Server port</value>
</data>
<data name="&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>groupBox1</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 27</value>
</data>
<data name="txtAddress.Size" type="System.Drawing.Size, System.Drawing">
<value>359, 21</value>
</data>
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
<value>0</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>9</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 31</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Server address</value>
</data>
<data name="&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>10</value>
</data>
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 10</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>547, 221</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>303, 17</value>
</data>
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
<value>0</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, 231</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>547, 60</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="&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>
<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>547, 10</value>
</data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>6</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>2</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>547, 291</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Edit or add a [Shadowsocks] server</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>AddServer3Form</value>
</data>
<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

@@ -1,178 +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>
<data name="btnClose.Text" xml:space="preserve">
<value>取消(&amp;C)</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>服务器</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>*手填,方便识别管理</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>别名(remarks)</value>
</data>
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 12</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>加密方式</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>29, 12</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>密码</value>
</data>
<data name="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="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>服务器地址</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>确定(&amp;O)</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="menuItemImportClipboard.Size" type="System.Drawing.Size, System.Drawing">
<value>171, 22</value>
</data>
<data name="menuItemImportClipboard.Text" xml:space="preserve">
<value>从剪贴板导入URL</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>编辑或添加[Shadowsocks]服务器</value>
</data>
</root>

View File

@@ -1,189 +0,0 @@
namespace v2rayN.Forms
{
partial class AddServer4Form
{
/// <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(AddServer4Form));
this.btnClose = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txtSecurity = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.txtId = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.txtRemarks = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.txtPort = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtAddress = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
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.panel2.SuspendLayout();
this.SuspendLayout();
//
// 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
//
this.groupBox1.Controls.Add(this.txtSecurity);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.txtId);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label13);
this.groupBox1.Controls.Add(this.txtRemarks);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.txtPort);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.txtAddress);
this.groupBox1.Controls.Add(this.label1);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
// txtSecurity
//
resources.ApplyResources(this.txtSecurity, "txtSecurity");
this.txtSecurity.Name = "txtSecurity";
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// txtId
//
resources.ApplyResources(this.txtId, "txtId");
this.txtId.Name = "txtId";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// label13
//
resources.ApplyResources(this.label13, "label13");
this.label13.Name = "label13";
//
// txtRemarks
//
resources.ApplyResources(this.txtRemarks, "txtRemarks");
this.txtRemarks.Name = "txtRemarks";
//
// label6
//
resources.ApplyResources(this.label6, "label6");
this.label6.Name = "label6";
//
// txtPort
//
resources.ApplyResources(this.txtPort, "txtPort");
this.txtPort.Name = "txtPort";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// txtAddress
//
resources.ApplyResources(this.txtAddress, "txtAddress");
this.txtAddress.Name = "txtAddress";
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// panel2
//
this.panel2.Controls.Add(this.btnClose);
this.panel2.Controls.Add(this.btnOK);
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Name = "panel2";
//
// 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.Name = "panel1";
//
// AddServer4Form
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnClose;
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MinimizeBox = true;
this.Name = "AddServer4Form";
this.Load += new System.EventHandler(this.AddServer4Form_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.TextBox txtRemarks;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtPort;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtAddress;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txtId;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtSecurity;
private System.Windows.Forms.Label label4;
}
}

View File

@@ -1,96 +0,0 @@
using System;
using System.Windows.Forms;
using v2rayN.Handler;
using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class AddServer4Form : BaseServerForm
{
public AddServer4Form()
{
InitializeComponent();
}
private void AddServer4Form_Load(object sender, EventArgs e)
{
if (vmessItem != null)
{
BindingServer();
}
else
{
vmessItem = new VmessItem();
vmessItem.groupId = groupId;
ClearServer();
}
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindingServer()
{
txtAddress.Text = vmessItem.address;
txtPort.Text = vmessItem.port.ToString();
txtId.Text = vmessItem.id;
txtSecurity.Text = vmessItem.security;
txtRemarks.Text = vmessItem.remarks;
}
/// <summary>
/// 清除设置
/// </summary>
private void ClearServer()
{
txtAddress.Text = "";
txtPort.Text = "";
txtId.Text = "";
txtSecurity.Text = "";
txtRemarks.Text = "";
}
private void btnOK_Click(object sender, EventArgs e)
{
string address = txtAddress.Text;
string port = txtPort.Text;
string id = txtId.Text;
string security = txtSecurity.Text;
string remarks = txtRemarks.Text;
if (Utils.IsNullOrEmpty(address))
{
UI.Show(UIRes.I18N("FillServerAddress"));
return;
}
if (Utils.IsNullOrEmpty(port) || !Utils.IsNumberic(port))
{
UI.Show(UIRes.I18N("FillCorrectServerPort"));
return;
}
vmessItem.address = address;
vmessItem.port = Utils.ToInt(port);
vmessItem.id = id;
vmessItem.security = security;
vmessItem.remarks = remarks;
if (ConfigHandler.AddSocksServer(ref config, vmessItem) == 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

@@ -1,537 +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.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
<value>396, 17</value>
</data>
<data name="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>1</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>panel2</value>
</data>
<data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="txtSecurity.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 89</value>
</data>
<data name="txtSecurity.Size" type="System.Drawing.Size, System.Drawing">
<value>278, 21</value>
</data>
<data name="txtSecurity.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;txtSecurity.Name" xml:space="preserve">
<value>txtSecurity</value>
</data>
<data name="&gt;&gt;txtSecurity.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtSecurity.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtSecurity.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="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>12, 93</value>
</data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value>
</data>
<data name="label4.TabIndex" type="System.Int32, mscorlib">
<value>25</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>User(Optional)</value>
</data>
<data name="&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>groupBox1</value>
</data>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="txtId.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 120</value>
</data>
<data name="txtId.Size" type="System.Drawing.Size, System.Drawing">
<value>278, 21</value>
</data>
<data name="txtId.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;txtId.Name" xml:space="preserve">
<value>txtId</value>
</data>
<data name="&gt;&gt;txtId.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtId.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtId.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 124</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 12</value>
</data>
<data name="label3.TabIndex" type="System.Int32, mscorlib">
<value>23</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Password(Optional)</value>
</data>
<data name="&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>groupBox1</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="label13.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label13.Location" type="System.Drawing.Point, System.Drawing">
<value>422, 155</value>
</data>
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 12</value>
</data>
<data name="label13.TabIndex" type="System.Int32, mscorlib">
<value>22</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>* Fill in manually</value>
</data>
<data name="&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>4</value>
</data>
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 151</value>
</data>
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
<value>278, 21</value>
</data>
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
<value>4</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>5</value>
</data>
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 155</value>
</data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value>
</data>
<data name="label6.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<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>6</value>
</data>
<data name="txtPort.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 58</value>
</data>
<data name="txtPort.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 21</value>
</data>
<data name="txtPort.TabIndex" type="System.Int32, mscorlib">
<value>1</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>groupBox1</value>
</data>
<data name="&gt;&gt;txtPort.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 62</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>71, 12</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Server port</value>
</data>
<data name="&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>groupBox1</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 27</value>
</data>
<data name="txtAddress.Size" type="System.Drawing.Size, System.Drawing">
<value>359, 21</value>
</data>
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
<value>0</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>9</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 31</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Server address</value>
</data>
<data name="&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>10</value>
</data>
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 10</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>547, 221</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>303, 17</value>
</data>
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
<value>0</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, 231</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>547, 60</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="&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>
<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>547, 10</value>
</data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>6</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>2</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>547, 291</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Edit or add a [Socks] server</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>AddServer4Form</value>
</data>
<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

@@ -1,178 +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>
<data name="btnClose.Text" xml:space="preserve">
<value>取消(&amp;C)</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>77, 12</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>用户名(可选)</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>密码(可选)</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>*手填,方便识别管理</value>
</data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>别名(remarks)</value>
</data>
<data name="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="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>服务器地址</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>服务器</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>确定(&amp;O)</value>
</data>
<data name="menuItemImportClipboard.Size" type="System.Drawing.Size, System.Drawing">
<value>171, 22</value>
</data>
<data name="menuItemImportClipboard.Text" xml:space="preserve">
<value>从剪贴板导入URL</value>
</data>
<data name="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>编辑或添加[Socks]服务器</value>
</data>
</root>

View File

@@ -1,246 +0,0 @@
namespace v2rayN.Forms
{
partial class AddServer5Form
{
/// <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(AddServer5Form));
this.btnClose = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.cmbFlow = new System.Windows.Forms.ComboBox();
this.label4 = new System.Windows.Forms.Label();
this.btnGUID = new System.Windows.Forms.Button();
this.label13 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.cmbSecurity = new System.Windows.Forms.ComboBox();
this.txtRemarks = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.txtId = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.txtPort = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtAddress = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
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.panel2.SuspendLayout();
this.panel3.SuspendLayout();
this.SuspendLayout();
//
// 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
//
this.groupBox1.Controls.Add(this.cmbFlow);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.btnGUID);
this.groupBox1.Controls.Add(this.label13);
this.groupBox1.Controls.Add(this.label8);
this.groupBox1.Controls.Add(this.cmbSecurity);
this.groupBox1.Controls.Add(this.txtRemarks);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.txtId);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.txtPort);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.txtAddress);
this.groupBox1.Controls.Add(this.label1);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
// cmbFlow
//
this.cmbFlow.FormattingEnabled = true;
resources.ApplyResources(this.cmbFlow, "cmbFlow");
this.cmbFlow.Name = "cmbFlow";
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// btnGUID
//
resources.ApplyResources(this.btnGUID, "btnGUID");
this.btnGUID.Name = "btnGUID";
this.btnGUID.UseVisualStyleBackColor = true;
this.btnGUID.Click += new System.EventHandler(this.btnGUID_Click);
//
// label13
//
resources.ApplyResources(this.label13, "label13");
this.label13.Name = "label13";
//
// label8
//
resources.ApplyResources(this.label8, "label8");
this.label8.Name = "label8";
//
// cmbSecurity
//
this.cmbSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.Simple;
this.cmbSecurity.FormattingEnabled = true;
this.cmbSecurity.Items.AddRange(new object[] {
resources.GetString("cmbSecurity.Items")});
resources.ApplyResources(this.cmbSecurity, "cmbSecurity");
this.cmbSecurity.Name = "cmbSecurity";
//
// txtRemarks
//
resources.ApplyResources(this.txtRemarks, "txtRemarks");
this.txtRemarks.Name = "txtRemarks";
//
// label6
//
resources.ApplyResources(this.label6, "label6");
this.label6.Name = "label6";
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.Name = "label5";
//
// txtId
//
resources.ApplyResources(this.txtId, "txtId");
this.txtId.Name = "txtId";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// txtPort
//
resources.ApplyResources(this.txtPort, "txtPort");
this.txtPort.Name = "txtPort";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// txtAddress
//
resources.ApplyResources(this.txtAddress, "txtAddress");
this.txtAddress.Name = "txtAddress";
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// panel2
//
this.panel2.Controls.Add(this.btnClose);
this.panel2.Controls.Add(this.btnOK);
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Name = "panel2";
//
// 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.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;
this.Name = "AddServer5Form";
this.Load += new System.EventHandler(this.AddServer5Form_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.TextBox txtRemarks;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtId;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtPort;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtAddress;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox cmbSecurity;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Button btnGUID;
private System.Windows.Forms.ComboBox cmbFlow;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Panel panel3;
private ServerTransportControl transportControl;
}
}

View File

@@ -1,117 +0,0 @@
using System;
using System.Windows.Forms;
using v2rayN.Handler;
using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class AddServer5Form : BaseServerForm
{
public AddServer5Form()
{
InitializeComponent();
}
private void AddServer5Form_Load(object sender, EventArgs e)
{
cmbFlow.Items.AddRange(Global.xtlsFlows.ToArray());
transportControl.AllowXtls = true;
if (vmessItem != null)
{
BindingServer();
}
else
{
vmessItem = new VmessItem();
vmessItem.groupId = groupId;
ClearServer();
}
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindingServer()
{
txtAddress.Text = vmessItem.address;
txtPort.Text = vmessItem.port.ToString();
txtId.Text = vmessItem.id;
cmbFlow.Text = vmessItem.flow;
cmbSecurity.Text = vmessItem.security;
txtRemarks.Text = vmessItem.remarks;
transportControl.BindingServer(vmessItem);
}
/// <summary>
/// 清除设置
/// </summary>
private void ClearServer()
{
txtAddress.Text = "";
txtPort.Text = "";
txtId.Text = "";
cmbFlow.Text = "";
cmbSecurity.Text = Global.None;
txtRemarks.Text = "";
transportControl.ClearServer(vmessItem);
}
private void btnOK_Click(object sender, EventArgs e)
{
string address = txtAddress.Text;
string port = txtPort.Text;
string id = txtId.Text;
string flow = cmbFlow.Text;
string security = cmbSecurity.Text;
string remarks = txtRemarks.Text;
if (Utils.IsNullOrEmpty(address))
{
UI.Show(UIRes.I18N("FillServerAddress"));
return;
}
if (Utils.IsNullOrEmpty(port) || !Utils.IsNumberic(port))
{
UI.Show(UIRes.I18N("FillCorrectServerPort"));
return;
}
if (Utils.IsNullOrEmpty(id))
{
UI.Show(UIRes.I18N("FillUUID"));
return;
}
transportControl.EndBindingServer();
vmessItem.address = address;
vmessItem.port = Utils.ToInt(port);
vmessItem.id = id;
vmessItem.flow = flow;
vmessItem.security = security;
vmessItem.remarks = remarks;
if (ConfigHandler.AddVlessServer(ref config, vmessItem) == 0)
{
this.DialogResult = DialogResult.OK;
}
else
{
UI.ShowWarning(UIRes.I18N("OperationFailed"));
}
}
private void btnGUID_Click(object sender, EventArgs e)
{
txtId.Text = Utils.GetGUID();
}
private void btnClose_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
}
}

View File

@@ -1,690 +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.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
<value>396, 17</value>
</data>
<data name="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="&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>panel2</value>
</data>
<data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="cmbFlow.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 123</value>
</data>
<data name="cmbFlow.Size" type="System.Drawing.Size, System.Drawing">
<value>211, 20</value>
</data>
<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>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<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>12, 127</value>
</data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>29, 12</value>
</data>
<data name="label4.TabIndex" type="System.Int32, mscorlib">
<value>25</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Flow</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>groupBox1</value>
</data>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="btnGUID.Location" type="System.Drawing.Point, System.Drawing">
<value>411, 91</value>
</data>
<data name="btnGUID.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="btnGUID.TabIndex" type="System.Int32, mscorlib">
<value>23</value>
</data>
<data name="btnGUID.Text" xml:space="preserve">
<value>&amp;Generate</value>
</data>
<data name="&gt;&gt;btnGUID.Name" xml:space="preserve">
<value>btnGUID</value>
</data>
<data name="&gt;&gt;btnGUID.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;btnGUID.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;btnGUID.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="label13.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label13.Location" type="System.Drawing.Point, System.Drawing">
<value>353, 189</value>
</data>
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 12</value>
</data>
<data name="label13.TabIndex" type="System.Int32, mscorlib">
<value>22</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>* Fill in manually</value>
</data>
<data name="&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>3</value>
</data>
<data name="label8.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label8.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label8.Location" type="System.Drawing.Point, System.Drawing">
<value>353, 157</value>
</data>
<data name="label8.Size" type="System.Drawing.Size, System.Drawing">
<value>119, 12</value>
</data>
<data name="label8.TabIndex" type="System.Int32, mscorlib">
<value>14</value>
</data>
<data name="label8.Text" xml:space="preserve">
<value>*Recommended (none)</value>
</data>
<data name="&gt;&gt;label8.Name" xml:space="preserve">
<value>label8</value>
</data>
<data name="&gt;&gt;label8.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;label8.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label8.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="cmbSecurity.Items" xml:space="preserve">
<value>none</value>
</data>
<data name="cmbSecurity.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 154</value>
</data>
<data name="cmbSecurity.Size" type="System.Drawing.Size, System.Drawing">
<value>211, 20</value>
</data>
<data name="cmbSecurity.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;cmbSecurity.Name" xml:space="preserve">
<value>cmbSecurity</value>
</data>
<data name="&gt;&gt;cmbSecurity.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;cmbSecurity.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cmbSecurity.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 185</value>
</data>
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
<value>211, 21</value>
</data>
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
<value>5</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>6</value>
</data>
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 189</value>
</data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value>
</data>
<data name="label6.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<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>7</value>
</data>
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 158</value>
</data>
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label5.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Encryption</value>
</data>
<data name="&gt;&gt;label5.Name" xml:space="preserve">
<value>label5</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;label5.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label5.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="txtId.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 91</value>
</data>
<data name="txtId.Size" type="System.Drawing.Size, System.Drawing">
<value>278, 21</value>
</data>
<data name="txtId.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;txtId.Name" xml:space="preserve">
<value>txtId</value>
</data>
<data name="&gt;&gt;txtId.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtId.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtId.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 95</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>4</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>UUID(id)</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>groupBox1</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="txtPort.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 59</value>
</data>
<data name="txtPort.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 21</value>
</data>
<data name="txtPort.TabIndex" type="System.Int32, mscorlib">
<value>1</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>groupBox1</value>
</data>
<data name="&gt;&gt;txtPort.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 63</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>29, 12</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Port</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>groupBox1</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>12</value>
</data>
<data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 27</value>
</data>
<data name="txtAddress.Size" type="System.Drawing.Size, System.Drawing">
<value>359, 21</value>
</data>
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
<value>0</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>13</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 31</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>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>14</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>729, 221</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>303, 17</value>
</data>
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>&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, 461</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>729, 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>2</value>
</data>
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>729, 10</value>
</data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>6</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="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>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</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>729, 521</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Edit or add a [VLESS] server</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>AddServer5Form</value>
</data>
<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

@@ -1,193 +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>
<data name="btnClose.Text" xml:space="preserve">
<value>取消(&amp;C)</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="cmbFlow.Size" type="System.Drawing.Size, System.Drawing">
<value>220, 20</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>流控(flow)</value>
</data>
<data name="btnGUID.Text" xml:space="preserve">
<value>生成(&amp;G)</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>*手填,方便识别管理</value>
</data>
<data name="label8.Location" type="System.Drawing.Point, System.Drawing">
<value>353, 158</value>
</data>
<data name="label8.Size" type="System.Drawing.Size, System.Drawing">
<value>71, 12</value>
</data>
<data name="label8.Text" xml:space="preserve">
<value>*非空(none)</value>
</data>
<data name="cmbSecurity.Size" type="System.Drawing.Size, System.Drawing">
<value>220, 20</value>
</data>
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
<value>220, 21</value>
</data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>别名(remarks)</value>
</data>
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
<value>101, 12</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>加密(encryption)</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>用户ID(id)</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>端口(port)</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>地址(address)</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>服务器</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>确定(&amp;O)</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>编辑或添加[VLESS]服务器</value>
</data>
</root>

View File

@@ -1,209 +0,0 @@
namespace v2rayN.Forms
{
partial class AddServer6Form
{
/// <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(AddServer6Form));
this.btnClose = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.cmbFlow = new System.Windows.Forms.ComboBox();
this.label4 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.txtRemarks = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.txtId = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.txtPort = new System.Windows.Forms.TextBox();
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();
//
// 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
//
this.groupBox1.Controls.Add(this.cmbFlow);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.label13);
this.groupBox1.Controls.Add(this.txtRemarks);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.txtId);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.txtPort);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.txtAddress);
this.groupBox1.Controls.Add(this.label1);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
// cmbFlow
//
this.cmbFlow.FormattingEnabled = true;
resources.ApplyResources(this.cmbFlow, "cmbFlow");
this.cmbFlow.Name = "cmbFlow";
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// label13
//
resources.ApplyResources(this.label13, "label13");
this.label13.Name = "label13";
//
// txtRemarks
//
resources.ApplyResources(this.txtRemarks, "txtRemarks");
this.txtRemarks.Name = "txtRemarks";
//
// label6
//
resources.ApplyResources(this.label6, "label6");
this.label6.Name = "label6";
//
// txtId
//
resources.ApplyResources(this.txtId, "txtId");
this.txtId.Name = "txtId";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// txtPort
//
resources.ApplyResources(this.txtPort, "txtPort");
this.txtPort.Name = "txtPort";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// txtAddress
//
resources.ApplyResources(this.txtAddress, "txtAddress");
this.txtAddress.Name = "txtAddress";
//
// label1
//
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);
this.panel2.Controls.Add(this.btnOK);
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Name = "panel2";
//
// 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.Name = "panel1";
//
// AddServer6Form
//
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;
this.MinimizeBox = true;
this.Name = "AddServer6Form";
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);
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.TextBox txtRemarks;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtId;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtPort;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtAddress;
private System.Windows.Forms.Label label1;
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;
}
}

View File

@@ -1,107 +0,0 @@
using System;
using System.Windows.Forms;
using v2rayN.Handler;
using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class AddServer6Form : BaseServerForm
{
public AddServer6Form()
{
InitializeComponent();
}
private void AddServer6Form_Load(object sender, EventArgs e)
{
cmbFlow.Items.AddRange(Global.xtlsFlows.ToArray());
transportControl.AllowXtls = true;
if (vmessItem != null)
{
BindingServer();
}
else
{
vmessItem = new VmessItem();
vmessItem.groupId = groupId;
ClearServer();
}
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindingServer()
{
txtAddress.Text = vmessItem.address;
txtPort.Text = vmessItem.port.ToString();
txtId.Text = vmessItem.id;
cmbFlow.Text = vmessItem.flow;
txtRemarks.Text = vmessItem.remarks;
transportControl.BindingServer(vmessItem);
}
/// <summary>
/// 清除设置
/// </summary>
private void ClearServer()
{
txtAddress.Text = "";
txtPort.Text = "";
txtId.Text = "";
cmbFlow.Text = "";
txtRemarks.Text = "";
transportControl.ClearServer(vmessItem);
}
private void btnOK_Click(object sender, EventArgs e)
{
string address = txtAddress.Text;
string port = txtPort.Text;
string id = txtId.Text;
string flow = cmbFlow.Text;
string remarks = txtRemarks.Text;
if (Utils.IsNullOrEmpty(address))
{
UI.Show(UIRes.I18N("FillServerAddress"));
return;
}
if (Utils.IsNullOrEmpty(port) || !Utils.IsNumberic(port))
{
UI.Show(UIRes.I18N("FillCorrectServerPort"));
return;
}
if (Utils.IsNullOrEmpty(id))
{
UI.Show(UIRes.I18N("FillPassword"));
return;
}
transportControl.EndBindingServer();
vmessItem.address = address;
vmessItem.port = Utils.ToInt(port);
vmessItem.id = id;
vmessItem.flow = flow;
vmessItem.remarks = remarks;
if (ConfigHandler.AddTrojanServer(ref config, vmessItem) == 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

@@ -1,603 +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="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>
</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="&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>panel2</value>
</data>
<data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="cmbFlow.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 123</value>
</data>
<data name="cmbFlow.Size" type="System.Drawing.Size, System.Drawing">
<value>211, 20</value>
</data>
<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>
<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>12, 127</value>
</data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>29, 12</value>
</data>
<data name="label4.TabIndex" type="System.Int32, mscorlib">
<value>27</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Flow</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>groupBox1</value>
</data>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<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, 158</value>
</data>
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 12</value>
</data>
<data name="label13.TabIndex" type="System.Int32, mscorlib">
<value>22</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>* Fill in manually</value>
</data>
<data name="&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, 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>4</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>
<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, 159</value>
</data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value>
</data>
<data name="label6.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<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="txtId.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 91</value>
</data>
<data name="txtId.Size" type="System.Drawing.Size, System.Drawing">
<value>265, 21</value>
</data>
<data name="txtId.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;txtId.Name" xml:space="preserve">
<value>txtId</value>
</data>
<data name="&gt;&gt;txtId.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtId.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtId.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, 93</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>4</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Password</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>groupBox1</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="txtPort.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 59</value>
</data>
<data name="txtPort.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 21</value>
</data>
<data name="txtPort.TabIndex" type="System.Int32, mscorlib">
<value>1</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>groupBox1</value>
</data>
<data name="&gt;&gt;txtPort.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>12, 62</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>71, 12</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Server port</value>
</data>
<data name="&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>groupBox1</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 27</value>
</data>
<data name="txtAddress.Size" type="System.Drawing.Size, System.Drawing">
<value>359, 21</value>
</data>
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
<value>0</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>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>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Server address</value>
</data>
<data name="&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>10</value>
</data>
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 10</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>707, 191</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="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>
<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, 431</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>707, 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>2</value>
</data>
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>707, 10</value>
</data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>6</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>
<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>707, 491</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Edit or add a [Trojan] server</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>AddServer6Form</value>
</data>
<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

@@ -1,166 +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>
<data name="btnClose.Text" xml:space="preserve">
<value>取消(&amp;C)</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>65, 12</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>流控(flow)</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>*手填,方便识别管理</value>
</data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>别名(remarks)</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>29, 12</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>密码</value>
</data>
<data name="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="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>服务器地址</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>服务器</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>确定(&amp;O)</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>编辑或添加[Trojan]服务器</value>
</data>
</root>

View File

@@ -31,36 +31,62 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddServerForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddServerForm));
this.btnClose = new System.Windows.Forms.Button(); this.btnClose = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnGUID = new System.Windows.Forms.Button(); this.panSocks = new System.Windows.Forms.Panel();
this.label13 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label(); this.txtSecurity4 = new System.Windows.Forms.TextBox();
this.cmbSecurity = new System.Windows.Forms.ComboBox(); this.label18 = new System.Windows.Forms.Label();
this.txtRemarks = new System.Windows.Forms.TextBox(); this.txtId4 = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label(); this.panSs = new System.Windows.Forms.Panel();
this.label5 = new System.Windows.Forms.Label(); this.txtId3 = new System.Windows.Forms.TextBox();
this.txtAlterId = new System.Windows.Forms.TextBox(); this.label15 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label(); this.cmbSecurity3 = new System.Windows.Forms.ComboBox();
this.txtId = new System.Windows.Forms.TextBox(); this.label16 = new System.Windows.Forms.Label();
this.panTrojan = new System.Windows.Forms.Panel();
this.label12 = new System.Windows.Forms.Label();
this.cmbFlow6 = new System.Windows.Forms.ComboBox();
this.txtId6 = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.panVless = new System.Windows.Forms.Panel();
this.label7 = new System.Windows.Forms.Label();
this.cmbFlow5 = new System.Windows.Forms.ComboBox();
this.txtId5 = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.btnGUID5 = new System.Windows.Forms.Button();
this.cmbSecurity5 = new System.Windows.Forms.ComboBox();
this.label11 = new System.Windows.Forms.Label();
this.panVmess = new System.Windows.Forms.Panel();
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.txtPort = new System.Windows.Forms.TextBox(); this.txtId = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label(); this.btnGUID = new System.Windows.Forms.Button();
this.txtAddress = new System.Windows.Forms.TextBox(); this.label4 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.txtAlterId = new System.Windows.Forms.TextBox();
this.cmbSecurity = new System.Windows.Forms.ComboBox();
this.label5 = new System.Windows.Forms.Label();
this.panAddr = new System.Windows.Forms.Panel();
this.label6 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel(); this.txtAddress = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtPort = new System.Windows.Forms.TextBox();
this.txtRemarks = new System.Windows.Forms.TextBox();
this.panBottom = new System.Windows.Forms.Panel();
this.btnOK = new System.Windows.Forms.Button(); this.btnOK = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel(); this.panTop = new System.Windows.Forms.Panel();
this.menuServer = new System.Windows.Forms.MenuStrip(); this.panTran = new System.Windows.Forms.Panel();
this.MenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.MenuItemImportClient = new System.Windows.Forms.ToolStripMenuItem();
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.transportControl = new v2rayN.Forms.ServerTransportControl();
this.cmbCoreType = new System.Windows.Forms.ComboBox();
this.labCoreType = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.panel2.SuspendLayout(); this.panSocks.SuspendLayout();
this.menuServer.SuspendLayout(); this.panSs.SuspendLayout();
this.panel3.SuspendLayout(); this.panTrojan.SuspendLayout();
this.panVless.SuspendLayout();
this.panVmess.SuspendLayout();
this.panAddr.SuspendLayout();
this.panBottom.SuspendLayout();
this.panTran.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// btnClose // btnClose
@@ -73,25 +99,189 @@
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.btnGUID); this.groupBox1.Controls.Add(this.panSocks);
this.groupBox1.Controls.Add(this.label13); this.groupBox1.Controls.Add(this.panSs);
this.groupBox1.Controls.Add(this.label8); this.groupBox1.Controls.Add(this.panTrojan);
this.groupBox1.Controls.Add(this.cmbSecurity); this.groupBox1.Controls.Add(this.panVless);
this.groupBox1.Controls.Add(this.txtRemarks); this.groupBox1.Controls.Add(this.panVmess);
this.groupBox1.Controls.Add(this.label6); this.groupBox1.Controls.Add(this.panAddr);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.txtAlterId);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.txtId);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.txtPort);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.txtAddress);
this.groupBox1.Controls.Add(this.label1);
resources.ApplyResources(this.groupBox1, "groupBox1"); resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
// //
// panSocks
//
this.panSocks.Controls.Add(this.label17);
this.panSocks.Controls.Add(this.txtSecurity4);
this.panSocks.Controls.Add(this.label18);
this.panSocks.Controls.Add(this.txtId4);
resources.ApplyResources(this.panSocks, "panSocks");
this.panSocks.Name = "panSocks";
//
// label17
//
resources.ApplyResources(this.label17, "label17");
this.label17.Name = "label17";
//
// txtSecurity4
//
resources.ApplyResources(this.txtSecurity4, "txtSecurity4");
this.txtSecurity4.Name = "txtSecurity4";
//
// label18
//
resources.ApplyResources(this.label18, "label18");
this.label18.Name = "label18";
//
// txtId4
//
resources.ApplyResources(this.txtId4, "txtId4");
this.txtId4.Name = "txtId4";
//
// panSs
//
this.panSs.Controls.Add(this.txtId3);
this.panSs.Controls.Add(this.label15);
this.panSs.Controls.Add(this.cmbSecurity3);
this.panSs.Controls.Add(this.label16);
resources.ApplyResources(this.panSs, "panSs");
this.panSs.Name = "panSs";
//
// txtId3
//
resources.ApplyResources(this.txtId3, "txtId3");
this.txtId3.Name = "txtId3";
//
// label15
//
resources.ApplyResources(this.label15, "label15");
this.label15.Name = "label15";
//
// cmbSecurity3
//
this.cmbSecurity3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbSecurity3.FormattingEnabled = true;
resources.ApplyResources(this.cmbSecurity3, "cmbSecurity3");
this.cmbSecurity3.Name = "cmbSecurity3";
//
// label16
//
resources.ApplyResources(this.label16, "label16");
this.label16.Name = "label16";
//
// panTrojan
//
this.panTrojan.Controls.Add(this.label12);
this.panTrojan.Controls.Add(this.cmbFlow6);
this.panTrojan.Controls.Add(this.txtId6);
this.panTrojan.Controls.Add(this.label14);
resources.ApplyResources(this.panTrojan, "panTrojan");
this.panTrojan.Name = "panTrojan";
//
// label12
//
resources.ApplyResources(this.label12, "label12");
this.label12.Name = "label12";
//
// cmbFlow6
//
this.cmbFlow6.FormattingEnabled = true;
resources.ApplyResources(this.cmbFlow6, "cmbFlow6");
this.cmbFlow6.Name = "cmbFlow6";
//
// txtId6
//
resources.ApplyResources(this.txtId6, "txtId6");
this.txtId6.Name = "txtId6";
//
// label14
//
resources.ApplyResources(this.label14, "label14");
this.label14.Name = "label14";
//
// panVless
//
this.panVless.Controls.Add(this.label7);
this.panVless.Controls.Add(this.cmbFlow5);
this.panVless.Controls.Add(this.txtId5);
this.panVless.Controls.Add(this.label9);
this.panVless.Controls.Add(this.label10);
this.panVless.Controls.Add(this.btnGUID5);
this.panVless.Controls.Add(this.cmbSecurity5);
this.panVless.Controls.Add(this.label11);
resources.ApplyResources(this.panVless, "panVless");
this.panVless.Name = "panVless";
//
// label7
//
resources.ApplyResources(this.label7, "label7");
this.label7.Name = "label7";
//
// cmbFlow5
//
this.cmbFlow5.FormattingEnabled = true;
resources.ApplyResources(this.cmbFlow5, "cmbFlow5");
this.cmbFlow5.Name = "cmbFlow5";
//
// txtId5
//
resources.ApplyResources(this.txtId5, "txtId5");
this.txtId5.Name = "txtId5";
//
// label9
//
resources.ApplyResources(this.label9, "label9");
this.label9.Name = "label9";
//
// label10
//
resources.ApplyResources(this.label10, "label10");
this.label10.Name = "label10";
//
// btnGUID5
//
resources.ApplyResources(this.btnGUID5, "btnGUID5");
this.btnGUID5.Name = "btnGUID5";
this.btnGUID5.UseVisualStyleBackColor = true;
this.btnGUID5.Click += new System.EventHandler(this.btnGUID_Click);
//
// cmbSecurity5
//
this.cmbSecurity5.DropDownStyle = System.Windows.Forms.ComboBoxStyle.Simple;
this.cmbSecurity5.FormattingEnabled = true;
this.cmbSecurity5.Items.AddRange(new object[] {
resources.GetString("cmbSecurity5.Items")});
resources.ApplyResources(this.cmbSecurity5, "cmbSecurity5");
this.cmbSecurity5.Name = "cmbSecurity5";
//
// label11
//
resources.ApplyResources(this.label11, "label11");
this.label11.Name = "label11";
//
// panVmess
//
this.panVmess.Controls.Add(this.label3);
this.panVmess.Controls.Add(this.txtId);
this.panVmess.Controls.Add(this.btnGUID);
this.panVmess.Controls.Add(this.label4);
this.panVmess.Controls.Add(this.label8);
this.panVmess.Controls.Add(this.txtAlterId);
this.panVmess.Controls.Add(this.cmbSecurity);
this.panVmess.Controls.Add(this.label5);
resources.ApplyResources(this.panVmess, "panVmess");
this.panVmess.Name = "panVmess";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// txtId
//
resources.ApplyResources(this.txtId, "txtId");
this.txtId.Name = "txtId";
//
// btnGUID // btnGUID
// //
resources.ApplyResources(this.btnGUID, "btnGUID"); resources.ApplyResources(this.btnGUID, "btnGUID");
@@ -99,16 +289,21 @@
this.btnGUID.UseVisualStyleBackColor = true; this.btnGUID.UseVisualStyleBackColor = true;
this.btnGUID.Click += new System.EventHandler(this.btnGUID_Click); this.btnGUID.Click += new System.EventHandler(this.btnGUID_Click);
// //
// label13 // label4
// //
resources.ApplyResources(this.label13, "label13"); resources.ApplyResources(this.label4, "label4");
this.label13.Name = "label13"; this.label4.Name = "label4";
// //
// label8 // label8
// //
resources.ApplyResources(this.label8, "label8"); resources.ApplyResources(this.label8, "label8");
this.label8.Name = "label8"; this.label8.Name = "label8";
// //
// txtAlterId
//
resources.ApplyResources(this.txtAlterId, "txtAlterId");
this.txtAlterId.Name = "txtAlterId";
//
// cmbSecurity // cmbSecurity
// //
this.cmbSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@@ -116,67 +311,60 @@
resources.ApplyResources(this.cmbSecurity, "cmbSecurity"); resources.ApplyResources(this.cmbSecurity, "cmbSecurity");
this.cmbSecurity.Name = "cmbSecurity"; this.cmbSecurity.Name = "cmbSecurity";
// //
// txtRemarks // label5
// //
resources.ApplyResources(this.txtRemarks, "txtRemarks"); resources.ApplyResources(this.label5, "label5");
this.txtRemarks.Name = "txtRemarks"; this.label5.Name = "label5";
//
// panAddr
//
this.panAddr.Controls.Add(this.cmbCoreType);
this.panAddr.Controls.Add(this.labCoreType);
this.panAddr.Controls.Add(this.label6);
this.panAddr.Controls.Add(this.label1);
this.panAddr.Controls.Add(this.txtAddress);
this.panAddr.Controls.Add(this.label2);
this.panAddr.Controls.Add(this.txtPort);
this.panAddr.Controls.Add(this.txtRemarks);
resources.ApplyResources(this.panAddr, "panAddr");
this.panAddr.Name = "panAddr";
// //
// label6 // label6
// //
resources.ApplyResources(this.label6, "label6"); resources.ApplyResources(this.label6, "label6");
this.label6.Name = "label6"; this.label6.Name = "label6";
// //
// label5 // label1
// //
resources.ApplyResources(this.label5, "label5"); resources.ApplyResources(this.label1, "label1");
this.label5.Name = "label5"; this.label1.Name = "label1";
//
// txtAlterId
//
resources.ApplyResources(this.txtAlterId, "txtAlterId");
this.txtAlterId.Name = "txtAlterId";
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// txtId
//
resources.ApplyResources(this.txtId, "txtId");
this.txtId.Name = "txtId";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// txtPort
//
resources.ApplyResources(this.txtPort, "txtPort");
this.txtPort.Name = "txtPort";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
// //
// txtAddress // txtAddress
// //
resources.ApplyResources(this.txtAddress, "txtAddress"); resources.ApplyResources(this.txtAddress, "txtAddress");
this.txtAddress.Name = "txtAddress"; this.txtAddress.Name = "txtAddress";
// //
// label1 // label2
// //
resources.ApplyResources(this.label1, "label1"); resources.ApplyResources(this.label2, "label2");
this.label1.Name = "label1"; this.label2.Name = "label2";
// //
// panel2 // txtPort
// //
this.panel2.Controls.Add(this.btnClose); resources.ApplyResources(this.txtPort, "txtPort");
this.panel2.Controls.Add(this.btnOK); this.txtPort.Name = "txtPort";
resources.ApplyResources(this.panel2, "panel2"); //
this.panel2.Name = "panel2"; // txtRemarks
//
resources.ApplyResources(this.txtRemarks, "txtRemarks");
this.txtRemarks.Name = "txtRemarks";
//
// panBottom
//
this.panBottom.Controls.Add(this.btnClose);
this.panBottom.Controls.Add(this.btnOK);
resources.ApplyResources(this.panBottom, "panBottom");
this.panBottom.Name = "panBottom";
// //
// btnOK // btnOK
// //
@@ -185,56 +373,16 @@
this.btnOK.UseVisualStyleBackColor = true; this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click); this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
// //
// panel1 // panTop
// //
resources.ApplyResources(this.panel1, "panel1"); resources.ApplyResources(this.panTop, "panTop");
this.panel1.Name = "panel1"; this.panTop.Name = "panTop";
// //
// menuServer // panTran
// //
this.menuServer.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.panTran.Controls.Add(this.transportControl);
this.MenuItem1}); resources.ApplyResources(this.panTran, "panTran");
resources.ApplyResources(this.menuServer, "menuServer"); this.panTran.Name = "panTran";
this.menuServer.Name = "menuServer";
//
// MenuItem1
//
this.MenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.MenuItemImportClient,
this.MenuItemImportServer,
this.toolStripSeparator1,
this.MenuItemImportClipboard});
this.MenuItem1.Name = "MenuItem1";
resources.ApplyResources(this.MenuItem1, "MenuItem1");
//
// MenuItemImportClient
//
this.MenuItemImportClient.Name = "MenuItemImportClient";
resources.ApplyResources(this.MenuItemImportClient, "MenuItemImportClient");
this.MenuItemImportClient.Click += new System.EventHandler(this.MenuItemImportClient_Click);
//
// MenuItemImportServer
//
this.MenuItemImportServer.Name = "MenuItemImportServer";
resources.ApplyResources(this.MenuItemImportServer, "MenuItemImportServer");
this.MenuItemImportServer.Click += new System.EventHandler(this.MenuItemImportServer_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
//
// MenuItemImportClipboard
//
this.MenuItemImportClipboard.Name = "MenuItemImportClipboard";
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 // transportControl
// //
@@ -242,27 +390,46 @@
resources.ApplyResources(this.transportControl, "transportControl"); resources.ApplyResources(this.transportControl, "transportControl");
this.transportControl.Name = "transportControl"; this.transportControl.Name = "transportControl";
// //
// cmbCoreType
//
this.cmbCoreType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCoreType.FormattingEnabled = true;
resources.ApplyResources(this.cmbCoreType, "cmbCoreType");
this.cmbCoreType.Name = "cmbCoreType";
//
// labCoreType
//
resources.ApplyResources(this.labCoreType, "labCoreType");
this.labCoreType.Name = "labCoreType";
//
// AddServerForm // AddServerForm
// //
resources.ApplyResources(this, "$this"); resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnClose; this.CancelButton = this.btnClose;
this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox1);
this.Controls.Add(this.panel3); this.Controls.Add(this.panTran);
this.Controls.Add(this.panel2); this.Controls.Add(this.panBottom);
this.Controls.Add(this.panel1); this.Controls.Add(this.panTop);
this.Controls.Add(this.menuServer);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "AddServerForm"; this.Name = "AddServerForm";
this.Load += new System.EventHandler(this.AddServerForm_Load); this.Load += new System.EventHandler(this.AddServerForm_Load);
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout(); this.panSocks.ResumeLayout(false);
this.panel2.ResumeLayout(false); this.panSocks.PerformLayout();
this.menuServer.ResumeLayout(false); this.panSs.ResumeLayout(false);
this.menuServer.PerformLayout(); this.panSs.PerformLayout();
this.panel3.ResumeLayout(false); this.panTrojan.ResumeLayout(false);
this.panTrojan.PerformLayout();
this.panVless.ResumeLayout(false);
this.panVless.PerformLayout();
this.panVmess.ResumeLayout(false);
this.panVmess.PerformLayout();
this.panAddr.ResumeLayout(false);
this.panAddr.PerformLayout();
this.panBottom.ResumeLayout(false);
this.panTran.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout();
} }
@@ -284,17 +451,38 @@
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox cmbSecurity; private System.Windows.Forms.ComboBox cmbSecurity;
private System.Windows.Forms.Label label8; private System.Windows.Forms.Label label8;
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panTop;
private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Panel panBottom;
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.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem MenuItemImportClipboard;
private System.Windows.Forms.Button btnGUID; private System.Windows.Forms.Button btnGUID;
private System.Windows.Forms.Panel panel3; private System.Windows.Forms.Panel panTran;
private ServerTransportControl transportControl; private ServerTransportControl transportControl;
private System.Windows.Forms.Panel panAddr;
private System.Windows.Forms.Panel panVmess;
private System.Windows.Forms.Panel panVless;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.ComboBox cmbFlow5;
private System.Windows.Forms.TextBox txtId5;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Button btnGUID5;
private System.Windows.Forms.ComboBox cmbSecurity5;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Panel panTrojan;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.ComboBox cmbFlow6;
private System.Windows.Forms.TextBox txtId6;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Panel panSs;
private System.Windows.Forms.TextBox txtId3;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.ComboBox cmbSecurity3;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Panel panSocks;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.TextBox txtSecurity4;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.TextBox txtId4;
private System.Windows.Forms.ComboBox cmbCoreType;
private System.Windows.Forms.Label labCoreType;
} }
} }

View File

@@ -1,4 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.Windows.Forms; using System.Windows.Forms;
using v2rayN.Handler; using v2rayN.Handler;
using v2rayN.Mode; using v2rayN.Mode;
@@ -7,7 +8,6 @@ namespace v2rayN.Forms
{ {
public partial class AddServerForm : BaseServerForm public partial class AddServerForm : BaseServerForm
{ {
public AddServerForm() public AddServerForm()
{ {
InitializeComponent(); InitializeComponent();
@@ -15,8 +15,48 @@ namespace v2rayN.Forms
private void AddServerForm_Load(object sender, EventArgs e) private void AddServerForm_Load(object sender, EventArgs e)
{ {
this.Text = (eConfigType).ToString();
cmbCoreType.Items.AddRange(Global.coreTypes.ToArray());
cmbCoreType.Items.Add(string.Empty);
switch (eConfigType)
{
case EConfigType.Vmess:
panVmess.Dock = DockStyle.Fill;
panVmess.Visible = true;
cmbSecurity.Items.AddRange(Global.vmessSecuritys.ToArray()); cmbSecurity.Items.AddRange(Global.vmessSecuritys.ToArray());
//FillCoreType(cmbCoreType); break;
case EConfigType.Shadowsocks:
panSs.Dock = DockStyle.Fill;
panSs.Visible = true;
panTran.Visible = false;
this.Height = this.Height - panTran.Height;
cmbSecurity3.Items.AddRange(LazyConfig.Instance.GetShadowsocksSecuritys().ToArray());
break;
case EConfigType.Socks:
panSocks.Dock = DockStyle.Fill;
panSocks.Visible = true;
panTran.Visible = false;
this.Height = this.Height - panTran.Height;
break;
case EConfigType.VLESS:
panVless.Dock = DockStyle.Fill;
panVless.Visible = true;
transportControl.AllowXtls = true;
cmbFlow5.Items.AddRange(Global.xtlsFlows.ToArray());
break;
case EConfigType.Trojan:
panTrojan.Dock = DockStyle.Fill;
panTrojan.Visible = true;
transportControl.AllowXtls = true;
cmbFlow6.Items.AddRange(Global.xtlsFlows.ToArray());
break;
}
if (vmessItem != null) if (vmessItem != null)
{ {
@@ -35,41 +75,122 @@ namespace v2rayN.Forms
/// </summary> /// </summary>
private void BindingServer() private void BindingServer()
{ {
txtRemarks.Text = vmessItem.remarks;
txtAddress.Text = vmessItem.address; txtAddress.Text = vmessItem.address;
txtPort.Text = vmessItem.port.ToString(); txtPort.Text = vmessItem.port.ToString();
switch (eConfigType)
{
case EConfigType.Vmess:
txtId.Text = vmessItem.id; txtId.Text = vmessItem.id;
txtAlterId.Text = vmessItem.alterId.ToString(); txtAlterId.Text = vmessItem.alterId.ToString();
cmbSecurity.Text = vmessItem.security; cmbSecurity.Text = vmessItem.security;
txtRemarks.Text = vmessItem.remarks; break;
// BindingCoreType(cmbCoreType, vmessItem); case EConfigType.Shadowsocks:
txtId3.Text = vmessItem.id;
cmbSecurity3.Text = vmessItem.security;
break;
case EConfigType.Socks:
txtId4.Text = vmessItem.id;
txtSecurity4.Text = vmessItem.security;
break;
case EConfigType.VLESS:
txtId5.Text = vmessItem.id;
cmbFlow5.Text = vmessItem.flow;
cmbSecurity5.Text = vmessItem.security;
break;
case EConfigType.Trojan:
txtId6.Text = vmessItem.id;
cmbFlow6.Text = vmessItem.flow;
break;
}
if (vmessItem.coreType == null)
{
cmbCoreType.Text = string.Empty;
}
else
{
cmbCoreType.Text = vmessItem.coreType.ToString();
}
transportControl.BindingServer(vmessItem); transportControl.BindingServer(vmessItem);
} }
/// <summary> /// <summary>
/// 清除设置 /// 清除设置
/// </summary> /// </summary>
private void ClearServer() private void ClearServer()
{ {
txtRemarks.Text = "";
txtAddress.Text = ""; txtAddress.Text = "";
txtPort.Text = ""; txtPort.Text = "";
switch (eConfigType)
{
case EConfigType.Vmess:
txtId.Text = ""; txtId.Text = "";
txtAlterId.Text = "0"; txtAlterId.Text = "0";
cmbSecurity.Text = Global.DefaultSecurity; cmbSecurity.Text = Global.DefaultSecurity;
txtRemarks.Text = ""; break;
case EConfigType.Shadowsocks:
txtId3.Text = "";
cmbSecurity3.Text = Global.DefaultSecurity;
break;
case EConfigType.Socks:
txtId4.Text = "";
txtSecurity4.Text = "";
break;
case EConfigType.VLESS:
txtId5.Text = "";
cmbFlow5.Text = "";
cmbSecurity5.Text = Global.None;
break;
case EConfigType.Trojan:
txtId6.Text = "";
cmbFlow6.Text = "";
break;
}
transportControl.ClearServer(vmessItem); transportControl.ClearServer(vmessItem);
} }
private void btnOK_Click(object sender, EventArgs e) private void btnOK_Click(object sender, EventArgs e)
{ {
string remarks = txtRemarks.Text;
string address = txtAddress.Text; string address = txtAddress.Text;
string port = txtPort.Text; string port = txtPort.Text;
string id = txtId.Text;
string alterId = txtAlterId.Text; string id = string.Empty;
string security = cmbSecurity.Text; string alterId = string.Empty;
string remarks = txtRemarks.Text; string security = string.Empty;
string flow = string.Empty;
switch (eConfigType)
{
case EConfigType.Vmess:
id = txtId.Text;
alterId = txtAlterId.Text;
security = cmbSecurity.Text;
break;
case EConfigType.Shadowsocks:
id = txtId3.Text;
security = cmbSecurity3.Text;
break;
case EConfigType.Socks:
id = txtId4.Text;
security = txtSecurity4.Text;
break;
case EConfigType.VLESS:
id = txtId5.Text;
flow = cmbFlow5.Text;
security = cmbSecurity5.Text;
break;
case EConfigType.Trojan:
id = txtId6.Text;
flow = cmbFlow6.Text;
break;
}
if (Utils.IsNullOrEmpty(address)) if (Utils.IsNullOrEmpty(address))
{ {
@@ -81,23 +202,69 @@ namespace v2rayN.Forms
UI.Show(UIRes.I18N("FillCorrectServerPort")); UI.Show(UIRes.I18N("FillCorrectServerPort"));
return; return;
} }
if (eConfigType == EConfigType.Shadowsocks)
{
if (Utils.IsNullOrEmpty(id))
{
UI.Show(UIRes.I18N("FillPassword"));
return;
}
if (Utils.IsNullOrEmpty(security))
{
UI.Show(UIRes.I18N("PleaseSelectEncryption"));
return;
}
}
if (eConfigType != EConfigType.Socks)
{
if (Utils.IsNullOrEmpty(id)) if (Utils.IsNullOrEmpty(id))
{ {
UI.Show(UIRes.I18N("FillUUID")); UI.Show(UIRes.I18N("FillUUID"));
return; return;
} }
}
transportControl.EndBindingServer(); transportControl.EndBindingServer();
vmessItem.remarks = remarks;
vmessItem.address = address; vmessItem.address = address;
vmessItem.port = Utils.ToInt(port); vmessItem.port = Utils.ToInt(port);
vmessItem.id = id; vmessItem.id = id;
vmessItem.alterId = Utils.ToInt(alterId); vmessItem.alterId = Utils.ToInt(alterId);
vmessItem.security = security; vmessItem.security = security;
vmessItem.remarks = remarks;
//vmessItem.coreType = GetCoreType(cmbCoreType);
if (ConfigHandler.AddServer(ref config, vmessItem) == 0) if (Utils.IsNullOrEmpty(cmbCoreType.Text))
{
vmessItem.coreType = null;
}
else
{
vmessItem.coreType = (ECoreType)Enum.Parse(typeof(ECoreType), cmbCoreType.Text);
}
int ret = -1;
switch (eConfigType)
{
case EConfigType.Vmess:
ret = ConfigHandler.AddServer(ref config, vmessItem);
break;
case EConfigType.Shadowsocks:
ret = ConfigHandler.AddShadowsocksServer(ref config, vmessItem);
break;
case EConfigType.Socks:
ret = ConfigHandler.AddSocksServer(ref config, vmessItem);
break;
case EConfigType.VLESS:
vmessItem.flow = flow;
ret = ConfigHandler.AddVlessServer(ref config, vmessItem);
break;
case EConfigType.Trojan:
vmessItem.flow = flow;
ret = ConfigHandler.AddTrojanServer(ref config, vmessItem);
break;
}
if (ret == 0)
{ {
this.DialogResult = DialogResult.OK; this.DialogResult = DialogResult.OK;
} }
@@ -105,110 +272,18 @@ namespace v2rayN.Forms
{ {
UI.ShowWarning(UIRes.I18N("OperationFailed")); UI.ShowWarning(UIRes.I18N("OperationFailed"));
} }
} }
private void btnGUID_Click(object sender, EventArgs e) private void btnGUID_Click(object sender, EventArgs e)
{ {
txtId.Text = Utils.GetGUID(); txtId.Text =
txtId5.Text = Utils.GetGUID();
} }
private void btnClose_Click(object sender, EventArgs e) private void btnClose_Click(object sender, EventArgs e)
{ {
this.DialogResult = DialogResult.Cancel; this.DialogResult = DialogResult.Cancel;
} }
#region /
/// <summary>
/// 导入客户端
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void MenuItemImportClient_Click(object sender, EventArgs e)
{
MenuItemImport(1);
}
/// <summary>
/// 导入服务端
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void MenuItemImportServer_Click(object sender, EventArgs e)
{
MenuItemImport(2);
}
private void MenuItemImport(int type)
{
ClearServer();
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;
}
string msg;
VmessItem vmessItemTemp;
if (type.Equals(1))
{
vmessItemTemp = V2rayConfigHandler.ImportFromClientConfig(fileName, out msg);
}
else
{
vmessItemTemp = V2rayConfigHandler.ImportFromServerConfig(fileName, out 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;
transportControl.BindingServer(vmessItem);
}
/// <summary>
/// 从剪贴板导入URL
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void MenuItemImportClipboard_Click(object sender, EventArgs e)
{
ClearServer();
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;
transportControl.BindingServer(vmessItem);
}
#endregion
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -120,93 +120,109 @@
<data name="btnClose.Text" xml:space="preserve"> <data name="btnClose.Text" xml:space="preserve">
<value>取消(&amp;C)</value> <value>取消(&amp;C)</value>
</data> </data>
<data name="groupBox1.Text" xml:space="preserve">
<value>服务器</value>
</data>
<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>None</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>270, 156</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>115, 61</value>
</data>
<data name="label17.Size" type="System.Drawing.Size, System.Drawing">
<value>77, 12</value>
</data>
<data name="label17.Text" xml:space="preserve">
<value>用户名(可选)</value>
</data>
<data name="label18.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label18.Text" xml:space="preserve">
<value>密码(可选)</value>
</data>
<data name="panel3.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>None</value>
</data>
<data name="panel3.Location" type="System.Drawing.Point, System.Drawing">
<value>142, 147</value>
</data>
<data name="panel3.Size" type="System.Drawing.Size, System.Drawing">
<value>137, 78</value>
</data>
<data name="label15.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>密码(password)</value>
</data>
<data name="label16.Size" type="System.Drawing.Size, System.Drawing">
<value>125, 12</value>
</data>
<data name="label16.Text" xml:space="preserve">
<value>加密方式(encryption)</value>
</data>
<data name="label12.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value>
</data>
<data name="label12.Text" xml:space="preserve">
<value>密码(password)</value>
</data>
<data name="label14.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label14.Text" xml:space="preserve">
<value>流控(flow)</value>
</data>
<data name="panVless.Size" type="System.Drawing.Size, System.Drawing">
<value>110, 52</value>
</data>
<data name="label7.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>用户ID(id)</value>
</data>
<data name="label9.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>流控(flow)</value>
</data>
<data name="label10.Size" type="System.Drawing.Size, System.Drawing">
<value>101, 12</value>
</data>
<data name="label10.Text" xml:space="preserve">
<value>加密(encryption)</value>
</data>
<data name="button1.Text" xml:space="preserve">
<value>生成</value>
</data>
<data name="label11.Size" type="System.Drawing.Size, System.Drawing">
<value>71, 12</value>
</data>
<data name="label11.Text" xml:space="preserve">
<value>*非空(none)</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>用户ID(id)</value>
</data>
<data name="btnGUID.Text" xml:space="preserve"> <data name="btnGUID.Text" xml:space="preserve">
<value>生成(&amp;G)</value> <value>生成(&amp;G)</value>
</data> </data>
<data name="label13.Text" xml:space="preserve"> <data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>*手填,方便识别管理</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label24.Size" type="System.Drawing.Size, System.Drawing">
<value>149, 12</value>
</data>
<data name="label23.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value> <value>95, 12</value>
</data> </data>
<data name="label21.Size" type="System.Drawing.Size, System.Drawing"> <data name="label4.Text" xml:space="preserve">
<value>167, 12</value> <value>额外ID(alterId)</value>
</data>
<data name="cmbAllowInsecure.Location" type="System.Drawing.Point, System.Drawing">
<value>180, 7</value>
</data>
<data name="label9.Location" type="System.Drawing.Point, System.Drawing">
<value>350, 36</value>
</data>
<data name="label9.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 12</value>
</data>
<data name="label20.Size" type="System.Drawing.Size, System.Drawing">
<value>149, 12</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>211, 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="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="label14.Size" type="System.Drawing.Size, System.Drawing">
<value>161, 12</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="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="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="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="cmbHeaderType.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 67</value>
</data> </data>
<data name="label8.Size" type="System.Drawing.Size, System.Drawing"> <data name="label8.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 12</value> <value>113, 12</value>
@@ -215,40 +231,22 @@
<value>*随便选,建议(auto)</value> <value>*随便选,建议(auto)</value>
</data> </data>
<data name="cmbSecurity.Location" type="System.Drawing.Point, System.Drawing"> <data name="cmbSecurity.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 143</value> <value>126, 65</value>
</data> </data>
<data name="cmbSecurity.Size" type="System.Drawing.Size, System.Drawing"> <data name="cmbSecurity.Size" type="System.Drawing.Size, System.Drawing">
<value>211, 20</value> <value>211, 20</value>
</data> </data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>别名(remarks)</value>
</data>
<data name="label5.Size" type="System.Drawing.Size, System.Drawing"> <data name="label5.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 12</value> <value>113, 12</value>
</data> </data>
<data name="label5.Text" xml:space="preserve"> <data name="label5.Text" xml:space="preserve">
<value>加密方式(security)</value> <value>加密方式(security)</value>
</data> </data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing"> <data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value> <value>83, 12</value>
</data> </data>
<data name="label4.Text" xml:space="preserve"> <data name="label6.Text" xml:space="preserve">
<value>额外ID(alterId)</value> <value>别名(remarks)</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>用户ID(id)</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>端口(port)</value>
</data> </data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing"> <data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value> <value>83, 12</value>
@@ -256,40 +254,22 @@
<data name="label1.Text" xml:space="preserve"> <data name="label1.Text" xml:space="preserve">
<value>地址(address)</value> <value>地址(address)</value>
</data> </data>
<data name="groupBox1.Text" xml:space="preserve"> <data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>服务器</value> <value>65, 12</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>端口(port)</value>
</data> </data>
<data name="btnOK.Text" xml:space="preserve"> <data name="btnOK.Text" xml:space="preserve">
<value>确定(&amp;O)</value> <value>确定(&amp;O)</value>
</data> </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>
<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"> <data name="$this.Text" xml:space="preserve">
<value>编辑或添加[VMess]服务器</value> <value>编辑或添加[VMess]服务器</value>
</data> </data>
<data name="btnGUID5.Text" xml:space="preserve">
<value>生成</value>
</data>
<data name="labCoreType.Text" xml:space="preserve">
<value>Core类型</value>
</data>
</root> </root>

View File

@@ -8,6 +8,7 @@ namespace v2rayN.Forms
{ {
public VmessItem vmessItem = null; public VmessItem vmessItem = null;
public string groupId; public string groupId;
public EConfigType eConfigType;
public BaseServerForm() public BaseServerForm()
{ {

View File

@@ -284,7 +284,7 @@ namespace v2rayN.Forms
} }
} }
ListViewItem lvItem = new ListViewItem(def); ListViewItem lvItem = new ListViewItem(def);
Utils.AddSubItem(lvItem, EServerColName.configType.ToString(), ((EConfigType)item.configType).ToString()); Utils.AddSubItem(lvItem, EServerColName.configType.ToString(), (item.configType).ToString());
Utils.AddSubItem(lvItem, EServerColName.remarks.ToString(), item.remarks); Utils.AddSubItem(lvItem, EServerColName.remarks.ToString(), item.remarks);
Utils.AddSubItem(lvItem, EServerColName.address.ToString(), item.address); Utils.AddSubItem(lvItem, EServerColName.address.ToString(), item.address);
Utils.AddSubItem(lvItem, EServerColName.port.ToString(), item.port.ToString()); Utils.AddSubItem(lvItem, EServerColName.port.ToString(), item.port.ToString());
@@ -576,32 +576,20 @@ namespace v2rayN.Forms
} }
ShowServerForm(lstVmess[index].configType, index); ShowServerForm(lstVmess[index].configType, index);
} }
private void ShowServerForm(int configType, int index) private void ShowServerForm(EConfigType configType, int index)
{ {
BaseServerForm fm; BaseServerForm fm;
switch (configType) if (configType == EConfigType.Custom)
{ {
case (int)EConfigType.Vmess:
fm = new AddServerForm();
break;
case (int)EConfigType.Shadowsocks:
fm = new AddServer3Form();
break;
case (int)EConfigType.Socks:
fm = new AddServer4Form();
break;
case (int)EConfigType.VLESS:
fm = new AddServer5Form();
break;
case (int)EConfigType.Trojan:
fm = new AddServer6Form();
break;
default:
fm = new AddServer2Form(); fm = new AddServer2Form();
break; }
else
{
fm = new AddServerForm();
} }
fm.vmessItem = index >= 0 ? lstVmess[index] : null; fm.vmessItem = index >= 0 ? lstVmess[index] : null;
fm.groupId = groupId; fm.groupId = groupId;
fm.eConfigType = configType;
if (fm.ShowDialog() == DialogResult.OK) if (fm.ShowDialog() == DialogResult.OK)
{ {
RefreshServers(); RefreshServers();
@@ -670,12 +658,12 @@ namespace v2rayN.Forms
private void menuAddVmessServer_Click(object sender, EventArgs e) private void menuAddVmessServer_Click(object sender, EventArgs e)
{ {
ShowServerForm((int)EConfigType.Vmess, -1); ShowServerForm(EConfigType.Vmess, -1);
} }
private void menuAddVlessServer_Click(object sender, EventArgs e) private void menuAddVlessServer_Click(object sender, EventArgs e)
{ {
ShowServerForm((int)EConfigType.VLESS, -1); ShowServerForm(EConfigType.VLESS, -1);
} }
private void menuRemoveServer_Click(object sender, EventArgs e) private void menuRemoveServer_Click(object sender, EventArgs e)
@@ -700,8 +688,7 @@ namespace v2rayN.Forms
private void menuRemoveDuplicateServer_Click(object sender, EventArgs e) private void menuRemoveDuplicateServer_Click(object sender, EventArgs e)
{ {
int oldCount = lstVmess.Count; int oldCount = lstVmess.Count;
ConfigHandler.DedupServerList(ref config, ref lstVmess); int newCount = ConfigHandler.DedupServerList(ref config, ref lstVmess);
int newCount = lstVmess.Count;
RefreshServers(); RefreshServers();
_ = LoadV2ray(); _ = LoadV2ray();
UI.Show(string.Format(UIRes.I18N("RemoveDuplicateServerResult"), oldCount, newCount)); UI.Show(string.Format(UIRes.I18N("RemoveDuplicateServerResult"), oldCount, newCount));
@@ -714,7 +701,7 @@ namespace v2rayN.Forms
{ {
return; return;
} }
if (ConfigHandler.CopyServer(ref config, lstVmess[index]) == 0) if (ConfigHandler.CopyServer(ref config, lstSelecteds) == 0)
{ {
RefreshServers(); RefreshServers();
} }
@@ -952,31 +939,31 @@ namespace v2rayN.Forms
private void menuAddCustomServer_Click(object sender, EventArgs e) private void menuAddCustomServer_Click(object sender, EventArgs e)
{ {
ShowServerForm((int)EConfigType.Custom, -1); ShowServerForm(EConfigType.Custom, -1);
} }
private void menuAddShadowsocksServer_Click(object sender, EventArgs e) private void menuAddShadowsocksServer_Click(object sender, EventArgs e)
{ {
ShowServerForm((int)EConfigType.Shadowsocks, -1); ShowServerForm(EConfigType.Shadowsocks, -1);
ShowForm(); ShowForm();
} }
private void menuAddSocksServer_Click(object sender, EventArgs e) private void menuAddSocksServer_Click(object sender, EventArgs e)
{ {
ShowServerForm((int)EConfigType.Socks, -1); ShowServerForm(EConfigType.Socks, -1);
ShowForm(); ShowForm();
} }
private void menuAddTrojanServer_Click(object sender, EventArgs e) private void menuAddTrojanServer_Click(object sender, EventArgs e)
{ {
ShowServerForm((int)EConfigType.Trojan, -1); ShowServerForm(EConfigType.Trojan, -1);
ShowForm(); ShowForm();
} }
private void menuAddServers_Click(object sender, EventArgs e) private void menuAddServers_Click(object sender, EventArgs e)
{ {
string clipboardData = Utils.GetClipboardData(); string clipboardData = Utils.GetClipboardData();
int ret = MainFormHandler.Instance.AddBatchServers(config, clipboardData, "", groupId); int ret = ConfigHandler.AddBatchServers(ref config, clipboardData, "", groupId);
if (ret > 0) if (ret > 0)
{ {
RefreshServers(); RefreshServers();
@@ -1006,7 +993,7 @@ namespace v2rayN.Forms
} }
else else
{ {
int ret = MainFormHandler.Instance.AddBatchServers(config, result, "", groupId); int ret = ConfigHandler.AddBatchServers(ref config, result, "", groupId);
if (ret > 0) if (ret > 0)
{ {
RefreshServers(); RefreshServers();

View File

@@ -75,14 +75,25 @@
this.txtautoUpdateInterval = new System.Windows.Forms.TextBox(); this.txtautoUpdateInterval = new System.Windows.Forms.TextBox();
this.label15 = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label();
this.chkIgnoreGeoUpdateCore = new System.Windows.Forms.CheckBox(); this.chkIgnoreGeoUpdateCore = new System.Windows.Forms.CheckBox();
this.cmbCoreType = new System.Windows.Forms.ComboBox();
this.label4 = new System.Windows.Forms.Label();
this.chkKeepOlderDedupl = new System.Windows.Forms.CheckBox(); this.chkKeepOlderDedupl = new System.Windows.Forms.CheckBox();
this.cbFreshrate = new System.Windows.Forms.ComboBox(); this.cbFreshrate = new System.Windows.Forms.ComboBox();
this.lbFreshrate = new System.Windows.Forms.Label(); this.lbFreshrate = new System.Windows.Forms.Label();
this.chkEnableStatistics = new System.Windows.Forms.CheckBox(); this.chkEnableStatistics = new System.Windows.Forms.CheckBox();
this.chkAllowLANConn = new System.Windows.Forms.CheckBox(); this.chkAllowLANConn = new System.Windows.Forms.CheckBox();
this.chkAutoRun = new System.Windows.Forms.CheckBox(); this.chkAutoRun = new System.Windows.Forms.CheckBox();
this.tabPageCoreType = new System.Windows.Forms.TabPage();
this.cmbCoreType6 = new System.Windows.Forms.ComboBox();
this.labCoreType6 = new System.Windows.Forms.Label();
this.cmbCoreType5 = new System.Windows.Forms.ComboBox();
this.labCoreType5 = new System.Windows.Forms.Label();
this.cmbCoreType4 = new System.Windows.Forms.ComboBox();
this.labCoreType4 = new System.Windows.Forms.Label();
this.cmbCoreType3 = new System.Windows.Forms.ComboBox();
this.labCoreType3 = new System.Windows.Forms.Label();
this.cmbCoreType2 = new System.Windows.Forms.ComboBox();
this.labCoreType2 = new System.Windows.Forms.Label();
this.cmbCoreType1 = new System.Windows.Forms.ComboBox();
this.labCoreType1 = new System.Windows.Forms.Label();
this.tabPage3 = new System.Windows.Forms.TabPage(); this.tabPage3 = new System.Windows.Forms.TabPage();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label13 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label();
@@ -97,6 +108,7 @@
this.tabPage2.SuspendLayout(); this.tabPage2.SuspendLayout();
this.tabPage6.SuspendLayout(); this.tabPage6.SuspendLayout();
this.tabPage7.SuspendLayout(); this.tabPage7.SuspendLayout();
this.tabPageCoreType.SuspendLayout();
this.tabPage3.SuspendLayout(); this.tabPage3.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
@@ -116,6 +128,7 @@
this.tabControl1.Controls.Add(this.tabPage2); this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage6); this.tabControl1.Controls.Add(this.tabPage6);
this.tabControl1.Controls.Add(this.tabPage7); this.tabControl1.Controls.Add(this.tabPage7);
this.tabControl1.Controls.Add(this.tabPageCoreType);
this.tabControl1.Controls.Add(this.tabPage3); this.tabControl1.Controls.Add(this.tabPage3);
resources.ApplyResources(this.tabControl1, "tabControl1"); resources.ApplyResources(this.tabControl1, "tabControl1");
this.tabControl1.Name = "tabControl1"; this.tabControl1.Name = "tabControl1";
@@ -382,8 +395,6 @@
this.tabPage7.Controls.Add(this.txtautoUpdateInterval); this.tabPage7.Controls.Add(this.txtautoUpdateInterval);
this.tabPage7.Controls.Add(this.label15); this.tabPage7.Controls.Add(this.label15);
this.tabPage7.Controls.Add(this.chkIgnoreGeoUpdateCore); this.tabPage7.Controls.Add(this.chkIgnoreGeoUpdateCore);
this.tabPage7.Controls.Add(this.cmbCoreType);
this.tabPage7.Controls.Add(this.label4);
this.tabPage7.Controls.Add(this.chkKeepOlderDedupl); this.tabPage7.Controls.Add(this.chkKeepOlderDedupl);
this.tabPage7.Controls.Add(this.cbFreshrate); this.tabPage7.Controls.Add(this.cbFreshrate);
this.tabPage7.Controls.Add(this.lbFreshrate); this.tabPage7.Controls.Add(this.lbFreshrate);
@@ -429,18 +440,6 @@
this.chkIgnoreGeoUpdateCore.Name = "chkIgnoreGeoUpdateCore"; this.chkIgnoreGeoUpdateCore.Name = "chkIgnoreGeoUpdateCore";
this.chkIgnoreGeoUpdateCore.UseVisualStyleBackColor = true; this.chkIgnoreGeoUpdateCore.UseVisualStyleBackColor = true;
// //
// cmbCoreType
//
this.cmbCoreType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCoreType.FormattingEnabled = true;
resources.ApplyResources(this.cmbCoreType, "cmbCoreType");
this.cmbCoreType.Name = "cmbCoreType";
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// chkKeepOlderDedupl // chkKeepOlderDedupl
// //
resources.ApplyResources(this.chkKeepOlderDedupl, "chkKeepOlderDedupl"); resources.ApplyResources(this.chkKeepOlderDedupl, "chkKeepOlderDedupl");
@@ -477,6 +476,96 @@
this.chkAutoRun.Name = "chkAutoRun"; this.chkAutoRun.Name = "chkAutoRun";
this.chkAutoRun.UseVisualStyleBackColor = true; this.chkAutoRun.UseVisualStyleBackColor = true;
// //
// tabPageCoreType
//
this.tabPageCoreType.Controls.Add(this.cmbCoreType6);
this.tabPageCoreType.Controls.Add(this.labCoreType6);
this.tabPageCoreType.Controls.Add(this.cmbCoreType5);
this.tabPageCoreType.Controls.Add(this.labCoreType5);
this.tabPageCoreType.Controls.Add(this.cmbCoreType4);
this.tabPageCoreType.Controls.Add(this.labCoreType4);
this.tabPageCoreType.Controls.Add(this.cmbCoreType3);
this.tabPageCoreType.Controls.Add(this.labCoreType3);
this.tabPageCoreType.Controls.Add(this.cmbCoreType2);
this.tabPageCoreType.Controls.Add(this.labCoreType2);
this.tabPageCoreType.Controls.Add(this.cmbCoreType1);
this.tabPageCoreType.Controls.Add(this.labCoreType1);
resources.ApplyResources(this.tabPageCoreType, "tabPageCoreType");
this.tabPageCoreType.Name = "tabPageCoreType";
this.tabPageCoreType.UseVisualStyleBackColor = true;
//
// cmbCoreType6
//
this.cmbCoreType6.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCoreType6.FormattingEnabled = true;
resources.ApplyResources(this.cmbCoreType6, "cmbCoreType6");
this.cmbCoreType6.Name = "cmbCoreType6";
//
// labCoreType6
//
resources.ApplyResources(this.labCoreType6, "labCoreType6");
this.labCoreType6.Name = "labCoreType6";
//
// cmbCoreType5
//
this.cmbCoreType5.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCoreType5.FormattingEnabled = true;
resources.ApplyResources(this.cmbCoreType5, "cmbCoreType5");
this.cmbCoreType5.Name = "cmbCoreType5";
//
// labCoreType5
//
resources.ApplyResources(this.labCoreType5, "labCoreType5");
this.labCoreType5.Name = "labCoreType5";
//
// cmbCoreType4
//
this.cmbCoreType4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCoreType4.FormattingEnabled = true;
resources.ApplyResources(this.cmbCoreType4, "cmbCoreType4");
this.cmbCoreType4.Name = "cmbCoreType4";
//
// labCoreType4
//
resources.ApplyResources(this.labCoreType4, "labCoreType4");
this.labCoreType4.Name = "labCoreType4";
//
// cmbCoreType3
//
this.cmbCoreType3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCoreType3.FormattingEnabled = true;
resources.ApplyResources(this.cmbCoreType3, "cmbCoreType3");
this.cmbCoreType3.Name = "cmbCoreType3";
//
// labCoreType3
//
resources.ApplyResources(this.labCoreType3, "labCoreType3");
this.labCoreType3.Name = "labCoreType3";
//
// cmbCoreType2
//
this.cmbCoreType2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCoreType2.FormattingEnabled = true;
resources.ApplyResources(this.cmbCoreType2, "cmbCoreType2");
this.cmbCoreType2.Name = "cmbCoreType2";
//
// labCoreType2
//
resources.ApplyResources(this.labCoreType2, "labCoreType2");
this.labCoreType2.Name = "labCoreType2";
//
// cmbCoreType1
//
this.cmbCoreType1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCoreType1.FormattingEnabled = true;
resources.ApplyResources(this.cmbCoreType1, "cmbCoreType1");
this.cmbCoreType1.Name = "cmbCoreType1";
//
// labCoreType1
//
resources.ApplyResources(this.labCoreType1, "labCoreType1");
this.labCoreType1.Name = "labCoreType1";
//
// tabPage3 // tabPage3
// //
this.tabPage3.Controls.Add(this.groupBox2); this.tabPage3.Controls.Add(this.groupBox2);
@@ -548,6 +637,8 @@
this.tabPage6.PerformLayout(); this.tabPage6.PerformLayout();
this.tabPage7.ResumeLayout(false); this.tabPage7.ResumeLayout(false);
this.tabPage7.PerformLayout(); this.tabPage7.PerformLayout();
this.tabPageCoreType.ResumeLayout(false);
this.tabPageCoreType.PerformLayout();
this.tabPage3.ResumeLayout(false); this.tabPage3.ResumeLayout(false);
this.groupBox2.ResumeLayout(false); this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout(); this.groupBox2.PerformLayout();
@@ -607,8 +698,6 @@
private System.Windows.Forms.LinkLabel linkDnsObjectDoc; private System.Windows.Forms.LinkLabel linkDnsObjectDoc;
private System.Windows.Forms.TextBox txtremoteDNS; private System.Windows.Forms.TextBox txtremoteDNS;
private System.Windows.Forms.Label label14; private System.Windows.Forms.Label label14;
private System.Windows.Forms.ComboBox cmbCoreType;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.CheckBox chkIgnoreGeoUpdateCore; private System.Windows.Forms.CheckBox chkIgnoreGeoUpdateCore;
private System.Windows.Forms.TabPage tabPage3; private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.TextBox txtsystemProxyExceptions; private System.Windows.Forms.TextBox txtsystemProxyExceptions;
@@ -620,5 +709,18 @@
private System.Windows.Forms.Button btnSetLoopback; private System.Windows.Forms.Button btnSetLoopback;
private System.Windows.Forms.CheckBox chkEnableAutoAdjustMainLvColWidth; private System.Windows.Forms.CheckBox chkEnableAutoAdjustMainLvColWidth;
private System.Windows.Forms.CheckBox chkEnableSecurityProtocolTls13; private System.Windows.Forms.CheckBox chkEnableSecurityProtocolTls13;
private System.Windows.Forms.TabPage tabPageCoreType;
private System.Windows.Forms.ComboBox cmbCoreType1;
private System.Windows.Forms.Label labCoreType1;
private System.Windows.Forms.ComboBox cmbCoreType6;
private System.Windows.Forms.Label labCoreType6;
private System.Windows.Forms.ComboBox cmbCoreType5;
private System.Windows.Forms.Label labCoreType5;
private System.Windows.Forms.ComboBox cmbCoreType4;
private System.Windows.Forms.Label labCoreType4;
private System.Windows.Forms.ComboBox cmbCoreType3;
private System.Windows.Forms.Label labCoreType3;
private System.Windows.Forms.ComboBox cmbCoreType2;
private System.Windows.Forms.Label labCoreType2;
} }
} }

View File

@@ -1,4 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Windows.Forms; using System.Windows.Forms;
using v2rayN.Base; using v2rayN.Base;
@@ -16,13 +17,13 @@ namespace v2rayN.Forms
private void OptionSettingForm_Load(object sender, EventArgs e) private void OptionSettingForm_Load(object sender, EventArgs e)
{ {
cmbCoreType.Items.AddRange(Global.coreTypes.ToArray());
InitBase(); InitBase();
InitKCP(); InitKCP();
InitGUI(); InitGUI();
InitCoreType();
} }
/// <summary> /// <summary>
@@ -123,11 +124,40 @@ namespace v2rayN.Forms
} }
chkIgnoreGeoUpdateCore.Checked = config.ignoreGeoUpdateCore; chkIgnoreGeoUpdateCore.Checked = config.ignoreGeoUpdateCore;
cmbCoreType.SelectedIndex = (int)config.coreType;
txtautoUpdateInterval.Text = config.autoUpdateInterval.ToString(); txtautoUpdateInterval.Text = config.autoUpdateInterval.ToString();
chkEnableAutoAdjustMainLvColWidth.Checked = config.uiItem.enableAutoAdjustMainLvColWidth; chkEnableAutoAdjustMainLvColWidth.Checked = config.uiItem.enableAutoAdjustMainLvColWidth;
chkEnableSecurityProtocolTls13.Checked = config.enableSecurityProtocolTls13; chkEnableSecurityProtocolTls13.Checked = config.enableSecurityProtocolTls13;
} }
private void InitCoreType()
{
if (config.coreTypeItem == null)
{
config.coreTypeItem = new List<CoreTypeItem>();
}
foreach (EConfigType it in Enum.GetValues(typeof(EConfigType)))
{
if (config.coreTypeItem.FindIndex(t => t.configType == it) >= 0)
{
continue;
}
config.coreTypeItem.Add(new CoreTypeItem()
{
configType = it,
coreType = ECoreType.Xray
});
}
for (int k = 1; k <= config.coreTypeItem.Count; k++)
{
var item = config.coreTypeItem[k - 1];
((ComboBox)tabPageCoreType.Controls[$"cmbCoreType{k}"]).Items.AddRange(Global.coreTypes.ToArray());
tabPageCoreType.Controls[$"labCoreType{k}"].Text = item.configType.ToString();
tabPageCoreType.Controls[$"cmbCoreType{k}"].Text = item.coreType.ToString();
}
}
private void btnOK_Click(object sender, EventArgs e) private void btnOK_Click(object sender, EventArgs e)
{ {
if (SaveBase() != 0) if (SaveBase() != 0)
@@ -146,6 +176,11 @@ namespace v2rayN.Forms
return; return;
} }
if (SaveCoreType() != 0)
{
return;
}
if (ConfigHandler.SaveConfig(ref config) == 0) if (ConfigHandler.SaveConfig(ref config) == 0)
{ {
this.DialogResult = DialogResult.OK; this.DialogResult = DialogResult.OK;
@@ -308,7 +343,6 @@ namespace v2rayN.Forms
config.keepOlderDedupl = chkKeepOlderDedupl.Checked; config.keepOlderDedupl = chkKeepOlderDedupl.Checked;
config.ignoreGeoUpdateCore = chkIgnoreGeoUpdateCore.Checked; config.ignoreGeoUpdateCore = chkIgnoreGeoUpdateCore.Checked;
config.coreType = (ECoreType)cmbCoreType.SelectedIndex;
config.autoUpdateInterval = Utils.ToInt(txtautoUpdateInterval.Text); config.autoUpdateInterval = Utils.ToInt(txtautoUpdateInterval.Text);
config.uiItem.enableAutoAdjustMainLvColWidth = chkEnableAutoAdjustMainLvColWidth.Checked; config.uiItem.enableAutoAdjustMainLvColWidth = chkEnableAutoAdjustMainLvColWidth.Checked;
config.enableSecurityProtocolTls13 = chkEnableSecurityProtocolTls13.Checked; config.enableSecurityProtocolTls13 = chkEnableSecurityProtocolTls13.Checked;
@@ -316,6 +350,17 @@ namespace v2rayN.Forms
return 0; return 0;
} }
private int SaveCoreType()
{
for (int k = 1; k <= config.coreTypeItem.Count; k++)
{
var item = config.coreTypeItem[k - 1];
item.coreType = (ECoreType)Enum.Parse(typeof(ECoreType), tabPageCoreType.Controls[$"cmbCoreType{k}"].Text);
}
return 0;
}
private void btnClose_Click(object sender, EventArgs e) private void btnClose_Click(object sender, EventArgs e)
{ {
this.DialogResult = DialogResult.Cancel; this.DialogResult = DialogResult.Cancel;

View File

@@ -637,7 +637,7 @@
<value>3, 3</value> <value>3, 3</value>
</data> </data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing"> <data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>648, 421</value> <value>722, 421</value>
</data> </data>
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib"> <data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
<value>6</value> <value>6</value>
@@ -661,7 +661,7 @@
<value>3, 3, 3, 3</value> <value>3, 3, 3, 3</value>
</data> </data>
<data name="tabPage1.Size" type="System.Drawing.Size, System.Drawing"> <data name="tabPage1.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 427</value> <value>728, 427</value>
</data> </data>
<data name="tabPage1.TabIndex" type="System.Int32, mscorlib"> <data name="tabPage1.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
@@ -775,7 +775,7 @@
<value>4, 22</value> <value>4, 22</value>
</data> </data>
<data name="tabPage2.Size" type="System.Drawing.Size, System.Drawing"> <data name="tabPage2.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 427</value> <value>728, 427</value>
</data> </data>
<data name="tabPage2.TabIndex" type="System.Int32, mscorlib"> <data name="tabPage2.TabIndex" type="System.Int32, mscorlib">
<value>4</value> <value>4</value>
@@ -1117,7 +1117,7 @@
<value>3, 3, 3, 3</value> <value>3, 3, 3, 3</value>
</data> </data>
<data name="tabPage6.Size" type="System.Drawing.Size, System.Drawing"> <data name="tabPage6.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 427</value> <value>728, 427</value>
</data> </data>
<data name="tabPage6.TabIndex" type="System.Int32, mscorlib"> <data name="tabPage6.TabIndex" type="System.Int32, mscorlib">
<value>2</value> <value>2</value>
@@ -1299,57 +1299,6 @@
<data name="&gt;&gt;chkIgnoreGeoUpdateCore.ZOrder" xml:space="preserve"> <data name="&gt;&gt;chkIgnoreGeoUpdateCore.ZOrder" xml:space="preserve">
<value>5</value> <value>5</value>
</data> </data>
<data name="cmbCoreType.Location" type="System.Drawing.Point, System.Drawing">
<value>325, 130</value>
</data>
<data name="cmbCoreType.Size" type="System.Drawing.Size, System.Drawing">
<value>97, 20</value>
</data>
<data name="cmbCoreType.TabIndex" type="System.Int32, mscorlib">
<value>34</value>
</data>
<data name="&gt;&gt;cmbCoreType.Name" xml:space="preserve">
<value>cmbCoreType</value>
</data>
<data name="&gt;&gt;cmbCoreType.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;cmbCoreType.Parent" xml:space="preserve">
<value>tabPage7</value>
</data>
<data name="&gt;&gt;cmbCoreType.ZOrder" xml:space="preserve">
<value>6</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>253, 134</value>
</data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 12</value>
</data>
<data name="label4.TabIndex" type="System.Int32, mscorlib">
<value>35</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Core Type</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>tabPage7</value>
</data>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="chkKeepOlderDedupl.AutoSize" type="System.Boolean, mscorlib"> <data name="chkKeepOlderDedupl.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
</data> </data>
@@ -1378,7 +1327,7 @@
<value>tabPage7</value> <value>tabPage7</value>
</data> </data>
<data name="&gt;&gt;chkKeepOlderDedupl.ZOrder" xml:space="preserve"> <data name="&gt;&gt;chkKeepOlderDedupl.ZOrder" xml:space="preserve">
<value>8</value> <value>6</value>
</data> </data>
<data name="cbFreshrate.Location" type="System.Drawing.Point, System.Drawing"> <data name="cbFreshrate.Location" type="System.Drawing.Point, System.Drawing">
<value>161, 84</value> <value>161, 84</value>
@@ -1399,7 +1348,7 @@
<value>tabPage7</value> <value>tabPage7</value>
</data> </data>
<data name="&gt;&gt;cbFreshrate.ZOrder" xml:space="preserve"> <data name="&gt;&gt;cbFreshrate.ZOrder" xml:space="preserve">
<value>9</value> <value>7</value>
</data> </data>
<data name="lbFreshrate.AutoSize" type="System.Boolean, mscorlib"> <data name="lbFreshrate.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
@@ -1429,7 +1378,7 @@
<value>tabPage7</value> <value>tabPage7</value>
</data> </data>
<data name="&gt;&gt;lbFreshrate.ZOrder" xml:space="preserve"> <data name="&gt;&gt;lbFreshrate.ZOrder" xml:space="preserve">
<value>10</value> <value>8</value>
</data> </data>
<data name="chkEnableStatistics.AutoSize" type="System.Boolean, mscorlib"> <data name="chkEnableStatistics.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
@@ -1459,7 +1408,7 @@
<value>tabPage7</value> <value>tabPage7</value>
</data> </data>
<data name="&gt;&gt;chkEnableStatistics.ZOrder" xml:space="preserve"> <data name="&gt;&gt;chkEnableStatistics.ZOrder" xml:space="preserve">
<value>11</value> <value>9</value>
</data> </data>
<data name="chkAllowLANConn.AutoSize" type="System.Boolean, mscorlib"> <data name="chkAllowLANConn.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
@@ -1486,7 +1435,7 @@
<value>tabPage7</value> <value>tabPage7</value>
</data> </data>
<data name="&gt;&gt;chkAllowLANConn.ZOrder" xml:space="preserve"> <data name="&gt;&gt;chkAllowLANConn.ZOrder" xml:space="preserve">
<value>12</value> <value>10</value>
</data> </data>
<data name="chkAutoRun.AutoSize" type="System.Boolean, mscorlib"> <data name="chkAutoRun.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
@@ -1513,7 +1462,7 @@
<value>tabPage7</value> <value>tabPage7</value>
</data> </data>
<data name="&gt;&gt;chkAutoRun.ZOrder" xml:space="preserve"> <data name="&gt;&gt;chkAutoRun.ZOrder" xml:space="preserve">
<value>13</value> <value>11</value>
</data> </data>
<data name="tabPage7.Location" type="System.Drawing.Point, System.Drawing"> <data name="tabPage7.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value> <value>4, 22</value>
@@ -1522,7 +1471,7 @@
<value>3, 3, 3, 3</value> <value>3, 3, 3, 3</value>
</data> </data>
<data name="tabPage7.Size" type="System.Drawing.Size, System.Drawing"> <data name="tabPage7.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 427</value> <value>728, 427</value>
</data> </data>
<data name="tabPage7.TabIndex" type="System.Int32, mscorlib"> <data name="tabPage7.TabIndex" type="System.Int32, mscorlib">
<value>3</value> <value>3</value>
@@ -1542,6 +1491,339 @@
<data name="&gt;&gt;tabPage7.ZOrder" xml:space="preserve"> <data name="&gt;&gt;tabPage7.ZOrder" xml:space="preserve">
<value>3</value> <value>3</value>
</data> </data>
<data name="cmbCoreType6.Location" type="System.Drawing.Point, System.Drawing">
<value>117, 172</value>
</data>
<data name="cmbCoreType6.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 20</value>
</data>
<data name="cmbCoreType6.TabIndex" type="System.Int32, mscorlib">
<value>46</value>
</data>
<data name="&gt;&gt;cmbCoreType6.Name" xml:space="preserve">
<value>cmbCoreType6</value>
</data>
<data name="&gt;&gt;cmbCoreType6.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;cmbCoreType6.Parent" xml:space="preserve">
<value>tabPageCoreType</value>
</data>
<data name="&gt;&gt;cmbCoreType6.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="labCoreType6.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labCoreType6.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labCoreType6.Location" type="System.Drawing.Point, System.Drawing">
<value>45, 176</value>
</data>
<data name="labCoreType6.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 12</value>
</data>
<data name="labCoreType6.TabIndex" type="System.Int32, mscorlib">
<value>47</value>
</data>
<data name="labCoreType6.Text" xml:space="preserve">
<value>Core Type</value>
</data>
<data name="&gt;&gt;labCoreType6.Name" xml:space="preserve">
<value>labCoreType6</value>
</data>
<data name="&gt;&gt;labCoreType6.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;labCoreType6.Parent" xml:space="preserve">
<value>tabPageCoreType</value>
</data>
<data name="&gt;&gt;labCoreType6.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="cmbCoreType5.Location" type="System.Drawing.Point, System.Drawing">
<value>117, 146</value>
</data>
<data name="cmbCoreType5.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 20</value>
</data>
<data name="cmbCoreType5.TabIndex" type="System.Int32, mscorlib">
<value>44</value>
</data>
<data name="&gt;&gt;cmbCoreType5.Name" xml:space="preserve">
<value>cmbCoreType5</value>
</data>
<data name="&gt;&gt;cmbCoreType5.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;cmbCoreType5.Parent" xml:space="preserve">
<value>tabPageCoreType</value>
</data>
<data name="&gt;&gt;cmbCoreType5.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="labCoreType5.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labCoreType5.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labCoreType5.Location" type="System.Drawing.Point, System.Drawing">
<value>45, 150</value>
</data>
<data name="labCoreType5.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 12</value>
</data>
<data name="labCoreType5.TabIndex" type="System.Int32, mscorlib">
<value>45</value>
</data>
<data name="labCoreType5.Text" xml:space="preserve">
<value>Core Type</value>
</data>
<data name="&gt;&gt;labCoreType5.Name" xml:space="preserve">
<value>labCoreType5</value>
</data>
<data name="&gt;&gt;labCoreType5.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;labCoreType5.Parent" xml:space="preserve">
<value>tabPageCoreType</value>
</data>
<data name="&gt;&gt;labCoreType5.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="cmbCoreType4.Location" type="System.Drawing.Point, System.Drawing">
<value>117, 120</value>
</data>
<data name="cmbCoreType4.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 20</value>
</data>
<data name="cmbCoreType4.TabIndex" type="System.Int32, mscorlib">
<value>42</value>
</data>
<data name="&gt;&gt;cmbCoreType4.Name" xml:space="preserve">
<value>cmbCoreType4</value>
</data>
<data name="&gt;&gt;cmbCoreType4.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;cmbCoreType4.Parent" xml:space="preserve">
<value>tabPageCoreType</value>
</data>
<data name="&gt;&gt;cmbCoreType4.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="labCoreType4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labCoreType4.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labCoreType4.Location" type="System.Drawing.Point, System.Drawing">
<value>45, 124</value>
</data>
<data name="labCoreType4.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 12</value>
</data>
<data name="labCoreType4.TabIndex" type="System.Int32, mscorlib">
<value>43</value>
</data>
<data name="labCoreType4.Text" xml:space="preserve">
<value>Core Type</value>
</data>
<data name="&gt;&gt;labCoreType4.Name" xml:space="preserve">
<value>labCoreType4</value>
</data>
<data name="&gt;&gt;labCoreType4.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;labCoreType4.Parent" xml:space="preserve">
<value>tabPageCoreType</value>
</data>
<data name="&gt;&gt;labCoreType4.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="cmbCoreType3.Location" type="System.Drawing.Point, System.Drawing">
<value>117, 94</value>
</data>
<data name="cmbCoreType3.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 20</value>
</data>
<data name="cmbCoreType3.TabIndex" type="System.Int32, mscorlib">
<value>40</value>
</data>
<data name="&gt;&gt;cmbCoreType3.Name" xml:space="preserve">
<value>cmbCoreType3</value>
</data>
<data name="&gt;&gt;cmbCoreType3.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;cmbCoreType3.Parent" xml:space="preserve">
<value>tabPageCoreType</value>
</data>
<data name="&gt;&gt;cmbCoreType3.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="labCoreType3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labCoreType3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labCoreType3.Location" type="System.Drawing.Point, System.Drawing">
<value>45, 98</value>
</data>
<data name="labCoreType3.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 12</value>
</data>
<data name="labCoreType3.TabIndex" type="System.Int32, mscorlib">
<value>41</value>
</data>
<data name="labCoreType3.Text" xml:space="preserve">
<value>Core Type</value>
</data>
<data name="&gt;&gt;labCoreType3.Name" xml:space="preserve">
<value>labCoreType3</value>
</data>
<data name="&gt;&gt;labCoreType3.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;labCoreType3.Parent" xml:space="preserve">
<value>tabPageCoreType</value>
</data>
<data name="&gt;&gt;labCoreType3.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="cmbCoreType2.Location" type="System.Drawing.Point, System.Drawing">
<value>117, 68</value>
</data>
<data name="cmbCoreType2.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 20</value>
</data>
<data name="cmbCoreType2.TabIndex" type="System.Int32, mscorlib">
<value>38</value>
</data>
<data name="&gt;&gt;cmbCoreType2.Name" xml:space="preserve">
<value>cmbCoreType2</value>
</data>
<data name="&gt;&gt;cmbCoreType2.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;cmbCoreType2.Parent" xml:space="preserve">
<value>tabPageCoreType</value>
</data>
<data name="&gt;&gt;cmbCoreType2.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="labCoreType2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labCoreType2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labCoreType2.Location" type="System.Drawing.Point, System.Drawing">
<value>45, 72</value>
</data>
<data name="labCoreType2.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 12</value>
</data>
<data name="labCoreType2.TabIndex" type="System.Int32, mscorlib">
<value>39</value>
</data>
<data name="labCoreType2.Text" xml:space="preserve">
<value>Core Type</value>
</data>
<data name="&gt;&gt;labCoreType2.Name" xml:space="preserve">
<value>labCoreType2</value>
</data>
<data name="&gt;&gt;labCoreType2.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;labCoreType2.Parent" xml:space="preserve">
<value>tabPageCoreType</value>
</data>
<data name="&gt;&gt;labCoreType2.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="cmbCoreType1.Location" type="System.Drawing.Point, System.Drawing">
<value>117, 42</value>
</data>
<data name="cmbCoreType1.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 20</value>
</data>
<data name="cmbCoreType1.TabIndex" type="System.Int32, mscorlib">
<value>36</value>
</data>
<data name="&gt;&gt;cmbCoreType1.Name" xml:space="preserve">
<value>cmbCoreType1</value>
</data>
<data name="&gt;&gt;cmbCoreType1.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;cmbCoreType1.Parent" xml:space="preserve">
<value>tabPageCoreType</value>
</data>
<data name="&gt;&gt;cmbCoreType1.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="labCoreType1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labCoreType1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labCoreType1.Location" type="System.Drawing.Point, System.Drawing">
<value>45, 46</value>
</data>
<data name="labCoreType1.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 12</value>
</data>
<data name="labCoreType1.TabIndex" type="System.Int32, mscorlib">
<value>37</value>
</data>
<data name="labCoreType1.Text" xml:space="preserve">
<value>Core Type</value>
</data>
<data name="&gt;&gt;labCoreType1.Name" xml:space="preserve">
<value>labCoreType1</value>
</data>
<data name="&gt;&gt;labCoreType1.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;labCoreType1.Parent" xml:space="preserve">
<value>tabPageCoreType</value>
</data>
<data name="&gt;&gt;labCoreType1.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="tabPageCoreType.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
</data>
<data name="tabPageCoreType.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tabPageCoreType.Size" type="System.Drawing.Size, System.Drawing">
<value>728, 427</value>
</data>
<data name="tabPageCoreType.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="tabPageCoreType.Text" xml:space="preserve">
<value>CoreType settings</value>
</data>
<data name="&gt;&gt;tabPageCoreType.Name" xml:space="preserve">
<value>tabPageCoreType</value>
</data>
<data name="&gt;&gt;tabPageCoreType.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tabPageCoreType.Parent" xml:space="preserve">
<value>tabControl1</value>
</data>
<data name="&gt;&gt;tabPageCoreType.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="label13.AutoSize" type="System.Boolean, mscorlib"> <data name="label13.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
</data> </data>
@@ -1636,7 +1918,7 @@
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing"> <data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 427</value> <value>728, 427</value>
</data> </data>
<data name="groupBox2.TabIndex" type="System.Int32, mscorlib"> <data name="groupBox2.TabIndex" type="System.Int32, mscorlib">
<value>42</value> <value>42</value>
@@ -1660,7 +1942,7 @@
<value>4, 22</value> <value>4, 22</value>
</data> </data>
<data name="tabPage3.Size" type="System.Drawing.Size, System.Drawing"> <data name="tabPage3.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 427</value> <value>728, 427</value>
</data> </data>
<data name="tabPage3.TabIndex" type="System.Int32, mscorlib"> <data name="tabPage3.TabIndex" type="System.Int32, mscorlib">
<value>5</value> <value>5</value>
@@ -1678,7 +1960,7 @@
<value>tabControl1</value> <value>tabControl1</value>
</data> </data>
<data name="&gt;&gt;tabPage3.ZOrder" xml:space="preserve"> <data name="&gt;&gt;tabPage3.ZOrder" xml:space="preserve">
<value>4</value> <value>5</value>
</data> </data>
<data name="tabControl1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> <data name="tabControl1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value> <value>Fill</value>
@@ -1687,7 +1969,7 @@
<value>0, 10</value> <value>0, 10</value>
</data> </data>
<data name="tabControl1.Size" type="System.Drawing.Size, System.Drawing"> <data name="tabControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>662, 453</value> <value>736, 453</value>
</data> </data>
<data name="tabControl1.TabIndex" type="System.Int32, mscorlib"> <data name="tabControl1.TabIndex" type="System.Int32, mscorlib">
<value>10</value> <value>10</value>
@@ -1735,7 +2017,7 @@
<value>0, 463</value> <value>0, 463</value>
</data> </data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing"> <data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>662, 60</value> <value>736, 60</value>
</data> </data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib"> <data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>11</value> <value>11</value>
@@ -1759,7 +2041,7 @@
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing"> <data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>662, 10</value> <value>736, 10</value>
</data> </data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib"> <data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>9</value> <value>9</value>
@@ -1783,7 +2065,7 @@
<value>6, 12</value> <value>6, 12</value>
</data> </data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing"> <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>662, 523</value> <value>736, 523</value>
</data> </data>
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms"> <data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 4, 4, 4</value> <value>4, 4, 4, 4</value>

View File

@@ -334,4 +334,7 @@
<data name="$this.Text" xml:space="preserve"> <data name="$this.Text" xml:space="preserve">
<value>参数设置</value> <value>参数设置</value>
</data> </data>
<data name="tabPageCoreType.Text" xml:space="preserve">
<value> Core类型设置 </value>
</data>
</root> </root>

View File

@@ -14,6 +14,9 @@ namespace v2rayN
public const string v2flyCoreUrl = "https://github.com/v2fly/v2ray-core/releases"; public const string v2flyCoreUrl = "https://github.com/v2fly/v2ray-core/releases";
public const string xrayCoreUrl = "https://github.com/XTLS/Xray-core/releases"; public const string xrayCoreUrl = "https://github.com/XTLS/Xray-core/releases";
public const string NUrl = @"https://github.com/2dust/v2rayN/releases"; public const string NUrl = @"https://github.com/2dust/v2rayN/releases";
public const string clashCoreUrl = "https://github.com/Dreamacro/clash/releases";
/// <summary> /// <summary>
@@ -199,8 +202,7 @@ namespace v2rayN
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> 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> 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> kcpHeaderTypes = new List<string> { "srtp", "utp", "wechat-video", "dtls", "wireguard" };
public static readonly List<string> coreTypes = new List<string> { "v2fly_core", "Xray_core" }; public static readonly List<string> coreTypes = new List<string> { "v2fly", "Xray" };
public const string GrpcgunMode = "gun"; public const string GrpcgunMode = "gun";
public const string GrpcmultiMode = "multi"; public const string GrpcmultiMode = "multi";

View File

@@ -184,6 +184,28 @@ namespace v2rayN.Handler
LazyConfig.Instance.SetConfig(ref config); LazyConfig.Instance.SetConfig(ref config);
return 0; return 0;
} }
/// <summary>
/// 保参数
/// </summary>
/// <param name="config"></param>
/// <returns></returns>
public static int SaveConfig(ref Config config, bool reload = true)
{
Global.reloadV2ray = reload;
ToJsonFile(config);
return 0;
}
/// <summary>
/// 存储文件
/// </summary>
/// <param name="config"></param>
private static void ToJsonFile(Config config)
{
Utils.ToJsonFile(config, Utils.GetPath(configRes));
}
#endregion #endregion
@@ -197,7 +219,7 @@ namespace v2rayN.Handler
/// <returns></returns> /// <returns></returns>
public static int AddServer(ref Config config, VmessItem vmessItem, bool toFile = true) public static int AddServer(ref Config config, VmessItem vmessItem, bool toFile = true)
{ {
vmessItem.configType = (int)EConfigType.Vmess; vmessItem.configType = EConfigType.Vmess;
vmessItem.address = vmessItem.address.TrimEx(); vmessItem.address = vmessItem.address.TrimEx();
vmessItem.id = vmessItem.id.TrimEx(); vmessItem.id = vmessItem.id.TrimEx();
@@ -235,7 +257,7 @@ namespace v2rayN.Handler
var index = config.FindIndexId(item.indexId); var index = config.FindIndexId(item.indexId);
if (index >= 0) if (index >= 0)
{ {
config.vmess.RemoveAt(index); RemoveVmessItem(config, index);
} }
} }
@@ -250,34 +272,16 @@ namespace v2rayN.Handler
/// <param name="config"></param> /// <param name="config"></param>
/// <param name="index"></param> /// <param name="index"></param>
/// <returns></returns> /// <returns></returns>
public static int CopyServer(ref Config config, VmessItem item) public static int CopyServer(ref Config config, List<VmessItem> indexs)
{ {
if (item == null) foreach (var item in indexs)
{ {
return -1; VmessItem vmessItem = Utils.DeepCopy(item);
} vmessItem.indexId = string.Empty;
vmessItem.remarks = string.Format("{0}-clone", item.remarks);
VmessItem vmessItem = new VmessItem
{
configVersion = item.configVersion,
address = item.address,
port = item.port,
id = item.id,
alterId = item.alterId,
security = item.security,
network = item.network,
remarks = string.Format("{0}-clone", item.remarks),
headerType = item.headerType,
requestHost = item.requestHost,
path = item.path,
streamSecurity = item.streamSecurity,
allowInsecure = item.allowInsecure,
configType = item.configType,
flow = item.flow,
sni = item.sni
};
AddServerCommon(ref config, vmessItem); AddServerCommon(ref config, vmessItem);
}
ToJsonFile(config); ToJsonFile(config);
@@ -341,29 +345,6 @@ namespace v2rayN.Handler
return config.vmess[index]; return config.vmess[index];
} }
/// <summary>
/// 保参数
/// </summary>
/// <param name="config"></param>
/// <returns></returns>
public static int SaveConfig(ref Config config, bool reload = true)
{
Global.reloadV2ray = reload;
ToJsonFile(config);
return 0;
}
/// <summary>
/// 存储文件
/// </summary>
/// <param name="config"></param>
private static void ToJsonFile(Config config)
{
Utils.ToJsonFile(config, Utils.GetPath(configRes));
}
/// <summary> /// <summary>
/// 移动服务器 /// 移动服务器
/// </summary> /// </summary>
@@ -441,15 +422,24 @@ namespace v2rayN.Handler
/// <param name="config"></param> /// <param name="config"></param>
/// <param name="vmessItem"></param> /// <param name="vmessItem"></param>
/// <returns></returns> /// <returns></returns>
public static int AddCustomServer(ref Config config, VmessItem vmessItem) public static int AddCustomServer(ref Config config, VmessItem vmessItem, bool blDelete)
{ {
var fileName = vmessItem.address; var fileName = vmessItem.address;
string newFileName = string.Format("{0}.json", Utils.GetGUID()); if (!File.Exists(fileName))
{
return -1;
}
var ext = Path.GetExtension(fileName);
string newFileName = string.Format("{0}{1}", Utils.GetGUID(), ext);
//newFileName = Path.Combine(Utils.GetTempPath(), newFileName); //newFileName = Path.Combine(Utils.GetTempPath(), newFileName);
try try
{ {
File.Copy(fileName, Path.Combine(Utils.GetTempPath(), newFileName)); File.Copy(fileName, Path.Combine(Utils.GetConfigPath(), newFileName));
if (blDelete)
{
File.Delete(fileName);
}
} }
catch catch
{ {
@@ -457,7 +447,7 @@ namespace v2rayN.Handler
} }
vmessItem.address = newFileName; vmessItem.address = newFileName;
vmessItem.configType = (int)EConfigType.Custom; vmessItem.configType = EConfigType.Custom;
if (Utils.IsNullOrEmpty(vmessItem.remarks)) if (Utils.IsNullOrEmpty(vmessItem.remarks))
{ {
vmessItem.remarks = string.Format("import custom@{0}", DateTime.Now.ToShortDateString()); vmessItem.remarks = string.Format("import custom@{0}", DateTime.Now.ToShortDateString());
@@ -492,13 +482,13 @@ namespace v2rayN.Handler
/// <returns></returns> /// <returns></returns>
public static int AddShadowsocksServer(ref Config config, VmessItem vmessItem, bool toFile = true) public static int AddShadowsocksServer(ref Config config, VmessItem vmessItem, bool toFile = true)
{ {
vmessItem.configType = (int)EConfigType.Shadowsocks; vmessItem.configType = EConfigType.Shadowsocks;
vmessItem.address = vmessItem.address.TrimEx(); vmessItem.address = vmessItem.address.TrimEx();
vmessItem.id = vmessItem.id.TrimEx(); vmessItem.id = vmessItem.id.TrimEx();
vmessItem.security = vmessItem.security.TrimEx(); vmessItem.security = vmessItem.security.TrimEx();
if (!config.GetShadowsocksSecuritys().Contains(vmessItem.security)) if (!LazyConfig.Instance.GetShadowsocksSecuritys().Contains(vmessItem.security))
{ {
return -1; return -1;
} }
@@ -521,7 +511,7 @@ namespace v2rayN.Handler
/// <returns></returns> /// <returns></returns>
public static int AddSocksServer(ref Config config, VmessItem vmessItem, bool toFile = true) public static int AddSocksServer(ref Config config, VmessItem vmessItem, bool toFile = true)
{ {
vmessItem.configType = (int)EConfigType.Socks; vmessItem.configType = EConfigType.Socks;
vmessItem.address = vmessItem.address.TrimEx(); vmessItem.address = vmessItem.address.TrimEx();
@@ -535,7 +525,6 @@ namespace v2rayN.Handler
return 0; return 0;
} }
/// <summary> /// <summary>
/// 添加服务器或编辑 /// 添加服务器或编辑
/// </summary> /// </summary>
@@ -544,7 +533,7 @@ namespace v2rayN.Handler
/// <returns></returns> /// <returns></returns>
public static int AddTrojanServer(ref Config config, VmessItem vmessItem, bool toFile = true) public static int AddTrojanServer(ref Config config, VmessItem vmessItem, bool toFile = true)
{ {
vmessItem.configType = (int)EConfigType.Trojan; vmessItem.configType = EConfigType.Trojan;
vmessItem.address = vmessItem.address.TrimEx(); vmessItem.address = vmessItem.address.TrimEx();
vmessItem.id = vmessItem.id.TrimEx(); vmessItem.id = vmessItem.id.TrimEx();
@@ -581,7 +570,7 @@ namespace v2rayN.Handler
{ {
return 0; return 0;
} }
if (vmessItem.configType == (int)EConfigType.Vmess) if (vmessItem.configType == EConfigType.Vmess)
{ {
string path = ""; string path = "";
string host = ""; string host = "";
@@ -632,6 +621,185 @@ namespace v2rayN.Handler
return 0; return 0;
} }
public static int SortServers(ref Config config, ref List<VmessItem> lstVmess, EServerColName name, bool asc)
{
if (lstVmess.Count <= 0)
{
return -1;
}
var propertyName = string.Empty;
switch (name)
{
case EServerColName.configType:
case EServerColName.remarks:
case EServerColName.address:
case EServerColName.port:
case EServerColName.security:
case EServerColName.network:
case EServerColName.streamSecurity:
case EServerColName.testResult:
propertyName = name.ToString();
break;
case EServerColName.subRemarks:
propertyName = "subid";
break;
default:
return -1;
}
var items = lstVmess.AsQueryable();
if (asc)
{
lstVmess = items.OrderBy(propertyName).ToList();
}
else
{
lstVmess = items.OrderByDescending(propertyName).ToList();
}
for (int i = 0; i < lstVmess.Count; i++)
{
lstVmess[i].sort = (i + 1) * 10;
}
ToJsonFile(config);
return 0;
}
/// <summary>
/// 添加服务器或编辑
/// </summary>
/// <param name="config"></param>
/// <param name="vmessItem"></param>
/// <returns></returns>
public static int AddVlessServer(ref Config config, VmessItem vmessItem, bool toFile = true)
{
vmessItem.configType = EConfigType.VLESS;
vmessItem.address = vmessItem.address.TrimEx();
vmessItem.id = vmessItem.id.TrimEx();
vmessItem.security = vmessItem.security.TrimEx();
vmessItem.network = vmessItem.network.TrimEx();
vmessItem.headerType = vmessItem.headerType.TrimEx();
vmessItem.requestHost = vmessItem.requestHost.TrimEx();
vmessItem.path = vmessItem.path.TrimEx();
vmessItem.streamSecurity = vmessItem.streamSecurity.TrimEx();
AddServerCommon(ref config, vmessItem);
if (toFile)
{
ToJsonFile(config);
}
return 0;
}
public static int DedupServerList(ref Config config, ref List<VmessItem> lstVmess)
{
List<VmessItem> source = lstVmess;
bool keepOlder = config.keepOlderDedupl;
List<VmessItem> list = new List<VmessItem>();
if (!keepOlder) source.Reverse(); // Remove the early items first
foreach (VmessItem item in source)
{
if (!list.Exists(i => CompareVmessItem(i, item, false)))
{
list.Add(item);
}
else
{
var index = config.FindIndexId(item.indexId);
if (index >= 0)
{
RemoveVmessItem(config, index);
}
}
}
//if (!keepOlder) list.Reverse();
//config.vmess = list;
return list.Count;
}
public static int AddServerCommon(ref Config config, VmessItem vmessItem)
{
vmessItem.configVersion = 2;
if (Utils.IsNullOrEmpty(vmessItem.allowInsecure))
{
vmessItem.allowInsecure = config.defAllowInsecure.ToString();
}
if (!Utils.IsNullOrEmpty(vmessItem.network) && !Global.networks.Contains(vmessItem.network))
{
vmessItem.network = Global.DefaultNetwork;
}
if (Utils.IsNullOrEmpty(vmessItem.indexId))
{
vmessItem.indexId = Utils.GetGUID(false);
}
if (!config.vmess.Exists(it => it.indexId == vmessItem.indexId))
{
var maxSort = config.vmess.Any() ? config.vmess.Max(t => t.sort) : 0;
vmessItem.sort = maxSort++;
config.vmess.Add(vmessItem);
}
//if (config.vmess.Count == 1)
//{
// config.indexId = config.vmess[0].indexId;
// Global.reloadV2ray = true;
//}
return 0;
}
private static bool CompareVmessItem(VmessItem o, VmessItem n, bool remarks)
{
if (o == null || n == null)
{
return false;
}
return o.configVersion == n.configVersion
&& o.configType == n.configType
&& o.address == n.address
&& o.port == n.port
&& o.id == n.id
&& o.alterId == n.alterId
&& o.security == n.security
&& o.network == n.network
&& o.headerType == n.headerType
&& o.requestHost == n.requestHost
&& o.path == n.path
&& o.streamSecurity == n.streamSecurity
&& o.flow == n.flow
&& (remarks ? o.remarks == n.remarks : true);
}
private static int RemoveVmessItem(Config config, int index)
{
try
{
if (config.vmess[index].configType == EConfigType.Custom)
{
File.Delete(Utils.GetConfigPath(config.vmess[index].address));
}
}
catch (Exception ex)
{
Utils.SaveLog("RemoveVmessItem", ex);
}
config.vmess.RemoveAt(index);
return 0;
}
#endregion
#region Batch add servers
/// <summary> /// <summary>
/// 批量添加服务器 /// 批量添加服务器
/// </summary> /// </summary>
@@ -639,7 +807,7 @@ namespace v2rayN.Handler
/// <param name="clipboardData"></param> /// <param name="clipboardData"></param>
/// <param name="subid"></param> /// <param name="subid"></param>
/// <returns>成功导入的数量</returns> /// <returns>成功导入的数量</returns>
public static int AddBatchServers(ref Config config, string clipboardData, string subid, string groupId) private static int AddBatchServers(ref Config config, string clipboardData, string subid, List<VmessItem> lstOriSub, string groupId)
{ {
if (Utils.IsNullOrEmpty(clipboardData)) if (Utils.IsNullOrEmpty(clipboardData))
{ {
@@ -647,10 +815,8 @@ namespace v2rayN.Handler
} }
//copy sub items //copy sub items
List<VmessItem> lstOriSub = null;
if (!Utils.IsNullOrEmpty(subid)) if (!Utils.IsNullOrEmpty(subid))
{ {
lstOriSub = config.vmess.Where(it => it.subid == subid).ToList();
RemoveServerViaSubid(ref config, subid); RemoveServerViaSubid(ref config, subid);
} }
//if (clipboardData.IndexOf("vmess") >= 0 && clipboardData.IndexOf("vmess") == clipboardData.LastIndexOf("vmess")) //if (clipboardData.IndexOf("vmess") >= 0 && clipboardData.IndexOf("vmess") == clipboardData.LastIndexOf("vmess"))
@@ -692,35 +858,35 @@ namespace v2rayN.Handler
//groupId //groupId
vmessItem.groupId = groupId; vmessItem.groupId = groupId;
if (vmessItem.configType == (int)EConfigType.Vmess) if (vmessItem.configType == EConfigType.Vmess)
{ {
if (AddServer(ref config, vmessItem, false) == 0) if (AddServer(ref config, vmessItem, false) == 0)
{ {
countServers++; countServers++;
} }
} }
else if (vmessItem.configType == (int)EConfigType.Shadowsocks) else if (vmessItem.configType == EConfigType.Shadowsocks)
{ {
if (AddShadowsocksServer(ref config, vmessItem, false) == 0) if (AddShadowsocksServer(ref config, vmessItem, false) == 0)
{ {
countServers++; countServers++;
} }
} }
else if (vmessItem.configType == (int)EConfigType.Socks) else if (vmessItem.configType == EConfigType.Socks)
{ {
if (AddSocksServer(ref config, vmessItem, false) == 0) if (AddSocksServer(ref config, vmessItem, false) == 0)
{ {
countServers++; countServers++;
} }
} }
else if (vmessItem.configType == (int)EConfigType.Trojan) else if (vmessItem.configType == EConfigType.Trojan)
{ {
if (AddTrojanServer(ref config, vmessItem, false) == 0) if (AddTrojanServer(ref config, vmessItem, false) == 0)
{ {
countServers++; countServers++;
} }
} }
else if (vmessItem.configType == (int)EConfigType.VLESS) else if (vmessItem.configType == EConfigType.VLESS)
{ {
if (AddVlessServer(ref config, vmessItem, false) == 0) if (AddVlessServer(ref config, vmessItem, false) == 0)
{ {
@@ -733,6 +899,97 @@ namespace v2rayN.Handler
return countServers; return countServers;
} }
private static int AddBatchServers4Custom(ref Config config, string clipboardData, string subid, List<VmessItem> lstOriSub, string groupId)
{
if (Utils.IsNullOrEmpty(clipboardData))
{
return -1;
}
VmessItem vmessItem = new VmessItem();
//Is v2ray configuration
V2rayConfig v2rayConfig = Utils.FromJson<V2rayConfig>(clipboardData);
if (v2rayConfig != null
&& v2rayConfig.inbounds != null
&& v2rayConfig.inbounds.Count > 0
&& v2rayConfig.outbounds != null
&& v2rayConfig.outbounds.Count > 0)
{
var fileName = Utils.GetTempPath($"{Utils.GetGUID(false)}.json");
File.WriteAllText(fileName, clipboardData);
vmessItem.coreType = ECoreType.Xray;
vmessItem.address = fileName;
vmessItem.remarks = "v2ray_custom";
}
//Is Clash configuration
else if (clipboardData.IndexOf("port") >= 0
&& clipboardData.IndexOf("socks-port") >= 0
&& clipboardData.IndexOf("proxies") >= 0)
{
var fileName = Utils.GetTempPath($"{Utils.GetGUID(false)}.yaml");
File.WriteAllText(fileName, clipboardData);
vmessItem.coreType = ECoreType.clash;
vmessItem.address = fileName;
vmessItem.remarks = "clash_custom";
}
if (!Utils.IsNullOrEmpty(subid))
{
RemoveServerViaSubid(ref config, subid);
}
if (lstOriSub != null && lstOriSub.Count == 1)
{
vmessItem.indexId = lstOriSub[0].indexId;
}
vmessItem.subid = subid;
vmessItem.groupId = groupId;
if (Utils.IsNullOrEmpty(vmessItem.address))
{
return -1;
}
if (AddCustomServer(ref config, vmessItem, true) == 0)
{
return 1;
}
else
{
return -1;
}
}
public static int AddBatchServers(ref Config config, string clipboardData, string subid, string groupId)
{
List<VmessItem> lstOriSub = null;
if (!Utils.IsNullOrEmpty(subid))
{
lstOriSub = config.vmess.Where(it => it.subid == subid).ToList();
}
int counter = AddBatchServers(ref config, clipboardData, subid, lstOriSub, groupId);
if (counter < 1)
{
counter = AddBatchServers(ref config, Utils.Base64Decode(clipboardData), subid, lstOriSub, groupId);
}
//maybe other sub
if (counter < 1)
{
counter = AddBatchServers4Custom(ref config, clipboardData, subid, lstOriSub, groupId);
}
return counter;
}
#endregion
#region Sub & Group
/// <summary> /// <summary>
/// add sub /// add sub
/// </summary> /// </summary>
@@ -798,7 +1055,7 @@ namespace v2rayN.Handler
{ {
if (config.vmess[k].subid.Equals(subid)) if (config.vmess[k].subid.Equals(subid))
{ {
config.vmess.RemoveAt(k); RemoveVmessItem(config, k);
} }
} }
@@ -806,163 +1063,6 @@ namespace v2rayN.Handler
return 0; return 0;
} }
public static int SortServers(ref Config config, ref List<VmessItem> lstVmess, EServerColName name, bool asc)
{
if (lstVmess.Count <= 0)
{
return -1;
}
var propertyName = string.Empty;
switch (name)
{
case EServerColName.configType:
case EServerColName.remarks:
case EServerColName.address:
case EServerColName.port:
case EServerColName.security:
case EServerColName.network:
case EServerColName.streamSecurity:
case EServerColName.testResult:
propertyName = name.ToString();
break;
case EServerColName.subRemarks:
propertyName = "subid";
break;
default:
return -1;
}
var items = lstVmess.AsQueryable();
if (asc)
{
lstVmess = items.OrderBy(propertyName).ToList();
}
else
{
lstVmess = items.OrderByDescending(propertyName).ToList();
}
for (int i = 0; i < lstVmess.Count; i++)
{
lstVmess[i].sort = (i + 1) * 10;
}
ToJsonFile(config);
return 0;
}
/// <summary>
/// 添加服务器或编辑
/// </summary>
/// <param name="config"></param>
/// <param name="vmessItem"></param>
/// <returns></returns>
public static int AddVlessServer(ref Config config, VmessItem vmessItem, bool toFile = true)
{
vmessItem.configType = (int)EConfigType.VLESS;
vmessItem.address = vmessItem.address.TrimEx();
vmessItem.id = vmessItem.id.TrimEx();
vmessItem.security = vmessItem.security.TrimEx();
vmessItem.network = vmessItem.network.TrimEx();
vmessItem.headerType = vmessItem.headerType.TrimEx();
vmessItem.requestHost = vmessItem.requestHost.TrimEx();
vmessItem.path = vmessItem.path.TrimEx();
vmessItem.streamSecurity = vmessItem.streamSecurity.TrimEx();
AddServerCommon(ref config, vmessItem);
if (toFile)
{
ToJsonFile(config);
}
return 0;
}
public static int DedupServerList(ref Config config, ref List<VmessItem> lstVmess)
{
List<VmessItem> source = lstVmess;
bool keepOlder = config.keepOlderDedupl;
List<VmessItem> list = new List<VmessItem>();
if (!keepOlder) source.Reverse(); // Remove the early items first
foreach (VmessItem item in source)
{
if (!list.Exists(i => CompareVmessItem(i, item, false)))
{
list.Add(item);
}
else
{
var index = config.FindIndexId(item.indexId);
if (index >= 0)
{
config.vmess.RemoveAt(index);
}
}
}
//if (!keepOlder) list.Reverse();
//config.vmess = list;
return 0;
}
public static int AddServerCommon(ref Config config, VmessItem vmessItem)
{
vmessItem.configVersion = 2;
if (Utils.IsNullOrEmpty(vmessItem.allowInsecure))
{
vmessItem.allowInsecure = config.defAllowInsecure.ToString();
}
if (!Utils.IsNullOrEmpty(vmessItem.network) && !Global.networks.Contains(vmessItem.network))
{
vmessItem.network = Global.DefaultNetwork;
}
if (Utils.IsNullOrEmpty(vmessItem.indexId))
{
vmessItem.indexId = Utils.GetGUID(false);
}
if (!config.vmess.Exists(it => it.indexId == vmessItem.indexId))
{
var maxSort = config.vmess.Any() ? config.vmess.Max(t => t.sort) : 0;
vmessItem.sort = maxSort++;
config.vmess.Add(vmessItem);
}
//if (config.vmess.Count == 1)
//{
// config.indexId = config.vmess[0].indexId;
// Global.reloadV2ray = true;
//}
return 0;
}
private static bool CompareVmessItem(VmessItem o, VmessItem n, bool remarks)
{
if (o == null || n == null)
{
return false;
}
return o.configVersion == n.configVersion
&& o.configType == n.configType
&& o.address == n.address
&& o.port == n.port
&& o.id == n.id
&& o.alterId == n.alterId
&& o.security == n.security
&& o.network == n.network
&& o.headerType == n.headerType
&& o.requestHost == n.requestHost
&& o.path == n.path
&& o.streamSecurity == n.streamSecurity
&& o.flow == n.flow
&& (remarks ? o.remarks == n.remarks : true);
}
/// <summary> /// <summary>
/// save Group /// save Group
@@ -1014,6 +1114,8 @@ namespace v2rayN.Handler
ToJsonFile(config); ToJsonFile(config);
return 0; return 0;
} }
#endregion #endregion
#region UI #region UI

View File

@@ -1,6 +1,7 @@
using System; using System;
using System.IO; using System.IO;
using System.Net; using System.Net;
using System.Text;
using v2rayN.Base; using v2rayN.Base;
namespace v2rayN.Handler namespace v2rayN.Handler
@@ -139,6 +140,7 @@ namespace v2rayN.Handler
Utils.SetSecurityProtocol(LazyConfig.Instance.GetConfig().enableSecurityProtocolTls13); Utils.SetSecurityProtocol(LazyConfig.Instance.GetConfig().enableSecurityProtocolTls13);
WebClientEx ws = new WebClientEx(); WebClientEx ws = new WebClientEx();
ws.Encoding = Encoding.UTF8;
if (webProxy != null) if (webProxy != null)
{ {
ws.Proxy = webProxy; ws.Proxy = webProxy;
@@ -197,7 +199,7 @@ namespace v2rayN.Handler
Utils.SetSecurityProtocol(LazyConfig.Instance.GetConfig().enableSecurityProtocolTls13); Utils.SetSecurityProtocol(LazyConfig.Instance.GetConfig().enableSecurityProtocolTls13);
WebClientEx ws = new WebClientEx(); WebClientEx ws = new WebClientEx();
ws.Encoding = Encoding.UTF8;
return ws.DownloadString(new Uri(url)); return ws.DownloadString(new Uri(url));
} }
catch (Exception ex) catch (Exception ex)

View File

@@ -1,5 +1,7 @@
using System; using System;
using System.Collections.Generic;
using v2rayN.Mode; using v2rayN.Mode;
using System.Linq;
namespace v2rayN.Handler namespace v2rayN.Handler
{ {
@@ -20,5 +22,34 @@ namespace v2rayN.Handler
{ {
return _config; return _config;
} }
public List<string> GetShadowsocksSecuritys()
{
if (GetCoreType(null, EConfigType.Shadowsocks) == ECoreType.v2fly)
{
return Global.ssSecuritys;
}
return Global.ssSecuritysInXray;
}
public ECoreType GetCoreType(VmessItem vmessItem, EConfigType eConfigType)
{
if (vmessItem != null && vmessItem.coreType != null)
{
return (ECoreType)vmessItem.coreType;
}
if (_config.coreTypeItem == null)
{
return ECoreType.Xray;
}
var item = _config.coreTypeItem.FirstOrDefault(it => it.configType == eConfigType);
if (item == null)
{
return ECoreType.Xray;
}
return item.coreType;
}
} }
} }

View File

@@ -1,12 +1,14 @@
using NHotkey; using NHotkey;
using NHotkey.WindowsForms; using NHotkey.WindowsForms;
using System; using System;
using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using v2rayN.Mode; using v2rayN.Mode;
using System.Linq;
namespace v2rayN.Handler namespace v2rayN.Handler
{ {
@@ -51,7 +53,7 @@ namespace v2rayN.Handler
if (!Utils.IsNullOrEmpty(item.customIcon) && File.Exists(item.customIcon)) if (!Utils.IsNullOrEmpty(item.customIcon) && File.Exists(item.customIcon))
{ {
graphics.FillRectangle(drawBrush, new Rectangle(0, 0, width, height)); graphics.FillRectangle(drawBrush, new Rectangle(0, 0, width, height));
graphics.DrawImage(new Bitmap(item.customIcon), 0, 0); graphics.DrawImage(new Bitmap(item.customIcon), 0, 0, width, height);
customIcon = true; customIcon = true;
} }
} }
@@ -83,8 +85,8 @@ namespace v2rayN.Handler
{ {
return; return;
} }
if (item.configType != (int)EConfigType.Vmess if (item.configType != EConfigType.Vmess
&& item.configType != (int)EConfigType.VLESS) && item.configType != EConfigType.VLESS)
{ {
UI.Show(UIRes.I18N("NonVmessService")); UI.Show(UIRes.I18N("NonVmessService"));
return; return;
@@ -123,8 +125,8 @@ namespace v2rayN.Handler
{ {
return; return;
} }
if (item.configType != (int)EConfigType.Vmess if (item.configType != EConfigType.Vmess
&& item.configType != (int)EConfigType.VLESS) && item.configType != EConfigType.VLESS)
{ {
UI.Show(UIRes.I18N("NonVmessService")); UI.Show(UIRes.I18N("NonVmessService"));
return; return;
@@ -157,29 +159,12 @@ namespace v2rayN.Handler
} }
} }
public int AddBatchServers(Config config, string clipboardData, string subid, string groupId)
{
int counter;
int _Add()
{
return ConfigHandler.AddBatchServers(ref config, clipboardData, subid, groupId);
}
counter = _Add();
if (counter < 1)
{
clipboardData = Utils.Base64Decode(clipboardData);
counter = _Add();
}
return counter;
}
public void BackupGuiNConfig(Config config, bool auto = false) public void BackupGuiNConfig(Config config, bool auto = false)
{ {
string fileName = $"guiNConfig_{DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss_fff")}.json"; string fileName = $"guiNConfig_{DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss_fff")}.json";
if (auto) if (auto)
{ {
fileName = Utils.GetTempPath(fileName); fileName = Utils.GetBackupPath(fileName);
} }
else else
{ {

View File

@@ -30,19 +30,19 @@ namespace v2rayN.Handler
switch (item.configType) switch (item.configType)
{ {
case (int)EConfigType.Vmess: case EConfigType.Vmess:
url = ShareVmess(item); url = ShareVmess(item);
break; break;
case (int)EConfigType.Shadowsocks: case EConfigType.Shadowsocks:
url = ShareShadowsocks(item); url = ShareShadowsocks(item);
break; break;
case (int)EConfigType.Socks: case EConfigType.Socks:
url = ShareSocks(item); url = ShareSocks(item);
break; break;
case (int)EConfigType.Trojan: case EConfigType.Trojan:
url = ShareTrojan(item); url = ShareTrojan(item);
break; break;
case (int)EConfigType.VLESS: case EConfigType.VLESS:
url = ShareVLESS(item); url = ShareVLESS(item);
break; break;
default: default:
@@ -354,7 +354,7 @@ namespace v2rayN.Handler
return null; return null;
} }
vmessItem.configType = (int)EConfigType.Shadowsocks; vmessItem.configType = EConfigType.Shadowsocks;
} }
else if (result.StartsWith(Global.socksProtocol)) else if (result.StartsWith(Global.socksProtocol))
{ {
@@ -374,7 +374,7 @@ namespace v2rayN.Handler
return null; return null;
} }
vmessItem.configType = (int)EConfigType.Socks; vmessItem.configType = EConfigType.Socks;
} }
else if (result.StartsWith(Global.trojanProtocol)) else if (result.StartsWith(Global.trojanProtocol))
{ {
@@ -408,7 +408,7 @@ namespace v2rayN.Handler
msg = string.Empty; msg = string.Empty;
VmessItem vmessItem = new VmessItem(); VmessItem vmessItem = new VmessItem();
vmessItem.configType = (int)EConfigType.Vmess; vmessItem.configType = EConfigType.Vmess;
result = result.Substring(Global.vmessProtocol.Length); result = result.Substring(Global.vmessProtocol.Length);
result = Utils.Base64Decode(result); result = Utils.Base64Decode(result);
@@ -461,7 +461,7 @@ namespace v2rayN.Handler
{ {
VmessItem vmessItem = new VmessItem VmessItem vmessItem = new VmessItem
{ {
configType = (int)EConfigType.Vmess configType = EConfigType.Vmess
}; };
result = result.Substring(Global.vmessProtocol.Length); result = result.Substring(Global.vmessProtocol.Length);
int indexSplit = result.IndexOf("?"); int indexSplit = result.IndexOf("?");
@@ -499,7 +499,7 @@ namespace v2rayN.Handler
{ {
VmessItem i = new VmessItem VmessItem i = new VmessItem
{ {
configType = (int)EConfigType.Vmess, configType = EConfigType.Vmess,
security = "auto" security = "auto"
}; };
@@ -655,7 +655,7 @@ namespace v2rayN.Handler
private static VmessItem ResolveSocks(string result) private static VmessItem ResolveSocks(string result)
{ {
VmessItem vmessItem = new VmessItem(); VmessItem vmessItem = new VmessItem();
vmessItem.configType = (int)EConfigType.Socks; vmessItem.configType = EConfigType.Socks;
result = result.Substring(Global.socksProtocol.Length); result = result.Substring(Global.socksProtocol.Length);
//remark //remark
int indexRemark = result.IndexOf("#"); int indexRemark = result.IndexOf("#");
@@ -733,7 +733,7 @@ namespace v2rayN.Handler
{ {
VmessItem item = new VmessItem VmessItem item = new VmessItem
{ {
configType = (int)EConfigType.Trojan configType = EConfigType.Trojan
}; };
Uri url = new Uri(result); Uri url = new Uri(result);
@@ -752,7 +752,7 @@ namespace v2rayN.Handler
{ {
VmessItem item = new VmessItem VmessItem item = new VmessItem
{ {
configType = (int)EConfigType.VLESS, configType = EConfigType.VLESS,
security = "none" security = "none"
}; };

View File

@@ -64,7 +64,7 @@ namespace v2rayN.Handler
{ {
foreach (var it in _selecteds) foreach (var it in _selecteds)
{ {
if (it.configType == (int)EConfigType.Custom) if (it.configType == EConfigType.Custom)
{ {
continue; continue;
} }
@@ -129,7 +129,7 @@ namespace v2rayN.Handler
{ {
continue; continue;
} }
if (it.configType == (int)EConfigType.Custom) if (it.configType == EConfigType.Custom)
{ {
continue; continue;
} }
@@ -226,7 +226,7 @@ namespace v2rayN.Handler
{ {
continue; continue;
} }
if (it.configType == (int)EConfigType.Custom) if (it.configType == EConfigType.Custom)
{ {
continue; continue;
} }

View File

@@ -210,7 +210,7 @@ namespace v2rayN.Handler
//ConfigHandler.RemoveServerViaSubid(ref config, id); //ConfigHandler.RemoveServerViaSubid(ref config, id);
//_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgClearSubscription")}"); //_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgClearSubscription")}");
// RefreshServers(); // RefreshServers();
int ret = MainFormHandler.Instance.AddBatchServers(config, result, id, groupId); int ret = ConfigHandler.AddBatchServers(ref config, result, id, groupId);
if (ret > 0) if (ret > 0)
{ {
// RefreshServers(); // RefreshServers();

View File

@@ -37,7 +37,7 @@ namespace v2rayN.Handler
} }
msg = UIRes.I18N("InitialConfiguration"); msg = UIRes.I18N("InitialConfiguration");
if (node.configType == (int)EConfigType.Custom) if (node.configType == EConfigType.Custom)
{ {
return GenerateClientCustomConfig(node, fileName, out msg); return GenerateClientCustomConfig(node, fileName, out msg);
} }
@@ -334,7 +334,7 @@ namespace v2rayN.Handler
{ {
var config = LazyConfig.Instance.GetConfig(); var config = LazyConfig.Instance.GetConfig();
Outbounds outbound = v2rayConfig.outbounds[0]; Outbounds outbound = v2rayConfig.outbounds[0];
if (node.configType == (int)EConfigType.Vmess) if (node.configType == EConfigType.Vmess)
{ {
VnextItem vnextItem; VnextItem vnextItem;
if (outbound.settings.vnext.Count <= 0) if (outbound.settings.vnext.Count <= 0)
@@ -384,7 +384,7 @@ namespace v2rayN.Handler
outbound.protocol = Global.vmessProtocolLite; outbound.protocol = Global.vmessProtocolLite;
outbound.settings.servers = null; outbound.settings.servers = null;
} }
else if (node.configType == (int)EConfigType.Shadowsocks) else if (node.configType == EConfigType.Shadowsocks)
{ {
ServersItem serversItem; ServersItem serversItem;
if (outbound.settings.servers.Count <= 0) if (outbound.settings.servers.Count <= 0)
@@ -400,7 +400,7 @@ namespace v2rayN.Handler
serversItem.address = node.address; serversItem.address = node.address;
serversItem.port = node.port; serversItem.port = node.port;
serversItem.password = node.id; serversItem.password = node.id;
if (config.GetShadowsocksSecuritys().Contains(node.security)) if (LazyConfig.Instance.GetShadowsocksSecuritys().Contains(node.security))
{ {
serversItem.method = node.security; serversItem.method = node.security;
} }
@@ -420,7 +420,7 @@ namespace v2rayN.Handler
outbound.protocol = Global.ssProtocolLite; outbound.protocol = Global.ssProtocolLite;
outbound.settings.vnext = null; outbound.settings.vnext = null;
} }
else if (node.configType == (int)EConfigType.Socks) else if (node.configType == EConfigType.Socks)
{ {
ServersItem serversItem; ServersItem serversItem;
if (outbound.settings.servers.Count <= 0) if (outbound.settings.servers.Count <= 0)
@@ -457,7 +457,7 @@ namespace v2rayN.Handler
outbound.protocol = Global.socksProtocolLite; outbound.protocol = Global.socksProtocolLite;
outbound.settings.vnext = null; outbound.settings.vnext = null;
} }
else if (node.configType == (int)EConfigType.VLESS) else if (node.configType == EConfigType.VLESS)
{ {
VnextItem vnextItem; VnextItem vnextItem;
if (outbound.settings.vnext.Count <= 0) if (outbound.settings.vnext.Count <= 0)
@@ -516,7 +516,7 @@ namespace v2rayN.Handler
outbound.protocol = Global.vlessProtocolLite; outbound.protocol = Global.vlessProtocolLite;
outbound.settings.servers = null; outbound.settings.servers = null;
} }
else if (node.configType == (int)EConfigType.Trojan) else if (node.configType == EConfigType.Trojan)
{ {
ServersItem serversItem; ServersItem serversItem;
if (outbound.settings.servers.Count <= 0) if (outbound.settings.servers.Count <= 0)
@@ -912,7 +912,7 @@ namespace v2rayN.Handler
string addressFileName = node.address; string addressFileName = node.address;
if (!File.Exists(addressFileName)) if (!File.Exists(addressFileName))
{ {
addressFileName = Path.Combine(Utils.GetTempPath(), addressFileName); addressFileName = Path.Combine(Utils.GetConfigPath(), addressFileName);
} }
if (!File.Exists(addressFileName)) if (!File.Exists(addressFileName))
{ {
@@ -1022,13 +1022,13 @@ namespace v2rayN.Handler
usersItem.id = node.id; usersItem.id = node.id;
usersItem.email = Global.userEMail; usersItem.email = Global.userEMail;
if (node.configType == (int)EConfigType.Vmess) if (node.configType == EConfigType.Vmess)
{ {
inbound.protocol = Global.vmessProtocolLite; inbound.protocol = Global.vmessProtocolLite;
usersItem.alterId = node.alterId; usersItem.alterId = node.alterId;
} }
else if (node.configType == (int)EConfigType.VLESS) else if (node.configType == EConfigType.VLESS)
{ {
inbound.protocol = Global.vlessProtocolLite; inbound.protocol = Global.vlessProtocolLite;
usersItem.flow = node.flow; usersItem.flow = node.flow;
@@ -1432,7 +1432,7 @@ namespace v2rayN.Handler
foreach (var it in selecteds) foreach (var it in selecteds)
{ {
if (it.configType == (int)EConfigType.Custom) if (it.configType == EConfigType.Custom)
{ {
continue; continue;
} }
@@ -1440,7 +1440,7 @@ namespace v2rayN.Handler
{ {
continue; continue;
} }
if (it.configType == (int)EConfigType.Vmess || it.configType == (int)EConfigType.VLESS) if (it.configType == EConfigType.Vmess || it.configType == EConfigType.VLESS)
{ {
if (!Utils.IsGuidByParse(configCopy.GetVmessItem(it.indexId).id)) if (!Utils.IsGuidByParse(configCopy.GetVmessItem(it.indexId).id))
{ {

View File

@@ -23,6 +23,7 @@ namespace v2rayN.Handler
private static string v2rayConfigRes = Global.v2rayConfigFileName; private static string v2rayConfigRes = Global.v2rayConfigFileName;
private List<string> lstV2ray; private List<string> lstV2ray;
private string coreUrl; private string coreUrl;
private string coreArguments;
public event ProcessDelegate ProcessEvent; public event ProcessDelegate ProcessEvent;
//private int processId = 0; //private int processId = 0;
private Process _process; private Process _process;
@@ -36,27 +37,16 @@ namespace v2rayN.Handler
/// </summary> /// </summary>
public void LoadV2ray(Config config) public void LoadV2ray(Config config)
{ {
if (config.coreType == ECoreType.v2fly_core)
{
lstV2ray = new List<string>
{
"wv2ray",
"v2ray"
};
coreUrl = Global.v2flyCoreUrl;
}
else
{
lstV2ray = new List<string>
{
"xray"
};
coreUrl = Global.xrayCoreUrl;
}
if (Global.reloadV2ray) if (Global.reloadV2ray)
{ {
var item = ConfigHandler.GetDefaultServer(ref config); var item = ConfigHandler.GetDefaultServer(ref config);
if (item == null)
{
ShowMsg(false, UIRes.I18N("CheckServerSettings"));
return;
}
SetCore(config, item);
string fileName = Utils.GetPath(v2rayConfigRes); string fileName = Utils.GetPath(v2rayConfigRes);
if (V2rayConfigHandler.GenerateClientConfig(item, fileName, false, out string msg) != 0) if (V2rayConfigHandler.GenerateClientConfig(item, fileName, false, out string msg) != 0)
{ {
@@ -213,6 +203,7 @@ namespace v2rayN.Handler
StartInfo = new ProcessStartInfo StartInfo = new ProcessStartInfo
{ {
FileName = fileName, FileName = fileName,
Arguments = coreArguments,
WorkingDirectory = Utils.StartupPath(), WorkingDirectory = Utils.StartupPath(),
UseShellExecute = false, UseShellExecute = false,
RedirectStandardOutput = true, RedirectStandardOutput = true,
@@ -334,5 +325,45 @@ namespace v2rayN.Handler
Utils.SaveLog(ex.Message, ex); Utils.SaveLog(ex.Message, ex);
} }
} }
private void SetCore(Config config, VmessItem item)
{
if (item == null)
{
return;
}
var coreType = LazyConfig.Instance.GetCoreType(item, item.configType);
if (coreType == ECoreType.v2fly)
{
lstV2ray = new List<string>
{
"wv2ray",
"v2ray"
};
coreUrl = Global.v2flyCoreUrl;
coreArguments = string.Empty;
}
else if (coreType == ECoreType.Xray)
{
lstV2ray = new List<string>
{
"xray"
};
coreUrl = Global.xrayCoreUrl;
coreArguments = string.Empty;
}
else if (coreType == ECoreType.clash)
{
lstV2ray = new List<string>
{
"clash-windows-amd64",
"clash-windows-386",
"clash"
};
coreUrl = Global.clashCoreUrl;
coreArguments = "-f config.json";
}
}
} }
} }

View File

@@ -120,10 +120,6 @@ namespace v2rayN.Mode
get; set; get; set;
} }
public ECoreType coreType
{
get; set;
}
public bool ignoreGeoUpdateCore public bool ignoreGeoUpdateCore
{ {
get; set; get; set;
@@ -208,6 +204,12 @@ namespace v2rayN.Mode
{ {
get; set; get; set;
} }
public List<CoreTypeItem> coreTypeItem
{
get; set;
}
#endregion #endregion
#region function #region function
@@ -254,16 +256,6 @@ namespace v2rayN.Mode
return vmess.FirstOrDefault(it => it.indexId == id); return vmess.FirstOrDefault(it => it.indexId == id);
} }
public List<string> GetShadowsocksSecuritys()
{
if (coreType == ECoreType.v2fly_core)
{
return Global.ssSecuritys;
}
return Global.ssSecuritysInXray;
}
public bool IsActiveNode(VmessItem item) public bool IsActiveNode(VmessItem item)
{ {
if (!Utils.IsNullOrEmpty(item.indexId) && item.indexId == indexId) if (!Utils.IsNullOrEmpty(item.indexId) && item.indexId == indexId)
@@ -293,7 +285,7 @@ namespace v2rayN.Mode
public VmessItem() public VmessItem()
{ {
indexId = string.Empty; indexId = string.Empty;
configType = (int)EConfigType.Vmess; configType = EConfigType.Vmess;
configVersion = 2; configVersion = 2;
sort = 0; sort = 0;
address = string.Empty; address = string.Empty;
@@ -317,7 +309,7 @@ namespace v2rayN.Mode
#region function #region function
public string GetSummary() public string GetSummary()
{ {
string summary = string.Format("[{0}] ", ((EConfigType)configType).ToString()); string summary = string.Format("[{0}] ", (configType).ToString());
string[] arrAddr = address.Split('.'); string[] arrAddr = address.Split('.');
string addr; string addr;
if (arrAddr.Length > 2) if (arrAddr.Length > 2)
@@ -334,34 +326,16 @@ namespace v2rayN.Mode
} }
switch (configType) switch (configType)
{ {
case (int)EConfigType.Vmess: case EConfigType.Vmess:
case (int)EConfigType.Shadowsocks: case EConfigType.Shadowsocks:
case (int)EConfigType.Socks: case EConfigType.Socks:
case (int)EConfigType.VLESS: case EConfigType.VLESS:
case (int)EConfigType.Trojan: case EConfigType.Trojan:
summary += string.Format("{0}({1}:{2})", remarks, addr, port); summary += string.Format("{0}({1}:{2})", remarks, addr, port);
break; break;
default: default:
summary += string.Format("{0}", remarks); summary += string.Format("{0}", remarks);
break; 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; return summary;
} }
@@ -420,7 +394,7 @@ namespace v2rayN.Mode
/// <summary> /// <summary>
/// config type(1=normal,2=custom) /// config type(1=normal,2=custom)
/// </summary> /// </summary>
public int configType public EConfigType configType
{ {
get; set; get; set;
} }
@@ -570,6 +544,10 @@ namespace v2rayN.Mode
{ {
get; set; get; set;
} = string.Empty; } = string.Empty;
public ECoreType? coreType
{
get; set;
}
} }
[Serializable] [Serializable]
@@ -782,4 +760,19 @@ namespace v2rayN.Mode
get; set; get; set;
} }
} }
[Serializable]
public class CoreTypeItem
{
public EConfigType configType
{
get; set;
}
public ECoreType coreType
{
get; set;
}
}
} }

View File

@@ -3,7 +3,8 @@ namespace v2rayN.Mode
{ {
public enum ECoreType public enum ECoreType
{ {
v2fly_core = 0, v2fly = 1,
Xray_core = 1 Xray = 2,
clash = 3
} }
} }

View File

@@ -17,7 +17,7 @@ namespace v2rayN.Mode
{ {
get; set; get; set;
} }
public int configType public EConfigType configType
{ {
get; set; get; set;
} }

View File

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

View File

@@ -115,7 +115,7 @@ namespace v2rayN.Resx {
} }
/// <summary> /// <summary>
/// 查找类似 Note that custom configuration relies entirely on your own configuration and does not work with all settings. The system agent is available when the socks port is equal to the port in the settings in the custom configuration inbound. 的本地化字符串。 /// 查找类似 Note that custom configuration relies entirely on your own configuration and does not work with all settings. If you want to use the system proxy, please modify the listening port manually. 的本地化字符串。
/// </summary> /// </summary>
internal static string CustomServerTips { internal static string CustomServerTips {
get { get {
@@ -249,6 +249,15 @@ namespace v2rayN.Resx {
} }
} }
/// <summary>
/// 查找类似 Please browse to import server configuration 的本地化字符串。
/// </summary>
internal static string FillServerAddressCustom {
get {
return ResourceManager.GetString("FillServerAddressCustom", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Please fill in the user ID 的本地化字符串。 /// 查找类似 Please fill in the user ID 的本地化字符串。
/// </summary> /// </summary>

View File

@@ -130,7 +130,7 @@
<value> configuration format is incorrect</value> <value> configuration format is incorrect</value>
</data> </data>
<data name="CustomServerTips" xml:space="preserve"> <data name="CustomServerTips" xml:space="preserve">
<value>Note that custom configuration relies entirely on your own configuration and does not work with all settings. The system agent is available when the socks port is equal to the port in the settings in the custom configuration inbound.</value> <value>Note that custom configuration relies entirely on your own configuration and does not work with all settings. If you want to use the system proxy, please modify the listening port manually.</value>
</data> </data>
<data name="Downloading" xml:space="preserve"> <data name="Downloading" xml:space="preserve">
<value>Downloading...</value> <value>Downloading...</value>
@@ -451,4 +451,7 @@
<data name="AllGroupServers" xml:space="preserve"> <data name="AllGroupServers" xml:space="preserve">
<value>All servers</value> <value>All servers</value>
</data> </data>
<data name="FillServerAddressCustom" xml:space="preserve">
<value>Please browse to import server configuration</value>
</data>
</root> </root>

View File

@@ -130,7 +130,7 @@
<value>配置格式不正确</value> <value>配置格式不正确</value>
</data> </data>
<data name="CustomServerTips" xml:space="preserve"> <data name="CustomServerTips" xml:space="preserve">
<value>注意,自定义配置完全依赖您自己的配置,不能使用所有设置功能。在自定义配置inbound中有socks port等于设置中的port时系统代理才可用</value> <value>注意,自定义配置完全依赖您自己的配置,不能使用所有设置功能。如需使用系统代理请手工修改监听端口。</value>
</data> </data>
<data name="Downloading" xml:space="preserve"> <data name="Downloading" xml:space="preserve">
<value>下载开始...</value> <value>下载开始...</value>
@@ -451,4 +451,7 @@
<data name="AllGroupServers" xml:space="preserve"> <data name="AllGroupServers" xml:space="preserve">
<value>所有服务器</value> <value>所有服务器</value>
</data> </data>
<data name="FillServerAddressCustom" xml:space="preserve">
<value>请浏览导入服务器配置</value>
</data>
</root> </root>

View File

@@ -943,19 +943,21 @@ namespace v2rayN
#region TempPath #region TempPath
// return path to store temporary files // return path to store temporary files
public static string GetTempPath() public static string GetTempPath(string filename = "")
{ {
string _tempPath = Path.Combine(StartupPath(), "v2ray_win_temp"); string _tempPath = Path.Combine(StartupPath(), "v2ray_win_temp");
if (!Directory.Exists(_tempPath)) if (!Directory.Exists(_tempPath))
{ {
Directory.CreateDirectory(_tempPath); Directory.CreateDirectory(_tempPath);
} }
if (string.IsNullOrEmpty(filename))
{
return _tempPath; return _tempPath;
} }
else
public static string GetTempPath(string filename)
{ {
return Path.Combine(GetTempPath(), filename); return Path.Combine(_tempPath, filename);
}
} }
public static string UnGzip(byte[] buf) public static string UnGzip(byte[] buf)
@@ -970,6 +972,32 @@ namespace v2rayN
return Encoding.UTF8.GetString(sb.ToArray()); return Encoding.UTF8.GetString(sb.ToArray());
} }
public static string GetBackupPath(string filename)
{
string _tempPath = Path.Combine(StartupPath(), "guiBackups");
if (!Directory.Exists(_tempPath))
{
Directory.CreateDirectory(_tempPath);
}
return Path.Combine(_tempPath, filename);
}
public static string GetConfigPath(string filename = "")
{
string _tempPath = Path.Combine(StartupPath(), "guiConfigs");
if (!Directory.Exists(_tempPath))
{
Directory.CreateDirectory(_tempPath);
}
if (string.IsNullOrEmpty(filename))
{
return _tempPath;
}
else
{
return Path.Combine(_tempPath, filename);
}
}
#endregion #endregion
#region Log #region Log

View File

@@ -99,27 +99,9 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Forms\AddServer6Form.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\AddServer6Form.Designer.cs">
<DependentUpon>AddServer6Form.cs</DependentUpon>
</Compile>
<Compile Include="Forms\AddServer4Form.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\AddServer4Form.Designer.cs">
<DependentUpon>AddServer4Form.cs</DependentUpon>
</Compile>
<Compile Include="Base\ListViewFlickerFree.cs"> <Compile Include="Base\ListViewFlickerFree.cs">
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
<Compile Include="Forms\AddServer5Form.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\AddServer5Form.Designer.cs">
<DependentUpon>AddServer5Form.cs</DependentUpon>
</Compile>
<Compile Include="Forms\BaseServerForm.cs"> <Compile Include="Forms\BaseServerForm.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -196,12 +178,6 @@
<Compile Include="Forms\AddServer2Form.Designer.cs"> <Compile Include="Forms\AddServer2Form.Designer.cs">
<DependentUpon>AddServer2Form.cs</DependentUpon> <DependentUpon>AddServer2Form.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Forms\AddServer3Form.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\AddServer3Form.Designer.cs">
<DependentUpon>AddServer3Form.cs</DependentUpon>
</Compile>
<Compile Include="Forms\QRCodeControl.cs"> <Compile Include="Forms\QRCodeControl.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
@@ -292,34 +268,6 @@
<DependentUpon>AddServer2Form.cs</DependentUpon> <DependentUpon>AddServer2Form.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Forms\AddServer6Form.resx">
<DependentUpon>AddServer6Form.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Forms\AddServer6Form.zh-Hans.resx">
<DependentUpon>AddServer6Form.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Forms\AddServer4Form.resx">
<DependentUpon>AddServer4Form.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Forms\AddServer4Form.zh-Hans.resx">
<DependentUpon>AddServer4Form.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Forms\AddServer3Form.zh-Hans.resx">
<DependentUpon>AddServer3Form.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Forms\AddServer5Form.resx">
<DependentUpon>AddServer5Form.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Forms\AddServer5Form.zh-Hans.resx">
<DependentUpon>AddServer5Form.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Forms\AddServerForm.zh-Hans.resx"> <EmbeddedResource Include="Forms\AddServerForm.zh-Hans.resx">
<DependentUpon>AddServerForm.cs</DependentUpon> <DependentUpon>AddServerForm.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@@ -429,10 +377,6 @@
<DependentUpon>AddServer2Form.cs</DependentUpon> <DependentUpon>AddServer2Form.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Forms\AddServer3Form.resx">
<DependentUpon>AddServer3Form.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Forms\SubSettingForm.zh-Hans.resx"> <EmbeddedResource Include="Forms\SubSettingForm.zh-Hans.resx">
<DependentUpon>SubSettingForm.cs</DependentUpon> <DependentUpon>SubSettingForm.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>