Compare commits

...

62 Commits
4.35 ... 5.12

Author SHA1 Message Date
2dust
3aa48a9a3e Update AssemblyInfo.cs 2022-04-07 20:36:10 +08:00
2dust
09702b9bde fix bugs 2022-04-07 17:05:56 +08:00
2dust
35f6cd3d9c Merge pull request #2164 from Lemonawa/master
Update issue templates
2022-04-06 19:49:52 +08:00
Lemonawa
b62f1786a9 Update issue templates 2022-04-05 23:19:37 +08:00
Lemonawa
b21ad28d5b Delete config.yaml 2022-04-05 23:10:16 +08:00
Lemonawa
8d66c0d180 Delete issue_template.md 2022-04-05 23:10:08 +08:00
Lemonawa
ec8aa0df18 Update issue templates 2022-04-05 23:09:30 +08:00
Lemonawa
e824d8e91d Create config.yaml 2022-04-05 23:06:42 +08:00
2dust
b919422ec4 Update AssemblyInfo.cs 2022-04-04 19:34:32 +08:00
2dust
a8bc9ce605 Refactor local listening port 2022-04-04 19:32:16 +08:00
2dust
e2f399eeb1 Update AssemblyInfo.cs 2022-04-03 17:03:21 +08:00
2dust
82924278b5 Delete log files older than one month 2022-04-03 17:01:45 +08:00
2dust
bb828a4e06 modify some text 2022-04-03 17:00:47 +08:00
2dust
74933ac146 Merge pull request #2151 from zhaogarvie/master
过滤器添加快捷按钮
2022-04-01 20:37:41 +08:00
uniceguy
0d315f0dc3 过滤器添加快捷按钮 2022-04-01 19:55:16 +08:00
2dust
372ee346dc Update README.md 2022-04-01 19:33:31 +08:00
2dust
cb462ab944 Update README.md 2022-04-01 19:27:44 +08:00
2dust
606da79372 Update AssemblyInfo.cs 2022-04-01 18:10:48 +08:00
2dust
0801c3db64 Refactor stat update 2022-04-01 18:09:58 +08:00
2dust
35deb0c915 Merge pull request #2148 from zhaogarvie/master
保存自定义路由信息时先排序后输出
2022-04-01 18:07:25 +08:00
uniceguy
fd4d712688 保存自定义路由信息时先排序后输出 2022-04-01 13:21:22 +08:00
2dust
354fc618b0 fix encode issue 2022-03-31 20:19:15 +08:00
2dust
82b6ee5ad2 Refactor ResUI 2022-03-31 19:53:58 +08:00
2dust
645e6c4ec0 Update ConfigHandler.cs 2022-03-28 19:21:31 +08:00
2dust
cdc83bc9d7 Update AssemblyInfo.cs 2022-03-28 19:09:27 +08:00
2dust
70feacd276 Add hysteria support 2022-03-28 19:08:54 +08:00
2dust
ece4572058 Refactor and improve 2022-03-28 18:54:05 +08:00
2dust
4d16a5e801 Update AssemblyInfo.cs 2022-03-24 19:09:15 +08:00
2dust
1493a8b03f add drag to sort 2022-03-24 19:07:45 +08:00
2dust
d20791bf73 Update AssemblyInfo.cs 2022-03-23 18:56:01 +08:00
2dust
7bb91f57ac Custom configuration overwrite port 2022-03-23 18:49:28 +08:00
2dust
b7a6004830 some improvements 2022-03-23 18:48:57 +08:00
2dust
dee5613f2f add move servers to group 2022-03-23 18:47:59 +08:00
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
2dust
ac79466041 Update AssemblyInfo.cs 2022-03-17 19:07:24 +08:00
2dust
291fd491ff Improve speedtest 2022-03-17 19:07:06 +08:00
2dust
6408d51c85 Improve custom configuration 2022-03-17 18:41:51 +08:00
2dust
b693873619 Subscription support authentication 2022-03-17 18:41:07 +08:00
2dust
c2af982272 add all servers group 2022-03-15 20:32:14 +08:00
2dust
1f0a77bde2 Update AssemblyInfo.cs 2022-03-15 19:17:54 +08:00
2dust
0463c1a6e7 bug fix 2022-03-15 19:17:32 +08:00
2dust
6517f66876 Update AssemblyInfo.cs 2022-03-14 20:41:39 +08:00
2dust
82682d4474 Update MainForm.cs 2022-03-14 20:36:09 +08:00
2dust
e030fae1c4 Update GroupSettingForm.cs 2022-03-14 20:16:59 +08:00
2dust
4d7cf140cd fix speed test display 2022-03-13 18:47:17 +08:00
2dust
f6ccee1976 Refactor Scan Screen Task 2022-03-13 16:15:11 +08:00
2dust
d42346d500 Add server group 2022-03-13 10:41:04 +08:00
2dust
887dd8da3b Update AssemblyInfo.cs 2022-03-08 18:29:04 +08:00
2dust
731db2541d load core async, remove Ssl3 2022-03-08 18:28:39 +08:00
2dust
bfdc0a2e77 Update MainForm.cs 2022-03-06 20:24:35 +08:00
90 changed files with 10573 additions and 10695 deletions

View File

@@ -1,3 +1,12 @@
---
name: Bug 报告
about: 在提出问题前请先自行排除服务器端问题和升级到最新客户端,同时也请通过搜索确认是否有人提出过相同问题。
title: "[BUG]"
labels: bug
assignees: ''
---
在提出问题前请先自行排除服务器端问题和升级到最新客户端,同时也请通过搜索确认是否有人提出过相同问题。 在提出问题前请先自行排除服务器端问题和升级到最新客户端,同时也请通过搜索确认是否有人提出过相同问题。
### 预期行为 ### 预期行为
@@ -22,4 +31,3 @@
### 环境信息(客户端请升级至最新正式版) ### 环境信息(客户端请升级至最新正式版)
### 额外信息(可选) ### 额外信息(可选)

20
.github/ISSUE_TEMPLATE/feature---.md vendored Normal file
View File

@@ -0,0 +1,20 @@
---
name: Feature 请求
about: 为这个项目提出一个建议
title: "[Feature request]"
labels: enhancement
assignees: ''
---
**你的功能请求是否与一个问题有关?请描述。**
清楚而简洁地描述问题是什么。例如。我总是感到沮丧,当 [...]
**描述你希望的解决方案**
对你希望发生的事情进行清晰、简明的描述。
**描述你所考虑的替代方案**
对你考虑过的任何替代解决方案或功能进行清晰、简洁的描述。
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -1,4 +1,11 @@
# 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)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/2dust/v2rayN)](https://github.com/2dust/v2rayN/commits/master)
[![CodeFactor](https://www.codefactor.io/repository/github/2dust/v2rayn/badge)](https://www.codefactor.io/repository/github/2dust/v2rayn)
[![GitHub Releases](https://img.shields.io/github/downloads/2dust/v2rayN/latest/total?logo=github)](https://github.com/2dust/v2rayN/releases)
[![Chat on Telegram](https://img.shields.io/badge/Chat%20on-Telegram-brightgreen.svg)](https://t.me/v2rayn)
### 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
@@ -6,5 +13,6 @@
- Run v2rayN.exe - Run v2rayN.exe
### 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://dotnet.microsoft.com/zh-cn/download/dotnet-framework/thank-you/net48-web-installer)
- 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

@@ -1,10 +1,13 @@
using System.Drawing; using System;
using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
namespace v2rayN.Base namespace v2rayN.Base
{ {
class ListViewFlickerFree : ListView class ListViewFlickerFree : ListView
{ {
Action<int, int> _updateFunc;
public ListViewFlickerFree() public ListViewFlickerFree()
{ {
SetStyle(ControlStyles.OptimizedDoubleBuffer SetStyle(ControlStyles.OptimizedDoubleBuffer
@@ -13,40 +16,82 @@ namespace v2rayN.Base
UpdateStyles(); UpdateStyles();
} }
public void RegisterDragEvent(Action<int, int> _update)
public void AutoResizeColumns()
{ {
try _updateFunc = _update;
{ this.AllowDrop = true;
this.SuspendLayout();
Graphics graphics = this.CreateGraphics();
// 原生 ColumnHeaderAutoResizeStyle.ColumnContent 将忽略列头宽度 this.ItemDrag += new ItemDragEventHandler(this.lv_ItemDrag);
this.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); this.DragDrop += new DragEventHandler(this.lv_DragDrop);
this.DragEnter += new DragEventHandler(this.lv_DragEnter);
for (int i = 0; i < this.Columns.Count; i++) this.DragOver += new DragEventHandler(this.lv_DragOver);
{ this.DragLeave += new EventHandler(this.lv_DragLeave);
ColumnHeader c = this.Columns[i];
int cWidth = c.Width;
string MaxStr = "";
Font font = this.Items[0].SubItems[0].Font;
foreach (ListViewItem item in this.Items)
{
// 整行视作相同字形,不单独计算每个单元格
font = item.SubItems[i].Font;
string str = item.SubItems[i].Text;
if (str.Length > MaxStr.Length) // 未考虑非等宽问题
MaxStr = str;
}
int strWidth = (int)graphics.MeasureString(MaxStr, font).Width;
c.Width = System.Math.Max(cWidth, strWidth);
}
this.ResumeLayout();
}
catch { }
} }
private void lv_DragDrop(object sender, DragEventArgs e)
{
int targetIndex = this.InsertionMark.Index;
if (targetIndex == -1)
{
return;
}
if (this.InsertionMark.AppearsAfterItem)
{
targetIndex++;
}
if (this.SelectedIndices.Count <= 0)
{
return;
}
_updateFunc(this.SelectedIndices[0], targetIndex);
//ListViewItem draggedItem = (ListViewItem)e.Data.GetData(typeof(ListViewItem));
//this.BeginUpdate();
//this.Items.Insert(targetIndex, (ListViewItem)draggedItem.Clone());
//this.Items.Remove(draggedItem);
//this.EndUpdate();
}
private void lv_DragEnter(object sender, DragEventArgs e)
{
e.Effect = e.AllowedEffect;
}
private void lv_DragLeave(object sender, EventArgs e)
{
this.InsertionMark.Index = -1;
}
private void lv_DragOver(object sender, DragEventArgs e)
{
Point targetPoint = this.PointToClient(new Point(e.X, e.Y));
int targetIndex = this.InsertionMark.NearestIndex(targetPoint);
if (targetIndex > -1)
{
Rectangle itemBounds = this.GetItemRect(targetIndex);
this.EnsureVisible(targetIndex);
if (targetPoint.Y > itemBounds.Top + (itemBounds.Height / 2))
{
this.InsertionMark.AppearsAfterItem = true;
}
else
{
this.InsertionMark.AppearsAfterItem = false;
}
}
this.InsertionMark.Index = targetIndex;
}
private void lv_ItemDrag(object sender, ItemDragEventArgs e)
{
this.DoDragDrop(e.Item, DragDropEffects.Move);
this.InsertionMark.Index = -1;
}
} }
} }

View File

@@ -31,6 +31,10 @@
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.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();
this.txtRemarks = new System.Windows.Forms.TextBox(); this.txtRemarks = new System.Windows.Forms.TextBox();
@@ -45,23 +49,53 @@
// //
// btnClose // btnClose
// //
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.Name = "btnClose"; this.btnClose.Name = "btnClose";
this.btnClose.UseVisualStyleBackColor = true; this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click); this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
// //
// groupBox1 // groupBox1
// //
resources.ApplyResources(this.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.txtAddress); this.groupBox1.Controls.Add(this.txtAddress);
this.groupBox1.Controls.Add(this.label13); this.groupBox1.Controls.Add(this.label13);
this.groupBox1.Controls.Add(this.txtRemarks); this.groupBox1.Controls.Add(this.txtRemarks);
this.groupBox1.Controls.Add(this.label6); this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.label1); this.groupBox1.Controls.Add(this.label1);
resources.ApplyResources(this.groupBox1, "groupBox1");
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
//
resources.ApplyResources(this.btnBrowse, "btnBrowse");
this.btnBrowse.Name = "btnBrowse";
this.btnBrowse.UseVisualStyleBackColor = true;
this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click);
//
// txtAddress // txtAddress
// //
resources.ApplyResources(this.txtAddress, "txtAddress"); resources.ApplyResources(this.txtAddress, "txtAddress");
@@ -89,9 +123,9 @@
// //
// panel2 // panel2
// //
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Controls.Add(this.btnClose); this.panel2.Controls.Add(this.btnClose);
this.panel2.Controls.Add(this.btnOK); this.panel2.Controls.Add(this.btnOK);
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Name = "panel2"; this.panel2.Name = "panel2";
// //
// btnOK // btnOK
@@ -136,5 +170,9 @@
private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Panel panel2;
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.ComboBox cmbCoreType;
private System.Windows.Forms.Label labCoreType;
private System.Windows.Forms.Button btnEdit;
} }
} }

View File

@@ -1,12 +1,15 @@
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;
using v2rayN.Resx;
namespace v2rayN.Forms namespace v2rayN.Forms
{ {
public partial class AddServer2Form : BaseServerForm public partial class AddServer2Form : BaseServerForm
{ {
public AddServer2Form() public AddServer2Form()
{ {
@@ -15,12 +18,20 @@ namespace v2rayN.Forms
private void AddServer2Form_Load(object sender, EventArgs e) private void AddServer2Form_Load(object sender, EventArgs e)
{ {
if (EditIndex >= 0) cmbCoreType.Items.AddRange(Global.coreTypes.ToArray());
cmbCoreType.Items.Add("clash");
cmbCoreType.Items.Add("hysteria");
cmbCoreType.Items.Add(string.Empty);
txtAddress.ReadOnly = true;
if (vmessItem != null)
{ {
BindingServer(); BindingServer();
} }
else else
{ {
vmessItem = new VmessItem();
vmessItem.groupId = groupId;
ClearServer(); ClearServer();
} }
} }
@@ -30,10 +41,17 @@ namespace v2rayN.Forms
/// </summary> /// </summary>
private void BindingServer() private void BindingServer()
{ {
vmessItem = config.vmess[EditIndex];
txtRemarks.Text = vmessItem.remarks; txtRemarks.Text = vmessItem.remarks;
txtAddress.Text = vmessItem.address; txtAddress.Text = vmessItem.address;
txtAddress.ReadOnly = true;
if (vmessItem.coreType == null)
{
cmbCoreType.Text = string.Empty;
}
else
{
cmbCoreType.Text = vmessItem.coreType.ToString();
}
} }
@@ -50,24 +68,90 @@ namespace v2rayN.Forms
string remarks = txtRemarks.Text; string remarks = txtRemarks.Text;
if (Utils.IsNullOrEmpty(remarks)) if (Utils.IsNullOrEmpty(remarks))
{ {
UI.Show(UIRes.I18N("PleaseFillRemarks")); UI.Show(ResUI.PleaseFillRemarks);
return;
}
if (Utils.IsNullOrEmpty(txtAddress.Text))
{
UI.Show(ResUI.FillServerAddressCustom);
return; 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, EditIndex) == 0) if (ConfigHandler.EditCustomServer(ref config, vmessItem) == 0)
{ {
this.DialogResult = DialogResult.OK; this.DialogResult = DialogResult.OK;
} }
else else
{ {
UI.ShowWarning(UIRes.I18N("OperationFailed")); UI.ShowWarning(ResUI.OperationFailed);
} }
} }
private void btnClose_Click(object sender, EventArgs e) private void btnClose_Click(object sender, EventArgs e)
{ {
this.DialogResult = DialogResult.Cancel; if (Utils.IsNullOrEmpty(vmessItem.indexId))
{
this.DialogResult = DialogResult.Cancel;
}
else
{
this.DialogResult = DialogResult.OK;
}
}
private void btnBrowse_Click(object sender, EventArgs e)
{
UI.Show(ResUI.CustomServerTips);
OpenFileDialog fileDialog = new OpenFileDialog
{
Multiselect = false,
Filter = "Config|*.json|YAML|*.yaml|All|*.*"
};
if (fileDialog.ShowDialog() != DialogResult.OK)
{
return;
}
string fileName = fileDialog.FileName;
if (Utils.IsNullOrEmpty(fileName))
{
return;
}
vmessItem.address = fileName;
vmessItem.remarks = txtRemarks.Text;
if (ConfigHandler.AddCustomServer(ref config, vmessItem, false) == 0)
{
BindingServer();
UI.Show(ResUI.SuccessfullyImportedCustomServer);
}
else
{
UI.ShowWarning(ResUI.FailedImportedCustomServer);
}
}
private void btnEdit_Click(object sender, EventArgs e)
{
var address = txtAddress.Text;
if (Utils.IsNullOrEmpty(address))
{
UI.Show(ResUI.FillServerAddressCustom);
return;
}
address = Path.Combine(Utils.GetConfigPath(), address);
Process.Start(address);
} }
} }
} }

View File

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

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 (EditIndex >= 0)
{
vmessItem = config.vmess[EditIndex];
BindingServer();
}
else
{
vmessItem = new VmessItem();
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, EditIndex) == 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,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 (EditIndex >= 0)
{
vmessItem = config.vmess[EditIndex];
BindingServer();
}
else
{
vmessItem = new VmessItem();
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, EditIndex) == 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,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 (EditIndex >= 0)
{
vmessItem = config.vmess[EditIndex];
BindingServer();
}
else
{
vmessItem = new VmessItem();
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, EditIndex) == 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,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 (EditIndex >= 0)
{
vmessItem = config.vmess[EditIndex];
BindingServer();
}
else
{
vmessItem = new VmessItem();
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, EditIndex) == 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

