From 5883e90bee3ca3c228030025e752854ee391fad7 Mon Sep 17 00:00:00 2001 From: Mlen Date: Thu, 26 Mar 2020 20:15:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BB=A3=E7=90=86=E8=BD=AC?= =?UTF-8?q?=E5=8F=91=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Forms/OptionSettingForm.Designer.cs | 1279 +++---- v2rayN/v2rayN/Forms/OptionSettingForm.cs | 30 +- v2rayN/v2rayN/Forms/OptionSettingForm.resx | 3310 +++++++++++------ .../Forms/OptionSettingForm.zh-Hans.resx | 739 ++-- v2rayN/v2rayN/Handler/V2rayConfigHandler.cs | 122 +- v2rayN/v2rayN/Mode/Config.cs | 16 + v2rayN/v2rayN/Mode/V2rayConfig.cs | 10 + v2rayN/v2rayN/Sample/SampleClientConfig.txt | 210 +- 8 files changed, 3441 insertions(+), 2275 deletions(-) diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs b/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs index 7c009fc6..f4d24f3b 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs @@ -1,4 +1,6 @@ -namespace v2rayN.Forms +using v2rayN.Handler; + +namespace v2rayN.Forms { partial class OptionSettingForm { @@ -28,629 +30,653 @@ /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OptionSettingForm)); - this.btnClose = new System.Windows.Forms.Button(); - this.tabControl1 = new System.Windows.Forms.TabControl(); - this.tabPage1 = new System.Windows.Forms.TabPage(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.label16 = new System.Windows.Forms.Label(); - this.cmblistenerType = new System.Windows.Forms.ComboBox(); - this.chksniffingEnabled2 = new System.Windows.Forms.CheckBox(); - this.chksniffingEnabled = new System.Windows.Forms.CheckBox(); - this.txtremoteDNS = new System.Windows.Forms.TextBox(); - this.label14 = new System.Windows.Forms.Label(); - this.chkmuxEnabled = new System.Windows.Forms.CheckBox(); - this.chkAllowIn2 = new System.Windows.Forms.CheckBox(); - this.chkudpEnabled2 = new System.Windows.Forms.CheckBox(); - this.cmbprotocol2 = new System.Windows.Forms.ComboBox(); - this.label3 = new System.Windows.Forms.Label(); - this.txtlocalPort2 = new System.Windows.Forms.TextBox(); - this.cmbprotocol = new System.Windows.Forms.ComboBox(); - this.label1 = new System.Windows.Forms.Label(); - this.chkudpEnabled = new System.Windows.Forms.CheckBox(); - this.chklogEnabled = new System.Windows.Forms.CheckBox(); - this.cmbloglevel = new System.Windows.Forms.ComboBox(); - this.label5 = new System.Windows.Forms.Label(); - this.txtlocalPort = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.tabPage2 = new System.Windows.Forms.TabPage(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.tabControl2 = new System.Windows.Forms.TabControl(); - this.tabPage3 = new System.Windows.Forms.TabPage(); - this.txtUseragent = new System.Windows.Forms.TextBox(); - this.tabPage4 = new System.Windows.Forms.TabPage(); - this.txtUserdirect = new System.Windows.Forms.TextBox(); - this.tabPage5 = new System.Windows.Forms.TabPage(); - this.txtUserblock = new System.Windows.Forms.TextBox(); - this.tabPage8 = new System.Windows.Forms.TabPage(); - this.cmbroutingMode = new System.Windows.Forms.ComboBox(); - this.panel3 = new System.Windows.Forms.Panel(); - this.linkLabelRoutingDoc = new System.Windows.Forms.LinkLabel(); - this.btnSetDefRountingRule = new System.Windows.Forms.Button(); - this.labRoutingTips = new System.Windows.Forms.Label(); - this.cmbdomainStrategy = new System.Windows.Forms.ComboBox(); - this.tabPage6 = new System.Windows.Forms.TabPage(); - this.chkKcpcongestion = new System.Windows.Forms.CheckBox(); - this.txtKcpwriteBufferSize = new System.Windows.Forms.TextBox(); - this.label10 = new System.Windows.Forms.Label(); - this.txtKcpreadBufferSize = new System.Windows.Forms.TextBox(); - this.label11 = new System.Windows.Forms.Label(); - this.txtKcpdownlinkCapacity = new System.Windows.Forms.TextBox(); - this.label8 = new System.Windows.Forms.Label(); - this.txtKcpuplinkCapacity = new System.Windows.Forms.TextBox(); - this.label9 = new System.Windows.Forms.Label(); - this.txtKcptti = new System.Windows.Forms.TextBox(); - this.label7 = new System.Windows.Forms.Label(); - this.txtKcpmtu = new System.Windows.Forms.TextBox(); - this.label6 = new System.Windows.Forms.Label(); - this.tabPage7 = new System.Windows.Forms.TabPage(); - this.chkKeepOlderDedupl = new System.Windows.Forms.CheckBox(); - this.cbFreshrate = new System.Windows.Forms.ComboBox(); - this.lbFreshrate = new System.Windows.Forms.Label(); - this.chkEnableStatistics = new System.Windows.Forms.CheckBox(); - this.chkAllowLANConn = new System.Windows.Forms.CheckBox(); - this.txturlGFWList = new System.Windows.Forms.TextBox(); - this.label13 = new System.Windows.Forms.Label(); - this.chkAutoRun = new System.Windows.Forms.CheckBox(); - this.tabPage9 = new System.Windows.Forms.TabPage(); - this.txtuserPacRule = new System.Windows.Forms.TextBox(); - this.panel4 = new System.Windows.Forms.Panel(); - this.label4 = new System.Windows.Forms.Label(); - this.panel2 = new System.Windows.Forms.Panel(); - this.btnOK = new System.Windows.Forms.Button(); - this.panel1 = new System.Windows.Forms.Panel(); - this.tabControl1.SuspendLayout(); - this.tabPage1.SuspendLayout(); - this.groupBox1.SuspendLayout(); - this.tabPage2.SuspendLayout(); - this.groupBox2.SuspendLayout(); - this.tabControl2.SuspendLayout(); - this.tabPage3.SuspendLayout(); - this.tabPage4.SuspendLayout(); - this.tabPage5.SuspendLayout(); - this.tabPage8.SuspendLayout(); - this.panel3.SuspendLayout(); - this.tabPage6.SuspendLayout(); - this.tabPage7.SuspendLayout(); - this.tabPage9.SuspendLayout(); - this.panel4.SuspendLayout(); - this.panel2.SuspendLayout(); - this.SuspendLayout(); - // - // btnClose - // - this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel; - resources.ApplyResources(this.btnClose, "btnClose"); - this.btnClose.Name = "btnClose"; - this.btnClose.UseVisualStyleBackColor = true; - this.btnClose.Click += new System.EventHandler(this.btnClose_Click); - // - // tabControl1 - // - this.tabControl1.Controls.Add(this.tabPage1); - this.tabControl1.Controls.Add(this.tabPage2); - this.tabControl1.Controls.Add(this.tabPage6); - this.tabControl1.Controls.Add(this.tabPage7); - this.tabControl1.Controls.Add(this.tabPage9); - resources.ApplyResources(this.tabControl1, "tabControl1"); - this.tabControl1.Name = "tabControl1"; - this.tabControl1.SelectedIndex = 0; - // - // tabPage1 - // - this.tabPage1.Controls.Add(this.groupBox1); - resources.ApplyResources(this.tabPage1, "tabPage1"); - this.tabPage1.Name = "tabPage1"; - this.tabPage1.UseVisualStyleBackColor = true; - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.label16); - this.groupBox1.Controls.Add(this.cmblistenerType); - this.groupBox1.Controls.Add(this.chksniffingEnabled2); - this.groupBox1.Controls.Add(this.chksniffingEnabled); - this.groupBox1.Controls.Add(this.txtremoteDNS); - this.groupBox1.Controls.Add(this.label14); - this.groupBox1.Controls.Add(this.chkmuxEnabled); - this.groupBox1.Controls.Add(this.chkAllowIn2); - this.groupBox1.Controls.Add(this.chkudpEnabled2); - this.groupBox1.Controls.Add(this.cmbprotocol2); - this.groupBox1.Controls.Add(this.label3); - this.groupBox1.Controls.Add(this.txtlocalPort2); - this.groupBox1.Controls.Add(this.cmbprotocol); - this.groupBox1.Controls.Add(this.label1); - this.groupBox1.Controls.Add(this.chkudpEnabled); - this.groupBox1.Controls.Add(this.chklogEnabled); - this.groupBox1.Controls.Add(this.cmbloglevel); - this.groupBox1.Controls.Add(this.label5); - this.groupBox1.Controls.Add(this.txtlocalPort); - this.groupBox1.Controls.Add(this.label2); - resources.ApplyResources(this.groupBox1, "groupBox1"); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.TabStop = false; - // - // label16 - // - resources.ApplyResources(this.label16, "label16"); - this.label16.Name = "label16"; - // - // cmblistenerType - // - this.cmblistenerType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cmblistenerType.FormattingEnabled = true; - this.cmblistenerType.Items.AddRange(new object[] { - resources.GetString("cmblistenerType.Items"), - resources.GetString("cmblistenerType.Items1"), - resources.GetString("cmblistenerType.Items2"), - resources.GetString("cmblistenerType.Items3"), - resources.GetString("cmblistenerType.Items4"), - resources.GetString("cmblistenerType.Items5"), - resources.GetString("cmblistenerType.Items6")}); - resources.ApplyResources(this.cmblistenerType, "cmblistenerType"); - this.cmblistenerType.Name = "cmblistenerType"; - // - // chksniffingEnabled2 - // - resources.ApplyResources(this.chksniffingEnabled2, "chksniffingEnabled2"); - this.chksniffingEnabled2.Name = "chksniffingEnabled2"; - this.chksniffingEnabled2.UseVisualStyleBackColor = true; - // - // chksniffingEnabled - // - resources.ApplyResources(this.chksniffingEnabled, "chksniffingEnabled"); - this.chksniffingEnabled.Name = "chksniffingEnabled"; - this.chksniffingEnabled.UseVisualStyleBackColor = true; - // - // txtremoteDNS - // - resources.ApplyResources(this.txtremoteDNS, "txtremoteDNS"); - this.txtremoteDNS.Name = "txtremoteDNS"; - // - // label14 - // - resources.ApplyResources(this.label14, "label14"); - this.label14.Name = "label14"; - // - // chkmuxEnabled - // - resources.ApplyResources(this.chkmuxEnabled, "chkmuxEnabled"); - this.chkmuxEnabled.Name = "chkmuxEnabled"; - this.chkmuxEnabled.UseVisualStyleBackColor = true; - // - // chkAllowIn2 - // - resources.ApplyResources(this.chkAllowIn2, "chkAllowIn2"); - this.chkAllowIn2.Name = "chkAllowIn2"; - this.chkAllowIn2.UseVisualStyleBackColor = true; - this.chkAllowIn2.CheckedChanged += new System.EventHandler(this.chkAllowIn2_CheckedChanged); - // - // chkudpEnabled2 - // - resources.ApplyResources(this.chkudpEnabled2, "chkudpEnabled2"); - this.chkudpEnabled2.Name = "chkudpEnabled2"; - this.chkudpEnabled2.UseVisualStyleBackColor = true; - // - // cmbprotocol2 - // - this.cmbprotocol2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cmbprotocol2.FormattingEnabled = true; - this.cmbprotocol2.Items.AddRange(new object[] { - resources.GetString("cmbprotocol2.Items"), - resources.GetString("cmbprotocol2.Items1")}); - resources.ApplyResources(this.cmbprotocol2, "cmbprotocol2"); - this.cmbprotocol2.Name = "cmbprotocol2"; - // - // label3 - // - resources.ApplyResources(this.label3, "label3"); - this.label3.Name = "label3"; - // - // txtlocalPort2 - // - resources.ApplyResources(this.txtlocalPort2, "txtlocalPort2"); - this.txtlocalPort2.Name = "txtlocalPort2"; - // - // cmbprotocol - // - this.cmbprotocol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - resources.ApplyResources(this.cmbprotocol, "cmbprotocol"); - this.cmbprotocol.FormattingEnabled = true; - this.cmbprotocol.Items.AddRange(new object[] { - resources.GetString("cmbprotocol.Items"), - resources.GetString("cmbprotocol.Items1")}); - this.cmbprotocol.Name = "cmbprotocol"; - // - // label1 - // - resources.ApplyResources(this.label1, "label1"); - this.label1.Name = "label1"; - // - // chkudpEnabled - // - resources.ApplyResources(this.chkudpEnabled, "chkudpEnabled"); - this.chkudpEnabled.Name = "chkudpEnabled"; - this.chkudpEnabled.UseVisualStyleBackColor = true; - // - // chklogEnabled - // - resources.ApplyResources(this.chklogEnabled, "chklogEnabled"); - this.chklogEnabled.Name = "chklogEnabled"; - this.chklogEnabled.UseVisualStyleBackColor = true; - // - // cmbloglevel - // - this.cmbloglevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cmbloglevel.FormattingEnabled = true; - this.cmbloglevel.Items.AddRange(new object[] { - resources.GetString("cmbloglevel.Items"), - resources.GetString("cmbloglevel.Items1"), - resources.GetString("cmbloglevel.Items2"), - resources.GetString("cmbloglevel.Items3"), - resources.GetString("cmbloglevel.Items4")}); - resources.ApplyResources(this.cmbloglevel, "cmbloglevel"); - this.cmbloglevel.Name = "cmbloglevel"; - // - // label5 - // - resources.ApplyResources(this.label5, "label5"); - this.label5.Name = "label5"; - // - // txtlocalPort - // - resources.ApplyResources(this.txtlocalPort, "txtlocalPort"); - this.txtlocalPort.Name = "txtlocalPort"; - // - // label2 - // - resources.ApplyResources(this.label2, "label2"); - this.label2.Name = "label2"; - // - // tabPage2 - // - this.tabPage2.Controls.Add(this.groupBox2); - resources.ApplyResources(this.tabPage2, "tabPage2"); - this.tabPage2.Name = "tabPage2"; - this.tabPage2.UseVisualStyleBackColor = true; - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.tabControl2); - this.groupBox2.Controls.Add(this.panel3); - resources.ApplyResources(this.groupBox2, "groupBox2"); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.TabStop = false; - // - // tabControl2 - // - this.tabControl2.Controls.Add(this.tabPage3); - this.tabControl2.Controls.Add(this.tabPage4); - this.tabControl2.Controls.Add(this.tabPage5); - this.tabControl2.Controls.Add(this.tabPage8); - resources.ApplyResources(this.tabControl2, "tabControl2"); - this.tabControl2.Name = "tabControl2"; - this.tabControl2.SelectedIndex = 0; - // - // tabPage3 - // - this.tabPage3.Controls.Add(this.txtUseragent); - resources.ApplyResources(this.tabPage3, "tabPage3"); - this.tabPage3.Name = "tabPage3"; - this.tabPage3.UseVisualStyleBackColor = true; - // - // txtUseragent - // - resources.ApplyResources(this.txtUseragent, "txtUseragent"); - this.txtUseragent.Name = "txtUseragent"; - // - // tabPage4 - // - this.tabPage4.Controls.Add(this.txtUserdirect); - resources.ApplyResources(this.tabPage4, "tabPage4"); - this.tabPage4.Name = "tabPage4"; - this.tabPage4.UseVisualStyleBackColor = true; - // - // txtUserdirect - // - resources.ApplyResources(this.txtUserdirect, "txtUserdirect"); - this.txtUserdirect.Name = "txtUserdirect"; - // - // tabPage5 - // - this.tabPage5.Controls.Add(this.txtUserblock); - resources.ApplyResources(this.tabPage5, "tabPage5"); - this.tabPage5.Name = "tabPage5"; - this.tabPage5.UseVisualStyleBackColor = true; - // - // txtUserblock - // - resources.ApplyResources(this.txtUserblock, "txtUserblock"); - this.txtUserblock.Name = "txtUserblock"; - // - // tabPage8 - // - this.tabPage8.Controls.Add(this.cmbroutingMode); - resources.ApplyResources(this.tabPage8, "tabPage8"); - this.tabPage8.Name = "tabPage8"; - this.tabPage8.UseVisualStyleBackColor = true; - // - // cmbroutingMode - // - this.cmbroutingMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cmbroutingMode.FormattingEnabled = true; - this.cmbroutingMode.Items.AddRange(new object[] { - resources.GetString("cmbroutingMode.Items"), - resources.GetString("cmbroutingMode.Items1"), - resources.GetString("cmbroutingMode.Items2"), - resources.GetString("cmbroutingMode.Items3")}); - resources.ApplyResources(this.cmbroutingMode, "cmbroutingMode"); - this.cmbroutingMode.Name = "cmbroutingMode"; - // - // panel3 - // - this.panel3.Controls.Add(this.linkLabelRoutingDoc); - this.panel3.Controls.Add(this.btnSetDefRountingRule); - this.panel3.Controls.Add(this.labRoutingTips); - this.panel3.Controls.Add(this.cmbdomainStrategy); - resources.ApplyResources(this.panel3, "panel3"); - this.panel3.Name = "panel3"; - // - // linkLabelRoutingDoc - // - resources.ApplyResources(this.linkLabelRoutingDoc, "linkLabelRoutingDoc"); - this.linkLabelRoutingDoc.Name = "linkLabelRoutingDoc"; - this.linkLabelRoutingDoc.TabStop = true; - this.linkLabelRoutingDoc.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelRoutingDoc_LinkClicked); - // - // btnSetDefRountingRule - // - resources.ApplyResources(this.btnSetDefRountingRule, "btnSetDefRountingRule"); - this.btnSetDefRountingRule.Name = "btnSetDefRountingRule"; - this.btnSetDefRountingRule.UseVisualStyleBackColor = true; - this.btnSetDefRountingRule.Click += new System.EventHandler(this.btnSetDefRountingRule_Click); - // - // labRoutingTips - // - this.labRoutingTips.ForeColor = System.Drawing.Color.Brown; - resources.ApplyResources(this.labRoutingTips, "labRoutingTips"); - this.labRoutingTips.Name = "labRoutingTips"; - // - // cmbdomainStrategy - // - this.cmbdomainStrategy.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cmbdomainStrategy.FormattingEnabled = true; - this.cmbdomainStrategy.Items.AddRange(new object[] { - resources.GetString("cmbdomainStrategy.Items"), - resources.GetString("cmbdomainStrategy.Items1"), - resources.GetString("cmbdomainStrategy.Items2")}); - resources.ApplyResources(this.cmbdomainStrategy, "cmbdomainStrategy"); - this.cmbdomainStrategy.Name = "cmbdomainStrategy"; - // - // tabPage6 - // - this.tabPage6.Controls.Add(this.chkKcpcongestion); - this.tabPage6.Controls.Add(this.txtKcpwriteBufferSize); - this.tabPage6.Controls.Add(this.label10); - this.tabPage6.Controls.Add(this.txtKcpreadBufferSize); - this.tabPage6.Controls.Add(this.label11); - this.tabPage6.Controls.Add(this.txtKcpdownlinkCapacity); - this.tabPage6.Controls.Add(this.label8); - this.tabPage6.Controls.Add(this.txtKcpuplinkCapacity); - this.tabPage6.Controls.Add(this.label9); - this.tabPage6.Controls.Add(this.txtKcptti); - this.tabPage6.Controls.Add(this.label7); - this.tabPage6.Controls.Add(this.txtKcpmtu); - this.tabPage6.Controls.Add(this.label6); - resources.ApplyResources(this.tabPage6, "tabPage6"); - this.tabPage6.Name = "tabPage6"; - this.tabPage6.UseVisualStyleBackColor = true; - // - // chkKcpcongestion - // - resources.ApplyResources(this.chkKcpcongestion, "chkKcpcongestion"); - this.chkKcpcongestion.Name = "chkKcpcongestion"; - this.chkKcpcongestion.UseVisualStyleBackColor = true; - // - // txtKcpwriteBufferSize - // - resources.ApplyResources(this.txtKcpwriteBufferSize, "txtKcpwriteBufferSize"); - this.txtKcpwriteBufferSize.Name = "txtKcpwriteBufferSize"; - // - // label10 - // - resources.ApplyResources(this.label10, "label10"); - this.label10.Name = "label10"; - // - // txtKcpreadBufferSize - // - resources.ApplyResources(this.txtKcpreadBufferSize, "txtKcpreadBufferSize"); - this.txtKcpreadBufferSize.Name = "txtKcpreadBufferSize"; - // - // label11 - // - resources.ApplyResources(this.label11, "label11"); - this.label11.Name = "label11"; - // - // txtKcpdownlinkCapacity - // - resources.ApplyResources(this.txtKcpdownlinkCapacity, "txtKcpdownlinkCapacity"); - this.txtKcpdownlinkCapacity.Name = "txtKcpdownlinkCapacity"; - // - // label8 - // - resources.ApplyResources(this.label8, "label8"); - this.label8.Name = "label8"; - // - // txtKcpuplinkCapacity - // - resources.ApplyResources(this.txtKcpuplinkCapacity, "txtKcpuplinkCapacity"); - this.txtKcpuplinkCapacity.Name = "txtKcpuplinkCapacity"; - // - // label9 - // - resources.ApplyResources(this.label9, "label9"); - this.label9.Name = "label9"; - // - // txtKcptti - // - resources.ApplyResources(this.txtKcptti, "txtKcptti"); - this.txtKcptti.Name = "txtKcptti"; - // - // label7 - // - resources.ApplyResources(this.label7, "label7"); - this.label7.Name = "label7"; - // - // txtKcpmtu - // - resources.ApplyResources(this.txtKcpmtu, "txtKcpmtu"); - this.txtKcpmtu.Name = "txtKcpmtu"; - // - // label6 - // - resources.ApplyResources(this.label6, "label6"); - this.label6.Name = "label6"; - // - // tabPage7 - // - this.tabPage7.Controls.Add(this.chkKeepOlderDedupl); - this.tabPage7.Controls.Add(this.cbFreshrate); - this.tabPage7.Controls.Add(this.lbFreshrate); - this.tabPage7.Controls.Add(this.chkEnableStatistics); - this.tabPage7.Controls.Add(this.chkAllowLANConn); - this.tabPage7.Controls.Add(this.txturlGFWList); - this.tabPage7.Controls.Add(this.label13); - this.tabPage7.Controls.Add(this.chkAutoRun); - resources.ApplyResources(this.tabPage7, "tabPage7"); - this.tabPage7.Name = "tabPage7"; - this.tabPage7.UseVisualStyleBackColor = true; - // - // chkKeepOlderDedupl - // - resources.ApplyResources(this.chkKeepOlderDedupl, "chkKeepOlderDedupl"); - this.chkKeepOlderDedupl.Name = "chkKeepOlderDedupl"; - this.chkKeepOlderDedupl.UseVisualStyleBackColor = true; - // - // cbFreshrate - // - this.cbFreshrate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbFreshrate.FormattingEnabled = true; - resources.ApplyResources(this.cbFreshrate, "cbFreshrate"); - this.cbFreshrate.Name = "cbFreshrate"; - // - // lbFreshrate - // - resources.ApplyResources(this.lbFreshrate, "lbFreshrate"); - this.lbFreshrate.Name = "lbFreshrate"; - // - // chkEnableStatistics - // - resources.ApplyResources(this.chkEnableStatistics, "chkEnableStatistics"); - this.chkEnableStatistics.Name = "chkEnableStatistics"; - this.chkEnableStatistics.UseVisualStyleBackColor = true; - // - // chkAllowLANConn - // - resources.ApplyResources(this.chkAllowLANConn, "chkAllowLANConn"); - this.chkAllowLANConn.Name = "chkAllowLANConn"; - this.chkAllowLANConn.UseVisualStyleBackColor = true; - // - // txturlGFWList - // - resources.ApplyResources(this.txturlGFWList, "txturlGFWList"); - this.txturlGFWList.Name = "txturlGFWList"; - // - // label13 - // - resources.ApplyResources(this.label13, "label13"); - this.label13.Name = "label13"; - // - // chkAutoRun - // - resources.ApplyResources(this.chkAutoRun, "chkAutoRun"); - this.chkAutoRun.Name = "chkAutoRun"; - this.chkAutoRun.UseVisualStyleBackColor = true; - // - // tabPage9 - // - this.tabPage9.Controls.Add(this.txtuserPacRule); - this.tabPage9.Controls.Add(this.panel4); - resources.ApplyResources(this.tabPage9, "tabPage9"); - this.tabPage9.Name = "tabPage9"; - this.tabPage9.UseVisualStyleBackColor = true; - // - // txtuserPacRule - // - resources.ApplyResources(this.txtuserPacRule, "txtuserPacRule"); - this.txtuserPacRule.Name = "txtuserPacRule"; - // - // panel4 - // - this.panel4.Controls.Add(this.label4); - resources.ApplyResources(this.panel4, "panel4"); - this.panel4.Name = "panel4"; - // - // label4 - // - this.label4.ForeColor = System.Drawing.Color.Brown; - resources.ApplyResources(this.label4, "label4"); - this.label4.Name = "label4"; - // - // panel2 - // - this.panel2.Controls.Add(this.btnClose); - this.panel2.Controls.Add(this.btnOK); - resources.ApplyResources(this.panel2, "panel2"); - this.panel2.Name = "panel2"; - // - // btnOK - // - resources.ApplyResources(this.btnOK, "btnOK"); - this.btnOK.Name = "btnOK"; - this.btnOK.UseVisualStyleBackColor = true; - this.btnOK.Click += new System.EventHandler(this.btnOK_Click); - // - // panel1 - // - resources.ApplyResources(this.panel1, "panel1"); - this.panel1.Name = "panel1"; - // - // OptionSettingForm - // - resources.ApplyResources(this, "$this"); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.btnClose; - this.Controls.Add(this.tabControl1); - this.Controls.Add(this.panel2); - this.Controls.Add(this.panel1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; - this.Name = "OptionSettingForm"; - this.Load += new System.EventHandler(this.OptionSettingForm_Load); - this.tabControl1.ResumeLayout(false); - this.tabPage1.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - this.tabPage2.ResumeLayout(false); - this.groupBox2.ResumeLayout(false); - this.tabControl2.ResumeLayout(false); - this.tabPage3.ResumeLayout(false); - this.tabPage3.PerformLayout(); - this.tabPage4.ResumeLayout(false); - this.tabPage4.PerformLayout(); - this.tabPage5.ResumeLayout(false); - this.tabPage5.PerformLayout(); - this.tabPage8.ResumeLayout(false); - this.panel3.ResumeLayout(false); - this.panel3.PerformLayout(); - this.tabPage6.ResumeLayout(false); - this.tabPage6.PerformLayout(); - this.tabPage7.ResumeLayout(false); - this.tabPage7.PerformLayout(); - this.tabPage9.ResumeLayout(false); - this.tabPage9.PerformLayout(); - this.panel4.ResumeLayout(false); - this.panel2.ResumeLayout(false); - this.ResumeLayout(false); - + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OptionSettingForm)); + this.btnClose = new System.Windows.Forms.Button(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.label12 = new System.Windows.Forms.Label(); + this.TransitList = new System.Windows.Forms.ComboBox(); + this.label16 = new System.Windows.Forms.Label(); + this.cmblistenerType = new System.Windows.Forms.ComboBox(); + this.chksniffingEnabled2 = new System.Windows.Forms.CheckBox(); + this.chksniffingEnabled = new System.Windows.Forms.CheckBox(); + this.txtremoteDNS = new System.Windows.Forms.TextBox(); + this.label14 = new System.Windows.Forms.Label(); + this.chkmuxEnabled = new System.Windows.Forms.CheckBox(); + this.chkAllowIn2 = new System.Windows.Forms.CheckBox(); + this.chkudpEnabled2 = new System.Windows.Forms.CheckBox(); + this.cmbprotocol2 = new System.Windows.Forms.ComboBox(); + this.label3 = new System.Windows.Forms.Label(); + this.txtlocalPort2 = new System.Windows.Forms.TextBox(); + this.cmbprotocol = new System.Windows.Forms.ComboBox(); + this.label1 = new System.Windows.Forms.Label(); + this.chkudpEnabled = new System.Windows.Forms.CheckBox(); + this.chklogEnabled = new System.Windows.Forms.CheckBox(); + this.cmbloglevel = new System.Windows.Forms.ComboBox(); + this.label5 = new System.Windows.Forms.Label(); + this.txtlocalPort = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.tabControl2 = new System.Windows.Forms.TabControl(); + this.tabPage3 = new System.Windows.Forms.TabPage(); + this.txtUseragent = new System.Windows.Forms.TextBox(); + this.tabPage4 = new System.Windows.Forms.TabPage(); + this.txtUserdirect = new System.Windows.Forms.TextBox(); + this.tabPage5 = new System.Windows.Forms.TabPage(); + this.txtUserblock = new System.Windows.Forms.TextBox(); + this.tabPage8 = new System.Windows.Forms.TabPage(); + this.cmbroutingMode = new System.Windows.Forms.ComboBox(); + this.panel3 = new System.Windows.Forms.Panel(); + this.linkLabelRoutingDoc = new System.Windows.Forms.LinkLabel(); + this.btnSetDefRountingRule = new System.Windows.Forms.Button(); + this.labRoutingTips = new System.Windows.Forms.Label(); + this.cmbdomainStrategy = new System.Windows.Forms.ComboBox(); + this.tabPage6 = new System.Windows.Forms.TabPage(); + this.chkKcpcongestion = new System.Windows.Forms.CheckBox(); + this.txtKcpwriteBufferSize = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.txtKcpreadBufferSize = new System.Windows.Forms.TextBox(); + this.label11 = new System.Windows.Forms.Label(); + this.txtKcpdownlinkCapacity = new System.Windows.Forms.TextBox(); + this.label8 = new System.Windows.Forms.Label(); + this.txtKcpuplinkCapacity = new System.Windows.Forms.TextBox(); + this.label9 = new System.Windows.Forms.Label(); + this.txtKcptti = new System.Windows.Forms.TextBox(); + this.label7 = new System.Windows.Forms.Label(); + this.txtKcpmtu = new System.Windows.Forms.TextBox(); + this.label6 = new System.Windows.Forms.Label(); + this.tabPage7 = new System.Windows.Forms.TabPage(); + this.chkKeepOlderDedupl = new System.Windows.Forms.CheckBox(); + this.cbFreshrate = new System.Windows.Forms.ComboBox(); + this.lbFreshrate = new System.Windows.Forms.Label(); + this.chkEnableStatistics = new System.Windows.Forms.CheckBox(); + this.chkAllowLANConn = new System.Windows.Forms.CheckBox(); + this.txturlGFWList = new System.Windows.Forms.TextBox(); + this.label13 = new System.Windows.Forms.Label(); + this.chkAutoRun = new System.Windows.Forms.CheckBox(); + this.tabPage9 = new System.Windows.Forms.TabPage(); + this.txtuserPacRule = new System.Windows.Forms.TextBox(); + this.panel4 = new System.Windows.Forms.Panel(); + this.label4 = new System.Windows.Forms.Label(); + this.panel2 = new System.Windows.Forms.Panel(); + this.btnOK = new System.Windows.Forms.Button(); + this.panel1 = new System.Windows.Forms.Panel(); + this.chktransitEnabled = new System.Windows.Forms.CheckBox(); + this.tabControl1.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.tabPage2.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.tabControl2.SuspendLayout(); + this.tabPage3.SuspendLayout(); + this.tabPage4.SuspendLayout(); + this.tabPage5.SuspendLayout(); + this.tabPage8.SuspendLayout(); + this.panel3.SuspendLayout(); + this.tabPage6.SuspendLayout(); + this.tabPage7.SuspendLayout(); + this.tabPage9.SuspendLayout(); + this.panel4.SuspendLayout(); + this.panel2.SuspendLayout(); + this.SuspendLayout(); + // + // btnClose + // + this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel; + resources.ApplyResources(this.btnClose, "btnClose"); + this.btnClose.Name = "btnClose"; + this.btnClose.UseVisualStyleBackColor = true; + this.btnClose.Click += new System.EventHandler(this.btnClose_Click); + // + // tabControl1 + // + this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Controls.Add(this.tabPage2); + this.tabControl1.Controls.Add(this.tabPage6); + this.tabControl1.Controls.Add(this.tabPage7); + this.tabControl1.Controls.Add(this.tabPage9); + resources.ApplyResources(this.tabControl1, "tabControl1"); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.groupBox1); + resources.ApplyResources(this.tabPage1, "tabPage1"); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.chktransitEnabled); + this.groupBox1.Controls.Add(this.label12); + this.groupBox1.Controls.Add(this.TransitList); + this.groupBox1.Controls.Add(this.label16); + this.groupBox1.Controls.Add(this.cmblistenerType); + this.groupBox1.Controls.Add(this.chksniffingEnabled2); + this.groupBox1.Controls.Add(this.chksniffingEnabled); + this.groupBox1.Controls.Add(this.txtremoteDNS); + this.groupBox1.Controls.Add(this.label14); + this.groupBox1.Controls.Add(this.chkmuxEnabled); + this.groupBox1.Controls.Add(this.chkAllowIn2); + this.groupBox1.Controls.Add(this.chkudpEnabled2); + this.groupBox1.Controls.Add(this.cmbprotocol2); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Controls.Add(this.txtlocalPort2); + this.groupBox1.Controls.Add(this.cmbprotocol); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Controls.Add(this.chkudpEnabled); + this.groupBox1.Controls.Add(this.chklogEnabled); + this.groupBox1.Controls.Add(this.cmbloglevel); + this.groupBox1.Controls.Add(this.label5); + this.groupBox1.Controls.Add(this.txtlocalPort); + this.groupBox1.Controls.Add(this.label2); + resources.ApplyResources(this.groupBox1, "groupBox1"); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.TabStop = false; + // + // label12 + // + resources.ApplyResources(this.label12, "label12"); + this.label12.Name = "label12"; + // + // TransitList + // + this.TransitList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.TransitList.FormattingEnabled = true; + resources.ApplyResources(this.TransitList, "TransitList"); + this.TransitList.Name = "TransitList"; + // + // label16 + // + resources.ApplyResources(this.label16, "label16"); + this.label16.Name = "label16"; + // + // cmblistenerType + // + this.cmblistenerType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmblistenerType.FormattingEnabled = true; + this.cmblistenerType.Items.AddRange(new object[] { + resources.GetString("cmblistenerType.Items"), + resources.GetString("cmblistenerType.Items1"), + resources.GetString("cmblistenerType.Items2"), + resources.GetString("cmblistenerType.Items3"), + resources.GetString("cmblistenerType.Items4"), + resources.GetString("cmblistenerType.Items5"), + resources.GetString("cmblistenerType.Items6")}); + resources.ApplyResources(this.cmblistenerType, "cmblistenerType"); + this.cmblistenerType.Name = "cmblistenerType"; + // + // chksniffingEnabled2 + // + resources.ApplyResources(this.chksniffingEnabled2, "chksniffingEnabled2"); + this.chksniffingEnabled2.Name = "chksniffingEnabled2"; + this.chksniffingEnabled2.UseVisualStyleBackColor = true; + // + // chksniffingEnabled + // + resources.ApplyResources(this.chksniffingEnabled, "chksniffingEnabled"); + this.chksniffingEnabled.Name = "chksniffingEnabled"; + this.chksniffingEnabled.UseVisualStyleBackColor = true; + // + // txtremoteDNS + // + resources.ApplyResources(this.txtremoteDNS, "txtremoteDNS"); + this.txtremoteDNS.Name = "txtremoteDNS"; + // + // label14 + // + resources.ApplyResources(this.label14, "label14"); + this.label14.Name = "label14"; + // + // chkmuxEnabled + // + resources.ApplyResources(this.chkmuxEnabled, "chkmuxEnabled"); + this.chkmuxEnabled.Name = "chkmuxEnabled"; + this.chkmuxEnabled.UseVisualStyleBackColor = true; + // + // chkAllowIn2 + // + resources.ApplyResources(this.chkAllowIn2, "chkAllowIn2"); + this.chkAllowIn2.Name = "chkAllowIn2"; + this.chkAllowIn2.UseVisualStyleBackColor = true; + this.chkAllowIn2.CheckedChanged += new System.EventHandler(this.chkAllowIn2_CheckedChanged); + // + // chkudpEnabled2 + // + resources.ApplyResources(this.chkudpEnabled2, "chkudpEnabled2"); + this.chkudpEnabled2.Name = "chkudpEnabled2"; + this.chkudpEnabled2.UseVisualStyleBackColor = true; + // + // cmbprotocol2 + // + this.cmbprotocol2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbprotocol2.FormattingEnabled = true; + this.cmbprotocol2.Items.AddRange(new object[] { + resources.GetString("cmbprotocol2.Items"), + resources.GetString("cmbprotocol2.Items1")}); + resources.ApplyResources(this.cmbprotocol2, "cmbprotocol2"); + this.cmbprotocol2.Name = "cmbprotocol2"; + // + // label3 + // + resources.ApplyResources(this.label3, "label3"); + this.label3.Name = "label3"; + // + // txtlocalPort2 + // + resources.ApplyResources(this.txtlocalPort2, "txtlocalPort2"); + this.txtlocalPort2.Name = "txtlocalPort2"; + // + // cmbprotocol + // + this.cmbprotocol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + resources.ApplyResources(this.cmbprotocol, "cmbprotocol"); + this.cmbprotocol.FormattingEnabled = true; + this.cmbprotocol.Items.AddRange(new object[] { + resources.GetString("cmbprotocol.Items"), + resources.GetString("cmbprotocol.Items1")}); + this.cmbprotocol.Name = "cmbprotocol"; + // + // label1 + // + resources.ApplyResources(this.label1, "label1"); + this.label1.Name = "label1"; + // + // chkudpEnabled + // + resources.ApplyResources(this.chkudpEnabled, "chkudpEnabled"); + this.chkudpEnabled.Name = "chkudpEnabled"; + this.chkudpEnabled.UseVisualStyleBackColor = true; + // + // chklogEnabled + // + resources.ApplyResources(this.chklogEnabled, "chklogEnabled"); + this.chklogEnabled.Name = "chklogEnabled"; + this.chklogEnabled.UseVisualStyleBackColor = true; + // + // cmbloglevel + // + this.cmbloglevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbloglevel.FormattingEnabled = true; + this.cmbloglevel.Items.AddRange(new object[] { + resources.GetString("cmbloglevel.Items"), + resources.GetString("cmbloglevel.Items1"), + resources.GetString("cmbloglevel.Items2"), + resources.GetString("cmbloglevel.Items3"), + resources.GetString("cmbloglevel.Items4")}); + resources.ApplyResources(this.cmbloglevel, "cmbloglevel"); + this.cmbloglevel.Name = "cmbloglevel"; + // + // label5 + // + resources.ApplyResources(this.label5, "label5"); + this.label5.Name = "label5"; + // + // txtlocalPort + // + resources.ApplyResources(this.txtlocalPort, "txtlocalPort"); + this.txtlocalPort.Name = "txtlocalPort"; + // + // label2 + // + resources.ApplyResources(this.label2, "label2"); + this.label2.Name = "label2"; + // + // tabPage2 + // + this.tabPage2.Controls.Add(this.groupBox2); + resources.ApplyResources(this.tabPage2, "tabPage2"); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.tabControl2); + this.groupBox2.Controls.Add(this.panel3); + resources.ApplyResources(this.groupBox2, "groupBox2"); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.TabStop = false; + // + // tabControl2 + // + this.tabControl2.Controls.Add(this.tabPage3); + this.tabControl2.Controls.Add(this.tabPage4); + this.tabControl2.Controls.Add(this.tabPage5); + this.tabControl2.Controls.Add(this.tabPage8); + resources.ApplyResources(this.tabControl2, "tabControl2"); + this.tabControl2.Name = "tabControl2"; + this.tabControl2.SelectedIndex = 0; + // + // tabPage3 + // + this.tabPage3.Controls.Add(this.txtUseragent); + resources.ApplyResources(this.tabPage3, "tabPage3"); + this.tabPage3.Name = "tabPage3"; + this.tabPage3.UseVisualStyleBackColor = true; + // + // txtUseragent + // + resources.ApplyResources(this.txtUseragent, "txtUseragent"); + this.txtUseragent.Name = "txtUseragent"; + // + // tabPage4 + // + this.tabPage4.Controls.Add(this.txtUserdirect); + resources.ApplyResources(this.tabPage4, "tabPage4"); + this.tabPage4.Name = "tabPage4"; + this.tabPage4.UseVisualStyleBackColor = true; + // + // txtUserdirect + // + resources.ApplyResources(this.txtUserdirect, "txtUserdirect"); + this.txtUserdirect.Name = "txtUserdirect"; + // + // tabPage5 + // + this.tabPage5.Controls.Add(this.txtUserblock); + resources.ApplyResources(this.tabPage5, "tabPage5"); + this.tabPage5.Name = "tabPage5"; + this.tabPage5.UseVisualStyleBackColor = true; + // + // txtUserblock + // + resources.ApplyResources(this.txtUserblock, "txtUserblock"); + this.txtUserblock.Name = "txtUserblock"; + // + // tabPage8 + // + this.tabPage8.Controls.Add(this.cmbroutingMode); + resources.ApplyResources(this.tabPage8, "tabPage8"); + this.tabPage8.Name = "tabPage8"; + this.tabPage8.UseVisualStyleBackColor = true; + // + // cmbroutingMode + // + this.cmbroutingMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbroutingMode.FormattingEnabled = true; + this.cmbroutingMode.Items.AddRange(new object[] { + resources.GetString("cmbroutingMode.Items"), + resources.GetString("cmbroutingMode.Items1"), + resources.GetString("cmbroutingMode.Items2"), + resources.GetString("cmbroutingMode.Items3")}); + resources.ApplyResources(this.cmbroutingMode, "cmbroutingMode"); + this.cmbroutingMode.Name = "cmbroutingMode"; + // + // panel3 + // + this.panel3.Controls.Add(this.linkLabelRoutingDoc); + this.panel3.Controls.Add(this.btnSetDefRountingRule); + this.panel3.Controls.Add(this.labRoutingTips); + this.panel3.Controls.Add(this.cmbdomainStrategy); + resources.ApplyResources(this.panel3, "panel3"); + this.panel3.Name = "panel3"; + // + // linkLabelRoutingDoc + // + resources.ApplyResources(this.linkLabelRoutingDoc, "linkLabelRoutingDoc"); + this.linkLabelRoutingDoc.Name = "linkLabelRoutingDoc"; + this.linkLabelRoutingDoc.TabStop = true; + this.linkLabelRoutingDoc.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelRoutingDoc_LinkClicked); + // + // btnSetDefRountingRule + // + resources.ApplyResources(this.btnSetDefRountingRule, "btnSetDefRountingRule"); + this.btnSetDefRountingRule.Name = "btnSetDefRountingRule"; + this.btnSetDefRountingRule.UseVisualStyleBackColor = true; + this.btnSetDefRountingRule.Click += new System.EventHandler(this.btnSetDefRountingRule_Click); + // + // labRoutingTips + // + this.labRoutingTips.ForeColor = System.Drawing.Color.Brown; + resources.ApplyResources(this.labRoutingTips, "labRoutingTips"); + this.labRoutingTips.Name = "labRoutingTips"; + // + // cmbdomainStrategy + // + this.cmbdomainStrategy.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbdomainStrategy.FormattingEnabled = true; + this.cmbdomainStrategy.Items.AddRange(new object[] { + resources.GetString("cmbdomainStrategy.Items"), + resources.GetString("cmbdomainStrategy.Items1"), + resources.GetString("cmbdomainStrategy.Items2")}); + resources.ApplyResources(this.cmbdomainStrategy, "cmbdomainStrategy"); + this.cmbdomainStrategy.Name = "cmbdomainStrategy"; + // + // tabPage6 + // + this.tabPage6.Controls.Add(this.chkKcpcongestion); + this.tabPage6.Controls.Add(this.txtKcpwriteBufferSize); + this.tabPage6.Controls.Add(this.label10); + this.tabPage6.Controls.Add(this.txtKcpreadBufferSize); + this.tabPage6.Controls.Add(this.label11); + this.tabPage6.Controls.Add(this.txtKcpdownlinkCapacity); + this.tabPage6.Controls.Add(this.label8); + this.tabPage6.Controls.Add(this.txtKcpuplinkCapacity); + this.tabPage6.Controls.Add(this.label9); + this.tabPage6.Controls.Add(this.txtKcptti); + this.tabPage6.Controls.Add(this.label7); + this.tabPage6.Controls.Add(this.txtKcpmtu); + this.tabPage6.Controls.Add(this.label6); + resources.ApplyResources(this.tabPage6, "tabPage6"); + this.tabPage6.Name = "tabPage6"; + this.tabPage6.UseVisualStyleBackColor = true; + // + // chkKcpcongestion + // + resources.ApplyResources(this.chkKcpcongestion, "chkKcpcongestion"); + this.chkKcpcongestion.Name = "chkKcpcongestion"; + this.chkKcpcongestion.UseVisualStyleBackColor = true; + // + // txtKcpwriteBufferSize + // + resources.ApplyResources(this.txtKcpwriteBufferSize, "txtKcpwriteBufferSize"); + this.txtKcpwriteBufferSize.Name = "txtKcpwriteBufferSize"; + // + // label10 + // + resources.ApplyResources(this.label10, "label10"); + this.label10.Name = "label10"; + // + // txtKcpreadBufferSize + // + resources.ApplyResources(this.txtKcpreadBufferSize, "txtKcpreadBufferSize"); + this.txtKcpreadBufferSize.Name = "txtKcpreadBufferSize"; + // + // label11 + // + resources.ApplyResources(this.label11, "label11"); + this.label11.Name = "label11"; + // + // txtKcpdownlinkCapacity + // + resources.ApplyResources(this.txtKcpdownlinkCapacity, "txtKcpdownlinkCapacity"); + this.txtKcpdownlinkCapacity.Name = "txtKcpdownlinkCapacity"; + // + // label8 + // + resources.ApplyResources(this.label8, "label8"); + this.label8.Name = "label8"; + // + // txtKcpuplinkCapacity + // + resources.ApplyResources(this.txtKcpuplinkCapacity, "txtKcpuplinkCapacity"); + this.txtKcpuplinkCapacity.Name = "txtKcpuplinkCapacity"; + // + // label9 + // + resources.ApplyResources(this.label9, "label9"); + this.label9.Name = "label9"; + // + // txtKcptti + // + resources.ApplyResources(this.txtKcptti, "txtKcptti"); + this.txtKcptti.Name = "txtKcptti"; + // + // label7 + // + resources.ApplyResources(this.label7, "label7"); + this.label7.Name = "label7"; + // + // txtKcpmtu + // + resources.ApplyResources(this.txtKcpmtu, "txtKcpmtu"); + this.txtKcpmtu.Name = "txtKcpmtu"; + // + // label6 + // + resources.ApplyResources(this.label6, "label6"); + this.label6.Name = "label6"; + // + // tabPage7 + // + this.tabPage7.Controls.Add(this.chkKeepOlderDedupl); + this.tabPage7.Controls.Add(this.cbFreshrate); + this.tabPage7.Controls.Add(this.lbFreshrate); + this.tabPage7.Controls.Add(this.chkEnableStatistics); + this.tabPage7.Controls.Add(this.chkAllowLANConn); + this.tabPage7.Controls.Add(this.txturlGFWList); + this.tabPage7.Controls.Add(this.label13); + this.tabPage7.Controls.Add(this.chkAutoRun); + resources.ApplyResources(this.tabPage7, "tabPage7"); + this.tabPage7.Name = "tabPage7"; + this.tabPage7.UseVisualStyleBackColor = true; + // + // chkKeepOlderDedupl + // + resources.ApplyResources(this.chkKeepOlderDedupl, "chkKeepOlderDedupl"); + this.chkKeepOlderDedupl.Name = "chkKeepOlderDedupl"; + this.chkKeepOlderDedupl.UseVisualStyleBackColor = true; + // + // cbFreshrate + // + this.cbFreshrate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbFreshrate.FormattingEnabled = true; + resources.ApplyResources(this.cbFreshrate, "cbFreshrate"); + this.cbFreshrate.Name = "cbFreshrate"; + // + // lbFreshrate + // + resources.ApplyResources(this.lbFreshrate, "lbFreshrate"); + this.lbFreshrate.Name = "lbFreshrate"; + // + // chkEnableStatistics + // + resources.ApplyResources(this.chkEnableStatistics, "chkEnableStatistics"); + this.chkEnableStatistics.Name = "chkEnableStatistics"; + this.chkEnableStatistics.UseVisualStyleBackColor = true; + // + // chkAllowLANConn + // + resources.ApplyResources(this.chkAllowLANConn, "chkAllowLANConn"); + this.chkAllowLANConn.Name = "chkAllowLANConn"; + this.chkAllowLANConn.UseVisualStyleBackColor = true; + // + // txturlGFWList + // + resources.ApplyResources(this.txturlGFWList, "txturlGFWList"); + this.txturlGFWList.Name = "txturlGFWList"; + // + // label13 + // + resources.ApplyResources(this.label13, "label13"); + this.label13.Name = "label13"; + // + // chkAutoRun + // + resources.ApplyResources(this.chkAutoRun, "chkAutoRun"); + this.chkAutoRun.Name = "chkAutoRun"; + this.chkAutoRun.UseVisualStyleBackColor = true; + // + // tabPage9 + // + this.tabPage9.Controls.Add(this.txtuserPacRule); + this.tabPage9.Controls.Add(this.panel4); + resources.ApplyResources(this.tabPage9, "tabPage9"); + this.tabPage9.Name = "tabPage9"; + this.tabPage9.UseVisualStyleBackColor = true; + // + // txtuserPacRule + // + resources.ApplyResources(this.txtuserPacRule, "txtuserPacRule"); + this.txtuserPacRule.Name = "txtuserPacRule"; + // + // panel4 + // + this.panel4.Controls.Add(this.label4); + resources.ApplyResources(this.panel4, "panel4"); + this.panel4.Name = "panel4"; + // + // label4 + // + this.label4.ForeColor = System.Drawing.Color.Brown; + resources.ApplyResources(this.label4, "label4"); + this.label4.Name = "label4"; + // + // panel2 + // + this.panel2.Controls.Add(this.btnClose); + this.panel2.Controls.Add(this.btnOK); + resources.ApplyResources(this.panel2, "panel2"); + this.panel2.Name = "panel2"; + // + // btnOK + // + resources.ApplyResources(this.btnOK, "btnOK"); + this.btnOK.Name = "btnOK"; + this.btnOK.UseVisualStyleBackColor = true; + this.btnOK.Click += new System.EventHandler(this.btnOK_Click); + // + // panel1 + // + resources.ApplyResources(this.panel1, "panel1"); + this.panel1.Name = "panel1"; + // + // chktransitEnabled + // + resources.ApplyResources(this.chktransitEnabled, "chktransitEnabled"); + this.chktransitEnabled.Name = "chktransitEnabled"; + this.chktransitEnabled.UseVisualStyleBackColor = true; + // + // OptionSettingForm + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnClose; + this.Controls.Add(this.tabControl1); + this.Controls.Add(this.panel2); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Name = "OptionSettingForm"; + this.Load += new System.EventHandler(this.OptionSettingForm_Load); + this.tabControl1.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.tabPage2.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.tabControl2.ResumeLayout(false); + this.tabPage3.ResumeLayout(false); + this.tabPage3.PerformLayout(); + this.tabPage4.ResumeLayout(false); + this.tabPage4.PerformLayout(); + this.tabPage5.ResumeLayout(false); + this.tabPage5.PerformLayout(); + this.tabPage8.ResumeLayout(false); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + this.tabPage6.ResumeLayout(false); + this.tabPage6.PerformLayout(); + this.tabPage7.ResumeLayout(false); + this.tabPage7.PerformLayout(); + this.tabPage9.ResumeLayout(false); + this.tabPage9.PerformLayout(); + this.panel4.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.ResumeLayout(false); + } #endregion @@ -724,6 +750,9 @@ private System.Windows.Forms.Panel panel4; private System.Windows.Forms.Label label4; private System.Windows.Forms.CheckBox chkKeepOlderDedupl; - private System.Windows.Forms.LinkLabel linkLabelRoutingDoc; + private System.Windows.Forms.LinkLabel linkLabelRoutingDoc; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.ComboBox TransitList; + private System.Windows.Forms.CheckBox chktransitEnabled; } } \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.cs b/v2rayN/v2rayN/Forms/OptionSettingForm.cs index 6fa88f50..07ae3361 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.cs +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.cs @@ -3,8 +3,8 @@ using System.Collections.Generic; using System.Windows.Forms; using v2rayN.Handler; using v2rayN.Base; -using v2rayN.HttpProxyHandler; - +using v2rayN.HttpProxyHandler; + namespace v2rayN.Forms { public partial class OptionSettingForm : BaseForm @@ -36,6 +36,23 @@ namespace v2rayN.Forms chklogEnabled.Checked = config.logEnabled; cmbloglevel.Text = config.loglevel; + //代理转发 + chktransitEnabled.Checked = config.transitEnabled; + ConfigHandler.LoadConfig(ref config); + if (config.vmess == null) + { + TransitList.Items.Add(null); + } + else + { + for (int i = 0; i < config.vmess.Count; i++) + { + TransitList.Items.Add(i.ToString() + ' ' + config.vmess[i].remarks); + } + } + TransitList.Text = config.transitSetting.ToString() + ' ' + config.vmess[config.transitSetting].remarks; + + //Mux chkmuxEnabled.Checked = config.muxEnabled; @@ -196,6 +213,11 @@ namespace v2rayN.Forms bool logEnabled = chklogEnabled.Checked; string loglevel = cmbloglevel.Text.TrimEx(); + //代理转发 + //bool logEnabled = chklogEnabled.Checked; + System.Text.RegularExpressions.Match matchNumber = System.Text.RegularExpressions.Regex.Match(TransitList.Text, "(^[0-9]+)"); + int transitSetting = Convert.ToInt32(matchNumber.Value); + //Mux bool muxEnabled = chkmuxEnabled.Checked; @@ -257,6 +279,10 @@ namespace v2rayN.Forms config.logEnabled = logEnabled; config.loglevel = loglevel; + //代理转发 + config.transitEnabled = chktransitEnabled.Checked; + config.transitSetting = transitSetting; + //Mux config.muxEnabled = muxEnabled; diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.resx b/v2rayN/v2rayN/Forms/OptionSettingForm.resx index 7f8ef414..ddcdd6bc 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.resx +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.resx @@ -1,1197 +1,2115 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - - - 6, 12 - - - 662, 675 - - - True - - - 4, 4, 4, 4 - - - Settings - - - 355, 16 - - - 75, 23 - - - 7 - - - &Cancel - - - 267, 16 - - - 75, 23 - - - 8 - - - &OK - - - Top, Right - - - True - - - 322, 10 - - - 229, 23 - - - 18 - - - Set default custom routing rules - - - 161, 84 - - - 58, 20 - - - 32 - - - True - - - 15, 63 - - - 120, 16 - - - 19 - - - listening port 2 - - - False - - - True - - - 15, 38 - - - 204, 16 - - - 29 - - - Allow connections from the LAN - - - True - - - 15, 16 - - - 246, 16 - - - 23 - - - Automatically start at system startup - - - True - - - NoControl - - - 15, 62 - - - 576, 16 - - - 29 - - - Enable Statistics (Realtime netspeed and traffic records. Require restart the v2rayN client) - - - True - - - 20, 143 - - - 84, 16 - - - 20 - - - congestion - - - True - - - NoControl - - - 15, 110 - - - 198, 16 - - - 33 - - - Keep older when deduplication - - - True - - - 15, 160 - - - 126, 16 - - - 9 - - - Record local logs - - - True - - - 15, 129 - - - 174, 16 - - - 20 - - - Turn on Mux Multiplexing - - - True - - - NoControl - - - 468, 27 - - - 120, 16 - - - 31 - - - Turn on Sniffing - - - True - - - NoControl - - - 468, 60 - - - 120, 16 - - - 32 - - - Turn on Sniffing - - - False - - - True - - - 369, 27 - - - 84, 16 - - - 10 - - - Enable UDP - - - True - - - 369, 62 - - - 84, 16 - - - 18 - - - Enable UDP - - - False - - - AsIs - - - IPIfNonMatch - - - IPOnDemand - - - 115, 10 - - - 165, 20 - - - 16 - - - Not Enabled Http Proxy - - - Open Http proxy and automatically configure proxy server (global mode) - - - Open PAC and automatically configure PAC (PAC mode) - - - Only open Http proxy, do not automatically configure proxy server (direct mode) - - - Only open PAC, do not automatically configure PAC - - - Only open Http proxy and do nothing - - - Only open PAC and do nothing - - - 124, 94 - - - 464, 20 - - - 33 - - - debug - - - info - - - warning - - - error - - - none - - - 257, 158 - - - 97, 20 - - - 6 - - - False - - - socks - - - http - - - 257, 25 - - - 97, 20 - - - 12 - - - socks - - - http - - - 257, 60 - - - 97, 20 - - - 17 - - - False - - - Global - - - Bypassing the LAN address - - - Bypass mainland address - - - Bypassing LAN and mainland address - - - 21, 17 - - - 255, 20 - - - 14 - - - Fill - - - 3, 3 - - - 648, 573 - - - 6 - - - Fill - - - 3, 3 - - - 648, 573 - - - 12 - - - True - - - 206, 29 - - - 53, 12 - - - 11 - - - protocol - - - True - - - 236, 104 - - - 95, 12 - - - 14 - - - writeBufferSize - - - True - - - 18, 104 - - - 89, 12 - - - 12 - - - readBufferSize - - - True - - - 30, 176 - - - 431, 12 - - - 27 - - - Custom GFWList address (please fill in the blank without customization) - - - True - - - 33, 204 - - - 281, 12 - - - 29 - - - Custom DNS (multiple, separated by commas (,)) - - - True - - - NoControl - - - 42, 98 - - - 65, 12 - - - 34 - - - Http proxy - - - True - - - 33, 29 - - - 89, 12 - - - 2 - - - Listening port - - - True - - - 206, 64 - - - 53, 12 - - - 16 - - - protocol - - - False - - - NoControl - - - 5, 11 - - - 598, 16 - - - 13 - - - *Set user pac rules, separated by commas (,) - - - True - - - 193, 162 - - - 59, 12 - - - 8 - - - Log level - - - True - - - 18, 28 - - - 23, 12 - - - 4 - - - mtu - - - True - - - 236, 28 - - - 23, 12 - - - 6 - - - tti - - - True - - - 236, 66 - - - 101, 12 - - - 10 - - - downlinkCapacity - - - True - - - 18, 66 - - - 89, 12 - - - 8 - - - uplinkCapacity - - - 5, 45 - - - 598, 16 - - - 13 - - - *Set the rules, separated by commas (,); support Domain (pure string / regular / subdomain) and IP - - - True - - - NoControl - - - 30, 87 - - - 125, 12 - - - 30 - - - Statistics freshrate - - - True - - - 5, 14 - - - 0, 0, 0, 0 - - - 95, 12 - - - 19 - - - Domain strategy - - - Top - - - 0, 0 - - - 662, 10 - - - 9 - - - Bottom - - - 0, 615 - - - 662, 60 - - - 11 - - - Top - - - 3, 17 - - - 642, 67 - - - 19 - - - Top - - - 3, 3 - - - 648, 37 - - - 20 - - - Fill - - - 0, 10 - - - 662, 605 - - - 10 - - - Fill - - - 3, 84 - - - 642, 486 - - - 12 - - - 4, 22 - - - 3, 3, 3, 3 - - - 654, 579 - - - 0 - - - Core: basic settings - - - 4, 22 - - - 3, 3, 3, 3 - - - 654, 579 - - - 1 - - - Core: Routing settings - - - 4, 22 - - - 3, 3, 3, 3 - - - 634, 460 - - - 0 - - - 1.Proxy Domain or IP - - - 4, 22 - - - 3, 3, 3, 3 - - - 634, 460 - - - 1 - - - 2.Direct Domain or IP - - - 4, 22 - - - 3, 3, 3, 3 - - - 634, 460 - - - 2 - - - 3.Block Domain or IP - - - 4, 22 - - - 3, 3, 3, 3 - - - 654, 579 - - - 2 - - - Core: KCP settings - - - 4, 22 - - - 3, 3, 3, 3 - - - 654, 579 - - - 3 - - - v2rayN settings - - - 4, 22 - - - 3, 3, 3, 3 - - - 634, 460 - - - 3 - - - 4.Pre-defined rules - - - 4, 22 - - - 3, 3, 3, 3 - - - 654, 579 - - - 4 - - - User PAC settings - - - 345, 62 - - - 94, 21 - - - 11 - - - 111, 24 - - - 94, 21 - - - 5 - - - 111, 100 - - - 94, 21 - - - 13 - - - 345, 24 - - - 94, 21 - - - 7 - - - 111, 62 - - - 94, 21 - - - 9 - - - 345, 100 - - - 94, 21 - - - 15 - - - 124, 25 - - - 78, 21 - - - 3 - - - 124, 60 - - - 78, 21 - - - 14 - - - False - - - 33, 228 - - - True - - - 555, 100 - - - 30 - - - 32, 205 - - - True - - - 541, 100 - - - 28 - - - Fill - - - 3, 3 - - - 0 - - - True - - - Vertical - - - 628, 454 - - - 0 - - - Fill - - - 3, 3 - - - 0 - - - True - - - Vertical - - - 628, 454 - - - 1 - - - Fill - - - 3, 3 - - - 0 - - - True - - - Vertical - - - 628, 454 - - - 1 - - - Fill - - - 3, 40 - - - 0 - - - True - - - Vertical - - - 648, 536 - - - 21 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + 355, 16 + + + 75, 23 + + + + 7 + + + &Cancel + + + btnClose + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 0 + + + True + + + + NoControl + + + 15, 205 + + + 58, 17 + + + 36 + + + Transit + + + chktransitEnabled + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 0 + + + 0, 0 + + + 100, 23 + + + 0 + + + label12 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 1 + + + 124, 203 + + + 464, 21 + + + 35 + + + TransitList + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 2 + + + True + + + NoControl + + + 42, 98 + + + 55, 13 + + + 34 + + + Http proxy + + + label16 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 3 + + + Not Enabled Http Proxy + + + Open Http proxy and automatically configure proxy server (global mode) + + + Open PAC and automatically configure PAC (PAC mode) + + + Only open Http proxy, do not automatically configure proxy server (direct mode) + + + Only open PAC, do not automatically configure PAC + + + Only open Http proxy and do nothing + + + Only open PAC and do nothing + + + 124, 94 + + + 464, 21 + + + 33 + + + cmblistenerType + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 4 + + + True + + + NoControl + + + 468, 60 + + + 101, 17 + + + 32 + + + Turn on Sniffing + + + False + + + chksniffingEnabled2 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 5 + + + True + + + NoControl + + + 468, 27 + + + 101, 17 + + + 31 + + + Turn on Sniffing + + + chksniffingEnabled + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 6 + + + 36, 286 + + + True + + + 555, 100 + + + 30 + + + txtremoteDNS + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 7 + + + True + + + 33, 254 + + + 233, 13 + + + 29 + + + Custom DNS (multiple, separated by commas (,)) + + + label14 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 8 + + + True + + + 15, 129 + + + 147, 17 + + + 20 + + + Turn on Mux Multiplexing + + + chkmuxEnabled + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 9 + + + True + + + 15, 63 + + + 94, 17 + + + 19 + + + listening port 2 + + + False + + + chkAllowIn2 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 10 + + + True + + + 369, 62 + + + 85, 17 + + + 18 + + + Enable UDP + + + False + + + chkudpEnabled2 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 11 + + + socks + + + http + + + 257, 60 + + + 97, 21 + + + 17 + + + False + + + cmbprotocol2 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 12 + + + True + + + 206, 64 + + + 45, 13 + + + 16 + + + protocol + + + False + + + label3 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 13 + + + 124, 60 + + + 78, 20 + + + 14 + + + False + + + txtlocalPort2 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 14 + + + False + + + socks + + + http + + + 257, 25 + + + 97, 21 + + + 12 + + + cmbprotocol + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 15 + + + True + + + 206, 29 + + + 45, 13 + + + 11 + + + protocol + + + label1 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 16 + + + True + + + 369, 27 + + + 85, 17 + + + 10 + + + Enable UDP + + + chkudpEnabled + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 17 + + + True + + + 15, 160 + + + 108, 17 + + + 9 + + + Record local logs + + + chklogEnabled + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 18 + + + debug + + + info + + + warning + + + error + + + none + + + 257, 158 + + + 97, 21 + + + 6 + + + cmbloglevel + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 19 + + + True + + + 193, 162 + + + 50, 13 + + + 8 + + + Log level + + + label5 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 20 + + + 124, 25 + + + 78, 20 + + + 3 + + + txtlocalPort + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 21 + + + True + + + 33, 29 + + + 70, 13 + + + 2 + + + Listening port + + + label2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 22 + + + Fill + + + 3, 3 + + + 676, 526 + + + 6 + + + groupBox1 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage1 + + + 0 + + + 4, 22 + + + 3, 3, 3, 3 + + + 682, 532 + + + 0 + + + Core: basic settings + + + tabPage1 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl1 + + + 0 + + + Fill + + + 3, 3 + + + 0 + + + True + + + Vertical + + + 656, 408 + + + 0 + + + txtUseragent + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage3 + + + 0 + + + 4, 22 + + + 3, 3, 3, 3 + + + 662, 414 + + + 0 + + + 1.Proxy Domain or IP + + + tabPage3 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl2 + + + 0 + + + Fill + + + 3, 3 + + + 0 + + + True + + + Vertical + + + 656, 408 + + + 1 + + + txtUserdirect + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage4 + + + 0 + + + 4, 22 + + + 3, 3, 3, 3 + + + 662, 414 + + + 1 + + + 2.Direct Domain or IP + + + tabPage4 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl2 + + + 1 + + + Fill + + + 3, 3 + + + 0 + + + True + + + Vertical + + + 656, 408 + + + 1 + + + txtUserblock + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage5 + + + 0 + + + 4, 22 + + + 3, 3, 3, 3 + + + 662, 414 + + + 2 + + + 3.Block Domain or IP + + + tabPage5 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl2 + + + 2 + + + Global + + + Bypassing the LAN address + + + Bypass mainland address + + + Bypassing LAN and mainland address + + + 21, 17 + + + 255, 21 + + + 14 + + + cmbroutingMode + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage8 + + + 0 + + + 4, 22 + + + 3, 3, 3, 3 + + + 662, 414 + + + 3 + + + 4.Pre-defined rules + + + tabPage8 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl2 + + + 3 + + + Fill + + + 3, 83 + + + 670, 440 + + + 12 + + + tabControl2 + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox2 + + + 0 + + + True + + + 5, 14 + + + 0, 0, 0, 0 + + + 83, 13 + + + 19 + + + Domain strategy + + + linkLabelRoutingDoc + + + System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 0 + + + Top, Right + + + True + + + 350, 10 + + + 229, 23 + + + 18 + + + Set default custom routing rules + + + btnSetDefRountingRule + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 1 + + + 5, 45 + + + 598, 16 + + + 13 + + + *Set the rules, separated by commas (,); support Domain (pure string / regular / subdomain) and IP + + + labRoutingTips + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 2 + + + AsIs + + + IPIfNonMatch + + + IPOnDemand + + + 115, 10 + + + 165, 21 + + + 16 + + + cmbdomainStrategy + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 3 + + + Top + + + 3, 16 + + + 670, 67 + + + 19 + + + panel3 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox2 + + + 1 + + + Fill + + + 3, 3 + + + 676, 526 + + + 12 + + + groupBox2 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage2 + + + 0 + + + 4, 22 + + + 3, 3, 3, 3 + + + 682, 532 + + + 1 + + + Core: Routing settings + + + tabPage2 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl1 + + + 1 + + + True + + + 20, 143 + + + 78, 17 + + + 20 + + + congestion + + + chkKcpcongestion + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage6 + + + 0 + + + 345, 100 + + + 94, 20 + + + 15 + + + txtKcpwriteBufferSize + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage6 + + + 1 + + + True + + + 236, 104 + + + 77, 13 + + + 14 + + + writeBufferSize + + + label10 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage6 + + + 2 + + + 111, 100 + + + 94, 20 + + + 13 + + + txtKcpreadBufferSize + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage6 + + + 3 + + + True + + + 18, 104 + + + 76, 13 + + + 12 + + + readBufferSize + + + label11 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage6 + + + 4 + + + 345, 62 + + + 94, 20 + + + 11 + + + txtKcpdownlinkCapacity + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage6 + + + 5 + + + True + + + 236, 66 + + + 90, 13 + + + 10 + + + downlinkCapacity + + + label8 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage6 + + + 6 + + + 111, 62 + + + 94, 20 + + + 9 + + + txtKcpuplinkCapacity + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage6 + + + 7 + + + True + + + 18, 66 + + + 76, 13 + + + 8 + + + uplinkCapacity + + + label9 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage6 + + + 8 + + + 345, 24 + + + 94, 20 + + + 7 + + + txtKcptti + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage6 + + + 9 + + + True + + + 236, 28 + + + 15, 13 + + + 6 + + + tti + + + label7 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage6 + + + 10 + + + 111, 24 + + + 94, 20 + + + 5 + + + txtKcpmtu + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage6 + + + 11 + + + True + + + 18, 28 + + + 24, 13 + + + 4 + + + mtu + + + label6 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage6 + + + 12 + + + 4, 22 + + + 3, 3, 3, 3 + + + 682, 532 + + + 2 + + + Core: KCP settings + + + tabPage6 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl1 + + + 2 + + + True + + + NoControl + + + 15, 110 + + + 172, 17 + + + 33 + + + Keep older when deduplication + + + chkKeepOlderDedupl + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage7 + + + 0 + + + 161, 84 + + + 58, 21 + + + 32 + + + cbFreshrate + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage7 + + + 1 + + + True + + + NoControl + + + 30, 87 + + + 93, 13 + + + 30 + + + Statistics freshrate + + + lbFreshrate + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage7 + + + 2 + + + True + + + NoControl + + + 15, 62 + + + 447, 17 + + + 29 + + + Enable Statistics (Realtime netspeed and traffic records. Require restart the v2rayN client) + + + chkEnableStatistics + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage7 + + + 3 + + + True + + + 15, 38 + + + 177, 17 + + + 29 + + + Allow connections from the LAN + + + chkAllowLANConn + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage7 + + + 4 + + + 32, 205 + + + True + + + 541, 100 + + + 28 + + + txturlGFWList + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage7 + + + 5 + + + True + + + 30, 176 + + + 340, 13 + + + 27 + + + Custom GFWList address (please fill in the blank without customization) + + + label13 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage7 + + + 6 + + + True + + + 15, 16 + + + 193, 17 + + + 23 + + + Automatically start at system startup + + + chkAutoRun + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage7 + + + 7 + + + 4, 22 + + + 3, 3, 3, 3 + + + 682, 532 + + + 3 + + + v2rayN settings + + + tabPage7 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl1 + + + 3 + + + Fill + + + 3, 40 + + + 0 + + + True + + + Vertical + + + 676, 489 + + + 21 + + + txtuserPacRule + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage9 + + + 0 + + + NoControl + + + 5, 11 + + + 598, 16 + + + 13 + + + *Set user pac rules, separated by commas (,) + + + label4 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel4 + + + 0 + + + Top + + + 3, 3 + + + 676, 37 + + + 20 + + + panel4 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage9 + + + 1 + + + 4, 22 + + + 3, 3, 3, 3 + + + 682, 532 + + + 4 + + + User PAC settings + + + tabPage9 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl1 + + + 4 + + + Fill + + + 0, 10 + + + 690, 558 + + + 10 + + + tabControl1 + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + 267, 16 + + + 75, 23 + + + 8 + + + &OK + + + btnOK + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 1 + + + Bottom + + + 0, 568 + + + 690, 60 + + + 11 + + + panel2 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + Top + + + 0, 0 + + + 690, 10 + + + 9 + + + panel1 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + True + + + 6, 13 + + + 690, 628 + + + 4, 4, 4, 4 + + + Settings + + + OptionSettingForm + + + v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx b/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx index bf169d29..0c304186 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx @@ -1,369 +1,372 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 参数设置 - - - 取消(&C) - - - 确定(&O) - - - - NoControl - - - - 351, 14 - - - 201, 23 - - - 一键设置默认自定义路由规则 - - - 102, 16 - - - 本地监听端口2 - - - 144, 16 - - - 允许来自局域网的连接 - - - 180, 16 - - - 开机自动启动(可能会不成功) - - - 384, 16 - - - 启用统计(实时网速显示和使用流量显示,需要重启v2rayN客户端) - - - 去重时保留序号较小的项 - - - 156, 16 - - - 记录本地日志(默认关闭) - - - 开启Mux多路复用(默认开启) - - - 96, 16 - - - 开启流量探测 - - - 96, 16 - - - 开启流量探测 - - - 66, 16 - - - 开启UDP - - - 66, 16 - - - 开启UDP - - - 关闭Http代理 - - - 开启Http代理,并自动配置系统代理(全局模式) - - - 开启PAC,并自动配置系统代理(PAC模式) - - - 仅开启Http代理,并清除系统代理 - - - 仅开启PAC,并清除系统代理 - - - 仅开启Http代理,不改变系统代理 - - - 仅开启PAC,不改变系统代理 - - - 全局 - - - 绕过局域网地址 - - - 绕过大陆地址 - - - 绕过局域网及大陆地址 - - - 19, 26 - - - 244, 20 - - - 29, 12 - - - 协议 - - - 227, 12 - - - 自定义GFWList地址(不需自定义请填空白) - - - 191, 12 - - - 自定义DNS(可多个,用逗号(,)隔开) - - - 53, 12 - - - 53, 12 - - - Http代理 - - - 77, 12 - - - 本地监听端口 - - - 29, 12 - - - 协议 - - - *设置用户PAC规则,用逗号(,)隔开 - - - 53, 12 - - - 日志等级 - - - - True - - - 5, 49 - - - 383, 12 - - - *设置的规则,用逗号(,)隔开;支持Domain(纯字符串/正则/子域名)和IP - - - 77, 12 - - - 统计刷新频率 - - - 域名解析策略 - - - 642, 72 - - - 3, 89 - - - 642, 481 - - - Core:基础设置 - - - Core:路由设置 - - - 634, 455 - - - 1.代理的Domain或IP - - - 634, 455 - - - 2.直连的Domain或IP - - - 634, 455 - - - 3.阻止的Domain或IP - - - Core:KCP设置 - - - v2rayN设置 - - - 634, 455 - - - 4.预定义规则 - - - 用户PAC设置 - - - 628, 449 - - - 628, 449 - - - 628, 449 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 参数设置 + + + 取消(&C) + + + 确定(&O) + + + + NoControl + + + + 351, 14 + + + 201, 23 + + + 一键设置默认自定义路由规则 + + + 102, 16 + + + 本地监听端口2 + + + 144, 16 + + + 允许来自局域网的连接 + + + 180, 16 + + + 开机自动启动(可能会不成功) + + + 384, 16 + + + 启用统计(实时网速显示和使用流量显示,需要重启v2rayN客户端) + + + 去重时保留序号较小的项 + + + 156, 16 + + + 记录本地日志(默认关闭) + + + 开启Mux多路复用(默认开启) + + + 96, 16 + + + 开启流量探测 + + + 96, 16 + + + 开启流量探测 + + + 代理转发 + + + 66, 16 + + + 开启UDP + + + 66, 16 + + + 开启UDP + + + 关闭Http代理 + + + 开启Http代理,并自动配置系统代理(全局模式) + + + 开启PAC,并自动配置系统代理(PAC模式) + + + 仅开启Http代理,并清除系统代理 + + + 仅开启PAC,并清除系统代理 + + + 仅开启Http代理,不改变系统代理 + + + 仅开启PAC,不改变系统代理 + + + 全局 + + + 绕过局域网地址 + + + 绕过大陆地址 + + + 绕过局域网及大陆地址 + + + 19, 26 + + + 244, 20 + + + 29, 12 + + + 协议 + + + 227, 12 + + + 自定义GFWList地址(不需自定义请填空白) + + + 191, 12 + + + 自定义DNS(可多个,用逗号(,)隔开) + + + 53, 12 + + + 53, 12 + + + Http代理 + + + 77, 12 + + + 本地监听端口 + + + 29, 12 + + + 协议 + + + *设置用户PAC规则,用逗号(,)隔开 + + + 53, 12 + + + 日志等级 + + + + True + + + 5, 49 + + + 383, 12 + + + *设置的规则,用逗号(,)隔开;支持Domain(纯字符串/正则/子域名)和IP + + + 77, 12 + + + 统计刷新频率 + + + 域名解析策略 + + + 642, 72 + + + 3, 89 + + + 642, 481 + + + Core:基础设置 + + + Core:路由设置 + + + 634, 455 + + + 1.代理的Domain或IP + + + 634, 455 + + + 2.直连的Domain或IP + + + 634, 455 + + + 3.阻止的Domain或IP + + + Core:KCP设置 + + + v2rayN设置 + + + 634, 455 + + + 4.预定义规则 + + + 用户PAC设置 + + + 628, 449 + + + 628, 449 + + + 628, 449 + \ No newline at end of file diff --git a/v2rayN/v2rayN/Handler/V2rayConfigHandler.cs b/v2rayN/v2rayN/Handler/V2rayConfigHandler.cs index 9ea93933..1f132e29 100644 --- a/v2rayN/v2rayN/Handler/V2rayConfigHandler.cs +++ b/v2rayN/v2rayN/Handler/V2rayConfigHandler.cs @@ -323,9 +323,129 @@ namespace v2rayN.Handler /// private static int outbound(Config config, ref V2rayConfig v2rayConfig) { + int configIndex = config.index; + Outbounds outbound; try { - Outbounds outbound = v2rayConfig.outbounds[0]; + if(config.transitEnabled) + { + config.index = config.transitSetting; + outbound = v2rayConfig.outbounds[0]; + if (config.configType() == (int)EConfigType.Vmess) + { + VnextItem vnextItem; + if (outbound.settings.vnext.Count <= 0) + { + vnextItem = new VnextItem(); + outbound.settings.vnext.Add(vnextItem); + } + else + { + vnextItem = outbound.settings.vnext[0]; + } + //远程服务器地址和端口 + vnextItem.address = config.address(); + vnextItem.port = config.port(); + + UsersItem usersItem; + if (vnextItem.users.Count <= 0) + { + usersItem = new UsersItem(); + vnextItem.users.Add(usersItem); + } + else + { + usersItem = vnextItem.users[0]; + } + //远程服务器用户ID + usersItem.id = config.id(); + usersItem.alterId = config.alterId(); + usersItem.email = Global.userEMail; + usersItem.security = config.security(); + + //Mux + outbound.mux.enabled = config.muxEnabled; + outbound.mux.concurrency = config.muxEnabled ? 8 : -1; + + outbound.protocol = "vmess"; + outbound.settings.servers = null; + } + else if (config.configType() == (int)EConfigType.Shadowsocks) + { + ServersItem serversItem; + if (outbound.settings.servers.Count <= 0) + { + serversItem = new ServersItem(); + outbound.settings.servers.Add(serversItem); + } + else + { + serversItem = outbound.settings.servers[0]; + } + //远程服务器地址和端口 + serversItem.address = config.address(); + serversItem.port = config.port(); + serversItem.password = config.id(); + serversItem.method = config.security(); + + serversItem.ota = false; + serversItem.level = 1; + + outbound.mux.enabled = false; + outbound.mux.concurrency = -1; + + + outbound.protocol = "shadowsocks"; + outbound.settings.vnext = null; + } + else if (config.configType() == (int)EConfigType.Socks) + { + ServersItem serversItem; + if (outbound.settings.servers.Count <= 0) + { + serversItem = new ServersItem(); + outbound.settings.servers.Add(serversItem); + } + else + { + serversItem = outbound.settings.servers[0]; + } + //远程服务器地址和端口 + serversItem.address = config.address(); + serversItem.port = config.port(); + serversItem.method = null; + serversItem.password = null; + + if (!Utils.IsNullOrEmpty(config.security()) + && !Utils.IsNullOrEmpty(config.id())) + { + SocksUsersItem socksUsersItem = new SocksUsersItem + { + user = config.security(), + pass = config.id(), + level = 1 + }; + + serversItem.users = new List() { socksUsersItem }; + } + + outbound.mux.enabled = false; + outbound.mux.concurrency = -1; + + outbound.protocol = "socks"; + outbound.settings.vnext = null; + } + + outbound = v2rayConfig.outbounds[1]; + config.index = configIndex; + } + else + { + v2rayConfig.outbounds.RemoveAt(0); + outbound = v2rayConfig.outbounds[0]; + outbound.tag = "proxy"; + } + if (config.configType() == (int)EConfigType.Vmess) { VnextItem vnextItem; diff --git a/v2rayN/v2rayN/Mode/Config.cs b/v2rayN/v2rayN/Mode/Config.cs index 60e48e55..03fbb3b8 100644 --- a/v2rayN/v2rayN/Mode/Config.cs +++ b/v2rayN/v2rayN/Mode/Config.cs @@ -32,6 +32,22 @@ namespace v2rayN.Mode /// 日志等级 /// public string loglevel + { + get; set; + } + + /// + /// 允许代理转发 + /// + public bool transitEnabled + { + get; set; + } + + /// + /// 日志等级 + /// + public int transitSetting { get; set; } diff --git a/v2rayN/v2rayN/Mode/V2rayConfig.cs b/v2rayN/v2rayN/Mode/V2rayConfig.cs index 5d4ab5df..4801305d 100644 --- a/v2rayN/v2rayN/Mode/V2rayConfig.cs +++ b/v2rayN/v2rayN/Mode/V2rayConfig.cs @@ -187,6 +187,8 @@ namespace v2rayN.Mode /// /// public Mux mux { get; set; } + + public ProxySettings proxySettings { get; set; } } public class Outboundsettings @@ -517,4 +519,12 @@ namespace v2rayN.Mode public Header header { get; set; } } + public class ProxySettings + { + /// + /// + /// + public string tag { get; set; } + } + } diff --git a/v2rayN/v2rayN/Sample/SampleClientConfig.txt b/v2rayN/v2rayN/Sample/SampleClientConfig.txt index a582c6ea..bf5b264f 100644 --- a/v2rayN/v2rayN/Sample/SampleClientConfig.txt +++ b/v2rayN/v2rayN/Sample/SampleClientConfig.txt @@ -1,85 +1,129 @@ -{ - "log": { - "access": "", - "error": "", - "loglevel": "error" - }, - "log": { - "access": "Vaccess.log", - "error": "Verror.log", - "loglevel": "warning" - }, - "inbounds": [ - { - "tag": "proxy", - "port": 10808, - "protocol": "socks", - "listen": "127.0.0.1", - "settings": { - "auth": "noauth", - "udp": true - }, - "sniffing": { - "enabled": true, - "destOverride": [ - "http", - "tls" - ] - } - } - ], - "outbounds": [{ - "tag": "proxy", - "protocol": "vmess", - "settings": { - "vnext": [{ - "address": "v2ray.cool", - "port": 10086, - "users": [{ - "id": "a3482e88-686a-4a58-8126-99c9df64b7bf", - "alterId": 64, - "security": "auto" - }] - }], - "servers": [{ - "address": "v2ray.cool", - "method": "chacha20", - "ota": false, - "password": "123456", - "port": 10086, - "level": 1 - }] - }, - "streamSettings": { - "network": "tcp" - }, - "mux": { - "enabled": false - } - }, - { - "protocol": "freedom", - "settings": {}, - "tag": "direct" - }, - { - "protocol": "blackhole", - "tag": "block", - "settings": { - "response": { - "type": "http" - } - } - } - ], - "routing": { - "domainStrategy": "IPIfNonMatch", - "rules": [ - { - "inboundTag": ["api"], - "outboundTag": "api", - "type": "field" +{ + "log": { + "access": "", + "error": "", + "loglevel": "error" + }, + "log": { + "access": "Vaccess.log", + "error": "Verror.log", + "loglevel": "warning" + }, + "inbounds": [ + { + "tag": "proxy", + "port": 10808, + "protocol": "socks", + "listen": "127.0.0.1", + "settings": { + "auth": "noauth", + "udp": true + }, + "sniffing": { + "enabled": true, + "destOverride": [ + "http", + "tls" + ] + } + } + ], + "outbounds": [ + { + "tag": "proxy", + "protocol": "vmess", + "settings": { + "vnext": [ + { + "address": "v2ray.cool", + "port": 10086, + "users": [ + { + "id": "a3482e88-686a-4a58-8126-99c9df64b7bf", + "alterId": 64, + "security": "auto" + } + ] + } + ], + "servers": [ + { + "address": "v2ray.cool", + "method": "chacha20", + "ota": false, + "password": "123456", + "port": 10086, + "level": 1 + } + ] + }, + "proxySettings": { + "tag": "transit" + }, + "mux": { + "enabled": false + } + }, + { + "tag": "transit", + "protocol": "vmess", + "settings": { + "vnext": [ + { + "address": "v2ray.cool", + "port": 10086, + "users": [ + { + "id": "a3482e88-686a-4a58-8126-99c9df64b7bf", + "alterId": 64, + "security": "auto" + } + ] + } + ], + "servers": [ + { + "address": "v2ray.cool", + "method": "chacha20", + "ota": false, + "password": "123456", + "port": 10086, + "level": 1 + } + ] + }, + "streamSettings": { + "network": "tcp" + }, + "mux": { + "enabled": false + } + }, + { + "protocol": "freedom", + "settings": {}, + "tag": "direct" + }, + { + "protocol": "blackhole", + "tag": "block", + "settings": { + "response": { + "type": "http" } - ] - } + } + } + ], + "routing": { + "domainStrategy": "IPIfNonMatch", + "rules": [ + { + "inboundTag": [ + "api" + ], + "outboundTag": "api", + "type": "field" + } + ] + } } \ No newline at end of file