mirror of https://github.com/2dust/v2rayN
Add server group
parent
887dd8da3b
commit
d42346d500
|
@ -15,7 +15,7 @@ namespace v2rayN.Forms
|
||||||
|
|
||||||
private void AddServer2Form_Load(object sender, EventArgs e)
|
private void AddServer2Form_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (EditIndex >= 0)
|
if (vmessItem != null)
|
||||||
{
|
{
|
||||||
BindingServer();
|
BindingServer();
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ 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;
|
txtAddress.ReadOnly = true;
|
||||||
|
@ -55,7 +54,7 @@ namespace v2rayN.Forms
|
||||||
}
|
}
|
||||||
vmessItem.remarks = remarks;
|
vmessItem.remarks = remarks;
|
||||||
|
|
||||||
if (ConfigHandler.EditCustomServer(ref config, vmessItem, EditIndex) == 0)
|
if (ConfigHandler.EditCustomServer(ref config, vmessItem) == 0)
|
||||||
{
|
{
|
||||||
this.DialogResult = DialogResult.OK;
|
this.DialogResult = DialogResult.OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,14 +16,14 @@ namespace v2rayN.Forms
|
||||||
private void AddServer3Form_Load(object sender, EventArgs e)
|
private void AddServer3Form_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
cmbSecurity.Items.AddRange(config.GetShadowsocksSecuritys().ToArray());
|
cmbSecurity.Items.AddRange(config.GetShadowsocksSecuritys().ToArray());
|
||||||
if (EditIndex >= 0)
|
if (vmessItem != null)
|
||||||
{
|
{
|
||||||
vmessItem = config.vmess[EditIndex];
|
|
||||||
BindingServer();
|
BindingServer();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vmessItem = new VmessItem();
|
vmessItem = new VmessItem();
|
||||||
|
vmessItem.groupId = groupId;
|
||||||
ClearServer();
|
ClearServer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ namespace v2rayN.Forms
|
||||||
vmessItem.security = security;
|
vmessItem.security = security;
|
||||||
vmessItem.remarks = remarks;
|
vmessItem.remarks = remarks;
|
||||||
|
|
||||||
if (ConfigHandler.AddShadowsocksServer(ref config, vmessItem, EditIndex) == 0)
|
if (ConfigHandler.AddShadowsocksServer(ref config, vmessItem) == 0)
|
||||||
{
|
{
|
||||||
this.DialogResult = DialogResult.OK;
|
this.DialogResult = DialogResult.OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,14 +15,14 @@ namespace v2rayN.Forms
|
||||||
|
|
||||||
private void AddServer4Form_Load(object sender, EventArgs e)
|
private void AddServer4Form_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (EditIndex >= 0)
|
if (vmessItem != null)
|
||||||
{
|
{
|
||||||
vmessItem = config.vmess[EditIndex];
|
|
||||||
BindingServer();
|
BindingServer();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vmessItem = new VmessItem();
|
vmessItem = new VmessItem();
|
||||||
|
vmessItem.groupId = groupId;
|
||||||
ClearServer();
|
ClearServer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ namespace v2rayN.Forms
|
||||||
vmessItem.security = security;
|
vmessItem.security = security;
|
||||||
vmessItem.remarks = remarks;
|
vmessItem.remarks = remarks;
|
||||||
|
|
||||||
if (ConfigHandler.AddSocksServer(ref config, vmessItem, EditIndex) == 0)
|
if (ConfigHandler.AddSocksServer(ref config, vmessItem) == 0)
|
||||||
{
|
{
|
||||||
this.DialogResult = DialogResult.OK;
|
this.DialogResult = DialogResult.OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,14 +17,14 @@ namespace v2rayN.Forms
|
||||||
{
|
{
|
||||||
cmbFlow.Items.AddRange(Global.xtlsFlows.ToArray());
|
cmbFlow.Items.AddRange(Global.xtlsFlows.ToArray());
|
||||||
transportControl.AllowXtls = true;
|
transportControl.AllowXtls = true;
|
||||||
if (EditIndex >= 0)
|
if (vmessItem != null)
|
||||||
{
|
{
|
||||||
vmessItem = config.vmess[EditIndex];
|
|
||||||
BindingServer();
|
BindingServer();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vmessItem = new VmessItem();
|
vmessItem = new VmessItem();
|
||||||
|
vmessItem.groupId = groupId;
|
||||||
ClearServer();
|
ClearServer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ namespace v2rayN.Forms
|
||||||
vmessItem.security = security;
|
vmessItem.security = security;
|
||||||
vmessItem.remarks = remarks;
|
vmessItem.remarks = remarks;
|
||||||
|
|
||||||
if (ConfigHandler.AddVlessServer(ref config, vmessItem, EditIndex) == 0)
|
if (ConfigHandler.AddVlessServer(ref config, vmessItem) == 0)
|
||||||
{
|
{
|
||||||
this.DialogResult = DialogResult.OK;
|
this.DialogResult = DialogResult.OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,14 +16,14 @@ namespace v2rayN.Forms
|
||||||
{
|
{
|
||||||
cmbFlow.Items.AddRange(Global.xtlsFlows.ToArray());
|
cmbFlow.Items.AddRange(Global.xtlsFlows.ToArray());
|
||||||
transportControl.AllowXtls = true;
|
transportControl.AllowXtls = true;
|
||||||
if (EditIndex >= 0)
|
if (vmessItem != null)
|
||||||
{
|
{
|
||||||
vmessItem = config.vmess[EditIndex];
|
|
||||||
BindingServer();
|
BindingServer();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vmessItem = new VmessItem();
|
vmessItem = new VmessItem();
|
||||||
|
vmessItem.groupId = groupId;
|
||||||
ClearServer();
|
ClearServer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ namespace v2rayN.Forms
|
||||||
vmessItem.flow = flow;
|
vmessItem.flow = flow;
|
||||||
vmessItem.remarks = remarks;
|
vmessItem.remarks = remarks;
|
||||||
|
|
||||||
if (ConfigHandler.AddTrojanServer(ref config, vmessItem, EditIndex) == 0)
|
if (ConfigHandler.AddTrojanServer(ref config, vmessItem) == 0)
|
||||||
{
|
{
|
||||||
this.DialogResult = DialogResult.OK;
|
this.DialogResult = DialogResult.OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,14 +16,14 @@ 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());
|
cmbSecurity.Items.AddRange(Global.vmessSecuritys.ToArray());
|
||||||
if (EditIndex >= 0)
|
if (vmessItem != null)
|
||||||
{
|
{
|
||||||
vmessItem = config.vmess[EditIndex];
|
|
||||||
BindingServer();
|
BindingServer();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vmessItem = new VmessItem();
|
vmessItem = new VmessItem();
|
||||||
|
vmessItem.groupId = groupId;
|
||||||
ClearServer();
|
ClearServer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ namespace v2rayN.Forms
|
||||||
vmessItem.security = security;
|
vmessItem.security = security;
|
||||||
vmessItem.remarks = remarks;
|
vmessItem.remarks = remarks;
|
||||||
|
|
||||||
if (ConfigHandler.AddServer(ref config, vmessItem, EditIndex) == 0)
|
if (ConfigHandler.AddServer(ref config, vmessItem) == 0)
|
||||||
{
|
{
|
||||||
this.DialogResult = DialogResult.OK;
|
this.DialogResult = DialogResult.OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,8 @@ 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 BaseServerForm()
|
public BaseServerForm()
|
||||||
{
|
{
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,243 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<data name="grbMain.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>10</value>
|
||||||
|
</data>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||||
|
<value>6, 12</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>grbMain.ZOrder" xml:space="preserve">
|
||||||
|
<value>0</value>
|
||||||
|
</data>
|
||||||
|
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>292, 21</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnRemove.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>525, 21</value>
|
||||||
|
</data>
|
||||||
|
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>127, 21</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnRemove.Parent" xml:space="preserve">
|
||||||
|
<value>grbMain</value>
|
||||||
|
</data>
|
||||||
|
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>12, 25</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnRemove.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>24</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>$this.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>$this.Name" xml:space="preserve">
|
||||||
|
<value>GroupSettingControl</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>label2.Parent" xml:space="preserve">
|
||||||
|
<value>grbMain</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>grbMain.Name" xml:space="preserve">
|
||||||
|
<value>grbMain</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>label2.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||||
|
<value>2</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>label2.Name" xml:space="preserve">
|
||||||
|
<value>label2</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnRemove.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>75, 23</value>
|
||||||
|
</data>
|
||||||
|
<data name="grbMain.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>0, 0</value>
|
||||||
|
</data>
|
||||||
|
<data name="grbMain.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>619, 61</value>
|
||||||
|
</data>
|
||||||
|
<data name="label2.Text" xml:space="preserve">
|
||||||
|
<value>Remarks</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>txtRemarks.Parent" xml:space="preserve">
|
||||||
|
<value>grbMain</value>
|
||||||
|
</data>
|
||||||
|
<data name="grbMain.Text" xml:space="preserve">
|
||||||
|
<value>Group details</value>
|
||||||
|
</data>
|
||||||
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<data name="label2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||||
|
<value>NoControl</value>
|
||||||
|
</data>
|
||||||
|
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>txtRemarks.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>47, 12</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>txtRemarks.Name" xml:space="preserve">
|
||||||
|
<value>txtRemarks</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnRemove.ZOrder" xml:space="preserve">
|
||||||
|
<value>0</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>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=">>txtRemarks.ZOrder" xml:space="preserve">
|
||||||
|
<value>1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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>
|
|
@ -0,0 +1,133 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="btnRemove.Text" xml:space="preserve">
|
||||||
|
<value>移除</value>
|
||||||
|
</data>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>29, 12</value>
|
||||||
|
</data>
|
||||||
|
<data name="label2.Text" xml:space="preserve">
|
||||||
|
<value>备注</value>
|
||||||
|
</data>
|
||||||
|
<data name="grbMain.Text" xml:space="preserve">
|
||||||
|
<value>分组详情</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,108 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using v2rayN.Handler;
|
||||||
|
using v2rayN.Mode;
|
||||||
|
|
||||||
|
namespace v2rayN.Forms
|
||||||
|
{
|
||||||
|
public partial class GroupSettingForm : BaseForm
|
||||||
|
{
|
||||||
|
List<GroupSettingControl> lstControls = new List<GroupSettingControl>();
|
||||||
|
|
||||||
|
public GroupSettingForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void GroupSettingForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (config.groupItem == null)
|
||||||
|
{
|
||||||
|
config.groupItem = new List<GroupItem>();
|
||||||
|
}
|
||||||
|
|
||||||
|
RefreshGroupsView();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 刷新列表
|
||||||
|
/// </summary>
|
||||||
|
private void RefreshGroupsView()
|
||||||
|
{
|
||||||
|
panCon.Controls.Clear();
|
||||||
|
lstControls.Clear();
|
||||||
|
|
||||||
|
for (int k = config.groupItem.Count - 1; k >= 0; k--)
|
||||||
|
{
|
||||||
|
GroupItem item = config.groupItem[k];
|
||||||
|
if (Utils.IsNullOrEmpty(item.remarks))
|
||||||
|
{
|
||||||
|
if (!Utils.IsNullOrEmpty(item.id))
|
||||||
|
{
|
||||||
|
ConfigHandler.RemoveGroupItem(ref config, item.id);
|
||||||
|
}
|
||||||
|
config.groupItem.RemoveAt(k);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (GroupItem item in config.groupItem)
|
||||||
|
{
|
||||||
|
GroupSettingControl control = new GroupSettingControl();
|
||||||
|
control.OnButtonClicked += Control_OnButtonClicked;
|
||||||
|
control.groupItem = item;
|
||||||
|
control.Dock = DockStyle.Top;
|
||||||
|
|
||||||
|
panCon.Controls.Add(control);
|
||||||
|
panCon.Controls.SetChildIndex(control, 0);
|
||||||
|
|
||||||
|
lstControls.Add(control);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Control_OnButtonClicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RefreshGroupsView();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnOK_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (config.groupItem.Count <= 0)
|
||||||
|
{
|
||||||
|
AddGroup();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ConfigHandler.SaveGroupItem(ref config) == 0)
|
||||||
|
{
|
||||||
|
this.DialogResult = DialogResult.OK;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UI.ShowWarning(UIRes.I18N("OperationFailed"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnClose_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.DialogResult = DialogResult.Cancel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnAdd_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AddGroup();
|
||||||
|
|
||||||
|
RefreshGroupsView();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void AddGroup()
|
||||||
|
{
|
||||||
|
GroupItem groupItem = new GroupItem
|
||||||
|
{
|
||||||
|
id = string.Empty,
|
||||||
|
remarks = "remarks"
|
||||||
|
};
|
||||||
|
config.groupItem.Add(groupItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,273 @@
|
||||||
|
<?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>448, 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>&Cancel</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnClose.Name" xml:space="preserve">
|
||||||
|
<value>btnClose</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnClose.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnClose.Parent" xml:space="preserve">
|
||||||
|
<value>panel2</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnClose.ZOrder" xml:space="preserve">
|
||||||
|
<value>1</value>
|
||||||
|
</data>
|
||||||
|
<data name="panCon.AutoScroll" type="System.Boolean, mscorlib">
|
||||||
|
<value>True</value>
|
||||||
|
</data>
|
||||||
|
<data name="panCon.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||||
|
<value>Fill</value>
|
||||||
|
</data>
|
||||||
|
<data name="panCon.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>0, 0</value>
|
||||||
|
</data>
|
||||||
|
<data name="panCon.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>614, 351</value>
|
||||||
|
</data>
|
||||||
|
<data name="panCon.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>10</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>panCon.Name" xml:space="preserve">
|
||||||
|
<value>panCon</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>panCon.Parent" xml:space="preserve">
|
||||||
|
<value>$this</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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>&Add</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnAdd.Name" xml:space="preserve">
|
||||||
|
<value>btnAdd</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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=">>btnAdd.Parent" xml:space="preserve">
|
||||||
|
<value>panel2</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>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 name="btnOK.Text" xml:space="preserve">
|
||||||
|
<value>&OK</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnOK.Name" xml:space="preserve">
|
||||||
|
<value>btnOK</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnOK.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnOK.Parent" xml:space="preserve">
|
||||||
|
<value>panel2</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnOK.ZOrder" xml:space="preserve">
|
||||||
|
<value>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=">>panel2.Name" xml:space="preserve">
|
||||||
|
<value>panel2</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>panel2.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>panel2.Parent" xml:space="preserve">
|
||||||
|
<value>$this</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>panel2.ZOrder" xml:space="preserve">
|
||||||
|
<value>1</value>
|
||||||
|
</data>
|
||||||
|
<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 name="$this.Text" xml:space="preserve">
|
||||||
|
<value>Group settings</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>$this.Name" xml:space="preserve">
|
||||||
|
<value>GroupSettingForm</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>$this.Type" xml:space="preserve">
|
||||||
|
<value>v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
|
@ -0,0 +1,132 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="btnClose.Text" xml:space="preserve">
|
||||||
|
<value>取消(&C)</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnAdd.Text" xml:space="preserve">
|
||||||
|
<value>添加(&A)</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnOK.Text" xml:space="preserve">
|
||||||
|
<value>确定(&O)</value>
|
||||||
|
</data>
|
||||||
|
<data name="$this.Text" xml:space="preserve">
|
||||||
|
<value>服务器分组设置</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
|
@ -65,6 +65,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();
|
||||||
|
@ -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,
|
||||||
|
@ -227,196 +227,205 @@
|
||||||
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");
|
||||||
//
|
//
|
||||||
// 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 +438,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 +472,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 +480,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 +528,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 +545,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 +562,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,87 +594,87 @@
|
||||||
//
|
//
|
||||||
// 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
|
// bgwScan
|
||||||
|
@ -683,7 +690,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 +707,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 +833,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 +885,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);
|
||||||
|
@ -1067,6 +1083,8 @@
|
||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,15 +11,18 @@ using v2rayN.Base;
|
||||||
using v2rayN.Handler;
|
using v2rayN.Handler;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Tool;
|
using v2rayN.Tool;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace v2rayN.Forms
|
namespace v2rayN.Forms
|
||||||
{
|
{
|
||||||
public partial class MainForm : BaseForm
|
public partial class MainForm : BaseForm
|
||||||
{
|
{
|
||||||
private V2rayHandler v2rayHandler;
|
private V2rayHandler v2rayHandler;
|
||||||
private List<int> lvSelecteds = new List<int>();
|
private List<VmessItem> lvSelecteds = new List<VmessItem>();
|
||||||
private StatisticsHandler statistics = null;
|
private StatisticsHandler statistics = null;
|
||||||
private string MsgFilter = string.Empty;
|
private string MsgFilter = string.Empty;
|
||||||
|
private List<VmessItem> lstVmess = null;
|
||||||
|
private string groupId = string.Empty;
|
||||||
|
|
||||||
#region Window 事件
|
#region Window 事件
|
||||||
|
|
||||||
|
@ -46,6 +49,7 @@ namespace v2rayN.Forms
|
||||||
Environment.Exit(0);
|
Environment.Exit(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigHandler.InitBuiltinRouting(ref config);
|
ConfigHandler.InitBuiltinRouting(ref config);
|
||||||
MainFormHandler.Instance.BackupGuiNConfig(config, true);
|
MainFormHandler.Instance.BackupGuiNConfig(config, true);
|
||||||
v2rayHandler = new V2rayHandler();
|
v2rayHandler = new V2rayHandler();
|
||||||
|
@ -72,6 +76,7 @@ namespace v2rayN.Forms
|
||||||
|
|
||||||
private void MainForm_Shown(object sender, EventArgs e)
|
private void MainForm_Shown(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
InitGroupView();
|
||||||
InitServersView();
|
InitServersView();
|
||||||
RefreshServers();
|
RefreshServers();
|
||||||
RefreshRoutingsMenu();
|
RefreshRoutingsMenu();
|
||||||
|
@ -196,8 +201,10 @@ namespace v2rayN.Forms
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void RefreshServers()
|
private void RefreshServers()
|
||||||
{
|
{
|
||||||
|
lstVmess = config.vmess.Where(it => it.groupId == groupId).OrderBy(it => it.sort).ToList();
|
||||||
|
|
||||||
|
ConfigHandler.SetDefaultServer(config, lstVmess);
|
||||||
RefreshServersView();
|
RefreshServersView();
|
||||||
//lvServers.AutoResizeColumns();
|
|
||||||
RefreshServersMenu();
|
RefreshServersMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,24 +254,24 @@ namespace v2rayN.Forms
|
||||||
lvServers.BeginUpdate();
|
lvServers.BeginUpdate();
|
||||||
lvServers.Items.Clear();
|
lvServers.Items.Clear();
|
||||||
|
|
||||||
for (int k = 0; k < config.vmess.Count; k++)
|
for (int k = 0; k < lstVmess.Count; k++)
|
||||||
{
|
{
|
||||||
string def = string.Empty;
|
string def = string.Empty;
|
||||||
string totalUp = string.Empty,
|
string totalUp = string.Empty,
|
||||||
totalDown = string.Empty,
|
totalDown = string.Empty,
|
||||||
todayUp = string.Empty,
|
todayUp = string.Empty,
|
||||||
todayDown = string.Empty;
|
todayDown = string.Empty;
|
||||||
if (config.index.Equals(k))
|
|
||||||
|
VmessItem item = lstVmess[k];
|
||||||
|
if (config.IsActiveNode(item))
|
||||||
{
|
{
|
||||||
def = "√";
|
def = "√";
|
||||||
}
|
}
|
||||||
|
|
||||||
VmessItem item = config.vmess[k];
|
|
||||||
|
|
||||||
bool stats = statistics != null && statistics.Enable;
|
bool stats = statistics != null && statistics.Enable;
|
||||||
if (stats)
|
if (stats)
|
||||||
{
|
{
|
||||||
ServerStatItem sItem = statistics.Statistic.Find(item_ => item_.itemId == item.getItemId());
|
ServerStatItem sItem = statistics.Statistic.Find(item_ => item_.itemId == item.indexId);
|
||||||
if (sItem != null)
|
if (sItem != null)
|
||||||
{
|
{
|
||||||
totalUp = Utils.HumanFy(sItem.totalUp);
|
totalUp = Utils.HumanFy(sItem.totalUp);
|
||||||
|
@ -295,7 +302,7 @@ namespace v2rayN.Forms
|
||||||
{
|
{
|
||||||
lvItem.BackColor = Color.WhiteSmoke;
|
lvItem.BackColor = Color.WhiteSmoke;
|
||||||
}
|
}
|
||||||
if (config.index.Equals(k))
|
if (config.IsActiveNode(item))
|
||||||
{
|
{
|
||||||
//lvItem.Checked = true;
|
//lvItem.Checked = true;
|
||||||
lvItem.ForeColor = Color.DodgerBlue;
|
lvItem.ForeColor = Color.DodgerBlue;
|
||||||
|
@ -324,37 +331,37 @@ namespace v2rayN.Forms
|
||||||
menuServers.Visible = false;
|
menuServers.Visible = false;
|
||||||
menuServers2.Visible = false;
|
menuServers2.Visible = false;
|
||||||
|
|
||||||
if (config.vmess.Count > 20)
|
if (lstVmess.Count > 20)
|
||||||
{
|
{
|
||||||
for (int k = 0; k < config.vmess.Count; k++)
|
for (int k = 0; k < lstVmess.Count; k++)
|
||||||
{
|
{
|
||||||
VmessItem item = config.vmess[k];
|
VmessItem item = lstVmess[k];
|
||||||
string name = item.getSummary();
|
string name = item.getSummary();
|
||||||
|
|
||||||
if (config.index.Equals(k))
|
if (config.IsActiveNode(item))
|
||||||
{
|
{
|
||||||
name = $"√ {name}";
|
name = $"√ {name}";
|
||||||
}
|
}
|
||||||
menuServers2.Items.Add(name);
|
menuServers2.Items.Add(name);
|
||||||
|
|
||||||
}
|
}
|
||||||
menuServers2.SelectedIndex = config.index;
|
menuServers2.SelectedIndex = lstVmess.FindIndex(it => it.indexId == config.indexId);
|
||||||
menuServers2.SelectedIndexChanged += MenuServers2_SelectedIndexChanged;
|
menuServers2.SelectedIndexChanged += MenuServers2_SelectedIndexChanged;
|
||||||
menuServers2.Visible = true;
|
menuServers2.Visible = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
List<ToolStripMenuItem> lst = new List<ToolStripMenuItem>();
|
List<ToolStripMenuItem> lst = new List<ToolStripMenuItem>();
|
||||||
for (int k = 0; k < config.vmess.Count; k++)
|
for (int k = 0; k < lstVmess.Count; k++)
|
||||||
{
|
{
|
||||||
VmessItem item = config.vmess[k];
|
VmessItem item = lstVmess[k];
|
||||||
string name = item.getSummary();
|
string name = item.getSummary();
|
||||||
|
|
||||||
ToolStripMenuItem ts = new ToolStripMenuItem(name)
|
ToolStripMenuItem ts = new ToolStripMenuItem(name)
|
||||||
{
|
{
|
||||||
Tag = k
|
Tag = k
|
||||||
};
|
};
|
||||||
if (config.index.Equals(k))
|
if (config.IsActiveNode(item))
|
||||||
{
|
{
|
||||||
ts.Checked = true;
|
ts.Checked = true;
|
||||||
}
|
}
|
||||||
|
@ -439,7 +446,7 @@ namespace v2rayN.Forms
|
||||||
|
|
||||||
var tag = lvServers.Columns[e.Column].Tag?.ToString();
|
var tag = lvServers.Columns[e.Column].Tag?.ToString();
|
||||||
bool asc = Utils.IsNullOrEmpty(tag) ? true : !Convert.ToBoolean(tag);
|
bool asc = Utils.IsNullOrEmpty(tag) ? true : !Convert.ToBoolean(tag);
|
||||||
if (ConfigHandler.SortServers(ref config, (EServerColName)e.Column, asc) != 0)
|
if (ConfigHandler.SortServers(ref config, ref lstVmess, (EServerColName)e.Column, asc) != 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -457,6 +464,40 @@ namespace v2rayN.Forms
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitGroupView()
|
||||||
|
{
|
||||||
|
tabGroup.TabPages.Clear();
|
||||||
|
|
||||||
|
foreach (var item in config.groupItem)
|
||||||
|
{
|
||||||
|
var tabPage2 = new TabPage($" {item.remarks} ");
|
||||||
|
tabPage2.Name = item.id;
|
||||||
|
tabGroup.TabPages.Add(tabPage2);
|
||||||
|
}
|
||||||
|
|
||||||
|
string title = $" {UIRes.I18N("UngroupedServers")} ";
|
||||||
|
var tabPage = new TabPage(title);
|
||||||
|
tabPage.Name = "Ungrouped";
|
||||||
|
tabGroup.TabPages.Add(tabPage);
|
||||||
|
|
||||||
|
tabGroup.SelectedIndex = tabGroup.TabPages.Count - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tabGroup_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (tabGroup.SelectedIndex < 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
groupId = string.Empty;
|
||||||
|
if (tabGroup.SelectedIndex < config.groupItem.Count)
|
||||||
|
{
|
||||||
|
groupId = config.groupItem[tabGroup.SelectedIndex].id;
|
||||||
|
}
|
||||||
|
|
||||||
|
RefreshServers();
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region v2ray 操作
|
#region v2ray 操作
|
||||||
|
@ -520,7 +561,7 @@ namespace v2rayN.Forms
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
qrCodeControl.showQRCode(index, config);
|
qrCodeControl.showQRCode(lstVmess[index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void lvServers_DoubleClick(object sender, EventArgs e)
|
private void lvServers_DoubleClick(object sender, EventArgs e)
|
||||||
|
@ -530,7 +571,7 @@ namespace v2rayN.Forms
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ShowServerForm(config.vmess[index].configType, index);
|
ShowServerForm(lstVmess[index].configType, index);
|
||||||
}
|
}
|
||||||
private void ShowServerForm(int configType, int index)
|
private void ShowServerForm(int configType, int index)
|
||||||
{
|
{
|
||||||
|
@ -556,7 +597,8 @@ namespace v2rayN.Forms
|
||||||
fm = new AddServer2Form();
|
fm = new AddServer2Form();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
fm.EditIndex = index;
|
fm.vmessItem = index >= 0 ? lstVmess[index] : null;
|
||||||
|
fm.groupId = groupId;
|
||||||
if (fm.ShowDialog() == DialogResult.OK)
|
if (fm.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
RefreshServers();
|
RefreshServers();
|
||||||
|
@ -646,7 +688,7 @@ namespace v2rayN.Forms
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigHandler.RemoveServer(ref config, lvSelecteds);
|
ConfigHandler.RemoveServer(config, lvSelecteds);
|
||||||
|
|
||||||
RefreshServers();
|
RefreshServers();
|
||||||
LoadV2ray();
|
LoadV2ray();
|
||||||
|
@ -654,9 +696,9 @@ namespace v2rayN.Forms
|
||||||
|
|
||||||
private void menuRemoveDuplicateServer_Click(object sender, EventArgs e)
|
private void menuRemoveDuplicateServer_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
int oldCount = config.vmess.Count;
|
int oldCount = lstVmess.Count;
|
||||||
ConfigHandler.DedupServerList(ref config);
|
ConfigHandler.DedupServerList(ref config, ref lstVmess);
|
||||||
int newCount = config.vmess.Count;
|
int newCount = lstVmess.Count;
|
||||||
RefreshServers();
|
RefreshServers();
|
||||||
LoadV2ray();
|
LoadV2ray();
|
||||||
UI.Show(string.Format(UIRes.I18N("RemoveDuplicateServerResult"), oldCount, newCount));
|
UI.Show(string.Format(UIRes.I18N("RemoveDuplicateServerResult"), oldCount, newCount));
|
||||||
|
@ -669,7 +711,7 @@ namespace v2rayN.Forms
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ConfigHandler.CopyServer(ref config, index) == 0)
|
if (ConfigHandler.CopyServer(ref config, lstVmess[index]) == 0)
|
||||||
{
|
{
|
||||||
RefreshServers();
|
RefreshServers();
|
||||||
}
|
}
|
||||||
|
@ -745,13 +787,13 @@ namespace v2rayN.Forms
|
||||||
private void menuExport2ClientConfig_Click(object sender, EventArgs e)
|
private void menuExport2ClientConfig_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
int index = GetLvSelectedIndex();
|
int index = GetLvSelectedIndex();
|
||||||
MainFormHandler.Instance.Export2ClientConfig(index, config);
|
MainFormHandler.Instance.Export2ClientConfig(lstVmess[index], config);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void menuExport2ServerConfig_Click(object sender, EventArgs e)
|
private void menuExport2ServerConfig_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
int index = GetLvSelectedIndex();
|
int index = GetLvSelectedIndex();
|
||||||
MainFormHandler.Instance.Export2ServerConfig(index, config);
|
MainFormHandler.Instance.Export2ServerConfig(lstVmess[index], config);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void menuExport2ShareUrl_Click(object sender, EventArgs e)
|
private void menuExport2ShareUrl_Click(object sender, EventArgs e)
|
||||||
|
@ -759,9 +801,9 @@ namespace v2rayN.Forms
|
||||||
GetLvSelectedIndex();
|
GetLvSelectedIndex();
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
foreach (int v in lvSelecteds)
|
foreach (var v in lvSelecteds)
|
||||||
{
|
{
|
||||||
string url = ShareHandler.GetShareUrl(config, v);
|
string url = ShareHandler.GetShareUrl(v);
|
||||||
if (Utils.IsNullOrEmpty(url))
|
if (Utils.IsNullOrEmpty(url))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
@ -782,9 +824,9 @@ namespace v2rayN.Forms
|
||||||
GetLvSelectedIndex();
|
GetLvSelectedIndex();
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
foreach (int v in lvSelecteds)
|
foreach (var v in lvSelecteds)
|
||||||
{
|
{
|
||||||
string url = ShareHandler.GetShareUrl(config, v);
|
string url = ShareHandler.GetShareUrl(v);
|
||||||
if (Utils.IsNullOrEmpty(url))
|
if (Utils.IsNullOrEmpty(url))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
@ -832,6 +874,17 @@ namespace v2rayN.Forms
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void tsbGroupSetting_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var fm = new GroupSettingForm();
|
||||||
|
if (fm.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
InitGroupView();
|
||||||
|
RefreshServers();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void tsbReload_Click(object sender, EventArgs e)
|
private void tsbReload_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Global.reloadV2ray = true;
|
Global.reloadV2ray = true;
|
||||||
|
@ -857,7 +910,7 @@ namespace v2rayN.Forms
|
||||||
UI.Show(UIRes.I18N("PleaseSelectServer"));
|
UI.Show(UIRes.I18N("PleaseSelectServer"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (ConfigHandler.SetDefaultServer(ref config, index) == 0)
|
if (ConfigHandler.SetDefaultServer(ref config, lstVmess[index]) == 0)
|
||||||
{
|
{
|
||||||
RefreshServers();
|
RefreshServers();
|
||||||
LoadV2ray();
|
LoadV2ray();
|
||||||
|
@ -884,7 +937,7 @@ namespace v2rayN.Forms
|
||||||
index = lvServers.SelectedIndices[0];
|
index = lvServers.SelectedIndices[0];
|
||||||
foreach (int i in lvServers.SelectedIndices)
|
foreach (int i in lvServers.SelectedIndices)
|
||||||
{
|
{
|
||||||
lvSelecteds.Add(i);
|
lvSelecteds.Add(lstVmess[i]);
|
||||||
}
|
}
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
|
@ -913,7 +966,7 @@ namespace v2rayN.Forms
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ConfigHandler.AddCustomServer(ref config, fileName) == 0)
|
if (ConfigHandler.AddCustomServer(ref config, fileName, groupId) == 0)
|
||||||
{
|
{
|
||||||
RefreshServers();
|
RefreshServers();
|
||||||
//LoadV2ray();
|
//LoadV2ray();
|
||||||
|
@ -946,7 +999,7 @@ namespace v2rayN.Forms
|
||||||
private void menuAddServers_Click(object sender, EventArgs e)
|
private void menuAddServers_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string clipboardData = Utils.GetClipboardData();
|
string clipboardData = Utils.GetClipboardData();
|
||||||
int ret = MainFormHandler.Instance.AddBatchServers(config, clipboardData);
|
int ret = MainFormHandler.Instance.AddBatchServers(config, clipboardData, "", groupId);
|
||||||
if (ret > 0)
|
if (ret > 0)
|
||||||
{
|
{
|
||||||
RefreshServers();
|
RefreshServers();
|
||||||
|
@ -1114,27 +1167,35 @@ namespace v2rayN.Forms
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 后台测速
|
#region 后台测速
|
||||||
|
private void SetTestResult(string indexId, string txt)
|
||||||
|
{
|
||||||
|
int k = lstVmess.FindIndex(it => it.indexId == indexId);
|
||||||
|
if (k >= 0 && k < lvServers.Items.Count)
|
||||||
|
{
|
||||||
|
lstVmess[k].testResult = txt;
|
||||||
|
lvServers.Items[k].SubItems["testResult"].Text = txt;
|
||||||
|
}
|
||||||
|
}
|
||||||
private void SetTestResult(int k, string txt)
|
private void SetTestResult(int k, string txt)
|
||||||
{
|
{
|
||||||
if (k < lvServers.Items.Count)
|
if (k < lvServers.Items.Count)
|
||||||
{
|
{
|
||||||
config.vmess[k].testResult = txt;
|
lstVmess[k].testResult = txt;
|
||||||
lvServers.Items[k].SubItems["testResult"].Text = txt;
|
lvServers.Items[k].SubItems["testResult"].Text = txt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void ClearTestResult()
|
private void ClearTestResult()
|
||||||
{
|
{
|
||||||
foreach (int s in lvSelecteds)
|
foreach (var s in lvSelecteds)
|
||||||
{
|
{
|
||||||
SetTestResult(s, "");
|
SetTestResult(s.indexId, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void UpdateSpeedtestHandler(int index, string msg)
|
private void UpdateSpeedtestHandler(string indexId, string msg)
|
||||||
{
|
{
|
||||||
lvServers.Invoke((MethodInvoker)delegate
|
lvServers.Invoke((MethodInvoker)delegate
|
||||||
{
|
{
|
||||||
SetTestResult(index, msg);
|
SetTestResult(indexId, msg);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1147,9 +1208,9 @@ namespace v2rayN.Forms
|
||||||
toolSslServerSpeed.Text = string.Format("{0}/s↑ | {1}/s↓", Utils.HumanFy(up), Utils.HumanFy(down));
|
toolSslServerSpeed.Text = string.Format("{0}/s↑ | {1}/s↓", Utils.HumanFy(up), Utils.HumanFy(down));
|
||||||
|
|
||||||
List<string[]> datas = new List<string[]>();
|
List<string[]> datas = new List<string[]>();
|
||||||
for (int i = 0; i < config.vmess.Count; i++)
|
for (int i = 0; i < lstVmess.Count; i++)
|
||||||
{
|
{
|
||||||
int index = statistics.FindIndex(item_ => item_.itemId == config.vmess[i].getItemId());
|
int index = statistics.FindIndex(item_ => item_.itemId == lstVmess[i].indexId);
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
{
|
{
|
||||||
lvServers.Invoke((MethodInvoker)delegate
|
lvServers.Invoke((MethodInvoker)delegate
|
||||||
|
@ -1213,7 +1274,7 @@ namespace v2rayN.Forms
|
||||||
UI.Show(UIRes.I18N("PleaseSelectServer"));
|
UI.Show(UIRes.I18N("PleaseSelectServer"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ConfigHandler.MoveServer(ref config, index, eMove) == 0)
|
if (ConfigHandler.MoveServer(ref config, ref lstVmess, index, eMove) == 0)
|
||||||
{
|
{
|
||||||
//TODO: reload is not good.
|
//TODO: reload is not good.
|
||||||
RefreshServers();
|
RefreshServers();
|
||||||
|
@ -1381,7 +1442,7 @@ namespace v2rayN.Forms
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int ret = MainFormHandler.Instance.AddBatchServers(config, result);
|
int ret = MainFormHandler.Instance.AddBatchServers(config, result, "", groupId);
|
||||||
if (ret > 0)
|
if (ret > 0)
|
||||||
{
|
{
|
||||||
RefreshServers();
|
RefreshServers();
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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>
|
||||||
|
@ -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>
|
||||||
|
@ -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,19 +555,18 @@
|
||||||
<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>
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -304,6 +304,14 @@ namespace v2rayN.Forms
|
||||||
UI.Show(UIRes.I18N("OperationSuccess"));
|
UI.Show(UIRes.I18N("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
|
@ -124,6 +124,12 @@
|
||||||
<data name="btnClose.Text" xml:space="preserve">
|
<data name="btnClose.Text" xml:space="preserve">
|
||||||
<value>取消(&C)</value>
|
<value>取消(&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>确定(&O)</value>
|
<value>确定(&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>
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,12 @@ 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void txtRemarks_Leave(object sender, EventArgs e)
|
private void txtRemarks_Leave(object sender, EventArgs e)
|
||||||
|
|
|
@ -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=">>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=">>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=">>txtUrl.Name" xml:space="preserve">
|
<data name=">>txtUrl.Name" xml:space="preserve">
|
||||||
<value>txtUrl</value>
|
<value>txtUrl</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>label3.ZOrder" xml:space="preserve">
|
<data name=">>cmbGroup.Parent" xml:space="preserve">
|
||||||
<value>8</value>
|
<value>grbMain</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>picQRCode.Name" xml:space="preserve">
|
<data name=">>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=">>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=">>txtRemarks.Type" xml:space="preserve">
|
<data name=">>txtRemarks.Type" xml:space="preserve">
|
||||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<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=">>txtRemarks.Parent" xml:space="preserve">
|
<data name=">>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=">>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=">>label3.ZOrder" xml:space="preserve">
|
||||||
|
<value>10</value>
|
||||||
|
</data>
|
||||||
<data name=">>label1.Parent" xml:space="preserve">
|
<data name=">>label1.Parent" xml:space="preserve">
|
||||||
<value>grbMain</value>
|
<value>grbMain</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>chkEnabled.ZOrder" xml:space="preserve">
|
<data name=">>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=">>label1.ZOrder" xml:space="preserve">
|
<data name=">>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=">>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=">>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=">>txtUrl.ZOrder" xml:space="preserve">
|
<data name=">>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=">>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=">>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=">>chkEnabled.Name" xml:space="preserve">
|
<data name=">>chkEnabled.Name" xml:space="preserve">
|
||||||
<value>chkEnabled</value>
|
<value>chkEnabled</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>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=">>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=">>txtRemarks.Name" xml:space="preserve">
|
<data name=">>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=">>btnRemove.ZOrder" xml:space="preserve">
|
<data name=">>btnRemove.ZOrder" xml:space="preserve">
|
||||||
<value>4</value>
|
<value>6</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>btnShare.Parent" xml:space="preserve">
|
<data name=">>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=">>label4.ZOrder" xml:space="preserve">
|
||||||
|
<value>0</value>
|
||||||
|
</data>
|
||||||
<data name=">>txtUserAgent.Parent" xml:space="preserve">
|
<data name=">>txtUserAgent.Parent" xml:space="preserve">
|
||||||
<value>grbMain</value>
|
<value>grbMain</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="grbMain.TabIndex" type="System.Int32, mscorlib">
|
<data name=">>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=">>label2.Parent" xml:space="preserve">
|
<data name=">>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=">>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=">>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=">>grbMain.Parent" xml:space="preserve">
|
<data name=">>grbMain.Parent" xml:space="preserve">
|
||||||
<value>$this</value>
|
<value>$this</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>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=">>btnShare.Name" xml:space="preserve">
|
<data name=">>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=">>btnShare.ZOrder" xml:space="preserve">
|
<data name=">>btnShare.ZOrder" xml:space="preserve">
|
||||||
<value>2</value>
|
<value>4</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
<data name=">>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=">>txtUserAgent.Name" xml:space="preserve">
|
<data name=">>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=">>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=">>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=">>label3.Parent" xml:space="preserve">
|
||||||
<value>grbMain</value>
|
<value>grbMain</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>grbMain.ZOrder" xml:space="preserve">
|
<data name=">>grbMain.ZOrder" xml:space="preserve">
|
||||||
|
@ -411,6 +456,9 @@
|
||||||
<data name=">>btnRemove.Type" xml:space="preserve">
|
<data name=">>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=">>$this.Type" xml:space="preserve">
|
<data name=">>$this.Type" xml:space="preserve">
|
||||||
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<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=">>grbMain.Name" xml:space="preserve">
|
<data name=">>grbMain.Name" xml:space="preserve">
|
||||||
<value>grbMain</value>
|
<value>grbMain</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>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=">>label1.Type" xml:space="preserve">
|
<data name=">>label1.Type" xml:space="preserve">
|
||||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
@ -432,6 +480,9 @@
|
||||||
<data name=">>label3.Type" xml:space="preserve">
|
<data name=">>label3.Type" xml:space="preserve">
|
||||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -45,7 +45,6 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
config = new Config
|
config = new Config
|
||||||
{
|
{
|
||||||
index = -1,
|
|
||||||
logEnabled = false,
|
logEnabled = false,
|
||||||
loglevel = "warning",
|
loglevel = "warning",
|
||||||
vmess = new List<VmessItem>(),
|
vmess = new List<VmessItem>(),
|
||||||
|
@ -53,9 +52,6 @@ namespace v2rayN.Handler
|
||||||
//Mux
|
//Mux
|
||||||
muxEnabled = false,
|
muxEnabled = false,
|
||||||
|
|
||||||
////默认监听端口
|
|
||||||
//config.pacPort = 8888;
|
|
||||||
|
|
||||||
// 默认不开启统计
|
// 默认不开启统计
|
||||||
enableStatistics = false,
|
enableStatistics = false,
|
||||||
|
|
||||||
|
@ -89,7 +85,6 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//http协议不由core提供,只保留socks
|
|
||||||
if (config.inbound.Count > 0)
|
if (config.inbound.Count > 0)
|
||||||
{
|
{
|
||||||
config.inbound[0].protocol = Global.InboundSocks;
|
config.inbound[0].protocol = Global.InboundSocks;
|
||||||
|
@ -157,11 +152,14 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
config.subItem = new List<SubItem>();
|
config.subItem = new List<SubItem>();
|
||||||
}
|
}
|
||||||
|
if (config.groupItem == null)
|
||||||
|
{
|
||||||
|
config.groupItem = new List<GroupItem>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (config == null
|
if (config == null
|
||||||
|| config.index < 0
|
|
||||||
|| config.vmess.Count <= 0
|
|| config.vmess.Count <= 0
|
||||||
|| config.index > config.vmess.Count - 1
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Global.reloadV2ray = false;
|
Global.reloadV2ray = false;
|
||||||
|
@ -196,9 +194,8 @@ namespace v2rayN.Handler
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="config"></param>
|
/// <param name="config"></param>
|
||||||
/// <param name="vmessItem"></param>
|
/// <param name="vmessItem"></param>
|
||||||
/// <param name="index"></param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int AddServer(ref Config config, VmessItem vmessItem, int index, bool toFile = true)
|
public static int AddServer(ref Config config, VmessItem vmessItem, bool toFile = true)
|
||||||
{
|
{
|
||||||
vmessItem.configType = (int)EConfigType.Vmess;
|
vmessItem.configType = (int)EConfigType.Vmess;
|
||||||
|
|
||||||
|
@ -216,19 +213,7 @@ namespace v2rayN.Handler
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index >= 0)
|
|
||||||
{
|
|
||||||
//修改
|
|
||||||
config.vmess[index] = vmessItem;
|
|
||||||
if (config.index.Equals(index))
|
|
||||||
{
|
|
||||||
Global.reloadV2ray = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
AddServerCommon(ref config, vmessItem);
|
AddServerCommon(ref config, vmessItem);
|
||||||
}
|
|
||||||
|
|
||||||
if (toFile)
|
if (toFile)
|
||||||
{
|
{
|
||||||
|
@ -241,24 +226,18 @@ namespace v2rayN.Handler
|
||||||
/// 移除服务器
|
/// 移除服务器
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="config"></param>
|
/// <param name="config"></param>
|
||||||
/// <param name="index"></param>
|
/// <param name="indexs"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int RemoveServer(ref Config config, List<int> indexs)
|
public static int RemoveServer(Config config, List<VmessItem> indexs)
|
||||||
{
|
{
|
||||||
var indexId = config.indexId();
|
foreach (var item in indexs)
|
||||||
|
|
||||||
for (int k = indexs.Count - 1; k >= 0; k--)
|
|
||||||
{
|
{
|
||||||
var index = indexs[k];
|
var index = config.FindIndexId(item.indexId);
|
||||||
if (index < 0 || index > config.vmess.Count - 1)
|
if (index >= 0)
|
||||||
{
|
{
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
config.vmess.RemoveAt(index);
|
config.vmess.RemoveAt(index);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
SetIndex(ref config, indexId);
|
|
||||||
|
|
||||||
ToJsonFile(config);
|
ToJsonFile(config);
|
||||||
|
|
||||||
|
@ -271,34 +250,33 @@ namespace v2rayN.Handler
|
||||||
/// <param name="config"></param>
|
/// <param name="config"></param>
|
||||||
/// <param name="index"></param>
|
/// <param name="index"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int CopyServer(ref Config config, int index)
|
public static int CopyServer(ref Config config, VmessItem item)
|
||||||
{
|
{
|
||||||
if (index < 0 || index > config.vmess.Count - 1)
|
if (item == null)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
VmessItem vmessItem = new VmessItem
|
VmessItem vmessItem = new VmessItem
|
||||||
{
|
{
|
||||||
configVersion = config.vmess[index].configVersion,
|
configVersion = item.configVersion,
|
||||||
address = config.vmess[index].address,
|
address = item.address,
|
||||||
port = config.vmess[index].port,
|
port = item.port,
|
||||||
id = config.vmess[index].id,
|
id = item.id,
|
||||||
alterId = config.vmess[index].alterId,
|
alterId = item.alterId,
|
||||||
security = config.vmess[index].security,
|
security = item.security,
|
||||||
network = config.vmess[index].network,
|
network = item.network,
|
||||||
remarks = string.Format("{0}-clone", config.vmess[index].remarks),
|
remarks = string.Format("{0}-clone", item.remarks),
|
||||||
headerType = config.vmess[index].headerType,
|
headerType = item.headerType,
|
||||||
requestHost = config.vmess[index].requestHost,
|
requestHost = item.requestHost,
|
||||||
path = config.vmess[index].path,
|
path = item.path,
|
||||||
streamSecurity = config.vmess[index].streamSecurity,
|
streamSecurity = item.streamSecurity,
|
||||||
allowInsecure = config.vmess[index].allowInsecure,
|
allowInsecure = item.allowInsecure,
|
||||||
configType = config.vmess[index].configType,
|
configType = item.configType,
|
||||||
flow = config.vmess[index].flow,
|
flow = item.flow,
|
||||||
sni = config.vmess[index].sni
|
sni = item.sni
|
||||||
};
|
};
|
||||||
|
|
||||||
//config.vmess.Insert(index + 1, vmessItem); // 插入到下一项
|
|
||||||
AddServerCommon(ref config, vmessItem);
|
AddServerCommon(ref config, vmessItem);
|
||||||
|
|
||||||
ToJsonFile(config);
|
ToJsonFile(config);
|
||||||
|
@ -310,21 +288,16 @@ namespace v2rayN.Handler
|
||||||
/// 设置活动服务器
|
/// 设置活动服务器
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="config"></param>
|
/// <param name="config"></param>
|
||||||
/// <param name="index"></param>
|
/// <param name="item"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int SetDefaultServer(ref Config config, int index)
|
public static int SetDefaultServer(ref Config config, VmessItem item)
|
||||||
{
|
{
|
||||||
if (index < 0 || index > config.vmess.Count - 1)
|
if (item == null)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
////和现在相同
|
config.indexId = item.indexId;
|
||||||
//if (config.index.Equals(index))
|
|
||||||
//{
|
|
||||||
// return -1;
|
|
||||||
//}
|
|
||||||
config.index = index;
|
|
||||||
Global.reloadV2ray = true;
|
Global.reloadV2ray = true;
|
||||||
|
|
||||||
ToJsonFile(config);
|
ToJsonFile(config);
|
||||||
|
@ -332,6 +305,42 @@ namespace v2rayN.Handler
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int SetDefaultServer(Config config, List<VmessItem> lstVmess)
|
||||||
|
{
|
||||||
|
if (lstVmess.Exists(t => t.indexId == config.indexId))
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (config.vmess.Exists(t => t.indexId == config.indexId))
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (lstVmess.Count > 0)
|
||||||
|
{
|
||||||
|
return SetDefaultServer(ref config, lstVmess[0]);
|
||||||
|
}
|
||||||
|
if (config.vmess.Count > 0)
|
||||||
|
{
|
||||||
|
return SetDefaultServer(ref config, config.vmess[0]);
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
public static VmessItem GetDefaultServer(ref Config config)
|
||||||
|
{
|
||||||
|
if (config.vmess.Count <= 0)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
var index = config.FindIndexId(config.indexId);
|
||||||
|
if (index < 0)
|
||||||
|
{
|
||||||
|
SetDefaultServer(ref config, config.vmess[0]);
|
||||||
|
return config.vmess[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
return config.vmess[index];
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 保参数
|
/// 保参数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -359,16 +368,23 @@ namespace v2rayN.Handler
|
||||||
/// 移动服务器
|
/// 移动服务器
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="config"></param>
|
/// <param name="config"></param>
|
||||||
|
/// <param name="lstVmess"></param>
|
||||||
/// <param name="index"></param>
|
/// <param name="index"></param>
|
||||||
/// <param name="eMove"></param>
|
/// <param name="eMove"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int MoveServer(ref Config config, int index, EMove eMove)
|
public static int MoveServer(ref Config config, ref List<VmessItem> lstVmess, int index, EMove eMove)
|
||||||
{
|
{
|
||||||
int count = config.vmess.Count;
|
int count = lstVmess.Count;
|
||||||
if (index < 0 || index > config.vmess.Count - 1)
|
if (index < 0 || index > lstVmess.Count - 1)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < lstVmess.Count; i++)
|
||||||
|
{
|
||||||
|
lstVmess[i].sort = (i + 1) * 10;
|
||||||
|
}
|
||||||
|
|
||||||
switch (eMove)
|
switch (eMove)
|
||||||
{
|
{
|
||||||
case EMove.Top:
|
case EMove.Top:
|
||||||
|
@ -377,21 +393,8 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
VmessItem vmess = Utils.DeepCopy(config.vmess[index]);
|
lstVmess[index].sort = lstVmess[0].sort - 1;
|
||||||
config.vmess.RemoveAt(index);
|
|
||||||
config.vmess.Insert(0, vmess);
|
|
||||||
if (index < config.index)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
else if (config.index == index)
|
|
||||||
{
|
|
||||||
config.index = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
config.index++;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMove.Up:
|
case EMove.Up:
|
||||||
|
@ -400,17 +403,8 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
VmessItem vmess = Utils.DeepCopy(config.vmess[index]);
|
lstVmess[index].sort = lstVmess[index - 1].sort - 1;
|
||||||
config.vmess.RemoveAt(index);
|
|
||||||
config.vmess.Insert(index - 1, vmess);
|
|
||||||
if (index == config.index + 1)
|
|
||||||
{
|
|
||||||
config.index++;
|
|
||||||
}
|
|
||||||
else if (config.index == index)
|
|
||||||
{
|
|
||||||
config.index--;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -420,17 +414,8 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
VmessItem vmess = Utils.DeepCopy(config.vmess[index]);
|
lstVmess[index].sort = lstVmess[index + 1].sort + 1;
|
||||||
config.vmess.RemoveAt(index);
|
|
||||||
config.vmess.Insert(index + 1, vmess);
|
|
||||||
if (index == config.index - 1)
|
|
||||||
{
|
|
||||||
config.index--;
|
|
||||||
}
|
|
||||||
else if (config.index == index)
|
|
||||||
{
|
|
||||||
config.index++;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMove.Bottom:
|
case EMove.Bottom:
|
||||||
|
@ -439,26 +424,11 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
VmessItem vmess = Utils.DeepCopy(config.vmess[index]);
|
lstVmess[index].sort = lstVmess[lstVmess.Count - 1].sort + 1;
|
||||||
config.vmess.RemoveAt(index);
|
|
||||||
config.vmess.Add(vmess);
|
|
||||||
if (index < config.index)
|
|
||||||
{
|
|
||||||
config.index--;
|
|
||||||
}
|
|
||||||
else if (config.index == index)
|
|
||||||
{
|
|
||||||
config.index = count - 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Global.reloadV2ray = true;
|
|
||||||
|
|
||||||
ToJsonFile(config);
|
ToJsonFile(config);
|
||||||
|
|
||||||
|
@ -471,7 +441,7 @@ namespace v2rayN.Handler
|
||||||
/// <param name="config"></param>
|
/// <param name="config"></param>
|
||||||
/// <param name="fileName"></param>
|
/// <param name="fileName"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int AddCustomServer(ref Config config, string fileName)
|
public static int AddCustomServer(ref Config config, string fileName, string groupId)
|
||||||
{
|
{
|
||||||
string newFileName = string.Format("{0}.json", Utils.GetGUID());
|
string newFileName = string.Format("{0}.json", Utils.GetGUID());
|
||||||
//newFileName = Path.Combine(Utils.GetTempPath(), newFileName);
|
//newFileName = Path.Combine(Utils.GetTempPath(), newFileName);
|
||||||
|
@ -487,17 +457,13 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
VmessItem vmessItem = new VmessItem
|
VmessItem vmessItem = new VmessItem
|
||||||
{
|
{
|
||||||
|
groupId = groupId,
|
||||||
address = newFileName,
|
address = newFileName,
|
||||||
configType = (int)EConfigType.Custom,
|
configType = (int)EConfigType.Custom,
|
||||||
remarks = string.Format("import custom@{0}", DateTime.Now.ToShortDateString())
|
remarks = string.Format("import custom@{0}", DateTime.Now.ToShortDateString())
|
||||||
};
|
};
|
||||||
|
|
||||||
config.vmess.Add(vmessItem);
|
AddServerCommon(ref config, vmessItem);
|
||||||
if (config.vmess.Count == 1)
|
|
||||||
{
|
|
||||||
config.index = 0;
|
|
||||||
Global.reloadV2ray = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
ToJsonFile(config);
|
ToJsonFile(config);
|
||||||
|
|
||||||
|
@ -509,17 +475,9 @@ namespace v2rayN.Handler
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="config"></param>
|
/// <param name="config"></param>
|
||||||
/// <param name="vmessItem"></param>
|
/// <param name="vmessItem"></param>
|
||||||
/// <param name="index"></param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int EditCustomServer(ref Config config, VmessItem vmessItem, int index)
|
public static int EditCustomServer(ref Config config, VmessItem vmessItem)
|
||||||
{
|
{
|
||||||
//修改
|
|
||||||
config.vmess[index] = vmessItem;
|
|
||||||
if (config.index.Equals(index))
|
|
||||||
{
|
|
||||||
Global.reloadV2ray = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
ToJsonFile(config);
|
ToJsonFile(config);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -530,9 +488,8 @@ namespace v2rayN.Handler
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="config"></param>
|
/// <param name="config"></param>
|
||||||
/// <param name="vmessItem"></param>
|
/// <param name="vmessItem"></param>
|
||||||
/// <param name="index"></param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int AddShadowsocksServer(ref Config config, VmessItem vmessItem, int index, bool toFile = true)
|
public static int AddShadowsocksServer(ref Config config, VmessItem vmessItem, bool toFile = true)
|
||||||
{
|
{
|
||||||
vmessItem.configType = (int)EConfigType.Shadowsocks;
|
vmessItem.configType = (int)EConfigType.Shadowsocks;
|
||||||
|
|
||||||
|
@ -545,19 +502,7 @@ namespace v2rayN.Handler
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index >= 0)
|
|
||||||
{
|
|
||||||
//修改
|
|
||||||
config.vmess[index] = vmessItem;
|
|
||||||
if (config.index.Equals(index))
|
|
||||||
{
|
|
||||||
Global.reloadV2ray = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
AddServerCommon(ref config, vmessItem);
|
AddServerCommon(ref config, vmessItem);
|
||||||
}
|
|
||||||
|
|
||||||
if (toFile)
|
if (toFile)
|
||||||
{
|
{
|
||||||
|
@ -572,27 +517,14 @@ namespace v2rayN.Handler
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="config"></param>
|
/// <param name="config"></param>
|
||||||
/// <param name="vmessItem"></param>
|
/// <param name="vmessItem"></param>
|
||||||
/// <param name="index"></param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int AddSocksServer(ref Config config, VmessItem vmessItem, int index, bool toFile = true)
|
public static int AddSocksServer(ref Config config, VmessItem vmessItem, bool toFile = true)
|
||||||
{
|
{
|
||||||
vmessItem.configType = (int)EConfigType.Socks;
|
vmessItem.configType = (int)EConfigType.Socks;
|
||||||
|
|
||||||
vmessItem.address = vmessItem.address.TrimEx();
|
vmessItem.address = vmessItem.address.TrimEx();
|
||||||
|
|
||||||
if (index >= 0)
|
|
||||||
{
|
|
||||||
//修改
|
|
||||||
config.vmess[index] = vmessItem;
|
|
||||||
if (config.index.Equals(index))
|
|
||||||
{
|
|
||||||
Global.reloadV2ray = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
AddServerCommon(ref config, vmessItem);
|
AddServerCommon(ref config, vmessItem);
|
||||||
}
|
|
||||||
|
|
||||||
if (toFile)
|
if (toFile)
|
||||||
{
|
{
|
||||||
|
@ -608,9 +540,8 @@ namespace v2rayN.Handler
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="config"></param>
|
/// <param name="config"></param>
|
||||||
/// <param name="vmessItem"></param>
|
/// <param name="vmessItem"></param>
|
||||||
/// <param name="index"></param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int AddTrojanServer(ref Config config, VmessItem vmessItem, int index, bool toFile = true)
|
public static int AddTrojanServer(ref Config config, VmessItem vmessItem, bool toFile = true)
|
||||||
{
|
{
|
||||||
vmessItem.configType = (int)EConfigType.Trojan;
|
vmessItem.configType = (int)EConfigType.Trojan;
|
||||||
|
|
||||||
|
@ -625,19 +556,7 @@ namespace v2rayN.Handler
|
||||||
vmessItem.allowInsecure = config.defAllowInsecure.ToString();
|
vmessItem.allowInsecure = config.defAllowInsecure.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index >= 0)
|
|
||||||
{
|
|
||||||
//修改
|
|
||||||
config.vmess[index] = vmessItem;
|
|
||||||
if (config.index.Equals(index))
|
|
||||||
{
|
|
||||||
Global.reloadV2ray = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
AddServerCommon(ref config, vmessItem);
|
AddServerCommon(ref config, vmessItem);
|
||||||
}
|
|
||||||
|
|
||||||
if (toFile)
|
if (toFile)
|
||||||
{
|
{
|
||||||
|
@ -719,14 +638,13 @@ namespace v2rayN.Handler
|
||||||
/// <param name="clipboardData"></param>
|
/// <param name="clipboardData"></param>
|
||||||
/// <param name="subid"></param>
|
/// <param name="subid"></param>
|
||||||
/// <returns>成功导入的数量</returns>
|
/// <returns>成功导入的数量</returns>
|
||||||
public static int AddBatchServers(ref Config config, string clipboardData, string subid = "")
|
public static int AddBatchServers(ref Config config, string clipboardData, string subid, string groupId)
|
||||||
{
|
{
|
||||||
if (Utils.IsNullOrEmpty(clipboardData))
|
if (Utils.IsNullOrEmpty(clipboardData))
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
var indexId = config.indexId();
|
|
||||||
//copy sub items
|
//copy sub items
|
||||||
List<VmessItem> lstOriSub = null;
|
List<VmessItem> lstOriSub = null;
|
||||||
if (!Utils.IsNullOrEmpty(subid))
|
if (!Utils.IsNullOrEmpty(subid))
|
||||||
|
@ -770,45 +688,46 @@ namespace v2rayN.Handler
|
||||||
vmessItem.subid = subid;
|
vmessItem.subid = subid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//groupId
|
||||||
|
vmessItem.groupId = groupId;
|
||||||
|
|
||||||
if (vmessItem.configType == (int)EConfigType.Vmess)
|
if (vmessItem.configType == (int)EConfigType.Vmess)
|
||||||
{
|
{
|
||||||
if (AddServer(ref config, vmessItem, -1, false) == 0)
|
if (AddServer(ref config, vmessItem, false) == 0)
|
||||||
{
|
{
|
||||||
countServers++;
|
countServers++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (vmessItem.configType == (int)EConfigType.Shadowsocks)
|
else if (vmessItem.configType == (int)EConfigType.Shadowsocks)
|
||||||
{
|
{
|
||||||
if (AddShadowsocksServer(ref config, vmessItem, -1, false) == 0)
|
if (AddShadowsocksServer(ref config, vmessItem, false) == 0)
|
||||||
{
|
{
|
||||||
countServers++;
|
countServers++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (vmessItem.configType == (int)EConfigType.Socks)
|
else if (vmessItem.configType == (int)EConfigType.Socks)
|
||||||
{
|
{
|
||||||
if (AddSocksServer(ref config, vmessItem, -1, false) == 0)
|
if (AddSocksServer(ref config, vmessItem, false) == 0)
|
||||||
{
|
{
|
||||||
countServers++;
|
countServers++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (vmessItem.configType == (int)EConfigType.Trojan)
|
else if (vmessItem.configType == (int)EConfigType.Trojan)
|
||||||
{
|
{
|
||||||
if (AddTrojanServer(ref config, vmessItem, -1, false) == 0)
|
if (AddTrojanServer(ref config, vmessItem, false) == 0)
|
||||||
{
|
{
|
||||||
countServers++;
|
countServers++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (vmessItem.configType == (int)EConfigType.VLESS)
|
else if (vmessItem.configType == (int)EConfigType.VLESS)
|
||||||
{
|
{
|
||||||
if (AddVlessServer(ref config, vmessItem, -1, false) == 0)
|
if (AddVlessServer(ref config, vmessItem, false) == 0)
|
||||||
{
|
{
|
||||||
countServers++;
|
countServers++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SetIndex(ref config, indexId);
|
|
||||||
|
|
||||||
ToJsonFile(config);
|
ToJsonFile(config);
|
||||||
return countServers;
|
return countServers;
|
||||||
}
|
}
|
||||||
|
@ -850,11 +769,11 @@ namespace v2rayN.Handler
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (SubItem sub in config.subItem)
|
foreach (SubItem item in config.subItem)
|
||||||
{
|
{
|
||||||
if (Utils.IsNullOrEmpty(sub.id))
|
if (Utils.IsNullOrEmpty(item.id))
|
||||||
{
|
{
|
||||||
sub.id = Utils.GetGUID(false);
|
item.id = Utils.GetGUID(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -870,7 +789,6 @@ namespace v2rayN.Handler
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int RemoveServerViaSubid(ref Config config, string subid)
|
public static int RemoveServerViaSubid(ref Config config, string subid)
|
||||||
{
|
{
|
||||||
var indexId = config.indexId();
|
|
||||||
if (Utils.IsNullOrEmpty(subid) || config.vmess.Count <= 0)
|
if (Utils.IsNullOrEmpty(subid) || config.vmess.Count <= 0)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -883,15 +801,13 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SetIndex(ref config, indexId);
|
|
||||||
|
|
||||||
ToJsonFile(config);
|
ToJsonFile(config);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int SortServers(ref Config config, EServerColName name, bool asc)
|
public static int SortServers(ref Config config, ref List<VmessItem> lstVmess, EServerColName name, bool asc)
|
||||||
{
|
{
|
||||||
if (config.vmess.Count <= 0)
|
if (lstVmess.Count <= 0)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -915,19 +831,20 @@ namespace v2rayN.Handler
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
var indexId = config.indexId();
|
var items = lstVmess.AsQueryable();
|
||||||
var items = config.vmess.AsQueryable();
|
|
||||||
|
|
||||||
if (asc)
|
if (asc)
|
||||||
{
|
{
|
||||||
config.vmess = items.OrderBy(propertyName).ToList();
|
lstVmess = items.OrderBy(propertyName).ToList();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
config.vmess = items.OrderByDescending(propertyName).ToList();
|
lstVmess = items.OrderByDescending(propertyName).ToList();
|
||||||
|
}
|
||||||
|
for (int i = 0; i < lstVmess.Count; i++)
|
||||||
|
{
|
||||||
|
lstVmess[i].sort = (i + 1) * 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetIndex(ref config, indexId);
|
|
||||||
|
|
||||||
ToJsonFile(config);
|
ToJsonFile(config);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -938,9 +855,8 @@ namespace v2rayN.Handler
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="config"></param>
|
/// <param name="config"></param>
|
||||||
/// <param name="vmessItem"></param>
|
/// <param name="vmessItem"></param>
|
||||||
/// <param name="index"></param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int AddVlessServer(ref Config config, VmessItem vmessItem, int index, bool toFile = true)
|
public static int AddVlessServer(ref Config config, VmessItem vmessItem, bool toFile = true)
|
||||||
{
|
{
|
||||||
vmessItem.configType = (int)EConfigType.VLESS;
|
vmessItem.configType = (int)EConfigType.VLESS;
|
||||||
|
|
||||||
|
@ -953,19 +869,7 @@ namespace v2rayN.Handler
|
||||||
vmessItem.path = vmessItem.path.TrimEx();
|
vmessItem.path = vmessItem.path.TrimEx();
|
||||||
vmessItem.streamSecurity = vmessItem.streamSecurity.TrimEx();
|
vmessItem.streamSecurity = vmessItem.streamSecurity.TrimEx();
|
||||||
|
|
||||||
if (index >= 0)
|
|
||||||
{
|
|
||||||
//修改
|
|
||||||
config.vmess[index] = vmessItem;
|
|
||||||
if (config.index.Equals(index))
|
|
||||||
{
|
|
||||||
Global.reloadV2ray = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
AddServerCommon(ref config, vmessItem);
|
AddServerCommon(ref config, vmessItem);
|
||||||
}
|
|
||||||
|
|
||||||
if (toFile)
|
if (toFile)
|
||||||
{
|
{
|
||||||
|
@ -975,11 +879,9 @@ namespace v2rayN.Handler
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int DedupServerList(ref Config config)
|
public static int DedupServerList(ref Config config, ref List<VmessItem> lstVmess)
|
||||||
{
|
{
|
||||||
var indexId = config.indexId();
|
List<VmessItem> source = lstVmess;
|
||||||
|
|
||||||
List<VmessItem> source = config.vmess;
|
|
||||||
bool keepOlder = config.keepOlderDedupl;
|
bool keepOlder = config.keepOlderDedupl;
|
||||||
|
|
||||||
List<VmessItem> list = new List<VmessItem>();
|
List<VmessItem> list = new List<VmessItem>();
|
||||||
|
@ -991,21 +893,23 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
list.Add(item);
|
list.Add(item);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var index = config.FindIndexId(item.indexId);
|
||||||
|
if (index >= 0)
|
||||||
|
{
|
||||||
|
config.vmess.RemoveAt(index);
|
||||||
}
|
}
|
||||||
if (!keepOlder) list.Reverse();
|
}
|
||||||
config.vmess = list;
|
}
|
||||||
|
//if (!keepOlder) list.Reverse();
|
||||||
SetIndex(ref config, indexId);
|
//config.vmess = list;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int AddServerCommon(ref Config config, VmessItem vmessItem)
|
public static int AddServerCommon(ref Config config, VmessItem vmessItem)
|
||||||
{
|
{
|
||||||
if (Utils.IsNullOrEmpty(vmessItem.indexId))
|
|
||||||
{
|
|
||||||
vmessItem.indexId = Utils.GetGUID(false);
|
|
||||||
}
|
|
||||||
vmessItem.configVersion = 2;
|
vmessItem.configVersion = 2;
|
||||||
if (Utils.IsNullOrEmpty(vmessItem.allowInsecure))
|
if (Utils.IsNullOrEmpty(vmessItem.allowInsecure))
|
||||||
{
|
{
|
||||||
|
@ -1016,39 +920,23 @@ namespace v2rayN.Handler
|
||||||
vmessItem.network = Global.DefaultNetwork;
|
vmessItem.network = Global.DefaultNetwork;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Utils.IsNullOrEmpty(vmessItem.indexId))
|
||||||
|
{
|
||||||
|
vmessItem.indexId = Utils.GetGUID(false);
|
||||||
|
}
|
||||||
|
if (!config.vmess.Exists(it => it.indexId == vmessItem.indexId))
|
||||||
|
{
|
||||||
|
var maxSort = config.vmess.Max(t => t.sort);
|
||||||
|
vmessItem.sort = maxSort++;
|
||||||
|
|
||||||
config.vmess.Add(vmessItem);
|
config.vmess.Add(vmessItem);
|
||||||
if (config.vmess.Count == 1)
|
|
||||||
{
|
|
||||||
config.index = 0;
|
|
||||||
Global.reloadV2ray = true;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int SetIndex(ref Config config, string indexId)
|
//if (config.vmess.Count == 1)
|
||||||
{
|
//{
|
||||||
var index_ = config.FindIndexId(indexId);
|
// config.indexId = config.vmess[0].indexId;
|
||||||
|
// Global.reloadV2ray = true;
|
||||||
if (config.index == index_)
|
//}
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else if (index_ >= 0)
|
|
||||||
{
|
|
||||||
config.index = index_;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (config.vmess.Count > 0)
|
|
||||||
{
|
|
||||||
config.index = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
config.index = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Global.reloadV2ray = true;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1075,6 +963,55 @@ namespace v2rayN.Handler
|
||||||
&& (remarks ? o.remarks == n.remarks : true);
|
&& (remarks ? o.remarks == n.remarks : true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// save Group
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="config"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static int SaveGroupItem(ref Config config)
|
||||||
|
{
|
||||||
|
if (config.groupItem == null || config.groupItem.Count <= 0)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (GroupItem item in config.groupItem)
|
||||||
|
{
|
||||||
|
if (Utils.IsNullOrEmpty(item.id))
|
||||||
|
{
|
||||||
|
item.id = Utils.GetGUID(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ToJsonFile(config);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int RemoveGroupItem(ref Config config, string groupId)
|
||||||
|
{
|
||||||
|
if (Utils.IsNullOrEmpty(groupId) || config.vmess.Count <= 0)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var item in config.vmess)
|
||||||
|
{
|
||||||
|
if (item.groupId.Equals(groupId))
|
||||||
|
{
|
||||||
|
item.groupId = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach (var item in config.subItem)
|
||||||
|
{
|
||||||
|
if (item.groupId.Equals(groupId))
|
||||||
|
{
|
||||||
|
item.groupId = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ToJsonFile(config);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region UI
|
#region UI
|
||||||
|
@ -1290,14 +1227,14 @@ namespace v2rayN.Handler
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int InitBuiltinRouting(ref Config config)
|
public static int InitBuiltinRouting(ref Config config, bool blImportAdvancedRules = false)
|
||||||
{
|
{
|
||||||
if (config.routings == null)
|
if (config.routings == null)
|
||||||
{
|
{
|
||||||
config.routings = new List<RoutingItem>();
|
config.routings = new List<RoutingItem>();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.routings.Count(it => it.locked != true) <= 0)
|
if (blImportAdvancedRules || config.routings.Count(it => it.locked != true) <= 0)
|
||||||
{
|
{
|
||||||
//Bypass the mainland
|
//Bypass the mainland
|
||||||
var item2 = new RoutingItem()
|
var item2 = new RoutingItem()
|
||||||
|
@ -1326,8 +1263,11 @@ namespace v2rayN.Handler
|
||||||
AddBatchRoutingRules(ref item1, Utils.GetEmbedText(Global.CustomRoutingFileName + "global"));
|
AddBatchRoutingRules(ref item1, Utils.GetEmbedText(Global.CustomRoutingFileName + "global"));
|
||||||
config.routings.Add(item1);
|
config.routings.Add(item1);
|
||||||
|
|
||||||
|
if (!blImportAdvancedRules)
|
||||||
|
{
|
||||||
config.routingIndex = 0;
|
config.routingIndex = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (GetLockedRoutingItem(ref config) == null)
|
if (GetLockedRoutingItem(ref config) == null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -77,15 +77,14 @@ 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 != (int)EConfigType.Vmess
|
||||||
&& config.vmess[index].configType != (int)EConfigType.VLESS)
|
&& item.configType != (int)EConfigType.VLESS)
|
||||||
{
|
{
|
||||||
UI.Show(UIRes.I18N("NonVmessService"));
|
UI.Show(UIRes.I18N("NonVmessService"));
|
||||||
return;
|
return;
|
||||||
|
@ -106,9 +105,9 @@ 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);
|
||||||
}
|
}
|
||||||
|
@ -118,15 +117,14 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 != (int)EConfigType.Vmess
|
||||||
&& config.vmess[index].configType != (int)EConfigType.VLESS)
|
&& item.configType != (int)EConfigType.VLESS)
|
||||||
{
|
{
|
||||||
UI.Show(UIRes.I18N("NonVmessService"));
|
UI.Show(UIRes.I18N("NonVmessService"));
|
||||||
return;
|
return;
|
||||||
|
@ -147,9 +145,9 @@ 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);
|
||||||
}
|
}
|
||||||
|
@ -159,12 +157,12 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int AddBatchServers(Config config, string clipboardData, string subid = "")
|
public int AddBatchServers(Config config, string clipboardData, string subid, string groupId)
|
||||||
{
|
{
|
||||||
int counter;
|
int counter;
|
||||||
int _Add()
|
int _Add()
|
||||||
{
|
{
|
||||||
return ConfigHandler.AddBatchServers(ref config, clipboardData, subid);
|
return ConfigHandler.AddBatchServers(ref config, clipboardData, subid, groupId);
|
||||||
}
|
}
|
||||||
counter = _Add();
|
counter = _Add();
|
||||||
if (counter < 1)
|
if (counter < 1)
|
||||||
|
@ -227,12 +225,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) =>
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,16 +20,14 @@ 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 (int)EConfigType.Vmess:
|
||||||
|
|
|
@ -14,14 +14,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, ref V2rayHandler v2rayHandler, List<VmessItem> selecteds, string actionType, Action<string, string> update)
|
||||||
{
|
{
|
||||||
_config = config;
|
_config = config;
|
||||||
_v2rayHandler = v2rayHandler;
|
_v2rayHandler = v2rayHandler;
|
||||||
|
@ -33,11 +33,10 @@ 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
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,9 +92,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 +102,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 +117,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, UIRes.I18N("OperationFailed"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,9 +141,8 @@ 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;
|
_updateFunc(it.indexId, output);
|
||||||
_updateFunc(index, output);
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -203,15 +199,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, UIRes.I18N("OperationFailed"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,15 +210,11 @@ namespace v2rayN.Handler
|
||||||
DownloadHandle downloadHandle2 = new DownloadHandle();
|
DownloadHandle downloadHandle2 = new DownloadHandle();
|
||||||
downloadHandle2.UpdateCompleted += (sender2, args) =>
|
downloadHandle2.UpdateCompleted += (sender2, args) =>
|
||||||
{
|
{
|
||||||
var index = _config.FindIndexId(testIndexId);
|
_updateFunc(testIndexId, args.Msg);
|
||||||
if (index < 0) return;
|
|
||||||
_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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -180,6 +180,7 @@ namespace v2rayN.Handler
|
||||||
string id = config.subItem[k - 1].id.Trim();
|
string id = config.subItem[k - 1].id.Trim();
|
||||||
string url = config.subItem[k - 1].url.Trim();
|
string url = config.subItem[k - 1].url.Trim();
|
||||||
string userAgent = config.subItem[k - 1].userAgent.Trim();
|
string userAgent = config.subItem[k - 1].userAgent.Trim();
|
||||||
|
string groupId = config.subItem[k - 1].groupId.Trim();
|
||||||
string hashCode = $"{k}->";
|
string hashCode = $"{k}->";
|
||||||
if (config.subItem[k - 1].enabled == false)
|
if (config.subItem[k - 1].enabled == false)
|
||||||
{
|
{
|
||||||
|
@ -207,7 +208,7 @@ namespace v2rayN.Handler
|
||||||
//ConfigHandler.RemoveServerViaSubid(ref config, id);
|
//ConfigHandler.RemoveServerViaSubid(ref config, id);
|
||||||
//_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgClearSubscription")}");
|
//_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgClearSubscription")}");
|
||||||
// RefreshServers();
|
// RefreshServers();
|
||||||
int ret = MainFormHandler.Instance.AddBatchServers(config, result, id);
|
int ret = MainFormHandler.Instance.AddBatchServers(config, result, id, groupId);
|
||||||
if (ret > 0)
|
if (ret > 0)
|
||||||
{
|
{
|
||||||
// RefreshServers();
|
// RefreshServers();
|
||||||
|
|
|
@ -4,6 +4,7 @@ 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;
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler
|
||||||
|
@ -21,29 +22,24 @@ 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 = UIRes.I18N("CheckServerSettings");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
msg = UIRes.I18N("InitialConfiguration");
|
msg = UIRes.I18N("InitialConfiguration");
|
||||||
if (config.configType() == (int)EConfigType.Custom)
|
if (node.configType == (int)EConfigType.Custom)
|
||||||
{
|
{
|
||||||
return GenerateClientCustomConfig(config, fileName, out msg);
|
return GenerateClientCustomConfig(node, fileName, out msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
//取得默认配置
|
//取得默认配置
|
||||||
|
@ -62,6 +58,8 @@ namespace v2rayN.Handler
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var config = LazyConfig.Instance.GetConfig();
|
||||||
|
|
||||||
//开始修改配置
|
//开始修改配置
|
||||||
log(config, ref v2rayConfig, blExport);
|
log(config, ref v2rayConfig, blExport);
|
||||||
|
|
||||||
|
@ -72,7 +70,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,7 +80,7 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
Utils.ToJsonFile(v2rayConfig, fileName, false);
|
Utils.ToJsonFile(v2rayConfig, fileName, false);
|
||||||
|
|
||||||
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), config.getSummary());
|
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), $"[{config.GetGroupRemarks(node.groupId)}] {node.getSummary()}");
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
@ -327,15 +325,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 == (int)EConfigType.Vmess)
|
||||||
{
|
{
|
||||||
VnextItem vnextItem;
|
VnextItem vnextItem;
|
||||||
if (outbound.settings.vnext.Count <= 0)
|
if (outbound.settings.vnext.Count <= 0)
|
||||||
|
@ -348,8 +347,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 +361,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 +379,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 == (int)EConfigType.Shadowsocks)
|
||||||
{
|
{
|
||||||
ServersItem serversItem;
|
ServersItem serversItem;
|
||||||
if (outbound.settings.servers.Count <= 0)
|
if (outbound.settings.servers.Count <= 0)
|
||||||
|
@ -398,12 +397,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 (config.GetShadowsocksSecuritys().Contains(node.security))
|
||||||
{
|
{
|
||||||
serversItem.method = config.security();
|
serversItem.method = node.security;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -421,7 +420,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 == (int)EConfigType.Socks)
|
||||||
{
|
{
|
||||||
ServersItem serversItem;
|
ServersItem serversItem;
|
||||||
if (outbound.settings.servers.Count <= 0)
|
if (outbound.settings.servers.Count <= 0)
|
||||||
|
@ -434,18 +433,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 +457,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 == (int)EConfigType.VLESS)
|
||||||
{
|
{
|
||||||
VnextItem vnextItem;
|
VnextItem vnextItem;
|
||||||
if (outbound.settings.vnext.Count <= 0)
|
if (outbound.settings.vnext.Count <= 0)
|
||||||
|
@ -471,8 +470,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 +484,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 +495,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 +516,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 == (int)EConfigType.Trojan)
|
||||||
{
|
{
|
||||||
ServersItem serversItem;
|
ServersItem serversItem;
|
||||||
if (outbound.settings.servers.Count <= 0)
|
if (outbound.settings.servers.Count <= 0)
|
||||||
|
@ -530,24 +529,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 +559,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 +574,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 +610,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 +631,7 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
|
|
||||||
//streamSettings
|
//streamSettings
|
||||||
switch (config.network())
|
switch (node.getNetwork())
|
||||||
{
|
{
|
||||||
//kcp基本配置暂时是默认值,用户能自己设置伪装类型
|
//kcp基本配置暂时是默认值,用户能自己设置伪装类型
|
||||||
case "kcp":
|
case "kcp":
|
||||||
|
@ -661,11 +661,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 +675,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 +705,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 +718,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 +733,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 +767,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 +837,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,20 +889,16 @@ 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 = UIRes.I18N("CheckServerSettings");
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -913,7 +909,7 @@ 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.GetTempPath(), addressFileName);
|
||||||
|
@ -925,7 +921,7 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
File.Copy(addressFileName, fileName);
|
File.Copy(addressFileName, fileName);
|
||||||
|
|
||||||
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), config.getSummary());
|
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), $"[{LazyConfig.Instance.GetConfig().GetGroupRemarks(node.groupId)}] {node.getSummary()}");
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
@ -942,20 +938,16 @@ 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 = UIRes.I18N("CheckServerSettings");
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -979,18 +971,20 @@ namespace v2rayN.Handler
|
||||||
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(UIRes.I18N("SuccessfulConfiguration"), node.getSummary());
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
@ -1003,10 +997,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 +1016,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 == (int)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 == (int)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 +1048,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)
|
||||||
|
@ -1368,25 +1362,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,11 +1392,7 @@ 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 = UIRes.I18N("CheckServerSettings");
|
||||||
return "";
|
return "";
|
||||||
|
@ -1470,7 +1460,6 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
configCopy.index = it.selected;
|
|
||||||
it.port = port;
|
it.port = port;
|
||||||
|
|
||||||
Inbounds inbound = new Inbounds
|
Inbounds inbound = new Inbounds
|
||||||
|
@ -1482,9 +1471,9 @@ 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);
|
||||||
|
|
||||||
|
var index = configCopy.FindIndexId(it.indexId);
|
||||||
V2rayConfig v2rayConfigCopy = Utils.FromJson<V2rayConfig>(result);
|
V2rayConfig v2rayConfigCopy = Utils.FromJson<V2rayConfig>(result);
|
||||||
outbound(configCopy, ref v2rayConfigCopy);
|
outbound(configCopy.vmess[index], 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,7 +1486,7 @@ namespace v2rayN.Handler
|
||||||
v2rayConfig.routing.rules.Add(rule);
|
v2rayConfig.routing.rules.Add(rule);
|
||||||
}
|
}
|
||||||
|
|
||||||
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), configCopy.getSummary());
|
//msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), node.getSummary());
|
||||||
return Utils.ToJson(v2rayConfig);
|
return Utils.ToJson(v2rayConfig);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
|
|
@ -56,8 +56,9 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
if (Global.reloadV2ray)
|
if (Global.reloadV2ray)
|
||||||
{
|
{
|
||||||
|
var item = ConfigHandler.GetDefaultServer(ref config);
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
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;
|
||||||
|
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
@ -206,112 +204,14 @@ namespace v2rayN.Mode
|
||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<GroupItem> groupItem
|
||||||
|
{
|
||||||
|
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)
|
||||||
{
|
{
|
||||||
if (protocol == Global.InboundHttp)
|
if (protocol == Global.InboundHttp)
|
||||||
|
@ -336,79 +236,13 @@ 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 List<string> GetShadowsocksSecuritys()
|
||||||
|
@ -421,6 +255,25 @@ namespace v2rayN.Mode
|
||||||
return Global.ssSecuritysInXray;
|
return Global.ssSecuritysInXray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool IsActiveNode(VmessItem item)
|
||||||
|
{
|
||||||
|
if (!Utils.IsNullOrEmpty(item.indexId) && item.indexId == indexId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetGroupRemarks(string groupId)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(groupId))
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
return groupItem.Where(it => it.id == groupId).FirstOrDefault()?.remarks;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -431,7 +284,9 @@ namespace v2rayN.Mode
|
||||||
public VmessItem()
|
public VmessItem()
|
||||||
{
|
{
|
||||||
indexId = string.Empty;
|
indexId = string.Empty;
|
||||||
configVersion = 1;
|
configType = (int)EConfigType.Vmess;
|
||||||
|
configVersion = 2;
|
||||||
|
sort = 0;
|
||||||
address = string.Empty;
|
address = string.Empty;
|
||||||
port = 0;
|
port = 0;
|
||||||
id = string.Empty;
|
id = string.Empty;
|
||||||
|
@ -444,12 +299,13 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region function
|
||||||
public string getSummary()
|
public string getSummary()
|
||||||
{
|
{
|
||||||
string summary = string.Format("[{0}] ", ((EConfigType)configType).ToString());
|
string summary = string.Format("[{0}] ", ((EConfigType)configType).ToString());
|
||||||
|
@ -470,23 +326,33 @@ namespace v2rayN.Mode
|
||||||
switch (configType)
|
switch (configType)
|
||||||
{
|
{
|
||||||
case (int)EConfigType.Vmess:
|
case (int)EConfigType.Vmess:
|
||||||
summary += string.Format("{0}({1}:{2})", remarks, addr, port);
|
|
||||||
break;
|
|
||||||
case (int)EConfigType.Shadowsocks:
|
case (int)EConfigType.Shadowsocks:
|
||||||
summary += string.Format("{0}({1}:{2})", remarks, addr, port);
|
|
||||||
break;
|
|
||||||
case (int)EConfigType.Socks:
|
case (int)EConfigType.Socks:
|
||||||
summary += string.Format("{0}({1}:{2})", remarks, addr, port);
|
|
||||||
break;
|
|
||||||
case (int)EConfigType.VLESS:
|
case (int)EConfigType.VLESS:
|
||||||
summary += string.Format("{0}({1}:{2})", remarks, addr, port);
|
|
||||||
break;
|
|
||||||
case (int)EConfigType.Trojan:
|
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:
|
||||||
summary += string.Format("{0}", remarks);
|
summary += string.Format("{0}", remarks);
|
||||||
break;
|
break;
|
||||||
|
//case (int)EConfigType.Vmess:
|
||||||
|
// summary += string.Format("{0}({1}:{2})", remarks, addr, port);
|
||||||
|
// break;
|
||||||
|
//case (int)EConfigType.Shadowsocks:
|
||||||
|
// summary += string.Format("{0}({1}:{2})", remarks, addr, port);
|
||||||
|
// break;
|
||||||
|
//case (int)EConfigType.Socks:
|
||||||
|
// summary += string.Format("{0}({1}:{2})", remarks, addr, port);
|
||||||
|
// break;
|
||||||
|
//case (int)EConfigType.VLESS:
|
||||||
|
// summary += string.Format("{0}({1}:{2})", remarks, addr, port);
|
||||||
|
// break;
|
||||||
|
//case (int)EConfigType.Trojan:
|
||||||
|
// summary += string.Format("{0}({1}:{2})", remarks, addr, port);
|
||||||
|
// break;
|
||||||
|
//default:
|
||||||
|
// summary += string.Format("{0}", remarks);
|
||||||
|
// break;
|
||||||
}
|
}
|
||||||
return summary;
|
return summary;
|
||||||
}
|
}
|
||||||
|
@ -511,17 +377,40 @@ 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();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
public string indexId
|
public string indexId
|
||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// config type(1=normal,2=custom)
|
||||||
|
/// </summary>
|
||||||
|
public int configType
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 版本(现在=2)
|
/// 版本(现在=2)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -530,6 +419,11 @@ namespace v2rayN.Mode
|
||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int sort
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 远程服务器地址
|
/// 远程服务器地址
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -620,15 +514,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 +551,11 @@ namespace v2rayN.Mode
|
||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string groupId
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
@ -795,6 +685,11 @@ namespace v2rayN.Mode
|
||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
} = string.Empty;
|
} = string.Empty;
|
||||||
|
|
||||||
|
public string groupId
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
@ -853,4 +748,24 @@ 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -1041,5 +1041,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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -445,4 +445,7 @@
|
||||||
<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>
|
||||||
</root>
|
</root>
|
|
@ -445,4 +445,7 @@
|
||||||
<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>
|
||||||
</root>
|
</root>
|
|
@ -18,7 +18,7 @@
|
||||||
"network": "tcp"
|
"network": "tcp"
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
"outbound": [{
|
"outbounds": [{
|
||||||
"protocol": "freedom",
|
"protocol": "freedom",
|
||||||
"settings": {}
|
"settings": {}
|
||||||
}, {
|
}, {
|
||||||
|
|
|
@ -284,6 +284,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)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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" />
|
||||||
|
@ -155,6 +156,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" />
|
||||||
|
@ -364,6 +377,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 +399,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>
|
||||||
|
|
Loading…
Reference in New Issue