@@ -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,13 +1,14 @@
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;
using v2rayN.Resx;
namespace v2rayN.Forms namespace v2rayN.Forms
{ {
public partial class AddServerForm : BaseServerForm public partial class AddServerForm : BaseServerForm
{ {
public AddServerForm() public AddServerForm()
{ {
InitializeComponent(); InitializeComponent();
@@ -15,15 +16,57 @@ namespace v2rayN.Forms
private void AddServerForm_Load(object sender, EventArgs e) private void AddServerForm_Load(object sender, EventArgs e)
{ {
cmbSecurity.Items.AddRange(Global.vmessSecuritys.ToArray()); this.Text = (eConfigType).ToString();
if (EditIndex >= 0)
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());
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)
{ {
vmessItem = config.vmess[EditIndex];
BindingServer(); BindingServer();
} }
else else
{ {
vmessItem = new VmessItem(); vmessItem = new VmessItem();
vmessItem.groupId = groupId;
ClearServer(); ClearServer();
} }
} }
@@ -33,178 +76,215 @@ 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();
txtId.Text = vmessItem.id;
txtAlterId.Text = vmessItem.alterId.ToString(); switch (eConfigType)
cmbSecurity.Text = vmessItem.security; {
txtRemarks.Text = vmessItem.remarks; case EConfigType.Vmess:
txtId.Text = vmessItem.id;
txtAlterId.Text = vmessItem.alterId.ToString();
cmbSecurity.Text = vmessItem.security;
break;
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 = "";
txtId.Text = "";
txtAlterId.Text = "0"; switch (eConfigType)
cmbSecurity.Text = Global.DefaultSecurity; {
txtRemarks.Text = ""; case EConfigType.Vmess:
txtId.Text = "";
txtAlterId.Text = "0";
cmbSecurity.Text = Global.DefaultSecurity;
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))
{ {
UI.Show(UIRes.I18N("FillServerAddress")); UI.Show(ResUI.FillServerAddress);
return; return;
} }
if (Utils.IsNullOrEmpty(port) || !Utils.IsNumberic(port)) if (Utils.IsNullOrEmpty(port) || !Utils.IsNumberic(port))
{ {
UI.Show(UIRes.I18N("FillCorrectServerPort")); UI.Show(ResUI.FillCorrectServerPort);
return; return;
} }
if (Utils.IsNullOrEmpty(id)) if (eConfigType == EConfigType.Shadowsocks)
{ {
UI.Show(UIRes.I18N("FillUUID")); if (Utils.IsNullOrEmpty(id))
return; {
UI.Show(ResUI.FillPassword);
return;
}
if (Utils.IsNullOrEmpty(security))
{
UI.Show(ResUI.PleaseSelectEncryption);
return;
}
}
if (eConfigType != EConfigType.Socks)
{
if (Utils.IsNullOrEmpty(id))
{
UI.Show(ResUI.FillUUID);
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;
if (ConfigHandler.AddServer(ref config, vmessItem, EditIndex) == 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;
} }
else else
{ {
UI.ShowWarning(UIRes.I18N("OperationFailed")); UI.ShowWarning(ResUI.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

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

View File

@@ -4,6 +4,7 @@ using System.Windows.Forms;
using v2rayN.Base; using v2rayN.Base;
using v2rayN.Handler; using v2rayN.Handler;
using v2rayN.Mode; using v2rayN.Mode;
using v2rayN.Resx;
namespace v2rayN.Forms namespace v2rayN.Forms
{ {
@@ -104,7 +105,7 @@ namespace v2rayN.Forms
} }
else else
{ {
UI.ShowWarning(UIRes.I18N("OperationFailed")); UI.ShowWarning(ResUI.OperationFailed);
} }
} }

View File

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

View File

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

View File

@@ -117,77 +117,127 @@
<resheader name="writer"> <resheader name="writer">
<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="btnClose.Text" xml:space="preserve"> <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<value>取消(&amp;C)</value> <data name="grbMain.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data> </data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <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"> <data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>220, 20</value> <value>6, 12</value>
</data> </data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing"> <data name="&gt;&gt;grbMain.ZOrder" xml:space="preserve">
<value>65, 12</value> <value>0</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>
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing"> <data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
<value>220, 21</value> <value>292, 21</value>
</data> </data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing"> <data name="btnRemove.Location" type="System.Drawing.Point, System.Drawing">
<value>83, 12</value> <value>525, 21</value>
</data> </data>
<data name="label6.Text" xml:space="preserve"> <data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
<value>别名(remarks)</value> <value>127, 21</value>
</data> </data>
<data name="label5.Size" type="System.Drawing.Size, System.Drawing"> <data name="&gt;&gt;btnRemove.Parent" xml:space="preserve">
<value>101, 12</value> <value>grbMain</value>
</data> </data>
<data name="label5.Text" xml:space="preserve"> <data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>加密(encryption)</value> <value>12, 25</value>
</data> </data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing"> <data name="btnRemove.TabIndex" type="System.Int32, mscorlib">
<value>65, 12</value> <value>24</value>
</data> </data>
<data name="label3.Text" xml:space="preserve"> <data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>用户ID(id)</value> <value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing"> <data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>65, 12</value> <value>GroupSettingControl</value>
</data>
<data name="&gt;&gt;label2.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="&gt;&gt;btnRemove.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;grbMain.Name" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="&gt;&gt;label2.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;label2.Name" xml:space="preserve">
<value>label2</value>
</data>
<data name="btnRemove.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="grbMain.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="grbMain.Size" type="System.Drawing.Size, System.Drawing">
<value>619, 61</value>
</data> </data>
<data name="label2.Text" xml:space="preserve"> <data name="label2.Text" xml:space="preserve">
<value>端口(port)</value> <value>Remarks</value>
</data> </data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing"> <data name="&gt;&gt;txtRemarks.Parent" xml:space="preserve">
<value>83, 12</value> <value>grbMain</value>
</data> </data>
<data name="label1.Text" xml:space="preserve"> <data name="grbMain.Text" xml:space="preserve">
<value>地址(address)</value> <value>Group details</value>
</data> </data>
<data name="groupBox1.Text" xml:space="preserve"> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<value>服务器</value> <data name="label2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data> </data>
<data name="btnOK.Text" xml:space="preserve"> <data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
<value>确定(&amp;O)</value> <value>1</value>
</data> </data>
<data name="$this.Text" xml:space="preserve"> <data name="&gt;&gt;txtRemarks.Type" xml:space="preserve">
<value>编辑或添加[VLESS]服务器</value> <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>47, 12</value>
</data>
<data name="&gt;&gt;txtRemarks.Name" xml:space="preserve">
<value>txtRemarks</value>
</data>
<data name="&gt;&gt;btnRemove.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;btnRemove.Name" xml:space="preserve">
<value>btnRemove</value>
</data>
<data name="grbMain.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="btnRemove.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="&gt;&gt;grbMain.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtRemarks.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;grbMain.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>619, 61</value>
</data>
<data name="btnRemove.Text" xml:space="preserve">
<value>Remove</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root> </root>

View File

@@ -117,50 +117,17 @@
<resheader name="writer"> <resheader name="writer">
<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="btnClose.Text" xml:space="preserve"> <data name="btnRemove.Text" xml:space="preserve">
<value>取消(&amp;C)</value> <value>移除</value>
</data> </data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <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"> <data name="label2.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> <value>29, 12</value>
</data> </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"> <data name="label2.Text" xml:space="preserve">
<value>服务器端口</value> <value>备注</value>
</data> </data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing"> <data name="grbMain.Text" xml:space="preserve">
<value>65, 12</value> <value>分组详情</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> </data>
</root> </root>

View File

@@ -0,0 +1,97 @@
namespace v2rayN.Forms
{
partial class GroupSettingForm
{
/// <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(GroupSettingForm));
this.btnClose = new System.Windows.Forms.Button();
this.panCon = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.btnAdd = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.panel2.SuspendLayout();
this.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);
//
// panCon
//
resources.ApplyResources(this.panCon, "panCon");
this.panCon.Name = "panCon";
//
// panel2
//
this.panel2.Controls.Add(this.btnAdd);
this.panel2.Controls.Add(this.btnClose);
this.panel2.Controls.Add(this.btnOK);
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Name = "panel2";
//
// btnAdd
//
resources.ApplyResources(this.btnAdd, "btnAdd");
this.btnAdd.Name = "btnAdd";
this.btnAdd.UseVisualStyleBackColor = true;
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
//
// btnOK
//
resources.ApplyResources(this.btnOK, "btnOK");
this.btnOK.Name = "btnOK";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// GroupSettingForm
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnClose;
this.Controls.Add(this.panCon);
this.Controls.Add(this.panel2);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "GroupSettingForm";
this.Load += new System.EventHandler(this.GroupSettingForm_Load);
this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Button btnAdd;
private System.Windows.Forms.Panel panCon;
}
}

View File

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

View File

@@ -117,62 +117,157 @@
<resheader name="writer"> <resheader name="writer">
<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="btnClose.Text" xml:space="preserve"> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<value>取消(&amp;C)</value> <data name="btnClose.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data> </data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <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"> <data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
<value>77, 12</value> <value>448, 17</value>
</data> </data>
<data name="label4.Text" xml:space="preserve"> <data name="btnClose.Size" type="System.Drawing.Size, System.Drawing">
<value>用户名(可选)</value> <value>75, 23</value>
</data> </data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing"> <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<value>65, 12</value> <data name="btnClose.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data> </data>
<data name="label3.Text" xml:space="preserve"> <data name="btnClose.Text" xml:space="preserve">
<value>密码(可选)</value> <value>&amp;Cancel</value>
</data> </data>
<data name="label13.Text" xml:space="preserve"> <data name="&gt;&gt;btnClose.Name" xml:space="preserve">
<value>*手填,方便识别管理</value> <value>btnClose</value>
</data> </data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing"> <data name="&gt;&gt;btnClose.Type" xml:space="preserve">
<value>83, 12</value> <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="label6.Text" xml:space="preserve"> <data name="&gt;&gt;btnClose.Parent" xml:space="preserve">
<value>别名(remarks)</value> <value>panel2</value>
</data> </data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing"> <data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
<value>65, 12</value> <value>1</value>
</data> </data>
<data name="label2.Text" xml:space="preserve"> <data name="panCon.AutoScroll" type="System.Boolean, mscorlib">
<value>服务器端口</value> <value>True</value>
</data> </data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing"> <data name="panCon.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>65, 12</value> <value>Fill</value>
</data> </data>
<data name="label1.Text" xml:space="preserve"> <data name="panCon.Location" type="System.Drawing.Point, System.Drawing">
<value>服务器地址</value> <value>0, 0</value>
</data> </data>
<data name="groupBox1.Text" xml:space="preserve"> <data name="panCon.Size" type="System.Drawing.Size, System.Drawing">
<value>服务器</value> <value>614, 351</value>
</data>
<data name="panCon.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="&gt;&gt;panCon.Name" xml:space="preserve">
<value>panCon</value>
</data>
<data name="&gt;&gt;panCon.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panCon.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panCon.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="btnAdd.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnAdd.Location" type="System.Drawing.Point, System.Drawing">
<value>47, 17</value>
</data>
<data name="btnAdd.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="btnAdd.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="btnAdd.Text" xml:space="preserve">
<value>&amp;Add</value>
</data>
<data name="&gt;&gt;btnAdd.Name" xml:space="preserve">
<value>btnAdd</value>
</data>
<data name="&gt;&gt;btnAdd.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnAdd.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;btnAdd.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="btnOK.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
<value>355, 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>
<data name="btnOK.Text" xml:space="preserve"> <data name="btnOK.Text" xml:space="preserve">
<value>确定(&amp;O)</value> <value>&amp;OK</value>
</data> </data>
<data name="menuItemImportClipboard.Size" type="System.Drawing.Size, System.Drawing"> <data name="&gt;&gt;btnOK.Name" xml:space="preserve">
<value>171, 22</value> <value>btnOK</value>
</data> </data>
<data name="menuItemImportClipboard.Text" xml:space="preserve"> <data name="&gt;&gt;btnOK.Type" xml:space="preserve">
<value>从剪贴板导入URL</value> <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="MenuItem1.Size" type="System.Drawing.Size, System.Drawing"> <data name="&gt;&gt;btnOK.Parent" xml:space="preserve">
<value>92, 21</value> <value>panel2</value>
</data> </data>
<data name="MenuItem1.Text" xml:space="preserve"> <data name="&gt;&gt;btnOK.ZOrder" xml:space="preserve">
<value>导入配置文件</value> <value>2</value>
</data>
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 351</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>614, 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>
<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>614, 411</value>
</data> </data>
<data name="$this.Text" xml:space="preserve"> <data name="$this.Text" xml:space="preserve">
<value>编辑或添加[Socks]服务器</value> <value>Group settings</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>GroupSettingForm</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
</root> </root>

View File

@@ -120,59 +120,13 @@
<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"> <data name="btnAdd.Text" xml:space="preserve">
<value>服务器</value> <value>添加(&amp;A)</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>
<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="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"> <data name="$this.Text" xml:space="preserve">
<value>编辑或添加[Shadowsocks]服务器</value> <value>服务器分组设置</value>
</data> </data>
</root> </root>

View File

@@ -47,6 +47,7 @@
this.menuCopyServer = new System.Windows.Forms.ToolStripMenuItem(); this.menuCopyServer = new System.Windows.Forms.ToolStripMenuItem();
this.menuSetDefaultServer = new System.Windows.Forms.ToolStripMenuItem(); this.menuSetDefaultServer = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.menuMoveToGroup = new System.Windows.Forms.ToolStripMenuItem();
this.menuMoveTop = new System.Windows.Forms.ToolStripMenuItem(); this.menuMoveTop = new System.Windows.Forms.ToolStripMenuItem();
this.menuMoveUp = new System.Windows.Forms.ToolStripMenuItem(); this.menuMoveUp = new System.Windows.Forms.ToolStripMenuItem();
this.menuMoveDown = new System.Windows.Forms.ToolStripMenuItem(); this.menuMoveDown = new System.Windows.Forms.ToolStripMenuItem();
@@ -65,6 +66,7 @@
this.menuExport2ShareUrl = new System.Windows.Forms.ToolStripMenuItem(); this.menuExport2ShareUrl = new System.Windows.Forms.ToolStripMenuItem();
this.menuExport2SubContent = new System.Windows.Forms.ToolStripMenuItem(); this.menuExport2SubContent = new System.Windows.Forms.ToolStripMenuItem();
this.tsbServer = new System.Windows.Forms.ToolStripDropDownButton(); this.tsbServer = new System.Windows.Forms.ToolStripDropDownButton();
this.tabGroup = new System.Windows.Forms.TabControl();
this.qrCodeControl = new v2rayN.Forms.QRCodeControl(); this.qrCodeControl = new v2rayN.Forms.QRCodeControl();
this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
@@ -100,7 +102,6 @@
this.menuUpdateSubViaProxy = new System.Windows.Forms.ToolStripMenuItem(); this.menuUpdateSubViaProxy = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.menuExit = new System.Windows.Forms.ToolStripMenuItem(); this.menuExit = new System.Windows.Forms.ToolStripMenuItem();
this.bgwScan = new System.ComponentModel.BackgroundWorker();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.tsMain = new System.Windows.Forms.ToolStrip(); this.tsMain = new System.Windows.Forms.ToolStrip();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
@@ -114,6 +115,7 @@
this.tsbOptionSetting = new System.Windows.Forms.ToolStripMenuItem(); this.tsbOptionSetting = new System.Windows.Forms.ToolStripMenuItem();
this.tsbRoutingSetting = new System.Windows.Forms.ToolStripMenuItem(); this.tsbRoutingSetting = new System.Windows.Forms.ToolStripMenuItem();
this.tsbGlobalHotkeySetting = new System.Windows.Forms.ToolStripMenuItem(); this.tsbGlobalHotkeySetting = new System.Windows.Forms.ToolStripMenuItem();
this.tsbGroupSetting = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator14 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator14 = new System.Windows.Forms.ToolStripSeparator();
this.tsbBackupGuiNConfig = new System.Windows.Forms.ToolStripMenuItem(); this.tsbBackupGuiNConfig = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
@@ -161,19 +163,18 @@
// //
// scMain.Panel1 // scMain.Panel1
// //
resources.ApplyResources(this.scMain.Panel1, "scMain.Panel1");
this.scMain.Panel1.Controls.Add(this.lvServers); this.scMain.Panel1.Controls.Add(this.lvServers);
this.scMain.Panel1.Controls.Add(this.tabGroup);
// //
// scMain.Panel2 // scMain.Panel2
// //
resources.ApplyResources(this.scMain.Panel2, "scMain.Panel2");
this.scMain.Panel2.Controls.Add(this.qrCodeControl); this.scMain.Panel2.Controls.Add(this.qrCodeControl);
this.scMain.TabStop = false; this.scMain.TabStop = false;
// //
// lvServers // lvServers
// //
resources.ApplyResources(this.lvServers, "lvServers");
this.lvServers.ContextMenuStrip = this.cmsLv; this.lvServers.ContextMenuStrip = this.cmsLv;
resources.ApplyResources(this.lvServers, "lvServers");
this.lvServers.FullRowSelect = true; this.lvServers.FullRowSelect = true;
this.lvServers.GridLines = true; this.lvServers.GridLines = true;
this.lvServers.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; this.lvServers.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
@@ -192,7 +193,6 @@
// //
// cmsLv // cmsLv
// //
resources.ApplyResources(this.cmsLv, "cmsLv");
this.cmsLv.ImageScalingSize = new System.Drawing.Size(20, 20); this.cmsLv.ImageScalingSize = new System.Drawing.Size(20, 20);
this.cmsLv.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cmsLv.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuAddVmessServer, this.menuAddVmessServer,
@@ -209,6 +209,7 @@
this.menuCopyServer, this.menuCopyServer,
this.menuSetDefaultServer, this.menuSetDefaultServer,
this.toolStripSeparator3, this.toolStripSeparator3,
this.menuMoveToGroup,
this.menuMoveTop, this.menuMoveTop,
this.menuMoveUp, this.menuMoveUp,
this.menuMoveDown, this.menuMoveDown,
@@ -227,196 +228,211 @@
this.menuExport2ShareUrl, this.menuExport2ShareUrl,
this.menuExport2SubContent}); this.menuExport2SubContent});
this.cmsLv.Name = "cmsLv"; this.cmsLv.Name = "cmsLv";
this.cmsLv.OwnerItem = this.tsbServer;
resources.ApplyResources(this.cmsLv, "cmsLv");
// //
// menuAddVmessServer // menuAddVmessServer
// //
resources.ApplyResources(this.menuAddVmessServer, "menuAddVmessServer");
this.menuAddVmessServer.Name = "menuAddVmessServer"; this.menuAddVmessServer.Name = "menuAddVmessServer";
resources.ApplyResources(this.menuAddVmessServer, "menuAddVmessServer");
this.menuAddVmessServer.Click += new System.EventHandler(this.menuAddVmessServer_Click); this.menuAddVmessServer.Click += new System.EventHandler(this.menuAddVmessServer_Click);
// //
// menuAddVlessServer // menuAddVlessServer
// //
resources.ApplyResources(this.menuAddVlessServer, "menuAddVlessServer");
this.menuAddVlessServer.Name = "menuAddVlessServer"; this.menuAddVlessServer.Name = "menuAddVlessServer";
resources.ApplyResources(this.menuAddVlessServer, "menuAddVlessServer");
this.menuAddVlessServer.Click += new System.EventHandler(this.menuAddVlessServer_Click); this.menuAddVlessServer.Click += new System.EventHandler(this.menuAddVlessServer_Click);
// //
// menuAddShadowsocksServer // menuAddShadowsocksServer
// //
resources.ApplyResources(this.menuAddShadowsocksServer, "menuAddShadowsocksServer");
this.menuAddShadowsocksServer.Name = "menuAddShadowsocksServer"; this.menuAddShadowsocksServer.Name = "menuAddShadowsocksServer";
resources.ApplyResources(this.menuAddShadowsocksServer, "menuAddShadowsocksServer");
this.menuAddShadowsocksServer.Click += new System.EventHandler(this.menuAddShadowsocksServer_Click); this.menuAddShadowsocksServer.Click += new System.EventHandler(this.menuAddShadowsocksServer_Click);
// //
// menuAddSocksServer // menuAddSocksServer
// //
resources.ApplyResources(this.menuAddSocksServer, "menuAddSocksServer");
this.menuAddSocksServer.Name = "menuAddSocksServer"; this.menuAddSocksServer.Name = "menuAddSocksServer";
resources.ApplyResources(this.menuAddSocksServer, "menuAddSocksServer");
this.menuAddSocksServer.Click += new System.EventHandler(this.menuAddSocksServer_Click); this.menuAddSocksServer.Click += new System.EventHandler(this.menuAddSocksServer_Click);
// //
// menuAddTrojanServer // menuAddTrojanServer
// //
resources.ApplyResources(this.menuAddTrojanServer, "menuAddTrojanServer");
this.menuAddTrojanServer.Name = "menuAddTrojanServer"; this.menuAddTrojanServer.Name = "menuAddTrojanServer";
resources.ApplyResources(this.menuAddTrojanServer, "menuAddTrojanServer");
this.menuAddTrojanServer.Click += new System.EventHandler(this.menuAddTrojanServer_Click); this.menuAddTrojanServer.Click += new System.EventHandler(this.menuAddTrojanServer_Click);
// //
// menuAddCustomServer // menuAddCustomServer
// //
resources.ApplyResources(this.menuAddCustomServer, "menuAddCustomServer");
this.menuAddCustomServer.Name = "menuAddCustomServer"; this.menuAddCustomServer.Name = "menuAddCustomServer";
resources.ApplyResources(this.menuAddCustomServer, "menuAddCustomServer");
this.menuAddCustomServer.Click += new System.EventHandler(this.menuAddCustomServer_Click); this.menuAddCustomServer.Click += new System.EventHandler(this.menuAddCustomServer_Click);
// //
// menuAddServers // menuAddServers
// //
resources.ApplyResources(this.menuAddServers, "menuAddServers");
this.menuAddServers.Name = "menuAddServers"; this.menuAddServers.Name = "menuAddServers";
resources.ApplyResources(this.menuAddServers, "menuAddServers");
this.menuAddServers.Click += new System.EventHandler(this.menuAddServers_Click); this.menuAddServers.Click += new System.EventHandler(this.menuAddServers_Click);
// //
// menuScanScreen // menuScanScreen
// //
resources.ApplyResources(this.menuScanScreen, "menuScanScreen");
this.menuScanScreen.Name = "menuScanScreen"; this.menuScanScreen.Name = "menuScanScreen";
resources.ApplyResources(this.menuScanScreen, "menuScanScreen");
this.menuScanScreen.Click += new System.EventHandler(this.menuScanScreen_Click); this.menuScanScreen.Click += new System.EventHandler(this.menuScanScreen_Click);
// //
// toolStripSeparator1 // toolStripSeparator1
// //
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Name = "toolStripSeparator1";
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
// //
// menuRemoveServer // menuRemoveServer
// //
resources.ApplyResources(this.menuRemoveServer, "menuRemoveServer");
this.menuRemoveServer.Name = "menuRemoveServer"; this.menuRemoveServer.Name = "menuRemoveServer";
resources.ApplyResources(this.menuRemoveServer, "menuRemoveServer");
this.menuRemoveServer.Click += new System.EventHandler(this.menuRemoveServer_Click); this.menuRemoveServer.Click += new System.EventHandler(this.menuRemoveServer_Click);
// //
// menuRemoveDuplicateServer // menuRemoveDuplicateServer
// //
resources.ApplyResources(this.menuRemoveDuplicateServer, "menuRemoveDuplicateServer");
this.menuRemoveDuplicateServer.Name = "menuRemoveDuplicateServer"; this.menuRemoveDuplicateServer.Name = "menuRemoveDuplicateServer";
resources.ApplyResources(this.menuRemoveDuplicateServer, "menuRemoveDuplicateServer");
this.menuRemoveDuplicateServer.Click += new System.EventHandler(this.menuRemoveDuplicateServer_Click); this.menuRemoveDuplicateServer.Click += new System.EventHandler(this.menuRemoveDuplicateServer_Click);
// //
// menuCopyServer // menuCopyServer
// //
resources.ApplyResources(this.menuCopyServer, "menuCopyServer");
this.menuCopyServer.Name = "menuCopyServer"; this.menuCopyServer.Name = "menuCopyServer";
resources.ApplyResources(this.menuCopyServer, "menuCopyServer");
this.menuCopyServer.Click += new System.EventHandler(this.menuCopyServer_Click); this.menuCopyServer.Click += new System.EventHandler(this.menuCopyServer_Click);
// //
// menuSetDefaultServer // menuSetDefaultServer
// //
resources.ApplyResources(this.menuSetDefaultServer, "menuSetDefaultServer");
this.menuSetDefaultServer.Name = "menuSetDefaultServer"; this.menuSetDefaultServer.Name = "menuSetDefaultServer";
resources.ApplyResources(this.menuSetDefaultServer, "menuSetDefaultServer");
this.menuSetDefaultServer.Click += new System.EventHandler(this.menuSetDefaultServer_Click); this.menuSetDefaultServer.Click += new System.EventHandler(this.menuSetDefaultServer_Click);
// //
// toolStripSeparator3 // toolStripSeparator3
// //
resources.ApplyResources(this.toolStripSeparator3, "toolStripSeparator3");
this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Name = "toolStripSeparator3";
resources.ApplyResources(this.toolStripSeparator3, "toolStripSeparator3");
//
// menuMoveToGroup
//
this.menuMoveToGroup.Name = "menuMoveToGroup";
resources.ApplyResources(this.menuMoveToGroup, "menuMoveToGroup");
this.menuMoveToGroup.Click += new System.EventHandler(this.menuMoveToGroup_Click);
// //
// menuMoveTop // menuMoveTop
// //
resources.ApplyResources(this.menuMoveTop, "menuMoveTop");
this.menuMoveTop.Name = "menuMoveTop"; this.menuMoveTop.Name = "menuMoveTop";
resources.ApplyResources(this.menuMoveTop, "menuMoveTop");
this.menuMoveTop.Click += new System.EventHandler(this.menuMoveTop_Click); this.menuMoveTop.Click += new System.EventHandler(this.menuMoveTop_Click);
// //
// menuMoveUp // menuMoveUp
// //
resources.ApplyResources(this.menuMoveUp, "menuMoveUp");
this.menuMoveUp.Name = "menuMoveUp"; this.menuMoveUp.Name = "menuMoveUp";
resources.ApplyResources(this.menuMoveUp, "menuMoveUp");
this.menuMoveUp.Click += new System.EventHandler(this.menuMoveUp_Click); this.menuMoveUp.Click += new System.EventHandler(this.menuMoveUp_Click);
// //
// menuMoveDown // menuMoveDown
// //
resources.ApplyResources(this.menuMoveDown, "menuMoveDown");
this.menuMoveDown.Name = "menuMoveDown"; this.menuMoveDown.Name = "menuMoveDown";
resources.ApplyResources(this.menuMoveDown, "menuMoveDown");
this.menuMoveDown.Click += new System.EventHandler(this.menuMoveDown_Click); this.menuMoveDown.Click += new System.EventHandler(this.menuMoveDown_Click);
// //
// menuMoveBottom // menuMoveBottom
// //
resources.ApplyResources(this.menuMoveBottom, "menuMoveBottom");
this.menuMoveBottom.Name = "menuMoveBottom"; this.menuMoveBottom.Name = "menuMoveBottom";
resources.ApplyResources(this.menuMoveBottom, "menuMoveBottom");
this.menuMoveBottom.Click += new System.EventHandler(this.menuMoveBottom_Click); this.menuMoveBottom.Click += new System.EventHandler(this.menuMoveBottom_Click);
// //
// menuSelectAll // menuSelectAll
// //
resources.ApplyResources(this.menuSelectAll, "menuSelectAll");
this.menuSelectAll.Name = "menuSelectAll"; this.menuSelectAll.Name = "menuSelectAll";
resources.ApplyResources(this.menuSelectAll, "menuSelectAll");
this.menuSelectAll.Click += new System.EventHandler(this.menuSelectAll_Click); this.menuSelectAll.Click += new System.EventHandler(this.menuSelectAll_Click);
// //
// toolStripSeparator9 // toolStripSeparator9
// //
resources.ApplyResources(this.toolStripSeparator9, "toolStripSeparator9");
this.toolStripSeparator9.Name = "toolStripSeparator9"; this.toolStripSeparator9.Name = "toolStripSeparator9";
resources.ApplyResources(this.toolStripSeparator9, "toolStripSeparator9");
// //
// menuPingServer // menuPingServer
// //
resources.ApplyResources(this.menuPingServer, "menuPingServer");
this.menuPingServer.Name = "menuPingServer"; this.menuPingServer.Name = "menuPingServer";
resources.ApplyResources(this.menuPingServer, "menuPingServer");
this.menuPingServer.Click += new System.EventHandler(this.menuPingServer_Click); this.menuPingServer.Click += new System.EventHandler(this.menuPingServer_Click);
// //
// menuTcpingServer // menuTcpingServer
// //
resources.ApplyResources(this.menuTcpingServer, "menuTcpingServer");
this.menuTcpingServer.Name = "menuTcpingServer"; this.menuTcpingServer.Name = "menuTcpingServer";
resources.ApplyResources(this.menuTcpingServer, "menuTcpingServer");
this.menuTcpingServer.Click += new System.EventHandler(this.menuTcpingServer_Click); this.menuTcpingServer.Click += new System.EventHandler(this.menuTcpingServer_Click);
// //
// menuRealPingServer // menuRealPingServer
// //
resources.ApplyResources(this.menuRealPingServer, "menuRealPingServer");
this.menuRealPingServer.Name = "menuRealPingServer"; this.menuRealPingServer.Name = "menuRealPingServer";
resources.ApplyResources(this.menuRealPingServer, "menuRealPingServer");
this.menuRealPingServer.Click += new System.EventHandler(this.menuRealPingServer_Click); this.menuRealPingServer.Click += new System.EventHandler(this.menuRealPingServer_Click);
// //
// menuSpeedServer // menuSpeedServer
// //
resources.ApplyResources(this.menuSpeedServer, "menuSpeedServer");
this.menuSpeedServer.Name = "menuSpeedServer"; this.menuSpeedServer.Name = "menuSpeedServer";
resources.ApplyResources(this.menuSpeedServer, "menuSpeedServer");
this.menuSpeedServer.Click += new System.EventHandler(this.menuSpeedServer_Click); this.menuSpeedServer.Click += new System.EventHandler(this.menuSpeedServer_Click);
// //
// tsbTestMe // tsbTestMe
// //
resources.ApplyResources(this.tsbTestMe, "tsbTestMe");
this.tsbTestMe.Name = "tsbTestMe"; this.tsbTestMe.Name = "tsbTestMe";
resources.ApplyResources(this.tsbTestMe, "tsbTestMe");
this.tsbTestMe.Click += new System.EventHandler(this.tsbTestMe_Click); this.tsbTestMe.Click += new System.EventHandler(this.tsbTestMe_Click);
// //
// menuClearServerStatistics // menuClearServerStatistics
// //
resources.ApplyResources(this.menuClearServerStatistics, "menuClearServerStatistics");
this.menuClearServerStatistics.Name = "menuClearServerStatistics"; this.menuClearServerStatistics.Name = "menuClearServerStatistics";
resources.ApplyResources(this.menuClearServerStatistics, "menuClearServerStatistics");
this.menuClearServerStatistics.Click += new System.EventHandler(this.menuClearStatistic_Click); this.menuClearServerStatistics.Click += new System.EventHandler(this.menuClearStatistic_Click);
// //
// toolStripSeparator6 // toolStripSeparator6
// //
resources.ApplyResources(this.toolStripSeparator6, "toolStripSeparator6");
this.toolStripSeparator6.Name = "toolStripSeparator6"; this.toolStripSeparator6.Name = "toolStripSeparator6";
resources.ApplyResources(this.toolStripSeparator6, "toolStripSeparator6");
// //
// menuExport2ClientConfig // menuExport2ClientConfig
// //
resources.ApplyResources(this.menuExport2ClientConfig, "menuExport2ClientConfig");
this.menuExport2ClientConfig.Name = "menuExport2ClientConfig"; this.menuExport2ClientConfig.Name = "menuExport2ClientConfig";
resources.ApplyResources(this.menuExport2ClientConfig, "menuExport2ClientConfig");
this.menuExport2ClientConfig.Click += new System.EventHandler(this.menuExport2ClientConfig_Click); this.menuExport2ClientConfig.Click += new System.EventHandler(this.menuExport2ClientConfig_Click);
// //
// menuExport2ServerConfig // menuExport2ServerConfig
// //
resources.ApplyResources(this.menuExport2ServerConfig, "menuExport2ServerConfig");
this.menuExport2ServerConfig.Name = "menuExport2ServerConfig"; this.menuExport2ServerConfig.Name = "menuExport2ServerConfig";
resources.ApplyResources(this.menuExport2ServerConfig, "menuExport2ServerConfig");
this.menuExport2ServerConfig.Click += new System.EventHandler(this.menuExport2ServerConfig_Click); this.menuExport2ServerConfig.Click += new System.EventHandler(this.menuExport2ServerConfig_Click);
// //
// menuExport2ShareUrl // menuExport2ShareUrl
// //
resources.ApplyResources(this.menuExport2ShareUrl, "menuExport2ShareUrl");
this.menuExport2ShareUrl.Name = "menuExport2ShareUrl"; this.menuExport2ShareUrl.Name = "menuExport2ShareUrl";
resources.ApplyResources(this.menuExport2ShareUrl, "menuExport2ShareUrl");
this.menuExport2ShareUrl.Click += new System.EventHandler(this.menuExport2ShareUrl_Click); this.menuExport2ShareUrl.Click += new System.EventHandler(this.menuExport2ShareUrl_Click);
// //
// menuExport2SubContent // menuExport2SubContent
// //
resources.ApplyResources(this.menuExport2SubContent, "menuExport2SubContent");
this.menuExport2SubContent.Name = "menuExport2SubContent"; this.menuExport2SubContent.Name = "menuExport2SubContent";
resources.ApplyResources(this.menuExport2SubContent, "menuExport2SubContent");
this.menuExport2SubContent.Click += new System.EventHandler(this.menuExport2SubContent_Click); this.menuExport2SubContent.Click += new System.EventHandler(this.menuExport2SubContent_Click);
// //
// tsbServer // tsbServer
// //
resources.ApplyResources(this.tsbServer, "tsbServer");
this.tsbServer.DropDown = this.cmsLv; this.tsbServer.DropDown = this.cmsLv;
this.tsbServer.Image = global::v2rayN.Properties.Resources.server; this.tsbServer.Image = global::v2rayN.Properties.Resources.server;
resources.ApplyResources(this.tsbServer, "tsbServer");
this.tsbServer.Name = "tsbServer"; this.tsbServer.Name = "tsbServer";
// //
// tabGroup
//
resources.ApplyResources(this.tabGroup, "tabGroup");
this.tabGroup.Name = "tabGroup";
this.tabGroup.SelectedIndex = 0;
this.tabGroup.SelectedIndexChanged += new System.EventHandler(this.tabGroup_SelectedIndexChanged);
//
// qrCodeControl // qrCodeControl
// //
resources.ApplyResources(this.qrCodeControl, "qrCodeControl"); resources.ApplyResources(this.qrCodeControl, "qrCodeControl");
@@ -429,35 +445,33 @@
// //
// splitContainer1.Panel1 // splitContainer1.Panel1
// //
resources.ApplyResources(this.splitContainer1.Panel1, "splitContainer1.Panel1");
this.splitContainer1.Panel1.Controls.Add(this.groupBox1); this.splitContainer1.Panel1.Controls.Add(this.groupBox1);
// //
// splitContainer1.Panel2 // splitContainer1.Panel2
// //
resources.ApplyResources(this.splitContainer1.Panel2, "splitContainer1.Panel2");
this.splitContainer1.Panel2.Controls.Add(this.gbMsgTitle); this.splitContainer1.Panel2.Controls.Add(this.gbMsgTitle);
// //
// groupBox1 // groupBox1
// //
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Controls.Add(this.scMain); this.groupBox1.Controls.Add(this.scMain);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
// //
// gbMsgTitle // gbMsgTitle
// //
resources.ApplyResources(this.gbMsgTitle, "gbMsgTitle");
this.gbMsgTitle.Controls.Add(this.txtMsgBox); this.gbMsgTitle.Controls.Add(this.txtMsgBox);
this.gbMsgTitle.Controls.Add(this.ssMain); this.gbMsgTitle.Controls.Add(this.ssMain);
resources.ApplyResources(this.gbMsgTitle, "gbMsgTitle");
this.gbMsgTitle.Name = "gbMsgTitle"; this.gbMsgTitle.Name = "gbMsgTitle";
this.gbMsgTitle.TabStop = false; this.gbMsgTitle.TabStop = false;
// //
// txtMsgBox // txtMsgBox
// //
resources.ApplyResources(this.txtMsgBox, "txtMsgBox");
this.txtMsgBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(49)))), ((int)(((byte)(52))))); this.txtMsgBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(49)))), ((int)(((byte)(52)))));
this.txtMsgBox.BorderStyle = System.Windows.Forms.BorderStyle.None; this.txtMsgBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtMsgBox.ContextMenuStrip = this.cmsMsgBox; this.txtMsgBox.ContextMenuStrip = this.cmsMsgBox;
resources.ApplyResources(this.txtMsgBox, "txtMsgBox");
this.txtMsgBox.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(226)))), ((int)(((byte)(228))))); this.txtMsgBox.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(226)))), ((int)(((byte)(228)))));
this.txtMsgBox.Name = "txtMsgBox"; this.txtMsgBox.Name = "txtMsgBox";
this.txtMsgBox.ReadOnly = true; this.txtMsgBox.ReadOnly = true;
@@ -465,7 +479,6 @@
// //
// cmsMsgBox // cmsMsgBox
// //
resources.ApplyResources(this.cmsMsgBox, "cmsMsgBox");
this.cmsMsgBox.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cmsMsgBox.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuMsgBoxSelectAll, this.menuMsgBoxSelectAll,
this.menuMsgBoxCopy, this.menuMsgBoxCopy,
@@ -474,46 +487,46 @@
this.menuMsgBoxAddRoutingRule, this.menuMsgBoxAddRoutingRule,
this.menuMsgBoxFilter}); this.menuMsgBoxFilter});
this.cmsMsgBox.Name = "cmsMsgBox"; this.cmsMsgBox.Name = "cmsMsgBox";
resources.ApplyResources(this.cmsMsgBox, "cmsMsgBox");
// //
// menuMsgBoxSelectAll // menuMsgBoxSelectAll
// //
resources.ApplyResources(this.menuMsgBoxSelectAll, "menuMsgBoxSelectAll");
this.menuMsgBoxSelectAll.Name = "menuMsgBoxSelectAll"; this.menuMsgBoxSelectAll.Name = "menuMsgBoxSelectAll";
resources.ApplyResources(this.menuMsgBoxSelectAll, "menuMsgBoxSelectAll");
this.menuMsgBoxSelectAll.Click += new System.EventHandler(this.menuMsgBoxSelectAll_Click); this.menuMsgBoxSelectAll.Click += new System.EventHandler(this.menuMsgBoxSelectAll_Click);
// //
// menuMsgBoxCopy // menuMsgBoxCopy
// //
resources.ApplyResources(this.menuMsgBoxCopy, "menuMsgBoxCopy");
this.menuMsgBoxCopy.Name = "menuMsgBoxCopy"; this.menuMsgBoxCopy.Name = "menuMsgBoxCopy";
resources.ApplyResources(this.menuMsgBoxCopy, "menuMsgBoxCopy");
this.menuMsgBoxCopy.Click += new System.EventHandler(this.menuMsgBoxCopy_Click); this.menuMsgBoxCopy.Click += new System.EventHandler(this.menuMsgBoxCopy_Click);
// //
// menuMsgBoxCopyAll // menuMsgBoxCopyAll
// //
resources.ApplyResources(this.menuMsgBoxCopyAll, "menuMsgBoxCopyAll");
this.menuMsgBoxCopyAll.Name = "menuMsgBoxCopyAll"; this.menuMsgBoxCopyAll.Name = "menuMsgBoxCopyAll";
resources.ApplyResources(this.menuMsgBoxCopyAll, "menuMsgBoxCopyAll");
this.menuMsgBoxCopyAll.Click += new System.EventHandler(this.menuMsgBoxCopyAll_Click); this.menuMsgBoxCopyAll.Click += new System.EventHandler(this.menuMsgBoxCopyAll_Click);
// //
// menuMsgBoxClear // menuMsgBoxClear
// //
resources.ApplyResources(this.menuMsgBoxClear, "menuMsgBoxClear");
this.menuMsgBoxClear.Name = "menuMsgBoxClear"; this.menuMsgBoxClear.Name = "menuMsgBoxClear";
resources.ApplyResources(this.menuMsgBoxClear, "menuMsgBoxClear");
this.menuMsgBoxClear.Click += new System.EventHandler(this.menuMsgBoxClear_Click); this.menuMsgBoxClear.Click += new System.EventHandler(this.menuMsgBoxClear_Click);
// //
// menuMsgBoxAddRoutingRule // menuMsgBoxAddRoutingRule
// //
resources.ApplyResources(this.menuMsgBoxAddRoutingRule, "menuMsgBoxAddRoutingRule");
this.menuMsgBoxAddRoutingRule.Name = "menuMsgBoxAddRoutingRule"; this.menuMsgBoxAddRoutingRule.Name = "menuMsgBoxAddRoutingRule";
resources.ApplyResources(this.menuMsgBoxAddRoutingRule, "menuMsgBoxAddRoutingRule");
this.menuMsgBoxAddRoutingRule.Click += new System.EventHandler(this.menuMsgBoxAddRoutingRule_Click); this.menuMsgBoxAddRoutingRule.Click += new System.EventHandler(this.menuMsgBoxAddRoutingRule_Click);
// //
// menuMsgBoxFilter // menuMsgBoxFilter
// //
resources.ApplyResources(this.menuMsgBoxFilter, "menuMsgBoxFilter");
this.menuMsgBoxFilter.Name = "menuMsgBoxFilter"; this.menuMsgBoxFilter.Name = "menuMsgBoxFilter";
resources.ApplyResources(this.menuMsgBoxFilter, "menuMsgBoxFilter");
this.menuMsgBoxFilter.Click += new System.EventHandler(this.menuMsgBoxFilter_Click); this.menuMsgBoxFilter.Click += new System.EventHandler(this.menuMsgBoxFilter_Click);
// //
// ssMain // ssMain
// //
resources.ApplyResources(this.ssMain, "ssMain");
this.ssMain.ImageScalingSize = new System.Drawing.Size(20, 20); this.ssMain.ImageScalingSize = new System.Drawing.Size(20, 20);
this.ssMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.ssMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolSslInboundInfo, this.toolSslInboundInfo,
@@ -522,13 +535,14 @@
this.toolSslBlank2, this.toolSslBlank2,
this.toolSslServerSpeed, this.toolSslServerSpeed,
this.toolSslBlank4}); this.toolSslBlank4});
resources.ApplyResources(this.ssMain, "ssMain");
this.ssMain.Name = "ssMain"; this.ssMain.Name = "ssMain";
this.ssMain.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.ssMain_ItemClicked); this.ssMain.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.ssMain_ItemClicked);
// //
// toolSslInboundInfo // toolSslInboundInfo
// //
resources.ApplyResources(this.toolSslInboundInfo, "toolSslInboundInfo");
this.toolSslInboundInfo.Name = "toolSslInboundInfo"; this.toolSslInboundInfo.Name = "toolSslInboundInfo";
resources.ApplyResources(this.toolSslInboundInfo, "toolSslInboundInfo");
// //
// toolSslBlank1 // toolSslBlank1
// //
@@ -538,13 +552,13 @@
// //
// toolSslRoutingRule // toolSslRoutingRule
// //
resources.ApplyResources(this.toolSslRoutingRule, "toolSslRoutingRule");
this.toolSslRoutingRule.Name = "toolSslRoutingRule"; this.toolSslRoutingRule.Name = "toolSslRoutingRule";
resources.ApplyResources(this.toolSslRoutingRule, "toolSslRoutingRule");
// //
// toolSslBlank2 // toolSslBlank2
// //
resources.ApplyResources(this.toolSslBlank2, "toolSslBlank2");
this.toolSslBlank2.Name = "toolSslBlank2"; this.toolSslBlank2.Name = "toolSslBlank2";
resources.ApplyResources(this.toolSslBlank2, "toolSslBlank2");
this.toolSslBlank2.Spring = true; this.toolSslBlank2.Spring = true;
// //
// toolSslServerSpeed // toolSslServerSpeed
@@ -555,19 +569,19 @@
// //
// toolSslBlank4 // toolSslBlank4
// //
resources.ApplyResources(this.toolSslBlank4, "toolSslBlank4");
this.toolSslBlank4.Name = "toolSslBlank4"; this.toolSslBlank4.Name = "toolSslBlank4";
resources.ApplyResources(this.toolSslBlank4, "toolSslBlank4");
// //
// notifyMain // notifyMain
// //
resources.ApplyResources(this.notifyMain, "notifyMain");
this.notifyMain.ContextMenuStrip = this.cmsMain; this.notifyMain.ContextMenuStrip = this.cmsMain;
resources.ApplyResources(this.notifyMain, "notifyMain");
this.notifyMain.MouseClick += new System.Windows.Forms.MouseEventHandler(this.notifyMain_MouseClick); this.notifyMain.MouseClick += new System.Windows.Forms.MouseEventHandler(this.notifyMain_MouseClick);
// //
// cmsMain // cmsMain
// //
resources.ApplyResources(this.cmsMain, "cmsMain");
this.cmsMain.ImageScalingSize = new System.Drawing.Size(20, 20); this.cmsMain.ImageScalingSize = new System.Drawing.Size(20, 20);
resources.ApplyResources(this.cmsMain, "cmsMain");
this.cmsMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cmsMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuSysAgentMode, this.menuSysAgentMode,
this.menuRoutings, this.menuRoutings,
@@ -587,95 +601,89 @@
// //
// menuSysAgentMode // menuSysAgentMode
// //
resources.ApplyResources(this.menuSysAgentMode, "menuSysAgentMode");
this.menuSysAgentMode.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuSysAgentMode.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuKeepClear, this.menuKeepClear,
this.menuGlobal, this.menuGlobal,
this.menuKeepNothing}); this.menuKeepNothing});
this.menuSysAgentMode.Name = "menuSysAgentMode"; this.menuSysAgentMode.Name = "menuSysAgentMode";
resources.ApplyResources(this.menuSysAgentMode, "menuSysAgentMode");
// //
// menuKeepClear // menuKeepClear
// //
resources.ApplyResources(this.menuKeepClear, "menuKeepClear");
this.menuKeepClear.Name = "menuKeepClear"; this.menuKeepClear.Name = "menuKeepClear";
resources.ApplyResources(this.menuKeepClear, "menuKeepClear");
this.menuKeepClear.Click += new System.EventHandler(this.menuKeepClear_Click); this.menuKeepClear.Click += new System.EventHandler(this.menuKeepClear_Click);
// //
// menuGlobal // menuGlobal
// //
resources.ApplyResources(this.menuGlobal, "menuGlobal");
this.menuGlobal.Name = "menuGlobal"; this.menuGlobal.Name = "menuGlobal";
resources.ApplyResources(this.menuGlobal, "menuGlobal");
this.menuGlobal.Click += new System.EventHandler(this.menuGlobal_Click); this.menuGlobal.Click += new System.EventHandler(this.menuGlobal_Click);
// //
// menuKeepNothing // menuKeepNothing
// //
resources.ApplyResources(this.menuKeepNothing, "menuKeepNothing");
this.menuKeepNothing.Name = "menuKeepNothing"; this.menuKeepNothing.Name = "menuKeepNothing";
resources.ApplyResources(this.menuKeepNothing, "menuKeepNothing");
this.menuKeepNothing.Click += new System.EventHandler(this.menuKeepNothing_Click); this.menuKeepNothing.Click += new System.EventHandler(this.menuKeepNothing_Click);
// //
// menuRoutings // menuRoutings
// //
resources.ApplyResources(this.menuRoutings, "menuRoutings");
this.menuRoutings.Name = "menuRoutings"; this.menuRoutings.Name = "menuRoutings";
resources.ApplyResources(this.menuRoutings, "menuRoutings");
// //
// menuServers // menuServers
// //
resources.ApplyResources(this.menuServers, "menuServers");
this.menuServers.Name = "menuServers"; this.menuServers.Name = "menuServers";
resources.ApplyResources(this.menuServers, "menuServers");
// //
// menuServers2 // menuServers2
// //
resources.ApplyResources(this.menuServers2, "menuServers2");
this.menuServers2.BackColor = System.Drawing.SystemColors.Window; this.menuServers2.BackColor = System.Drawing.SystemColors.Window;
this.menuServers2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.menuServers2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.menuServers2.DropDownWidth = 500; this.menuServers2.DropDownWidth = 500;
resources.ApplyResources(this.menuServers2, "menuServers2");
this.menuServers2.Name = "menuServers2"; this.menuServers2.Name = "menuServers2";
// //
// toolStripSeparator13 // toolStripSeparator13
// //
resources.ApplyResources(this.toolStripSeparator13, "toolStripSeparator13");
this.toolStripSeparator13.Name = "toolStripSeparator13"; this.toolStripSeparator13.Name = "toolStripSeparator13";
resources.ApplyResources(this.toolStripSeparator13, "toolStripSeparator13");
// //
// menuAddServers2 // menuAddServers2
// //
resources.ApplyResources(this.menuAddServers2, "menuAddServers2");
this.menuAddServers2.Name = "menuAddServers2"; this.menuAddServers2.Name = "menuAddServers2";
resources.ApplyResources(this.menuAddServers2, "menuAddServers2");
this.menuAddServers2.Click += new System.EventHandler(this.menuAddServers_Click); this.menuAddServers2.Click += new System.EventHandler(this.menuAddServers_Click);
// //
// menuScanScreen2 // menuScanScreen2
// //
resources.ApplyResources(this.menuScanScreen2, "menuScanScreen2");
this.menuScanScreen2.Name = "menuScanScreen2"; this.menuScanScreen2.Name = "menuScanScreen2";
resources.ApplyResources(this.menuScanScreen2, "menuScanScreen2");
this.menuScanScreen2.Click += new System.EventHandler(this.menuScanScreen_Click); this.menuScanScreen2.Click += new System.EventHandler(this.menuScanScreen_Click);
// //
// menuUpdateSubscriptions // menuUpdateSubscriptions
// //
resources.ApplyResources(this.menuUpdateSubscriptions, "menuUpdateSubscriptions");
this.menuUpdateSubscriptions.Name = "menuUpdateSubscriptions"; this.menuUpdateSubscriptions.Name = "menuUpdateSubscriptions";
resources.ApplyResources(this.menuUpdateSubscriptions, "menuUpdateSubscriptions");
this.menuUpdateSubscriptions.Click += new System.EventHandler(this.menuUpdateSubscriptions_Click); this.menuUpdateSubscriptions.Click += new System.EventHandler(this.menuUpdateSubscriptions_Click);
// //
// menuUpdateSubViaProxy // menuUpdateSubViaProxy
// //
resources.ApplyResources(this.menuUpdateSubViaProxy, "menuUpdateSubViaProxy");
this.menuUpdateSubViaProxy.Name = "menuUpdateSubViaProxy"; this.menuUpdateSubViaProxy.Name = "menuUpdateSubViaProxy";
resources.ApplyResources(this.menuUpdateSubViaProxy, "menuUpdateSubViaProxy");
this.menuUpdateSubViaProxy.Click += new System.EventHandler(this.menuUpdateSubViaProxy_Click); this.menuUpdateSubViaProxy.Click += new System.EventHandler(this.menuUpdateSubViaProxy_Click);
// //
// toolStripSeparator2 // toolStripSeparator2
// //
resources.ApplyResources(this.toolStripSeparator2, "toolStripSeparator2");
this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Name = "toolStripSeparator2";
resources.ApplyResources(this.toolStripSeparator2, "toolStripSeparator2");
// //
// menuExit // menuExit
// //
resources.ApplyResources(this.menuExit, "menuExit");
this.menuExit.Name = "menuExit"; this.menuExit.Name = "menuExit";
resources.ApplyResources(this.menuExit, "menuExit");
this.menuExit.Click += new System.EventHandler(this.menuExit_Click); this.menuExit.Click += new System.EventHandler(this.menuExit_Click);
// //
// bgwScan
//
this.bgwScan.WorkerReportsProgress = true;
this.bgwScan.DoWork += new System.ComponentModel.DoWorkEventHandler(this.bgwScan_DoWork);
this.bgwScan.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.bgwScan_ProgressChanged);
//
// panel1 // panel1
// //
resources.ApplyResources(this.panel1, "panel1"); resources.ApplyResources(this.panel1, "panel1");
@@ -683,7 +691,6 @@
// //
// tsMain // tsMain
// //
resources.ApplyResources(this.tsMain, "tsMain");
this.tsMain.ImageScalingSize = new System.Drawing.Size(32, 32); this.tsMain.ImageScalingSize = new System.Drawing.Size(32, 32);
this.tsMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tsMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbServer, this.tsbServer,
@@ -701,116 +708,124 @@
this.tsbPromotion, this.tsbPromotion,
this.toolStripSeparator11, this.toolStripSeparator11,
this.tsbClose}); this.tsbClose});
resources.ApplyResources(this.tsMain, "tsMain");
this.tsMain.Name = "tsMain"; this.tsMain.Name = "tsMain";
this.tsMain.TabStop = true; this.tsMain.TabStop = true;
// //
// toolStripSeparator4 // toolStripSeparator4
// //
resources.ApplyResources(this.toolStripSeparator4, "toolStripSeparator4");
this.toolStripSeparator4.Name = "toolStripSeparator4"; this.toolStripSeparator4.Name = "toolStripSeparator4";
resources.ApplyResources(this.toolStripSeparator4, "toolStripSeparator4");
// //
// tsbSub // tsbSub
// //
resources.ApplyResources(this.tsbSub, "tsbSub");
this.tsbSub.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tsbSub.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbSubSetting, this.tsbSubSetting,
this.tsbSubUpdate, this.tsbSubUpdate,
this.tsbSubUpdateViaProxy}); this.tsbSubUpdateViaProxy});
this.tsbSub.Image = global::v2rayN.Properties.Resources.sub; this.tsbSub.Image = global::v2rayN.Properties.Resources.sub;
resources.ApplyResources(this.tsbSub, "tsbSub");
this.tsbSub.Name = "tsbSub"; this.tsbSub.Name = "tsbSub";
// //
// tsbSubSetting // tsbSubSetting
// //
resources.ApplyResources(this.tsbSubSetting, "tsbSubSetting");
this.tsbSubSetting.Name = "tsbSubSetting"; this.tsbSubSetting.Name = "tsbSubSetting";
resources.ApplyResources(this.tsbSubSetting, "tsbSubSetting");
this.tsbSubSetting.Click += new System.EventHandler(this.tsbSubSetting_Click); this.tsbSubSetting.Click += new System.EventHandler(this.tsbSubSetting_Click);
// //
// tsbSubUpdate // tsbSubUpdate
// //
resources.ApplyResources(this.tsbSubUpdate, "tsbSubUpdate");
this.tsbSubUpdate.Name = "tsbSubUpdate"; this.tsbSubUpdate.Name = "tsbSubUpdate";
resources.ApplyResources(this.tsbSubUpdate, "tsbSubUpdate");
this.tsbSubUpdate.Click += new System.EventHandler(this.tsbSubUpdate_Click); this.tsbSubUpdate.Click += new System.EventHandler(this.tsbSubUpdate_Click);
// //
// tsbSubUpdateViaProxy // tsbSubUpdateViaProxy
// //
resources.ApplyResources(this.tsbSubUpdateViaProxy, "tsbSubUpdateViaProxy");
this.tsbSubUpdateViaProxy.Name = "tsbSubUpdateViaProxy"; this.tsbSubUpdateViaProxy.Name = "tsbSubUpdateViaProxy";
resources.ApplyResources(this.tsbSubUpdateViaProxy, "tsbSubUpdateViaProxy");
this.tsbSubUpdateViaProxy.Click += new System.EventHandler(this.tsbSubUpdateViaProxy_Click); this.tsbSubUpdateViaProxy.Click += new System.EventHandler(this.tsbSubUpdateViaProxy_Click);
// //
// tsbQRCodeSwitch // tsbQRCodeSwitch
// //
resources.ApplyResources(this.tsbQRCodeSwitch, "tsbQRCodeSwitch");
this.tsbQRCodeSwitch.CheckOnClick = true; this.tsbQRCodeSwitch.CheckOnClick = true;
this.tsbQRCodeSwitch.ForeColor = System.Drawing.Color.Black; this.tsbQRCodeSwitch.ForeColor = System.Drawing.Color.Black;
this.tsbQRCodeSwitch.Image = global::v2rayN.Properties.Resources.share; this.tsbQRCodeSwitch.Image = global::v2rayN.Properties.Resources.share;
resources.ApplyResources(this.tsbQRCodeSwitch, "tsbQRCodeSwitch");
this.tsbQRCodeSwitch.Name = "tsbQRCodeSwitch"; this.tsbQRCodeSwitch.Name = "tsbQRCodeSwitch";
this.tsbQRCodeSwitch.CheckedChanged += new System.EventHandler(this.tsbQRCodeSwitch_CheckedChanged); this.tsbQRCodeSwitch.CheckedChanged += new System.EventHandler(this.tsbQRCodeSwitch_CheckedChanged);
// //
// toolStripSeparator8 // toolStripSeparator8
// //
resources.ApplyResources(this.toolStripSeparator8, "toolStripSeparator8");
this.toolStripSeparator8.Name = "toolStripSeparator8"; this.toolStripSeparator8.Name = "toolStripSeparator8";
resources.ApplyResources(this.toolStripSeparator8, "toolStripSeparator8");
// //
// tsbSetting // tsbSetting
// //
resources.ApplyResources(this.tsbSetting, "tsbSetting");
this.tsbSetting.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tsbSetting.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbOptionSetting, this.tsbOptionSetting,
this.tsbRoutingSetting, this.tsbRoutingSetting,
this.tsbGlobalHotkeySetting, this.tsbGlobalHotkeySetting,
this.tsbGroupSetting,
this.toolStripSeparator14, this.toolStripSeparator14,
this.tsbBackupGuiNConfig}); this.tsbBackupGuiNConfig});
this.tsbSetting.Image = global::v2rayN.Properties.Resources.option; this.tsbSetting.Image = global::v2rayN.Properties.Resources.option;
resources.ApplyResources(this.tsbSetting, "tsbSetting");
this.tsbSetting.Name = "tsbSetting"; this.tsbSetting.Name = "tsbSetting";
// //
// tsbOptionSetting // tsbOptionSetting
// //
resources.ApplyResources(this.tsbOptionSetting, "tsbOptionSetting");
this.tsbOptionSetting.Name = "tsbOptionSetting"; this.tsbOptionSetting.Name = "tsbOptionSetting";
resources.ApplyResources(this.tsbOptionSetting, "tsbOptionSetting");
this.tsbOptionSetting.Click += new System.EventHandler(this.tsbOptionSetting_Click); this.tsbOptionSetting.Click += new System.EventHandler(this.tsbOptionSetting_Click);
// //
// tsbRoutingSetting // tsbRoutingSetting
// //
resources.ApplyResources(this.tsbRoutingSetting, "tsbRoutingSetting");
this.tsbRoutingSetting.Name = "tsbRoutingSetting"; this.tsbRoutingSetting.Name = "tsbRoutingSetting";
resources.ApplyResources(this.tsbRoutingSetting, "tsbRoutingSetting");
this.tsbRoutingSetting.Click += new System.EventHandler(this.tsbRoutingSetting_Click); this.tsbRoutingSetting.Click += new System.EventHandler(this.tsbRoutingSetting_Click);
// //
// tsbGlobalHotkeySetting // tsbGlobalHotkeySetting
// //
resources.ApplyResources(this.tsbGlobalHotkeySetting, "tsbGlobalHotkeySetting");
this.tsbGlobalHotkeySetting.Name = "tsbGlobalHotkeySetting"; this.tsbGlobalHotkeySetting.Name = "tsbGlobalHotkeySetting";
resources.ApplyResources(this.tsbGlobalHotkeySetting, "tsbGlobalHotkeySetting");
this.tsbGlobalHotkeySetting.Click += new System.EventHandler(this.tsbGlobalHotkeySetting_Click); this.tsbGlobalHotkeySetting.Click += new System.EventHandler(this.tsbGlobalHotkeySetting_Click);
// //
// tsbGroupSetting
//
this.tsbGroupSetting.Name = "tsbGroupSetting";
resources.ApplyResources(this.tsbGroupSetting, "tsbGroupSetting");
this.tsbGroupSetting.Click += new System.EventHandler(this.tsbGroupSetting_Click);
//
// toolStripSeparator14 // toolStripSeparator14
// //
resources.ApplyResources(this.toolStripSeparator14, "toolStripSeparator14");
this.toolStripSeparator14.Name = "toolStripSeparator14"; this.toolStripSeparator14.Name = "toolStripSeparator14";
resources.ApplyResources(this.toolStripSeparator14, "toolStripSeparator14");
// //
// tsbBackupGuiNConfig // tsbBackupGuiNConfig
// //
resources.ApplyResources(this.tsbBackupGuiNConfig, "tsbBackupGuiNConfig");
this.tsbBackupGuiNConfig.Name = "tsbBackupGuiNConfig"; this.tsbBackupGuiNConfig.Name = "tsbBackupGuiNConfig";
resources.ApplyResources(this.tsbBackupGuiNConfig, "tsbBackupGuiNConfig");
this.tsbBackupGuiNConfig.Click += new System.EventHandler(this.tsbBackupGuiNConfig_Click); this.tsbBackupGuiNConfig.Click += new System.EventHandler(this.tsbBackupGuiNConfig_Click);
// //
// toolStripSeparator5 // toolStripSeparator5
// //
resources.ApplyResources(this.toolStripSeparator5, "toolStripSeparator5");
this.toolStripSeparator5.Name = "toolStripSeparator5"; this.toolStripSeparator5.Name = "toolStripSeparator5";
resources.ApplyResources(this.toolStripSeparator5, "toolStripSeparator5");
// //
// tsbReload // tsbReload
// //
this.tsbReload.Image = global::v2rayN.Properties.Resources.restart;
resources.ApplyResources(this.tsbReload, "tsbReload"); resources.ApplyResources(this.tsbReload, "tsbReload");
this.tsbReload.Name = "tsbReload"; this.tsbReload.Name = "tsbReload";
this.tsbReload.Click += new System.EventHandler(this.tsbReload_Click); this.tsbReload.Click += new System.EventHandler(this.tsbReload_Click);
// //
// toolStripSeparator7 // toolStripSeparator7
// //
resources.ApplyResources(this.toolStripSeparator7, "toolStripSeparator7");
this.toolStripSeparator7.Name = "toolStripSeparator7"; this.toolStripSeparator7.Name = "toolStripSeparator7";
resources.ApplyResources(this.toolStripSeparator7, "toolStripSeparator7");
// //
// tsbCheckUpdate // tsbCheckUpdate
// //
resources.ApplyResources(this.tsbCheckUpdate, "tsbCheckUpdate");
this.tsbCheckUpdate.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tsbCheckUpdate.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbCheckUpdateN, this.tsbCheckUpdateN,
this.tsbCheckUpdateCore, this.tsbCheckUpdateCore,
@@ -819,51 +834,51 @@
this.tsbCheckUpdateGeoSite, this.tsbCheckUpdateGeoSite,
this.tsbCheckUpdateGeoIP}); this.tsbCheckUpdateGeoIP});
this.tsbCheckUpdate.Image = global::v2rayN.Properties.Resources.checkupdate; this.tsbCheckUpdate.Image = global::v2rayN.Properties.Resources.checkupdate;
resources.ApplyResources(this.tsbCheckUpdate, "tsbCheckUpdate");
this.tsbCheckUpdate.Name = "tsbCheckUpdate"; this.tsbCheckUpdate.Name = "tsbCheckUpdate";
// //
// tsbCheckUpdateN // tsbCheckUpdateN
// //
resources.ApplyResources(this.tsbCheckUpdateN, "tsbCheckUpdateN");
this.tsbCheckUpdateN.Name = "tsbCheckUpdateN"; this.tsbCheckUpdateN.Name = "tsbCheckUpdateN";
resources.ApplyResources(this.tsbCheckUpdateN, "tsbCheckUpdateN");
this.tsbCheckUpdateN.Click += new System.EventHandler(this.tsbCheckUpdateN_Click); this.tsbCheckUpdateN.Click += new System.EventHandler(this.tsbCheckUpdateN_Click);
// //
// tsbCheckUpdateCore // tsbCheckUpdateCore
// //
resources.ApplyResources(this.tsbCheckUpdateCore, "tsbCheckUpdateCore");
this.tsbCheckUpdateCore.Name = "tsbCheckUpdateCore"; this.tsbCheckUpdateCore.Name = "tsbCheckUpdateCore";
resources.ApplyResources(this.tsbCheckUpdateCore, "tsbCheckUpdateCore");
this.tsbCheckUpdateCore.Click += new System.EventHandler(this.tsbCheckUpdateCore_Click); this.tsbCheckUpdateCore.Click += new System.EventHandler(this.tsbCheckUpdateCore_Click);
// //
// tsbCheckUpdateXrayCore // tsbCheckUpdateXrayCore
// //
resources.ApplyResources(this.tsbCheckUpdateXrayCore, "tsbCheckUpdateXrayCore");
this.tsbCheckUpdateXrayCore.Name = "tsbCheckUpdateXrayCore"; this.tsbCheckUpdateXrayCore.Name = "tsbCheckUpdateXrayCore";
resources.ApplyResources(this.tsbCheckUpdateXrayCore, "tsbCheckUpdateXrayCore");
this.tsbCheckUpdateXrayCore.Click += new System.EventHandler(this.tsbCheckUpdateXrayCore_Click); this.tsbCheckUpdateXrayCore.Click += new System.EventHandler(this.tsbCheckUpdateXrayCore_Click);
// //
// toolStripSeparator15 // toolStripSeparator15
// //
resources.ApplyResources(this.toolStripSeparator15, "toolStripSeparator15");
this.toolStripSeparator15.Name = "toolStripSeparator15"; this.toolStripSeparator15.Name = "toolStripSeparator15";
resources.ApplyResources(this.toolStripSeparator15, "toolStripSeparator15");
// //
// tsbCheckUpdateGeoSite // tsbCheckUpdateGeoSite
// //
resources.ApplyResources(this.tsbCheckUpdateGeoSite, "tsbCheckUpdateGeoSite");
this.tsbCheckUpdateGeoSite.Name = "tsbCheckUpdateGeoSite"; this.tsbCheckUpdateGeoSite.Name = "tsbCheckUpdateGeoSite";
resources.ApplyResources(this.tsbCheckUpdateGeoSite, "tsbCheckUpdateGeoSite");
this.tsbCheckUpdateGeoSite.Click += new System.EventHandler(this.tsbCheckUpdateGeoSite_Click); this.tsbCheckUpdateGeoSite.Click += new System.EventHandler(this.tsbCheckUpdateGeoSite_Click);
// //
// tsbCheckUpdateGeoIP // tsbCheckUpdateGeoIP
// //
resources.ApplyResources(this.tsbCheckUpdateGeoIP, "tsbCheckUpdateGeoIP");
this.tsbCheckUpdateGeoIP.Name = "tsbCheckUpdateGeoIP"; this.tsbCheckUpdateGeoIP.Name = "tsbCheckUpdateGeoIP";
resources.ApplyResources(this.tsbCheckUpdateGeoIP, "tsbCheckUpdateGeoIP");
this.tsbCheckUpdateGeoIP.Click += new System.EventHandler(this.tsbCheckUpdateGeoIP_Click); this.tsbCheckUpdateGeoIP.Click += new System.EventHandler(this.tsbCheckUpdateGeoIP_Click);
// //
// toolStripSeparator10 // toolStripSeparator10
// //
resources.ApplyResources(this.toolStripSeparator10, "toolStripSeparator10");
this.toolStripSeparator10.Name = "toolStripSeparator10"; this.toolStripSeparator10.Name = "toolStripSeparator10";
resources.ApplyResources(this.toolStripSeparator10, "toolStripSeparator10");
// //
// tsbHelp // tsbHelp
// //
resources.ApplyResources(this.tsbHelp, "tsbHelp");
this.tsbHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tsbHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbAbout, this.tsbAbout,
this.tsbV2rayWebsite, this.tsbV2rayWebsite,
@@ -871,52 +886,54 @@
this.tsbLanguageDef, this.tsbLanguageDef,
this.tsbLanguageZhHans}); this.tsbLanguageZhHans});
this.tsbHelp.Image = global::v2rayN.Properties.Resources.help; this.tsbHelp.Image = global::v2rayN.Properties.Resources.help;
resources.ApplyResources(this.tsbHelp, "tsbHelp");
this.tsbHelp.Name = "tsbHelp"; this.tsbHelp.Name = "tsbHelp";
// //
// tsbAbout // tsbAbout
// //
resources.ApplyResources(this.tsbAbout, "tsbAbout");
this.tsbAbout.Name = "tsbAbout"; this.tsbAbout.Name = "tsbAbout";
resources.ApplyResources(this.tsbAbout, "tsbAbout");
this.tsbAbout.Click += new System.EventHandler(this.tsbAbout_Click); this.tsbAbout.Click += new System.EventHandler(this.tsbAbout_Click);
// //
// tsbV2rayWebsite // tsbV2rayWebsite
// //
resources.ApplyResources(this.tsbV2rayWebsite, "tsbV2rayWebsite");
this.tsbV2rayWebsite.Name = "tsbV2rayWebsite"; this.tsbV2rayWebsite.Name = "tsbV2rayWebsite";
resources.ApplyResources(this.tsbV2rayWebsite, "tsbV2rayWebsite");
this.tsbV2rayWebsite.Click += new System.EventHandler(this.tsbV2rayWebsite_Click); this.tsbV2rayWebsite.Click += new System.EventHandler(this.tsbV2rayWebsite_Click);
// //
// toolStripSeparator12 // toolStripSeparator12
// //
resources.ApplyResources(this.toolStripSeparator12, "toolStripSeparator12");
this.toolStripSeparator12.Name = "toolStripSeparator12"; this.toolStripSeparator12.Name = "toolStripSeparator12";
resources.ApplyResources(this.toolStripSeparator12, "toolStripSeparator12");
// //
// tsbLanguageDef // tsbLanguageDef
// //
resources.ApplyResources(this.tsbLanguageDef, "tsbLanguageDef");
this.tsbLanguageDef.Name = "tsbLanguageDef"; this.tsbLanguageDef.Name = "tsbLanguageDef";
resources.ApplyResources(this.tsbLanguageDef, "tsbLanguageDef");
this.tsbLanguageDef.Click += new System.EventHandler(this.tsbLanguageDef_Click); this.tsbLanguageDef.Click += new System.EventHandler(this.tsbLanguageDef_Click);
// //
// tsbLanguageZhHans // tsbLanguageZhHans
// //
resources.ApplyResources(this.tsbLanguageZhHans, "tsbLanguageZhHans");
this.tsbLanguageZhHans.Name = "tsbLanguageZhHans"; this.tsbLanguageZhHans.Name = "tsbLanguageZhHans";
resources.ApplyResources(this.tsbLanguageZhHans, "tsbLanguageZhHans");
this.tsbLanguageZhHans.Click += new System.EventHandler(this.tsbLanguageZhHans_Click); this.tsbLanguageZhHans.Click += new System.EventHandler(this.tsbLanguageZhHans_Click);
// //
// tsbPromotion // tsbPromotion
// //
resources.ApplyResources(this.tsbPromotion, "tsbPromotion");
this.tsbPromotion.ForeColor = System.Drawing.Color.Black; this.tsbPromotion.ForeColor = System.Drawing.Color.Black;
this.tsbPromotion.Image = global::v2rayN.Properties.Resources.promotion; this.tsbPromotion.Image = global::v2rayN.Properties.Resources.promotion;
resources.ApplyResources(this.tsbPromotion, "tsbPromotion");
this.tsbPromotion.Name = "tsbPromotion"; this.tsbPromotion.Name = "tsbPromotion";
this.tsbPromotion.Click += new System.EventHandler(this.tsbPromotion_Click); this.tsbPromotion.Click += new System.EventHandler(this.tsbPromotion_Click);
// //
// toolStripSeparator11 // toolStripSeparator11
// //
resources.ApplyResources(this.toolStripSeparator11, "toolStripSeparator11");
this.toolStripSeparator11.Name = "toolStripSeparator11"; this.toolStripSeparator11.Name = "toolStripSeparator11";
resources.ApplyResources(this.toolStripSeparator11, "toolStripSeparator11");
// //
// tsbClose // tsbClose
// //
this.tsbClose.Image = global::v2rayN.Properties.Resources.minimize;
resources.ApplyResources(this.tsbClose, "tsbClose"); resources.ApplyResources(this.tsbClose, "tsbClose");
this.tsbClose.Name = "tsbClose"; this.tsbClose.Name = "tsbClose";
this.tsbClose.Click += new System.EventHandler(this.tsbClose_Click); this.tsbClose.Click += new System.EventHandler(this.tsbClose_Click);
@@ -1011,7 +1028,6 @@
private System.Windows.Forms.ToolStripDropDownButton tsbHelp; private System.Windows.Forms.ToolStripDropDownButton tsbHelp;
private System.Windows.Forms.ToolStripMenuItem tsbAbout; private System.Windows.Forms.ToolStripMenuItem tsbAbout;
private System.Windows.Forms.ToolStripMenuItem menuAddServers2; private System.Windows.Forms.ToolStripMenuItem menuAddServers2;
private System.ComponentModel.BackgroundWorker bgwScan;
private System.Windows.Forms.ToolStripMenuItem menuScanScreen; private System.Windows.Forms.ToolStripMenuItem menuScanScreen;
private System.Windows.Forms.ToolStripMenuItem menuScanScreen2; private System.Windows.Forms.ToolStripMenuItem menuScanScreen2;
private System.Windows.Forms.ToolStripDropDownButton tsbSub; private System.Windows.Forms.ToolStripDropDownButton tsbSub;
@@ -1067,6 +1083,9 @@
private System.Windows.Forms.ToolStripMenuItem menuUpdateSubViaProxy; private System.Windows.Forms.ToolStripMenuItem menuUpdateSubViaProxy;
private System.Windows.Forms.ToolStripMenuItem menuMsgBoxClear; private System.Windows.Forms.ToolStripMenuItem menuMsgBoxClear;
private System.Windows.Forms.ToolStripMenuItem tsbGlobalHotkeySetting; private System.Windows.Forms.ToolStripMenuItem tsbGlobalHotkeySetting;
private System.Windows.Forms.TabControl tabGroup;
private System.Windows.Forms.ToolStripMenuItem tsbGroupSetting;
private System.Windows.Forms.ToolStripMenuItem menuMoveToGroup;
} }
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -118,26 +118,6 @@
<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>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="cmsLv.Size" type="System.Drawing.Size, System.Drawing">
<value>301, 622</value>
</data>
<data name="lvServers.Items" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkMAwAAAFFTeXN0
ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2Vu
PWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACFTeXN0ZW0uV2luZG93cy5Gb3Jtcy5MaXN0Vmlld0l0ZW0HAAAA
BFRleHQKSW1hZ2VJbmRleAlCYWNrQ29sb3IHQ2hlY2tlZARGb250CUZvcmVDb2xvchdVc2VJdGVtU3R5
bGVGb3JTdWJJdGVtcwEABAAEBAAIFFN5c3RlbS5EcmF3aW5nLkNvbG9yAwAAAAETU3lzdGVtLkRyYXdp
bmcuRm9udAMAAAAUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAAQIAAAAGBAAAAAD/////Bfv///8UU3lz
dGVtLkRyYXdpbmcuQ29sb3IEAAAABG5hbWUFdmFsdWUKa25vd25Db2xvcgVzdGF0ZQEAAAAJBwcDAAAA
CgAAAAAAAAAAGAABAAAJBgAAAAH5////+////woAAAAAAAAAABoAAQABBQYAAAATU3lzdGVtLkRyYXdp
bmcuRm9udAQAAAAETmFtZQRTaXplBVN0eWxlBFVuaXQBAAQECxhTeXN0ZW0uRHJhd2luZy5Gb250U3R5
bGUDAAAAG1N5c3RlbS5EcmF3aW5nLkdyYXBoaWNzVW5pdAMAAAADAAAABggAAAAG5a6L5L2TAAAQQQX3
////GFN5c3RlbS5EcmF3aW5nLkZvbnRTdHlsZQEAAAAHdmFsdWVfXwAIAwAAAAAAAAAF9v///xtTeXN0
ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAMAAAADAAAACw==
</value>
</data>
<data name="menuAddVmessServer.Size" type="System.Drawing.Size, System.Drawing"> <data name="menuAddVmessServer.Size" type="System.Drawing.Size, System.Drawing">
<value>300, 22</value> <value>300, 22</value>
</data> </data>
@@ -318,14 +298,25 @@
<data name="tsbServer.Text" xml:space="preserve"> <data name="tsbServer.Text" xml:space="preserve">
<value> 服务器 </value> <value> 服务器 </value>
</data> </data>
<data name="groupBox1.Text" xml:space="preserve"> <data name="cmsLv.Size" type="System.Drawing.Size, System.Drawing">
<value>服务器列表</value> <value>301, 622</value>
</data> </data>
<data name="gbMsgTitle.Text" xml:space="preserve"> <data name="lvServers.Items" mimetype="application/x-microsoft.net.object.binary.base64">
<value>信息</value> <value>
</data> AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
<data name="cmsMsgBox.Size" type="System.Drawing.Size, System.Drawing"> LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkMAwAAAFFTeXN0
<value>222, 136</value> ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2Vu
PWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACFTeXN0ZW0uV2luZG93cy5Gb3Jtcy5MaXN0Vmlld0l0ZW0HAAAA
BFRleHQKSW1hZ2VJbmRleAlCYWNrQ29sb3IHQ2hlY2tlZARGb250CUZvcmVDb2xvchdVc2VJdGVtU3R5
bGVGb3JTdWJJdGVtcwEABAAEBAAIFFN5c3RlbS5EcmF3aW5nLkNvbG9yAwAAAAETU3lzdGVtLkRyYXdp
bmcuRm9udAMAAAAUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAAQIAAAAGBAAAAAD/////Bfv///8UU3lz
dGVtLkRyYXdpbmcuQ29sb3IEAAAABG5hbWUFdmFsdWUKa25vd25Db2xvcgVzdGF0ZQEAAAAJBwcDAAAA
CgAAAAAAAAAAGAABAAAJBgAAAAH5////+////woAAAAAAAAAABoAAQABBQYAAAATU3lzdGVtLkRyYXdp
bmcuRm9udAQAAAAETmFtZQRTaXplBVN0eWxlBFVuaXQBAAQECxhTeXN0ZW0uRHJhd2luZy5Gb250U3R5
bGUDAAAAG1N5c3RlbS5EcmF3aW5nLkdyYXBoaWNzVW5pdAMAAAADAAAABggAAAAG5a6L5L2TAAAQQQX3
////GFN5c3RlbS5EcmF3aW5nLkZvbnRTdHlsZQEAAAAHdmFsdWVfXwAIAwAAAAAAAAAF9v///xtTeXN0
ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAMAAAADAAAACw==
</value>
</data> </data>
<data name="menuMsgBoxSelectAll.Size" type="System.Drawing.Size, System.Drawing"> <data name="menuMsgBoxSelectAll.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 22</value> <value>221, 22</value>
@@ -363,17 +354,14 @@
<data name="menuMsgBoxFilter.Text" xml:space="preserve"> <data name="menuMsgBoxFilter.Text" xml:space="preserve">
<value>设置信息过滤器</value> <value>设置信息过滤器</value>
</data> </data>
<data name="cmsMsgBox.Size" type="System.Drawing.Size, System.Drawing">
<value>222, 136</value>
</data>
<data name="toolSslServerSpeed.Text" xml:space="preserve"> <data name="toolSslServerSpeed.Text" xml:space="preserve">
<value>网速显示未启用</value> <value>网速显示未启用</value>
</data> </data>
<data name="cmsMain.Size" type="System.Drawing.Size, System.Drawing"> <data name="gbMsgTitle.Text" xml:space="preserve">
<value>261, 221</value> <value>信息</value>
</data>
<data name="menuSysAgentMode.Size" type="System.Drawing.Size, System.Drawing">
<value>260, 22</value>
</data>
<data name="menuSysAgentMode.Text" xml:space="preserve">
<value>系统代理</value>
</data> </data>
<data name="menuKeepClear.Size" type="System.Drawing.Size, System.Drawing"> <data name="menuKeepClear.Size" type="System.Drawing.Size, System.Drawing">
<value>172, 22</value> <value>172, 22</value>
@@ -393,6 +381,12 @@
<data name="menuKeepNothing.Text" xml:space="preserve"> <data name="menuKeepNothing.Text" xml:space="preserve">
<value>不改变系统代理</value> <value>不改变系统代理</value>
</data> </data>
<data name="menuSysAgentMode.Size" type="System.Drawing.Size, System.Drawing">
<value>260, 22</value>
</data>
<data name="menuSysAgentMode.Text" xml:space="preserve">
<value>系统代理</value>
</data>
<data name="menuRoutings.Size" type="System.Drawing.Size, System.Drawing"> <data name="menuRoutings.Size" type="System.Drawing.Size, System.Drawing">
<value>260, 22</value> <value>260, 22</value>
</data> </data>
@@ -427,7 +421,7 @@
<value>260, 22</value> <value>260, 22</value>
</data> </data>
<data name="menuUpdateSubscriptions.Text" xml:space="preserve"> <data name="menuUpdateSubscriptions.Text" xml:space="preserve">
<value>更新订阅</value> <value>更新订阅(不通过代理)</value>
</data> </data>
<data name="menuUpdateSubViaProxy.Size" type="System.Drawing.Size, System.Drawing"> <data name="menuUpdateSubViaProxy.Size" type="System.Drawing.Size, System.Drawing">
<value>260, 22</value> <value>260, 22</value>
@@ -444,11 +438,8 @@
<data name="menuExit.Text" xml:space="preserve"> <data name="menuExit.Text" xml:space="preserve">
<value>退出</value> <value>退出</value>
</data> </data>
<data name="tsbSub.Size" type="System.Drawing.Size, System.Drawing"> <data name="cmsMain.Size" type="System.Drawing.Size, System.Drawing">
<value>61, 53</value> <value>261, 221</value>
</data>
<data name="tsbSub.Text" xml:space="preserve">
<value> 订阅 </value>
</data> </data>
<data name="tsbSubSetting.Size" type="System.Drawing.Size, System.Drawing"> <data name="tsbSubSetting.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value> <value>180, 22</value>
@@ -460,7 +451,7 @@
<value>180, 22</value> <value>180, 22</value>
</data> </data>
<data name="tsbSubUpdate.Text" xml:space="preserve"> <data name="tsbSubUpdate.Text" xml:space="preserve">
<value>更新订阅</value> <value>更新订阅(不通过代理)</value>
</data> </data>
<data name="tsbSubUpdateViaProxy.Size" type="System.Drawing.Size, System.Drawing"> <data name="tsbSubUpdateViaProxy.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value> <value>180, 22</value>
@@ -468,18 +459,18 @@
<data name="tsbSubUpdateViaProxy.Text" xml:space="preserve"> <data name="tsbSubUpdateViaProxy.Text" xml:space="preserve">
<value>更新订阅(通过代理)</value> <value>更新订阅(通过代理)</value>
</data> </data>
<data name="tsbSub.Size" type="System.Drawing.Size, System.Drawing">
<value>61, 53</value>
</data>
<data name="tsbSub.Text" xml:space="preserve">
<value> 订阅 </value>
</data>
<data name="tsbQRCodeSwitch.Size" type="System.Drawing.Size, System.Drawing"> <data name="tsbQRCodeSwitch.Size" type="System.Drawing.Size, System.Drawing">
<value>52, 53</value> <value>52, 53</value>
</data> </data>
<data name="tsbQRCodeSwitch.Text" xml:space="preserve"> <data name="tsbQRCodeSwitch.Text" xml:space="preserve">
<value> 分享 </value> <value> 分享 </value>
</data> </data>
<data name="tsbSetting.Size" type="System.Drawing.Size, System.Drawing">
<value>61, 53</value>
</data>
<data name="tsbSetting.Text" xml:space="preserve">
<value> 设置 </value>
</data>
<data name="tsbOptionSetting.Size" type="System.Drawing.Size, System.Drawing"> <data name="tsbOptionSetting.Size" type="System.Drawing.Size, System.Drawing">
<value>189, 22</value> <value>189, 22</value>
</data> </data>
@@ -498,6 +489,12 @@
<data name="tsbGlobalHotkeySetting.Text" xml:space="preserve"> <data name="tsbGlobalHotkeySetting.Text" xml:space="preserve">
<value>全局热键设置</value> <value>全局热键设置</value>
</data> </data>
<data name="tsbGroupSetting.Size" type="System.Drawing.Size, System.Drawing">
<value>189, 22</value>
</data>
<data name="tsbGroupSetting.Text" xml:space="preserve">
<value>服务器分组设置</value>
</data>
<data name="toolStripSeparator14.Size" type="System.Drawing.Size, System.Drawing"> <data name="toolStripSeparator14.Size" type="System.Drawing.Size, System.Drawing">
<value>186, 6</value> <value>186, 6</value>
</data> </data>
@@ -507,16 +504,11 @@
<data name="tsbBackupGuiNConfig.Text" xml:space="preserve"> <data name="tsbBackupGuiNConfig.Text" xml:space="preserve">
<value>备份v2rayN配置文件</value> <value>备份v2rayN配置文件</value>
</data> </data>
<data name="tsbReload.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="tsbSetting.Size" type="System.Drawing.Size, System.Drawing">
<value> <value>61, 53</value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 </data>
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAE3SURBVFhH7ZaBDQIhDEVvBEdwBDfQDXQER3AD3cARdAPd <data name="tsbSetting.Text" xml:space="preserve">
QDfSDbQvuSb1AicFjJrwkxcN0FIolOuamv5VE2E+gLaPayWchEcE+hhTXVPhIoQmDcFYbKpoJtwEdX4X <value> 设置 </value>
jgIrXfTwnzb6dBw22BaJVdjJmWQs1/SdBRtE0U5cBXW2oSFRO0HtSEeW2FZ1wsq9sjuRdTDVAXnNuWLY
6JnAl0sYa/Q5q1dhq35ci+Bkq2HJvbZpxGeybAAuw4Fq+cnW1wPITgHFYxvBUw+qHEIL1yq1vDKhVlH3
NQwF4JkcFRWiUAB7IVW2FFPO3YqlgPd+LJf02e8Fdi3rMdIAcLDuf9UpeT0IS0G/hvhPm305vSl7EQFY
B6zCvozvYGzRM8zEoeg5TPZwDaGvpHQni1yzSxbXPW9q+hF13ROHuJnQcjbhtQAAAABJRU5ErkJggg==
</value>
</data> </data>
<data name="tsbReload.Size" type="System.Drawing.Size, System.Drawing"> <data name="tsbReload.Size" type="System.Drawing.Size, System.Drawing">
<value>76, 53</value> <value>76, 53</value>
@@ -524,12 +516,6 @@
<data name="tsbReload.Text" xml:space="preserve"> <data name="tsbReload.Text" xml:space="preserve">
<value> 重启服务 </value> <value> 重启服务 </value>
</data> </data>
<data name="tsbCheckUpdate.Size" type="System.Drawing.Size, System.Drawing">
<value>85, 53</value>
</data>
<data name="tsbCheckUpdate.Text" xml:space="preserve">
<value> 检查更新 </value>
</data>
<data name="tsbCheckUpdateN.Size" type="System.Drawing.Size, System.Drawing"> <data name="tsbCheckUpdateN.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 22</value> <value>168, 22</value>
</data> </data>
@@ -557,11 +543,11 @@
<data name="tsbCheckUpdateGeoIP.Size" type="System.Drawing.Size, System.Drawing"> <data name="tsbCheckUpdateGeoIP.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 22</value> <value>168, 22</value>
</data> </data>
<data name="tsbHelp.Size" type="System.Drawing.Size, System.Drawing"> <data name="tsbCheckUpdate.Size" type="System.Drawing.Size, System.Drawing">
<value>69, 53</value> <value>85, 53</value>
</data> </data>
<data name="tsbHelp.Text" xml:space="preserve"> <data name="tsbCheckUpdate.Text" xml:space="preserve">
<value> 帮助 </value> <value> 检查更新 </value>
</data> </data>
<data name="tsbAbout.Text" xml:space="preserve"> <data name="tsbAbout.Text" xml:space="preserve">
<value>v2rayN 项目</value> <value>v2rayN 项目</value>
@@ -569,23 +555,25 @@
<data name="tsbV2rayWebsite.Text" xml:space="preserve"> <data name="tsbV2rayWebsite.Text" xml:space="preserve">
<value>V2Ray 官网</value> <value>V2Ray 官网</value>
</data> </data>
<data name="tsbHelp.Size" type="System.Drawing.Size, System.Drawing">
<value>69, 53</value>
</data>
<data name="tsbHelp.Text" xml:space="preserve">
<value> 帮助 </value>
</data>
<data name="tsbPromotion.Size" type="System.Drawing.Size, System.Drawing"> <data name="tsbPromotion.Size" type="System.Drawing.Size, System.Drawing">
<value>68, 53</value> <value>68, 53</value>
</data> </data>
<data name="tsbPromotion.Text" xml:space="preserve"> <data name="tsbPromotion.Text" xml:space="preserve">
<value> 推广 </value> <value> 推广 </value>
</data> </data>
<data name="tsbClose.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAySURBVFhH7c6xDQAgCEVBRnVTHU2ZABuMxV3yOvJDAAA/
GqfZVG6X8mg1dfUAAPBQxAZd0SJruVXHWwAAAABJRU5ErkJggg==
</value>
</data>
<data name="tsbClose.Size" type="System.Drawing.Size, System.Drawing"> <data name="tsbClose.Size" type="System.Drawing.Size, System.Drawing">
<value>76, 53</value> <value>76, 53</value>
</data> </data>
<data name="tsbClose.Text" xml:space="preserve"> <data name="tsbClose.Text" xml:space="preserve">
<value> 关闭窗口 </value> <value> 关闭窗口 </value>
</data> </data>
<data name="menuMoveToGroup.Text" xml:space="preserve">
<value>移至分组</value>
</data>
</root> </root>

