diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs b/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs index 57488adc..d21e2661 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs @@ -91,6 +91,10 @@ 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(); @@ -107,36 +111,40 @@ 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.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnClose.Name = "btnClose"; this.btnClose.UseVisualStyleBackColor = true; this.btnClose.Click += new System.EventHandler(this.btnClose_Click); // // tabControl1 // + resources.ApplyResources(this.tabControl1, "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); - resources.ApplyResources(this.tabControl1, "tabControl1"); + this.tabControl1.Controls.Add(this.tabPage9); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; // // tabPage1 // - this.tabPage1.Controls.Add(this.groupBox1); resources.ApplyResources(this.tabPage1, "tabPage1"); + this.tabPage1.Controls.Add(this.groupBox1); this.tabPage1.Name = "tabPage1"; this.tabPage1.UseVisualStyleBackColor = true; // // groupBox1 // + resources.ApplyResources(this.groupBox1, "groupBox1"); this.groupBox1.Controls.Add(this.label16); this.groupBox1.Controls.Add(this.cmblistenerType); this.groupBox1.Controls.Add(this.chksniffingEnabled2); @@ -157,7 +165,6 @@ 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; // @@ -168,6 +175,7 @@ // // cmblistenerType // + resources.ApplyResources(this.cmblistenerType, "cmblistenerType"); this.cmblistenerType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmblistenerType.FormattingEnabled = true; this.cmblistenerType.Items.AddRange(new object[] { @@ -176,7 +184,6 @@ resources.GetString("cmblistenerType.Items2"), resources.GetString("cmblistenerType.Items3"), resources.GetString("cmblistenerType.Items4")}); - resources.ApplyResources(this.cmblistenerType, "cmblistenerType"); this.cmblistenerType.Name = "cmblistenerType"; // // chksniffingEnabled2 @@ -222,12 +229,12 @@ // // cmbprotocol2 // + resources.ApplyResources(this.cmbprotocol2, "cmbprotocol2"); this.cmbprotocol2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbprotocol2.FormattingEnabled = true; this.cmbprotocol2.Items.AddRange(new object[] { resources.GetString("cmbprotocol2.Items"), resources.GetString("cmbprotocol2.Items1")}); - resources.ApplyResources(this.cmbprotocol2, "cmbprotocol2"); this.cmbprotocol2.Name = "cmbprotocol2"; // // label3 @@ -242,8 +249,8 @@ // // cmbprotocol // - this.cmbprotocol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; resources.ApplyResources(this.cmbprotocol, "cmbprotocol"); + this.cmbprotocol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbprotocol.FormattingEnabled = true; this.cmbprotocol.Items.AddRange(new object[] { resources.GetString("cmbprotocol.Items"), @@ -269,6 +276,7 @@ // // cmbloglevel // + resources.ApplyResources(this.cmbloglevel, "cmbloglevel"); this.cmbloglevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbloglevel.FormattingEnabled = true; this.cmbloglevel.Items.AddRange(new object[] { @@ -277,7 +285,6 @@ resources.GetString("cmbloglevel.Items2"), resources.GetString("cmbloglevel.Items3"), resources.GetString("cmbloglevel.Items4")}); - resources.ApplyResources(this.cmbloglevel, "cmbloglevel"); this.cmbloglevel.Name = "cmbloglevel"; // // label5 @@ -297,33 +304,33 @@ // // tabPage2 // - this.tabPage2.Controls.Add(this.groupBox2); resources.ApplyResources(this.tabPage2, "tabPage2"); + this.tabPage2.Controls.Add(this.groupBox2); this.tabPage2.Name = "tabPage2"; this.tabPage2.UseVisualStyleBackColor = true; // // groupBox2 // + resources.ApplyResources(this.groupBox2, "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 // + resources.ApplyResources(this.tabControl2, "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.Controls.Add(this.txtUseragent); this.tabPage3.Name = "tabPage3"; this.tabPage3.UseVisualStyleBackColor = true; // @@ -334,8 +341,8 @@ // // tabPage4 // - this.tabPage4.Controls.Add(this.txtUserdirect); resources.ApplyResources(this.tabPage4, "tabPage4"); + this.tabPage4.Controls.Add(this.txtUserdirect); this.tabPage4.Name = "tabPage4"; this.tabPage4.UseVisualStyleBackColor = true; // @@ -346,8 +353,8 @@ // // tabPage5 // - this.tabPage5.Controls.Add(this.txtUserblock); resources.ApplyResources(this.tabPage5, "tabPage5"); + this.tabPage5.Controls.Add(this.txtUserblock); this.tabPage5.Name = "tabPage5"; this.tabPage5.UseVisualStyleBackColor = true; // @@ -358,13 +365,14 @@ // // tabPage8 // - this.tabPage8.Controls.Add(this.cmbroutingMode); resources.ApplyResources(this.tabPage8, "tabPage8"); + this.tabPage8.Controls.Add(this.cmbroutingMode); this.tabPage8.Name = "tabPage8"; this.tabPage8.UseVisualStyleBackColor = true; // // cmbroutingMode // + resources.ApplyResources(this.cmbroutingMode, "cmbroutingMode"); this.cmbroutingMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbroutingMode.FormattingEnabled = true; this.cmbroutingMode.Items.AddRange(new object[] { @@ -372,16 +380,15 @@ resources.GetString("cmbroutingMode.Items1"), resources.GetString("cmbroutingMode.Items2"), resources.GetString("cmbroutingMode.Items3")}); - resources.ApplyResources(this.cmbroutingMode, "cmbroutingMode"); this.cmbroutingMode.Name = "cmbroutingMode"; // // panel3 // + resources.ApplyResources(this.panel3, "panel3"); this.panel3.Controls.Add(this.btnSetDefRountingRule); this.panel3.Controls.Add(this.labRoutingTips); this.panel3.Controls.Add(this.cmbdomainStrategy); this.panel3.Controls.Add(this.label15); - resources.ApplyResources(this.panel3, "panel3"); this.panel3.Name = "panel3"; // // btnSetDefRountingRule @@ -393,19 +400,19 @@ // // labRoutingTips // - this.labRoutingTips.ForeColor = System.Drawing.Color.Brown; resources.ApplyResources(this.labRoutingTips, "labRoutingTips"); + this.labRoutingTips.ForeColor = System.Drawing.Color.Brown; this.labRoutingTips.Name = "labRoutingTips"; // // cmbdomainStrategy // + resources.ApplyResources(this.cmbdomainStrategy, "cmbdomainStrategy"); this.cmbdomainStrategy.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbdomainStrategy.FormattingEnabled = true; this.cmbdomainStrategy.Items.AddRange(new object[] { resources.GetString("cmbdomainStrategy.Items"), resources.GetString("cmbdomainStrategy.Items1"), resources.GetString("cmbdomainStrategy.Items2")}); - resources.ApplyResources(this.cmbdomainStrategy, "cmbdomainStrategy"); this.cmbdomainStrategy.Name = "cmbdomainStrategy"; // // label15 @@ -415,6 +422,7 @@ // // tabPage6 // + resources.ApplyResources(this.tabPage6, "tabPage6"); this.tabPage6.Controls.Add(this.chkKcpcongestion); this.tabPage6.Controls.Add(this.txtKcpwriteBufferSize); this.tabPage6.Controls.Add(this.label10); @@ -428,7 +436,6 @@ 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; // @@ -500,6 +507,7 @@ // // tabPage7 // + resources.ApplyResources(this.tabPage7, "tabPage7"); this.tabPage7.Controls.Add(this.cbFreshrate); this.tabPage7.Controls.Add(this.lbFreshrate); this.tabPage7.Controls.Add(this.chkEnableStatistics); @@ -507,15 +515,14 @@ 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; // // cbFreshrate // + resources.ApplyResources(this.cbFreshrate, "cbFreshrate"); this.cbFreshrate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbFreshrate.FormattingEnabled = true; - resources.ApplyResources(this.cbFreshrate, "cbFreshrate"); this.cbFreshrate.Name = "cbFreshrate"; // // lbFreshrate @@ -551,11 +558,36 @@ this.chkAutoRun.Name = "chkAutoRun"; this.chkAutoRun.UseVisualStyleBackColor = true; // + // tabPage9 + // + resources.ApplyResources(this.tabPage9, "tabPage9"); + this.tabPage9.Controls.Add(this.txtuserPacRule); + this.tabPage9.Controls.Add(this.panel4); + this.tabPage9.Name = "tabPage9"; + this.tabPage9.UseVisualStyleBackColor = true; + // + // txtuserPacRule + // + resources.ApplyResources(this.txtuserPacRule, "txtuserPacRule"); + this.txtuserPacRule.Name = "txtuserPacRule"; + // + // panel4 + // + resources.ApplyResources(this.panel4, "panel4"); + this.panel4.Controls.Add(this.label4); + this.panel4.Name = "panel4"; + // + // label4 + // + resources.ApplyResources(this.label4, "label4"); + this.label4.ForeColor = System.Drawing.Color.Brown; + this.label4.Name = "label4"; + // // panel2 // + resources.ApplyResources(this.panel2, "panel2"); this.panel2.Controls.Add(this.btnClose); this.panel2.Controls.Add(this.btnOK); - resources.ApplyResources(this.panel2, "panel2"); this.panel2.Name = "panel2"; // // btnOK @@ -601,6 +633,9 @@ 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); @@ -673,5 +708,9 @@ private System.Windows.Forms.Label label16; private System.Windows.Forms.ComboBox cmblistenerType; private System.Windows.Forms.TabPage tabPage8; + private System.Windows.Forms.TabPage tabPage9; + private System.Windows.Forms.TextBox txtuserPacRule; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Label label4; } } \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.cs b/v2rayN/v2rayN/Forms/OptionSettingForm.cs index cefc211a..890041ab 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.cs +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.cs @@ -22,6 +22,8 @@ namespace v2rayN.Forms InitKCP(); InitGUI(); + + InitUserPAC(); } /// @@ -142,6 +144,11 @@ namespace v2rayN.Forms } + private void InitUserPAC() + { + txtuserPacRule.Text = Utils.List2String(config.userPacRule, true); + } + private void btnOK_Click(object sender, EventArgs e) { if (SaveBase() != 0) @@ -164,6 +171,11 @@ namespace v2rayN.Forms return; } + if (SaveUserPAC() != 0) + { + return; + } + if (ConfigHandler.SaveConfig(ref config) == 0) { this.DialogResult = DialogResult.OK; @@ -250,7 +262,7 @@ namespace v2rayN.Forms //remoteDNS config.remoteDNS = txtremoteDNS.Text.TrimEx(); - + config.listenerType = cmblistenerType.SelectedIndex; return 0; } @@ -344,6 +356,15 @@ namespace v2rayN.Forms return 0; } + private int SaveUserPAC() + { + string userPacRule = txtuserPacRule.Text.TrimEx(); + userPacRule = userPacRule.Replace("\"", ""); + + config.userPacRule = Utils.String2List(userPacRule); + + return 0; + } private void btnClose_Click(object sender, EventArgs e) { this.DialogResult = DialogResult.Cancel; diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.resx b/v2rayN/v2rayN/Forms/OptionSettingForm.resx index e2c26e28..105f5b57 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.resx +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.resx @@ -117,1412 +117,34 @@ 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 - - - 42, 98 - - - 65, 12 - - - 34 - - - Http proxy - - - label16 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 0 - - - 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 - - - 124, 94 - - - 464, 20 - - - 33 - - - cmblistenerType - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 1 - - - True - - - NoControl - - - 468, 60 - - - 120, 16 - - - 32 - - - Turn on Sniffing - - - False - - - chksniffingEnabled2 - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 2 - - - True - - - NoControl - - - 468, 27 - - - 120, 16 - - - 31 - - - Turn on Sniffing - - - chksniffingEnabled - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 3 - - - 33, 228 - - - 402, 21 - - - 30 - - - txtremoteDNS - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 4 - - - True - - - 33, 204 - - - 281, 12 - - - 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 - - - 5 - - - True - - - 15, 129 - - - 174, 16 - - - 20 - - - Turn on Mux Multiplexing - - - chkmuxEnabled - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 6 - True - - 15, 63 - - - 120, 16 - - - 19 - - - listening port 2 - - - False - - - chkAllowIn2 - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 7 - - - True - - - 369, 62 - - - 84, 16 - - - 18 - - - Enable UDP - - - False - - - chkudpEnabled2 - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 8 - - - socks - - - http - - - 257, 60 - - - 97, 20 - - - 17 - - - False - - - cmbprotocol2 - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 9 - - - True - - - 206, 64 - - - 53, 12 - - - 16 - - - protocol - - - False - - - label3 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 10 - - - 124, 60 - - - 78, 21 - - - 14 - - - False - - - txtlocalPort2 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 11 - - - False - - - socks - - - http - - - 257, 25 - - - 97, 20 - - - 12 - - - cmbprotocol - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 12 - - - True - - - 206, 29 - - - 53, 12 - - - 11 - - - protocol - - - label1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 13 - - - True - - - 369, 27 - - - 84, 16 - - - 10 - - - Enable UDP - - - chkudpEnabled - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 14 - - - True - - - 15, 160 - - - 126, 16 - - - 9 - - - Record local logs - - - chklogEnabled - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 15 - - - debug - - - info - - - warning - - - error - - - none - - - 257, 158 - - - 97, 20 - - - 6 - - - cmbloglevel - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 16 - - - True - - - 193, 162 - - - 59, 12 - - - 8 - - - Log level - - - label5 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 17 - - - 124, 25 - - - 78, 21 - - - 3 - - - txtlocalPort - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 18 - - - True - - - 33, 29 - - - 89, 12 - - - 2 - - - Listening port - - - label2 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 19 - - - Fill - - - 3, 3 - - - 648, 573 - - - 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 - - - 654, 579 - - - 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 - - - 628, 454 - - - 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 - - - 634, 460 - - - 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 - - - 628, 454 - - - 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 - - - 634, 460 - - - 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 - - - 628, 454 - - - 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 - - - 634, 460 - - - 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, 20 - - - 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 - - - 634, 460 - - - 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, 84 - - - 642, 486 - - - 12 - - - tabControl2 - - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox2 - - - 0 - - - 322, 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 - - - 0 - - - 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 - - - 1 - - - AsIs - - - IPIfNonMatch - - - IPOnDemand - - - 115, 10 - - - 165, 20 - - - 16 - - - cmbdomainStrategy - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel3 - - - 2 - - - True - - - NoControl - - - 5, 14 - - - 95, 12 - - - 17 - - - Domain strategy - - - label15 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel3 - - - 3 - - - Top - - - 3, 17 - - - 642, 67 - - - 19 - - - panel3 - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox2 - - - 1 - - - Fill - - - 3, 3 - - - 648, 573 - - - 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 - - - 654, 579 - - - 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 - - - 84, 16 - - - 20 - - - congestion - - - chkKcpcongestion - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 0 - - - 345, 100 - - - 94, 21 - - - 15 - - - txtKcpwriteBufferSize - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tabPage6 + + 11 - + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox2 + + 1 - - True + + + 30, 176 - - 236, 104 + + Record local logs - - 95, 12 - - - 14 - - - writeBufferSize - - - label10 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 2 - - - 111, 100 - - - 94, 21 - - - 13 - - - txtKcpreadBufferSize - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 3 - - - True - - - 18, 104 - - - 89, 12 - - - 12 - - - readBufferSize - - - label11 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 4 - - - 345, 62 - - - 94, 21 - - - 11 - - - txtKcpdownlinkCapacity - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 5 - - - True - - - 236, 66 - - - 101, 12 - - - 10 - - - downlinkCapacity - - - label8 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 6 - - - 111, 62 - - - 94, 21 - - - 9 - - - txtKcpuplinkCapacity - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 7 - - - True - - - 18, 66 - - - 89, 12 - - - 8 - - - uplinkCapacity - - - label9 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 8 - - - 345, 24 - - - 94, 21 - - - 7 - - - txtKcptti - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 9 - - - True - - - 236, 28 - - - 23, 12 - - - 6 - - - tti - - - label7 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 10 - - - 111, 24 - - - 94, 21 - - - 5 - - - txtKcpmtu - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 11 - - - True - - - 18, 28 - - - 23, 12 - - - 4 - - - mtu - - - label6 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 + + 634, 460 12 @@ -1530,355 +152,1847 @@ 4, 22 - - 3, 3, 3, 3 + + txtKcpwriteBufferSize - - 654, 579 + + groupBox1 - - 2 + + 1 - - Core: KCP settings + + False - - tabPage6 + + 17 - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tabControl1 - - 2 + + groupBox1 - - 161, 84 + + 5 - - 58, 20 + + 94, 21 - - 32 + + 9 - - cbFreshrate + + groupBox1 - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + label15 - - tabPage7 + + tabPage9 - + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 13 + + + 468, 60 + + + + Top + + + 15, 16 + + + 6 + + + txtKcptti + + + tabPage3 + + + 4, 22 + + + cmblistenerType + + 0 - + + 634, 460 + + + 0 + + + 111, 100 + + True - - NoControl + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 30, 92 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 125, 12 + + 3, 3 - - 30 + + 598, 16 - - Statistics freshrate + + Core: basic settings + + + True + + + 120, 16 + + + 281, 12 + + + panel3 + + + True + + + tti + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 84, 16 + + + 65, 12 + + + 628, 454 + + + tabPage7 + + + Only open PAC, do not automatically configure PAC + + + 12 + + + 662, 60 + + + 20 + + + http + + + 7 + + + label5 + + + 648, 573 + + + 18 + + + 206, 64 + + + 95, 12 + + + tabPage6 + + + 14 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 15, 63 + + + tabControl2 + + + 16 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Fill + + + Enable UDP + + + 94, 21 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Fill + + + &Cancel + + + label10 + + + 648, 573 + + + Vertical + + + groupBox1 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + + + 1 + + + Bypassing the LAN address + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Bypassing LAN and mainland address + + + Bypass mainland address + + + Top + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 12 + + + txtKcpmtu lbFreshrate - + + 1 + + + label11 + + + 29 + + + 8 + + + NoControl + + + tabPage6 + + + Only open Http proxy, do not automatically configure proxy server (direct mode) + + + False + + + 4 + + + tabPage6 + + + False + + + tabControl2 + + + 0 + + + $this + + + 6 + + + 2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + + + readBufferSize + + + 0 + + + tabPage6 + + + 3 + + + 558, 16 + + + 18 + + + True + + + Fill + + + 345, 62 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + congestion + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + panel3 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 3, 3, 3, 3 + + + 89, 12 + + + info + + + txtUseragent + + + 1 + + + tabPage7 + + + v2rayN settings + + + 19 + + + 15 + + + Not Enabled Http Proxy + + + 13 + + + 32 + + + 628, 454 + + + 6, 12 + + + groupBox1 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + txtKcpdownlinkCapacity + + + Boot automatically + + + 3, 3, 3, 3 + + + 1 + + + Http proxy + + + 4 + + + Turn on Sniffing + + + tabPage6 + + + 355, 16 + + + 3, 3, 3, 3 + + + 97, 20 + + + 3 + + + 5, 14 + + + 662, 605 + + + 33, 29 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 78, 21 + + + 5, 45 + + + Custom DNS (multiple, separated by commas (,)) + + + tabControl1 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 598, 16 + + + 654, 579 + + + v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + + + warning + + + groupBox1 + + + 0 + + + tabPage7 + + + Statistics freshrate + + + 120, 16 + + + 20 + + + 89, 12 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 18, 66 + + + 20, 143 + + + 11 + + + 4, 4, 4, 4 + + + tabPage6 + + + btnClose + + + Turn on Sniffing + + + groupBox1 + + + 18, 28 + + + 30 + + + 34 + + + 20 + + + 29 + + + 0 + + + 21, 17 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 1 + + + label16 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 14 + + + 19 + + + 4, 22 + + + *Set user pac rules, separated by commas (,) + + + True + + + chksniffingEnabled + + + 5 + + + 174, 16 + + + 16 + + + 30, 92 + + + True + + + groupBox1 + + + 18, 104 + + + tabPage2 + + + socks + + + tabPage5 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 464, 20 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage9 + + + tabPage6 + + + *Set the rules, separated by commas (,); support Domain (pure string / regular / subdomain) and IP + + + tabPage3 + + + 30 + + + 53, 12 + + + 16 + + + label8 + + + 468, 27 + + + label13 + + + chkAutoRun + + + True + + + 654, 579 + + + 94, 21 + + + 3 + + + 14 + + + 12 + + + 1 + + + chkudpEnabled + + + True + + + 33, 204 + + + tabPage1 + + + 5 + + + tabPage6 + + + 2 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 4 + + + btnSetDefRountingRule + + + True + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + label1 + + + 84, 16 + + + tabPage8 + + + True + + + False + + + label7 + + + txtlocalPort + + + tabPage7 + + + 3, 17 + + + 3, 40 + + + labRoutingTips + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 3, 3, 3, 3 + + + 124, 25 + + + protocol + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl2 + + + Turn on Mux Multiplexing + + + True + + + 23, 12 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 402, 21 + + + socks + + + 3, 3 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + chkAllowLANConn + + + 84, 16 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl1 + + + 2.Direct Domain or IP + + + True + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 15, 38 + + + 2 + + + 10 + + + 369, 62 + + + 12 + + + 1.Proxy Domain or IP + + + groupBox1 + + + panel3 + + + 4 + + + NoControl + + + 654, 579 + + + tabControl2 + + + 7 + + + 7 + + + http + + + 53, 12 + + + 193, 162 + + + 2 + + + 0 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage6 + + + label2 + + + 165, 20 + + + False + + + 0 + + + 3, 3 + + + 9 + + + groupBox1 + + + 4.Pre-defined rules + + + 101, 12 + + + 2 + + + 12 + + + 431, 12 + + + cmbprotocol + + + 648, 37 + + + True + + + Enable Statistics(Realtime net speed and traffic data amount. Need restart v2rayN client) + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 4 + + + Listening port + + + Vertical + + + Fill + + + 1 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Vertical + + + 1 + + + 28 + + + 257, 60 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 94, 21 + + + True + + + cmbprotocol2 + + + Open Http proxy and automatically configure proxy server (global mode) + + + groupBox2 + + + 15, 129 + + + 255, 20 + + + mtu + + + 3 + + + panel4 + + + True + + + True + + + 0 + + + 0 + + + 257, 25 + + + 3, 84 + + + groupBox1 + + + Top + + + listening port 2 + + + 97, 20 + + + chkAllowIn2 + + + tabPage2 + + + 14 + + + True + + + True + + + 15, 160 + + + 3 + + + 2 + + + 4, 22 + + + 4 + + + 544, 21 + + + Core: KCP settings + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + error + + + True + + + txtuserPacRule + + + 59, 12 + + + groupBox1 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 634, 460 + + + 11 + + + 120, 16 + + + 662, 10 + + + NoControl + + + txtlocalPort2 + + + 1 + + + True + + + Fill + + + True + + + 7 + + + 27 + + + 10 + + + False + + + Vertical + + + 206, 29 + + + 8 + + + txtUserdirect + + + chkudpEnabled2 + + + 0 + + + 0 + + + 648, 536 + + + Allow connections from the LAN + + + 161, 84 + + + panel3 + + + tabPage6 + + + tabControl2 + + + txtKcpreadBufferSize + + + 3 + + + panel2 + + + 3 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + User PAC settings + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tabPage7 - - 1 + + 9 - - True + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + Log level + + + tabControl1 + + + protocol + + + 6 + + + tabPage4 + + NoControl + + 2 + + + AsIs + 15, 62 - - 558, 16 - - - 29 - - - Enable Statistics(Realtime net speed and traffic data amount. Need restart v2rayN client) - - - chkEnableStatistics - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage7 - - - 2 - - - True - - - 15, 38 - - - 204, 16 - - - 29 - - - Allow connections from the LAN - - - chkAllowLANConn - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage7 - - - 3 - - - 32, 205 - - - 544, 21 - - - 28 - - - txturlGFWList - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage7 - - - 4 - - - True - - - 30, 176 - - - 431, 12 - - - 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 + + 6 tabPage7 - - 5 + + 642, 486 - - True - - - 15, 16 - - - 132, 16 - - - 23 - - - Boot automatically - - - chkAutoRun - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage7 - - - 6 - - + 4, 22 - - 3, 3, 3, 3 + + 58, 20 - - 654, 579 - - - 3 - - - v2rayN settings - - - tabPage7 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl1 - - - 3 - - - Fill - - - 0, 10 - - - 662, 605 - - - 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, 615 - - - 662, 60 - - - 11 - - - panel2 - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this + + tabPage4 1 - - Top + + 42, 98 - - 0, 0 + + 13 - - 662, 10 + + 13 + + + downlinkCapacity 9 - - panel1 + + 78, 21 - + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + cmbroutingMode + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 1 + + + 23, 12 + + + True + + + 8 + + + True + + + 3, 3, 3, 3 + + + 17 + + + tabControl1 + + + 345, 100 + + + 75, 23 + + + 654, 579 + + + 10 + + + 204, 16 + + + 17 + + + 628, 454 + + + debug + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 5 + + + 0, 615 + + + txtUserblock + + + 229, 23 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage1 + + + 15 + + + 2 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + + + Custom GFWList address (please fill in the blank without customization) + + + 97, 20 + + + 32 + + + 345, 24 + + + NoControl + + + 4, 22 + + + cmbdomainStrategy + + + False + + + 257, 158 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + &OK + + + 10 + + + 634, 460 + + + panel2 + + + txtKcpuplinkCapacity + + + 115, 10 + + + groupBox1 + + + chklogEnabled + + + chksniffingEnabled2 + + + tabPage7 + + + 642, 67 + + + 0 + + + 4, 22 + + + True + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Domain strategy + + + tabPage5 + + + 8 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + IPIfNonMatch + + + groupBox1 + + + 4, 22 + + + 23 + + + 3.Block Domain or IP + + + label3 + + + 6 + + + 236, 66 + + + tabPage7 + + + $this + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + $this - - 2 + + 8 - + + txtremoteDNS + + + 3, 3 + + + 19 + + + 33 + + + 4, 22 + + + writeBufferSize + + + 11 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 89, 12 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + + + 31 + + + 369, 27 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Fill + + + tabPage6 + + + groupBox1 + + + groupBox1 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel4 + + True - - - 6, 12 - - 662, 675 + + 29 - - 4, 4, 4, 4 + + Fill - - Settings + + True + + + 3, 3 OptionSettingForm - - v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + + Core: Routing settings + + tabPage8 + + + 2 + + + 236, 104 + + + panel3 + + + Open PAC and automatically configure PAC (PAC mode) + + + 125, 12 + + + NoControl + + + tabPage9 + + + 94, 21 + + + 75, 23 + + + True + + + 33, 228 + + + 654, 579 + + + uplinkCapacity + + + 662, 675 + + + chkEnableStatistics + + + IPOnDemand + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 6 + + + 0 + + + 0 + + + Settings + + + 0 + + + 3, 3, 3, 3 + + + 3, 3 + + + 32, 205 + + + cmbloglevel + + + 111, 62 + + + 1 + + + label4 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox2 + + + 124, 94 + + + btnOK + + + Set default custom routing rules + + + tabPage6 + + + txturlGFWList + + + chkmuxEnabled + + + none + + + tabPage6 + + + tabControl1 + + + 0 + + + chkKcpcongestion + + + 5, 11 + + + 0 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0, 0 + + + Enable UDP + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 3, 3, 3, 3 + + + groupBox1 + + + 18 + + + 126, 16 + + + 267, 16 + + + Global + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 95, 12 + + + groupBox1 + + + Fill + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 9 + + + 0 + + + 322, 10 + + + groupBox1 + + + 0 + + + 94, 21 + + + 3 + + + 3 + + + 3, 3, 3, 3 + + + 236, 28 + + + Bottom + + + 11 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + NoControl + + + 3, 3, 3, 3 + + + 10 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 124, 60 + + + cbFreshrate + + + 132, 16 + + + tabPage6 + + + label6 + + + 111, 24 + + + panel2 + + + 21 + + + label9 + + + 0, 10 + + + panel1 + + + 2 + + + label14 + + + True + + + zh-Hans + \ 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 d1502a31..eb9c86d9 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx @@ -123,6 +123,21 @@ Core:基础设置 + + Core:路由设置 + + + Core:KCP设置 + + + v2rayN设置 + + + *设置用户PAC规则,用逗号(,)隔开 + + + 用户PAC设置 + 53, 12 @@ -214,9 +229,6 @@ 本地监听端口 - - Core:路由设置 - 3, 89 @@ -315,24 +327,12 @@ 域名策略 - - Core:KCP设置 - - - v2rayN设置 - 77, 12 统计刷新频率 - - 305, 12 - - - 缓存天数(0-30, 0关闭缓存单独每天的数据使用情况) - 384, 16 diff --git a/v2rayN/v2rayN/Handler/ConfigHandler.cs b/v2rayN/v2rayN/Handler/ConfigHandler.cs index 0437efcf..3db74a47 100644 --- a/v2rayN/v2rayN/Handler/ConfigHandler.cs +++ b/v2rayN/v2rayN/Handler/ConfigHandler.cs @@ -131,6 +131,10 @@ namespace v2rayN.Handler { config.subItem = new List(); } + if (config.userPacRule == null) + { + config.userPacRule = new List(); + } if (config == null || config.index < 0 diff --git a/v2rayN/v2rayN/Handler/RoutingRuleHandler.cs b/v2rayN/v2rayN/Handler/RoutingRuleHandler.cs deleted file mode 100644 index 511c654b..00000000 --- a/v2rayN/v2rayN/Handler/RoutingRuleHandler.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.RegularExpressions; - -namespace v2rayN.Handler -{ - /// - /// 路由规则文件处理类 - /// - class RoutingRuleHandler - { - /// - /// Parse Pac to v2ray rule - /// - /// - /// - public static List ParsePac(string filePath) - { - string result = Utils.LoadResource(filePath); - if (Utils.IsNullOrEmpty(result)) - { - return null; - } - - //取得rule - string pattern = @"(?is)(?<=\[)(.*)(?=\])"; - Regex rgx = new Regex(pattern); - result = rgx.Match(result).Value; - int index = result.IndexOf("];"); - result = result.Substring(0, index); - if (Utils.IsNullOrEmpty(result)) - { - return null; - } - - string[] arrPac = result.Split(','); - List lstPac = new List(); - foreach (string str in arrPac) - { - //处理有效值 - if (Utils.IsNullOrEmpty(str) - || str.Length <= 3) - { - continue; - } - string value = str.Replace("\",", "").Replace("\"", "").Replace(",", "").Replace(Environment.NewLine, "").Replace(" ", ""); - lstPac.Add(value); - } - - return lstPac; - } - - } -} diff --git a/v2rayN/v2rayN/HttpProxyHandler/PACServerHandle.cs b/v2rayN/v2rayN/HttpProxyHandler/PACServerHandle.cs index d3902d7f..7b47fc4f 100644 --- a/v2rayN/v2rayN/HttpProxyHandler/PACServerHandle.cs +++ b/v2rayN/v2rayN/HttpProxyHandler/PACServerHandle.cs @@ -17,6 +17,7 @@ namespace v2rayN.HttpProxyHandler private static int pacPort = 0; private static HttpWebServer server; private static HttpWebServerB serverB; + private static Config _config; public static bool IsRunning { @@ -28,6 +29,7 @@ namespace v2rayN.HttpProxyHandler public static void Init(Config config) { + _config = config; Global.pacPort = config.GetLocalPort("pac"); if (InitServer("*")) @@ -161,7 +163,6 @@ namespace v2rayN.HttpProxyHandler //} } - private static string GetPacList(string address) { var port = Global.httpPort; @@ -182,6 +183,18 @@ namespace v2rayN.HttpProxyHandler } var pac = File.ReadAllText(strPacfile, Encoding.UTF8); pac = pac.Replace("__PROXY__", proxy); + + if (_config.userPacRule.Count > 0) + { + var keyWords = "var rules = ["; + if (pac.IndexOf(keyWords) >= 0) + { + var userPac = string.Join($"\",{Environment.NewLine}\"", _config.userPacRule.ToArray()); + userPac = string.Format("\"{0}\",", userPac); + pac = pac.Replace(keyWords, keyWords + userPac); + } + } + return pac; } catch diff --git a/v2rayN/v2rayN/Mode/Config.cs b/v2rayN/v2rayN/Mode/Config.cs index e83d1c2c..40d20cf9 100644 --- a/v2rayN/v2rayN/Mode/Config.cs +++ b/v2rayN/v2rayN/Mode/Config.cs @@ -169,6 +169,11 @@ namespace v2rayN.Mode get; set; } + public List userPacRule + { + get; set; + } + #region 函数 public string address() diff --git a/v2rayN/v2rayN/v2rayN.csproj b/v2rayN/v2rayN/v2rayN.csproj index be0a1dcf..c07fc9c8 100644 --- a/v2rayN/v2rayN/v2rayN.csproj +++ b/v2rayN/v2rayN/v2rayN.csproj @@ -230,7 +230,6 @@ -