View File

@@ -34,14 +34,18 @@
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.btnClose = new System.Windows.Forms.Button(); this.btnClose = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button(); this.btnOK = new System.Windows.Forms.Button();
this.btnFilterDirect = new System.Windows.Forms.Button();
this.btnFilderProxy = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// groupBox1 // groupBox1
// //
resources.ApplyResources(this.groupBox1, "groupBox1"); this.groupBox1.Controls.Add(this.btnFilderProxy);
this.groupBox1.Controls.Add(this.btnFilterDirect);
this.groupBox1.Controls.Add(this.txtMsgFilter); this.groupBox1.Controls.Add(this.txtMsgFilter);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
// //
@@ -52,15 +56,15 @@
// //
// panel2 // panel2
// //
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Controls.Add(this.btnClose); this.panel2.Controls.Add(this.btnClose);
this.panel2.Controls.Add(this.btnOK); this.panel2.Controls.Add(this.btnOK);
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Name = "panel2"; this.panel2.Name = "panel2";
// //
// btnClose // btnClose
// //
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.Name = "btnClose"; this.btnClose.Name = "btnClose";
this.btnClose.UseVisualStyleBackColor = true; this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click); this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
@@ -72,6 +76,20 @@
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);
// //
// btnFilterDirect
//
resources.ApplyResources(this.btnFilterDirect, "btnFilterDirect");
this.btnFilterDirect.Name = "btnFilterDirect";
this.btnFilterDirect.UseVisualStyleBackColor = true;
this.btnFilterDirect.Click += new System.EventHandler(this.btnFilterDirect_Click);
//
// btnFilderProxy
//
resources.ApplyResources(this.btnFilderProxy, "btnFilderProxy");
this.btnFilderProxy.Name = "btnFilderProxy";
this.btnFilderProxy.UseVisualStyleBackColor = true;
this.btnFilderProxy.Click += new System.EventHandler(this.btnFilderProxy_Click);
//
// MsgFilterSetForm // MsgFilterSetForm
// //
resources.ApplyResources(this, "$this"); resources.ApplyResources(this, "$this");
@@ -94,5 +112,7 @@
private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Button btnClose; private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnOK; private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnFilderProxy;
private System.Windows.Forms.Button btnFilterDirect;
} }
} }

View File

@@ -34,5 +34,15 @@ namespace v2rayN.Forms
{ {
this.DialogResult = DialogResult.Cancel; this.DialogResult = DialogResult.Cancel;
} }
private void btnFilderProxy_Click(object sender, EventArgs e)
{
txtMsgFilter.Text = "^(?!.*proxy).*$";
}
private void btnFilterDirect_Click(object sender, EventArgs e)
{
txtMsgFilter.Text = "^(?!.*direct).*$";
}
} }
} }

View File

@@ -117,151 +117,226 @@
<resheader name="writer"> <resheader name="writer">
<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>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="&gt;&gt;txtMsgFilter.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;txtMsgFilter.Name" xml:space="preserve">
<value>txtMsgFilter</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>&amp;OK</value>
</data>
<data name="btnClose.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnClose.Text" xml:space="preserve">
<value>&amp;Cancel</value>
</data>
<data name="&gt;&gt;txtMsgFilter.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="txtMsgFilter.Location" type="System.Drawing.Point, System.Drawing"> <data name="btnFilderProxy.Location" type="System.Drawing.Point, System.Drawing">
<value>41, 29</value> <value>157, 47</value>
</data> </data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing"> <data name="btnFilderProxy.Size" type="System.Drawing.Size, System.Drawing">
<value>490, 60</value> <value>95, 23</value>
</data> </data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="txtMsgFilter.TabIndex" type="System.Int32, mscorlib"> <data name="btnFilderProxy.TabIndex" type="System.Int32, mscorlib">
<value>11</value> <value>13</value>
</data> </data>
<data name="&gt;&gt;$this.Type" xml:space="preserve"> <data name="btnFilderProxy.Text" xml:space="preserve">
<value>v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value> <value>Filter Proxy</value>
</data> </data>
<data name="&gt;&gt;panel2.Name" xml:space="preserve"> <data name="&gt;&gt;btnFilderProxy.Name" xml:space="preserve">
<value>panel2</value> <value>btnFilderProxy</value>
</data> </data>
<data name="&gt;&gt;groupBox1.Parent" xml:space="preserve"> <data name="&gt;&gt;btnFilderProxy.Type" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;btnOK.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
<value>396, 17</value>
</data>
<data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;groupBox1.Name" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
<value>8</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> <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;panel2.Type" xml:space="preserve"> <data name="&gt;&gt;btnFilderProxy.Parent" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>groupBox1</value>
</data> </data>
<data name="btnOK.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> <data name="&gt;&gt;btnFilderProxy.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="btnFilterDirect.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="&gt;&gt;btnClose.Parent" xml:space="preserve"> <data name="btnFilterDirect.Location" type="System.Drawing.Point, System.Drawing">
<value>panel2</value> <value>41, 47</value>
</data> </data>
<data name="btnClose.TabIndex" type="System.Int32, mscorlib"> <data name="btnFilterDirect.Size" type="System.Drawing.Size, System.Drawing">
<value>4</value> <value>95, 23</value>
</data> </data>
<data name="&gt;&gt;$this.Name" xml:space="preserve"> <data name="btnFilterDirect.TabIndex" type="System.Int32, mscorlib">
<value>MsgFilterSetForm</value> <value>12</value>
</data>
<data name="btnFilterDirect.Text" xml:space="preserve">
<value>Filter Direct</value>
</data>
<data name="&gt;&gt;btnFilterDirect.Name" xml:space="preserve">
<value>btnFilterDirect</value>
</data>
<data name="&gt;&gt;btnFilterDirect.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;btnFilterDirect.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;btnFilterDirect.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="txtMsgFilter.Location" type="System.Drawing.Point, System.Drawing">
<value>41, 20</value>
</data> </data>
<data name="txtMsgFilter.Size" type="System.Drawing.Size, System.Drawing"> <data name="txtMsgFilter.Size" type="System.Drawing.Size, System.Drawing">
<value>409, 21</value> <value>409, 21</value>
</data> </data>
<data name="&gt;&gt;groupBox1.Type" xml:space="preserve"> <data name="txtMsgFilter.TabIndex" type="System.Int32, mscorlib">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>11</value>
</data> </data>
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing"> <data name="&gt;&gt;txtMsgFilter.Name" xml:space="preserve">
<value>0, 0</value> <value>txtMsgFilter</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 76</value>
</data> </data>
<data name="&gt;&gt;txtMsgFilter.Type" xml:space="preserve"> <data name="&gt;&gt;txtMsgFilter.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> <data name="&gt;&gt;txtMsgFilter.Parent" xml:space="preserve">
<value>Bottom</value> <value>groupBox1</value>
</data>
<data name="&gt;&gt;txtMsgFilter.ZOrder" xml:space="preserve">
<value>2</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, 0</value>
</data> </data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing"> <data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>490, 76</value> <value>490, 76</value>
</data> </data>
<data name="&gt;&gt;btnClose.Type" xml:space="preserve"> <data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>8</value>
</data>
<data name="&gt;&gt;btnClose.Name" xml:space="preserve">
<value>btnClose</value>
</data>
<data name="&gt;&gt;btnOK.Parent" xml:space="preserve">
<value>panel2</value>
</data> </data>
<data name="groupBox1.Text" xml:space="preserve"> <data name="groupBox1.Text" xml:space="preserve">
<value>Filter</value> <value>Filter</value>
</data> </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="&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="&gt;&gt;btnOK.Name" xml:space="preserve"> <data name="&gt;&gt;btnOK.Name" xml:space="preserve">
<value>btnOK</value> <value>btnOK</value>
</data> </data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing"> <data name="&gt;&gt;btnOK.Type" xml:space="preserve">
<value>490, 136</value> <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="btnClose.Size" type="System.Drawing.Size, System.Drawing"> <data name="&gt;&gt;btnOK.Parent" xml:space="preserve">
<value>75, 23</value> <value>panel2</value>
</data> </data>
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing"> <data name="&gt;&gt;btnOK.ZOrder" xml:space="preserve">
<value>303, 17</value> <value>1</value>
</data> </data>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing"> <data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>6, 12</value> <value>Bottom</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 76</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>490, 60</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>9</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>
<data name="&gt;&gt;panel2.Parent" xml:space="preserve"> <data name="&gt;&gt;panel2.Parent" xml:space="preserve">
<value>$this</value> <value>$this</value>
</data> </data>
<data name="$this.Text" xml:space="preserve"> <data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>MsgFilterSetForm</value> <value>1</value>
</data>
<data name="btnClose.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
<value>396, 17</value>
</data>
<data name="btnClose.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="btnClose.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="btnClose.Text" xml:space="preserve">
<value>&amp;Cancel</value>
</data>
<data name="&gt;&gt;btnClose.Name" xml:space="preserve">
<value>btnClose</value>
</data>
<data name="&gt;&gt;btnClose.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnClose.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="btnOK.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
<value>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>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </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>490, 136</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>MsgFilterSetForm</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>MsgFilterSetForm</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
</root> </root>

View File

@@ -129,4 +129,10 @@
<data name="$this.Text" xml:space="preserve"> <data name="$this.Text" xml:space="preserve">
<value>设置过滤器</value> <value>设置过滤器</value>
</data> </data>
<data name="btnFilderProxy.Text" xml:space="preserve">
<value>过滤Proxy</value>
</data>
<data name="btnFilterDirect.Text" xml:space="preserve">
<value>过滤Direct</value>
</data>
</root> </root>

View File

@@ -33,15 +33,14 @@
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage1 = new System.Windows.Forms.TabPage();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label16 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.txtpass = new System.Windows.Forms.TextBox();
this.txtuser = new System.Windows.Forms.TextBox();
this.chkdefAllowInsecure = new System.Windows.Forms.CheckBox(); this.chkdefAllowInsecure = new System.Windows.Forms.CheckBox();
this.chksniffingEnabled2 = new System.Windows.Forms.CheckBox(); this.chkAllowLANConn = new System.Windows.Forms.CheckBox();
this.chksniffingEnabled = new System.Windows.Forms.CheckBox(); this.chksniffingEnabled = new System.Windows.Forms.CheckBox();
this.chkmuxEnabled = new System.Windows.Forms.CheckBox(); this.chkmuxEnabled = new System.Windows.Forms.CheckBox();
this.chkAllowIn2 = new System.Windows.Forms.CheckBox();
this.chkudpEnabled2 = new System.Windows.Forms.CheckBox();
this.cmbprotocol2 = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label();
this.txtlocalPort2 = new System.Windows.Forms.TextBox();
this.cmbprotocol = new System.Windows.Forms.ComboBox(); this.cmbprotocol = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.chkudpEnabled = new System.Windows.Forms.CheckBox(); this.chkudpEnabled = new System.Windows.Forms.CheckBox();
@@ -75,14 +74,24 @@
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.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 +106,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();
@@ -104,42 +114,41 @@
// //
// btnClose // btnClose
// //
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.Name = "btnClose"; this.btnClose.Name = "btnClose";
this.btnClose.UseVisualStyleBackColor = true; this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click); this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
// //
// tabControl1 // tabControl1
// //
resources.ApplyResources(this.tabControl1, "tabControl1");
this.tabControl1.Controls.Add(this.tabPage1); this.tabControl1.Controls.Add(this.tabPage1);
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");
this.tabControl1.Name = "tabControl1"; this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0; this.tabControl1.SelectedIndex = 0;
// //
// tabPage1 // tabPage1
// //
resources.ApplyResources(this.tabPage1, "tabPage1");
this.tabPage1.Controls.Add(this.groupBox1); this.tabPage1.Controls.Add(this.groupBox1);
resources.ApplyResources(this.tabPage1, "tabPage1");
this.tabPage1.Name = "tabPage1"; this.tabPage1.Name = "tabPage1";
this.tabPage1.UseVisualStyleBackColor = true; this.tabPage1.UseVisualStyleBackColor = true;
// //
// groupBox1 // groupBox1
// //
resources.ApplyResources(this.groupBox1, "groupBox1"); this.groupBox1.Controls.Add(this.label16);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.txtpass);
this.groupBox1.Controls.Add(this.txtuser);
this.groupBox1.Controls.Add(this.chkdefAllowInsecure); this.groupBox1.Controls.Add(this.chkdefAllowInsecure);
this.groupBox1.Controls.Add(this.chksniffingEnabled2); this.groupBox1.Controls.Add(this.chkAllowLANConn);
this.groupBox1.Controls.Add(this.chksniffingEnabled); this.groupBox1.Controls.Add(this.chksniffingEnabled);
this.groupBox1.Controls.Add(this.chkmuxEnabled); this.groupBox1.Controls.Add(this.chkmuxEnabled);
this.groupBox1.Controls.Add(this.chkAllowIn2);
this.groupBox1.Controls.Add(this.chkudpEnabled2);
this.groupBox1.Controls.Add(this.cmbprotocol2);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.txtlocalPort2);
this.groupBox1.Controls.Add(this.cmbprotocol); this.groupBox1.Controls.Add(this.cmbprotocol);
this.groupBox1.Controls.Add(this.label1); this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.chkudpEnabled); this.groupBox1.Controls.Add(this.chkudpEnabled);
@@ -148,20 +157,41 @@
this.groupBox1.Controls.Add(this.label5); this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.txtlocalPort); this.groupBox1.Controls.Add(this.txtlocalPort);
this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.label2);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
// //
// label16
//
resources.ApplyResources(this.label16, "label16");
this.label16.Name = "label16";
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// txtpass
//
resources.ApplyResources(this.txtpass, "txtpass");
this.txtpass.Name = "txtpass";
//
// txtuser
//
resources.ApplyResources(this.txtuser, "txtuser");
this.txtuser.Name = "txtuser";
//
// chkdefAllowInsecure // chkdefAllowInsecure
// //
resources.ApplyResources(this.chkdefAllowInsecure, "chkdefAllowInsecure"); resources.ApplyResources(this.chkdefAllowInsecure, "chkdefAllowInsecure");
this.chkdefAllowInsecure.Name = "chkdefAllowInsecure"; this.chkdefAllowInsecure.Name = "chkdefAllowInsecure";
this.chkdefAllowInsecure.UseVisualStyleBackColor = true; this.chkdefAllowInsecure.UseVisualStyleBackColor = true;
// //
// chksniffingEnabled2 // chkAllowLANConn
// //
resources.ApplyResources(this.chksniffingEnabled2, "chksniffingEnabled2"); resources.ApplyResources(this.chkAllowLANConn, "chkAllowLANConn");
this.chksniffingEnabled2.Name = "chksniffingEnabled2"; this.chkAllowLANConn.Name = "chkAllowLANConn";
this.chksniffingEnabled2.UseVisualStyleBackColor = true; this.chkAllowLANConn.UseVisualStyleBackColor = true;
// //
// chksniffingEnabled // chksniffingEnabled
// //
@@ -175,43 +205,10 @@
this.chkmuxEnabled.Name = "chkmuxEnabled"; this.chkmuxEnabled.Name = "chkmuxEnabled";
this.chkmuxEnabled.UseVisualStyleBackColor = true; this.chkmuxEnabled.UseVisualStyleBackColor = true;
// //
// chkAllowIn2
//
resources.ApplyResources(this.chkAllowIn2, "chkAllowIn2");
this.chkAllowIn2.Name = "chkAllowIn2";
this.chkAllowIn2.UseVisualStyleBackColor = true;
this.chkAllowIn2.CheckedChanged += new System.EventHandler(this.chkAllowIn2_CheckedChanged);
//
// chkudpEnabled2
//
resources.ApplyResources(this.chkudpEnabled2, "chkudpEnabled2");
this.chkudpEnabled2.Name = "chkudpEnabled2";
this.chkudpEnabled2.UseVisualStyleBackColor = true;
//
// cmbprotocol2
//
resources.ApplyResources(this.cmbprotocol2, "cmbprotocol2");
this.cmbprotocol2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbprotocol2.FormattingEnabled = true;
this.cmbprotocol2.Items.AddRange(new object[] {
resources.GetString("cmbprotocol2.Items"),
resources.GetString("cmbprotocol2.Items1")});
this.cmbprotocol2.Name = "cmbprotocol2";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// txtlocalPort2
//
resources.ApplyResources(this.txtlocalPort2, "txtlocalPort2");
this.txtlocalPort2.Name = "txtlocalPort2";
//
// cmbprotocol // cmbprotocol
// //
resources.ApplyResources(this.cmbprotocol, "cmbprotocol");
this.cmbprotocol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbprotocol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
resources.ApplyResources(this.cmbprotocol, "cmbprotocol");
this.cmbprotocol.FormattingEnabled = true; this.cmbprotocol.FormattingEnabled = true;
this.cmbprotocol.Items.AddRange(new object[] { this.cmbprotocol.Items.AddRange(new object[] {
resources.GetString("cmbprotocol.Items"), resources.GetString("cmbprotocol.Items"),
@@ -237,7 +234,6 @@
// //
// cmbloglevel // cmbloglevel
// //
resources.ApplyResources(this.cmbloglevel, "cmbloglevel");
this.cmbloglevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbloglevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbloglevel.FormattingEnabled = true; this.cmbloglevel.FormattingEnabled = true;
this.cmbloglevel.Items.AddRange(new object[] { this.cmbloglevel.Items.AddRange(new object[] {
@@ -246,6 +242,7 @@
resources.GetString("cmbloglevel.Items2"), resources.GetString("cmbloglevel.Items2"),
resources.GetString("cmbloglevel.Items3"), resources.GetString("cmbloglevel.Items3"),
resources.GetString("cmbloglevel.Items4")}); resources.GetString("cmbloglevel.Items4")});
resources.ApplyResources(this.cmbloglevel, "cmbloglevel");
this.cmbloglevel.Name = "cmbloglevel"; this.cmbloglevel.Name = "cmbloglevel";
// //
// label5 // label5
@@ -265,10 +262,10 @@
// //
// tabPage2 // tabPage2
// //
resources.ApplyResources(this.tabPage2, "tabPage2");
this.tabPage2.Controls.Add(this.linkDnsObjectDoc); this.tabPage2.Controls.Add(this.linkDnsObjectDoc);
this.tabPage2.Controls.Add(this.txtremoteDNS); this.tabPage2.Controls.Add(this.txtremoteDNS);
this.tabPage2.Controls.Add(this.label14); this.tabPage2.Controls.Add(this.label14);
resources.ApplyResources(this.tabPage2, "tabPage2");
this.tabPage2.Name = "tabPage2"; this.tabPage2.Name = "tabPage2";
this.tabPage2.UseVisualStyleBackColor = true; this.tabPage2.UseVisualStyleBackColor = true;
// //
@@ -291,7 +288,6 @@
// //
// tabPage6 // tabPage6
// //
resources.ApplyResources(this.tabPage6, "tabPage6");
this.tabPage6.Controls.Add(this.chkKcpcongestion); this.tabPage6.Controls.Add(this.chkKcpcongestion);
this.tabPage6.Controls.Add(this.txtKcpwriteBufferSize); this.tabPage6.Controls.Add(this.txtKcpwriteBufferSize);
this.tabPage6.Controls.Add(this.label10); this.tabPage6.Controls.Add(this.label10);
@@ -305,6 +301,7 @@
this.tabPage6.Controls.Add(this.label7); this.tabPage6.Controls.Add(this.label7);
this.tabPage6.Controls.Add(this.txtKcpmtu); this.tabPage6.Controls.Add(this.txtKcpmtu);
this.tabPage6.Controls.Add(this.label6); this.tabPage6.Controls.Add(this.label6);
resources.ApplyResources(this.tabPage6, "tabPage6");
this.tabPage6.Name = "tabPage6"; this.tabPage6.Name = "tabPage6";
this.tabPage6.UseVisualStyleBackColor = true; this.tabPage6.UseVisualStyleBackColor = true;
// //
@@ -376,21 +373,18 @@
// //
// tabPage7 // tabPage7
// //
resources.ApplyResources(this.tabPage7, "tabPage7");
this.tabPage7.Controls.Add(this.chkEnableSecurityProtocolTls13); this.tabPage7.Controls.Add(this.chkEnableSecurityProtocolTls13);
this.tabPage7.Controls.Add(this.chkEnableAutoAdjustMainLvColWidth); this.tabPage7.Controls.Add(this.chkEnableAutoAdjustMainLvColWidth);
this.tabPage7.Controls.Add(this.btnSetLoopback); this.tabPage7.Controls.Add(this.btnSetLoopback);
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);
this.tabPage7.Controls.Add(this.chkEnableStatistics); this.tabPage7.Controls.Add(this.chkEnableStatistics);
this.tabPage7.Controls.Add(this.chkAllowLANConn);
this.tabPage7.Controls.Add(this.chkAutoRun); this.tabPage7.Controls.Add(this.chkAutoRun);
resources.ApplyResources(this.tabPage7, "tabPage7");
this.tabPage7.Name = "tabPage7"; this.tabPage7.Name = "tabPage7";
this.tabPage7.UseVisualStyleBackColor = true; this.tabPage7.UseVisualStyleBackColor = true;
// //
@@ -429,21 +423,6 @@
this.chkIgnoreGeoUpdateCore.Name = "chkIgnoreGeoUpdateCore"; this.chkIgnoreGeoUpdateCore.Name = "chkIgnoreGeoUpdateCore";
this.chkIgnoreGeoUpdateCore.UseVisualStyleBackColor = true; this.chkIgnoreGeoUpdateCore.UseVisualStyleBackColor = true;
// //
// cmbCoreType
//
resources.ApplyResources(this.cmbCoreType, "cmbCoreType");
this.cmbCoreType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCoreType.FormattingEnabled = true;
this.cmbCoreType.Items.AddRange(new object[] {
resources.GetString("cmbCoreType.Items"),
resources.GetString("cmbCoreType.Items1")});
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");
@@ -452,9 +431,9 @@
// //
// cbFreshrate // cbFreshrate
// //
resources.ApplyResources(this.cbFreshrate, "cbFreshrate");
this.cbFreshrate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbFreshrate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbFreshrate.FormattingEnabled = true; this.cbFreshrate.FormattingEnabled = true;
resources.ApplyResources(this.cbFreshrate, "cbFreshrate");
this.cbFreshrate.Name = "cbFreshrate"; this.cbFreshrate.Name = "cbFreshrate";
// //
// lbFreshrate // lbFreshrate
@@ -468,31 +447,115 @@
this.chkEnableStatistics.Name = "chkEnableStatistics"; this.chkEnableStatistics.Name = "chkEnableStatistics";
this.chkEnableStatistics.UseVisualStyleBackColor = true; this.chkEnableStatistics.UseVisualStyleBackColor = true;
// //
// chkAllowLANConn
//
resources.ApplyResources(this.chkAllowLANConn, "chkAllowLANConn");
this.chkAllowLANConn.Name = "chkAllowLANConn";
this.chkAllowLANConn.UseVisualStyleBackColor = true;
//
// chkAutoRun // chkAutoRun
// //
resources.ApplyResources(this.chkAutoRun, "chkAutoRun"); resources.ApplyResources(this.chkAutoRun, "chkAutoRun");
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
// //
resources.ApplyResources(this.tabPage3, "tabPage3");
this.tabPage3.Controls.Add(this.groupBox2); this.tabPage3.Controls.Add(this.groupBox2);
resources.ApplyResources(this.tabPage3, "tabPage3");
this.tabPage3.Name = "tabPage3"; this.tabPage3.Name = "tabPage3";
this.tabPage3.UseVisualStyleBackColor = true; this.tabPage3.UseVisualStyleBackColor = true;
// //
// groupBox2 // groupBox2
// //
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label13);
this.groupBox2.Controls.Add(this.label12); this.groupBox2.Controls.Add(this.label12);
this.groupBox2.Controls.Add(this.txtsystemProxyExceptions); this.groupBox2.Controls.Add(this.txtsystemProxyExceptions);
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
// //
@@ -513,9 +576,9 @@
// //
// panel2 // panel2
// //
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Controls.Add(this.btnClose); this.panel2.Controls.Add(this.btnClose);
this.panel2.Controls.Add(this.btnOK); this.panel2.Controls.Add(this.btnOK);
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Name = "panel2"; this.panel2.Name = "panel2";
// //
// btnOK // btnOK
@@ -551,6 +614,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();
@@ -576,11 +641,6 @@
private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.ComboBox cmbprotocol; private System.Windows.Forms.ComboBox cmbprotocol;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox cmbprotocol2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtlocalPort2;
private System.Windows.Forms.CheckBox chkudpEnabled2;
private System.Windows.Forms.CheckBox chkAllowIn2;
private System.Windows.Forms.CheckBox chkmuxEnabled; private System.Windows.Forms.CheckBox chkmuxEnabled;
private System.Windows.Forms.TabPage tabPage6; private System.Windows.Forms.TabPage tabPage6;
private System.Windows.Forms.TextBox txtKcpmtu; private System.Windows.Forms.TextBox txtKcpmtu;
@@ -600,7 +660,6 @@
private System.Windows.Forms.CheckBox chkAutoRun; private System.Windows.Forms.CheckBox chkAutoRun;
private System.Windows.Forms.CheckBox chkAllowLANConn; private System.Windows.Forms.CheckBox chkAllowLANConn;
private System.Windows.Forms.CheckBox chksniffingEnabled; private System.Windows.Forms.CheckBox chksniffingEnabled;
private System.Windows.Forms.CheckBox chksniffingEnabled2;
private System.Windows.Forms.CheckBox chkEnableStatistics; private System.Windows.Forms.CheckBox chkEnableStatistics;
private System.Windows.Forms.ComboBox cbFreshrate; private System.Windows.Forms.ComboBox cbFreshrate;
private System.Windows.Forms.Label lbFreshrate; private System.Windows.Forms.Label lbFreshrate;
@@ -610,8 +669,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;
@@ -623,5 +680,22 @@
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;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtpass;
private System.Windows.Forms.TextBox txtuser;
} }
} }

View File

@@ -1,9 +1,11 @@
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;
using v2rayN.Handler; using v2rayN.Handler;
using v2rayN.Mode; using v2rayN.Mode;
using v2rayN.Resx;
namespace v2rayN.Forms namespace v2rayN.Forms
{ {
@@ -21,6 +23,8 @@ namespace v2rayN.Forms
InitKCP(); InitKCP();
InitGUI(); InitGUI();
InitCoreType();
} }
/// <summary> /// <summary>
@@ -42,23 +46,10 @@ namespace v2rayN.Forms
cmbprotocol.Text = config.inbound[0].protocol.ToString(); cmbprotocol.Text = config.inbound[0].protocol.ToString();
chkudpEnabled.Checked = config.inbound[0].udpEnabled; chkudpEnabled.Checked = config.inbound[0].udpEnabled;
chksniffingEnabled.Checked = config.inbound[0].sniffingEnabled; chksniffingEnabled.Checked = config.inbound[0].sniffingEnabled;
chkAllowLANConn.Checked = config.inbound[0].allowLANConn;
txtuser.Text = config.inbound[0].user;
txtpass.Text = config.inbound[0].pass;
txtlocalPort2.Text = $"{config.inbound[0].localPort + 1}";
cmbprotocol2.Text = Global.InboundHttp;
if (config.inbound.Count > 1)
{
txtlocalPort2.Text = config.inbound[1].localPort.ToString();
cmbprotocol2.Text = config.inbound[1].protocol.ToString();
chkudpEnabled2.Checked = config.inbound[1].udpEnabled;
chksniffingEnabled2.Checked = config.inbound[1].sniffingEnabled;
chkAllowIn2.Checked = true;
}
else
{
chkAllowIn2.Checked = false;
}
chkAllowIn2State();
} }
//remoteDNS //remoteDNS
@@ -92,15 +83,14 @@ namespace v2rayN.Forms
//开机自动启动 //开机自动启动
chkAutoRun.Checked = Utils.IsAutoRun(); chkAutoRun.Checked = Utils.IsAutoRun();
chkAllowLANConn.Checked = config.allowLANConn;
chkEnableStatistics.Checked = config.enableStatistics; chkEnableStatistics.Checked = config.enableStatistics;
chkKeepOlderDedupl.Checked = config.keepOlderDedupl; chkKeepOlderDedupl.Checked = config.keepOlderDedupl;
ComboItem[] cbSource = new ComboItem[] ComboItem[] cbSource = new ComboItem[]
{ {
new ComboItem{ID = (int)Global.StatisticsFreshRate.quick, Text = UIRes.I18N("QuickFresh")}, new ComboItem{ID = (int)Global.StatisticsFreshRate.quick, Text = ResUI.QuickFresh},
new ComboItem{ID = (int)Global.StatisticsFreshRate.medium, Text = UIRes.I18N("MediumFresh")}, new ComboItem{ID = (int)Global.StatisticsFreshRate.medium, Text = ResUI.MediumFresh},
new ComboItem{ID = (int)Global.StatisticsFreshRate.slow, Text = UIRes.I18N("SlowFresh")}, new ComboItem{ID = (int)Global.StatisticsFreshRate.slow, Text = ResUI.SlowFresh},
}; };
cbFreshrate.DataSource = cbSource; cbFreshrate.DataSource = cbSource;
@@ -121,11 +111,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)
@@ -144,13 +163,18 @@ 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;
} }
else else
{ {
UI.ShowWarning(UIRes.I18N("OperationFailed")); UI.ShowWarning(ResUI.OperationFailed);
} }
} }
@@ -172,14 +196,15 @@ namespace v2rayN.Forms
string protocol = cmbprotocol.Text.TrimEx(); string protocol = cmbprotocol.Text.TrimEx();
bool udpEnabled = chkudpEnabled.Checked; bool udpEnabled = chkudpEnabled.Checked;
bool sniffingEnabled = chksniffingEnabled.Checked; bool sniffingEnabled = chksniffingEnabled.Checked;
bool allowLANConn = chkAllowLANConn.Checked;
if (Utils.IsNullOrEmpty(localPort) || !Utils.IsNumberic(localPort)) if (Utils.IsNullOrEmpty(localPort) || !Utils.IsNumberic(localPort))
{ {
UI.Show(UIRes.I18N("FillLocalListeningPort")); UI.Show(ResUI.FillLocalListeningPort);
return -1; return -1;
} }
if (Utils.IsNullOrEmpty(protocol)) if (Utils.IsNullOrEmpty(protocol))
{ {
UI.Show(UIRes.I18N("PleaseSelectProtocol")); UI.Show(ResUI.PleaseSelectProtocol);
return -1; return -1;
} }
@@ -192,7 +217,7 @@ namespace v2rayN.Forms
{ {
if (remoteDNS.Contains("{") || remoteDNS.Contains("}")) if (remoteDNS.Contains("{") || remoteDNS.Contains("}"))
{ {
UI.Show(UIRes.I18N("FillCorrectDNSText")); UI.Show(ResUI.FillCorrectDNSText);
return -1; return -1;
} }
} }
@@ -201,41 +226,16 @@ namespace v2rayN.Forms
config.inbound[0].protocol = protocol; config.inbound[0].protocol = protocol;
config.inbound[0].udpEnabled = udpEnabled; config.inbound[0].udpEnabled = udpEnabled;
config.inbound[0].sniffingEnabled = sniffingEnabled; config.inbound[0].sniffingEnabled = sniffingEnabled;
config.inbound[0].allowLANConn = allowLANConn;
config.inbound[0].user = txtuser.Text;
config.inbound[0].pass = txtpass.Text;
//本地监听2 if (config.inbound.Count > 1)
string localPort2 = txtlocalPort2.Text.TrimEx();
string protocol2 = cmbprotocol2.Text.TrimEx();
bool udpEnabled2 = chkudpEnabled2.Checked;
bool sniffingEnabled2 = chksniffingEnabled2.Checked;
if (chkAllowIn2.Checked)
{ {
if (Utils.IsNullOrEmpty(localPort2) || !Utils.IsNumberic(localPort2)) config.inbound.RemoveAt(1);
{
UI.Show(UIRes.I18N("FillLocalListeningPort"));
return -1;
}
if (Utils.IsNullOrEmpty(protocol2))
{
UI.Show(UIRes.I18N("PleaseSelectProtocol"));
return -1;
}
if (config.inbound.Count < 2)
{
config.inbound.Add(new Mode.InItem());
}
config.inbound[1].localPort = Utils.ToInt(localPort2);
config.inbound[1].protocol = protocol2;
config.inbound[1].udpEnabled = udpEnabled2;
config.inbound[1].sniffingEnabled = sniffingEnabled2;
}
else
{
if (config.inbound.Count > 1)
{
config.inbound.RemoveAt(1);
}
} }
//日志 //日志
config.logEnabled = logEnabled; config.logEnabled = logEnabled;
config.loglevel = loglevel; config.loglevel = loglevel;
@@ -275,7 +275,7 @@ namespace v2rayN.Forms
|| Utils.IsNullOrEmpty(readBufferSize) || !Utils.IsNumberic(readBufferSize) || Utils.IsNullOrEmpty(readBufferSize) || !Utils.IsNumberic(readBufferSize)
|| Utils.IsNullOrEmpty(writeBufferSize) || !Utils.IsNumberic(writeBufferSize)) || Utils.IsNullOrEmpty(writeBufferSize) || !Utils.IsNumberic(writeBufferSize))
{ {
UI.Show(UIRes.I18N("FillKcpParameters")); UI.Show(ResUI.FillKcpParameters);
return -1; return -1;
} }
config.kcpItem.mtu = Utils.ToInt(mtu); config.kcpItem.mtu = Utils.ToInt(mtu);
@@ -298,15 +298,12 @@ namespace v2rayN.Forms
//开机自动启动 //开机自动启动
Utils.SetAutoRun(chkAutoRun.Checked); Utils.SetAutoRun(chkAutoRun.Checked);
config.allowLANConn = chkAllowLANConn.Checked;
bool lastEnableStatistics = config.enableStatistics; bool lastEnableStatistics = config.enableStatistics;
config.enableStatistics = chkEnableStatistics.Checked; config.enableStatistics = chkEnableStatistics.Checked;
config.statisticsFreshRate = (int)cbFreshrate.SelectedValue; config.statisticsFreshRate = (int)cbFreshrate.SelectedValue;
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;
@@ -314,22 +311,22 @@ 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;
} }
private void chkAllowIn2_CheckedChanged(object sender, EventArgs e)
{
chkAllowIn2State();
}
private void chkAllowIn2State()
{
bool blAllow2 = chkAllowIn2.Checked;
txtlocalPort2.Enabled =
cmbprotocol2.Enabled =
chkudpEnabled2.Enabled = blAllow2;
}
private void linkDnsObjectDoc_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) private void linkDnsObjectDoc_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{ {
@@ -340,5 +337,6 @@ namespace v2rayN.Forms
{ {
Process.Start(Utils.GetPath("EnableLoopback.exe")); Process.Start(Utils.GetPath("EnableLoopback.exe"));
} }
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -121,48 +121,96 @@
<value>取消(&amp;C)</value> <value>取消(&amp;C)</value>
</data> </data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label16.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 12</value>
</data>
<data name="label16.Text" xml:space="preserve">
<value>认证密码</value>
</data>
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
<value>219, 65</value>
</data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>认证用户名</value>
</data>
<data name="chkdefAllowInsecure.Location" type="System.Drawing.Point, System.Drawing">
<value>15, 208</value>
</data>
<data name="chkdefAllowInsecure.Size" type="System.Drawing.Size, System.Drawing"> <data name="chkdefAllowInsecure.Size" type="System.Drawing.Size, System.Drawing">
<value>324, 16</value> <value>324, 16</value>
</data> </data>
<data name="chkdefAllowInsecure.Text" xml:space="preserve"> <data name="chkdefAllowInsecure.Text" xml:space="preserve">
<value>传输层安全选tls时默认跳过证书验证(allowInsecure)</value> <value>传输层安全选tls时默认跳过证书验证(allowInsecure)</value>
</data> </data>
<data name="chksniffingEnabled2.Location" type="System.Drawing.Point, System.Drawing">
<value>468, 117</value>
</data>
<data name="chksniffingEnabled2.Size" type="System.Drawing.Size, System.Drawing"> <data name="chksniffingEnabled2.Size" type="System.Drawing.Size, System.Drawing">
<value>96, 16</value> <value>96, 16</value>
</data> </data>
<data name="chksniffingEnabled2.Text" xml:space="preserve"> <data name="chksniffingEnabled2.Text" xml:space="preserve">
<value>开启流量探测</value> <value>开启流量探测</value>
</data> </data>
<data name="chkAllowLANConn.Size" type="System.Drawing.Size, System.Drawing">
<value>144, 16</value>
</data>
<data name="chkAllowLANConn.Text" xml:space="preserve">
<value>允许来自局域网的连接</value>
</data>
<data name="chksniffingEnabled.Size" type="System.Drawing.Size, System.Drawing"> <data name="chksniffingEnabled.Size" type="System.Drawing.Size, System.Drawing">
<value>96, 16</value> <value>96, 16</value>
</data> </data>
<data name="chksniffingEnabled.Text" xml:space="preserve"> <data name="chksniffingEnabled.Text" xml:space="preserve">
<value>开启流量探测</value> <value>开启流量探测</value>
</data> </data>
<data name="chkmuxEnabled.Location" type="System.Drawing.Point, System.Drawing">
<value>15, 145</value>
</data>
<data name="chkmuxEnabled.Size" type="System.Drawing.Size, System.Drawing"> <data name="chkmuxEnabled.Size" type="System.Drawing.Size, System.Drawing">
<value>114, 16</value> <value>114, 16</value>
</data> </data>
<data name="chkmuxEnabled.Text" xml:space="preserve"> <data name="chkmuxEnabled.Text" xml:space="preserve">
<value>开启Mux多路复用</value> <value>开启Mux多路复用</value>
</data> </data>
<data name="chkAllowIn2.Location" type="System.Drawing.Point, System.Drawing">
<value>15, 120</value>
</data>
<data name="chkAllowIn2.Size" type="System.Drawing.Size, System.Drawing"> <data name="chkAllowIn2.Size" type="System.Drawing.Size, System.Drawing">
<value>102, 16</value> <value>102, 16</value>
</data> </data>
<data name="chkAllowIn2.Text" xml:space="preserve"> <data name="chkAllowIn2.Text" xml:space="preserve">
<value>本地监听端口2</value> <value>本地监听端口2</value>
</data> </data>
<data name="chkudpEnabled2.Location" type="System.Drawing.Point, System.Drawing">
<value>369, 119</value>
</data>
<data name="chkudpEnabled2.Size" type="System.Drawing.Size, System.Drawing"> <data name="chkudpEnabled2.Size" type="System.Drawing.Size, System.Drawing">
<value>66, 16</value> <value>66, 16</value>
</data> </data>
<data name="chkudpEnabled2.Text" xml:space="preserve"> <data name="chkudpEnabled2.Text" xml:space="preserve">
<value>开启UDP</value> <value>开启UDP</value>
</data> </data>
<data name="cmbprotocol2.Location" type="System.Drawing.Point, System.Drawing">
<value>257, 117</value>
</data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<value>206, 121</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing"> <data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>29, 12</value> <value>29, 12</value>
</data> </data>
<data name="label3.Text" xml:space="preserve"> <data name="label3.Text" xml:space="preserve">
<value>协议</value> <value>协议</value>
</data> </data>
<data name="txtlocalPort2.Location" type="System.Drawing.Point, System.Drawing">
<value>124, 117</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>219, 29</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing"> <data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>29, 12</value> <value>29, 12</value>
</data> </data>
@@ -175,12 +223,21 @@
<data name="chkudpEnabled.Text" xml:space="preserve"> <data name="chkudpEnabled.Text" xml:space="preserve">
<value>开启UDP</value> <value>开启UDP</value>
</data> </data>
<data name="chklogEnabled.Location" type="System.Drawing.Point, System.Drawing">
<value>15, 176</value>
</data>
<data name="chklogEnabled.Size" type="System.Drawing.Size, System.Drawing"> <data name="chklogEnabled.Size" type="System.Drawing.Size, System.Drawing">
<value>156, 16</value> <value>156, 16</value>
</data> </data>
<data name="chklogEnabled.Text" xml:space="preserve"> <data name="chklogEnabled.Text" xml:space="preserve">
<value>记录本地日志(默认关闭)</value> <value>记录本地日志(默认关闭)</value>
</data> </data>
<data name="cmbloglevel.Location" type="System.Drawing.Point, System.Drawing">
<value>257, 174</value>
</data>
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
<value>193, 178</value>
</data>
<data name="label5.Size" type="System.Drawing.Size, System.Drawing"> <data name="label5.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 12</value> <value>53, 12</value>
</data> </data>
@@ -253,12 +310,6 @@
<data name="chkIgnoreGeoUpdateCore.Text" xml:space="preserve"> <data name="chkIgnoreGeoUpdateCore.Text" xml:space="preserve">
<value>更新Core时忽略Geo文件</value> <value>更新Core时忽略Geo文件</value>
</data> </data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 12</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Core类型</value>
</data>
<data name="chkKeepOlderDedupl.Size" type="System.Drawing.Size, System.Drawing"> <data name="chkKeepOlderDedupl.Size" type="System.Drawing.Size, System.Drawing">
<value>156, 16</value> <value>156, 16</value>
</data> </data>
@@ -277,12 +328,6 @@
<data name="chkEnableStatistics.Text" xml:space="preserve"> <data name="chkEnableStatistics.Text" xml:space="preserve">
<value>启用统计(实时网速显示和使用流量显示需要重启v2rayN客户端)</value> <value>启用统计(实时网速显示和使用流量显示需要重启v2rayN客户端)</value>
</data> </data>
<data name="chkAllowLANConn.Size" type="System.Drawing.Size, System.Drawing">
<value>144, 16</value>
</data>
<data name="chkAllowLANConn.Text" xml:space="preserve">
<value>允许来自局域网的连接</value>
</data>
<data name="chkAutoRun.Size" type="System.Drawing.Size, System.Drawing"> <data name="chkAutoRun.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 16</value> <value>180, 16</value>
</data> </data>
@@ -295,6 +340,12 @@
<data name="tabPage7.Text" xml:space="preserve"> <data name="tabPage7.Text" xml:space="preserve">
<value> v2rayN设置 </value> <value> v2rayN设置 </value>
</data> </data>
<data name="tabPageCoreType.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value>
</data>
<data name="tabPageCoreType.Text" xml:space="preserve">
<value> Core类型设置 </value>
</data>
<data name="label13.Size" type="System.Drawing.Size, System.Drawing"> <data name="label13.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value> <value>95, 12</value>
</data> </data>
@@ -328,6 +379,12 @@
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing"> <data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 479</value> <value>0, 479</value>
</data> </data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>662, 60</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>662, 10</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing"> <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>662, 539</value> <value>662, 539</value>
</data> </data>

View File

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

View File

@@ -4,6 +4,7 @@ using System.Windows.Forms;
using v2rayN.Base; using v2rayN.Base;
using v2rayN.Handler; using v2rayN.Handler;
using v2rayN.Mode; using v2rayN.Mode;
using v2rayN.Resx;
namespace v2rayN.Forms namespace v2rayN.Forms
{ {
@@ -47,8 +48,8 @@ namespace v2rayN.Forms
} }
rulesItem.inboundTag = inboundTag; rulesItem.inboundTag = inboundTag;
rulesItem.outboundTag = cmbOutboundTag.Text; rulesItem.outboundTag = cmbOutboundTag.Text;
rulesItem.domain = Utils.String2List(txtDomain.Text); rulesItem.domain = Utils.String2ListSorted(txtDomain.Text);
rulesItem.ip = Utils.String2List(txtIP.Text); rulesItem.ip = Utils.String2ListSorted(txtIP.Text);
var protocol = new List<string>(); var protocol = new List<string>();
for (int i = 0; i < clbProtocol.Items.Count; i++) for (int i = 0; i < clbProtocol.Items.Count; i++)
@@ -125,7 +126,7 @@ namespace v2rayN.Forms
} }
if (!hasRule) if (!hasRule)
{ {
UI.ShowWarning(string.Format(UIRes.I18N("RoutingRuleDetailRequiredTips"), "Port/Protocol/Domain/IP")); UI.ShowWarning(string.Format(ResUI.RoutingRuleDetailRequiredTips, "Port/Protocol/Domain/IP"));
return; return;
} }
this.DialogResult = DialogResult.OK; this.DialogResult = DialogResult.OK;

View File

@@ -4,6 +4,7 @@ using System.Windows.Forms;
using v2rayN.Base; using v2rayN.Base;
using v2rayN.Handler; using v2rayN.Handler;
using v2rayN.Mode; using v2rayN.Mode;
using v2rayN.Resx;
namespace v2rayN.Forms namespace v2rayN.Forms
{ {
@@ -54,6 +55,7 @@ namespace v2rayN.Forms
lvRoutings.View = View.Details; lvRoutings.View = View.Details;
lvRoutings.MultiSelect = true; lvRoutings.MultiSelect = true;
lvRoutings.HeaderStyle = ColumnHeaderStyle.Clickable; lvRoutings.HeaderStyle = ColumnHeaderStyle.Clickable;
lvRoutings.RegisterDragEvent(UpdateDragEventHandler);
lvRoutings.Columns.Add("", 30); lvRoutings.Columns.Add("", 30);
lvRoutings.Columns.Add("outboundTag", 80); lvRoutings.Columns.Add("outboundTag", 80);
@@ -61,11 +63,22 @@ namespace v2rayN.Forms
lvRoutings.Columns.Add("protocol", 80); lvRoutings.Columns.Add("protocol", 80);
lvRoutings.Columns.Add("inboundTag", 80); lvRoutings.Columns.Add("inboundTag", 80);
lvRoutings.Columns.Add("domain", 160); lvRoutings.Columns.Add("domain", 160);
lvRoutings.Columns.Add("ip", 160); lvRoutings.Columns.Add("ip", 160);
lvRoutings.Columns.Add("enable", 60); lvRoutings.Columns.Add("enable", 60);
lvRoutings.EndUpdate(); lvRoutings.EndUpdate();
} }
private void UpdateDragEventHandler(int index, int targetIndex)
{
if (index < 0 || targetIndex < 0)
{
return;
}
if (ConfigHandler.MoveRoutingRule(ref routingItem, index, EMove.Position, targetIndex) == 0)
{
RefreshRoutingsView();
}
}
private void RefreshRoutingsView() private void RefreshRoutingsView()
{ {
@@ -102,7 +115,7 @@ namespace v2rayN.Forms
} }
else else
{ {
UI.ShowWarning(UIRes.I18N("OperationFailed")); UI.ShowWarning(ResUI.OperationFailed);
} }
} }
@@ -142,7 +155,7 @@ namespace v2rayN.Forms
{ {
if (lvRoutings.SelectedIndices.Count <= 0) if (lvRoutings.SelectedIndices.Count <= 0)
{ {
UI.Show(UIRes.I18N("PleaseSelectRules")); UI.Show(ResUI.PleaseSelectRules);
return index; return index;
} }
@@ -186,7 +199,7 @@ namespace v2rayN.Forms
int index = GetLvSelectedIndex(); int index = GetLvSelectedIndex();
if (index < 0) if (index < 0)
{ {
UI.Show(UIRes.I18N("PleaseSelectRules")); UI.Show(ResUI.PleaseSelectRules);
return; return;
} }
if (ConfigHandler.MoveRoutingRule(ref routingItem, index, eMove) == 0) if (ConfigHandler.MoveRoutingRule(ref routingItem, index, eMove) == 0)
@@ -220,7 +233,7 @@ namespace v2rayN.Forms
{ {
return; return;
} }
if (UI.ShowYesNo(UIRes.I18N("RemoveRules")) == DialogResult.No) if (UI.ShowYesNo(ResUI.RemoveRules) == DialogResult.No)
{ {
return; return;
} }
@@ -241,7 +254,7 @@ namespace v2rayN.Forms
if (lst.Count > 0) if (lst.Count > 0)
{ {
Utils.SetClipboardData(Utils.ToJson(lst)); Utils.SetClipboardData(Utils.ToJson(lst));
//UI.Show(UIRes.I18N("OperationSuccess")); //UI.Show(ResUI.OperationSuccess"));
} }
} }
@@ -311,7 +324,7 @@ namespace v2rayN.Forms
if (AddBatchRoutingRules(ref routingItem, result) == 0) if (AddBatchRoutingRules(ref routingItem, result) == 0)
{ {
RefreshRoutingsView(); RefreshRoutingsView();
UI.Show(UIRes.I18N("OperationSuccess")); UI.Show(ResUI.OperationSuccess);
} }
} }
@@ -321,7 +334,7 @@ namespace v2rayN.Forms
if (AddBatchRoutingRules(ref routingItem, clipboardData) == 0) if (AddBatchRoutingRules(ref routingItem, clipboardData) == 0)
{ {
RefreshRoutingsView(); RefreshRoutingsView();
UI.Show(UIRes.I18N("OperationSuccess")); UI.Show(ResUI.OperationSuccess);
} }
} }
private void menuImportRulesFromUrl_Click(object sender, EventArgs e) private void menuImportRulesFromUrl_Click(object sender, EventArgs e)
@@ -329,7 +342,7 @@ namespace v2rayN.Forms
var url = txtUrl.Text.Trim(); var url = txtUrl.Text.Trim();
if (Utils.IsNullOrEmpty(url)) if (Utils.IsNullOrEmpty(url))
{ {
UI.Show(UIRes.I18N("MsgNeedUrl")); UI.Show(ResUI.MsgNeedUrl);
return; return;
} }
DownloadHandle downloadHandle = new DownloadHandle(); DownloadHandle downloadHandle = new DownloadHandle();
@@ -337,13 +350,13 @@ namespace v2rayN.Forms
if (AddBatchRoutingRules(ref routingItem, clipboardData) == 0) if (AddBatchRoutingRules(ref routingItem, clipboardData) == 0)
{ {
RefreshRoutingsView(); RefreshRoutingsView();
UI.Show(UIRes.I18N("OperationSuccess")); UI.Show(ResUI.OperationSuccess);
} }
} }
private int AddBatchRoutingRules(ref RoutingItem routingItem, string clipboardData) private int AddBatchRoutingRules(ref RoutingItem routingItem, string clipboardData)
{ {
bool blReplace = false; bool blReplace = false;
if (UI.ShowYesNo(UIRes.I18N("AddBatchRoutingRulesYesNo")) == DialogResult.No) if (UI.ShowYesNo(ResUI.AddBatchRoutingRulesYesNo) == DialogResult.No)
{ {
blReplace = true; blReplace = true;
} }
@@ -353,6 +366,6 @@ namespace v2rayN.Forms
#endregion #endregion
} }
} }

View File

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

View File

@@ -4,6 +4,7 @@ using System.Windows.Forms;
using v2rayN.Base; using v2rayN.Base;
using v2rayN.Handler; using v2rayN.Handler;
using v2rayN.Mode; using v2rayN.Mode;
using v2rayN.Resx;
namespace v2rayN.Forms namespace v2rayN.Forms
{ {
@@ -61,7 +62,7 @@ namespace v2rayN.Forms
} }
else else
{ {
UI.ShowWarning(UIRes.I18N("OperationFailed")); UI.ShowWarning(ResUI.OperationFailed);
} }
} }
@@ -144,10 +145,10 @@ namespace v2rayN.Forms
lvRoutings.HeaderStyle = ColumnHeaderStyle.Clickable; lvRoutings.HeaderStyle = ColumnHeaderStyle.Clickable;
lvRoutings.Columns.Add("", 30); lvRoutings.Columns.Add("", 30);
lvRoutings.Columns.Add(UIRes.I18N("LvAlias"), 200); lvRoutings.Columns.Add(ResUI.LvAlias, 200);
lvRoutings.Columns.Add(UIRes.I18N("LvCount"), 60); lvRoutings.Columns.Add(ResUI.LvCount, 60);
lvRoutings.Columns.Add(UIRes.I18N("LvUrl"), 240); lvRoutings.Columns.Add(ResUI.LvUrl, 240);
lvRoutings.Columns.Add(UIRes.I18N("LvCustomIcon"), 240); lvRoutings.Columns.Add(ResUI.LvCustomIcon, 240);
lvRoutings.EndUpdate(); lvRoutings.EndUpdate();
} }
@@ -211,7 +212,7 @@ namespace v2rayN.Forms
{ {
if (lvRoutings.SelectedIndices.Count <= 0) if (lvRoutings.SelectedIndices.Count <= 0)
{ {
UI.Show(UIRes.I18N("PleaseSelectRules")); UI.Show(ResUI.PleaseSelectRules);
return index; return index;
} }
@@ -259,7 +260,7 @@ namespace v2rayN.Forms
{ {
return; return;
} }
if (UI.ShowYesNo(UIRes.I18N("RemoveRules")) == DialogResult.No) if (UI.ShowYesNo(ResUI.RemoveRules) == DialogResult.No)
{ {
return; return;
} }
@@ -282,7 +283,7 @@ namespace v2rayN.Forms
{ {
if (index < 0) if (index < 0)
{ {
UI.Show(UIRes.I18N("PleaseSelectServer")); UI.Show(ResUI.PleaseSelectServer);
return -1; return -1;
} }
if (ConfigHandler.SetDefaultRouting(ref config, index) == 0) if (ConfigHandler.SetDefaultRouting(ref config, index) == 0)
@@ -301,7 +302,15 @@ namespace v2rayN.Forms
txtBlockDomain.Text = "geosite:category-ads-all"; txtBlockDomain.Text = "geosite:category-ads-all";
UI.Show(UIRes.I18N("OperationSuccess")); UI.Show(ResUI.OperationSuccess);
}
private void menuImportAdvancedRules_Click(object sender, EventArgs e)
{
if (ConfigHandler.InitBuiltinRouting(ref config, true) == 0)
{
RefreshRoutingsView();
}
} }
#endregion #endregion

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Windows.Forms; using System.Windows.Forms;
using v2rayN.Mode; using v2rayN.Mode;
using v2rayN.Resx;
namespace v2rayN.Forms namespace v2rayN.Forms
{ {
@@ -156,34 +157,34 @@ namespace v2rayN.Forms
if (network.Equals(Global.DefaultNetwork)) if (network.Equals(Global.DefaultNetwork))
{ {
tipRequestHost.Text = UIRes.I18N("TransportRequestHostTip1"); tipRequestHost.Text = ResUI.TransportRequestHostTip1;
tipHeaderType.Text = UIRes.I18N("TransportHeaderTypeTip1"); tipHeaderType.Text = ResUI.TransportHeaderTypeTip1;
} }
else if (network.Equals("kcp")) else if (network.Equals("kcp"))
{ {
tipHeaderType.Text = UIRes.I18N("TransportHeaderTypeTip2"); tipHeaderType.Text = ResUI.TransportHeaderTypeTip2;
tipPath.Text = UIRes.I18N("TransportPathTip5"); tipPath.Text = ResUI.TransportPathTip5;
} }
else if (network.Equals("ws")) else if (network.Equals("ws"))
{ {
tipRequestHost.Text = UIRes.I18N("TransportRequestHostTip2"); tipRequestHost.Text = ResUI.TransportRequestHostTip2;
tipPath.Text = UIRes.I18N("TransportPathTip1"); tipPath.Text = ResUI.TransportPathTip1;
} }
else if (network.Equals("h2")) else if (network.Equals("h2"))
{ {
tipRequestHost.Text = UIRes.I18N("TransportRequestHostTip3"); tipRequestHost.Text = ResUI.TransportRequestHostTip3;
tipPath.Text = UIRes.I18N("TransportPathTip2"); tipPath.Text = ResUI.TransportPathTip2;
} }
else if (network.Equals("quic")) else if (network.Equals("quic"))
{ {
tipRequestHost.Text = UIRes.I18N("TransportRequestHostTip4"); tipRequestHost.Text = ResUI.TransportRequestHostTip4;
tipPath.Text = UIRes.I18N("TransportPathTip3"); tipPath.Text = ResUI.TransportPathTip3;
tipHeaderType.Text = UIRes.I18N("TransportHeaderTypeTip3"); tipHeaderType.Text = ResUI.TransportHeaderTypeTip3;
} }
else if (network.Equals("grpc")) else if (network.Equals("grpc"))
{ {
tipPath.Text = UIRes.I18N("TransportPathTip4"); tipPath.Text = ResUI.TransportPathTip4;
tipHeaderType.Text = UIRes.I18N("TransportHeaderTypeTip4"); tipHeaderType.Text = ResUI.TransportHeaderTypeTip4;
labHeaderType.Visible = false; labHeaderType.Visible = false;
} }
} }

View File

@@ -30,6 +30,8 @@
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SubSettingControl)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SubSettingControl));
this.grbMain = new System.Windows.Forms.GroupBox(); this.grbMain = new System.Windows.Forms.GroupBox();
this.label4 = new System.Windows.Forms.Label();
this.cmbGroup = new System.Windows.Forms.ComboBox();
this.txtUserAgent = new System.Windows.Forms.TextBox(); this.txtUserAgent = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.btnShare = new System.Windows.Forms.Button(); this.btnShare = new System.Windows.Forms.Button();
@@ -47,6 +49,8 @@
// grbMain // grbMain
// //
resources.ApplyResources(this.grbMain, "grbMain"); resources.ApplyResources(this.grbMain, "grbMain");
this.grbMain.Controls.Add(this.label4);
this.grbMain.Controls.Add(this.cmbGroup);
this.grbMain.Controls.Add(this.txtUserAgent); this.grbMain.Controls.Add(this.txtUserAgent);
this.grbMain.Controls.Add(this.label1); this.grbMain.Controls.Add(this.label1);
this.grbMain.Controls.Add(this.btnShare); this.grbMain.Controls.Add(this.btnShare);
@@ -59,6 +63,19 @@
this.grbMain.Name = "grbMain"; this.grbMain.Name = "grbMain";
this.grbMain.TabStop = false; this.grbMain.TabStop = false;
// //
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// cmbGroup
//
resources.ApplyResources(this.cmbGroup, "cmbGroup");
this.cmbGroup.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbGroup.FormattingEnabled = true;
this.cmbGroup.Name = "cmbGroup";
this.cmbGroup.Leave += new System.EventHandler(this.txtRemarks_Leave);
//
// txtUserAgent // txtUserAgent
// //
resources.ApplyResources(this.txtUserAgent, "txtUserAgent"); resources.ApplyResources(this.txtUserAgent, "txtUserAgent");
@@ -147,5 +164,7 @@
private System.Windows.Forms.PictureBox picQRCode; private System.Windows.Forms.PictureBox picQRCode;
private System.Windows.Forms.TextBox txtUserAgent; private System.Windows.Forms.TextBox txtUserAgent;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ComboBox cmbGroup;
} }
} }

View File

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

View File

@@ -131,17 +131,20 @@
<data name="picQRCode.Size" type="System.Drawing.Size, System.Drawing"> <data name="picQRCode.Size" type="System.Drawing.Size, System.Drawing">
<value>619, 162</value> <value>619, 162</value>
</data> </data>
<data name="&gt;&gt;txtUserAgent.ZOrder" xml:space="preserve"> <data name="cmbGroup.Location" type="System.Drawing.Point, System.Drawing">
<value>0</value> <value>127, 147</value>
</data> </data>
<data name="chkEnabled.Size" type="System.Drawing.Size, System.Drawing"> <data name="chkEnabled.Size" type="System.Drawing.Size, System.Drawing">
<value>60, 16</value> <value>60, 16</value>
</data> </data>
<data name="&gt;&gt;cmbGroup.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtUrl.Name" xml:space="preserve"> <data name="&gt;&gt;txtUrl.Name" xml:space="preserve">
<value>txtUrl</value> <value>txtUrl</value>
</data> </data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve"> <data name="&gt;&gt;cmbGroup.Parent" xml:space="preserve">
<value>8</value> <value>grbMain</value>
</data> </data>
<data name="&gt;&gt;picQRCode.Name" xml:space="preserve"> <data name="&gt;&gt;picQRCode.Name" xml:space="preserve">
<value>picQRCode</value> <value>picQRCode</value>
@@ -177,6 +180,9 @@
<data name="btnShare.TabIndex" type="System.Int32, mscorlib"> <data name="btnShare.TabIndex" type="System.Int32, mscorlib">
<value>26</value> <value>26</value>
</data> </data>
<data name="&gt;&gt;grbMain.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtRemarks.Type" xml:space="preserve"> <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> <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
@@ -186,12 +192,18 @@
<data name="&gt;&gt;txtRemarks.Parent" xml:space="preserve"> <data name="&gt;&gt;txtRemarks.Parent" xml:space="preserve">
<value>grbMain</value> <value>grbMain</value>
</data> </data>
<data name="label4.TabIndex" type="System.Int32, mscorlib">
<value>36</value>
</data>
<data name="btnShare.Location" type="System.Drawing.Point, System.Drawing"> <data name="btnShare.Location" type="System.Drawing.Point, System.Drawing">
<value>434, 21</value> <value>434, 21</value>
</data> </data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing"> <data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value> <value>83, 12</value>
</data> </data>
<data name="&gt;&gt;cmbGroup.Name" xml:space="preserve">
<value>cmbGroup</value>
</data>
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing"> <data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
<value>232, 21</value> <value>232, 21</value>
</data> </data>
@@ -213,17 +225,20 @@
<data name="btnShare.Text" xml:space="preserve"> <data name="btnShare.Text" xml:space="preserve">
<value>Share</value> <value>Share</value>
</data> </data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve"> <data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>grbMain</value> <value>grbMain</value>
</data> </data>
<data name="&gt;&gt;chkEnabled.ZOrder" xml:space="preserve"> <data name="&gt;&gt;chkEnabled.ZOrder" xml:space="preserve">
<value>3</value> <value>5</value>
</data> </data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing"> <data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 53</value> <value>12, 53</value>
</data> </data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve"> <data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>1</value> <value>3</value>
</data> </data>
<data name="picQRCode.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> <data name="picQRCode.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value> <value>Fill</value>
@@ -231,14 +246,17 @@
<data name="label1.TabIndex" type="System.Int32, mscorlib"> <data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>27</value> <value>27</value>
</data> </data>
<data name="label2.TabIndex" type="System.Int32, mscorlib"> <data name="&gt;&gt;label4.Type" xml:space="preserve">
<value>10</value> <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="txtUserAgent.Size" type="System.Drawing.Size, System.Drawing">
<value>473, 21</value>
</data> </data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing"> <data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>125, 12</value> <value>125, 12</value>
</data> </data>
<data name="picQRCode.TabIndex" type="System.Int32, mscorlib"> <data name="&gt;&gt;label4.Name" xml:space="preserve">
<value>25</value> <value>label4</value>
</data> </data>
<data name="txtUrl.Location" type="System.Drawing.Point, System.Drawing"> <data name="txtUrl.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 53</value> <value>127, 53</value>
@@ -250,14 +268,23 @@
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;txtUrl.ZOrder" xml:space="preserve"> <data name="&gt;&gt;txtUrl.ZOrder" xml:space="preserve">
<value>5</value> <value>7</value>
</data> </data>
<data name="picQRCode.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms"> <data name="&gt;&gt;chkEnabled.Parent" xml:space="preserve">
<value>Zoom</value> <value>grbMain</value>
</data>
<data name="cmbGroup.Size" type="System.Drawing.Size, System.Drawing">
<value>232, 20</value>
</data>
<data name="&gt;&gt;txtUserAgent.ZOrder" xml:space="preserve">
<value>2</value>
</data> </data>
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib"> <data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
<value>1</value> <value>1</value>
</data> </data>
<data name="label4.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing"> <data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>47, 12</value> <value>47, 12</value>
</data> </data>
@@ -276,11 +303,20 @@
<data name="&gt;&gt;chkEnabled.Name" xml:space="preserve"> <data name="&gt;&gt;chkEnabled.Name" xml:space="preserve">
<value>chkEnabled</value> <value>chkEnabled</value>
</data> </data>
<data name="&gt;&gt;txtRemarks.ZOrder" xml:space="preserve"> <data name="picQRCode.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>6</value> <value>Zoom</value>
</data> </data>
<data name="btnRemove.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> <data name="&gt;&gt;txtRemarks.ZOrder" xml:space="preserve">
<value>NoControl</value> <value>8</value>
</data>
<data name="picQRCode.TabIndex" type="System.Int32, mscorlib">
<value>25</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Belong to Group</value>
</data>
<data name="cmbGroup.TabIndex" type="System.Int32, mscorlib">
<value>35</value>
</data> </data>
<data name="&gt;&gt;txtRemarks.Name" xml:space="preserve"> <data name="&gt;&gt;txtRemarks.Name" xml:space="preserve">
<value>txtRemarks</value> <value>txtRemarks</value>
@@ -288,14 +324,11 @@
<data name="label1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> <data name="label1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="picQRCode.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 148</value>
</data>
<data name="btnShare.Size" type="System.Drawing.Size, System.Drawing"> <data name="btnShare.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value> <value>75, 23</value>
</data> </data>
<data name="&gt;&gt;btnRemove.ZOrder" xml:space="preserve"> <data name="&gt;&gt;btnRemove.ZOrder" xml:space="preserve">
<value>4</value> <value>6</value>
</data> </data>
<data name="&gt;&gt;btnShare.Parent" xml:space="preserve"> <data name="&gt;&gt;btnShare.Parent" xml:space="preserve">
<value>grbMain</value> <value>grbMain</value>
@@ -303,20 +336,26 @@
<data name="chkEnabled.TabIndex" type="System.Int32, mscorlib"> <data name="chkEnabled.TabIndex" type="System.Int32, mscorlib">
<value>25</value> <value>25</value>
</data> </data>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;txtUserAgent.Parent" xml:space="preserve"> <data name="&gt;&gt;txtUserAgent.Parent" xml:space="preserve">
<value>grbMain</value> <value>grbMain</value>
</data> </data>
<data name="grbMain.TabIndex" type="System.Int32, mscorlib"> <data name="&gt;&gt;cmbGroup.ZOrder" xml:space="preserve">
<value>10</value> <value>1</value>
</data> </data>
<data name="txtUrl.TabIndex" type="System.Int32, mscorlib"> <data name="txtUrl.TabIndex" type="System.Int32, mscorlib">
<value>2</value> <value>2</value>
</data> </data>
<data name="grbMain.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="&gt;&gt;label2.Parent" xml:space="preserve"> <data name="&gt;&gt;label2.Parent" xml:space="preserve">
<value>grbMain</value> <value>grbMain</value>
</data> </data>
<data name="txtUserAgent.Size" type="System.Drawing.Size, System.Drawing"> <data name="&gt;&gt;btnRemove.Parent" xml:space="preserve">
<value>473, 21</value> <value>grbMain</value>
</data> </data>
<data name="chkEnabled.Location" type="System.Drawing.Point, System.Drawing"> <data name="chkEnabled.Location" type="System.Drawing.Point, System.Drawing">
<value>368, 23</value> <value>368, 23</value>
@@ -333,9 +372,6 @@
<data name="label3.AutoSize" type="System.Boolean, mscorlib"> <data name="label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
</data> </data>
<data name="&gt;&gt;btnRemove.Parent" xml:space="preserve">
<value>grbMain</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib"> <data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
</data> </data>
@@ -351,20 +387,23 @@
<data name="&gt;&gt;grbMain.Parent" xml:space="preserve"> <data name="&gt;&gt;grbMain.Parent" xml:space="preserve">
<value>$this</value> <value>$this</value>
</data> </data>
<data name="&gt;&gt;label3.Parent" xml:space="preserve"> <data name="label4.AutoSize" type="System.Boolean, mscorlib">
<value>grbMain</value> <value>True</value>
</data> </data>
<data name="grbMain.Size" type="System.Drawing.Size, System.Drawing"> <data name="grbMain.Size" type="System.Drawing.Size, System.Drawing">
<value>619, 148</value> <value>619, 188</value>
</data> </data>
<data name="&gt;&gt;btnShare.Name" xml:space="preserve"> <data name="&gt;&gt;btnShare.Name" xml:space="preserve">
<value>btnShare</value> <value>btnShare</value>
</data> </data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>619, 350</value>
</data>
<data name="&gt;&gt;btnShare.ZOrder" xml:space="preserve"> <data name="&gt;&gt;btnShare.ZOrder" xml:space="preserve">
<value>2</value> <value>4</value>
</data> </data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve"> <data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>7</value> <value>9</value>
</data> </data>
<data name="chkEnabled.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> <data name="chkEnabled.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value> <value>NoControl</value>
@@ -372,8 +411,8 @@
<data name="label1.Location" type="System.Drawing.Point, System.Drawing"> <data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 115</value> <value>12, 115</value>
</data> </data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing"> <data name="picQRCode.Location" type="System.Drawing.Point, System.Drawing">
<value>619, 310</value> <value>0, 188</value>
</data> </data>
<data name="&gt;&gt;txtUserAgent.Name" xml:space="preserve"> <data name="&gt;&gt;txtUserAgent.Name" xml:space="preserve">
<value>txtUserAgent</value> <value>txtUserAgent</value>
@@ -381,8 +420,8 @@
<data name="label2.Text" xml:space="preserve"> <data name="label2.Text" xml:space="preserve">
<value>Remarks</value> <value>Remarks</value>
</data> </data>
<data name="label3.TabIndex" type="System.Int32, mscorlib"> <data name="&gt;&gt;label4.Parent" xml:space="preserve">
<value>0</value> <value>grbMain</value>
</data> </data>
<data name="picQRCode.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> <data name="picQRCode.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value> <value>NoControl</value>
@@ -396,7 +435,13 @@
<data name="btnRemove.Size" type="System.Drawing.Size, System.Drawing"> <data name="btnRemove.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value> <value>75, 23</value>
</data> </data>
<data name="&gt;&gt;chkEnabled.Parent" xml:space="preserve"> <data name="label4.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 151</value>
</data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value>
</data>
<data name="&gt;&gt;label3.Parent" xml:space="preserve">
<value>grbMain</value> <value>grbMain</value>
</data> </data>
<data name="&gt;&gt;grbMain.ZOrder" xml:space="preserve"> <data name="&gt;&gt;grbMain.ZOrder" xml:space="preserve">
@@ -411,6 +456,9 @@
<data name="&gt;&gt;btnRemove.Type" xml:space="preserve"> <data name="&gt;&gt;btnRemove.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="label3.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve"> <data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
@@ -420,8 +468,8 @@
<data name="&gt;&gt;grbMain.Name" xml:space="preserve"> <data name="&gt;&gt;grbMain.Name" xml:space="preserve">
<value>grbMain</value> <value>grbMain</value>
</data> </data>
<data name="&gt;&gt;grbMain.Type" xml:space="preserve"> <data name="btnRemove.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>NoControl</value>
</data> </data>
<data name="&gt;&gt;label1.Type" xml:space="preserve"> <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> <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
@@ -432,6 +480,9 @@
<data name="&gt;&gt;label3.Type" xml:space="preserve"> <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> <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>

View File

@@ -118,6 +118,12 @@
<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>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 12</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>所属分组</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing"> <data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>101, 12</value> <value>101, 12</value>
</data> </data>

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Windows.Forms; using System.Windows.Forms;
using v2rayN.Handler; using v2rayN.Handler;
using v2rayN.Mode; using v2rayN.Mode;
using v2rayN.Resx;
namespace v2rayN.Forms namespace v2rayN.Forms
{ {
@@ -68,18 +69,13 @@ namespace v2rayN.Forms
private void btnOK_Click(object sender, EventArgs e) private void btnOK_Click(object sender, EventArgs e)
{ {
if (config.subItem.Count <= 0)
{
AddSub();
}
if (ConfigHandler.SaveSubItem(ref config) == 0) if (ConfigHandler.SaveSubItem(ref config) == 0)
{ {
this.DialogResult = DialogResult.OK; this.DialogResult = DialogResult.OK;
} }
else else
{ {
UI.ShowWarning(UIRes.I18N("OperationFailed")); UI.ShowWarning(ResUI.OperationFailed);
} }
} }

View File

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

View File

@@ -14,6 +14,10 @@ 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";
public const string hysteriaCoreUrl = "https://github.com/HyNetwork/hysteria/releases";
/// <summary> /// <summary>
@@ -107,6 +111,7 @@ namespace v2rayN
public const string InboundSocks = "socks"; public const string InboundSocks = "socks";
public const string InboundHttp = "http"; public const string InboundHttp = "http";
public const string InboundHttp2 = "http2";
public const string Loopback = "127.0.0.1"; public const string Loopback = "127.0.0.1";
public const string InboundAPITagName = "api"; public const string InboundAPITagName = "api";
public const string InboundAPIProtocal = "dokodemo-door"; public const string InboundAPIProtocal = "dokodemo-door";
@@ -175,7 +180,7 @@ namespace v2rayN
/// Language /// Language
/// </summary> /// </summary>
public const string MyRegKeyLanguage = "CurrentLanguage"; public const string MyRegKeyLanguage = "CurrentLanguage";
/// <summary> /// <summary>
/// Icon /// Icon
/// </summary> /// </summary>
@@ -199,7 +204,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", "Xray" };
public const string GrpcgunMode = "gun"; public const string GrpcgunMode = "gun";
public const string GrpcmultiMode = "multi"; public const string GrpcmultiMode = "multi";
@@ -215,31 +220,6 @@ namespace v2rayN
get; set; get; set;
} }
/// <summary>
/// 是否开启全局代理(http)
/// </summary>
public static bool sysAgent
{
get; set;
}
/// <summary>
/// socks端口
/// </summary>
public static int socksPort
{
get; set;
}
/// <summary>
/// http端口
/// </summary>
public static int httpPort
{
get; set;
}
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,9 @@
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;
using v2rayN.Resx;
namespace v2rayN.Handler namespace v2rayN.Handler
{ {
@@ -38,7 +40,7 @@ namespace v2rayN.Handler
try try
{ {
Utils.SetSecurityProtocol(LazyConfig.Instance.GetConfig().enableSecurityProtocolTls13); Utils.SetSecurityProtocol(LazyConfig.Instance.GetConfig().enableSecurityProtocolTls13);
UpdateCompleted?.Invoke(this, new ResultEventArgs(false, UIRes.I18N("Downloading"))); UpdateCompleted?.Invoke(this, new ResultEventArgs(false, ResUI.Downloading));
progressPercentage = -1; progressPercentage = -1;
totalBytesToReceive = 0; totalBytesToReceive = 0;
@@ -139,6 +141,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;
@@ -150,8 +153,15 @@ namespace v2rayN.Handler
} }
ws.Headers.Add("user-agent", userAgent); ws.Headers.Add("user-agent", userAgent);
Uri uri = new Uri(url);
//Authorization Header
if (!Utils.IsNullOrEmpty(uri.UserInfo))
{
ws.Headers.Add(HttpRequestHeader.Authorization, "Basic " + Utils.Base64Encode(uri.UserInfo));
}
ws.DownloadStringCompleted += Ws_DownloadStringCompleted; ws.DownloadStringCompleted += Ws_DownloadStringCompleted;
ws.DownloadStringAsync(new Uri(url)); ws.DownloadStringAsync(uri);
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -190,7 +200,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)
@@ -206,7 +216,7 @@ namespace v2rayN.Handler
try try
{ {
Utils.SetSecurityProtocol(LazyConfig.Instance.GetConfig().enableSecurityProtocolTls13); Utils.SetSecurityProtocol(LazyConfig.Instance.GetConfig().enableSecurityProtocolTls13);
UpdateCompleted?.Invoke(this, new ResultEventArgs(false, UIRes.I18N("Downloading"))); UpdateCompleted?.Invoke(this, new ResultEventArgs(false, ResUI.Downloading));
progressPercentage = -1; progressPercentage = -1;
totalBytesToReceive = 0; totalBytesToReceive = 0;

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
{ {
@@ -7,6 +9,7 @@ namespace v2rayN.Handler
{ {
private static readonly Lazy<LazyConfig> _instance = new Lazy<LazyConfig>(() => new LazyConfig()); private static readonly Lazy<LazyConfig> _instance = new Lazy<LazyConfig>(() => new LazyConfig());
private Config _config; private Config _config;
private List<CoreInfo> coreInfos;
public static LazyConfig Instance public static LazyConfig Instance
{ {
@@ -20,5 +23,82 @@ 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;
}
public CoreInfo GetCoreInfo(ECoreType coreType)
{
if (coreInfos == null)
{
InitCoreInfo();
}
return coreInfos.Where(t => t.coreType == coreType).FirstOrDefault();
}
private void InitCoreInfo()
{
coreInfos = new List<CoreInfo>();
coreInfos.Add(new CoreInfo
{
coreType = ECoreType.v2fly,
coreExes = new List<string> { "wv2ray", "v2ray" },
arguments = "",
coreUrl = Global.v2flyCoreUrl
});
coreInfos.Add(new CoreInfo
{
coreType = ECoreType.Xray,
coreExes = new List<string> { "xray" },
arguments = "",
coreUrl = Global.xrayCoreUrl
});
coreInfos.Add(new CoreInfo
{
coreType = ECoreType.clash,
coreExes = new List<string> { "clash-windows-amd64", "clash-windows-386", "clash" },
arguments = "-f config.json",
coreUrl = Global.clashCoreUrl
});
coreInfos.Add(new CoreInfo
{
coreType = ECoreType.hysteria,
coreExes = new List<string> { "hysteria-tun-windows-6.0-amd64", "hysteria-tun-windows-6.0-386", "hysteria" },
arguments = "",
coreUrl = Global.hysteriaCoreUrl
});
}
} }
} }

View File

@@ -1,12 +1,15 @@
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;
using v2rayN.Resx;
namespace v2rayN.Handler namespace v2rayN.Handler
{ {
@@ -51,7 +54,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;
} }
} }
@@ -77,17 +80,16 @@ namespace v2rayN.Handler
} }
} }
public void Export2ClientConfig(int index, Config config) public void Export2ClientConfig(VmessItem item, Config config)
{ {
//int index = GetLvSelectedIndex(); if (item == null)
if (index < 0)
{ {
return; return;
} }
if (config.vmess[index].configType != (int)EConfigType.Vmess if (item.configType != EConfigType.Vmess
&& config.vmess[index].configType != (int)EConfigType.VLESS) && item.configType != EConfigType.VLESS)
{ {
UI.Show(UIRes.I18N("NonVmessService")); UI.Show(ResUI.NonVmessService);
return; return;
} }
@@ -106,29 +108,28 @@ namespace v2rayN.Handler
{ {
return; return;
} }
Config configCopy = Utils.DeepCopy(config); //Config configCopy = Utils.DeepCopy(config);
configCopy.index = index; //configCopy.index = index;
if (V2rayConfigHandler.Export2ClientConfig(configCopy, fileName, out string msg) != 0) if (V2rayConfigHandler.Export2ClientConfig(item, fileName, out string msg) != 0)
{ {
UI.Show(msg); UI.Show(msg);
} }
else else
{ {
UI.ShowWarning(string.Format(UIRes.I18N("SaveClientConfigurationIn"), fileName)); UI.ShowWarning(string.Format(ResUI.SaveClientConfigurationIn, fileName));
} }
} }
public void Export2ServerConfig(int index, Config config) public void Export2ServerConfig(VmessItem item, Config config)
{ {
//int index = GetLvSelectedIndex(); if (item == null)
if (index < 0)
{ {
return; return;
} }
if (config.vmess[index].configType != (int)EConfigType.Vmess if (item.configType != EConfigType.Vmess
&& config.vmess[index].configType != (int)EConfigType.VLESS) && item.configType != EConfigType.VLESS)
{ {
UI.Show(UIRes.I18N("NonVmessService")); UI.Show(ResUI.NonVmessService);
return; return;
} }
@@ -147,41 +148,24 @@ namespace v2rayN.Handler
{ {
return; return;
} }
Config configCopy = Utils.DeepCopy(config); //Config configCopy = Utils.DeepCopy(config);
configCopy.index = index; //configCopy.index = index;
if (V2rayConfigHandler.Export2ServerConfig(configCopy, fileName, out string msg) != 0) if (V2rayConfigHandler.Export2ServerConfig(item, fileName, out string msg) != 0)
{ {
UI.Show(msg); UI.Show(msg);
} }
else else
{ {
UI.ShowWarning(string.Format(UIRes.I18N("SaveServerConfigurationIn"), fileName)); UI.ShowWarning(string.Format(ResUI.SaveServerConfigurationIn, fileName));
} }
} }
public int AddBatchServers(Config config, string clipboardData, string subid = "")
{
int counter;
int _Add()
{
return ConfigHandler.AddBatchServers(ref config, clipboardData, subid);
}
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
{ {
@@ -208,11 +192,11 @@ namespace v2rayN.Handler
if (ret == 0) if (ret == 0)
{ {
UI.Show(UIRes.I18N("OperationSuccess")); UI.Show(ResUI.OperationSuccess);
} }
else else
{ {
UI.ShowWarning(UIRes.I18N("OperationFailed")); UI.ShowWarning(ResUI.OperationFailed);
} }
} }
} }
@@ -227,12 +211,12 @@ namespace v2rayN.Handler
var updateHandle = new UpdateHandle(); var updateHandle = new UpdateHandle();
while (true) while (true)
{ {
Utils.SaveLog("UpdateTaskRun");
Thread.Sleep(60000); Thread.Sleep(60000);
if (config.autoUpdateInterval <= 0) if (config.autoUpdateInterval <= 0)
{ {
continue; continue;
} }
Utils.SaveLog("UpdateTaskRun");
updateHandle.UpdateGeoFile("geosite", config, (bool success, string msg) => updateHandle.UpdateGeoFile("geosite", config, (bool success, string msg) =>
{ {
@@ -285,12 +269,12 @@ namespace v2rayN.Handler
try try
{ {
HotkeyManager.Current.AddOrReplace(((int)item.eGlobalHotkey).ToString(), keys, handler); HotkeyManager.Current.AddOrReplace(((int)item.eGlobalHotkey).ToString(), keys, handler);
var msg = string.Format(UIRes.I18N("RegisterGlobalHotkeySuccessfully"), $"{item.eGlobalHotkey.ToString()} = {keys}"); var msg = string.Format(ResUI.RegisterGlobalHotkeySuccessfully, $"{item.eGlobalHotkey.ToString()} = {keys}");
update(false, msg); update(false, msg);
} }
catch (Exception ex) catch (Exception ex)
{ {
var msg = string.Format(UIRes.I18N("RegisterGlobalHotkeyFailed"), $"{item.eGlobalHotkey.ToString()} = {keys}", ex.Message); var msg = string.Format(ResUI.RegisterGlobalHotkeyFailed, $"{item.eGlobalHotkey.ToString()} = {keys}", ex.Message);
update(false, msg); update(false, msg);
Utils.SaveLog(msg); Utils.SaveLog(msg);
} }

View File

@@ -9,6 +9,7 @@ using System.Threading.Tasks;
using System.Web; using System.Web;
using v2rayN.Base; using v2rayN.Base;
using v2rayN.Mode; using v2rayN.Mode;
using v2rayN.Resx;
namespace v2rayN.Handler namespace v2rayN.Handler
{ {
@@ -20,31 +21,29 @@ namespace v2rayN.Handler
/// <summary> /// <summary>
/// GetShareUrl /// GetShareUrl
/// </summary> /// </summary>
/// <param name="config"></param> /// <param name="item"></param>
/// <param name="index"></param>
/// <returns></returns> /// <returns></returns>
public static string GetShareUrl(Config config, int index) public static string GetShareUrl(VmessItem item)
{ {
try try
{ {
string url = string.Empty; string url = string.Empty;
VmessItem item = config.vmess[index];
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:
@@ -297,7 +296,7 @@ namespace v2rayN.Handler
} }
return 0; return 0;
} }
#endregion #endregion
#region ImportShareUrl #region ImportShareUrl
@@ -320,7 +319,7 @@ namespace v2rayN.Handler
string result = clipboardData.TrimEx();// Utils.GetClipboardData(); string result = clipboardData.TrimEx();// Utils.GetClipboardData();
if (Utils.IsNullOrEmpty(result)) if (Utils.IsNullOrEmpty(result))
{ {
msg = UIRes.I18N("FailedReadConfiguration"); msg = ResUI.FailedReadConfiguration;
return null; return null;
} }
@@ -340,7 +339,7 @@ namespace v2rayN.Handler
} }
else if (result.StartsWith(Global.ssProtocol)) else if (result.StartsWith(Global.ssProtocol))
{ {
msg = UIRes.I18N("ConfigurationFormatIncorrect"); msg = ResUI.ConfigurationFormatIncorrect;
vmessItem = ResolveSSLegacy(result); vmessItem = ResolveSSLegacy(result);
if (vmessItem == null) if (vmessItem == null)
@@ -356,11 +355,11 @@ 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))
{ {
msg = UIRes.I18N("ConfigurationFormatIncorrect"); msg = ResUI.ConfigurationFormatIncorrect;
vmessItem = ResolveSocksNew(result); vmessItem = ResolveSocksNew(result);
if (vmessItem == null) if (vmessItem == null)
@@ -376,11 +375,11 @@ 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))
{ {
msg = UIRes.I18N("ConfigurationFormatIncorrect"); msg = ResUI.ConfigurationFormatIncorrect;
vmessItem = ResolveTrojan(result); vmessItem = ResolveTrojan(result);
} }
@@ -392,13 +391,13 @@ namespace v2rayN.Handler
} }
else else
{ {
msg = UIRes.I18N("NonvmessOrssProtocol"); msg = ResUI.NonvmessOrssProtocol;
return null; return null;
} }
} }
catch catch
{ {
msg = UIRes.I18N("Incorrectconfiguration"); msg = ResUI.Incorrectconfiguration;
return null; return null;
} }
@@ -410,7 +409,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);
@@ -418,7 +417,7 @@ namespace v2rayN.Handler
VmessQRCode vmessQRCode = Utils.FromJson<VmessQRCode>(result); VmessQRCode vmessQRCode = Utils.FromJson<VmessQRCode>(result);
if (vmessQRCode == null) if (vmessQRCode == null)
{ {
msg = UIRes.I18N("FailedConversionConfiguration"); msg = ResUI.FailedConversionConfiguration;
return null; return null;
} }
@@ -463,7 +462,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("?");
@@ -501,7 +500,7 @@ namespace v2rayN.Handler
{ {
VmessItem i = new VmessItem VmessItem i = new VmessItem
{ {
configType = (int)EConfigType.Vmess, configType = EConfigType.Vmess,
security = "auto" security = "auto"
}; };
@@ -509,7 +508,7 @@ namespace v2rayN.Handler
i.address = u.IdnHost; i.address = u.IdnHost;
i.port = u.Port; i.port = u.Port;
i.remarks = Utils.UrlDecode(u.GetComponents(UriComponents.Fragment, UriFormat.Unescaped)); i.remarks = u.GetComponents(UriComponents.Fragment, UriFormat.Unescaped);
var q = HttpUtility.ParseQueryString(u.Query); var q = HttpUtility.ParseQueryString(u.Query);
var m = StdVmessUserInfo.Match(u.UserInfo); var m = StdVmessUserInfo.Match(u.UserInfo);
@@ -591,13 +590,13 @@ namespace v2rayN.Handler
} }
VmessItem server = new VmessItem VmessItem server = new VmessItem
{ {
remarks = Utils.UrlDecode(parsedUrl.GetComponents(UriComponents.Fragment, UriFormat.Unescaped)), remarks = parsedUrl.GetComponents(UriComponents.Fragment, UriFormat.Unescaped),
address = parsedUrl.IdnHost, address = parsedUrl.IdnHost,
port = parsedUrl.Port, port = parsedUrl.Port,
}; };
// parse base64 UserInfo // parse base64 UserInfo
string rawUserInfo = parsedUrl.GetComponents(UriComponents.UserInfo, UriFormat.Unescaped); string rawUserInfo = parsedUrl.GetComponents(UriComponents.UserInfo, UriFormat.UriEscaped);
string userInfo = Utils.Base64Decode(rawUserInfo); string userInfo = Utils.Base64Decode(rawUserInfo);
string[] userInfoParts = userInfo.Split(new char[] { ':' }, 2); string[] userInfoParts = userInfo.Split(new char[] { ':' }, 2);
if (userInfoParts.Length != 2) if (userInfoParts.Length != 2)
@@ -635,7 +634,7 @@ namespace v2rayN.Handler
Match details; Match details;
try try
{ {
details = DetailsParser.Match(Utils.Base64Decode(base64)); details = DetailsParser.Match(Utils.Base64Decode(base64));
} }
catch (FormatException) catch (FormatException)
{ {
@@ -657,7 +656,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("#");
@@ -713,7 +712,7 @@ namespace v2rayN.Handler
} }
VmessItem server = new VmessItem VmessItem server = new VmessItem
{ {
remarks = Utils.UrlDecode(parsedUrl.GetComponents(UriComponents.Fragment, UriFormat.Unescaped)), remarks = parsedUrl.GetComponents(UriComponents.Fragment, UriFormat.Unescaped),
address = parsedUrl.IdnHost, address = parsedUrl.IdnHost,
port = parsedUrl.Port, port = parsedUrl.Port,
}; };
@@ -726,7 +725,7 @@ namespace v2rayN.Handler
{ {
server.security = userInfoParts[0]; server.security = userInfoParts[0];
server.id = userInfoParts[1]; server.id = userInfoParts[1];
} }
return server; return server;
} }
@@ -735,14 +734,14 @@ 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);
item.address = url.IdnHost; item.address = url.IdnHost;
item.port = url.Port; item.port = url.Port;
item.remarks = Utils.UrlDecode(url.GetComponents(UriComponents.Fragment, UriFormat.Unescaped)); item.remarks = url.GetComponents(UriComponents.Fragment, UriFormat.Unescaped);
item.id = url.UserInfo; item.id = url.UserInfo;
var query = HttpUtility.ParseQueryString(url.Query); var query = HttpUtility.ParseQueryString(url.Query);
@@ -754,7 +753,7 @@ namespace v2rayN.Handler
{ {
VmessItem item = new VmessItem VmessItem item = new VmessItem
{ {
configType = (int)EConfigType.VLESS, configType = EConfigType.VLESS,
security = "none" security = "none"
}; };
@@ -762,7 +761,7 @@ namespace v2rayN.Handler
item.address = url.IdnHost; item.address = url.IdnHost;
item.port = url.Port; item.port = url.Port;
item.remarks = Utils.UrlDecode(url.GetComponents(UriComponents.Fragment, UriFormat.Unescaped)); item.remarks = url.GetComponents(UriComponents.Fragment, UriFormat.Unescaped);
item.id = url.UserInfo; item.id = url.UserInfo;
var query = HttpUtility.ParseQueryString(url.Query); var query = HttpUtility.ParseQueryString(url.Query);
@@ -775,7 +774,7 @@ namespace v2rayN.Handler
private static int ResolveStdTransport(NameValueCollection query, ref VmessItem item) private static int ResolveStdTransport(NameValueCollection query, ref VmessItem item)
{ {
item.flow = query["flow"] ?? ""; item.flow = query["flow"] ?? "";
item.streamSecurity = query["security"] ?? ""; item.streamSecurity = query["security"] ?? "";
item.sni = query["sni"] ?? ""; item.sni = query["sni"] ?? "";
item.alpn = Utils.String2List(Utils.UrlDecode(query["alpn"] ?? "")); item.alpn = Utils.String2List(Utils.UrlDecode(query["alpn"] ?? ""));

View File

@@ -6,6 +6,7 @@ using System.Net.Sockets;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using v2rayN.Mode; using v2rayN.Mode;
using v2rayN.Resx;
namespace v2rayN.Handler namespace v2rayN.Handler
{ {
@@ -14,14 +15,14 @@ namespace v2rayN.Handler
private Config _config; private Config _config;
private V2rayHandler _v2rayHandler; private V2rayHandler _v2rayHandler;
private List<ServerTestItem> _selecteds; private List<ServerTestItem> _selecteds;
Action<int, string> _updateFunc; Action<string, string> _updateFunc;
public SpeedtestHandler(ref Config config) public SpeedtestHandler(ref Config config)
{ {
_config = config; _config = config;
} }
public SpeedtestHandler(ref Config config, ref V2rayHandler v2rayHandler, List<int> selecteds, string actionType, Action<int, string> update) public SpeedtestHandler(ref Config config, V2rayHandler v2rayHandler, List<VmessItem> selecteds, ESpeedActionType actionType, Action<string, string> update)
{ {
_config = config; _config = config;
_v2rayHandler = v2rayHandler; _v2rayHandler = v2rayHandler;
@@ -33,27 +34,26 @@ namespace v2rayN.Handler
{ {
_selecteds.Add(new ServerTestItem() _selecteds.Add(new ServerTestItem()
{ {
selected = it, indexId = it.indexId,
indexId = config.vmess[it].indexId, address = it.address,
address = config.vmess[it].address, port = it.port,
port = config.vmess[it].port, configType = it.configType
configType = config.vmess[it].configType
}); });
} }
if (actionType == "ping") if (actionType == ESpeedActionType.Ping)
{ {
Task.Run(() => RunPing()); Task.Run(() => RunPing());
} }
if (actionType == "tcping") else if (actionType == ESpeedActionType.Tcping)
{ {
Task.Run(() => RunTcping()); Task.Run(() => RunTcping());
} }
else if (actionType == "realping") else if (actionType == ESpeedActionType.Realping)
{ {
Task.Run(() => RunRealPing()); Task.Run(() => RunRealPing());
} }
else if (actionType == "speedtest") else if (actionType == ESpeedActionType.Speedtest)
{ {
Task.Run(() => RunSpeedTest()); Task.Run(() => RunSpeedTest());
} }
@@ -65,7 +65,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;
} }
@@ -93,9 +93,8 @@ namespace v2rayN.Handler
RunPingSub((ServerTestItem it) => RunPingSub((ServerTestItem it) =>
{ {
long time = Utils.Ping(it.address); long time = Utils.Ping(it.address);
var index = _config.FindIndexId(it.indexId);
if (index < 0) return; _updateFunc(it.indexId, FormatOut(time, "ms"));
_updateFunc(index, FormatOut(time, "ms"));
}); });
} }
@@ -104,9 +103,8 @@ namespace v2rayN.Handler
RunPingSub((ServerTestItem it) => RunPingSub((ServerTestItem it) =>
{ {
int time = GetTcpingTime(it.address, it.port); int time = GetTcpingTime(it.address, it.port);
var index = _config.FindIndexId(it.indexId);
if (index < 0) return; _updateFunc(it.indexId, FormatOut(time, "ms"));
_updateFunc(index, FormatOut(time, "ms"));
}); });
} }
@@ -120,7 +118,7 @@ namespace v2rayN.Handler
pid = _v2rayHandler.LoadV2rayConfigString(_config, _selecteds); pid = _v2rayHandler.LoadV2rayConfigString(_config, _selecteds);
if (pid < 0) if (pid < 0)
{ {
_updateFunc(_selecteds[0].selected, UIRes.I18N("OperationFailed")); _updateFunc(_selecteds[0].indexId, ResUI.OperationFailed);
return; return;
} }
@@ -128,11 +126,11 @@ namespace v2rayN.Handler
List<Task> tasks = new List<Task>(); List<Task> tasks = new List<Task>();
foreach (var it in _selecteds) foreach (var it in _selecteds)
{ {
if (it.configType == (int)EConfigType.Custom) if (!it.allowTest)
{ {
continue; continue;
} }
if (it.port <= 0) if (it.configType == EConfigType.Custom)
{ {
continue; continue;
} }
@@ -144,9 +142,9 @@ namespace v2rayN.Handler
int responseTime = -1; int responseTime = -1;
string status = GetRealPingTime(_config.constItem.speedPingTestUrl, webProxy, out responseTime); string status = GetRealPingTime(_config.constItem.speedPingTestUrl, webProxy, out responseTime);
string output = Utils.IsNullOrEmpty(status) ? FormatOut(responseTime, "ms") : status; string output = Utils.IsNullOrEmpty(status) ? FormatOut(responseTime, "ms") : status;
var index = _config.FindIndexId(it.indexId);
if (index < 0) return; _config.GetVmessItem(it.indexId)?.SetTestResult(output);
_updateFunc(index, output); _updateFunc(it.indexId, output);
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -171,7 +169,7 @@ namespace v2rayN.Handler
{ {
try try
{ {
int httpPort = _config.GetLocalPort(Global.InboundHttp); int httpPort = _config.GetLocalPort(Global.InboundHttp2);
Task<int> t = Task.Run(() => Task<int> t = Task.Run(() =>
{ {
@@ -203,15 +201,10 @@ namespace v2rayN.Handler
string testIndexId = string.Empty; string testIndexId = string.Empty;
int pid = -1; int pid = -1;
if (_config.vmess.Count <= 0)
{
return;
}
pid = _v2rayHandler.LoadV2rayConfigString(_config, _selecteds); pid = _v2rayHandler.LoadV2rayConfigString(_config, _selecteds);
if (pid < 0) if (pid < 0)
{ {
_updateFunc(_selecteds[0].selected, UIRes.I18N("OperationFailed")); _updateFunc(_selecteds[0].indexId, ResUI.OperationFailed);
return; return;
} }
@@ -219,31 +212,28 @@ namespace v2rayN.Handler
DownloadHandle downloadHandle2 = new DownloadHandle(); DownloadHandle downloadHandle2 = new DownloadHandle();
downloadHandle2.UpdateCompleted += (sender2, args) => downloadHandle2.UpdateCompleted += (sender2, args) =>
{ {
var index = _config.FindIndexId(testIndexId); _config.GetVmessItem(testIndexId)?.SetTestResult(args.Msg);
if (index < 0) return; _updateFunc(testIndexId, args.Msg);
_updateFunc(index, args.Msg);
}; };
downloadHandle2.Error += (sender2, args) => downloadHandle2.Error += (sender2, args) =>
{ {
var index = _config.FindIndexId(testIndexId); _updateFunc(testIndexId, args.GetException().Message);
if (index < 0) return;
_updateFunc(index, args.GetException().Message);
}; };
var timeout = 10; var timeout = 10;
foreach (var it in _selecteds) foreach (var it in _selecteds)
{ {
if (it.configType == (int)EConfigType.Custom) if (!it.allowTest)
{ {
continue; continue;
} }
if (it.port <= 0) if (it.configType == EConfigType.Custom)
{ {
continue; continue;
} }
testIndexId = it.indexId; testIndexId = it.indexId;
if (_config.FindIndexId(it.indexId) < 0) continue; if (_config.FindIndexId(it.indexId) < 0) continue;
WebProxy webProxy = new WebProxy(Global.Loopback, it.port); WebProxy webProxy = new WebProxy(Global.Loopback, it.port);
var ws = downloadHandle2.DownloadDataAsync(url, webProxy, timeout - 2); var ws = downloadHandle2.DownloadDataAsync(url, webProxy, timeout - 2);

View File

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

View File

@@ -59,8 +59,7 @@ namespace v2rayN.Handler
try try
{ {
Global.httpPort = config.GetLocalPort(Global.InboundHttp); int port = config.GetLocalPort(Global.InboundHttp2);
int port = Global.httpPort;
if (port <= 0) if (port <= 0)
{ {
return false; return false;

View File

@@ -6,7 +6,9 @@ using System.Net.Http;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Windows.Forms; using System.Windows.Forms;
using v2rayN.Base;
using v2rayN.Mode; using v2rayN.Mode;
using v2rayN.Resx;
namespace v2rayN.Handler namespace v2rayN.Handler
{ {
@@ -52,7 +54,7 @@ namespace v2rayN.Handler
{ {
if (args.Success) if (args.Success)
{ {
_updateFunc(false, UIRes.I18N("MsgDownloadV2rayCoreSuccessfully")); _updateFunc(false, ResUI.MsgDownloadV2rayCoreSuccessfully);
try try
{ {
@@ -92,7 +94,7 @@ namespace v2rayN.Handler
{ {
if (args.Success) if (args.Success)
{ {
_updateFunc(false, string.Format(UIRes.I18N("MsgParsingSuccessfully"), "v2rayN")); _updateFunc(false, string.Format(ResUI.MsgParsingSuccessfully, "v2rayN"));
url = args.Msg; url = args.Msg;
askToDownload(downloadHandle, url, true); askToDownload(downloadHandle, url, true);
@@ -102,12 +104,12 @@ namespace v2rayN.Handler
_updateFunc(false, args.Msg); _updateFunc(false, args.Msg);
} }
}; };
_updateFunc(false, string.Format(UIRes.I18N("MsgStartUpdating"), "v2rayN")); _updateFunc(false, string.Format(ResUI.MsgStartUpdating, "v2rayN"));
CheckUpdateAsync("v2rayN"); CheckUpdateAsync(ECoreType.v2rayN);
} }
public void CheckUpdateCore(string type, Config config, Action<bool, string> update) public void CheckUpdateCore(ECoreType type, Config config, Action<bool, string> update)
{ {
_config = config; _config = config;
_updateFunc = update; _updateFunc = update;
@@ -121,8 +123,8 @@ namespace v2rayN.Handler
{ {
if (args.Success) if (args.Success)
{ {
_updateFunc(false, UIRes.I18N("MsgDownloadV2rayCoreSuccessfully")); _updateFunc(false, ResUI.MsgDownloadV2rayCoreSuccessfully);
_updateFunc(false, UIRes.I18N("MsgUnpacking")); _updateFunc(false, ResUI.MsgUnpacking);
try try
{ {
@@ -148,7 +150,7 @@ namespace v2rayN.Handler
{ {
if (args.Success) if (args.Success)
{ {
_updateFunc(false, string.Format(UIRes.I18N("MsgParsingSuccessfully"), "Core")); _updateFunc(false, string.Format(ResUI.MsgParsingSuccessfully, "Core"));
url = args.Msg; url = args.Msg;
askToDownload(downloadHandle, url, true); askToDownload(downloadHandle, url, true);
} }
@@ -157,7 +159,7 @@ namespace v2rayN.Handler
_updateFunc(false, args.Msg); _updateFunc(false, args.Msg);
} }
}; };
_updateFunc(false, string.Format(UIRes.I18N("MsgStartUpdating"), "Core")); _updateFunc(false, string.Format(ResUI.MsgStartUpdating, "Core"));
CheckUpdateAsync(type); CheckUpdateAsync(type);
} }
@@ -167,27 +169,28 @@ namespace v2rayN.Handler
_config = config; _config = config;
_updateFunc = update; _updateFunc = update;
_updateFunc(false, UIRes.I18N("MsgUpdateSubscriptionStart")); _updateFunc(false, ResUI.MsgUpdateSubscriptionStart);
if (config.subItem == null || config.subItem.Count <= 0) if (config.subItem == null || config.subItem.Count <= 0)
{ {
_updateFunc(false, UIRes.I18N("MsgNoValidSubscription")); _updateFunc(false, ResUI.MsgNoValidSubscription);
return; return;
} }
for (int k = 1; k <= config.subItem.Count; k++) for (int k = 1; k <= config.subItem.Count; k++)
{ {
string id = config.subItem[k - 1].id.Trim(); string id = config.subItem[k - 1].id.TrimEx();
string url = config.subItem[k - 1].url.Trim(); string url = config.subItem[k - 1].url.TrimEx();
string userAgent = config.subItem[k - 1].userAgent.Trim(); string userAgent = config.subItem[k - 1].userAgent.TrimEx();
string hashCode = $"{k}->"; string groupId = config.subItem[k - 1].groupId.TrimEx();
string hashCode = $"{k}){config.subItem[k - 1].remarks}->";
if (config.subItem[k - 1].enabled == false) if (config.subItem[k - 1].enabled == false)
{ {
continue; continue;
} }
if (Utils.IsNullOrEmpty(id) || Utils.IsNullOrEmpty(url)) if (Utils.IsNullOrEmpty(id) || Utils.IsNullOrEmpty(url))
{ {
_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgNoValidSubscription")}"); _updateFunc(false, $"{hashCode}{ResUI.MsgNoValidSubscription}");
continue; continue;
} }
@@ -196,27 +199,28 @@ namespace v2rayN.Handler
{ {
if (args.Success) if (args.Success)
{ {
_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgGetSubscriptionSuccessfully")}"); _updateFunc(false, $"{hashCode}{ResUI.MsgGetSubscriptionSuccessfully}");
string result = Utils.Base64Decode(args.Msg); //string result = Utils.Base64Decode(args.Msg);
string result = args.Msg;
if (Utils.IsNullOrEmpty(result)) if (Utils.IsNullOrEmpty(result))
{ {
_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgSubscriptionDecodingFailed")}"); _updateFunc(false, $"{hashCode}{ResUI.MsgSubscriptionDecodingFailed}");
return; return;
} }
//ConfigHandler.RemoveServerViaSubid(ref config, id); //ConfigHandler.RemoveServerViaSubid(ref config, id);
//_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgClearSubscription")}"); //_updateFunc(false, $"{hashCode}{ResUI.MsgClearSubscription")}");
// RefreshServers(); // RefreshServers();
int ret = MainFormHandler.Instance.AddBatchServers(config, result, id); int ret = ConfigHandler.AddBatchServers(ref config, result, id, groupId);
if (ret > 0) if (ret > 0)
{ {
// RefreshServers(); // RefreshServers();
} }
else else
{ {
_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgFailedImportSubscription")}"); _updateFunc(false, $"{hashCode}{ResUI.MsgFailedImportSubscription}");
} }
_updateFunc(true, $"{hashCode}{UIRes.I18N("MsgUpdateSubscriptionEnd")}"); _updateFunc(true, $"{hashCode}{ResUI.MsgUpdateSubscriptionEnd}");
} }
else else
{ {
@@ -228,10 +232,10 @@ namespace v2rayN.Handler
_updateFunc(false, args.GetException().Message); _updateFunc(false, args.GetException().Message);
}; };
WebProxy webProxy = blProxy ? new WebProxy(Global.Loopback, _config.GetLocalPort(Global.InboundHttp)) : null; WebProxy webProxy = blProxy ? new WebProxy(Global.Loopback, _config.GetLocalPort(Global.InboundHttp2)) : null;
downloadHandle3.WebDownloadString(url, webProxy, userAgent); downloadHandle3.WebDownloadString(url, webProxy, userAgent);
_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgStartGettingSubscriptions")}"); _updateFunc(false, $"{hashCode}{ResUI.MsgStartGettingSubscriptions}");
} }
} }
@@ -252,7 +256,7 @@ namespace v2rayN.Handler
{ {
if (args.Success) if (args.Success)
{ {
_updateFunc(false, string.Format(UIRes.I18N("MsgDownloadGeoFileSuccessfully"), geoName)); _updateFunc(false, string.Format(ResUI.MsgDownloadGeoFileSuccessfully, geoName));
try try
{ {
@@ -289,7 +293,7 @@ namespace v2rayN.Handler
#region private #region private
private async void CheckUpdateAsync(string type) private async void CheckUpdateAsync(ECoreType type)
{ {
try try
{ {
@@ -300,22 +304,22 @@ namespace v2rayN.Handler
}; };
if (httpProxyTest() > 0) if (httpProxyTest() > 0)
{ {
int httpPort = _config.GetLocalPort(Global.InboundHttp); int httpPort = _config.GetLocalPort(Global.InboundHttp2);
WebProxy webProxy = new WebProxy(Global.Loopback, httpPort); WebProxy webProxy = new WebProxy(Global.Loopback, httpPort);
webRequestHandler.Proxy = webProxy; webRequestHandler.Proxy = webProxy;
} }
HttpClient httpClient = new HttpClient(webRequestHandler); HttpClient httpClient = new HttpClient(webRequestHandler);
string url; string url;
if (type == "v2fly") if (type == ECoreType.v2fly)
{ {
url = v2flyCoreLatestUrl; url = v2flyCoreLatestUrl;
} }
else if (type == "xray") else if (type == ECoreType.Xray)
{ {
url = xrayCoreLatestUrl; url = xrayCoreLatestUrl;
} }
else if (type == "v2rayN") else if (type == ECoreType.v2rayN)
{ {
url = nLatestUrl; url = nLatestUrl;
} }
@@ -344,18 +348,18 @@ namespace v2rayN.Handler
/// <summary> /// <summary>
/// 获取V2RayCore版本 /// 获取V2RayCore版本
/// </summary> /// </summary>
private string getCoreVersion(string type) private string getCoreVersion(ECoreType type)
{ {
try try
{ {
var core = string.Empty; var core = string.Empty;
var match = string.Empty; var match = string.Empty;
if (type == "v2fly") if (type == ECoreType.v2fly)
{ {
core = "v2ray.exe"; core = "v2ray.exe";
match = "V2Ray"; match = "V2Ray";
} }
else if (type == "xray") else if (type == ECoreType.Xray)
{ {
core = "xray.exe"; core = "xray.exe";
match = "Xray"; match = "Xray";
@@ -363,7 +367,7 @@ namespace v2rayN.Handler
string filePath = Utils.GetPath(core); string filePath = Utils.GetPath(core);
if (!File.Exists(filePath)) if (!File.Exists(filePath))
{ {
string msg = string.Format(UIRes.I18N("NotFoundCore"), @""); string msg = string.Format(ResUI.NotFoundCore, @"");
//ShowMsg(true, msg); //ShowMsg(true, msg);
return ""; return "";
} }
@@ -389,7 +393,7 @@ namespace v2rayN.Handler
return ""; return "";
} }
} }
private void responseHandler(string type, string redirectUrl) private void responseHandler(ECoreType type, string redirectUrl)
{ {
try try
{ {
@@ -398,24 +402,24 @@ namespace v2rayN.Handler
string curVersion; string curVersion;
string message; string message;
string url; string url;
if (type == "v2fly") if (type == ECoreType.v2fly)
{ {
curVersion = "v" + getCoreVersion(type); curVersion = "v" + getCoreVersion(type);
message = string.Format(UIRes.I18N("IsLatestCore"), curVersion); message = string.Format(ResUI.IsLatestCore, curVersion);
string osBit = Environment.Is64BitProcess ? "64" : "32"; string osBit = Environment.Is64BitProcess ? "64" : "32";
url = string.Format(v2flyCoreUrl, version, osBit); url = string.Format(v2flyCoreUrl, version, osBit);
} }
else if (type == "xray") else if (type == ECoreType.Xray)
{ {
curVersion = "v" + getCoreVersion(type); curVersion = "v" + getCoreVersion(type);
message = string.Format(UIRes.I18N("IsLatestCore"), curVersion); message = string.Format(ResUI.IsLatestCore, curVersion);
string osBit = Environment.Is64BitProcess ? "64" : "32"; string osBit = Environment.Is64BitProcess ? "64" : "32";
url = string.Format(xrayCoreUrl, version, osBit); url = string.Format(xrayCoreUrl, version, osBit);
} }
else if (type == "v2rayN") else if (type == ECoreType.v2rayN)
{ {
curVersion = FileVersionInfo.GetVersionInfo(Utils.GetExePath()).FileVersion.ToString(); curVersion = FileVersionInfo.GetVersionInfo(Utils.GetExePath()).FileVersion.ToString();
message = string.Format(UIRes.I18N("IsLatestN"), curVersion); message = string.Format(ResUI.IsLatestN, curVersion);
url = string.Format(nUrl, version); url = string.Format(nUrl, version);
} }
else else
@@ -443,7 +447,7 @@ namespace v2rayN.Handler
bool blDownload = false; bool blDownload = false;
if (blAsk) if (blAsk)
{ {
if (UI.ShowYesNo(string.Format(UIRes.I18N("DownloadYesNo"), url)) == DialogResult.Yes) if (UI.ShowYesNo(string.Format(ResUI.DownloadYesNo, url)) == DialogResult.Yes)
{ {
blDownload = true; blDownload = true;
} }
@@ -456,7 +460,7 @@ namespace v2rayN.Handler
{ {
if (httpProxyTest() > 0) if (httpProxyTest() > 0)
{ {
int httpPort = _config.GetLocalPort(Global.InboundHttp); int httpPort = _config.GetLocalPort(Global.InboundHttp2);
WebProxy webProxy = new WebProxy(Global.Loopback, httpPort); WebProxy webProxy = new WebProxy(Global.Loopback, httpPort);
downloadHandle.DownloadFileAsync(url, webProxy, 600); downloadHandle.DownloadFileAsync(url, webProxy, 600);
} }

View File

@@ -4,7 +4,9 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Net.NetworkInformation; using System.Net.NetworkInformation;
using v2rayN.Base;
using v2rayN.Mode; using v2rayN.Mode;
using v2rayN.Resx;
namespace v2rayN.Handler namespace v2rayN.Handler
{ {
@@ -21,36 +23,31 @@ namespace v2rayN.Handler
/// <summary> /// <summary>
/// 生成v2ray的客户端配置文件 /// 生成v2ray的客户端配置文件
/// </summary> /// </summary>
/// <param name="config"></param> /// <param name="node"></param>
/// <param name="fileName"></param> /// <param name="fileName"></param>
/// <param name="msg"></param> /// <param name="msg"></param>
/// <returns></returns> /// <returns></returns>
public static int GenerateClientConfig(Config config, string fileName, bool blExport, out string msg) public static int GenerateClientConfig(VmessItem node, string fileName, bool blExport, out string msg)
{ {
try try
{ {
//检查GUI设置 if (node == null)
if (config == null
|| config.index < 0
|| config.vmess.Count <= 0
|| config.index > config.vmess.Count - 1
)
{ {
msg = UIRes.I18N("CheckServerSettings"); msg = ResUI.CheckServerSettings;
return -1; return -1;
} }
msg = UIRes.I18N("InitialConfiguration"); msg = ResUI.InitialConfiguration;
if (config.configType() == (int)EConfigType.Custom) if (node.configType == EConfigType.Custom)
{ {
return GenerateClientCustomConfig(config, fileName, out msg); return GenerateClientCustomConfig(node, fileName, out msg);
} }
//取得默认配置 //取得默认配置
string result = Utils.GetEmbedText(SampleClient); string result = Utils.GetEmbedText(SampleClient);
if (Utils.IsNullOrEmpty(result)) if (Utils.IsNullOrEmpty(result))
{ {
msg = UIRes.I18N("FailedGetDefaultConfiguration"); msg = ResUI.FailedGetDefaultConfiguration;
return -1; return -1;
} }
@@ -58,10 +55,12 @@ namespace v2rayN.Handler
V2rayConfig v2rayConfig = Utils.FromJson<V2rayConfig>(result); V2rayConfig v2rayConfig = Utils.FromJson<V2rayConfig>(result);
if (v2rayConfig == null) if (v2rayConfig == null)
{ {
msg = UIRes.I18N("FailedGenDefaultConfiguration"); msg = ResUI.FailedGenDefaultConfiguration;
return -1; return -1;
} }
var config = LazyConfig.Instance.GetConfig();
//开始修改配置 //开始修改配置
log(config, ref v2rayConfig, blExport); log(config, ref v2rayConfig, blExport);
@@ -72,7 +71,7 @@ namespace v2rayN.Handler
routing(config, ref v2rayConfig); routing(config, ref v2rayConfig);
//outbound //outbound
outbound(config, ref v2rayConfig); outbound(node, ref v2rayConfig);
//dns //dns
dns(config, ref v2rayConfig); dns(config, ref v2rayConfig);
@@ -82,11 +81,11 @@ namespace v2rayN.Handler
Utils.ToJsonFile(v2rayConfig, fileName, false); Utils.ToJsonFile(v2rayConfig, fileName, false);
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), config.getSummary()); msg = string.Format(ResUI.SuccessfulConfiguration, $"[{config.GetGroupRemarks(node.groupId)}] {node.GetSummary()}");
} }
catch catch
{ {
msg = UIRes.I18N("FailedGenDefaultConfiguration"); msg = ResUI.FailedGenDefaultConfiguration;
return -1; return -1;
} }
return 0; return 0;
@@ -151,7 +150,7 @@ namespace v2rayN.Handler
inbound.tag = Global.InboundSocks; inbound.tag = Global.InboundSocks;
inbound.port = config.inbound[0].localPort; inbound.port = config.inbound[0].localPort;
inbound.protocol = config.inbound[0].protocol; inbound.protocol = config.inbound[0].protocol;
if (config.allowLANConn) if (config.inbound[0].allowLANConn)
{ {
inbound.listen = "0.0.0.0"; inbound.listen = "0.0.0.0";
} }
@@ -170,6 +169,25 @@ namespace v2rayN.Handler
inbound2.protocol = Global.InboundHttp; inbound2.protocol = Global.InboundHttp;
inbound2.listen = inbound.listen; inbound2.listen = inbound.listen;
inbound2.settings.allowTransparent = false; inbound2.settings.allowTransparent = false;
inbound2.sniffing.enabled = inbound.sniffing.enabled;
//auth
if (!Utils.IsNullOrEmpty(config.inbound[0].user) && !Utils.IsNullOrEmpty(config.inbound[0].pass))
{
inbound.settings.auth = "password";
inbound.settings.accounts = new List<AccountsItem> { new AccountsItem() { user = config.inbound[0].user, pass = config.inbound[0].pass } };
inbound2.settings.auth = "password";
inbound2.settings.accounts = new List<AccountsItem> { new AccountsItem() { user = config.inbound[0].user, pass = config.inbound[0].pass } };
}
//http Loopback
Inbounds inbound3 = v2rayConfig.inbounds[2];
inbound3.tag = Global.InboundHttp2;
inbound3.port = config.GetLocalPort(Global.InboundHttp2);
inbound3.protocol = Global.InboundHttp;
inbound3.listen = Global.Loopback;
inbound3.settings.allowTransparent = false;
inbound3.sniffing.enabled = inbound.sniffing.enabled;
} }
catch catch
{ {
@@ -327,15 +345,16 @@ namespace v2rayN.Handler
/// <summary> /// <summary>
/// vmess协议服务器配置 /// vmess协议服务器配置
/// </summary> /// </summary>
/// <param name="config"></param> /// <param name="node"></param>
/// <param name="v2rayConfig"></param> /// <param name="v2rayConfig"></param>
/// <returns></returns> /// <returns></returns>
private static int outbound(Config config, ref V2rayConfig v2rayConfig) private static int outbound(VmessItem node, ref V2rayConfig v2rayConfig)
{ {
try try
{ {
var config = LazyConfig.Instance.GetConfig();
Outbounds outbound = v2rayConfig.outbounds[0]; Outbounds outbound = v2rayConfig.outbounds[0];
if (config.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)
@@ -348,8 +367,8 @@ namespace v2rayN.Handler
vnextItem = outbound.settings.vnext[0]; vnextItem = outbound.settings.vnext[0];
} }
//远程服务器地址和端口 //远程服务器地址和端口
vnextItem.address = config.address(); vnextItem.address = node.address;
vnextItem.port = config.port(); vnextItem.port = node.port;
UsersItem usersItem; UsersItem usersItem;
if (vnextItem.users.Count <= 0) if (vnextItem.users.Count <= 0)
@@ -362,12 +381,12 @@ namespace v2rayN.Handler
usersItem = vnextItem.users[0]; usersItem = vnextItem.users[0];
} }
//远程服务器用户ID //远程服务器用户ID
usersItem.id = config.id(); usersItem.id = node.id;
usersItem.alterId = config.alterId(); usersItem.alterId = node.alterId;
usersItem.email = Global.userEMail; usersItem.email = Global.userEMail;
if (Global.vmessSecuritys.Contains(config.security())) if (Global.vmessSecuritys.Contains(node.security))
{ {
usersItem.security = config.security(); usersItem.security = node.security;
} }
else else
{ {
@@ -380,12 +399,12 @@ namespace v2rayN.Handler
//远程服务器底层传输配置 //远程服务器底层传输配置
StreamSettings streamSettings = outbound.streamSettings; StreamSettings streamSettings = outbound.streamSettings;
boundStreamSettings(config, "out", ref streamSettings); boundStreamSettings(node, "out", ref streamSettings);
outbound.protocol = Global.vmessProtocolLite; outbound.protocol = Global.vmessProtocolLite;
outbound.settings.servers = null; outbound.settings.servers = null;
} }
else if (config.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)
@@ -398,12 +417,12 @@ namespace v2rayN.Handler
serversItem = outbound.settings.servers[0]; serversItem = outbound.settings.servers[0];
} }
//远程服务器地址和端口 //远程服务器地址和端口
serversItem.address = config.address(); serversItem.address = node.address;
serversItem.port = config.port(); serversItem.port = node.port;
serversItem.password = config.id(); serversItem.password = node.id;
if (config.GetShadowsocksSecuritys().Contains(config.security())) if (LazyConfig.Instance.GetShadowsocksSecuritys().Contains(node.security))
{ {
serversItem.method = config.security(); serversItem.method = node.security;
} }
else else
{ {
@@ -421,7 +440,7 @@ namespace v2rayN.Handler
outbound.protocol = Global.ssProtocolLite; outbound.protocol = Global.ssProtocolLite;
outbound.settings.vnext = null; outbound.settings.vnext = null;
} }
else if (config.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)
@@ -434,18 +453,18 @@ namespace v2rayN.Handler
serversItem = outbound.settings.servers[0]; serversItem = outbound.settings.servers[0];
} }
//远程服务器地址和端口 //远程服务器地址和端口
serversItem.address = config.address(); serversItem.address = node.address;
serversItem.port = config.port(); serversItem.port = node.port;
serversItem.method = null; serversItem.method = null;
serversItem.password = null; serversItem.password = null;
if (!Utils.IsNullOrEmpty(config.security()) if (!Utils.IsNullOrEmpty(node.security)
&& !Utils.IsNullOrEmpty(config.id())) && !Utils.IsNullOrEmpty(node.id))
{ {
SocksUsersItem socksUsersItem = new SocksUsersItem SocksUsersItem socksUsersItem = new SocksUsersItem
{ {
user = config.security(), user = node.security,
pass = config.id(), pass = node.id,
level = 1 level = 1
}; };
@@ -458,7 +477,7 @@ namespace v2rayN.Handler
outbound.protocol = Global.socksProtocolLite; outbound.protocol = Global.socksProtocolLite;
outbound.settings.vnext = null; outbound.settings.vnext = null;
} }
else if (config.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)
@@ -471,8 +490,8 @@ namespace v2rayN.Handler
vnextItem = outbound.settings.vnext[0]; vnextItem = outbound.settings.vnext[0];
} }
//远程服务器地址和端口 //远程服务器地址和端口
vnextItem.address = config.address(); vnextItem.address = node.address;
vnextItem.port = config.port(); vnextItem.port = node.port;
UsersItem usersItem; UsersItem usersItem;
if (vnextItem.users.Count <= 0) if (vnextItem.users.Count <= 0)
@@ -485,10 +504,10 @@ namespace v2rayN.Handler
usersItem = vnextItem.users[0]; usersItem = vnextItem.users[0];
} }
//远程服务器用户ID //远程服务器用户ID
usersItem.id = config.id(); usersItem.id = node.id;
usersItem.flow = string.Empty; usersItem.flow = string.Empty;
usersItem.email = Global.userEMail; usersItem.email = Global.userEMail;
usersItem.encryption = config.security(); usersItem.encryption = node.security;
//Mux //Mux
outbound.mux.enabled = config.muxEnabled; outbound.mux.enabled = config.muxEnabled;
@@ -496,18 +515,18 @@ namespace v2rayN.Handler
//远程服务器底层传输配置 //远程服务器底层传输配置
StreamSettings streamSettings = outbound.streamSettings; StreamSettings streamSettings = outbound.streamSettings;
boundStreamSettings(config, "out", ref streamSettings); boundStreamSettings(node, "out", ref streamSettings);
//if xtls //if xtls
if (config.streamSecurity() == Global.StreamSecurityX) if (node.streamSecurity == Global.StreamSecurityX)
{ {
if (Utils.IsNullOrEmpty(config.flow())) if (Utils.IsNullOrEmpty(node.flow))
{ {
usersItem.flow = Global.xtlsFlows[1]; usersItem.flow = Global.xtlsFlows[1];
} }
else else
{ {
usersItem.flow = config.flow().Replace("splice", "direct"); usersItem.flow = node.flow.Replace("splice", "direct");
} }
outbound.mux.enabled = false; outbound.mux.enabled = false;
@@ -517,7 +536,7 @@ namespace v2rayN.Handler
outbound.protocol = Global.vlessProtocolLite; outbound.protocol = Global.vlessProtocolLite;
outbound.settings.servers = null; outbound.settings.servers = null;
} }
else if (config.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)
@@ -530,24 +549,24 @@ namespace v2rayN.Handler
serversItem = outbound.settings.servers[0]; serversItem = outbound.settings.servers[0];
} }
//远程服务器地址和端口 //远程服务器地址和端口
serversItem.address = config.address(); serversItem.address = node.address;
serversItem.port = config.port(); serversItem.port = node.port;
serversItem.password = config.id(); serversItem.password = node.id;
serversItem.flow = string.Empty; serversItem.flow = string.Empty;
serversItem.ota = false; serversItem.ota = false;
serversItem.level = 1; serversItem.level = 1;
//if xtls //if xtls
if (config.streamSecurity() == Global.StreamSecurityX) if (node.streamSecurity == Global.StreamSecurityX)
{ {
if (Utils.IsNullOrEmpty(config.flow())) if (Utils.IsNullOrEmpty(node.flow))
{ {
serversItem.flow = Global.xtlsFlows[1]; serversItem.flow = Global.xtlsFlows[1];
} }
else else
{ {
serversItem.flow = config.flow().Replace("splice", "direct"); serversItem.flow = node.flow.Replace("splice", "direct");
} }
outbound.mux.enabled = false; outbound.mux.enabled = false;
@@ -560,7 +579,7 @@ namespace v2rayN.Handler
//远程服务器底层传输配置 //远程服务器底层传输配置
StreamSettings streamSettings = outbound.streamSettings; StreamSettings streamSettings = outbound.streamSettings;
boundStreamSettings(config, "out", ref streamSettings); boundStreamSettings(node, "out", ref streamSettings);
outbound.protocol = Global.trojanProtocolLite; outbound.protocol = Global.trojanProtocolLite;
outbound.settings.vnext = null; outbound.settings.vnext = null;
@@ -575,28 +594,29 @@ namespace v2rayN.Handler
/// <summary> /// <summary>
/// vmess协议远程服务器底层传输配置 /// vmess协议远程服务器底层传输配置
/// </summary> /// </summary>
/// <param name="config"></param> /// <param name="node"></param>
/// <param name="iobound"></param> /// <param name="iobound"></param>
/// <param name="streamSettings"></param> /// <param name="streamSettings"></param>
/// <returns></returns> /// <returns></returns>
private static int boundStreamSettings(Config config, string iobound, ref StreamSettings streamSettings) private static int boundStreamSettings(VmessItem node, string iobound, ref StreamSettings streamSettings)
{ {
try try
{ {
var config = LazyConfig.Instance.GetConfig();
//远程服务器底层传输配置 //远程服务器底层传输配置
streamSettings.network = config.network(); streamSettings.network = node.GetNetwork();
string host = config.requestHost(); string host = node.requestHost.TrimEx();
string sni = config.sni(); string sni = node.sni;
//if tls //if tls
if (config.streamSecurity() == Global.StreamSecurity) if (node.streamSecurity == Global.StreamSecurity)
{ {
streamSettings.security = config.streamSecurity(); streamSettings.security = node.streamSecurity;
TlsSettings tlsSettings = new TlsSettings TlsSettings tlsSettings = new TlsSettings
{ {
allowInsecure = config.allowInsecure(), allowInsecure = Utils.ToBool(node.allowInsecure),
alpn = config.alpn() alpn = node.GetAlpn()
}; };
if (!string.IsNullOrWhiteSpace(sni)) if (!string.IsNullOrWhiteSpace(sni))
{ {
@@ -610,14 +630,14 @@ namespace v2rayN.Handler
} }
//if xtls //if xtls
if (config.streamSecurity() == Global.StreamSecurityX) if (node.streamSecurity == Global.StreamSecurityX)
{ {
streamSettings.security = config.streamSecurity(); streamSettings.security = node.streamSecurity;
TlsSettings xtlsSettings = new TlsSettings TlsSettings xtlsSettings = new TlsSettings
{ {
allowInsecure = config.allowInsecure(), allowInsecure = Utils.ToBool(node.allowInsecure),
alpn = config.alpn() alpn = node.GetAlpn()
}; };
if (!string.IsNullOrWhiteSpace(sni)) if (!string.IsNullOrWhiteSpace(sni))
{ {
@@ -631,7 +651,7 @@ namespace v2rayN.Handler
} }
//streamSettings //streamSettings
switch (config.network()) switch (node.GetNetwork())
{ {
//kcp基本配置暂时是默认值用户能自己设置伪装类型 //kcp基本配置暂时是默认值用户能自己设置伪装类型
case "kcp": case "kcp":
@@ -661,11 +681,11 @@ namespace v2rayN.Handler
kcpSettings.writeBufferSize = config.kcpItem.writeBufferSize; kcpSettings.writeBufferSize = config.kcpItem.writeBufferSize;
kcpSettings.header = new Header kcpSettings.header = new Header
{ {
type = config.headerType() type = node.headerType
}; };
if (!Utils.IsNullOrEmpty(config.path())) if (!Utils.IsNullOrEmpty(node.path))
{ {
kcpSettings.seed = config.path(); kcpSettings.seed = node.path;
} }
streamSettings.kcpSettings = kcpSettings; streamSettings.kcpSettings = kcpSettings;
break; break;
@@ -675,7 +695,7 @@ namespace v2rayN.Handler
{ {
}; };
string path = config.path(); string path = node.path;
if (!string.IsNullOrWhiteSpace(host)) if (!string.IsNullOrWhiteSpace(host))
{ {
wsSettings.headers = new Headers wsSettings.headers = new Headers
@@ -705,7 +725,7 @@ namespace v2rayN.Handler
{ {
httpSettings.host = Utils.String2List(host); httpSettings.host = Utils.String2List(host);
} }
httpSettings.path = config.path(); httpSettings.path = node.path;
streamSettings.httpSettings = httpSettings; streamSettings.httpSettings = httpSettings;
@@ -718,14 +738,14 @@ namespace v2rayN.Handler
QuicSettings quicsettings = new QuicSettings QuicSettings quicsettings = new QuicSettings
{ {
security = host, security = host,
key = config.path(), key = node.path,
header = new Header header = new Header
{ {
type = config.headerType() type = node.headerType
} }
}; };
streamSettings.quicSettings = quicsettings; streamSettings.quicSettings = quicsettings;
if (config.streamSecurity() == Global.StreamSecurity) if (node.streamSecurity == Global.StreamSecurity)
{ {
if (!string.IsNullOrWhiteSpace(sni)) if (!string.IsNullOrWhiteSpace(sni))
{ {
@@ -733,26 +753,26 @@ namespace v2rayN.Handler
} }
else else
{ {
streamSettings.tlsSettings.serverName = config.address(); streamSettings.tlsSettings.serverName = node.address;
} }
} }
break; break;
case "grpc": case "grpc":
var grpcSettings = new GrpcSettings(); var grpcSettings = new GrpcSettings();
grpcSettings.serviceName = config.path(); grpcSettings.serviceName = node.path;
grpcSettings.multiMode = (config.headerType() == Global.GrpcmultiMode ? true : false); grpcSettings.multiMode = (node.headerType == Global.GrpcmultiMode ? true : false);
streamSettings.grpcSettings = grpcSettings; streamSettings.grpcSettings = grpcSettings;
break; break;
default: default:
//tcp带http伪装 //tcp带http伪装
if (config.headerType().Equals(Global.TcpHeaderHttp)) if (node.headerType.Equals(Global.TcpHeaderHttp))
{ {
TcpSettings tcpSettings = new TcpSettings TcpSettings tcpSettings = new TcpSettings
{ {
header = new Header header = new Header
{ {
type = config.headerType() type = node.headerType
} }
}; };
@@ -767,9 +787,9 @@ namespace v2rayN.Handler
//填入自定义Path //填入自定义Path
string pathHttp = @"/"; string pathHttp = @"/";
if (!Utils.IsNullOrEmpty(config.path())) if (!Utils.IsNullOrEmpty(node.path))
{ {
string[] arrPath = config.path().Split(','); string[] arrPath = node.path.Split(',');
pathHttp = string.Join("\",\"", arrPath); pathHttp = string.Join("\",\"", arrPath);
} }
request = request.Replace("$requestPath$", string.Format("\"{0}\"", pathHttp)); request = request.Replace("$requestPath$", string.Format("\"{0}\"", pathHttp));
@@ -837,7 +857,7 @@ namespace v2rayN.Handler
return 0; return 0;
} }
public static int statistic(Config config, ref V2rayConfig v2rayConfig) private static int statistic(Config config, ref V2rayConfig v2rayConfig)
{ {
if (config.enableStatistics) if (config.enableStatistics)
{ {
@@ -889,22 +909,18 @@ namespace v2rayN.Handler
/// <summary> /// <summary>
/// 生成v2ray的客户端配置文件(自定义配置) /// 生成v2ray的客户端配置文件(自定义配置)
/// </summary> /// </summary>
/// <param name="config"></param> /// <param name="node"></param>
/// <param name="fileName"></param> /// <param name="fileName"></param>
/// <param name="msg"></param> /// <param name="msg"></param>
/// <returns></returns> /// <returns></returns>
public static int GenerateClientCustomConfig(Config config, string fileName, out string msg) private static int GenerateClientCustomConfig(VmessItem node, string fileName, out string msg)
{ {
try try
{ {
//检查GUI设置 //检查GUI设置
if (config == null if (node == null)
|| config.index < 0
|| config.vmess.Count <= 0
|| config.index > config.vmess.Count - 1
)
{ {
msg = UIRes.I18N("CheckServerSettings"); msg = ResUI.CheckServerSettings;
return -1; return -1;
} }
@@ -913,23 +929,46 @@ namespace v2rayN.Handler
File.Delete(fileName); File.Delete(fileName);
} }
string addressFileName = config.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))
{ {
msg = UIRes.I18N("FailedGenDefaultConfiguration"); msg = ResUI.FailedGenDefaultConfiguration;
return -1; return -1;
} }
File.Copy(addressFileName, fileName); File.Copy(addressFileName, fileName);
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), config.getSummary()); //check again
if (!File.Exists(fileName))
{
msg = ResUI.FailedGenDefaultConfiguration;
return -1;
}
//overwrite port
var fileContent = File.ReadAllLines(fileName).ToList();
var coreType = LazyConfig.Instance.GetCoreType(node, node.configType);
switch (coreType)
{
case ECoreType.v2fly:
case ECoreType.Xray:
break;
case ECoreType.clash:
fileContent.Add($"port: {LazyConfig.Instance.GetConfig().GetLocalPort(Global.InboundHttp)}");
fileContent.Add($"socks-port: {LazyConfig.Instance.GetConfig().GetLocalPort(Global.InboundSocks)}");
break;
}
File.WriteAllLines(fileName, fileContent);
msg = string.Format(ResUI.SuccessfulConfiguration, $"[{LazyConfig.Instance.GetConfig().GetGroupRemarks(node.groupId)}] {node.GetSummary()}");
} }
catch catch (Exception ex)
{ {
msg = UIRes.I18N("FailedGenDefaultConfiguration"); Utils.SaveLog("GenerateClientCustomConfig", ex);
msg = ResUI.FailedGenDefaultConfiguration;
return -1; return -1;
} }
return 0; return 0;
@@ -942,32 +981,28 @@ namespace v2rayN.Handler
/// <summary> /// <summary>
/// 生成v2ray的客户端配置文件 /// 生成v2ray的客户端配置文件
/// </summary> /// </summary>
/// <param name="config"></param> /// <param name="node"></param>
/// <param name="fileName"></param> /// <param name="fileName"></param>
/// <param name="msg"></param> /// <param name="msg"></param>
/// <returns></returns> /// <returns></returns>
public static int GenerateServerConfig(Config config, string fileName, out string msg) public static int GenerateServerConfig(VmessItem node, string fileName, out string msg)
{ {
try try
{ {
//检查GUI设置 //检查GUI设置
if (config == null if (node == null)
|| config.index < 0
|| config.vmess.Count <= 0
|| config.index > config.vmess.Count - 1
)
{ {
msg = UIRes.I18N("CheckServerSettings"); msg = ResUI.CheckServerSettings;
return -1; return -1;
} }
msg = UIRes.I18N("InitialConfiguration"); msg = ResUI.InitialConfiguration;
//取得默认配置 //取得默认配置
string result = Utils.GetEmbedText(SampleServer); string result = Utils.GetEmbedText(SampleServer);
if (Utils.IsNullOrEmpty(result)) if (Utils.IsNullOrEmpty(result))
{ {
msg = UIRes.I18N("FailedGetDefaultConfiguration"); msg = ResUI.FailedGetDefaultConfiguration;
return -1; return -1;
} }
@@ -975,26 +1010,28 @@ namespace v2rayN.Handler
V2rayConfig v2rayConfig = Utils.FromJson<V2rayConfig>(result); V2rayConfig v2rayConfig = Utils.FromJson<V2rayConfig>(result);
if (v2rayConfig == null) if (v2rayConfig == null)
{ {
msg = UIRes.I18N("FailedGenDefaultConfiguration"); msg = ResUI.FailedGenDefaultConfiguration;
return -1; return -1;
} }
var config = LazyConfig.Instance.GetConfig();
////开始修改配置 ////开始修改配置
log(config, ref v2rayConfig, true); log(config, ref v2rayConfig, true);
//vmess协议服务器配置 //vmess协议服务器配置
ServerInbound(config, ref v2rayConfig); ServerInbound(node, ref v2rayConfig);
//传出设置 //传出设置
ServerOutbound(config, ref v2rayConfig); ServerOutbound(config, ref v2rayConfig);
Utils.ToJsonFile(v2rayConfig, fileName, false); Utils.ToJsonFile(v2rayConfig, fileName, false);
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), config.getSummary()); msg = string.Format(ResUI.SuccessfulConfiguration, node.GetSummary());
} }
catch catch
{ {
msg = UIRes.I18N("FailedGenDefaultConfiguration"); msg = ResUI.FailedGenDefaultConfiguration;
return -1; return -1;
} }
return 0; return 0;
@@ -1003,10 +1040,10 @@ namespace v2rayN.Handler
/// <summary> /// <summary>
/// vmess协议服务器配置 /// vmess协议服务器配置
/// </summary> /// </summary>
/// <param name="config"></param> /// <param name="node"></param>
/// <param name="v2rayConfig"></param> /// <param name="v2rayConfig"></param>
/// <returns></returns> /// <returns></returns>
private static int ServerInbound(Config config, ref V2rayConfig v2rayConfig) private static int ServerInbound(VmessItem node, ref V2rayConfig v2rayConfig)
{ {
try try
{ {
@@ -1022,28 +1059,28 @@ namespace v2rayN.Handler
usersItem = inbound.settings.clients[0]; usersItem = inbound.settings.clients[0];
} }
//远程服务器端口 //远程服务器端口
inbound.port = config.port(); inbound.port = node.port;
//远程服务器用户ID //远程服务器用户ID
usersItem.id = config.id(); usersItem.id = node.id;
usersItem.email = Global.userEMail; usersItem.email = Global.userEMail;
if (config.configType() == (int)EConfigType.Vmess) if (node.configType == EConfigType.Vmess)
{ {
inbound.protocol = Global.vmessProtocolLite; inbound.protocol = Global.vmessProtocolLite;
usersItem.alterId = config.alterId(); usersItem.alterId = node.alterId;
} }
else if (config.configType() == (int)EConfigType.VLESS) else if (node.configType == EConfigType.VLESS)
{ {
inbound.protocol = Global.vlessProtocolLite; inbound.protocol = Global.vlessProtocolLite;
usersItem.flow = config.flow(); usersItem.flow = node.flow;
inbound.settings.decryption = config.security(); inbound.settings.decryption = node.security;
} }
//远程服务器底层传输配置 //远程服务器底层传输配置
StreamSettings streamSettings = inbound.streamSettings; StreamSettings streamSettings = inbound.streamSettings;
boundStreamSettings(config, "in", ref streamSettings); boundStreamSettings(node, "in", ref streamSettings);
} }
catch catch
{ {
@@ -1054,7 +1091,7 @@ namespace v2rayN.Handler
/// <summary> /// <summary>
/// 传出设置 /// 传出设置
/// </summary> /// </summary>
/// <param name="config"></param> /// <param name="node"></param>
/// <param name="v2rayConfig"></param> /// <param name="v2rayConfig"></param>
/// <returns></returns> /// <returns></returns>
private static int ServerOutbound(Config config, ref V2rayConfig v2rayConfig) private static int ServerOutbound(Config config, ref V2rayConfig v2rayConfig)
@@ -1092,7 +1129,7 @@ namespace v2rayN.Handler
string result = Utils.LoadResource(fileName); string result = Utils.LoadResource(fileName);
if (Utils.IsNullOrEmpty(result)) if (Utils.IsNullOrEmpty(result))
{ {
msg = UIRes.I18N("FailedReadConfiguration"); msg = ResUI.FailedReadConfiguration;
return null; return null;
} }
@@ -1100,14 +1137,14 @@ namespace v2rayN.Handler
V2rayConfig v2rayConfig = Utils.FromJson<V2rayConfig>(result); V2rayConfig v2rayConfig = Utils.FromJson<V2rayConfig>(result);
if (v2rayConfig == null) if (v2rayConfig == null)
{ {
msg = UIRes.I18N("FailedConversionConfiguration"); msg = ResUI.FailedConversionConfiguration;
return null; return null;
} }
if (v2rayConfig.outbounds == null if (v2rayConfig.outbounds == null
|| v2rayConfig.outbounds.Count <= 0) || v2rayConfig.outbounds.Count <= 0)
{ {
msg = UIRes.I18N("IncorrectClientConfiguration"); msg = ResUI.IncorrectClientConfiguration;
return null; return null;
} }
@@ -1121,7 +1158,7 @@ namespace v2rayN.Handler
|| outbound.settings.vnext[0].users == null || outbound.settings.vnext[0].users == null
|| outbound.settings.vnext[0].users.Count <= 0) || outbound.settings.vnext[0].users.Count <= 0)
{ {
msg = UIRes.I18N("IncorrectClientConfiguration"); msg = ResUI.IncorrectClientConfiguration;
return null; return null;
} }
@@ -1214,7 +1251,7 @@ namespace v2rayN.Handler
} }
catch catch
{ {
msg = UIRes.I18N("IncorrectClientConfiguration"); msg = ResUI.IncorrectClientConfiguration;
return null; return null;
} }
@@ -1238,7 +1275,7 @@ namespace v2rayN.Handler
string result = Utils.LoadResource(fileName); string result = Utils.LoadResource(fileName);
if (Utils.IsNullOrEmpty(result)) if (Utils.IsNullOrEmpty(result))
{ {
msg = UIRes.I18N("FailedReadConfiguration"); msg = ResUI.FailedReadConfiguration;
return null; return null;
} }
@@ -1246,14 +1283,14 @@ namespace v2rayN.Handler
V2rayConfig v2rayConfig = Utils.FromJson<V2rayConfig>(result); V2rayConfig v2rayConfig = Utils.FromJson<V2rayConfig>(result);
if (v2rayConfig == null) if (v2rayConfig == null)
{ {
msg = UIRes.I18N("FailedConversionConfiguration"); msg = ResUI.FailedConversionConfiguration;
return null; return null;
} }
if (v2rayConfig.inbounds == null if (v2rayConfig.inbounds == null
|| v2rayConfig.inbounds.Count <= 0) || v2rayConfig.inbounds.Count <= 0)
{ {
msg = UIRes.I18N("IncorrectServerConfiguration"); msg = ResUI.IncorrectServerConfiguration;
return null; return null;
} }
@@ -1265,7 +1302,7 @@ namespace v2rayN.Handler
|| inbound.settings.clients == null || inbound.settings.clients == null
|| inbound.settings.clients.Count <= 0) || inbound.settings.clients.Count <= 0)
{ {
msg = UIRes.I18N("IncorrectServerConfiguration"); msg = ResUI.IncorrectServerConfiguration;
return null; return null;
} }
@@ -1359,7 +1396,7 @@ namespace v2rayN.Handler
} }
catch catch
{ {
msg = UIRes.I18N("IncorrectClientConfiguration"); msg = ResUI.IncorrectClientConfiguration;
return null; return null;
} }
return vmessItem; return vmessItem;
@@ -1368,25 +1405,25 @@ namespace v2rayN.Handler
/// <summary> /// <summary>
/// 导出为客户端配置 /// 导出为客户端配置
/// </summary> /// </summary>
/// <param name="config"></param> /// <param name="node"></param>
/// <param name="fileName"></param> /// <param name="fileName"></param>
/// <param name="msg"></param> /// <param name="msg"></param>
/// <returns></returns> /// <returns></returns>
public static int Export2ClientConfig(Config config, string fileName, out string msg) public static int Export2ClientConfig(VmessItem node, string fileName, out string msg)
{ {
return GenerateClientConfig(config, fileName, true, out msg); return GenerateClientConfig(node, fileName, true, out msg);
} }
/// <summary> /// <summary>
/// 导出为服务端配置 /// 导出为服务端配置
/// </summary> /// </summary>
/// <param name="config"></param> /// <param name="node"></param>
/// <param name="fileName"></param> /// <param name="fileName"></param>
/// <param name="msg"></param> /// <param name="msg"></param>
/// <returns></returns> /// <returns></returns>
public static int Export2ServerConfig(Config config, string fileName, out string msg) public static int Export2ServerConfig(VmessItem node, string fileName, out string msg)
{ {
return GenerateServerConfig(config, fileName, out msg); return GenerateServerConfig(node, fileName, out msg);
} }
#endregion #endregion
@@ -1398,31 +1435,27 @@ namespace v2rayN.Handler
{ {
try try
{ {
if (config == null if (config == null)
|| config.index < 0
|| config.vmess.Count <= 0
|| config.index > config.vmess.Count - 1
)
{ {
msg = UIRes.I18N("CheckServerSettings"); msg = ResUI.CheckServerSettings;
return ""; return "";
} }
msg = UIRes.I18N("InitialConfiguration"); msg = ResUI.InitialConfiguration;
Config configCopy = Utils.DeepCopy(config); Config configCopy = Utils.DeepCopy(config);
string result = Utils.GetEmbedText(SampleClient); string result = Utils.GetEmbedText(SampleClient);
if (Utils.IsNullOrEmpty(result)) if (Utils.IsNullOrEmpty(result))
{ {
msg = UIRes.I18N("FailedGetDefaultConfiguration"); msg = ResUI.FailedGetDefaultConfiguration;
return ""; return "";
} }
V2rayConfig v2rayConfig = Utils.FromJson<V2rayConfig>(result); V2rayConfig v2rayConfig = Utils.FromJson<V2rayConfig>(result);
if (v2rayConfig == null) if (v2rayConfig == null)
{ {
msg = UIRes.I18N("FailedGenDefaultConfiguration"); msg = ResUI.FailedGenDefaultConfiguration;
return ""; return "";
} }
List<IPEndPoint> lstIpEndPoints = null; List<IPEndPoint> lstIpEndPoints = null;
@@ -1442,7 +1475,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;
} }
@@ -1450,6 +1483,13 @@ namespace v2rayN.Handler
{ {
continue; continue;
} }
if (it.configType == EConfigType.Vmess || it.configType == EConfigType.VLESS)
{
if (!Utils.IsGuidByParse(configCopy.GetVmessItem(it.indexId).id))
{
continue;
}
}
//find unuse port //find unuse port
var port = httpPort; var port = httpPort;
@@ -1470,8 +1510,8 @@ namespace v2rayN.Handler
{ {
continue; continue;
} }
configCopy.index = it.selected;
it.port = port; it.port = port;
it.allowTest = true;
Inbounds inbound = new Inbounds Inbounds inbound = new Inbounds
{ {
@@ -1482,9 +1522,8 @@ namespace v2rayN.Handler
inbound.tag = Global.InboundHttp + inbound.port.ToString(); inbound.tag = Global.InboundHttp + inbound.port.ToString();
v2rayConfig.inbounds.Add(inbound); v2rayConfig.inbounds.Add(inbound);
V2rayConfig v2rayConfigCopy = Utils.FromJson<V2rayConfig>(result); V2rayConfig v2rayConfigCopy = Utils.FromJson<V2rayConfig>(result);
outbound(configCopy, ref v2rayConfigCopy); outbound(configCopy.GetVmessItem(it.indexId), ref v2rayConfigCopy);
v2rayConfigCopy.outbounds[0].tag = Global.agentTag + inbound.port.ToString(); v2rayConfigCopy.outbounds[0].tag = Global.agentTag + inbound.port.ToString();
v2rayConfig.outbounds.Add(v2rayConfigCopy.outbounds[0]); v2rayConfig.outbounds.Add(v2rayConfigCopy.outbounds[0]);
@@ -1497,12 +1536,12 @@ namespace v2rayN.Handler
v2rayConfig.routing.rules.Add(rule); v2rayConfig.routing.rules.Add(rule);
} }
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), configCopy.getSummary()); //msg = string.Format(ResUI.SuccessfulConfiguration"), node.getSummary());
return Utils.ToJson(v2rayConfig); return Utils.ToJson(v2rayConfig);
} }
catch catch
{ {
msg = UIRes.I18N("FailedGenDefaultConfiguration"); msg = ResUI.FailedGenDefaultConfiguration;
return ""; return "";
} }
} }

View File

@@ -4,6 +4,7 @@ using System.Diagnostics;
using System.IO; using System.IO;
using System.Text; using System.Text;
using v2rayN.Mode; using v2rayN.Mode;
using v2rayN.Resx;
namespace v2rayN.Handler namespace v2rayN.Handler
{ {
@@ -21,8 +22,7 @@ namespace v2rayN.Handler
class V2rayHandler class V2rayHandler
{ {
private static string v2rayConfigRes = Global.v2rayConfigFileName; private static string v2rayConfigRes = Global.v2rayConfigFileName;
private List<string> lstV2ray; private CoreInfo coreInfo;
private string coreUrl;
public event ProcessDelegate ProcessEvent; public event ProcessDelegate ProcessEvent;
//private int processId = 0; //private int processId = 0;
private Process _process; private Process _process;
@@ -36,28 +36,22 @@ 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);
if (item == null)
{
ShowMsg(false, ResUI.CheckServerSettings);
return;
}
if (SetCore(config, item) != 0)
{
ShowMsg(false, ResUI.CheckServerSettings);
return;
}
string fileName = Utils.GetPath(v2rayConfigRes); string fileName = Utils.GetPath(v2rayConfigRes);
if (V2rayConfigHandler.GenerateClientConfig(config, fileName, false, out string msg) != 0) if (V2rayConfigHandler.GenerateClientConfig(item, fileName, false, out string msg) != 0)
{ {
ShowMsg(false, msg); ShowMsg(false, msg);
} }
@@ -115,7 +109,11 @@ namespace v2rayN.Handler
} }
else else
{ {
foreach (string vName in lstV2ray) if (coreInfo == null || coreInfo.coreExes == null)
{
return;
}
foreach (string vName in coreInfo.coreExes)
{ {
Process[] existing = Process.GetProcessesByName(vName); Process[] existing = Process.GetProcessesByName(vName);
foreach (Process p in existing) foreach (Process p in existing)
@@ -172,12 +170,10 @@ namespace v2rayN.Handler
} }
} }
private string V2rayFindexe() private string V2rayFindexe(List<string> lstCoreTemp)
{ {
//查找v2ray文件是否存在
string fileName = string.Empty; string fileName = string.Empty;
//lstV2ray.Reverse(); foreach (string name in lstCoreTemp)
foreach (string name in lstV2ray)
{ {
string vName = string.Format("{0}.exe", name); string vName = string.Format("{0}.exe", name);
vName = Utils.GetPath(vName); vName = Utils.GetPath(vName);
@@ -189,7 +185,7 @@ namespace v2rayN.Handler
} }
if (Utils.IsNullOrEmpty(fileName)) if (Utils.IsNullOrEmpty(fileName))
{ {
string msg = string.Format(UIRes.I18N("NotFoundCore"), coreUrl); string msg = string.Format(ResUI.NotFoundCore, coreInfo.coreUrl);
ShowMsg(false, msg); ShowMsg(false, msg);
} }
return fileName; return fileName;
@@ -200,11 +196,11 @@ namespace v2rayN.Handler
/// </summary> /// </summary>
private void V2rayStart() private void V2rayStart()
{ {
ShowMsg(false, string.Format(UIRes.I18N("StartService"), DateTime.Now.ToString())); ShowMsg(false, string.Format(ResUI.StartService, DateTime.Now.ToString()));
try try
{ {
string fileName = V2rayFindexe(); string fileName = V2rayFindexe(coreInfo.coreExes);
if (fileName == "") return; if (fileName == "") return;
Process p = new Process Process p = new Process
@@ -212,6 +208,7 @@ namespace v2rayN.Handler
StartInfo = new ProcessStartInfo StartInfo = new ProcessStartInfo
{ {
FileName = fileName, FileName = fileName,
Arguments = coreInfo.arguments,
WorkingDirectory = Utils.StartupPath(), WorkingDirectory = Utils.StartupPath(),
UseShellExecute = false, UseShellExecute = false,
RedirectStandardOutput = true, RedirectStandardOutput = true,
@@ -253,11 +250,11 @@ namespace v2rayN.Handler
/// </summary> /// </summary>
private int V2rayStartNew(string configStr) private int V2rayStartNew(string configStr)
{ {
ShowMsg(false, string.Format(UIRes.I18N("StartService"), DateTime.Now.ToString())); ShowMsg(false, string.Format(ResUI.StartService, DateTime.Now.ToString()));
try try
{ {
string fileName = V2rayFindexe(); string fileName = V2rayFindexe(new List<string> { "xray" });
if (fileName == "") return -1; if (fileName == "") return -1;
Process p = new Process Process p = new Process
@@ -333,5 +330,22 @@ namespace v2rayN.Handler
Utils.SaveLog(ex.Message, ex); Utils.SaveLog(ex.Message, ex);
} }
} }
private int SetCore(Config config, VmessItem item)
{
if (item == null)
{
return -1;
}
var coreType = LazyConfig.Instance.GetCoreType(item, item.configType);
coreInfo = LazyConfig.Instance.GetCoreInfo(coreType);
if (coreInfo == null)
{
return -1;
}
return 0;
}
} }
} }

View File

@@ -2,7 +2,8 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Windows.Forms; using System.Windows.Forms;
using v2rayN.Base; using v2rayN.Base;
using System.Linq;
using System.Drawing;
namespace v2rayN.Mode namespace v2rayN.Mode
{ {
@@ -30,10 +31,7 @@ namespace v2rayN.Mode
get; set; get; set;
} }
/// <summary> public string indexId
/// 活动配置序号
/// </summary>
public int index
{ {
get; set; get; set;
} }
@@ -54,14 +52,6 @@ namespace v2rayN.Mode
get; set; get; set;
} }
/// <summary>
/// 允许来自局域网的连接
/// </summary>
public bool allowLANConn
{
get; set;
}
/// <summary> /// <summary>
/// 启用实时网速和流量统计 /// 启用实时网速和流量统计
/// </summary> /// </summary>
@@ -122,10 +112,6 @@ namespace v2rayN.Mode
get; set; get; set;
} }
public ECoreType coreType
{
get; set;
}
public bool ignoreGeoUpdateCore public bool ignoreGeoUpdateCore
{ {
get; set; get; set;
@@ -206,111 +192,19 @@ namespace v2rayN.Mode
get; set; get; set;
} }
public List<GroupItem> groupItem
{
get; set;
}
public List<CoreTypeItem> coreTypeItem
{
get; set;
}
#endregion #endregion
#region function #region function
public string address()
{
if (index < 0)
{
return string.Empty;
}
return vmess[index].address.TrimEx();
}
public int port()
{
if (index < 0)
{
return 10808;
}
return vmess[index].port;
}
public string id()
{
if (index < 0)
{
return string.Empty;
}
return vmess[index].id.TrimEx();
}
public int alterId()
{
if (index < 0)
{
return 0;
}
return vmess[index].alterId;
}
public string security()
{
if (index < 0)
{
return string.Empty;
}
return vmess[index].security.TrimEx();
}
public string remarks()
{
if (index < 0)
{
return string.Empty;
}
return vmess[index].remarks.TrimEx();
}
public string network()
{
if (index < 0 || Utils.IsNullOrEmpty(vmess[index].network) || !Global.networks.Contains(vmess[index].network))
{
return Global.DefaultNetwork;
}
return vmess[index].network.TrimEx();
}
public string headerType()
{
if (index < 0 || Utils.IsNullOrEmpty(vmess[index].headerType))
{
return Global.None;
}
return vmess[index].headerType.Replace(" ", "").TrimEx();
}
public string requestHost()
{
if (index < 0 || Utils.IsNullOrEmpty(vmess[index].requestHost))
{
return string.Empty;
}
return vmess[index].requestHost.Replace(" ", "").TrimEx();
}
public string path()
{
if (index < 0 || Utils.IsNullOrEmpty(vmess[index].path))
{
return string.Empty;
}
return vmess[index].path.Replace(" ", "").TrimEx();
}
public string streamSecurity()
{
if (index < 0 || Utils.IsNullOrEmpty(vmess[index].streamSecurity))
{
return string.Empty;
}
return vmess[index].streamSecurity;
}
public bool allowInsecure()
{
if (index < 0 || Utils.IsNullOrEmpty(vmess[index].allowInsecure))
{
return defAllowInsecure;
}
return Convert.ToBoolean(vmess[index].allowInsecure);
}
public int GetLocalPort(string protocol) public int GetLocalPort(string protocol)
{ {
@@ -318,7 +212,10 @@ namespace v2rayN.Mode
{ {
return GetLocalPort(Global.InboundSocks) + 1; return GetLocalPort(Global.InboundSocks) + 1;
} }
else if (protocol == Global.InboundHttp2)
{
return GetLocalPort(Global.InboundSocks) + 2;
}
else if (protocol == "speedtest") else if (protocol == "speedtest")
{ {
return GetLocalPort(Global.InboundSocks) + 103; return GetLocalPort(Global.InboundSocks) + 103;
@@ -336,91 +233,43 @@ namespace v2rayN.Mode
return localPort; return localPort;
} }
public int configType() public int FindIndexId(string id)
{ {
if (index < 0) if (string.IsNullOrEmpty(id))
{
return 0;
}
return vmess[index].configType;
}
public string getSummary()
{
if (index < 0)
{
return string.Empty;
}
return vmess[index].getSummary();
}
public string getItemId()
{
if (index < 0)
{
return string.Empty;
}
return vmess[index].getItemId();
}
public string flow()
{
if (index < 0)
{
return string.Empty;
}
return vmess[index].flow.TrimEx();
}
public string sni()
{
if (index < 0)
{
return string.Empty;
}
return vmess[index].sni.TrimEx();
}
public List<string> alpn()
{
if (index < 0)
{
return null;
}
if (vmess[index].alpn != null && vmess[index].alpn.Count > 0)
{
return vmess[index].alpn;
}
else
{
return null;
}
}
public string indexId()
{
if (index < 0)
{
return string.Empty;
}
return vmess[index].indexId.TrimEx();
}
public int FindIndexId(string indexId)
{
if (string.IsNullOrEmpty(indexId))
{ {
return -1; return -1;
} }
return vmess.FindIndex(it => it.indexId == indexId); return vmess.FindIndex(it => it.indexId == id);
} }
public List<string> GetShadowsocksSecuritys() public VmessItem GetVmessItem(string id)
{ {
if (coreType == ECoreType.v2fly_core) if (string.IsNullOrEmpty(id))
{ {
return Global.ssSecuritys; return null;
}
return vmess.FirstOrDefault(it => it.indexId == id);
}
public bool IsActiveNode(VmessItem item)
{
if (!Utils.IsNullOrEmpty(item.indexId) && item.indexId == indexId)
{
return true;
} }
return Global.ssSecuritysInXray; return false;
} }
public string GetGroupRemarks(string groupId)
{
if (string.IsNullOrEmpty(groupId))
{
return string.Empty;
}
return groupItem.Where(it => it.id == groupId).FirstOrDefault()?.remarks;
}
#endregion #endregion
} }
@@ -431,7 +280,9 @@ namespace v2rayN.Mode
public VmessItem() public VmessItem()
{ {
indexId = string.Empty; indexId = string.Empty;
configVersion = 1; configType = EConfigType.Vmess;
configVersion = 2;
sort = 0;
address = string.Empty; address = string.Empty;
port = 0; port = 0;
id = string.Empty; id = string.Empty;
@@ -444,15 +295,16 @@ namespace v2rayN.Mode
path = string.Empty; path = string.Empty;
streamSecurity = string.Empty; streamSecurity = string.Empty;
allowInsecure = string.Empty; allowInsecure = string.Empty;
configType = (int)EConfigType.Vmess;
testResult = string.Empty; testResult = string.Empty;
subid = string.Empty; subid = string.Empty;
flow = string.Empty; flow = string.Empty;
groupId = string.Empty;
} }
public string getSummary() #region function
public string GetSummary()
{ {
string summary = string.Format("[{0}] ", ((EConfigType)configType).ToString()); string 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)
@@ -469,19 +321,11 @@ namespace v2rayN.Mode
} }
switch (configType) switch (configType)
{ {
case (int)EConfigType.Vmess: case EConfigType.Vmess:
summary += string.Format("{0}({1}:{2})", remarks, addr, port); case EConfigType.Shadowsocks:
break; case EConfigType.Socks:
case (int)EConfigType.Shadowsocks: case EConfigType.VLESS:
summary += string.Format("{0}({1}:{2})", remarks, addr, port); case EConfigType.Trojan:
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); summary += string.Format("{0}({1}:{2})", remarks, addr, port);
break; break;
default: default:
@@ -490,7 +334,7 @@ namespace v2rayN.Mode
} }
return summary; return summary;
} }
public string getSubRemarks(Config config) public string GetSubRemarks(Config config)
{ {
string subRemarks = string.Empty; string subRemarks = string.Empty;
if (Utils.IsNullOrEmpty(subid)) if (Utils.IsNullOrEmpty(subid))
@@ -511,17 +355,45 @@ namespace v2rayN.Mode
return subid.Substring(0, 4); return subid.Substring(0, 4);
} }
public string getItemId() public List<string> GetAlpn()
{ {
string itemId = $"{address}{port}{requestHost}{path}"; if (alpn != null && alpn.Count > 0)
itemId = Utils.Base64Encode(itemId); {
return itemId; return alpn;
}
else
{
return null;
}
} }
public string GetNetwork()
{
if (Utils.IsNullOrEmpty(network) || !Global.networks.Contains(network))
{
return Global.DefaultNetwork;
}
return network.TrimEx();
}
public void SetTestResult(string value)
{
testResult = value;
}
#endregion
public string indexId public string indexId
{ {
get; set; get; set;
} }
/// <summary>
/// config type(1=normal,2=custom)
/// </summary>
public EConfigType configType
{
get; set;
}
/// <summary> /// <summary>
/// 版本(现在=2) /// 版本(现在=2)
/// </summary> /// </summary>
@@ -530,6 +402,11 @@ namespace v2rayN.Mode
get; set; get; set;
} }
public int sort
{
get; set;
}
/// <summary> /// <summary>
/// 远程服务器地址 /// 远程服务器地址
/// </summary> /// </summary>
@@ -620,15 +497,6 @@ namespace v2rayN.Mode
get; set; get; set;
} }
/// <summary>
/// config type(1=normal,2=custom)
/// </summary>
public int configType
{
get; set;
}
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
@@ -666,6 +534,15 @@ namespace v2rayN.Mode
{ {
get; set; get; set;
} }
public string groupId
{
get; set;
} = string.Empty;
public ECoreType? coreType
{
get; set;
}
} }
[Serializable] [Serializable]
@@ -699,6 +576,13 @@ namespace v2rayN.Mode
/// 开启流量探测 /// 开启流量探测
/// </summary> /// </summary>
public bool sniffingEnabled { get; set; } = true; public bool sniffingEnabled { get; set; } = true;
public bool allowLANConn { get; set; }
public string user { get; set; }
public string pass { get; set; }
} }
[Serializable] [Serializable]
@@ -795,6 +679,11 @@ namespace v2rayN.Mode
{ {
get; set; get; set;
} = string.Empty; } = string.Empty;
public string groupId
{
get; set;
} = string.Empty;
} }
[Serializable] [Serializable]
@@ -805,7 +694,9 @@ namespace v2rayN.Mode
get; set; get; set;
} }
public System.Drawing.Size mainSize public Point mainLocation { get; set; }
public Size mainSize
{ {
get; set; get; set;
} }
@@ -853,4 +744,39 @@ namespace v2rayN.Mode
public Keys? KeyCode { get; set; } public Keys? KeyCode { get; set; }
} }
[Serializable]
public class GroupItem
{
/// <summary>
///
/// </summary>
public string id
{
get; set;
}
/// <summary>
///
/// </summary>
public string remarks
{
get; set;
}
}
[Serializable]
public class CoreTypeItem
{
public EConfigType configType
{
get; set;
}
public ECoreType coreType
{
get; set;
}
}
} }

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
namespace v2rayN.Mode
{
[Serializable]
public class CoreInfo
{
public ECoreType coreType { get; set; }
public List<string> coreExes { get; set; }
public string arguments { get; set; }
public string coreUrl { get; set; }
}
}

View File

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

View File

@@ -6,6 +6,7 @@ namespace v2rayN.Mode
Top = 1, Top = 1,
Up = 2, Up = 2,
Down = 3, Down = 3,
Bottom = 4 Bottom = 4,
Position = 5
} }
} }

View File

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

namespace v2rayN.Mode
{
public enum ESpeedActionType
{
Ping,
Tcping,
Realping,
Speedtest
}
}

View File

@@ -5,10 +5,6 @@ namespace v2rayN.Mode
[Serializable] [Serializable]
class ServerTestItem class ServerTestItem
{ {
public int selected
{
get; set;
}
public string indexId public string indexId
{ {
get; set; get; set;
@@ -21,7 +17,11 @@ namespace v2rayN.Mode
{ {
get; set; get; set;
} }
public int configType public EConfigType configType
{
get; set;
}
public bool allowTest
{ {
get; set; get; set;
} }

View File

@@ -141,6 +141,7 @@ namespace v2rayN.Mode
public bool allowTransparent { get; set; } public bool allowTransparent { get; set; }
public List<AccountsItem> accounts { get; set; }
} }
public class UsersItem public class UsersItem
@@ -540,4 +541,15 @@ namespace v2rayN.Mode
public bool multiMode { get; set; } public bool multiMode { get; set; }
} }
public class AccountsItem
{
/// <summary>
///
/// </summary>
public string user { get; set; }
/// <summary>
///
/// </summary>
public string pass { get; set; }
}
} }

View File

@@ -35,6 +35,7 @@ namespace v2rayN
{ {
Logging.Setup(); Logging.Setup();
Utils.SaveLog($"v2rayN start up | {Utils.GetVersion()} | {Utils.GetExePath()}"); Utils.SaveLog($"v2rayN start up | {Utils.GetVersion()} | {Utils.GetExePath()}");
Logging.ClearLogs();
//设置语言环境 //设置语言环境
string lang = Utils.RegReadValue(Global.MyRegPath, Global.MyRegKeyLanguage, "zh-Hans"); string lang = Utils.RegReadValue(Global.MyRegPath, Global.MyRegKeyLanguage, "zh-Hans");
@@ -42,7 +43,7 @@ namespace v2rayN
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm()); Application.Run(new MainForm());
} }
else else
{ {

View File

@@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("v2rayN")] [assembly: AssemblyProduct("v2rayN")]
[assembly: AssemblyCopyright("Copyright © 2019-2020 (GPLv3)")] [assembly: AssemblyCopyright("Copyright © 2019-2022 (GPLv3)")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
@@ -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("4.35")] [assembly: AssemblyFileVersion("5.12")]

View File

@@ -69,6 +69,15 @@ namespace v2rayN.Resx {
} }
} }
/// <summary>
/// 查找类似 All servers 的本地化字符串。
/// </summary>
internal static string AllGroupServers {
get {
return ResourceManager.GetString("AllGroupServers", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Batch export subscription to clipboard successfully 的本地化字符串。 /// 查找类似 Batch export subscription to clipboard successfully 的本地化字符串。
/// </summary> /// </summary>
@@ -106,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 {
@@ -240,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>
@@ -601,7 +619,7 @@ namespace v2rayN.Resx {
} }
/// <summary> /// <summary>
/// 查找类似 Subscription content decoding failed (non-BASE64 code) 的本地化字符串。 /// 查找类似 Failed to get subscription content 的本地化字符串。
/// </summary> /// </summary>
internal static string MsgSubscriptionDecodingFailed { internal static string MsgSubscriptionDecodingFailed {
get { get {
@@ -916,6 +934,15 @@ namespace v2rayN.Resx {
} }
} }
/// <summary>
/// 查找类似 System proxy 的本地化字符串。
/// </summary>
internal static string SystemProxy {
get {
return ResourceManager.GetString("SystemProxy", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 The ping of current service: {0} 的本地化字符串。 /// 查找类似 The ping of current service: {0} 的本地化字符串。
/// </summary> /// </summary>
@@ -1041,5 +1068,14 @@ namespace v2rayN.Resx {
return ResourceManager.GetString("TransportRequestHostTip4", resourceCulture); return ResourceManager.GetString("TransportRequestHostTip4", resourceCulture);
} }
} }
/// <summary>
/// 查找类似 Ungrouped 的本地化字符串。
/// </summary>
internal static string UngroupedServers {
get {
return ResourceManager.GetString("UngroupedServers", resourceCulture);
}
}
} }
} }

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>
@@ -268,7 +268,7 @@
<value>Start updating PAC...</value> <value>Start updating PAC...</value>
</data> </data>
<data name="MsgSubscriptionDecodingFailed" xml:space="preserve"> <data name="MsgSubscriptionDecodingFailed" xml:space="preserve">
<value>Subscription content decoding failed (non-BASE64 code)</value> <value>Failed to get subscription content</value>
</data> </data>
<data name="MsgUnpacking" xml:space="preserve"> <data name="MsgUnpacking" xml:space="preserve">
<value>is unpacking...</value> <value>is unpacking...</value>
@@ -445,4 +445,16 @@
<data name="RegisterGlobalHotkeySuccessfully" xml:space="preserve"> <data name="RegisterGlobalHotkeySuccessfully" xml:space="preserve">
<value>Global hotkey {0} registered successfully</value> <value>Global hotkey {0} registered successfully</value>
</data> </data>
<data name="UngroupedServers" xml:space="preserve">
<value>Ungrouped</value>
</data>
<data name="AllGroupServers" xml:space="preserve">
<value>All servers</value>
</data>
<data name="FillServerAddressCustom" xml:space="preserve">
<value>Please browse to import server configuration</value>
</data>
<data name="SystemProxy" xml:space="preserve">
<value>System proxy</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>
@@ -268,7 +268,7 @@
<value>开始更新 PAC...</value> <value>开始更新 PAC...</value>
</data> </data>
<data name="MsgSubscriptionDecodingFailed" xml:space="preserve"> <data name="MsgSubscriptionDecodingFailed" xml:space="preserve">
<value>订阅内容解码失败(非BASE64码)</value> <value>订阅内容获取失败</value>
</data> </data>
<data name="MsgUnpacking" xml:space="preserve"> <data name="MsgUnpacking" xml:space="preserve">
<value>正在解压......</value> <value>正在解压......</value>
@@ -445,4 +445,16 @@
<data name="RegisterGlobalHotkeySuccessfully" xml:space="preserve"> <data name="RegisterGlobalHotkeySuccessfully" xml:space="preserve">
<value>注册全局热键 {0} 成功</value> <value>注册全局热键 {0} 成功</value>
</data> </data>
<data name="UngroupedServers" xml:space="preserve">
<value>未分组服务器</value>
</data>
<data name="AllGroupServers" xml:space="preserve">
<value>所有服务器</value>
</data>
<data name="FillServerAddressCustom" xml:space="preserve">
<value>请浏览导入服务器配置</value>
</data>
<data name="SystemProxy" xml:space="preserve">
<value>系统代理</value>
</data>
</root> </root>

View File

@@ -24,7 +24,23 @@
{ {
"tag": "tag2", "tag": "tag2",
"port": 10809, "port": 10809,
"protocol": "socks", "protocol": "http",
"listen": "127.0.0.1",
"settings": {
"allowTransparent": false
},
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
}
},
{
"tag": "tag3",
"port": 10809,
"protocol": "http",
"listen": "127.0.0.1", "listen": "127.0.0.1",
"settings": { "settings": {
"allowTransparent": false "allowTransparent": false

View File

@@ -18,7 +18,7 @@
"network": "tcp" "network": "tcp"
} }
}], }],
"outbound": [{ "outbounds": [{
"protocol": "freedom", "protocol": "freedom",
"settings": {} "settings": {}
}, { }, {

View File

@@ -3,6 +3,9 @@ using log4net.Appender;
using log4net.Core; using log4net.Core;
using log4net.Layout; using log4net.Layout;
using log4net.Repository.Hierarchy; using log4net.Repository.Hierarchy;
using System;
using System.IO;
using System.Threading.Tasks;
namespace v2rayN.Tool namespace v2rayN.Tool
{ {
@@ -15,7 +18,7 @@ namespace v2rayN.Tool
PatternLayout patternLayout = new PatternLayout(); PatternLayout patternLayout = new PatternLayout();
patternLayout.ConversionPattern = "%date [%thread] %-5level %logger - %message%newline"; patternLayout.ConversionPattern = "%date [%thread] %-5level %logger - %message%newline";
patternLayout.ActivateOptions(); patternLayout.ActivateOptions();
RollingFileAppender roller = new RollingFileAppender(); RollingFileAppender roller = new RollingFileAppender();
roller.AppendToFile = true; roller.AppendToFile = true;
roller.RollingStyle = RollingFileAppender.RollingMode.Date; roller.RollingStyle = RollingFileAppender.RollingMode.Date;
@@ -30,8 +33,34 @@ namespace v2rayN.Tool
memory.ActivateOptions(); memory.ActivateOptions();
hierarchy.Root.AddAppender(memory); hierarchy.Root.AddAppender(memory);
hierarchy.Root.Level = Level.Info; hierarchy.Root.Level = Level.Debug;
hierarchy.Configured = true; hierarchy.Configured = true;
} }
public static void ClearLogs()
{
Task.Run(() =>
{
try
{
var now = DateTime.Now.AddMonths(-1);
var dir = Utils.GetPath(@"guiLogs\");
var files = Directory.GetFiles(dir, "*.txt");
foreach (var filePath in files)
{
var file = new FileInfo(filePath);
if (file.CreationTime < now)
{
try
{
file.Delete();
}
catch { }
}
}
}
catch { }
});
}
} }
} }

View File

@@ -1,26 +0,0 @@
using System.Collections.Generic;
using System.Reflection;
using System.Resources;
namespace v2rayN
{
public class UIRes
{
static ResourceManager res = new ResourceManager("v2rayN.Resx.ResUI", Assembly.GetExecutingAssembly());
static string LoadString(ResourceManager resMgr, string key)
{
string value = resMgr.GetString(key);
if (value == null)
{
throw new KeyNotFoundException($"key: {key}");
}
return value;
}
public static string I18N(string key)
{
return LoadString(res, key);
}
}
}

View File

@@ -22,6 +22,7 @@ using v2rayN.Base;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using System.Web; using System.Web;
using log4net; using log4net;
using System.Linq;
namespace v2rayN namespace v2rayN
{ {
@@ -218,6 +219,26 @@ namespace v2rayN
} }
} }
/// <summary>
/// 逗号分隔的字符串,先排序后转List<string>
/// </summary>
/// <param name="str"></param>
/// <returns></returns>
public static List<string> String2ListSorted(string str)
{
try
{
str = str.Replace(Environment.NewLine, "");
List<string> list = new List<string>(str.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries));
return list.OrderBy(x => x).ToList();
}
catch (Exception ex)
{
SaveLog(ex.Message, ex);
return new List<string>();
}
}
/// <summary> /// <summary>
/// Base64编码 /// Base64编码
/// </summary> /// </summary>
@@ -284,6 +305,18 @@ namespace v2rayN
return 0; return 0;
} }
} }
public static bool ToBool(object obj)
{
try
{
return Convert.ToBoolean(obj);
}
catch (Exception ex)
{
SaveLog(ex.Message, ex);
return false;
}
}
public static string ToString(object obj) public static string ToString(object obj)
{ {
@@ -357,7 +390,8 @@ namespace v2rayN
public static string UrlEncode(string url) public static string UrlEncode(string url)
{ {
return HttpUtility.UrlEncode(url); return Uri.EscapeDataString(url);
//return HttpUtility.UrlEncode(url);
} }
public static string UrlDecode(string url) public static string UrlDecode(string url)
{ {
@@ -719,16 +753,14 @@ namespace v2rayN
{ {
if (enableSecurityProtocolTls13) if (enableSecurityProtocolTls13)
{ {
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
| SecurityProtocolType.Tls
| SecurityProtocolType.Tls11 | SecurityProtocolType.Tls11
| SecurityProtocolType.Tls12 | SecurityProtocolType.Tls12
| SecurityProtocolType.Tls13; | SecurityProtocolType.Tls13;
} }
else else
{ {
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
| SecurityProtocolType.Tls
| SecurityProtocolType.Tls11 | SecurityProtocolType.Tls11
| SecurityProtocolType.Tls12; | SecurityProtocolType.Tls12;
} }
@@ -738,20 +770,26 @@ namespace v2rayN
public static bool PortInUse(int port) public static bool PortInUse(int port)
{ {
bool inUse = false; bool inUse = false;
try
IPGlobalProperties ipProperties = IPGlobalProperties.GetIPGlobalProperties();
IPEndPoint[] ipEndPoints = ipProperties.GetActiveTcpListeners();
var lstIpEndPoints = new List<IPEndPoint>(IPGlobalProperties.GetIPGlobalProperties().GetActiveTcpListeners());
foreach (IPEndPoint endPoint in ipEndPoints)
{ {
if (endPoint.Port == port) IPGlobalProperties ipProperties = IPGlobalProperties.GetIPGlobalProperties();
IPEndPoint[] ipEndPoints = ipProperties.GetActiveTcpListeners();
var lstIpEndPoints = new List<IPEndPoint>(IPGlobalProperties.GetIPGlobalProperties().GetActiveTcpListeners());
foreach (IPEndPoint endPoint in ipEndPoints)
{ {
inUse = true; if (endPoint.Port == port)
break; {
inUse = true;
break;
}
} }
} }
catch (Exception ex)
{
SaveLog(ex.Message, ex);
}
return inUse; return inUse;
} }
#endregion #endregion
@@ -902,24 +940,45 @@ namespace v2rayN
return fileName; return fileName;
} }
public static IPAddress GetDefaultGateway()
{
return NetworkInterface
.GetAllNetworkInterfaces()
.Where(n => n.OperationalStatus == OperationalStatus.Up)
.Where(n => n.NetworkInterfaceType != NetworkInterfaceType.Loopback)
.SelectMany(n => n.GetIPProperties()?.GatewayAddresses)
.Select(g => g?.Address)
.Where(a => a != null)
// .Where(a => a.AddressFamily == AddressFamily.InterNetwork)
// .Where(a => Array.FindIndex(a.GetAddressBytes(), b => b != 0) >= 0)
.FirstOrDefault();
}
public static bool IsGuidByParse(string strSrc)
{
return Guid.TryParse(strSrc, out Guid g);
}
#endregion #endregion
#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);
} }
return _tempPath; if (string.IsNullOrEmpty(filename))
} {
return _tempPath;
public static string GetTempPath(string filename) }
{ else
return Path.Combine(GetTempPath(), filename); {
return Path.Combine(_tempPath, filename);
}
} }
public static string UnGzip(byte[] buf) public static string UnGzip(byte[] buf)
@@ -934,6 +993,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

@@ -85,6 +85,7 @@
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Data.Linq" />
<Reference Include="System.Deployment" /> <Reference Include="System.Deployment" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" /> <Reference Include="System.IO.Compression" />
@@ -98,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>
@@ -155,6 +138,18 @@
<Compile Include="Forms\ServerTransportControl.Designer.cs"> <Compile Include="Forms\ServerTransportControl.Designer.cs">
<DependentUpon>ServerTransportControl.cs</DependentUpon> <DependentUpon>ServerTransportControl.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Forms\GroupSettingControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\GroupSettingControl.Designer.cs">
<DependentUpon>GroupSettingControl.cs</DependentUpon>
</Compile>
<Compile Include="Forms\GroupSettingForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\GroupSettingForm.Designer.cs">
<DependentUpon>GroupSettingForm.cs</DependentUpon>
</Compile>
<Compile Include="Handler\LazyConfig.cs" /> <Compile Include="Handler\LazyConfig.cs" />
<Compile Include="Handler\ShareHandler.cs" /> <Compile Include="Handler\ShareHandler.cs" />
<Compile Include="Handler\UpdateHandle.cs" /> <Compile Include="Handler\UpdateHandle.cs" />
@@ -183,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>
@@ -210,6 +199,7 @@
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
<Compile Include="Handler\SysProxyHandle.cs" /> <Compile Include="Handler\SysProxyHandle.cs" />
<Compile Include="Mode\ESpeedActionType.cs" />
<Compile Include="Mode\EGlobalHotkey.cs" /> <Compile Include="Mode\EGlobalHotkey.cs" />
<Compile Include="Mode\ECoreType.cs" /> <Compile Include="Mode\ECoreType.cs" />
<Compile Include="Mode\ESysProxyType.cs" /> <Compile Include="Mode\ESysProxyType.cs" />
@@ -218,6 +208,7 @@
<Compile Include="Mode\RoutingItem.cs" /> <Compile Include="Mode\RoutingItem.cs" />
<Compile Include="Mode\RulesItem.cs" /> <Compile Include="Mode\RulesItem.cs" />
<Compile Include="Mode\ServerStatistics.cs" /> <Compile Include="Mode\ServerStatistics.cs" />
<Compile Include="Mode\CoreInfo.cs" />
<Compile Include="Mode\SysproxyConfig.cs" /> <Compile Include="Mode\SysproxyConfig.cs" />
<Compile Include="Mode\EConfigType.cs" /> <Compile Include="Mode\EConfigType.cs" />
<Compile Include="Mode\ServerTestItem.cs" /> <Compile Include="Mode\ServerTestItem.cs" />
@@ -271,7 +262,6 @@
<Compile Include="Tool\Job.cs" /> <Compile Include="Tool\Job.cs" />
<Compile Include="Tool\Logging.cs" /> <Compile Include="Tool\Logging.cs" />
<Compile Include="Tool\QueryableExtension.cs" /> <Compile Include="Tool\QueryableExtension.cs" />
<Compile Include="Tool\UIRes.cs" />
<Compile Include="Tool\UI.cs" /> <Compile Include="Tool\UI.cs" />
<Compile Include="Tool\Utils.cs" /> <Compile Include="Tool\Utils.cs" />
<Compile Include="Handler\V2rayConfigHandler.cs" /> <Compile Include="Handler\V2rayConfigHandler.cs" />
@@ -279,34 +269,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>
@@ -364,6 +326,14 @@
<EmbeddedResource Include="Forms\ServerTransportControl.zh-Hans.resx"> <EmbeddedResource Include="Forms\ServerTransportControl.zh-Hans.resx">
<DependentUpon>ServerTransportControl.cs</DependentUpon> <DependentUpon>ServerTransportControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Forms\GroupSettingControl.resx">
<DependentUpon>GroupSettingControl.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Forms\GroupSettingControl.zh-Hans.resx">
<DependentUpon>GroupSettingControl.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Forms\SubSettingControl.resx"> <EmbeddedResource Include="Forms\SubSettingControl.resx">
<DependentUpon>SubSettingControl.cs</DependentUpon> <DependentUpon>SubSettingControl.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@@ -378,6 +348,13 @@
<EmbeddedResource Include="Forms\RoutingSettingForm.zh-Hans.resx"> <EmbeddedResource Include="Forms\RoutingSettingForm.zh-Hans.resx">
<DependentUpon>RoutingSettingForm.cs</DependentUpon> <DependentUpon>RoutingSettingForm.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Forms\GroupSettingForm.resx">
<DependentUpon>GroupSettingForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Forms\GroupSettingForm.zh-Hans.resx">
<DependentUpon>GroupSettingForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\SubSettingForm.resx"> <EmbeddedResource Include="Forms\SubSettingForm.resx">
<DependentUpon>SubSettingForm.cs</DependentUpon> <DependentUpon>SubSettingForm.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@@ -401,10 +378,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>