diff --git a/v2rayN/v2rayN/Base/HttpWebServer.cs b/v2rayN/v2rayN/Base/HttpWebServer.cs deleted file mode 100644 index 9fa72495..00000000 --- a/v2rayN/v2rayN/Base/HttpWebServer.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System; -using System.Net; -using System.Text; -using System.Threading; - -namespace v2rayN.Base -{ - public class HttpWebServer - { - private HttpListener _listener; - private Func _responderMethod; - - public HttpWebServer(string[] prefixes, Func method) - { - try - { - _listener = new HttpListener(); - - if (!HttpListener.IsSupported) - throw new NotSupportedException( - "Needs Windows XP SP2, Server 2003 or later."); - - // URI prefixes are required, for example - // "http://localhost:8080/index/". - if (prefixes == null || prefixes.Length == 0) - throw new ArgumentException("prefixes"); - - // A responder method is required - if (method == null) - throw new ArgumentException("method"); - - foreach (string s in prefixes) - _listener.Prefixes.Add(s); - - _responderMethod = method; - _listener.Start(); - - } - catch (Exception ex) - { - Utils.SaveLog(ex.Message, ex); - throw; - } - } - - public HttpWebServer(Func method, params string[] prefixes) - : this(prefixes, method) { } - - public void Run() - { - ThreadPool.QueueUserWorkItem((o) => - { - Utils.SaveLog("Webserver running..."); - try - { - while (_listener.IsListening) - { - ThreadPool.QueueUserWorkItem((c) => - { - HttpListenerContext ctx = c as HttpListenerContext; - try - { - string address = ctx.Request.LocalEndPoint.Address.ToString(); - Utils.SaveLog("Webserver Request " + address); - string rstr = _responderMethod(address); - byte[] buf = Encoding.UTF8.GetBytes(rstr); - ctx.Response.StatusCode = 200; - ctx.Response.ContentType = "application/x-ns-proxy-autoconfig"; - ctx.Response.ContentLength64 = buf.Length; - ctx.Response.OutputStream.Write(buf, 0, buf.Length); - } - catch - { - } // suppress any exceptions - finally - { - // always close the stream - ctx.Response.OutputStream.Close(); - } - }, _listener.GetContext()); - } - } - catch (Exception ex) - { - Utils.SaveLog(ex.Message, ex); - } // suppress any exceptions - }); - } - - public void Stop() - { - if (_listener != null) - { - _listener.Stop(); - _listener.Close(); - _listener = null; - } - } - - } -} diff --git a/v2rayN/v2rayN/Base/HttpWebServerB.cs b/v2rayN/v2rayN/Base/HttpWebServerB.cs deleted file mode 100644 index fcbca1dd..00000000 --- a/v2rayN/v2rayN/Base/HttpWebServerB.cs +++ /dev/null @@ -1,141 +0,0 @@ -using System; -using System.IO; -using System.Net; -using System.Net.Sockets; -using System.Threading; - -namespace v2rayN.Base -{ - public class HttpWebServerB - { - private TcpListener listener; - private int port; - private Func _responderMethod; - - public HttpWebServerB(int port, Func method) - { - this.port = port; - this._responderMethod = method; - - Thread thread = new Thread(StartListen) - { - IsBackground = true - }; - thread.Start(); - } - - public void Stop() - { - if (listener != null) - { - listener.Stop(); - listener = null; - } - } - - private void StartListen() - { - try - { - listener = new TcpListener(IPAddress.Any, port); - listener.Start(); - Utils.SaveLog("WebserverB running..."); - - while (true) - { - if (!listener.Pending()) - { - Thread.Sleep(100); - continue; - } - - TcpClient socket = listener.AcceptTcpClient(); - Thread thread = new Thread(new ParameterizedThreadStart(ProcessThread)) - { - IsBackground = true - }; - thread.Start(socket); - Thread.Sleep(1); - } - } - catch - { - Utils.SaveLog("WebserverB start fail."); - } - } - private void ProcessThread(object obj) - { - try - { - TcpClient socket = obj as TcpClient; - - BufferedStream inputStream = new BufferedStream(socket.GetStream()); - StreamWriter outputStream = new StreamWriter(new BufferedStream(socket.GetStream())); - if (inputStream.CanRead) - { - string data = ReadStream(inputStream); - - if (data.Contains("/pac/")) - { - if (_responderMethod != null) - { - string address = ((IPEndPoint)socket.Client.LocalEndPoint).Address.ToString(); - Utils.SaveLog("WebserverB Request " + address); - string pac = _responderMethod(address); - - if (inputStream.CanWrite) - { - WriteStream(outputStream, pac); - } - } - } - } - - outputStream.BaseStream.Flush(); - inputStream = null; - outputStream = null; - socket.Close(); - } - catch (Exception ex) - { - Utils.SaveLog(ex.Message, ex); - } - } - - private string ReadStream(Stream inputStream) - { - int nextchar; - string data = ""; - while (true) - { - nextchar = inputStream.ReadByte(); - if (nextchar == '\n') - { - break; - } - if (nextchar == '\r') - { - continue; - } - if (nextchar == -1) - { - Thread.Sleep(1); - continue; - }; - data += Convert.ToChar(nextchar); - } - return data; - } - - private void WriteStream(StreamWriter outputStream, string pac) - { - string content_type = "application/x-ns-proxy-autoconfig"; - outputStream.WriteLine("HTTP/1.1 200 OK"); - outputStream.WriteLine(String.Format("Content-Type:{0}", content_type)); - outputStream.WriteLine("Connection: close"); - outputStream.WriteLine(""); - outputStream.WriteLine(pac); - outputStream.Flush(); - } - } -} diff --git a/v2rayN/v2rayN/Base/ListViewFlickerFree.cs b/v2rayN/v2rayN/Base/ListViewFlickerFree.cs index a113a7bc..c70ccfc6 100644 --- a/v2rayN/v2rayN/Base/ListViewFlickerFree.cs +++ b/v2rayN/v2rayN/Base/ListViewFlickerFree.cs @@ -46,5 +46,7 @@ namespace v2rayN.Base } catch { } } + + } } \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/AddServer3Form.Designer.cs b/v2rayN/v2rayN/Forms/AddServer3Form.Designer.cs index 06312421..27b7c91c 100644 --- a/v2rayN/v2rayN/Forms/AddServer3Form.Designer.cs +++ b/v2rayN/v2rayN/Forms/AddServer3Form.Designer.cs @@ -55,15 +55,14 @@ // // btnClose // - resources.ApplyResources(this.btnClose, "btnClose"); this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel; + resources.ApplyResources(this.btnClose, "btnClose"); this.btnClose.Name = "btnClose"; this.btnClose.UseVisualStyleBackColor = true; this.btnClose.Click += new System.EventHandler(this.btnClose_Click); // // groupBox1 // - resources.ApplyResources(this.groupBox1, "groupBox1"); this.groupBox1.Controls.Add(this.label13); this.groupBox1.Controls.Add(this.cmbSecurity); this.groupBox1.Controls.Add(this.txtRemarks); @@ -75,6 +74,7 @@ this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.txtAddress); this.groupBox1.Controls.Add(this.label1); + resources.ApplyResources(this.groupBox1, "groupBox1"); this.groupBox1.Name = "groupBox1"; this.groupBox1.TabStop = false; // @@ -85,7 +85,6 @@ // // cmbSecurity // - resources.ApplyResources(this.cmbSecurity, "cmbSecurity"); this.cmbSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbSecurity.FormattingEnabled = true; this.cmbSecurity.Items.AddRange(new object[] { @@ -94,9 +93,8 @@ resources.GetString("cmbSecurity.Items2"), resources.GetString("cmbSecurity.Items3"), resources.GetString("cmbSecurity.Items4"), - resources.GetString("cmbSecurity.Items5"), - resources.GetString("cmbSecurity.Items6"), - resources.GetString("cmbSecurity.Items7")}); + resources.GetString("cmbSecurity.Items5")}); + resources.ApplyResources(this.cmbSecurity, "cmbSecurity"); this.cmbSecurity.Name = "cmbSecurity"; // // txtRemarks @@ -146,9 +144,9 @@ // // 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 @@ -165,22 +163,22 @@ // // menuServer // - resources.ApplyResources(this.menuServer, "menuServer"); this.menuServer.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.MenuItem1}); + resources.ApplyResources(this.menuServer, "menuServer"); this.menuServer.Name = "menuServer"; // // MenuItem1 // - resources.ApplyResources(this.MenuItem1, "MenuItem1"); this.MenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuItemImportClipboard}); this.MenuItem1.Name = "MenuItem1"; + resources.ApplyResources(this.MenuItem1, "MenuItem1"); // // menuItemImportClipboard // - resources.ApplyResources(this.menuItemImportClipboard, "menuItemImportClipboard"); this.menuItemImportClipboard.Name = "menuItemImportClipboard"; + resources.ApplyResources(this.menuItemImportClipboard, "menuItemImportClipboard"); this.menuItemImportClipboard.Click += new System.EventHandler(this.menuItemImportClipboard_Click); // // AddServer3Form diff --git a/v2rayN/v2rayN/Forms/AddServer3Form.cs b/v2rayN/v2rayN/Forms/AddServer3Form.cs index 8113a784..d1a4a858 100644 --- a/v2rayN/v2rayN/Forms/AddServer3Form.cs +++ b/v2rayN/v2rayN/Forms/AddServer3Form.cs @@ -119,7 +119,7 @@ namespace v2rayN.Forms { ClearServer(); - VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg); + VmessItem vmessItem = ShareHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg); if (vmessItem == null) { UI.ShowWarning(msg); diff --git a/v2rayN/v2rayN/Forms/AddServer3Form.resx b/v2rayN/v2rayN/Forms/AddServer3Form.resx index 272c310f..f17e4d82 100644 --- a/v2rayN/v2rayN/Forms/AddServer3Form.resx +++ b/v2rayN/v2rayN/Forms/AddServer3Form.resx @@ -118,489 +118,483 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 396, 17 + + + 75, 23 + + + + 4 + + + &Cancel + + + btnClose + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 0 + + + True + + + 337, 158 + 113, 12 - - 53, 12 + + 22 - - label6 + + * Fill in manually - - groupBox1 + + label13 - - System.Windows.Forms.GroupBox, 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 - - 547, 25 - - - - 11 - - - $this - groupBox1 - - 8 - - - - Bottom - - - Import configuration file - - - groupBox1 - - - panel1 - - - 3 - - - Password - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuItemImportClipboard - - - Fill - - - groupBox1 - - - 8 - - - 89, 12 - - - 127, 27 - - - System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 0 - aes-256-cfb + aes-256-gcm - - 6 + + aes-128-gcm - - 5 + + chacha20-poly1305 - - 303, 17 + + chacha20-ietf-poly1305 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + none - - 4 - - - MenuItem1 - - - 0 - - - 359, 21 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 396, 17 - - - 8 - - - 0, 0 - - - label1 - - - 547, 60 - - - 0, 25 - - - Encryption - - - groupBox1 - - - True - - - 22 - - - 162, 21 + + plain 127, 123 - - 127, 91 + + 194, 20 - + + 6 + + + cmbSecurity + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + groupBox1 - - panel2 + + 1 - - 5 + + 127, 154 - + + 194, 21 + + + 11 + + + txtRemarks + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + 2 + + True + + + 12, 155 + + + 95, 12 + + + 10 + Alias (remarks) - + + label6 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + groupBox1 - + + 3 + + True + + 12, 124 + + + 65, 12 + + + 8 + + + Encryption + label5 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 4 + + + 127, 91 + + + * + + + 278, 21 + + + 5 + txtId System.Windows.Forms.TextBox, 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 - - - 12, 31 - - + groupBox1 - - 1 - - - AddServer3Form - - - 194, 21 - - - groupBox1 - - - 127, 59 - - - 0 - - - System.Windows.Forms.Button, 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 - - - $this - - - 71, 12 - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 12, 124 - - - 2 - - - 10 - - - txtPort - - - aes-128-cfb - - - 547, 10 - - - 0, 35 - 5 - - 235, 22 - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Edit or add a [Shadowsocks] server - - - &OK - - - chacha20 - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - btnClose - - - panel2 - - - 0 - - - 3 + + True 12, 93 - - 194, 20 + + 53, 12 - - 10 + + 4 - - chacha20-ietf + + Password - - True + + label3 - - panel2 - - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + groupBox1 + + + 6 + + + 127, 59 + 194, 21 + + 3 + + + txtPort + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 7 + + + True + + + 12, 62 + + + 71, 12 + + + 2 + + + Server port + + + label2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 8 + + + 127, 27 + + + 359, 21 + 1 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + txtAddress - - 6 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 1 + + groupBox1 - - 7 + + 9 - - label13 + + True - - aes-256-gcm + + 12, 31 - + + 89, 12 + + + 0 + + + Server address + + + label1 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 groupBox1 - - v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + + 10 - - label3 + + + Fill - - Server port - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 0, 231 - - - 9 - - - aes-128-gcm - - - 4 - - - &Cancel - - - True - - - 6, 12 - - - True - - - Server address - - - menuServer - - - txtAddress - - - 127, 154 - - - chacha20-poly1305 - - - 95, 12 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - * Fill in manually - - - 7 - - - label2 - - - 12, 62 - - - 547, 291 - - - chacha20-ietf-poly1305 - - - btnOK - - - cmbSecurity - - - $this + + 0, 35 547, 196 - + 3 - - 75, 23 - - - 6 - - - 337, 158 - - - 65, 12 - - - 4 - - - 2 - - - 1 - - - * - - - 75, 23 - - - Import URL from clipboard - - - groupBox1 - Server - - txtRemarks + + groupBox1 - - 12, 155 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True + + $this - - 278, 21 + + 0 + + + 303, 17 + + + 75, 23 + + + 5 + + + &OK + + + btnOK + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 1 + + + Bottom + + + 0, 231 + + + 547, 60 + + + 7 + + + panel2 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 Top - + + 0, 25 + + + 547, 10 + + + 6 + + + panel1 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + 17, 17 + + + 235, 22 + + + Import URL from clipboard + + + 162, 21 + + + Import configuration file + + + 0, 0 + + + 547, 25 + + + 8 + + + menuServer + + + System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + 3 True - - 17, 17 - + + 6, 12 + + + 547, 291 + + + Edit or add a [Shadowsocks] server + + + MenuItem1 + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuItemImportClipboard + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + AddServer3Form + + + v2rayN.Forms.BaseServerForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/AddServer4Form.cs b/v2rayN/v2rayN/Forms/AddServer4Form.cs index 23ec6aaa..29102347 100644 --- a/v2rayN/v2rayN/Forms/AddServer4Form.cs +++ b/v2rayN/v2rayN/Forms/AddServer4Form.cs @@ -108,7 +108,7 @@ namespace v2rayN.Forms { ClearServer(); - VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg); + VmessItem vmessItem = ShareHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg); if (vmessItem == null) { UI.ShowWarning(msg); diff --git a/v2rayN/v2rayN/Forms/AddServer5Form.Designer.cs b/v2rayN/v2rayN/Forms/AddServer5Form.Designer.cs index 423b7386..9e7cab4f 100644 --- a/v2rayN/v2rayN/Forms/AddServer5Form.Designer.cs +++ b/v2rayN/v2rayN/Forms/AddServer5Form.Designer.cs @@ -39,6 +39,8 @@ this.label24 = new System.Windows.Forms.Label(); this.label23 = new System.Windows.Forms.Label(); this.panTlsMore = new System.Windows.Forms.Panel(); + this.txtSNI = new System.Windows.Forms.TextBox(); + this.label22 = new System.Windows.Forms.Label(); this.label21 = new System.Windows.Forms.Label(); this.cmbAllowInsecure = new System.Windows.Forms.ComboBox(); this.label9 = new System.Windows.Forms.Label(); @@ -78,6 +80,7 @@ this.MenuItemImportServer = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.MenuItemImportClipboard = new System.Windows.Forms.ToolStripMenuItem(); + this.label25 = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.panTlsMore.SuspendLayout(); @@ -146,6 +149,7 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.label25); this.groupBox2.Controls.Add(this.label24); this.groupBox2.Controls.Add(this.label23); this.groupBox2.Controls.Add(this.panTlsMore); @@ -182,11 +186,23 @@ // // panTlsMore // + this.panTlsMore.Controls.Add(this.txtSNI); + this.panTlsMore.Controls.Add(this.label22); this.panTlsMore.Controls.Add(this.label21); this.panTlsMore.Controls.Add(this.cmbAllowInsecure); resources.ApplyResources(this.panTlsMore, "panTlsMore"); this.panTlsMore.Name = "panTlsMore"; // + // txtSNI + // + resources.ApplyResources(this.txtSNI, "txtSNI"); + this.txtSNI.Name = "txtSNI"; + // + // label22 + // + resources.ApplyResources(this.label22, "label22"); + this.label22.Name = "label22"; + // // label21 // resources.ApplyResources(this.label21, "label21"); @@ -227,7 +243,8 @@ resources.GetString("cmbNetwork.Items1"), resources.GetString("cmbNetwork.Items2"), resources.GetString("cmbNetwork.Items3"), - resources.GetString("cmbNetwork.Items4")}); + resources.GetString("cmbNetwork.Items4"), + resources.GetString("cmbNetwork.Items5")}); resources.ApplyResources(this.cmbNetwork, "cmbNetwork"); this.cmbNetwork.Name = "cmbNetwork"; this.cmbNetwork.SelectedIndexChanged += new System.EventHandler(this.cmbNetwork_SelectedIndexChanged); @@ -432,6 +449,11 @@ resources.ApplyResources(this.MenuItemImportClipboard, "MenuItemImportClipboard"); this.MenuItemImportClipboard.Click += new System.EventHandler(this.MenuItemImportClipboard_Click); // + // label25 + // + resources.ApplyResources(this.label25, "label25"); + this.label25.Name = "label25"; + // // AddServer5Form // resources.ApplyResources(this, "$this"); @@ -509,5 +531,8 @@ private System.Windows.Forms.Label label23; private System.Windows.Forms.ComboBox cmbFlow; private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox txtSNI; + private System.Windows.Forms.Label label22; + private System.Windows.Forms.Label label25; } } \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/AddServer5Form.cs b/v2rayN/v2rayN/Forms/AddServer5Form.cs index d426e5c6..1a389b3d 100644 --- a/v2rayN/v2rayN/Forms/AddServer5Form.cs +++ b/v2rayN/v2rayN/Forms/AddServer5Form.cs @@ -6,7 +6,7 @@ using v2rayN.Mode; namespace v2rayN.Forms { public partial class AddServer5Form : BaseServerForm - { + { public AddServer5Form() { @@ -45,6 +45,7 @@ namespace v2rayN.Forms txtPath.Text = vmessItem.path; cmbStreamSecurity.Text = vmessItem.streamSecurity; cmbAllowInsecure.Text = vmessItem.allowInsecure; + txtSNI.Text = vmessItem.sni; } @@ -66,6 +67,7 @@ namespace v2rayN.Forms cmbStreamSecurity.Text = ""; cmbAllowInsecure.Text = ""; txtPath.Text = ""; + txtSNI.Text = ""; } @@ -122,6 +124,7 @@ namespace v2rayN.Forms string path = txtPath.Text; string streamSecurity = cmbStreamSecurity.Text; string allowInsecure = cmbAllowInsecure.Text; + string sni = txtSNI.Text; if (Utils.IsNullOrEmpty(address)) { @@ -153,6 +156,7 @@ namespace v2rayN.Forms vmessItem.path = path.Replace(" ", ""); vmessItem.streamSecurity = streamSecurity; vmessItem.allowInsecure = allowInsecure; + vmessItem.sni = sni; if (ConfigHandler.AddVlessServer(ref config, vmessItem, EditIndex) == 0) { @@ -263,7 +267,7 @@ namespace v2rayN.Forms { ClearServer(); - VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg); + VmessItem vmessItem = ShareHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg); if (vmessItem == null) { UI.ShowWarning(msg); diff --git a/v2rayN/v2rayN/Forms/AddServer5Form.resx b/v2rayN/v2rayN/Forms/AddServer5Form.resx index e4c57a41..5a9fa9be 100644 --- a/v2rayN/v2rayN/Forms/AddServer5Form.resx +++ b/v2rayN/v2rayN/Forms/AddServer5Form.resx @@ -261,6 +261,36 @@ 3 + + True + + + NoControl + + + 529, 210 + + + 113, 12 + + + 37 + + + 4)grpc serviceName + + + label25 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox2 + + + 0 + True @@ -268,7 +298,7 @@ NoControl - 529, 207 + 529, 197 119, 12 @@ -289,7 +319,7 @@ groupBox2 - 0 + 1 True @@ -319,6 +349,57 @@ groupBox2 + 2 + + + 297, 7 + + + 200, 21 + + + 35 + + + txtSNI + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panTlsMore + + + 0 + + + True + + + NoControl + + + 267, 11 + + + 23, 12 + + + 34 + + + SNI + + + label22 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panTlsMore + + 1 @@ -349,7 +430,7 @@ panTlsMore - 0 + 2 @@ -361,10 +442,10 @@ false - 107, 7 + 100, 7 - 91, 20 + 80, 20 30 @@ -379,13 +460,13 @@ panTlsMore - 1 + 3 - 284, 232 + 200, 232 - 338, 35 + 500, 35 33 @@ -400,7 +481,7 @@ groupBox2 - 2 + 3 True @@ -427,7 +508,7 @@ groupBox2 - 3 + 4 True @@ -454,7 +535,7 @@ groupBox2 - 4 + 5 127, 169 @@ -478,7 +559,7 @@ groupBox2 - 5 + 6 tcp @@ -495,6 +576,9 @@ quic + + grpc + 192, 28 @@ -514,7 +598,7 @@ groupBox2 - 6 + 7 True @@ -541,7 +625,7 @@ groupBox2 - 7 + 8 True @@ -568,13 +652,13 @@ groupBox2 - 8 + 9 True - 529, 189 + 529, 183 59, 12 @@ -595,7 +679,7 @@ groupBox2 - 9 + 10 True @@ -622,13 +706,13 @@ groupBox2 - 10 + 11 True - 529, 172 + 529, 169 59, 12 @@ -649,7 +733,7 @@ groupBox2 - 11 + 12 True @@ -676,7 +760,7 @@ groupBox2 - 12 + 13 True @@ -703,7 +787,7 @@ groupBox2 - 13 + 14 @@ -718,7 +802,7 @@ 127, 239 - 143, 20 + 60, 20 21 @@ -733,7 +817,7 @@ groupBox2 - 14 + 15 True @@ -760,7 +844,7 @@ groupBox2 - 15 + 16 158, 100 @@ -784,7 +868,7 @@ groupBox2 - 16 + 17 True @@ -811,7 +895,7 @@ groupBox2 - 17 + 18 True @@ -838,7 +922,7 @@ groupBox2 - 18 + 19 none @@ -880,7 +964,7 @@ groupBox2 - 19 + 20 Bottom diff --git a/v2rayN/v2rayN/Forms/AddServer5Form.zh-Hans.resx b/v2rayN/v2rayN/Forms/AddServer5Form.zh-Hans.resx index 46ec6353..841c0bd2 100644 --- a/v2rayN/v2rayN/Forms/AddServer5Form.zh-Hans.resx +++ b/v2rayN/v2rayN/Forms/AddServer5Form.zh-Hans.resx @@ -120,9 +120,6 @@ 取消(&C) - - 服务器 - 220, 20 @@ -139,9 +136,6 @@ *手填,方便识别管理 - - 底层传输方式(transport) - 149, 12 @@ -161,7 +155,7 @@ 跳过证书验证(allowInsecure) - 223, 7 + 181, 7 353, 36 @@ -259,6 +253,9 @@ 127, 67 + + 底层传输方式(transport) + 353, 158 @@ -304,19 +301,12 @@ 地址(address) + + 服务器 + 确定(&O) - - - False - - - 92, 21 - - - 导入配置文件 - 171, 22 @@ -338,6 +328,16 @@ 从剪贴板导入URL + + + False + + + 92, 21 + + + 导入配置文件 + 编辑或添加[VLESS]服务器 diff --git a/v2rayN/v2rayN/Forms/AddServer6Form.Designer.cs b/v2rayN/v2rayN/Forms/AddServer6Form.Designer.cs index eba21fc8..fc67c5ec 100644 --- a/v2rayN/v2rayN/Forms/AddServer6Form.Designer.cs +++ b/v2rayN/v2rayN/Forms/AddServer6Form.Designer.cs @@ -31,6 +31,12 @@ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddServer6Form)); this.btnClose = new System.Windows.Forms.Button(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.label21 = new System.Windows.Forms.Label(); + this.cmbAllowInsecure = new System.Windows.Forms.ComboBox(); + this.label15 = new System.Windows.Forms.Label(); + this.cmbStreamSecurity = new System.Windows.Forms.ComboBox(); + this.label4 = new System.Windows.Forms.Label(); + this.txtSNI = new System.Windows.Forms.TextBox(); this.label13 = new System.Windows.Forms.Label(); this.txtRemarks = new System.Windows.Forms.TextBox(); this.label6 = new System.Windows.Forms.Label(); @@ -58,6 +64,12 @@ // groupBox1 // resources.ApplyResources(this.groupBox1, "groupBox1"); + this.groupBox1.Controls.Add(this.label21); + this.groupBox1.Controls.Add(this.cmbAllowInsecure); + this.groupBox1.Controls.Add(this.label15); + this.groupBox1.Controls.Add(this.cmbStreamSecurity); + this.groupBox1.Controls.Add(this.label4); + this.groupBox1.Controls.Add(this.txtSNI); this.groupBox1.Controls.Add(this.label13); this.groupBox1.Controls.Add(this.txtRemarks); this.groupBox1.Controls.Add(this.label6); @@ -70,6 +82,47 @@ this.groupBox1.Name = "groupBox1"; this.groupBox1.TabStop = false; // + // label21 + // + resources.ApplyResources(this.label21, "label21"); + this.label21.Name = "label21"; + // + // cmbAllowInsecure + // + resources.ApplyResources(this.cmbAllowInsecure, "cmbAllowInsecure"); + this.cmbAllowInsecure.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbAllowInsecure.FormattingEnabled = true; + this.cmbAllowInsecure.Items.AddRange(new object[] { + resources.GetString("cmbAllowInsecure.Items"), + resources.GetString("cmbAllowInsecure.Items1"), + resources.GetString("cmbAllowInsecure.Items2")}); + this.cmbAllowInsecure.Name = "cmbAllowInsecure"; + // + // label15 + // + resources.ApplyResources(this.label15, "label15"); + this.label15.Name = "label15"; + // + // cmbStreamSecurity + // + resources.ApplyResources(this.cmbStreamSecurity, "cmbStreamSecurity"); + this.cmbStreamSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbStreamSecurity.FormattingEnabled = true; + this.cmbStreamSecurity.Items.AddRange(new object[] { + resources.GetString("cmbStreamSecurity.Items"), + resources.GetString("cmbStreamSecurity.Items1")}); + this.cmbStreamSecurity.Name = "cmbStreamSecurity"; + // + // label4 + // + resources.ApplyResources(this.label4, "label4"); + this.label4.Name = "label4"; + // + // txtSNI + // + resources.ApplyResources(this.txtSNI, "txtSNI"); + this.txtSNI.Name = "txtSNI"; + // // label13 // resources.ApplyResources(this.label13, "label13"); @@ -169,5 +222,11 @@ private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox txtSNI; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.ComboBox cmbStreamSecurity; + private System.Windows.Forms.Label label21; + private System.Windows.Forms.ComboBox cmbAllowInsecure; } } \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/AddServer6Form.cs b/v2rayN/v2rayN/Forms/AddServer6Form.cs index 37e3f565..e7d35165 100644 --- a/v2rayN/v2rayN/Forms/AddServer6Form.cs +++ b/v2rayN/v2rayN/Forms/AddServer6Form.cs @@ -35,7 +35,10 @@ namespace v2rayN.Forms txtAddress.Text = vmessItem.address; txtPort.Text = vmessItem.port.ToString(); txtId.Text = vmessItem.id; + txtSNI.Text = vmessItem.sni; txtRemarks.Text = vmessItem.remarks; + cmbStreamSecurity.Text = vmessItem.streamSecurity; + cmbAllowInsecure.Text = vmessItem.allowInsecure; } @@ -47,7 +50,10 @@ namespace v2rayN.Forms txtAddress.Text = ""; txtPort.Text = ""; txtId.Text = ""; - txtRemarks.Text = ""; + txtSNI.Text = ""; + txtRemarks.Text = ""; + cmbStreamSecurity.Text = "tls"; + cmbAllowInsecure.Text = ""; } private void btnOK_Click(object sender, EventArgs e) @@ -55,7 +61,10 @@ namespace v2rayN.Forms string address = txtAddress.Text; string port = txtPort.Text; string id = txtId.Text; + string sni = txtSNI.Text; string remarks = txtRemarks.Text; + string streamSecurity = cmbStreamSecurity.Text; + string allowInsecure = cmbAllowInsecure.Text; if (Utils.IsNullOrEmpty(address)) { @@ -76,7 +85,10 @@ namespace v2rayN.Forms vmessItem.address = address; vmessItem.port = Utils.ToInt(port); vmessItem.id = id; + vmessItem.sni = sni.Replace(" ", ""); vmessItem.remarks = remarks; + vmessItem.streamSecurity = streamSecurity; + vmessItem.allowInsecure = allowInsecure; if (ConfigHandler.AddTrojanServer(ref config, vmessItem, EditIndex) == 0) { diff --git a/v2rayN/v2rayN/Forms/AddServer6Form.resx b/v2rayN/v2rayN/Forms/AddServer6Form.resx index e3935dc5..7add00f3 100644 --- a/v2rayN/v2rayN/Forms/AddServer6Form.resx +++ b/v2rayN/v2rayN/Forms/AddServer6Form.resx @@ -117,101 +117,332 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - groupBox1 + + + 113, 12 - - Server address + + 312, 185 + + + 53, 12 - - 3 + + True - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + label6 + + + True + + + groupBox1 + + + panel2 + + + 24 + + + 11 + + + allowInsecure Bottom - - txtPort + + Alias (remarks) - - True + + 3 - + + Password + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + NoControl + + groupBox1 - - 4 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - btnOK - - - txtRemarks - - - - 194, 21 - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - AddServer6Form - - - label1 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - panel2 - - - 12, 155 - - - True - - - 53, 12 + + cmbStreamSecurity Fill - - 194, 21 + + groupBox1 + + + NoControl + + + 89, 12 + + + 127, 27 + + + 6 + + + Edit or add a [Trojan] server + + + 60, 20 + + + 5 + + + groupBox1 + + + 303, 17 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 4 + + + 0 + + + 359, 21 + + + 1 + + + True + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 12 + + + groupBox1 + + + label1 + + + 25 + + + 0, 0 + + + groupBox1 + + + True + + + 22 + + + 75, 23 + + + True + + + 13 + + + 127, 91 + + + panel2 + + + 3 + + + 5 + + + 2 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 groupBox1 - - 6, 12 + + cmbAllowInsecure - - True + + txtId - - label3 + + 12, 156 - - 127, 154 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 12, 31 + + + 1 + + + 1 + + + AddServer6Form + + + 2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 127, 59 + + + 80, 20 + + + 4 + + + 0 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 32 + + + 547, 60 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 71, 12 + + + $this + + + groupBox1 + + + + + + 23 + + + txtPort + + + panel2 + + + 11 + + + 547, 10 + + + 0, 10 + + + 9 + + + 26 + + + label4 + + + &OK + + + 5 + + + groupBox1 + + + btnClose + + + txtSNI + + + 0 + + + 23, 12 + + + 12, 93 + + + 2 + + + 194, 21 + + + 194, 21 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + true + + + 1 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 6 @@ -219,268 +450,208 @@ 7 - - groupBox1 - - - 113, 12 - - - 12, 93 - - - 8 - - - Server - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 0 - - - 2 - - - 547, 60 - - - 89, 12 - - - 278, 21 - - - 359, 21 - - - label6 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - * - - - groupBox1 - - - * Fill in manually - - - 11 - - - 10 - - - 71, 12 - - - 75, 23 - - - panel1 - - - txtId - - - 12, 62 - - - 1 - - - btnClose - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - &OK - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Password - - - 75, 23 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - txtAddress - - - 547, 10 - - - Top - - - 0, 10 - - - 2 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 547, 221 - - - 2 - - - groupBox1 - - - 4 - - - 3 - - - 127, 27 - - - 5 - - - groupBox1 - - - True - - - 127, 59 - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Alias (remarks) - - - 5 - - - groupBox1 - - - 303, 17 - - - $this - - - 6 - - - &Cancel - - - 12, 31 - - - Edit or add a [Trojan] server - - - 0 - - - Server port - - - 4 - - - 337, 158 - - - groupBox1 - - - 127, 91 - - - 5 - - - $this - - - 1 - - - 0, 0 - - - 1 - label13 - - 3 + + 359, 21 - - 95, 12 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - label2 - - - 0 - - - panel2 - - - 0, 231 - - - 22 - - - 7 - - - 547, 291 - - - 0 + + groupBox1 v2rayN.Forms.BaseServerForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - $this + + label3 + + + Server port + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Top 396, 17 - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 1 + + 0, 231 - - panel2 + + tls + + + txtRemarks + + + 33 + + + NoControl + + + 12, 189 + + + &Cancel + + + True + + + xtls + + + 6, 12 + + + label21 + + + Server address + + + false + + + TLS + + + 95, 12 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 127, 185 System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + * Fill in manually + + + 14 + + + label2 + + + groupBox1 + + + panel1 + + + 12, 62 + + + 547, 291 + + + btnOK + + + 0 + + + $this + + + 547, 221 + + + 8 + + + 75, 23 + + + 10 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 83, 12 + + + 337, 125 + + + True + + + 4 + + + 7 + + + 127, 121 + + + * + + + txtAddress + + + 23, 12 + + + 224, 189 + + + groupBox1 + + + label15 + + + groupBox1 + + + Server + + + 127, 152 + + + 10 + + + 12, 125 + + + True + + + SNI + + + 359, 21 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 3 + True + + zh-Hans + \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/AddServer6Form.zh-Hans.resx b/v2rayN/v2rayN/Forms/AddServer6Form.zh-Hans.resx index d7642edd..dd715fc9 100644 --- a/v2rayN/v2rayN/Forms/AddServer6Form.zh-Hans.resx +++ b/v2rayN/v2rayN/Forms/AddServer6Form.zh-Hans.resx @@ -120,13 +120,29 @@ 取消(&C) - - 服务器 + + + 167, 12 + + + 跳过证书验证(allowInsecure) + + + 406, 185 + + + 107, 12 + + + 底层传输安全(tls) + + + + False *手填,方便识别管理 - 83, 12 @@ -151,6 +167,9 @@ 服务器地址 + + 服务器 + 确定(&O) diff --git a/v2rayN/v2rayN/Forms/AddServerForm.Designer.cs b/v2rayN/v2rayN/Forms/AddServerForm.Designer.cs index a96b32ab..22f776c2 100644 --- a/v2rayN/v2rayN/Forms/AddServerForm.Designer.cs +++ b/v2rayN/v2rayN/Forms/AddServerForm.Designer.cs @@ -37,6 +37,8 @@ this.label24 = new System.Windows.Forms.Label(); this.label23 = new System.Windows.Forms.Label(); this.panTlsMore = new System.Windows.Forms.Panel(); + this.txtSNI = new System.Windows.Forms.TextBox(); + this.label22 = new System.Windows.Forms.Label(); this.label21 = new System.Windows.Forms.Label(); this.cmbAllowInsecure = new System.Windows.Forms.ComboBox(); this.label9 = new System.Windows.Forms.Label(); @@ -78,6 +80,7 @@ this.MenuItemImportServer = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.MenuItemImportClipboard = new System.Windows.Forms.ToolStripMenuItem(); + this.label25 = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.panTlsMore.SuspendLayout(); @@ -129,6 +132,7 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.label25); this.groupBox2.Controls.Add(this.label24); this.groupBox2.Controls.Add(this.label23); this.groupBox2.Controls.Add(this.panTlsMore); @@ -165,11 +169,23 @@ // // panTlsMore // + this.panTlsMore.Controls.Add(this.txtSNI); + this.panTlsMore.Controls.Add(this.label22); this.panTlsMore.Controls.Add(this.label21); this.panTlsMore.Controls.Add(this.cmbAllowInsecure); resources.ApplyResources(this.panTlsMore, "panTlsMore"); this.panTlsMore.Name = "panTlsMore"; // + // txtSNI + // + resources.ApplyResources(this.txtSNI, "txtSNI"); + this.txtSNI.Name = "txtSNI"; + // + // label22 + // + resources.ApplyResources(this.label22, "label22"); + this.label22.Name = "label22"; + // // label21 // resources.ApplyResources(this.label21, "label21"); @@ -210,7 +226,8 @@ resources.GetString("cmbNetwork.Items1"), resources.GetString("cmbNetwork.Items2"), resources.GetString("cmbNetwork.Items3"), - resources.GetString("cmbNetwork.Items4")}); + resources.GetString("cmbNetwork.Items4"), + resources.GetString("cmbNetwork.Items5")}); resources.ApplyResources(this.cmbNetwork, "cmbNetwork"); this.cmbNetwork.Name = "cmbNetwork"; this.cmbNetwork.SelectedIndexChanged += new System.EventHandler(this.cmbNetwork_SelectedIndexChanged); @@ -427,6 +444,11 @@ resources.ApplyResources(this.MenuItemImportClipboard, "MenuItemImportClipboard"); this.MenuItemImportClipboard.Click += new System.EventHandler(this.MenuItemImportClipboard_Click); // + // label25 + // + resources.ApplyResources(this.label25, "label25"); + this.label25.Name = "label25"; + // // AddServerForm // resources.ApplyResources(this, "$this"); @@ -504,5 +526,8 @@ private System.Windows.Forms.Panel panTlsMore; private System.Windows.Forms.Label label24; private System.Windows.Forms.Label label23; + private System.Windows.Forms.Label label22; + private System.Windows.Forms.TextBox txtSNI; + private System.Windows.Forms.Label label25; } } \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/AddServerForm.cs b/v2rayN/v2rayN/Forms/AddServerForm.cs index bd80867b..99eb4916 100644 --- a/v2rayN/v2rayN/Forms/AddServerForm.cs +++ b/v2rayN/v2rayN/Forms/AddServerForm.cs @@ -45,6 +45,7 @@ namespace v2rayN.Forms txtPath.Text = vmessItem.path; cmbStreamSecurity.Text = vmessItem.streamSecurity; cmbAllowInsecure.Text = vmessItem.allowInsecure; + txtSNI.Text = vmessItem.sni; } @@ -66,6 +67,7 @@ namespace v2rayN.Forms cmbStreamSecurity.Text = ""; cmbAllowInsecure.Text = ""; txtPath.Text = ""; + txtSNI.Text = ""; } @@ -122,6 +124,7 @@ namespace v2rayN.Forms string path = txtPath.Text; string streamSecurity = cmbStreamSecurity.Text; string allowInsecure = cmbAllowInsecure.Text; + string sni = txtSNI.Text; if (Utils.IsNullOrEmpty(address)) { @@ -157,6 +160,7 @@ namespace v2rayN.Forms vmessItem.path = path.Replace(" ", ""); vmessItem.streamSecurity = streamSecurity; vmessItem.allowInsecure = allowInsecure; + vmessItem.sni = sni; if (ConfigHandler.AddServer(ref config, vmessItem, EditIndex) == 0) { @@ -268,7 +272,7 @@ namespace v2rayN.Forms { ClearServer(); - VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg); + VmessItem vmessItem = ShareHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg); if (vmessItem == null) { UI.ShowWarning(msg); diff --git a/v2rayN/v2rayN/Forms/AddServerForm.resx b/v2rayN/v2rayN/Forms/AddServerForm.resx index 6d3eec6c..7e9939e7 100644 --- a/v2rayN/v2rayN/Forms/AddServerForm.resx +++ b/v2rayN/v2rayN/Forms/AddServerForm.resx @@ -194,15 +194,45 @@ 1 - + True + + NoControl + + + 529, 211 + + + 113, 12 + + + 36 + + + 4)grpc serviceName + + + label25 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox2 + + + 0 + + + True + NoControl - 529, 207 + 529, 197 119, 12 @@ -223,7 +253,7 @@ groupBox2 - 0 + 1 True @@ -253,6 +283,57 @@ groupBox2 + 2 + + + 300, 7 + + + 200, 21 + + + 33 + + + txtSNI + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panTlsMore + + + 0 + + + True + + + NoControl + + + 270, 11 + + + 23, 12 + + + 32 + + + SNI + + + label22 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panTlsMore + + 1 @@ -280,7 +361,7 @@ panTlsMore - 0 + 2 @@ -292,10 +373,10 @@ false - 107, 7 + 100, 7 - 91, 20 + 80, 20 30 @@ -310,13 +391,13 @@ panTlsMore - 1 + 3 - 284, 234 + 200, 234 - 338, 35 + 500, 35 33 @@ -331,7 +412,7 @@ groupBox2 - 2 + 3 True @@ -358,7 +439,7 @@ groupBox2 - 3 + 4 True @@ -385,7 +466,7 @@ groupBox2 - 4 + 5 127, 169 @@ -409,7 +490,7 @@ groupBox2 - 5 + 6 tcp @@ -426,6 +507,9 @@ quic + + grpc + 192, 28 @@ -445,7 +529,7 @@ groupBox2 - 6 + 7 True @@ -472,7 +556,7 @@ groupBox2 - 7 + 8 True @@ -499,13 +583,13 @@ groupBox2 - 8 + 9 True - 529, 189 + 529, 183 59, 12 @@ -526,7 +610,7 @@ groupBox2 - 9 + 10 True @@ -553,13 +637,13 @@ groupBox2 - 10 + 11 True - 529, 172 + 529, 169 59, 12 @@ -580,7 +664,7 @@ groupBox2 - 11 + 12 True @@ -607,7 +691,7 @@ groupBox2 - 12 + 13 True @@ -634,7 +718,7 @@ groupBox2 - 13 + 14 @@ -646,7 +730,7 @@ 127, 239 - 143, 20 + 60, 20 21 @@ -661,7 +745,7 @@ groupBox2 - 14 + 15 True @@ -688,7 +772,7 @@ groupBox2 - 15 + 16 158, 100 @@ -712,7 +796,7 @@ groupBox2 - 16 + 17 True @@ -739,7 +823,7 @@ groupBox2 - 17 + 18 True @@ -766,7 +850,7 @@ groupBox2 - 18 + 19 none @@ -808,7 +892,7 @@ groupBox2 - 19 + 20 Bottom diff --git a/v2rayN/v2rayN/Forms/AddServerForm.zh-Hans.resx b/v2rayN/v2rayN/Forms/AddServerForm.zh-Hans.resx index 489f5fd2..4bbfcc1f 100644 --- a/v2rayN/v2rayN/Forms/AddServerForm.zh-Hans.resx +++ b/v2rayN/v2rayN/Forms/AddServerForm.zh-Hans.resx @@ -120,18 +120,12 @@ 取消(&C) - - 服务器 - 生成(&G) *手填,方便识别管理 - - 底层传输方式(transport) - 149, 12 @@ -152,7 +146,7 @@ 跳过证书验证(allowInsecure) - 223, 7 + 180, 7 350, 36 @@ -250,6 +244,9 @@ 127, 67 + + 底层传输方式(transport) + 113, 12 @@ -298,15 +295,12 @@ 地址(address) + + 服务器 + 确定(&O) - - 92, 21 - - - 导入配置文件 - 171, 22 @@ -328,6 +322,12 @@ 从剪贴板导入URL + + 92, 21 + + + 导入配置文件 + 编辑或添加[VMess]服务器 diff --git a/v2rayN/v2rayN/Forms/MainForm.Designer.cs b/v2rayN/v2rayN/Forms/MainForm.Designer.cs index 86a73954..b69bff7e 100644 --- a/v2rayN/v2rayN/Forms/MainForm.Designer.cs +++ b/v2rayN/v2rayN/Forms/MainForm.Designer.cs @@ -58,27 +58,25 @@ this.menuRealPingServer = new System.Windows.Forms.ToolStripMenuItem(); this.menuSpeedServer = new System.Windows.Forms.ToolStripMenuItem(); this.tsbTestMe = new System.Windows.Forms.ToolStripMenuItem(); + this.menuClearServerStatistics = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); this.menuExport2ClientConfig = new System.Windows.Forms.ToolStripMenuItem(); this.menuExport2ServerConfig = new System.Windows.Forms.ToolStripMenuItem(); this.menuExport2ShareUrl = new System.Windows.Forms.ToolStripMenuItem(); this.menuExport2SubContent = new System.Windows.Forms.ToolStripMenuItem(); - this.qrCodeControl = new v2rayN.Forms.QRCodeControl(); this.tsbServer = new System.Windows.Forms.ToolStripDropDownButton(); + this.qrCodeControl = new v2rayN.Forms.QRCodeControl(); this.notifyMain = new System.Windows.Forms.NotifyIcon(this.components); this.cmsMain = new System.Windows.Forms.ContextMenuStrip(this.components); this.menuSysAgentMode = new System.Windows.Forms.ToolStripMenuItem(); - this.menuNotEnabledHttp = new System.Windows.Forms.ToolStripMenuItem(); + this.menuKeepClear = new System.Windows.Forms.ToolStripMenuItem(); this.menuGlobal = new System.Windows.Forms.ToolStripMenuItem(); - this.menuGlobalPAC = new System.Windows.Forms.ToolStripMenuItem(); - this.menuKeep = new System.Windows.Forms.ToolStripMenuItem(); - this.menuKeepPAC = new System.Windows.Forms.ToolStripMenuItem(); this.menuKeepNothing = new System.Windows.Forms.ToolStripMenuItem(); - this.menuKeepPACNothing = new System.Windows.Forms.ToolStripMenuItem(); + this.menuRoutings = new System.Windows.Forms.ToolStripMenuItem(); this.menuServers = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator(); this.menuAddServers2 = new System.Windows.Forms.ToolStripMenuItem(); this.menuScanScreen2 = new System.Windows.Forms.ToolStripMenuItem(); - this.menuCopyPACUrl = new System.Windows.Forms.ToolStripMenuItem(); this.menuUpdateSubscriptions = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.menuExit = new System.Windows.Forms.ToolStripMenuItem(); @@ -86,6 +84,11 @@ this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.txtMsgBox = new System.Windows.Forms.TextBox(); + this.cmsMsgBox = new System.Windows.Forms.ContextMenuStrip(this.components); + this.menuMsgBoxSelectAll = new System.Windows.Forms.ToolStripMenuItem(); + this.menuMsgBoxCopy = new System.Windows.Forms.ToolStripMenuItem(); + this.menuMsgBoxCopyAll = new System.Windows.Forms.ToolStripMenuItem(); + this.menuMsgBoxAddRoutingRule = new System.Windows.Forms.ToolStripMenuItem(); this.ssMain = new System.Windows.Forms.StatusStrip(); this.toolSslSocksPortLab = new System.Windows.Forms.ToolStripStatusLabel(); this.toolSslSocksPort = new System.Windows.Forms.ToolStripStatusLabel(); @@ -93,8 +96,6 @@ this.toolSslHttpPortLab = new System.Windows.Forms.ToolStripStatusLabel(); this.toolSslHttpPort = new System.Windows.Forms.ToolStripStatusLabel(); this.toolSslBlank2 = new System.Windows.Forms.ToolStripStatusLabel(); - this.toolSslPacPortLab = new System.Windows.Forms.ToolStripStatusLabel(); - this.toolSslPacPort = new System.Windows.Forms.ToolStripStatusLabel(); this.toolSslBlank3 = new System.Windows.Forms.ToolStripStatusLabel(); this.toolSslServerSpeed = new System.Windows.Forms.ToolStripStatusLabel(); this.toolSslBlank4 = new System.Windows.Forms.ToolStripStatusLabel(); @@ -106,16 +107,16 @@ this.tsbSubUpdate = new System.Windows.Forms.ToolStripMenuItem(); this.tsbQRCodeSwitch = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); - this.tsbOptionSetting = new System.Windows.Forms.ToolStripButton(); + this.tsbSetting = new System.Windows.Forms.ToolStripDropDownButton(); + this.tsbOptionSetting = new System.Windows.Forms.ToolStripMenuItem(); + this.tsbRoutingSetting = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); this.tsbReload = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator(); this.tsbCheckUpdate = new System.Windows.Forms.ToolStripDropDownButton(); this.tsbCheckUpdateN = new System.Windows.Forms.ToolStripMenuItem(); this.tsbCheckUpdateCore = new System.Windows.Forms.ToolStripMenuItem(); - this.tsbCheckUpdatePACList = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator(); - this.tsbCheckClearPACList = new System.Windows.Forms.ToolStripMenuItem(); + this.tsbCheckUpdateXrayCore = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator(); this.tsbHelp = new System.Windows.Forms.ToolStripDropDownButton(); this.tsbAbout = new System.Windows.Forms.ToolStripMenuItem(); @@ -134,6 +135,7 @@ this.cmsMain.SuspendLayout(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); + this.cmsMsgBox.SuspendLayout(); this.ssMain.SuspendLayout(); this.tsMain.SuspendLayout(); this.SuspendLayout(); @@ -205,12 +207,14 @@ this.menuRealPingServer, this.menuSpeedServer, this.tsbTestMe, + this.menuClearServerStatistics, this.toolStripSeparator6, this.menuExport2ClientConfig, this.menuExport2ServerConfig, this.menuExport2ShareUrl, this.menuExport2SubContent}); this.cmsLv.Name = "cmsLv"; + this.cmsLv.OwnerItem = this.tsbServer; // // menuAddVmessServer // @@ -359,6 +363,12 @@ this.tsbTestMe.Name = "tsbTestMe"; this.tsbTestMe.Click += new System.EventHandler(this.tsbTestMe_Click); // + // menuClearServerStatistics + // + resources.ApplyResources(this.menuClearServerStatistics, "menuClearServerStatistics"); + this.menuClearServerStatistics.Name = "menuClearServerStatistics"; + this.menuClearServerStatistics.Click += new System.EventHandler(this.menuClearStatistic_Click); + // // toolStripSeparator6 // resources.ApplyResources(this.toolStripSeparator6, "toolStripSeparator6"); @@ -388,11 +398,6 @@ this.menuExport2SubContent.Name = "menuExport2SubContent"; this.menuExport2SubContent.Click += new System.EventHandler(this.menuExport2SubContent_Click); // - // qrCodeControl - // - resources.ApplyResources(this.qrCodeControl, "qrCodeControl"); - this.qrCodeControl.Name = "qrCodeControl"; - // // tsbServer // resources.ApplyResources(this.tsbServer, "tsbServer"); @@ -400,6 +405,11 @@ this.tsbServer.Image = global::v2rayN.Properties.Resources.server; this.tsbServer.Name = "tsbServer"; // + // qrCodeControl + // + resources.ApplyResources(this.qrCodeControl, "qrCodeControl"); + this.qrCodeControl.Name = "qrCodeControl"; + // // notifyMain // resources.ApplyResources(this.notifyMain, "notifyMain"); @@ -412,10 +422,11 @@ this.cmsMain.ImageScalingSize = new System.Drawing.Size(20, 20); this.cmsMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuSysAgentMode, + this.menuRoutings, this.menuServers, + this.toolStripSeparator13, this.menuAddServers2, this.menuScanScreen2, - this.menuCopyPACUrl, this.menuUpdateSubscriptions, this.toolStripSeparator2, this.menuExit}); @@ -428,20 +439,16 @@ // resources.ApplyResources(this.menuSysAgentMode, "menuSysAgentMode"); this.menuSysAgentMode.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.menuNotEnabledHttp, + this.menuKeepClear, this.menuGlobal, - this.menuGlobalPAC, - this.menuKeep, - this.menuKeepPAC, - this.menuKeepNothing, - this.menuKeepPACNothing}); + this.menuKeepNothing}); this.menuSysAgentMode.Name = "menuSysAgentMode"; // - // menuNotEnabledHttp + // menuKeepClear // - resources.ApplyResources(this.menuNotEnabledHttp, "menuNotEnabledHttp"); - this.menuNotEnabledHttp.Name = "menuNotEnabledHttp"; - this.menuNotEnabledHttp.Click += new System.EventHandler(this.menuNotEnabledHttp_Click); + resources.ApplyResources(this.menuKeepClear, "menuKeepClear"); + this.menuKeepClear.Name = "menuKeepClear"; + this.menuKeepClear.Click += new System.EventHandler(this.menuKeepClear_Click); // // menuGlobal // @@ -449,41 +456,27 @@ this.menuGlobal.Name = "menuGlobal"; this.menuGlobal.Click += new System.EventHandler(this.menuGlobal_Click); // - // menuGlobalPAC - // - resources.ApplyResources(this.menuGlobalPAC, "menuGlobalPAC"); - this.menuGlobalPAC.Name = "menuGlobalPAC"; - this.menuGlobalPAC.Click += new System.EventHandler(this.menuGlobalPAC_Click); - // - // menuKeep - // - resources.ApplyResources(this.menuKeep, "menuKeep"); - this.menuKeep.Name = "menuKeep"; - this.menuKeep.Click += new System.EventHandler(this.menuKeep_Click); - // - // menuKeepPAC - // - resources.ApplyResources(this.menuKeepPAC, "menuKeepPAC"); - this.menuKeepPAC.Name = "menuKeepPAC"; - this.menuKeepPAC.Click += new System.EventHandler(this.menuKeepPAC_Click); - // // menuKeepNothing // resources.ApplyResources(this.menuKeepNothing, "menuKeepNothing"); this.menuKeepNothing.Name = "menuKeepNothing"; this.menuKeepNothing.Click += new System.EventHandler(this.menuKeepNothing_Click); // - // menuKeepPACNothing + // menuRoutings // - resources.ApplyResources(this.menuKeepPACNothing, "menuKeepPACNothing"); - this.menuKeepPACNothing.Name = "menuKeepPACNothing"; - this.menuKeepPACNothing.Click += new System.EventHandler(this.menuKeepPACNothing_Click); + resources.ApplyResources(this.menuRoutings, "menuRoutings"); + this.menuRoutings.Name = "menuRoutings"; // // menuServers // resources.ApplyResources(this.menuServers, "menuServers"); this.menuServers.Name = "menuServers"; // + // toolStripSeparator13 + // + resources.ApplyResources(this.toolStripSeparator13, "toolStripSeparator13"); + this.toolStripSeparator13.Name = "toolStripSeparator13"; + // // menuAddServers2 // resources.ApplyResources(this.menuAddServers2, "menuAddServers2"); @@ -496,12 +489,6 @@ this.menuScanScreen2.Name = "menuScanScreen2"; this.menuScanScreen2.Click += new System.EventHandler(this.menuScanScreen_Click); // - // menuCopyPACUrl - // - resources.ApplyResources(this.menuCopyPACUrl, "menuCopyPACUrl"); - this.menuCopyPACUrl.Name = "menuCopyPACUrl"; - this.menuCopyPACUrl.Click += new System.EventHandler(this.menuCopyPACUrl_Click); - // // menuUpdateSubscriptions // resources.ApplyResources(this.menuUpdateSubscriptions, "menuUpdateSubscriptions"); @@ -545,13 +532,50 @@ resources.ApplyResources(this.txtMsgBox, "txtMsgBox"); this.txtMsgBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(49)))), ((int)(((byte)(52))))); this.txtMsgBox.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtMsgBox.ContextMenuStrip = this.cmsMsgBox; this.txtMsgBox.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(226)))), ((int)(((byte)(228))))); this.txtMsgBox.Name = "txtMsgBox"; this.txtMsgBox.ReadOnly = true; + this.txtMsgBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtMsgBox_KeyDown); + // + // cmsMsgBox + // + resources.ApplyResources(this.cmsMsgBox, "cmsMsgBox"); + this.cmsMsgBox.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.menuMsgBoxSelectAll, + this.menuMsgBoxCopy, + this.menuMsgBoxCopyAll, + this.menuMsgBoxAddRoutingRule}); + this.cmsMsgBox.Name = "cmsMsgBox"; + // + // menuMsgBoxSelectAll + // + resources.ApplyResources(this.menuMsgBoxSelectAll, "menuMsgBoxSelectAll"); + this.menuMsgBoxSelectAll.Name = "menuMsgBoxSelectAll"; + this.menuMsgBoxSelectAll.Click += new System.EventHandler(this.menuMsgBoxSelectAll_Click); + // + // menuMsgBoxCopy + // + resources.ApplyResources(this.menuMsgBoxCopy, "menuMsgBoxCopy"); + this.menuMsgBoxCopy.Name = "menuMsgBoxCopy"; + this.menuMsgBoxCopy.Click += new System.EventHandler(this.menuMsgBoxCopy_Click); + // + // menuMsgBoxCopyAll + // + resources.ApplyResources(this.menuMsgBoxCopyAll, "menuMsgBoxCopyAll"); + this.menuMsgBoxCopyAll.Name = "menuMsgBoxCopyAll"; + this.menuMsgBoxCopyAll.Click += new System.EventHandler(this.menuMsgBoxCopyAll_Click); + // + // menuMsgBoxAddRoutingRule + // + resources.ApplyResources(this.menuMsgBoxAddRoutingRule, "menuMsgBoxAddRoutingRule"); + this.menuMsgBoxAddRoutingRule.Name = "menuMsgBoxAddRoutingRule"; + this.menuMsgBoxAddRoutingRule.Click += new System.EventHandler(this.menuMsgBoxAddRoutingRule_Click); // // ssMain // resources.ApplyResources(this.ssMain, "ssMain"); + this.ssMain.ImageScalingSize = new System.Drawing.Size(20, 20); this.ssMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolSslSocksPortLab, this.toolSslSocksPort, @@ -559,8 +583,6 @@ this.toolSslHttpPortLab, this.toolSslHttpPort, this.toolSslBlank2, - this.toolSslPacPortLab, - this.toolSslPacPort, this.toolSslBlank3, this.toolSslServerSpeed, this.toolSslBlank4}); @@ -599,16 +621,6 @@ this.toolSslBlank2.Name = "toolSslBlank2"; this.toolSslBlank2.Spring = true; // - // toolSslPacPortLab - // - resources.ApplyResources(this.toolSslPacPortLab, "toolSslPacPortLab"); - this.toolSslPacPortLab.Name = "toolSslPacPortLab"; - // - // toolSslPacPort - // - resources.ApplyResources(this.toolSslPacPort, "toolSslPacPort"); - this.toolSslPacPort.Name = "toolSslPacPort"; - // // toolSslBlank3 // resources.ApplyResources(this.toolSslBlank3, "toolSslBlank3"); @@ -641,7 +653,7 @@ this.tsbSub, this.tsbQRCodeSwitch, this.toolStripSeparator8, - this.tsbOptionSetting, + this.tsbSetting, this.toolStripSeparator5, this.tsbReload, this.toolStripSeparator7, @@ -694,13 +706,27 @@ resources.ApplyResources(this.toolStripSeparator8, "toolStripSeparator8"); this.toolStripSeparator8.Name = "toolStripSeparator8"; // + // tsbSetting + // + resources.ApplyResources(this.tsbSetting, "tsbSetting"); + this.tsbSetting.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsbOptionSetting, + this.tsbRoutingSetting}); + this.tsbSetting.Image = global::v2rayN.Properties.Resources.option; + this.tsbSetting.Name = "tsbSetting"; + // // tsbOptionSetting // resources.ApplyResources(this.tsbOptionSetting, "tsbOptionSetting"); - this.tsbOptionSetting.Image = global::v2rayN.Properties.Resources.option; this.tsbOptionSetting.Name = "tsbOptionSetting"; this.tsbOptionSetting.Click += new System.EventHandler(this.tsbOptionSetting_Click); // + // tsbRoutingSetting + // + resources.ApplyResources(this.tsbRoutingSetting, "tsbRoutingSetting"); + this.tsbRoutingSetting.Name = "tsbRoutingSetting"; + this.tsbRoutingSetting.Click += new System.EventHandler(this.tsbRoutingSetting_Click); + // // toolStripSeparator5 // resources.ApplyResources(this.toolStripSeparator5, "toolStripSeparator5"); @@ -723,9 +749,7 @@ this.tsbCheckUpdate.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tsbCheckUpdateN, this.tsbCheckUpdateCore, - this.tsbCheckUpdatePACList, - this.toolStripSeparator13, - this.tsbCheckClearPACList}); + this.tsbCheckUpdateXrayCore}); this.tsbCheckUpdate.Image = global::v2rayN.Properties.Resources.checkupdate; this.tsbCheckUpdate.Name = "tsbCheckUpdate"; // @@ -741,22 +765,11 @@ this.tsbCheckUpdateCore.Name = "tsbCheckUpdateCore"; this.tsbCheckUpdateCore.Click += new System.EventHandler(this.tsbCheckUpdateCore_Click); // - // tsbCheckUpdatePACList + // tsbCheckUpdateXrayCore // - resources.ApplyResources(this.tsbCheckUpdatePACList, "tsbCheckUpdatePACList"); - this.tsbCheckUpdatePACList.Name = "tsbCheckUpdatePACList"; - this.tsbCheckUpdatePACList.Click += new System.EventHandler(this.tsbCheckUpdatePACList_Click); - // - // toolStripSeparator13 - // - resources.ApplyResources(this.toolStripSeparator13, "toolStripSeparator13"); - this.toolStripSeparator13.Name = "toolStripSeparator13"; - // - // tsbCheckClearPACList - // - resources.ApplyResources(this.tsbCheckClearPACList, "tsbCheckClearPACList"); - this.tsbCheckClearPACList.Name = "tsbCheckClearPACList"; - this.tsbCheckClearPACList.Click += new System.EventHandler(this.tsbCheckClearPACList_Click); + resources.ApplyResources(this.tsbCheckUpdateXrayCore, "tsbCheckUpdateXrayCore"); + this.tsbCheckUpdateXrayCore.Name = "tsbCheckUpdateXrayCore"; + this.tsbCheckUpdateXrayCore.Click += new System.EventHandler(this.tsbCheckUpdateXrayCore_Click); // // toolStripSeparator10 // @@ -848,6 +861,7 @@ this.groupBox1.ResumeLayout(false); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); + this.cmsMsgBox.ResumeLayout(false); this.ssMain.ResumeLayout(false); this.ssMain.PerformLayout(); this.tsMain.ResumeLayout(false); @@ -880,7 +894,6 @@ private System.Windows.Forms.ToolStripMenuItem menuExport2ServerConfig; private System.Windows.Forms.ToolStrip tsMain; private System.Windows.Forms.ToolStripDropDownButton tsbServer; - private System.Windows.Forms.ToolStripButton tsbOptionSetting; private System.Windows.Forms.ToolStripButton tsbClose; private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; private System.Windows.Forms.ToolStripSeparator toolStripSeparator5; @@ -893,9 +906,7 @@ private System.Windows.Forms.ToolStripSeparator toolStripSeparator9; private System.Windows.Forms.ToolStripMenuItem menuSysAgentMode; private System.Windows.Forms.ToolStripMenuItem menuGlobal; - private System.Windows.Forms.ToolStripMenuItem menuGlobalPAC; - private System.Windows.Forms.ToolStripMenuItem menuKeep; - private System.Windows.Forms.ToolStripMenuItem menuCopyPACUrl; + private System.Windows.Forms.ToolStripMenuItem menuKeepClear; private System.Windows.Forms.ToolStripMenuItem menuAddCustomServer; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripMenuItem menuAddShadowsocksServer; @@ -905,7 +916,6 @@ private System.Windows.Forms.ToolStripDropDownButton tsbCheckUpdate; private System.Windows.Forms.ToolStripMenuItem tsbCheckUpdateN; private System.Windows.Forms.ToolStripMenuItem tsbCheckUpdateCore; - private System.Windows.Forms.ToolStripMenuItem tsbCheckUpdatePACList; private System.Windows.Forms.ToolStripMenuItem menuAddServers; private System.Windows.Forms.ToolStripMenuItem menuExport2ShareUrl; private System.Windows.Forms.ToolStripMenuItem menuSpeedServer; @@ -920,8 +930,6 @@ private System.Windows.Forms.ToolStripSeparator toolStripSeparator8; private System.Windows.Forms.ToolStripMenuItem tsbSubSetting; private System.Windows.Forms.ToolStripMenuItem tsbSubUpdate; - private System.Windows.Forms.ToolStripMenuItem tsbCheckClearPACList; - private System.Windows.Forms.ToolStripMenuItem menuKeepPAC; private System.Windows.Forms.ToolStripMenuItem menuSelectAll; private System.Windows.Forms.ToolStripMenuItem menuExport2SubContent; private System.Windows.Forms.ToolStripSeparator toolStripSeparator12; @@ -934,27 +942,34 @@ private System.Windows.Forms.ToolStripStatusLabel toolSslHttpPort; private System.Windows.Forms.ToolStripStatusLabel toolSslBlank2; private System.Windows.Forms.ToolStripStatusLabel toolSslBlank1; - private System.Windows.Forms.ToolStripStatusLabel toolSslPacPort; private System.Windows.Forms.ToolStripStatusLabel toolSslBlank3; private System.Windows.Forms.ToolStripStatusLabel toolSslSocksPortLab; private System.Windows.Forms.ToolStripStatusLabel toolSslHttpPortLab; - private System.Windows.Forms.ToolStripStatusLabel toolSslPacPortLab; private System.Windows.Forms.ToolStripStatusLabel toolSslServerSpeed; private System.Windows.Forms.ToolStripStatusLabel toolSslBlank4; private System.Windows.Forms.ToolStripMenuItem menuRemoveDuplicateServer; private System.Windows.Forms.ToolStripMenuItem menuTcpingServer; private System.Windows.Forms.ToolStripMenuItem menuRealPingServer; - private System.Windows.Forms.ToolStripMenuItem menuNotEnabledHttp; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator13; private System.Windows.Forms.ToolStripMenuItem menuUpdateSubscriptions; private System.Windows.Forms.ToolStripMenuItem tsbV2rayWebsite; private System.Windows.Forms.ToolStripMenuItem menuKeepNothing; - private System.Windows.Forms.ToolStripMenuItem menuKeepPACNothing; private System.Windows.Forms.ToolStripMenuItem tsbTestMe; private System.Windows.Forms.ToolStripButton tsbReload; private System.Windows.Forms.ToolStripButton tsbQRCodeSwitch; private System.Windows.Forms.ToolStripMenuItem menuAddVlessServer; private System.Windows.Forms.ToolStripMenuItem menuAddTrojanServer; + private System.Windows.Forms.ToolStripDropDownButton tsbSetting; + private System.Windows.Forms.ToolStripMenuItem tsbOptionSetting; + private System.Windows.Forms.ToolStripMenuItem tsbRoutingSetting; + private System.Windows.Forms.ToolStripMenuItem tsbCheckUpdateXrayCore; + private System.Windows.Forms.ToolStripMenuItem menuClearServerStatistics; + private System.Windows.Forms.ToolStripMenuItem menuRoutings; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator13; + private System.Windows.Forms.ContextMenuStrip cmsMsgBox; + private System.Windows.Forms.ToolStripMenuItem menuMsgBoxSelectAll; + private System.Windows.Forms.ToolStripMenuItem menuMsgBoxCopy; + private System.Windows.Forms.ToolStripMenuItem menuMsgBoxAddRoutingRule; + private System.Windows.Forms.ToolStripMenuItem menuMsgBoxCopyAll; } } diff --git a/v2rayN/v2rayN/Forms/MainForm.cs b/v2rayN/v2rayN/Forms/MainForm.cs index 7d041432..08783e41 100644 --- a/v2rayN/v2rayN/Forms/MainForm.cs +++ b/v2rayN/v2rayN/Forms/MainForm.cs @@ -35,8 +35,8 @@ namespace v2rayN.Forms { v2rayHandler.V2rayStop(); - HttpProxyHandle.CloseHttpAgent(config); - PACServerHandle.Stop(); + //HttpProxyHandle.CloseHttpAgent(config); + HttpProxyHandle.UpdateSysProxy(config, true); ConfigHandler.SaveConfig(ref config); statistics?.SaveToFile(); @@ -47,6 +47,7 @@ namespace v2rayN.Forms private void MainForm_Load(object sender, EventArgs e) { ConfigHandler.LoadConfig(ref config); + ConfigHandler.InitBuiltinRouting(ref config); v2rayHandler = new V2rayHandler(); v2rayHandler.ProcessEvent += v2rayHandler_ProcessEvent; @@ -73,6 +74,7 @@ namespace v2rayN.Forms { InitServersView(); RefreshServers(); + RefreshRoutingsMenu(); RestoreUI(); LoadV2ray(); @@ -205,6 +207,8 @@ namespace v2rayN.Forms /// private void RefreshServersView() { + int index = lvServers.SelectedIndices.Count > 0 ? lvServers.SelectedIndices[0] : -1; + lvServers.BeginUpdate(); lvServers.Items.Clear(); @@ -222,10 +226,6 @@ namespace v2rayN.Forms VmessItem item = config.vmess[k]; - void _addSubItem(ListViewItem i, string name, string text) - { - i.SubItems.Add(new ListViewItem.ListViewSubItem() { Name = name, Text = text }); - } bool stats = statistics != null && statistics.Enable; if (stats) { @@ -239,20 +239,20 @@ namespace v2rayN.Forms } } ListViewItem lvItem = new ListViewItem(def); - _addSubItem(lvItem, EServerColName.configType.ToString(), ((EConfigType)item.configType).ToString()); - _addSubItem(lvItem, EServerColName.remarks.ToString(), item.remarks); - _addSubItem(lvItem, EServerColName.address.ToString(), item.address); - _addSubItem(lvItem, EServerColName.port.ToString(), item.port.ToString()); - _addSubItem(lvItem, EServerColName.security.ToString(), item.security); - _addSubItem(lvItem, EServerColName.network.ToString(), item.network); - _addSubItem(lvItem, EServerColName.subRemarks.ToString(), item.getSubRemarks(config)); - _addSubItem(lvItem, EServerColName.testResult.ToString(), item.testResult); + Utils.AddSubItem(lvItem, EServerColName.configType.ToString(), ((EConfigType)item.configType).ToString()); + Utils.AddSubItem(lvItem, EServerColName.remarks.ToString(), item.remarks); + Utils.AddSubItem(lvItem, EServerColName.address.ToString(), item.address); + Utils.AddSubItem(lvItem, EServerColName.port.ToString(), item.port.ToString()); + Utils.AddSubItem(lvItem, EServerColName.security.ToString(), item.security); + Utils.AddSubItem(lvItem, EServerColName.network.ToString(), item.network); + Utils.AddSubItem(lvItem, EServerColName.subRemarks.ToString(), item.getSubRemarks(config)); + Utils.AddSubItem(lvItem, EServerColName.testResult.ToString(), item.testResult); if (stats) { - _addSubItem(lvItem, EServerColName.todayDown.ToString(), todayDown); - _addSubItem(lvItem, EServerColName.todayUp.ToString(), todayUp); - _addSubItem(lvItem, EServerColName.totalDown.ToString(), totalDown); - _addSubItem(lvItem, EServerColName.totalUp.ToString(), totalUp); + Utils.AddSubItem(lvItem, EServerColName.todayDown.ToString(), todayDown); + Utils.AddSubItem(lvItem, EServerColName.todayUp.ToString(), todayUp); + Utils.AddSubItem(lvItem, EServerColName.totalDown.ToString(), totalDown); + Utils.AddSubItem(lvItem, EServerColName.totalUp.ToString(), totalUp); } if (k % 2 == 1) // 隔行着色 @@ -270,15 +270,11 @@ namespace v2rayN.Forms } lvServers.EndUpdate(); - //if (lvServers.Items.Count > 0) - //{ - // if (lvServers.Items.Count <= testConfigIndex) - // { - // testConfigIndex = lvServers.Items.Count - 1; - // } - // lvServers.Items[testConfigIndex].Selected = true; - // lvServers.Select(); - //} + if (index >= 0 && index < lvServers.Items.Count && lvServers.Items.Count > 0) + { + lvServers.Items[index].Selected = true; + lvServers.EnsureVisible(index); // workaround + } } /// @@ -343,29 +339,8 @@ namespace v2rayN.Forms private void DisplayToolStatus() { - toolSslSocksPort.Text = - toolSslHttpPort.Text = - toolSslPacPort.Text = "OFF"; - toolSslSocksPort.Text = $"{Global.Loopback}:{config.inbound[0].localPort}"; - - if (config.listenerType != (int)ListenerType.noHttpProxy) - { - toolSslHttpPort.Text = $"{Global.Loopback}:{Global.httpPort}"; - if (config.listenerType == ListenerType.GlobalPac || - config.listenerType == ListenerType.PacOpenAndClear || - config.listenerType == ListenerType.PacOpenOnly) - { - if (PACServerHandle.IsRunning) - { - toolSslPacPort.Text = $"{HttpProxyHandle.GetPacUrl()}"; - } - else - { - toolSslPacPort.Text = UIRes.I18N("StartPacFailed"); - } - } - } + toolSslHttpPort.Text = $"{Global.Loopback}:{Global.httpPort}"; notifyMain.Icon = MainFormHandler.Instance.GetNotifyIcon(config, this.Icon); } @@ -426,7 +401,7 @@ namespace v2rayN.Forms ConfigHandler.SaveConfig(ref config, false); statistics?.SaveToFile(); - ChangePACButtonStatus(config.listenerType); + ChangePACButtonStatus(config.sysProxyType); tsbReload.Enabled = true; } @@ -504,7 +479,6 @@ namespace v2rayN.Forms fm.EditIndex = index; if (fm.ShowDialog() == DialogResult.OK) { - //刷新 RefreshServers(); LoadV2ray(); } @@ -576,7 +550,7 @@ namespace v2rayN.Forms private void menuAddVlessServer_Click(object sender, EventArgs e) { - ShowServerForm((int)EConfigType.VLESS, -1); + ShowServerForm((int)EConfigType.VLESS, -1); } private void menuRemoveServer_Click(object sender, EventArgs e) @@ -595,7 +569,6 @@ namespace v2rayN.Forms { ConfigHandler.RemoveServer(ref config, lvSelecteds[k]); } - //刷新 RefreshServers(); LoadV2ray(); @@ -610,7 +583,6 @@ namespace v2rayN.Forms { config.vmess = servers; } - //刷新 RefreshServers(); LoadV2ray(); UI.Show(string.Format(UIRes.I18N("RemoveDuplicateServerResult"), oldCount, newCount)); @@ -625,7 +597,6 @@ namespace v2rayN.Forms } if (ConfigHandler.CopyServer(ref config, index) == 0) { - //刷新 RefreshServers(); } } @@ -687,6 +658,15 @@ namespace v2rayN.Forms string result = httpProxyTest() + "ms"; AppendText(false, string.Format(UIRes.I18N("TestMeOutput"), result)); } + + private void menuClearStatistic_Click(object sender, EventArgs e) + { + if (statistics != null) + { + statistics.ClearAllServerStatistics(); + } + } + private int httpProxyTest() { SpeedtestHandler statistics = new SpeedtestHandler(ref config, ref v2rayHandler, lvSelecteds, "", UpdateSpeedtestHandler); @@ -712,7 +692,7 @@ namespace v2rayN.Forms StringBuilder sb = new StringBuilder(); foreach (int v in lvSelecteds) { - string url = ConfigHandler.GetVmessQRCode(config, v); + string url = ShareHandler.GetShareUrl(config, v); if (Utils.IsNullOrEmpty(url)) { continue; @@ -735,7 +715,7 @@ namespace v2rayN.Forms StringBuilder sb = new StringBuilder(); foreach (int v in lvSelecteds) { - string url = ConfigHandler.GetVmessQRCode(config, v); + string url = ShareHandler.GetShareUrl(config, v); if (Utils.IsNullOrEmpty(url)) { continue; @@ -755,10 +735,19 @@ namespace v2rayN.Forms OptionSettingForm fm = new OptionSettingForm(); if (fm.ShowDialog() == DialogResult.OK) { - //刷新 RefreshServers(); LoadV2ray(); - HttpProxyHandle.RestartHttpAgent(config, true); + } + } + + private void tsbRoutingSetting_Click(object sender, EventArgs e) + { + var fm = new RoutingSettingForm(); + if (fm.ShowDialog() == DialogResult.OK) + { + RefreshRoutingsMenu(); + RefreshServers(); + LoadV2ray(); } } @@ -788,7 +777,6 @@ namespace v2rayN.Forms } if (ConfigHandler.SetDefaultServer(ref config, index) == 0) { - //刷新 RefreshServers(); LoadV2ray(); } @@ -845,9 +833,8 @@ namespace v2rayN.Forms if (ConfigHandler.AddCustomServer(ref config, fileName) == 0) { - //刷新 RefreshServers(); - LoadV2ray(); + //LoadV2ray(); UI.Show(UIRes.I18N("SuccessfullyImportedCustomServer")); } else @@ -858,13 +845,13 @@ namespace v2rayN.Forms private void menuAddShadowsocksServer_Click(object sender, EventArgs e) { - ShowServerForm((int)EConfigType.Shadowsocks, -1); + ShowServerForm((int)EConfigType.Shadowsocks, -1); ShowForm(); } private void menuAddSocksServer_Click(object sender, EventArgs e) { - ShowServerForm((int)EConfigType.Socks, -1); + ShowServerForm((int)EConfigType.Socks, -1); ShowForm(); } @@ -877,10 +864,11 @@ namespace v2rayN.Forms private void menuAddServers_Click(object sender, EventArgs e) { string clipboardData = Utils.GetClipboardData(); - int result = AddBatchServers(clipboardData); - if (result > 0) + int ret = MainFormHandler.Instance.AddBatchServers(config, clipboardData); + if (ret > 0) { - UI.Show(string.Format(UIRes.I18N("SuccessfullyImportedServerViaClipboard"), result)); + RefreshServers(); + UI.Show(string.Format(UIRes.I18N("SuccessfullyImportedServerViaClipboard"), ret)); } } @@ -890,23 +878,6 @@ namespace v2rayN.Forms bgwScan.RunWorkerAsync(); } - private int AddBatchServers(string clipboardData, string subid = "") - { - int counter; - int _Add() - { - return ConfigHandler.AddBatchServers(ref config, clipboardData, subid); - } - counter = _Add(); - if (counter < 1) - { - clipboardData = Utils.Base64Decode(clipboardData); - counter = _Add(); - } - RefreshServers(); - return counter; - } - private void menuUpdateSubscriptions_Click(object sender, EventArgs e) { UpdateSubscriptionProcess(); @@ -1020,10 +991,11 @@ namespace v2rayN.Forms this.ShowInTaskbar = true; //this.notifyIcon1.Visible = false; this.txtMsgBox.ScrollToCaret(); - if (config.index >= 0 && config.index < lvServers.Items.Count) - { - lvServers.EnsureVisible(config.index); // workaround - } + //if (config.index >= 0 && config.index < lvServers.Items.Count) + //{ + // lvServers.Items[config.index].Selected = true; + // lvServers.EnsureVisible(config.index); // workaround + //} SetVisibleCore(true); } @@ -1136,7 +1108,7 @@ namespace v2rayN.Forms { //TODO: reload is not good. RefreshServers(); - LoadV2ray(); + //LoadV2ray(); } } private void menuSelectAll_Click(object sender, EventArgs e) @@ -1150,56 +1122,36 @@ namespace v2rayN.Forms #endregion #region 系统代理相关 - - private void menuCopyPACUrl_Click(object sender, EventArgs e) + private void menuKeepClear_Click(object sender, EventArgs e) { - Utils.SetClipboardData(HttpProxyHandle.GetPacUrl()); - } - - private void menuNotEnabledHttp_Click(object sender, EventArgs e) - { - SetListenerType(ListenerType.noHttpProxy); + SetListenerType(ESysProxyType.ForcedClear); } private void menuGlobal_Click(object sender, EventArgs e) { - SetListenerType(ListenerType.GlobalHttp); - } - private void menuGlobalPAC_Click(object sender, EventArgs e) - { - SetListenerType(ListenerType.GlobalPac); - } - private void menuKeep_Click(object sender, EventArgs e) - { - SetListenerType(ListenerType.HttpOpenAndClear); - } - private void menuKeepPAC_Click(object sender, EventArgs e) - { - SetListenerType(ListenerType.PacOpenAndClear); + SetListenerType(ESysProxyType.ForcedChange); } + private void menuKeepNothing_Click(object sender, EventArgs e) { - SetListenerType(ListenerType.HttpOpenOnly); + SetListenerType(ESysProxyType.Unchanged); } - private void menuKeepPACNothing_Click(object sender, EventArgs e) + private void SetListenerType(ESysProxyType type) { - SetListenerType(ListenerType.PacOpenOnly); - } - private void SetListenerType(ListenerType type) - { - config.listenerType = type; + config.sysProxyType = type; ChangePACButtonStatus(type); } - private void ChangePACButtonStatus(ListenerType type) + private void ChangePACButtonStatus(ESysProxyType type) { - if (type != ListenerType.noHttpProxy) - { - HttpProxyHandle.RestartHttpAgent(config, false); - } - else - { - HttpProxyHandle.CloseHttpAgent(config); - } + HttpProxyHandle.UpdateSysProxy(config, false); + //if (type != ListenerType.noHttpProxy) + //{ + // HttpProxyHandle.RestartHttpAgent(config, false); + //} + //else + //{ + // HttpProxyHandle.CloseHttpAgent(config); + //} for (int k = 0; k < menuSysAgentMode.DropDownItems.Count; k++) { @@ -1301,6 +1253,16 @@ namespace v2rayN.Forms } private void tsbCheckUpdateCore_Click(object sender, EventArgs e) + { + CheckUpdateCore("v2fly"); + } + + private void tsbCheckUpdateXrayCore_Click(object sender, EventArgs e) + { + CheckUpdateCore("xray"); + } + + private void CheckUpdateCore(string type) { DownloadHandle downloadHandle = null; if (downloadHandle == null) @@ -1310,7 +1272,7 @@ namespace v2rayN.Forms { if (args.Success) { - AppendText(false, string.Format(UIRes.I18N("MsgParsingSuccessfully"), "v2rayCore")); + AppendText(false, string.Format(UIRes.I18N("MsgParsingSuccessfully"), "Core")); string url = args.Msg; this.Invoke((MethodInvoker)(delegate @@ -1336,7 +1298,7 @@ namespace v2rayN.Forms string fileName = downloadHandle.DownloadFileName; fileName = Utils.GetPath(fileName); - FileManager.ZipExtractToFile(fileName); + FileManager.ZipExtractToFile(fileName, config.ignoreGeoUpdateCore ? "geo" : ""); AppendText(false, UIRes.I18N("MsgUpdateV2rayCoreSuccessfullyMore")); @@ -1361,54 +1323,8 @@ namespace v2rayN.Forms }; } - AppendText(false, string.Format(UIRes.I18N("MsgStartUpdating"), "v2rayCore")); - downloadHandle.CheckUpdateAsync("Core"); - } - - private void tsbCheckUpdatePACList_Click(object sender, EventArgs e) - { - DownloadHandle pacListHandle = null; - if (pacListHandle == null) - { - pacListHandle = new DownloadHandle(); - pacListHandle.UpdateCompleted += (sender2, args) => - { - if (args.Success) - { - string result = args.Msg; - if (Utils.IsNullOrEmpty(result)) - { - return; - } - pacListHandle.GenPacFile(result); - - AppendText(false, UIRes.I18N("MsgPACUpdateSuccessfully")); - } - else - { - AppendText(false, UIRes.I18N("MsgPACUpdateFailed")); - } - }; - pacListHandle.Error += (sender2, args) => - { - AppendText(true, args.GetException().Message); - }; - } - AppendText(false, UIRes.I18N("MsgStartUpdatingPAC")); - pacListHandle.WebDownloadString(config.urlGFWList); - } - - private void tsbCheckClearPACList_Click(object sender, EventArgs e) - { - try - { - File.WriteAllText(Utils.GetPath(Global.pacFILE), Utils.GetEmbedText(Global.BlankPacFileName), Encoding.UTF8); - AppendText(false, UIRes.I18N("MsgSimplifyPAC")); - } - catch (Exception ex) - { - Utils.SaveLog(ex.Message, ex); - } + AppendText(false, string.Format(UIRes.I18N("MsgStartUpdating"), "Core")); + downloadHandle.CheckUpdateAsync(type); } #endregion @@ -1451,8 +1367,10 @@ namespace v2rayN.Forms } else { - if (AddBatchServers(result) > 0) + int ret = MainFormHandler.Instance.AddBatchServers(config, result); + if (ret > 0) { + RefreshServers(); UI.Show(UIRes.I18N("SuccessfullyImportedServerViaScan")); } } @@ -1480,67 +1398,15 @@ namespace v2rayN.Forms /// private void UpdateSubscriptionProcess() { - AppendText(false, UIRes.I18N("MsgUpdateSubscriptionStart")); - - if (config.subItem == null || config.subItem.Count <= 0) + void _updateUI(bool refresh, string msg) { - AppendText(false, UIRes.I18N("MsgNoValidSubscription")); - return; - } - - for (int k = 1; k <= config.subItem.Count; k++) - { - string id = config.subItem[k - 1].id.TrimEx(); - string url = config.subItem[k - 1].url.TrimEx(); - string hashCode = $"{k}->"; - if (config.subItem[k - 1].enabled == false) + AppendText(false, msg); + if (refresh) { - continue; + RefreshServers(); } - if (Utils.IsNullOrEmpty(id) || Utils.IsNullOrEmpty(url)) - { - AppendText(false, $"{hashCode}{UIRes.I18N("MsgNoValidSubscription")}"); - continue; - } - - DownloadHandle downloadHandle3 = new DownloadHandle(); - downloadHandle3.UpdateCompleted += (sender2, args) => - { - if (args.Success) - { - AppendText(false, $"{hashCode}{UIRes.I18N("MsgGetSubscriptionSuccessfully")}"); - string result = Utils.Base64Decode(args.Msg); - if (Utils.IsNullOrEmpty(result)) - { - AppendText(false, $"{hashCode}{UIRes.I18N("MsgSubscriptionDecodingFailed")}"); - return; - } - - ConfigHandler.RemoveServerViaSubid(ref config, id); - AppendText(false, $"{hashCode}{UIRes.I18N("MsgClearSubscription")}"); - RefreshServers(); - if (AddBatchServers(result, id) > 0) - { - } - else - { - AppendText(false, $"{hashCode}{UIRes.I18N("MsgFailedImportSubscription")}"); - } - AppendText(false, $"{hashCode}{UIRes.I18N("MsgUpdateSubscriptionEnd")}"); - } - else - { - AppendText(false, args.Msg); - } - }; - downloadHandle3.Error += (sender2, args) => - { - AppendText(true, args.GetException().Message); - }; - - downloadHandle3.WebDownloadString(url); - AppendText(false, $"{hashCode}{UIRes.I18N("MsgStartGettingSubscriptions")}"); - } + }; + MainFormHandler.Instance.UpdateSubscriptionProcess(config, _updateUI); } private void tsbQRCodeSwitch_CheckedChanged(object sender, EventArgs e) @@ -1570,8 +1436,114 @@ namespace v2rayN.Forms + + #endregion + + + #region RoutingsMenu + + /// + /// + /// + private void RefreshRoutingsMenu() + { + menuRoutings.Visible = config.enableRoutingAdvanced; + if (!config.enableRoutingAdvanced) + { + return; + } + + menuRoutings.DropDownItems.Clear(); + + List lst = new List(); + for (int k = 0; k < config.routings.Count; k++) + { + var item = config.routings[k]; + if (item.locked == true) + { + continue; + } + string name = item.remarks; + + ToolStripMenuItem ts = new ToolStripMenuItem(name) + { + Tag = k + }; + if (config.routingIndex.Equals(k)) + { + ts.Checked = true; + } + ts.Click += new EventHandler(ts_Routing_Click); + lst.Add(ts); + } + menuRoutings.DropDownItems.AddRange(lst.ToArray()); + } + + private void ts_Routing_Click(object sender, EventArgs e) + { + try + { + ToolStripItem ts = (ToolStripItem)sender; + int index = Utils.ToInt(ts.Tag); + + if (ConfigHandler.SetDefaultRouting(ref config, index) == 0) + { + RefreshRoutingsMenu(); + LoadV2ray(); + } + } + catch + { + } + } + #endregion + + #region MsgBoxMenu + private void menuMsgBoxSelectAll_Click(object sender, EventArgs e) + { + this.txtMsgBox.Focus(); + this.txtMsgBox.SelectAll(); + } + + private void menuMsgBoxCopy_Click(object sender, EventArgs e) + { + var data = this.txtMsgBox.SelectedText.TrimEx(); + Utils.SetClipboardData(data); + } + + private void menuMsgBoxCopyAll_Click(object sender, EventArgs e) + { + var data = this.txtMsgBox.Text; + Utils.SetClipboardData(data); + } + private void menuMsgBoxAddRoutingRule_Click(object sender, EventArgs e) + { + menuMsgBoxCopy_Click(null, null); + tsbRoutingSetting_Click(null, null); + } + + private void txtMsgBox_KeyDown(object sender, KeyEventArgs e) + { + if (e.Control) + { + switch (e.KeyCode) + { + case Keys.A: + menuMsgBoxSelectAll_Click(null, null); + break; + case Keys.C: + menuMsgBoxCopy_Click(null, null); + break; + case Keys.V: + menuMsgBoxAddRoutingRule_Click(null, null); + break; + + } + } + + } + #endregion - } } diff --git a/v2rayN/v2rayN/Forms/MainForm.resx b/v2rayN/v2rayN/Forms/MainForm.resx index eb1e2e63..df1bd0d6 100644 --- a/v2rayN/v2rayN/Forms/MainForm.resx +++ b/v2rayN/v2rayN/Forms/MainForm.resx @@ -127,23 +127,20 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Magenta - 355, 22 97, 53 - - groupBox2 + + 355, 22 Add [VLESS] server - 2 + 3 System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -151,11 +148,8 @@ Restart service - - 184, 6 - - - tsbSubSetting + + menuCopyServer 264, 22 @@ -172,26 +166,35 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + ImageAboveText + + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 227, 22 + 语言-[中文简体] NoControl - - Top + + Settings tsbHelp - - 5 - + + 0 + False @@ -201,6 +204,9 @@ 355, 22 + + menuMoveDown + 99, 53 @@ -213,35 +219,35 @@ 187, 22 + + tsbSetting + toolSslBlank2 - - tsbCheckUpdateN - 355, 22 355, 22 - - Move to top (T) - - - 45, 53 + + tsbCheckUpdateN - Only open Http proxy and do nothing + Do not change system proxy System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + menuExport2SubContent + toolStripSeparator7 - Update v2rayCore + Update v2flyCore Magenta @@ -255,17 +261,26 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - menuExport2SubContent + + Fill - 52, 17 + 52, 21 Share - - tsbQRCodeSwitch + + 227, 22 + + + 952, 327 + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Add Routing Rule (Ctrl+V) 355, 22 @@ -273,23 +288,32 @@ Export selected server for client configuration + + tsbRoutingSetting + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Copy All System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 227, 22 + Export selected server for server configuration - - ImageAboveText + + 0, 21 + + + toolStripSeparator11 952, 56 @@ -306,8 +330,8 @@ menuTcpingServer - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ImageAboveText System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -318,9 +342,6 @@ v2rayN - - 411, 22 - 355, 22 @@ -334,7 +355,10 @@ System.Windows.Forms.ToolStripDropDownButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 393, 22 + 203, 22 + + + menuMsgBoxCopy System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -342,17 +366,14 @@ tsbClose - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 125, 22 - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 256, 307 - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 187, 22 System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -368,20 +389,20 @@ - iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAATdJREFUWEftloENAiEMRW8ER3AEN9ANdARHcAPdwBF0A91AN9INtC+5JvUCJwWM - mvCTFw3QUiiU65qa/lUTYT6Ato9rJZyERwT6GFNdU+EihCYNwVhsqmgm3AR1fheOAitd9PCfNvp0HDbY - FolV2MmZZCzX9J0FG0TRTlwFdbahIVE7Qe1IR5bYVnXCyr2yO5F1MNUBec25YtjomcCXSxhr9DmrV2Gr - flyL4GSrYcm9tmnEZ7JsAC7DgWr5ydbXA8hOAcVjG8FTD6ocQgvXKrW8MqFWUfc1DAXgmRwVFaJQAHsh - VbYUU87diqWA934sl/TZ7wV2Lesx0gBwsO5/1Sl5PQhLQb+G+E+bfTm9KXsRAVgHrMK+jO9gbNEzzMSh - 6DlM9nANoa+kdCeLXLNLFtc9b2r6EXXdE4e4mdByNuG1AAAAAElFTkSuQmCC + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAE3SURBVFhH7ZaBDQIhDEVvBEdwBDfQDXQER3AD3cARdAPd + QDfSDbQvuSb1AicFjJrwkxcN0FIolOuamv5VE2E+gLaPayWchEcE+hhTXVPhIoQmDcFYbKpoJtwEdX4X + jgIrXfTwnzb6dBw22BaJVdjJmWQs1/SdBRtE0U5cBXW2oSFRO0HtSEeW2FZ1wsq9sjuRdTDVAXnNuWLY + 6JnAl0sYa/Q5q1dhq35ci+Bkq2HJvbZpxGeybAAuw4Fq+cnW1wPITgHFYxvBUw+qHEIL1yq1vDKhVlH3 + NQwF4JkcFRWiUAB7IVW2FFPO3YqlgPd+LJf02e8Fdi3rMdIAcLDuf9UpeT0IS0G/hvhPm305vSl7EQFY + B6zCvozvYGzRM8zEoeg5TPZwDaGvpHQni1yzSxbXPW9q+hF13ROHuJnQcjbhtQAAAABJRU5ErkJggg== - - 411, 22 + + Servers - 3 + 4 3, 17 @@ -405,26 +426,29 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 220, 17 + 220, 21 menuAddCustomServer - - menuMoveDown + + txtMsgBox + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Import bulk URL from clipboard - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 411, 22 + + 184, 6 Move to bottom (B) + + toolSslBlank3 + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -434,8 +458,8 @@ 48, 53 - - 393, 22 + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 355, 22 @@ -447,13 +471,13 @@ panel1 - 195, 17 + 206, 21 0 - 686, 331 + 686, 307 toolStripSeparator4 @@ -461,6 +485,9 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + menuKeepClear + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -470,8 +497,8 @@ Bottom - - System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Export share URLs to clipboard (Ctrl+C) scMain.Panel2 @@ -480,7 +507,7 @@ System.Windows.Forms.ToolStripDropDownButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 39, 17 + 39, 21 menuAddServers2 @@ -488,8 +515,8 @@ Fill - - tsbServer + + 3 Add [VMess] server @@ -497,9 +524,6 @@ System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -510,7 +534,7 @@ tsbAbout - 195, 17 + 206, 21 toolStripSeparator5 @@ -527,8 +551,11 @@ 352, 6 - - 256, 331 + + tsbPromotion + + + 128, 53 4, 4, 4, 4 @@ -539,17 +566,14 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 6, 56 - - - System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 352, 6 groupBox1 - 195, 17 + 206, 21 2 @@ -557,21 +581,21 @@ 125, 22 - - 0, 17 + + Clear all service statistics scMain.Panel2 + + menuRoutings + - 58, 53 + 161, 22 355, 22 - - Not Enabled Http Proxy - 187, 22 @@ -587,14 +611,17 @@ 686 - - ImageAboveText + + tsbTestMe - 265, 164 + 265, 170 - - 355, 22 + + 243, 22 + + + $this System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -605,9 +632,15 @@ Check for updates - + + tsbCheckUpdateXrayCore + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 0, 21 + toolSslServerSpeed @@ -615,49 +648,40 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 4 + 5 - - 125, 22 - - - Only open Http proxy and clear the proxy settings + + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 scMain + + 203, 22 + HTTP: Remove selected servers (Delete) - - 411, 22 - - - menuKeepPAC - 0 Help + + menuMsgBoxSelectAll + menuSelectAll - - $this - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Vertical + + Move to top (T) - System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -668,11 +692,11 @@ ImageAboveText - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 1 - - 187, 22 + + Promotion menuAddServers @@ -689,20 +713,26 @@ menuRemoveDuplicateServer + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + BottomCenter menuExport2ShareUrl + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + tsMain System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tsbReload + + SOCKS5: v2rayN (this software) @@ -719,11 +749,11 @@ 0, 66 - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 6 - - tsbV2rayWebsite + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Server @@ -734,9 +764,6 @@ menuAddShadowsocksServer - - txtMsgBox - toolSslBlank4 @@ -752,8 +779,8 @@ Language-[English] - - menuSpeedServer + + tsbSubSetting 264, 22 @@ -761,33 +788,39 @@ 0 - - toolSslBlank3 + + Fill - - 128, 53 + + Routing Add [Trojan] server + + 161, 22 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - toolStripSeparator11 + + ImageAboveText System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 0, 417 - - - System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + 0, 393 352, 6 + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -800,20 +833,23 @@ 1 - - toolSslPacPort + + tsbV2rayWebsite + + + cmsMsgBox System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - Settings + OptionSetting menuMoveTop - - menuKeep + + Copy (Ctrl+C) @@ -832,12 +868,15 @@ ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAMAAAADAAAACw== - - 952, 351 + + menuMsgBoxAddRoutingRule menuScanScreen + + ImageAboveText + cmsLv @@ -847,12 +886,15 @@ 6, 56 - - Fill - toolSslBlank1 + + scMain.Panel1 + + + tsbReload + tsbSubUpdate @@ -865,11 +907,11 @@ SPEED Disabled - - PAC: + + 355, 22 - - Promotion + + 67, 53 menuSysAgentMode @@ -877,8 +919,8 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0, 0 + + ImageAboveText Export subscription (base64) share to clipboard @@ -910,17 +952,20 @@ toolStripSeparator13 - - 1 + + RoutingSetting System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0, 17 + + Subscriptions + + + tsbQRCodeSwitch - 3, 151 + 3, 171 True @@ -928,8 +973,8 @@ 355, 22 - - Subscriptions + + 6, 56 952, 10 @@ -940,18 +985,15 @@ 264, 22 - - menuNotEnabledHttp - 0 - - Informations - toolStripSeparator8 + + menuMsgBoxCopyAll + 89, 53 @@ -964,9 +1006,6 @@ Test servers ping (Ctrl+P) - - System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -979,6 +1018,15 @@ System.Windows.Forms.ToolStripDropDownButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Windows.Forms.ToolStripDropDownButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Top + menuSetDefaultServer @@ -988,11 +1036,11 @@ Settings - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 45, 53 - - menuCopyServer + + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Http proxy @@ -1000,12 +1048,6 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 411, 22 - - - Only open PAC and clear the proxy settings - 355, 22 @@ -1021,6 +1063,9 @@ menuExit + + 227, 22 + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1051,11 +1096,14 @@ 2 - - menuKeepPACNothing + + Magenta - - Check for updated PAC (need the HTTP proxy are ON) + + 4, 4, 4, 4 + + + Magenta 355, 22 @@ -1063,11 +1111,8 @@ v2rayN Project - - Servers - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 0 System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1075,11 +1120,14 @@ Select All (Ctrl+A) - - ImageAboveText + + Informations - - 3 + + $this + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1087,11 +1135,8 @@ tsbCheckUpdateCore - - SOCKS5: - - - 33, 17 + + menuSpeedServer 355, 22 @@ -1099,14 +1144,17 @@ menuRemoveServer - - tsbTestMe + + tsbServer + + + Test current service status 355, 22 - 946, 134 + 946, 154 System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1120,20 +1168,14 @@ Down (D) - - menuCopyPACUrl - 352, 6 Magenta - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Only open PAC and do nothing + + 243, 22 355, 22 @@ -1153,9 +1195,15 @@ 0, 0 + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + 355, 22 + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + groupBox2 @@ -1171,11 +1219,11 @@ 微软雅黑, 8pt - - Export share URLs to clipboard (Ctrl+C) + + Vertical - 411, 22 + 243, 22 355, 22 @@ -1189,26 +1237,23 @@ System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Simplify PAC (need to set Core route) - - + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0 - $this - - Fill + + 0, 0 qrCodeControl - - 264, 22 + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Clear system proxy 355, 22 @@ -1225,8 +1270,8 @@ 微软雅黑, 8pt - - tsbPromotion + + groupBox2 ImageAboveText @@ -1234,21 +1279,15 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - menuGlobalPAC - - 393, 22 + 203, 22 - 356, 600 + 356, 622 0, 0 - - scMain.Panel1 - Up (U) @@ -1259,7 +1298,7 @@ notifyMain - Open Http proxy and set the system proxy (global mode) + Set system proxy System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1267,6 +1306,9 @@ MiddleRight + + Select All (Ctrl+A) + tsbOptionSetting @@ -1285,14 +1327,11 @@ 64, 53 - - Magenta + + 228, 92 - 946, 22 - - - Open PAC and set the system proxy (PAC mode) + 946, 26 355, 22 @@ -1303,11 +1342,8 @@ menuAddVlessServer - - System.Windows.Forms.StatusStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 946, 331 + 946, 307 6, 56 @@ -1316,7 +1352,7 @@ Add [Shadowsocks] server - 390, 6 + 261, 6 微软雅黑, 8pt @@ -1324,14 +1360,8 @@ 952, 593 - - 411, 22 - - - tsbCheckClearPACList - - - Test current service status + + Scan QR code on the screen toolSslSocksPort @@ -1345,9 +1375,6 @@ menuMoveBottom - - 393, 22 - 1 @@ -1366,15 +1393,18 @@ 0 + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + ImageAboveText + + 264, 22 + 6, 56 - - 0, 17 - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1387,11 +1417,8 @@ 52, 53 - - ImageAboveText - - - toolSslPacPortLab + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1399,15 +1426,12 @@ Exit - - bgwScan + + menuClearServerStatistics System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Scan QR code on the screen - 0, 56 @@ -1418,7 +1442,7 @@ 264, 22 - 0, 17 + 0, 21 0 @@ -1426,8 +1450,8 @@ Import bulk URL from clipboard (Ctrl+V) - - $this + + Update XrayCore toolStripSeparator2 @@ -1441,14 +1465,14 @@ toolSslHttpPort + + bgwScan + System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 352, 6 - - 952, 176 + 952, 200 statusStrip1 @@ -1456,15 +1480,9 @@ System.Windows.Forms.ToolStripDropDownButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0 - Fill - - Copy local PAC URL - 3, 17 @@ -1473,37 +1491,37 @@ - iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAADJJREFUWEftzrENACAIRUFGdVMdTZkAG4zFXfI68kMAAD8ap9lUbpfyaDV19QAA - 8FDEBl3RImu5VcdbAAAAAElFTkSuQmCC + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAAySURBVFhH7c6xDQAgCEVBRnVTHU2ZABuMxV3yOvJDAAA/ + GqfZVG6X8mg1dfUAAPBQxAZd0SJruVXHWwAAAABJRU5ErkJggg== 355, 22 - - 微软雅黑, 8pt - 355, 22 System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.StatusStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tsbCheckUpdatePACList - - - 228, 18 + + 603, 17 + + + zh-Hans True + + 228, 18 + - 108 + 65 137, 17 diff --git a/v2rayN/v2rayN/Forms/MainForm.zh-Hans.resx b/v2rayN/v2rayN/Forms/MainForm.zh-Hans.resx index 83e8f530..c4e9f00c 100644 --- a/v2rayN/v2rayN/Forms/MainForm.zh-Hans.resx +++ b/v2rayN/v2rayN/Forms/MainForm.zh-Hans.resx @@ -259,6 +259,12 @@ 测试当前服务状态 + + 300, 22 + + + 清除所有服务统计数据 + 297, 6 @@ -286,8 +292,14 @@ 批量导出订阅内容至剪贴板(多选) + + 73, 53 + + + 服务器 + - 301, 600 + 301, 622 @@ -306,62 +318,35 @@ ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAMAAAADAAAACw== - - 73, 53 + + 172, 22 - - 服务器 + + 清除系统代理 - - 196, 164 + + 172, 22 + + + 自动配置系统代理 + + + 172, 22 + + + 不改变系统代理 195, 22 - Http代理 + 系统代理 - - 316, 22 + + 195, 22 - - 关闭Http代理 - - - 316, 22 - - - 开启Http代理,并自动配置系统代理(全局模式) - - - 316, 22 - - - 开启PAC,并自动配置系统代理(PAC模式) - - - 316, 22 - - - 仅开启Http代理,并清除系统代理 - - - 316, 22 - - - 仅开启PAC,并清除系统代理 - - - 316, 22 - - - 仅开启Http代理,不改变系统代理 - - - 316, 22 - - - 仅开启PAC,不改变系统代理 + + 路由 195, 22 @@ -369,6 +354,9 @@ 服务器 + + 192, 6 + 195, 22 @@ -381,12 +369,6 @@ 扫描屏幕上的二维码 - - 195, 22 - - - 复制本地PAC网址 - 195, 22 @@ -402,20 +384,44 @@ 退出 + + 196, 170 + 服务器列表 - - 信息 + + 221, 22 + + + 全选 (Ctrl+A) + + + 221, 22 + + + 复制 (Ctrl+C) + + + 221, 22 + + + 复制所有 + + + 221, 22 + + + 快速添加路由规则 (Ctrl+V) + + + 222, 114 网速显示未启用 - - 61, 53 - - - 订阅 + + 信息 124, 22 @@ -429,6 +435,12 @@ 更新订阅 + + 61, 53 + + + 订阅 + 52, 53 @@ -436,10 +448,22 @@ 分享 - 76, 53 + 124, 22 - 参数设置 + 参数设置 + + + 124, 22 + + + 路由设置 + + + 61, 53 + + + 设置 @@ -458,38 +482,35 @@ 重启服务 + + 135, 22 + + + v2rayN + + + 135, 22 + + + v2fly-Core + + + 135, 22 + + + Xray-Core + 85, 53 检查更新 - - 223, 22 + + v2rayN 项目 - - v2rayN - - - 223, 22 - - - v2rayCore - - - 223, 22 - - - PAC - - - 220, 6 - - - 223, 22 - - - 简化PAC (请设置Core路由) + + V2Ray 官网 69, 53 @@ -497,12 +518,6 @@ 帮助 - - v2rayN 项目 - - - V2Ray 官网 - 68, 53 diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs b/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs index 62af6048..ddbc4857 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs @@ -34,12 +34,8 @@ this.tabPage1 = new System.Windows.Forms.TabPage(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.chkdefAllowInsecure = new System.Windows.Forms.CheckBox(); - 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(); @@ -55,21 +51,9 @@ 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.linkDnsObjectDoc = new System.Windows.Forms.LinkLabel(); + this.txtremoteDNS = new System.Windows.Forms.TextBox(); + this.label14 = new System.Windows.Forms.Label(); this.tabPage6 = new System.Windows.Forms.TabPage(); this.chkKcpcongestion = new System.Windows.Forms.CheckBox(); this.txtKcpwriteBufferSize = new System.Windows.Forms.TextBox(); @@ -85,18 +69,15 @@ this.txtKcpmtu = new System.Windows.Forms.TextBox(); this.label6 = new System.Windows.Forms.Label(); this.tabPage7 = new System.Windows.Forms.TabPage(); + this.chkIgnoreGeoUpdateCore = new System.Windows.Forms.CheckBox(); + this.cmbCoreType = new System.Windows.Forms.ComboBox(); + this.label4 = new System.Windows.Forms.Label(); this.chkKeepOlderDedupl = new System.Windows.Forms.CheckBox(); this.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(); @@ -104,56 +85,41 @@ 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 // - resources.ApplyResources(this.btnClose, "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 // - 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); - this.tabControl1.Controls.Add(this.tabPage9); + resources.ApplyResources(this.tabControl1, "tabControl1"); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; // // tabPage1 // - resources.ApplyResources(this.tabPage1, "tabPage1"); this.tabPage1.Controls.Add(this.groupBox1); + resources.ApplyResources(this.tabPage1, "tabPage1"); this.tabPage1.Name = "tabPage1"; this.tabPage1.UseVisualStyleBackColor = true; // // groupBox1 // - resources.ApplyResources(this.groupBox1, "groupBox1"); this.groupBox1.Controls.Add(this.chkdefAllowInsecure); - 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); @@ -168,6 +134,7 @@ 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; // @@ -177,26 +144,6 @@ this.chkdefAllowInsecure.Name = "chkdefAllowInsecure"; this.chkdefAllowInsecure.UseVisualStyleBackColor = true; // - // label16 - // - resources.ApplyResources(this.label16, "label16"); - this.label16.Name = "label16"; - // - // cmblistenerType - // - resources.ApplyResources(this.cmblistenerType, "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")}); - this.cmblistenerType.Name = "cmblistenerType"; - // // chksniffingEnabled2 // resources.ApplyResources(this.chksniffingEnabled2, "chksniffingEnabled2"); @@ -209,16 +156,6 @@ 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"); @@ -240,12 +177,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 @@ -260,8 +197,8 @@ // // cmbprotocol // - resources.ApplyResources(this.cmbprotocol, "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"), @@ -287,7 +224,6 @@ // // cmbloglevel // - resources.ApplyResources(this.cmbloglevel, "cmbloglevel"); this.cmbloglevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbloglevel.FormattingEnabled = true; this.cmbloglevel.Items.AddRange(new object[] { @@ -296,6 +232,7 @@ resources.GetString("cmbloglevel.Items2"), resources.GetString("cmbloglevel.Items3"), resources.GetString("cmbloglevel.Items4")}); + resources.ApplyResources(this.cmbloglevel, "cmbloglevel"); this.cmbloglevel.Name = "cmbloglevel"; // // label5 @@ -315,127 +252,32 @@ // // tabPage2 // + this.tabPage2.Controls.Add(this.linkDnsObjectDoc); + this.tabPage2.Controls.Add(this.txtremoteDNS); + this.tabPage2.Controls.Add(this.label14); resources.ApplyResources(this.tabPage2, "tabPage2"); - this.tabPage2.Controls.Add(this.groupBox2); this.tabPage2.Name = "tabPage2"; this.tabPage2.UseVisualStyleBackColor = true; // - // groupBox2 + // linkDnsObjectDoc // - resources.ApplyResources(this.groupBox2, "groupBox2"); - this.groupBox2.Controls.Add(this.tabControl2); - this.groupBox2.Controls.Add(this.panel3); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.TabStop = false; + resources.ApplyResources(this.linkDnsObjectDoc, "linkDnsObjectDoc"); + this.linkDnsObjectDoc.Name = "linkDnsObjectDoc"; + this.linkDnsObjectDoc.TabStop = true; + this.linkDnsObjectDoc.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkDnsObjectDoc_LinkClicked); // - // tabControl2 + // txtremoteDNS // - 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); - this.tabControl2.Name = "tabControl2"; - this.tabControl2.SelectedIndex = 0; + resources.ApplyResources(this.txtremoteDNS, "txtremoteDNS"); + this.txtremoteDNS.Name = "txtremoteDNS"; // - // tabPage3 + // label14 // - resources.ApplyResources(this.tabPage3, "tabPage3"); - this.tabPage3.Controls.Add(this.txtUseragent); - this.tabPage3.Name = "tabPage3"; - this.tabPage3.UseVisualStyleBackColor = true; - // - // txtUseragent - // - resources.ApplyResources(this.txtUseragent, "txtUseragent"); - this.txtUseragent.Name = "txtUseragent"; - // - // tabPage4 - // - resources.ApplyResources(this.tabPage4, "tabPage4"); - this.tabPage4.Controls.Add(this.txtUserdirect); - this.tabPage4.Name = "tabPage4"; - this.tabPage4.UseVisualStyleBackColor = true; - // - // txtUserdirect - // - resources.ApplyResources(this.txtUserdirect, "txtUserdirect"); - this.txtUserdirect.Name = "txtUserdirect"; - // - // tabPage5 - // - resources.ApplyResources(this.tabPage5, "tabPage5"); - this.tabPage5.Controls.Add(this.txtUserblock); - this.tabPage5.Name = "tabPage5"; - this.tabPage5.UseVisualStyleBackColor = true; - // - // txtUserblock - // - resources.ApplyResources(this.txtUserblock, "txtUserblock"); - this.txtUserblock.Name = "txtUserblock"; - // - // tabPage8 - // - 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[] { - resources.GetString("cmbroutingMode.Items"), - resources.GetString("cmbroutingMode.Items1"), - resources.GetString("cmbroutingMode.Items2"), - resources.GetString("cmbroutingMode.Items3")}); - this.cmbroutingMode.Name = "cmbroutingMode"; - // - // panel3 - // - resources.ApplyResources(this.panel3, "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); - 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 - // - 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")}); - this.cmbdomainStrategy.Name = "cmbdomainStrategy"; + resources.ApplyResources(this.label14, "label14"); + this.label14.Name = "label14"; // // tabPage6 // - resources.ApplyResources(this.tabPage6, "tabPage6"); this.tabPage6.Controls.Add(this.chkKcpcongestion); this.tabPage6.Controls.Add(this.txtKcpwriteBufferSize); this.tabPage6.Controls.Add(this.label10); @@ -449,6 +291,7 @@ 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; // @@ -520,18 +363,40 @@ // // tabPage7 // - resources.ApplyResources(this.tabPage7, "tabPage7"); + this.tabPage7.Controls.Add(this.chkIgnoreGeoUpdateCore); + this.tabPage7.Controls.Add(this.cmbCoreType); + this.tabPage7.Controls.Add(this.label4); this.tabPage7.Controls.Add(this.chkKeepOlderDedupl); this.tabPage7.Controls.Add(this.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; // + // chkIgnoreGeoUpdateCore + // + resources.ApplyResources(this.chkIgnoreGeoUpdateCore, "chkIgnoreGeoUpdateCore"); + this.chkIgnoreGeoUpdateCore.Name = "chkIgnoreGeoUpdateCore"; + this.chkIgnoreGeoUpdateCore.UseVisualStyleBackColor = true; + // + // cmbCoreType + // + this.cmbCoreType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbCoreType.FormattingEnabled = true; + this.cmbCoreType.Items.AddRange(new object[] { + resources.GetString("cmbCoreType.Items"), + resources.GetString("cmbCoreType.Items1")}); + resources.ApplyResources(this.cmbCoreType, "cmbCoreType"); + this.cmbCoreType.Name = "cmbCoreType"; + // + // label4 + // + resources.ApplyResources(this.label4, "label4"); + this.label4.Name = "label4"; + // // chkKeepOlderDedupl // resources.ApplyResources(this.chkKeepOlderDedupl, "chkKeepOlderDedupl"); @@ -540,9 +405,9 @@ // // 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 @@ -562,52 +427,17 @@ 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 - // - 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 @@ -638,24 +468,11 @@ 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.tabPage2.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); @@ -675,9 +492,7 @@ private System.Windows.Forms.Panel panel1; private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage tabPage1; - private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.ComboBox cmbprotocol; private System.Windows.Forms.Label label1; private System.Windows.Forms.ComboBox cmbprotocol2; @@ -686,14 +501,6 @@ private System.Windows.Forms.CheckBox chkudpEnabled2; private System.Windows.Forms.CheckBox chkAllowIn2; private System.Windows.Forms.CheckBox chkmuxEnabled; - private System.Windows.Forms.TabControl tabControl2; - private System.Windows.Forms.TabPage tabPage3; - private System.Windows.Forms.TabPage tabPage4; - private System.Windows.Forms.Label labRoutingTips; - private System.Windows.Forms.TextBox txtUseragent; - private System.Windows.Forms.TabPage tabPage5; - private System.Windows.Forms.TextBox txtUserdirect; - private System.Windows.Forms.TextBox txtUserblock; private System.Windows.Forms.TabPage tabPage6; private System.Windows.Forms.TextBox txtKcpmtu; private System.Windows.Forms.Label label6; @@ -710,29 +517,20 @@ private System.Windows.Forms.CheckBox chkKcpcongestion; private System.Windows.Forms.TabPage tabPage7; private System.Windows.Forms.CheckBox chkAutoRun; - private System.Windows.Forms.Label label13; - private System.Windows.Forms.TextBox txturlGFWList; private System.Windows.Forms.CheckBox chkAllowLANConn; - private System.Windows.Forms.TextBox txtremoteDNS; - private System.Windows.Forms.Label label14; - private System.Windows.Forms.Panel panel3; - private System.Windows.Forms.ComboBox cmbdomainStrategy; - private System.Windows.Forms.ComboBox cmbroutingMode; private System.Windows.Forms.CheckBox chksniffingEnabled; private System.Windows.Forms.CheckBox chksniffingEnabled2; - private System.Windows.Forms.Button btnSetDefRountingRule; private System.Windows.Forms.CheckBox chkEnableStatistics; private System.Windows.Forms.ComboBox cbFreshrate; private System.Windows.Forms.Label lbFreshrate; - 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; private System.Windows.Forms.CheckBox chkKeepOlderDedupl; - private System.Windows.Forms.LinkLabel linkLabelRoutingDoc; private System.Windows.Forms.CheckBox chkdefAllowInsecure; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.LinkLabel linkDnsObjectDoc; + private System.Windows.Forms.TextBox txtremoteDNS; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.ComboBox cmbCoreType; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.CheckBox chkIgnoreGeoUpdateCore; } } \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.cs b/v2rayN/v2rayN/Forms/OptionSettingForm.cs index 78d4eeff..95dbb622 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.cs +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.cs @@ -4,6 +4,7 @@ using System.Windows.Forms; using v2rayN.Handler; using v2rayN.Base; using v2rayN.HttpProxyHandler; +using v2rayN.Mode; namespace v2rayN.Forms { @@ -18,13 +19,9 @@ namespace v2rayN.Forms { InitBase(); - InitRouting(); - InitKCP(); InitGUI(); - - InitUserPAC(); } /// @@ -68,25 +65,10 @@ namespace v2rayN.Forms //remoteDNS txtremoteDNS.Text = config.remoteDNS; - cmblistenerType.SelectedIndex = (int)config.listenerType; chkdefAllowInsecure.Checked = config.defAllowInsecure; } - /// - /// 初始化路由设置 - /// - private void InitRouting() - { - //路由 - cmbdomainStrategy.Text = config.domainStrategy; - int.TryParse(config.routingMode, out int routingMode); - cmbroutingMode.SelectedIndex = routingMode; - - txtUseragent.Text = Utils.List2String(config.useragent, true); - txtUserdirect.Text = Utils.List2String(config.userdirect, true); - txtUserblock.Text = Utils.List2String(config.userblock, true); - } /// /// 初始化KCP设置 @@ -110,16 +92,10 @@ namespace v2rayN.Forms //开机自动启动 chkAutoRun.Checked = Utils.IsAutoRun(); - //自定义GFWList - txturlGFWList.Text = config.urlGFWList; - chkAllowLANConn.Checked = config.allowLANConn; chkEnableStatistics.Checked = config.enableStatistics; chkKeepOlderDedupl.Checked = config.keepOlderDedupl; - - - ComboItem[] cbSource = new ComboItem[] { new ComboItem{ID = (int)Global.StatisticsFreshRate.quick, Text = UIRes.I18N("QuickFresh")}, @@ -144,13 +120,9 @@ namespace v2rayN.Forms break; } + chkIgnoreGeoUpdateCore.Checked = config.ignoreGeoUpdateCore; + cmbCoreType.SelectedIndex = (int)config.coreType; } - - private void InitUserPAC() - { - txtuserPacRule.Text = Utils.List2String(config.userPacRule, true); - } - private void btnOK_Click(object sender, EventArgs e) { if (SaveBase() != 0) @@ -158,10 +130,6 @@ namespace v2rayN.Forms return; } - if (SaveRouting() != 0) - { - return; - } if (SaveKCP() != 0) { @@ -173,11 +141,6 @@ namespace v2rayN.Forms return; } - if (SaveUserPAC() != 0) - { - return; - } - if (ConfigHandler.SaveConfig(ref config) == 0) { this.DialogResult = DialogResult.OK; @@ -265,36 +228,12 @@ namespace v2rayN.Forms //remoteDNS config.remoteDNS = txtremoteDNS.Text.TrimEx(); - config.listenerType = (ListenerType)Enum.ToObject(typeof(ListenerType), cmblistenerType.SelectedIndex); config.defAllowInsecure = chkdefAllowInsecure.Checked; return 0; } - /// - /// 保存路由设置 - /// - /// - private int SaveRouting() - { - //路由 - string domainStrategy = cmbdomainStrategy.Text; - string routingMode = cmbroutingMode.SelectedIndex.ToString(); - - string useragent = txtUseragent.Text.TrimEx(); - string userdirect = txtUserdirect.Text.TrimEx(); - string userblock = txtUserblock.Text.TrimEx(); - - config.domainStrategy = domainStrategy; - config.routingMode = routingMode; - - config.useragent = Utils.String2List(useragent); - config.userdirect = Utils.String2List(userdirect); - config.userblock = Utils.String2List(userblock); - - return 0; - } /// /// 保存KCP设置 @@ -340,9 +279,6 @@ namespace v2rayN.Forms //开机自动启动 Utils.SetAutoRun(chkAutoRun.Checked); - //自定义GFWList - config.urlGFWList = txturlGFWList.Text.TrimEx(); - config.allowLANConn = chkAllowLANConn.Checked; bool lastEnableStatistics = config.enableStatistics; @@ -350,27 +286,12 @@ namespace v2rayN.Forms config.statisticsFreshRate = (int)cbFreshrate.SelectedValue; config.keepOlderDedupl = chkKeepOlderDedupl.Checked; - //if(lastEnableStatistics != config.enableStatistics) - //{ - // /// https://stackoverflow.com/questions/779405/how-do-i-restart-my-c-sharp-winform-application - // // Shut down the current app instance. - // Application.Exit(); - - // // Restart the app passing "/restart [processId]" as cmd line args - // Process.Start(Application.ExecutablePath, "/restart " + Process.GetCurrentProcess().Id); - //} - return 0; - } - - private int SaveUserPAC() - { - string userPacRule = txtuserPacRule.Text.TrimEx(); - userPacRule = userPacRule.Replace("\"", ""); - - config.userPacRule = Utils.String2List(userPacRule); + config.ignoreGeoUpdateCore = chkIgnoreGeoUpdateCore.Checked; + config.coreType = (ECoreType)cmbCoreType.SelectedIndex; return 0; } + private void btnClose_Click(object sender, EventArgs e) { this.DialogResult = DialogResult.Cancel; @@ -388,75 +309,9 @@ namespace v2rayN.Forms chkudpEnabled2.Enabled = blAllow2; } - private void btnSetDefRountingRule_Click(object sender, EventArgs e) + private void linkDnsObjectDoc_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { - txtUseragent.Text = Utils.GetEmbedText(Global.CustomRoutingFileName + Global.agentTag); - txtUserdirect.Text = Utils.GetEmbedText(Global.CustomRoutingFileName + Global.directTag); - txtUserblock.Text = Utils.GetEmbedText(Global.CustomRoutingFileName + Global.blockTag); - cmbroutingMode.SelectedIndex = 3; - - List lstUrl = new List - { - Global.CustomRoutingListUrl + Global.agentTag, - Global.CustomRoutingListUrl + Global.directTag, - Global.CustomRoutingListUrl + Global.blockTag - }; - - List lstTxt = new List - { - txtUseragent, - txtUserdirect, - txtUserblock - }; - - for (int k = 0; k < lstUrl.Count; k++) - { - TextBox txt = lstTxt[k]; - DownloadHandle downloadHandle = new DownloadHandle(); - downloadHandle.UpdateCompleted += (sender2, args) => - { - if (args.Success) - { - string result = args.Msg; - if (Utils.IsNullOrEmpty(result)) - { - return; - } - txt.Text = result; - } - else - { - AppendText(false, args.Msg); - } - }; - downloadHandle.Error += (sender2, args) => - { - AppendText(true, args.GetException().Message); - }; - - downloadHandle.WebDownloadString(lstUrl[k]); - } - } - void AppendText(bool notify, string text) - { - labRoutingTips.Text = text; - } - - private void linkLabelRoutingDoc_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) - { - System.Diagnostics.Process.Start("https://www.v2fly.org/config/routing.html"); - } - } - - class ComboItem - { - public int ID - { - get; set; - } - public string Text - { - get; set; + System.Diagnostics.Process.Start("https://www.v2fly.org/config/dns.html#dnsobject"); } } } diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.resx b/v2rayN/v2rayN/Forms/OptionSettingForm.resx index 2d85641a..4ce51c06 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.resx +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.resx @@ -117,34 +117,995 @@ 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, 192 + + + 102, 16 + + + 35 + + + allowInsecure + + + chkdefAllowInsecure + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 0 + + + 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 + + + 1 + + + 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 + + + 2 + + + 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 + + + 3 + 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 + + + 4 + + + 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 + + + 5 + + + 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 + + + 6 + + + 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 + + + 7 + + + 124, 60 + + + 78, 21 + + + 14 + + + False + + + txtlocalPort2 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + groupBox1 + + + 8 + + + 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 + + + 9 + + + True + + + 206, 29 + + + 53, 12 + + 11 - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + protocol - - groupBox2 + + label1 - - 2 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 30, 176 + + groupBox1 + + + 10 + + + 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 + + + 11 + + + True + + + 15, 160 + + + 126, 16 + + + 9 Record local logs - - 634, 460 + + chklogEnabled + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 12 + + + 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 + + + 13 + + + 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 + + + 14 + + + 124, 25 + + + 78, 21 + + + 3 + + + txtlocalPort + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 15 + + + 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 + + + 16 + + + Fill + + + 3, 3 + + + 648, 421 + + + 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, 427 + + + 0 + + + Core: basic settings + + + tabPage1 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl1 + + + 0 + + + True + + + NoControl + + + 342, 17 + + + 0, 0, 0, 0 + + + 107, 12 + + + 40 + + + Support DnsObject + + + linkDnsObjectDoc + + + System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage2 + + + 0 + + + 8, 41 + + + True + + + Vertical + + + 638, 356 + + + 39 + + + txtremoteDNS + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage2 + + + 1 + + + True + + + NoControl + + + 8, 17 + + + 281, 12 + + + 38 + + + Custom DNS (multiple, separated by commas (,)) + + + label14 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage2 + + + 2 + + + 4, 22 + + + 654, 427 + + + 4 + + + Core: DNS 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 + + + 1 + + + True + + + 236, 104 + + + 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 12 @@ -152,1922 +1113,424 @@ 4, 22 - - txtKcpwriteBufferSize - - - txtuserPacRule - - - 2 - - - False - - - 18 - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl1 - - - groupBox1 - - - 5 - - - 94, 21 - - - 9 - - - groupBox1 - - - tabPage9 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - linkLabelRoutingDoc - - - 468, 60 - - - - Top - - - 102, 16 - - - 6 - - - txtKcptti - - - tabPage3 - - - 4, 22 - - - cmblistenerType - - - 0 - - - 634, 460 - - - 0 - - - 111, 100 - - - True - - - System.Windows.Forms.Label, 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 - - - 3, 3 - - - 598, 16 - - - 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 - - - groupBox1 - - - 65, 12 - - - 628, 454 - - - tabPage7 - - - Only open PAC, do not automatically configure PAC - - - 12 - - - 662, 60 - - - 20 - - - http - - - 7 - - - chkdefAllowInsecure - - - 648, 573 - - - 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 - - - 12 - - - txtKcpmtu - - - lbFreshrate - - - 1 - - - label11 - - - 29 - - - 1 - - - NoControl - - - Turn on Sniffing - - - Only open Http proxy, do not automatically configure proxy server (direct mode) - - - False - - - 4 - - - tabPage6 - - - False - - - tabControl2 - - - 1 - - - $this - - - 7 - - - 3 - - - 4 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 0 - - - readBufferSize - - - 0 - - - tabPage6 - - - 3 - - - True - - - 18 - - - True - - - Fill - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - True - - - congestion - - - NoControl - - - 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 - - - 20 - - - groupBox1 - - - 16 - - - Not Enabled Http Proxy - - - 14 - - - 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 - - - 198, 16 - - - Automatically start at system startup - - - 3, 3, 3, 3 - - - 1 - - - Http proxy - - - 4 - - - groupBox1 - - - tabPage6 - - - 355, 16 - - - 3, 3, 3, 3 - - - 97, 20 - - - 3 - - - 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 - - - v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - - warning - - - groupBox1 - - - 0 - - - tabPage7 - - - Statistics freshrate - - - label5 - - - 120, 16 - - - 20 - - - 89, 12 - - - Only open Http proxy and do nothing - - - 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 - - - 2 - - - 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 - - - 6 - - - 174, 16 - - - 16 - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 18, 104 - - - tabPage2 - - - NoControl - - - 97, 20 - - - socks - - - tabPage5 - - - 576, 16 - - - 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 - - - True - - - tabPage6 - - - *Set the rules, separated by commas (,); support Domain (pure string / regular / subdomain) and IP - - - tabPage3 - - - 30 - - - 53, 12 - - - 17 - - - label8 - - - 468, 27 - - - label13 - - - chkAutoRun - - - tabControl2 - - - 654, 579 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 345, 62 - - - 15 - - - 12 - - - 1 - - - chkudpEnabled - - - True - - - 33, 253 - - - tabPage1 - - - 5 - - - tabPage6 - - - 2 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 5 - - - btnSetDefRountingRule - - - True - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 32 - - - label1 - - - 84, 16 - - - tabPage8 - - - True - - - panel4 - - - label7 - - - allowInsecure - - - txtlocalPort - - - True - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 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 - - - Top, Right - - - Turn on Mux Multiplexing - - - True - - - 23, 12 - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 555, 100 - - - socks - - - 0 - - - 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 - - - tabControl1 - - - True - - - tabPage6 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 15, 38 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 3 - - - 10 - - - 369, 62 - - - 13 - - - 1.Proxy Domain or IP - - - groupBox1 - - - panel3 - - - NoControl - - - 654, 579 - - - chkEnableStatistics - - - 14 - - - 8 - - - 7 - - - http - - - 53, 12 - - - 193, 162 - - - True - - - 2 - - - 0 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - label2 - - - 165, 20 - - - False - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 0 - - - 3, 3 - - - 9 - - - groupBox1 - - - 4.Pre-defined rules - - - 101, 12 - - - 3 - - - 12 - - - 431, 12 - - - Domain strategy - - - cmbprotocol - - - 648, 37 - - - True - - - Enable Statistics (Realtime netspeed and traffic records. Require restart the v2rayN client) - - - System.Windows.Forms.TabControl, 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 - - - chkKeepOlderDedupl - - - 15, 129 - - - 255, 20 - - - mtu - - - True - - - True - - - True - - - chkKcpcongestion - - - 1 - - - 0 - - - 257, 25 - - - 3, 84 - - - groupBox1 - - - Top - - - listening port 2 - - - 97, 20 - - - chkAllowIn2 - - - tabPage2 - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - True - - - True - - - False - - - 3 - - - 33 - - - 4, 22 - - - 9 - - - 541, 100 - - - Core: KCP settings - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - error - - - 15, 160 - - - True - - - 59, 12 - - - 5, 14 - - - groupBox1 - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 634, 460 - - - 12 - - - 120, 16 - - - 662, 10 - - - txtlocalPort2 - - - Only open PAC and do nothing - - - True - - - Fill - - - groupBox1 - - - 654, 579 - - - 7 - - - 27 - - - 10 - - - False - - - Vertical - - - 206, 29 - - - 8 - - - txtUserdirect - - - chkudpEnabled2 - - - 0 - - - 0 - - - 648, 536 - - - Allow connections from the LAN - - - 161, 84 - - - panel3 - - - 0 - - - tabPage6 - - - tabControl2 - - - 30, 87 - - - txtKcpreadBufferSize - - - 4 - - - panel2 - - - 3 - - - 8 - - - 35 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - User PAC settings - - - 95, 12 - - - tabPage7 - - - 10 - - - none - - - Log level - - - tabControl1 - - - protocol - - - 6 - - - tabPage4 - - - NoControl + + 654, 427 2 - - AsIs - - - 15, 62 - - - 7 - - - tabPage7 - - - 642, 486 - - - 4, 22 - - - 58, 20 - - - groupBox1 - - - 1 - - - 42, 98 - - - 13 - - - 13 - - - 2 - - - downlinkCapacity - - - True - - - 78, 21 - - - tabPage7 - - - True - - - 19 - - - 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 - - - Custom GFWList address (please fill in the blank without customization) - - - 345, 100 - - - panel3 - - - 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 - - - 6 - - - 1 - - - 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 - - - 11 - - - 18 - - - 126, 16 - - - 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 - - - System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage4 - - - 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 - - - tabPage5 - - - 9 - - - 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 - - - 8 - - - txtremoteDNS - - - 3, 3 - - - 0, 615 - - - 19 - - - 33 - - - 94, 21 - - - 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 - - - 4 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Fill + + Core: KCP settings tabPage6 - - groupBox1 + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - groupBox1 + + tabControl1 - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel4 - - - True - - - 29 - - - Fill - - - True - - - 3, 3 - - - OptionSettingForm - - - 124, 94 - - - Core: Routing settings - - - 13 - - - tabPage8 - - + 2 - - 236, 104 - - - 5 - - - Open PAC and automatically configure PAC (PAC mode) - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - NoControl - - - tabPage9 - - - 94, 21 - - - 75, 23 - - - 15, 16 - - - 33, 277 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 0, 0, 0, 0 - - - 662, 675 - - - uplinkCapacity - - - IPOnDemand - - - NoControl - - + True - - 6 + + NoControl - + + 15, 132 + + + 234, 16 + + + 36 + + + Ignore Geo files when updating core + + + chkIgnoreGeoUpdateCore + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage7 + + + 0 + + + v2fly_core + + + Xray_core + + + 325, 130 + + + 97, 20 + + + 34 + + + cmbCoreType + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage7 + + 1 - - 0 + + True - - Settings + + NoControl - - 0 + + 253, 134 - - 3, 3, 3, 3 + + 59, 12 - - 3, 3 + + 35 - - 32, 205 - - - cmbloglevel - - - 111, 62 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Core Type label4 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox2 - - - label16 - - - btnOK - - - Set default custom routing rules - - - tabPage6 - - - txturlGFWList - - - chkmuxEnabled - - - 654, 579 - - - tabPage6 - - - tabControl1 - - - 0 - - - 15, 110 - - - 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 - - - 19 - - - 2.Direct Domain or IP - - - 267, 16 - - - Global - - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Fill + + tabPage7 - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 2 - - 9 + + True - - 0 + + NoControl - - 322, 10 + + 15, 108 - - 15, 192 + + 198, 16 - - 0 - - - 94, 21 - - - 3 + + 33 Keep older when deduplication - - 3, 3, 3, 3 + + chkKeepOlderDedupl - - 236, 28 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Bottom + + tabPage7 - + 3 - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 161, 84 - - 0 + + 58, 20 - - groupBox1 - - - 125, 12 - - - 3, 3, 3, 3 - - - 11 - - - 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 + + 32 cbFreshrate + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage7 + + + 4 + + + True + + + NoControl + + + 30, 88 + + + 125, 12 + + + 30 + + + Statistics freshrate + + + lbFreshrate + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage7 + + + 5 + + + True + + + NoControl + + + 15, 64 + + + 576, 16 + + + 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 + + + 6 + + + True + + + 15, 40 + + + 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 + + + 7 + + + True + + + 15, 16 + 246, 16 - - tabPage6 + + 23 - - label6 + + Automatically start at system startup - - 111, 24 + + chkAutoRun - - panel2 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 21 + + tabPage7 - - label9 + + 8 + + + 4, 22 + + + 3, 3, 3, 3 + + + 654, 427 + + + 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, 453 + + + 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, 463 + + + 662, 60 + + + 11 + + + panel2 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + Top + + + 0, 0 + + + 662, 10 + + + 9 + panel1 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + 2 - - label14 - True + + 6, 12 + + + 662, 523 + + + 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 81c0d92c..eccd6e2c 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx @@ -120,43 +120,13 @@ 取消(&C) - - Core:基础设置 - - 222, 16 + 336, 16 底层传输安全选tls时,默认跳过证书验证(allowInsecure) - - 53, 12 - - - Http代理 - - - 关闭Http代理 - - - 开启Http代理,并自动配置系统代理(全局模式) - - - 开启PAC,并自动配置系统代理(PAC模式) - - - 仅开启Http代理,并清除系统代理 - - - 仅开启PAC,并清除系统代理 - - - 仅开启Http代理,不改变系统代理 - - - 仅开启PAC,不改变系统代理 - 96, 16 @@ -169,12 +139,6 @@ 开启流量探测 - - 191, 12 - - - 自定义DNS(可多个,用逗号(,)隔开) - 开启Mux多路复用(默认开启) @@ -226,106 +190,50 @@ 本地监听端口 + + 648, 437 + + + 654, 443 + + + Core:基础设置 + + + 161, 12 + + + 支持填写DnsObject,JSON格式 + + + 191, 12 + + + 自定义DNS(可多个,用逗号(,)隔开) + + + 654, 443 + - Core:路由设置 + Core:DNS设置 - - 3, 89 - - - 642, 481 - - - 634, 455 - - - 1.代理的Domain或IP - - - 628, 449 - - - 634, 455 - - - 2.直连的Domain或IP - - - 628, 449 - - - 634, 455 - - - 3.阻止的Domain或IP - - - 628, 449 - - - 634, 455 - - - 4.预定义规则 - - - 全局 - - - 绕过局域网地址 - - - 绕过大陆地址 - - - 绕过局域网及大陆地址 - - - 19, 26 - - - 244, 20 - - - 642, 72 - - - 77, 12 - - - 域名解析策略 - - - - NoControl - - - 351, 14 - - - 201, 23 - - - 一键设置默认自定义路由规则 - - - - True - - - 5, 49 - - - 383, 12 - - - *设置的规则,用逗号(,)隔开;支持Domain(纯字符串/正则/子域名)和IP + + 654, 443 Core:KCP设置 - - v2rayN设置 + + 150, 16 + + + 更新Core时忽略Geo文件 + + + 53, 12 + + + Core类型 156, 16 @@ -351,27 +259,30 @@ 允许来自局域网的连接 - - 227, 12 - - - 自定义GFWList地址(不需自定义请填空白) - 180, 16 开机自动启动(可能会不成功) - - 用户PAC设置 + + 654, 443 - - *设置用户PAC规则,用逗号(,)隔开 + + v2rayN设置 + + + 662, 469 确定(&O) + + 0, 479 + + + 662, 539 + 参数设置 diff --git a/v2rayN/v2rayN/Forms/QRCodeControl.cs b/v2rayN/v2rayN/Forms/QRCodeControl.cs index 02d59b48..855db30d 100644 --- a/v2rayN/v2rayN/Forms/QRCodeControl.cs +++ b/v2rayN/v2rayN/Forms/QRCodeControl.cs @@ -24,7 +24,7 @@ namespace v2rayN.Forms { if (Index >= 0) { - string url = ConfigHandler.GetVmessQRCode(config, Index); + string url = ShareHandler.GetShareUrl(config, Index); if (Utils.IsNullOrEmpty(url)) { picQRCode.Image = null; diff --git a/v2rayN/v2rayN/Forms/RoutingRuleQuicklyAddForm.Designer.cs b/v2rayN/v2rayN/Forms/RoutingRuleQuicklyAddForm.Designer.cs new file mode 100644 index 00000000..b187f725 --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingRuleQuicklyAddForm.Designer.cs @@ -0,0 +1,170 @@ +namespace v2rayN.Forms +{ + partial class RoutingRuleQuicklyAddForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RoutingRuleQuicklyAddForm)); + this.panel1 = new System.Windows.Forms.Panel(); + this.panel3 = new System.Windows.Forms.Panel(); + this.label4 = new System.Windows.Forms.Label(); + this.cmbOutboundTag = new System.Windows.Forms.ComboBox(); + this.panel4 = new System.Windows.Forms.Panel(); + this.btnClose = new System.Windows.Forms.Button(); + this.btnOK = new System.Windows.Forms.Button(); + this.panel2 = new System.Windows.Forms.Panel(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.txtIP = new System.Windows.Forms.TextBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.txtDomain = new System.Windows.Forms.TextBox(); + this.panel3.SuspendLayout(); + this.panel4.SuspendLayout(); + this.panel2.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + resources.ApplyResources(this.panel1, "panel1"); + this.panel1.Name = "panel1"; + // + // panel3 + // + resources.ApplyResources(this.panel3, "panel3"); + this.panel3.Controls.Add(this.label4); + this.panel3.Controls.Add(this.cmbOutboundTag); + this.panel3.Name = "panel3"; + // + // label4 + // + resources.ApplyResources(this.label4, "label4"); + this.label4.Name = "label4"; + // + // cmbOutboundTag + // + resources.ApplyResources(this.cmbOutboundTag, "cmbOutboundTag"); + this.cmbOutboundTag.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbOutboundTag.FormattingEnabled = true; + this.cmbOutboundTag.Items.AddRange(new object[] { + resources.GetString("cmbOutboundTag.Items"), + resources.GetString("cmbOutboundTag.Items1"), + resources.GetString("cmbOutboundTag.Items2")}); + this.cmbOutboundTag.Name = "cmbOutboundTag"; + // + // panel4 + // + resources.ApplyResources(this.panel4, "panel4"); + this.panel4.Controls.Add(this.btnClose); + this.panel4.Controls.Add(this.btnOK); + this.panel4.Name = "panel4"; + // + // btnClose + // + 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); + // + // btnOK + // + resources.ApplyResources(this.btnOK, "btnOK"); + this.btnOK.Name = "btnOK"; + this.btnOK.UseVisualStyleBackColor = true; + this.btnOK.Click += new System.EventHandler(this.btnOK_Click); + // + // panel2 + // + resources.ApplyResources(this.panel2, "panel2"); + this.panel2.Controls.Add(this.groupBox2); + this.panel2.Controls.Add(this.groupBox1); + this.panel2.Name = "panel2"; + // + // groupBox2 + // + resources.ApplyResources(this.groupBox2, "groupBox2"); + this.groupBox2.Controls.Add(this.txtIP); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.TabStop = false; + // + // txtIP + // + resources.ApplyResources(this.txtIP, "txtIP"); + this.txtIP.Name = "txtIP"; + // + // groupBox1 + // + resources.ApplyResources(this.groupBox1, "groupBox1"); + this.groupBox1.Controls.Add(this.txtDomain); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.TabStop = false; + // + // txtDomain + // + resources.ApplyResources(this.txtDomain, "txtDomain"); + this.txtDomain.Name = "txtDomain"; + // + // RoutingRuleQuicklyAddForm + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnClose; + this.Controls.Add(this.panel2); + this.Controls.Add(this.panel4); + this.Controls.Add(this.panel3); + this.Controls.Add(this.panel1); + this.Name = "RoutingRuleQuicklyAddForm"; + this.Load += new System.EventHandler(this.RoutingRuleQuicklyAddForm_Load); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + this.panel4.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.ComboBox cmbOutboundTag; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Button btnClose; + private System.Windows.Forms.Button btnOK; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.TextBox txtDomain; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.TextBox txtIP; + } +} \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/RoutingRuleQuicklyAddForm.cs b/v2rayN/v2rayN/Forms/RoutingRuleQuicklyAddForm.cs new file mode 100644 index 00000000..51f6d87b --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingRuleQuicklyAddForm.cs @@ -0,0 +1,73 @@ +using System; +using System.Windows.Forms; +using v2rayN.Handler; +using v2rayN.Mode; + +namespace v2rayN.Forms +{ + public partial class RoutingRuleQuicklyAddForm : BaseForm + { + public string domain + { + get; set; + } + private RulesItem rulesItem; + + public RoutingRuleQuicklyAddForm() + { + InitializeComponent(); + } + + private void RoutingRuleQuicklyAddForm_Load(object sender, EventArgs e) + { + rulesItem = new RulesItem(); + ClearBind(); + } + + private void EndBindingData() + { + if (rulesItem != null) + { + rulesItem.outboundTag = cmbOutboundTag.Text; + rulesItem.domain = Utils.String2List(txtDomain.Text); + rulesItem.ip = Utils.String2List(txtIP.Text); + } + } + + private void ClearBind() + { + cmbOutboundTag.Text = Global.agentTag; + txtDomain.Text = domain; + } + private void btnOK_Click(object sender, EventArgs e) + { + EndBindingData(); + var hasRule = false; + if (rulesItem.domain != null && rulesItem.domain.Count > 0) + { + hasRule = true; + } + if (rulesItem.ip != null && rulesItem.ip.Count > 0) + { + hasRule = true; + } + if (!hasRule) + { + return; + } + if (ConfigHandler.InsertRoutingRuleItem(ref config, rulesItem) == 0) + { + this.DialogResult = DialogResult.OK; + } + else + { + UI.ShowWarning(UIRes.I18N("OperationFailed")); + } + } + + private void btnClose_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + } + } +} diff --git a/v2rayN/v2rayN/Forms/RoutingRuleQuicklyAddForm.resx b/v2rayN/v2rayN/Forms/RoutingRuleQuicklyAddForm.resx new file mode 100644 index 00000000..b081d36d --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingRuleQuicklyAddForm.resx @@ -0,0 +1,462 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + txtIP + + + + Fill + + + + 8 + + + + 119, 20 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Fill + + + 3, 17 + + + 220, 207 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 10 + + + btnOK + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + RoutingRuleQuicklyAddForm + + + $this + + + 0, 288 + + + Bottom + + + Fill + + + 32 + + + panel4 + + + proxy + + + Left + + + 24 + + + 75, 23 + + + 6, 12 + + + 506, 10 + + + 7 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 11 + + + panel1 + + + Domain + + + groupBox1 + + + 0, 10 + + + System.Windows.Forms.Button, 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 + + + panel3 + + + 31 + + + 1 + + + 506, 51 + + + Fill + + + txtDomain + + + panel3 + + + NoControl + + + 5 + + + Top + + + panel4 + + + IP + + + 280, 0 + + + 75, 23 + + + 3, 17 + + + label4 + + + outboundTag + + + btnClose + + + block + + + direct + + + 1 + + + 2 + + + 0 + + + 305, 25 + + + panel3 + + + Top + + + 0, 0 + + + 506, 227 + + + True + + + 3 + + + 280, 227 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 4 + + + 3 + + + NoControl + + + &OK + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + cmbOutboundTag + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 506, 60 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + &Cancel + + + 226, 227 + + + 107, 16 + + + RoutingRuleQuicklyAddForm + + + NoControl + + + 0 + + + 1 + + + True + + + groupBox2 + + + 19, 20 + + + $this + + + 71, 12 + + + panel2 + + + groupBox2 + + + 4 + + + 0, 0 + + + panel4 + + + $this + + + groupBox1 + + + panel2 + + + 0, 61 + + + 0 + + + 1 + + + 274, 207 + + + 506, 348 + + + 25 + + + v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + + + 0 + + + panel2 + + + $this + + + 398, 25 + + + True + + + 0 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + zh-Hans + + \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/RoutingRuleQuicklyAddForm.zh-Hans.resx b/v2rayN/v2rayN/Forms/RoutingRuleQuicklyAddForm.zh-Hans.resx new file mode 100644 index 00000000..ee735361 --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingRuleQuicklyAddForm.zh-Hans.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + OutboundTag + + + 取消(&C) + + + 确定(&O) + + + 快速添加路由规则 + + \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/RoutingRuleSettingDetailsForm.Designer.cs b/v2rayN/v2rayN/Forms/RoutingRuleSettingDetailsForm.Designer.cs new file mode 100644 index 00000000..9f70e165 --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingRuleSettingDetailsForm.Designer.cs @@ -0,0 +1,218 @@ +namespace v2rayN.Forms +{ + partial class RoutingRuleSettingDetailsForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RoutingRuleSettingDetailsForm)); + this.panel1 = new System.Windows.Forms.Panel(); + this.panel3 = new System.Windows.Forms.Panel(); + this.clbProtocol = new System.Windows.Forms.CheckedListBox(); + this.label3 = new System.Windows.Forms.Label(); + this.txtPort = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.labRoutingTips = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.cmbOutboundTag = new System.Windows.Forms.ComboBox(); + this.panel4 = new System.Windows.Forms.Panel(); + this.btnClose = new System.Windows.Forms.Button(); + this.btnOK = new System.Windows.Forms.Button(); + this.panel2 = new System.Windows.Forms.Panel(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.txtIP = new System.Windows.Forms.TextBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.txtDomain = new System.Windows.Forms.TextBox(); + this.panel3.SuspendLayout(); + this.panel4.SuspendLayout(); + this.panel2.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + resources.ApplyResources(this.panel1, "panel1"); + this.panel1.Name = "panel1"; + // + // panel3 + // + resources.ApplyResources(this.panel3, "panel3"); + this.panel3.Controls.Add(this.clbProtocol); + this.panel3.Controls.Add(this.label3); + this.panel3.Controls.Add(this.txtPort); + this.panel3.Controls.Add(this.label1); + this.panel3.Controls.Add(this.labRoutingTips); + this.panel3.Controls.Add(this.label4); + this.panel3.Controls.Add(this.cmbOutboundTag); + this.panel3.Name = "panel3"; + // + // clbProtocol + // + resources.ApplyResources(this.clbProtocol, "clbProtocol"); + this.clbProtocol.CheckOnClick = true; + this.clbProtocol.FormattingEnabled = true; + this.clbProtocol.Items.AddRange(new object[] { + resources.GetString("clbProtocol.Items"), + resources.GetString("clbProtocol.Items1"), + resources.GetString("clbProtocol.Items2")}); + this.clbProtocol.MultiColumn = true; + this.clbProtocol.Name = "clbProtocol"; + // + // label3 + // + resources.ApplyResources(this.label3, "label3"); + this.label3.Name = "label3"; + // + // txtPort + // + resources.ApplyResources(this.txtPort, "txtPort"); + this.txtPort.Name = "txtPort"; + // + // label1 + // + resources.ApplyResources(this.label1, "label1"); + this.label1.Name = "label1"; + // + // labRoutingTips + // + resources.ApplyResources(this.labRoutingTips, "labRoutingTips"); + this.labRoutingTips.ForeColor = System.Drawing.Color.Brown; + this.labRoutingTips.Name = "labRoutingTips"; + // + // label4 + // + resources.ApplyResources(this.label4, "label4"); + this.label4.Name = "label4"; + // + // cmbOutboundTag + // + resources.ApplyResources(this.cmbOutboundTag, "cmbOutboundTag"); + this.cmbOutboundTag.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbOutboundTag.FormattingEnabled = true; + this.cmbOutboundTag.Items.AddRange(new object[] { + resources.GetString("cmbOutboundTag.Items"), + resources.GetString("cmbOutboundTag.Items1"), + resources.GetString("cmbOutboundTag.Items2")}); + this.cmbOutboundTag.Name = "cmbOutboundTag"; + // + // panel4 + // + resources.ApplyResources(this.panel4, "panel4"); + this.panel4.Controls.Add(this.btnClose); + this.panel4.Controls.Add(this.btnOK); + this.panel4.Name = "panel4"; + // + // btnClose + // + 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); + // + // btnOK + // + resources.ApplyResources(this.btnOK, "btnOK"); + this.btnOK.Name = "btnOK"; + this.btnOK.UseVisualStyleBackColor = true; + this.btnOK.Click += new System.EventHandler(this.btnOK_Click); + // + // panel2 + // + resources.ApplyResources(this.panel2, "panel2"); + this.panel2.Controls.Add(this.groupBox2); + this.panel2.Controls.Add(this.groupBox1); + this.panel2.Name = "panel2"; + // + // groupBox2 + // + resources.ApplyResources(this.groupBox2, "groupBox2"); + this.groupBox2.Controls.Add(this.txtIP); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.TabStop = false; + // + // txtIP + // + resources.ApplyResources(this.txtIP, "txtIP"); + this.txtIP.Name = "txtIP"; + // + // groupBox1 + // + resources.ApplyResources(this.groupBox1, "groupBox1"); + this.groupBox1.Controls.Add(this.txtDomain); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.TabStop = false; + // + // txtDomain + // + resources.ApplyResources(this.txtDomain, "txtDomain"); + this.txtDomain.Name = "txtDomain"; + // + // RoutingRuleSettingDetailsForm + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnClose; + this.Controls.Add(this.panel2); + this.Controls.Add(this.panel4); + this.Controls.Add(this.panel3); + this.Controls.Add(this.panel1); + this.Name = "RoutingRuleSettingDetailsForm"; + this.Load += new System.EventHandler(this.RoutingRuleSettingDetailsForm_Load); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + this.panel4.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.ComboBox cmbOutboundTag; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Button btnClose; + private System.Windows.Forms.Button btnOK; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.TextBox txtDomain; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.TextBox txtIP; + private System.Windows.Forms.Label labRoutingTips; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox txtPort; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.CheckedListBox clbProtocol; + } +} \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/RoutingRuleSettingDetailsForm.cs b/v2rayN/v2rayN/Forms/RoutingRuleSettingDetailsForm.cs new file mode 100644 index 00000000..a11e589d --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingRuleSettingDetailsForm.cs @@ -0,0 +1,115 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; +using v2rayN.Base; +using v2rayN.Handler; +using v2rayN.Mode; + +namespace v2rayN.Forms +{ + public partial class RoutingRuleSettingDetailsForm : BaseForm + { + public RulesItem rulesItem + { + get; set; + } + + public RoutingRuleSettingDetailsForm() + { + InitializeComponent(); + } + + private void RoutingRuleSettingDetailsForm_Load(object sender, EventArgs e) + { + if (Utils.IsNullOrEmpty(rulesItem.outboundTag)) + { + ClearBind(); + } + else + { + BindingData(); + } + } + + private void EndBindingData() + { + if (rulesItem != null) + { + rulesItem.port = txtPort.Text.TrimEx(); + rulesItem.outboundTag = cmbOutboundTag.Text; + rulesItem.domain = Utils.String2List(txtDomain.Text); + rulesItem.ip = Utils.String2List(txtIP.Text); + + var protocol = new List(); + for (int i = 0; i < clbProtocol.Items.Count; i++) + { + if (clbProtocol.GetItemChecked(i)) + { + protocol.Add(clbProtocol.Items[i].ToString()); + } + } + rulesItem.protocol = protocol; + } + } + private void BindingData() + { + if (rulesItem != null) + { + txtPort.Text = rulesItem.port ?? string.Empty; + cmbOutboundTag.Text = rulesItem.outboundTag; + txtDomain.Text = Utils.List2String(rulesItem.domain, true); + txtIP.Text = Utils.List2String(rulesItem.ip, true); + + if (rulesItem.protocol != null) + { + for (int i = 0; i < clbProtocol.Items.Count; i++) + { + if (rulesItem.protocol.Contains(clbProtocol.Items[i].ToString())) + { + clbProtocol.SetItemChecked(i, true); + } + } + } + } + } + private void ClearBind() + { + txtPort.Text = string.Empty; + cmbOutboundTag.Text = Global.agentTag; + txtDomain.Text = string.Empty; + txtIP.Text = string.Empty; + } + private void btnOK_Click(object sender, EventArgs e) + { + EndBindingData(); + var hasRule = false; + if (rulesItem.domain != null && rulesItem.domain.Count > 0) + { + hasRule = true; + } + if (rulesItem.ip != null && rulesItem.ip.Count > 0) + { + hasRule = true; + } + if (rulesItem.protocol != null && rulesItem.protocol.Count > 0) + { + hasRule = true; + } + if (!Utils.IsNullOrEmpty(rulesItem.port)) + { + hasRule = true; + } + if (!hasRule) + { + UI.ShowWarning(string.Format(UIRes.I18N("RoutingRuleDetailRequiredTips"), "Port/Protocol/Domain/IP")); + return; + } + this.DialogResult = DialogResult.OK; + } + + private void btnClose_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + } + } +} diff --git a/v2rayN/v2rayN/Forms/RoutingRuleSettingDetailsForm.resx b/v2rayN/v2rayN/Forms/RoutingRuleSettingDetailsForm.resx new file mode 100644 index 00000000..9070a6d9 --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingRuleSettingDetailsForm.resx @@ -0,0 +1,603 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + 53, 12 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + 32 + + + 245, 20 + + + direct + + + 31 + + + proxy + + + 107, 16 + + + + Fill + + + panel1 + + + 3 + + + clbProtocol + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 4 + + + NoControl + + + 3, 17 + + + 0 + + + Left + + + panel3 + + + NoControl + + + 0 + + + 29, 12 + + + 742, 576 + + + panel2 + + + tls + + + RoutingSettingDetailsForm + + + NoControl + + + Fill + + + 3 + + + Fill + + + 411, 15 + + + 119, 20 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 36 + + + 0 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 344, 375 + + + $this + + + 598, 16 + + + groupBox1 + + + NoControl + + + 0, 121 + + + label1 + + + 742, 395 + + + Protocol + + + 6 + + + panel3 + + + True + + + 3 + + + panel4 + + + 5 + + + bittorrent + + + 19, 82 + + + 25 + + + panel3 + + + 0, 0 + + + 19, 20 + + + labRoutingTips + + + 19, 47 + + + 39 + + + Fill + + + 1 + + + RoutingRuleSettingDetailsForm + + + panel2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 107, 43 + + + groupBox2 + + + 5 + + + Bottom + + + 386, 375 + + + panel3 + + + 392, 0 + + + 8 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + panel4 + + + System.Windows.Forms.CheckedListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + NoControl + + + Top + + + $this + + + groupBox2 + + + System.Windows.Forms.Panel, 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 + + + http + + + txtPort + + + 3, 17 + + + 1 + + + 742, 10 + + + 0, 0 + + + groupBox1 + + + 24 + + + 11 + + + label4 + + + &OK + + + 75, 23 + + + btnClose + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel4 + + + 34 + + + 274, 47 + + + block + + + 33 + + + 1 + + + 347, 43 + + + 0 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + btnOK + + + 2 + + + 119, 21 + + + 4 + + + 7 + + + 0 + + + label3 + + + 0 + + + panel3 + + + panel3 + + + v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + + + 0, 10 + + + 80 + + + 742, 60 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + &Cancel + + + *Set the rules, separated by commas (,); The comma in the regular is replaced by <COMMA> + + + 742, 111 + + + True + + + 6, 12 + + + Port + + + System.Windows.Forms.TextBox, 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 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + txtIP + + + 2 + + + cmbOutboundTag + + + True + + + NoControl + + + Domain + + + 10 + + + $this + + + 392, 395 + + + 75, 23 + + + 1 + + + True + + + 4 + + + txtDomain + + + IP + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0, 516 + + + 71, 12 + + + 350, 395 + + + panel3 + + + 504, 15 + + + True + + + outboundTag + + + Top + + + 35 + + + True + + + zh-Hans + + \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/RoutingRuleSettingDetailsForm.zh-Hans.resx b/v2rayN/v2rayN/Forms/RoutingRuleSettingDetailsForm.zh-Hans.resx new file mode 100644 index 00000000..80928b68 --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingRuleSettingDetailsForm.zh-Hans.resx @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + *设置的路由规则,用逗号(,)分隔;正则中的逗号用<COMMA>替代 + + + OutboundTag + + + 取消(&C) + + + 确定(&O) + + + + Vertical + + + Vertical + + + 路由规则详情设置 + + \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/RoutingRuleSettingForm.Designer.cs b/v2rayN/v2rayN/Forms/RoutingRuleSettingForm.Designer.cs new file mode 100644 index 00000000..6a5f5c23 --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingRuleSettingForm.Designer.cs @@ -0,0 +1,323 @@ +namespace v2rayN.Forms +{ + partial class RoutingRuleSettingForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RoutingRuleSettingForm)); + this.btnClose = new System.Windows.Forms.Button(); + this.panel2 = new System.Windows.Forms.Panel(); + this.btnOK = new System.Windows.Forms.Button(); + this.panel1 = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); + this.txtUrl = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.txtRemarks = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.lvRoutings = new v2rayN.Base.ListViewFlickerFree(); + this.cmsLv = new System.Windows.Forms.ContextMenuStrip(this.components); + this.menuAdd = new System.Windows.Forms.ToolStripMenuItem(); + this.menuRemove = new System.Windows.Forms.ToolStripMenuItem(); + this.menuSelectAll = new System.Windows.Forms.ToolStripMenuItem(); + this.menuExportSelectedRules = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + this.menuMoveTop = new System.Windows.Forms.ToolStripMenuItem(); + this.menuMoveUp = new System.Windows.Forms.ToolStripMenuItem(); + this.menuMoveDown = new System.Windows.Forms.ToolStripMenuItem(); + this.menuMoveBottom = new System.Windows.Forms.ToolStripMenuItem(); + this.MenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.tabControl2 = new System.Windows.Forms.TabControl(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.menuServer = new System.Windows.Forms.MenuStrip(); + this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.menuImportRulesFromFile = new System.Windows.Forms.ToolStripMenuItem(); + this.menuImportRulesFromClipboard = new System.Windows.Forms.ToolStripMenuItem(); + this.menuImportRulesFromUrl = new System.Windows.Forms.ToolStripMenuItem(); + this.panel2.SuspendLayout(); + this.panel1.SuspendLayout(); + this.cmsLv.SuspendLayout(); + this.tabControl2.SuspendLayout(); + this.tabPage2.SuspendLayout(); + this.menuServer.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); + // + // 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 + // + this.panel1.Controls.Add(this.label1); + this.panel1.Controls.Add(this.txtUrl); + this.panel1.Controls.Add(this.label3); + this.panel1.Controls.Add(this.txtRemarks); + this.panel1.Controls.Add(this.label2); + resources.ApplyResources(this.panel1, "panel1"); + this.panel1.Name = "panel1"; + // + // label1 + // + resources.ApplyResources(this.label1, "label1"); + this.label1.Name = "label1"; + // + // txtUrl + // + resources.ApplyResources(this.txtUrl, "txtUrl"); + this.txtUrl.Name = "txtUrl"; + // + // label3 + // + resources.ApplyResources(this.label3, "label3"); + this.label3.Name = "label3"; + // + // txtRemarks + // + resources.ApplyResources(this.txtRemarks, "txtRemarks"); + this.txtRemarks.Name = "txtRemarks"; + // + // label2 + // + resources.ApplyResources(this.label2, "label2"); + this.label2.Name = "label2"; + // + // lvRoutings + // + this.lvRoutings.ContextMenuStrip = this.cmsLv; + resources.ApplyResources(this.lvRoutings, "lvRoutings"); + this.lvRoutings.FullRowSelect = true; + this.lvRoutings.GridLines = true; + this.lvRoutings.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this.lvRoutings.HideSelection = false; + this.lvRoutings.Items.AddRange(new System.Windows.Forms.ListViewItem[] { + ((System.Windows.Forms.ListViewItem)(resources.GetObject("lvRoutings.Items")))}); + this.lvRoutings.MultiSelect = false; + this.lvRoutings.Name = "lvRoutings"; + this.lvRoutings.UseCompatibleStateImageBehavior = false; + this.lvRoutings.View = System.Windows.Forms.View.Details; + this.lvRoutings.DoubleClick += new System.EventHandler(this.lvRoutings_DoubleClick); + this.lvRoutings.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lvRoutings_KeyDown); + // + // cmsLv + // + this.cmsLv.ImageScalingSize = new System.Drawing.Size(20, 20); + this.cmsLv.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.menuAdd, + this.menuRemove, + this.menuSelectAll, + this.menuExportSelectedRules, + this.toolStripSeparator3, + this.menuMoveTop, + this.menuMoveUp, + this.menuMoveDown, + this.menuMoveBottom}); + this.cmsLv.Name = "cmsLv"; + this.cmsLv.OwnerItem = this.MenuItem1; + resources.ApplyResources(this.cmsLv, "cmsLv"); + // + // menuAdd + // + this.menuAdd.Name = "menuAdd"; + resources.ApplyResources(this.menuAdd, "menuAdd"); + this.menuAdd.Click += new System.EventHandler(this.menuAdd_Click); + // + // menuRemove + // + this.menuRemove.Name = "menuRemove"; + resources.ApplyResources(this.menuRemove, "menuRemove"); + this.menuRemove.Click += new System.EventHandler(this.menuRemove_Click); + // + // menuSelectAll + // + this.menuSelectAll.Name = "menuSelectAll"; + resources.ApplyResources(this.menuSelectAll, "menuSelectAll"); + this.menuSelectAll.Click += new System.EventHandler(this.menuSelectAll_Click); + // + // menuExportSelectedRules + // + this.menuExportSelectedRules.Name = "menuExportSelectedRules"; + resources.ApplyResources(this.menuExportSelectedRules, "menuExportSelectedRules"); + this.menuExportSelectedRules.Click += new System.EventHandler(this.menuExportSelectedRules_Click); + // + // toolStripSeparator3 + // + this.toolStripSeparator3.Name = "toolStripSeparator3"; + resources.ApplyResources(this.toolStripSeparator3, "toolStripSeparator3"); + // + // menuMoveTop + // + this.menuMoveTop.Name = "menuMoveTop"; + resources.ApplyResources(this.menuMoveTop, "menuMoveTop"); + this.menuMoveTop.Click += new System.EventHandler(this.menuMoveTop_Click); + // + // menuMoveUp + // + this.menuMoveUp.Name = "menuMoveUp"; + resources.ApplyResources(this.menuMoveUp, "menuMoveUp"); + this.menuMoveUp.Click += new System.EventHandler(this.menuMoveUp_Click); + // + // menuMoveDown + // + this.menuMoveDown.Name = "menuMoveDown"; + resources.ApplyResources(this.menuMoveDown, "menuMoveDown"); + this.menuMoveDown.Click += new System.EventHandler(this.menuMoveDown_Click); + // + // menuMoveBottom + // + this.menuMoveBottom.Name = "menuMoveBottom"; + resources.ApplyResources(this.menuMoveBottom, "menuMoveBottom"); + this.menuMoveBottom.Click += new System.EventHandler(this.menuMoveBottom_Click); + // + // MenuItem1 + // + this.MenuItem1.DropDown = this.cmsLv; + this.MenuItem1.Name = "MenuItem1"; + resources.ApplyResources(this.MenuItem1, "MenuItem1"); + // + // tabControl2 + // + this.tabControl2.Controls.Add(this.tabPage2); + resources.ApplyResources(this.tabControl2, "tabControl2"); + this.tabControl2.Name = "tabControl2"; + this.tabControl2.SelectedIndex = 0; + // + // tabPage2 + // + this.tabPage2.Controls.Add(this.lvRoutings); + resources.ApplyResources(this.tabPage2, "tabPage2"); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // menuServer + // + this.menuServer.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.MenuItem1, + this.toolStripMenuItem1}); + resources.ApplyResources(this.menuServer, "menuServer"); + this.menuServer.Name = "menuServer"; + // + // toolStripMenuItem1 + // + this.toolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.menuImportRulesFromFile, + this.menuImportRulesFromClipboard, + this.menuImportRulesFromUrl}); + this.toolStripMenuItem1.Name = "toolStripMenuItem1"; + resources.ApplyResources(this.toolStripMenuItem1, "toolStripMenuItem1"); + // + // menuImportRulesFromFile + // + this.menuImportRulesFromFile.Name = "menuImportRulesFromFile"; + resources.ApplyResources(this.menuImportRulesFromFile, "menuImportRulesFromFile"); + this.menuImportRulesFromFile.Click += new System.EventHandler(this.menuImportRulesFromFile_Click); + // + // menuImportRulesFromClipboard + // + this.menuImportRulesFromClipboard.Name = "menuImportRulesFromClipboard"; + resources.ApplyResources(this.menuImportRulesFromClipboard, "menuImportRulesFromClipboard"); + this.menuImportRulesFromClipboard.Click += new System.EventHandler(this.menuImportRulesFromClipboard_Click); + // + // menuImportRulesFromUrl + // + this.menuImportRulesFromUrl.Name = "menuImportRulesFromUrl"; + resources.ApplyResources(this.menuImportRulesFromUrl, "menuImportRulesFromUrl"); + this.menuImportRulesFromUrl.Click += new System.EventHandler(this.menuImportRulesFromUrl_Click); + // + // RoutingRuleSettingForm + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnClose; + this.Controls.Add(this.tabControl2); + this.Controls.Add(this.panel1); + this.Controls.Add(this.panel2); + this.Controls.Add(this.menuServer); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Name = "RoutingRuleSettingForm"; + this.Load += new System.EventHandler(this.RoutingRuleSettingForm_Load); + this.panel2.ResumeLayout(false); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.cmsLv.ResumeLayout(false); + this.tabControl2.ResumeLayout(false); + this.tabPage2.ResumeLayout(false); + this.menuServer.ResumeLayout(false); + this.menuServer.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.Button btnClose; + private System.Windows.Forms.Button btnOK; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Panel panel1; + private Base.ListViewFlickerFree lvRoutings; + private System.Windows.Forms.TabControl tabControl2; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.ContextMenuStrip cmsLv; + private System.Windows.Forms.ToolStripMenuItem menuRemove; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; + private System.Windows.Forms.ToolStripMenuItem menuMoveTop; + private System.Windows.Forms.ToolStripMenuItem menuMoveUp; + private System.Windows.Forms.ToolStripMenuItem menuMoveDown; + private System.Windows.Forms.ToolStripMenuItem menuMoveBottom; + private System.Windows.Forms.ToolStripMenuItem menuSelectAll; + private System.Windows.Forms.ToolStripMenuItem menuAdd; + private System.Windows.Forms.MenuStrip menuServer; + private System.Windows.Forms.ToolStripMenuItem MenuItem1; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem menuImportRulesFromFile; + private System.Windows.Forms.ToolStripMenuItem menuImportRulesFromClipboard; + private System.Windows.Forms.ToolStripMenuItem menuExportSelectedRules; + private System.Windows.Forms.ToolStripMenuItem menuImportRulesFromUrl; + private System.Windows.Forms.TextBox txtRemarks; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox txtUrl; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label1; + } +} \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/RoutingRuleSettingForm.cs b/v2rayN/v2rayN/Forms/RoutingRuleSettingForm.cs new file mode 100644 index 00000000..3daed59a --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingRuleSettingForm.cs @@ -0,0 +1,334 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; +using v2rayN.Base; +using v2rayN.Handler; +using v2rayN.Mode; + +namespace v2rayN.Forms +{ + public partial class RoutingRuleSettingForm : BaseForm + { + public int EditIndex + { + get; set; + } + protected RoutingItem routingItem = null; + + private List lvSelecteds = new List(); + public RoutingRuleSettingForm() + { + InitializeComponent(); + } + + private void RoutingRuleSettingForm_Load(object sender, EventArgs e) + { + if (EditIndex >= 0) + { + routingItem = config.routings[EditIndex]; + } + else + { + routingItem = new RoutingItem(); + } + if (routingItem.rules == null) + { + routingItem.rules = new List(); + } + + txtRemarks.Text = routingItem.remarks ?? string.Empty; + txtUrl.Text = routingItem.url ?? string.Empty; + + InitRoutingsView(); + RefreshRoutingsView(); + } + + private void InitRoutingsView() + { + lvRoutings.BeginUpdate(); + lvRoutings.Items.Clear(); + + lvRoutings.GridLines = true; + lvRoutings.FullRowSelect = true; + lvRoutings.View = View.Details; + lvRoutings.MultiSelect = true; + lvRoutings.HeaderStyle = ColumnHeaderStyle.Clickable; + + lvRoutings.Columns.Add("", 30); + lvRoutings.Columns.Add("outboundTag", 80); + lvRoutings.Columns.Add("port", 80); + lvRoutings.Columns.Add("protocol", 100); + lvRoutings.Columns.Add("domain", 160); + lvRoutings.Columns.Add("ip", 160); + + lvRoutings.EndUpdate(); + } + + private void RefreshRoutingsView() + { + lvRoutings.BeginUpdate(); + lvRoutings.Items.Clear(); + + for (int k = 0; k < routingItem.rules.Count; k++) + { + var item = routingItem.rules[k]; + + ListViewItem lvItem = new ListViewItem(""); + Utils.AddSubItem(lvItem, "outboundTag", item.outboundTag); + Utils.AddSubItem(lvItem, "port", item.port); + Utils.AddSubItem(lvItem, "protocol", Utils.List2String(item.protocol)); + Utils.AddSubItem(lvItem, "domain", Utils.List2String(item.domain)); + Utils.AddSubItem(lvItem, "ip", Utils.List2String(item.ip)); + + if (lvItem != null) lvRoutings.Items.Add(lvItem); + } + lvRoutings.EndUpdate(); + } + + private void btnOK_Click(object sender, EventArgs e) + { + routingItem.remarks = txtRemarks.Text.Trim(); + routingItem.url = txtUrl.Text.Trim(); + + if (ConfigHandler.AddRoutingItem(ref config, routingItem, EditIndex) == 0) + { + this.DialogResult = DialogResult.OK; + } + else + { + UI.ShowWarning(UIRes.I18N("OperationFailed")); + } + } + + private void btnClose_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + } + + private void lvRoutings_DoubleClick(object sender, EventArgs e) + { + int index = GetLvSelectedIndex(); + if (index < 0) + { + return; + } + var fm = new RoutingRuleSettingDetailsForm(); + fm.rulesItem = routingItem.rules[index]; + if (fm.ShowDialog() == DialogResult.OK) + { + RefreshRoutingsView(); + } + } + + private int GetLvSelectedIndex() + { + int index = -1; + lvSelecteds.Clear(); + try + { + if (lvRoutings.SelectedIndices.Count <= 0) + { + UI.Show(UIRes.I18N("PleaseSelectRules")); + return index; + } + + index = lvRoutings.SelectedIndices[0]; + foreach (int i in lvRoutings.SelectedIndices) + { + lvSelecteds.Add(i); + } + return index; + } + catch + { + return index; + } + } + + #region Edit function + + private void menuMoveTop_Click(object sender, EventArgs e) + { + MoveRule(EMove.Top); + } + + private void menuMoveUp_Click(object sender, EventArgs e) + { + MoveRule(EMove.Up); + } + + private void menuMoveDown_Click(object sender, EventArgs e) + { + MoveRule(EMove.Down); + } + + private void menuMoveBottom_Click(object sender, EventArgs e) + { + MoveRule(EMove.Bottom); + } + + private void MoveRule(EMove eMove) + { + int index = GetLvSelectedIndex(); + if (index < 0) + { + UI.Show(UIRes.I18N("PleaseSelectRules")); + return; + } + if (ConfigHandler.MoveRoutingRule(ref routingItem, index, eMove) == 0) + { + RefreshRoutingsView(); + } + } + private void menuSelectAll_Click(object sender, EventArgs e) + { + foreach (ListViewItem item in lvRoutings.Items) + { + item.Selected = true; + } + } + + private void menuAdd_Click(object sender, EventArgs e) + { + var fm = new RoutingRuleSettingDetailsForm(); + fm.rulesItem = new RulesItem(); + if (fm.ShowDialog() == DialogResult.OK) + { + routingItem.rules.Insert(0, fm.rulesItem); + RefreshRoutingsView(); + } + } + + private void menuRemove_Click(object sender, EventArgs e) + { + int index = GetLvSelectedIndex(); + if (index < 0) + { + return; + } + if (UI.ShowYesNo(UIRes.I18N("RemoveRules")) == DialogResult.No) + { + return; + } + for (int k = lvSelecteds.Count - 1; k >= 0; k--) + { + routingItem.rules.RemoveAt(index); + } + RefreshRoutingsView(); + } + private void menuExportSelectedRules_Click(object sender, EventArgs e) + { + GetLvSelectedIndex(); + var lst = new List(); + foreach (int v in lvSelecteds) + { + lst.Add(routingItem.rules[v]); + } + if (lst.Count > 0) + { + Utils.SetClipboardData(Utils.ToJson(lst)); + UI.Show(UIRes.I18N("OperationSuccess")); + } + + } + + private void lvRoutings_KeyDown(object sender, KeyEventArgs e) + { + if (e.Control) + { + switch (e.KeyCode) + { + case Keys.A: + menuSelectAll_Click(null, null); + break; + case Keys.C: + menuExportSelectedRules_Click(null, null); + break; + } + } + else + { + switch (e.KeyCode) + { + case Keys.Delete: + menuRemove_Click(null, null); + break; + case Keys.T: + menuMoveTop_Click(null, null); + break; + case Keys.B: + menuMoveBottom_Click(null, null); + break; + case Keys.U: + menuMoveUp_Click(null, null); + break; + case Keys.D: + menuMoveDown_Click(null, null); + break; + } + } + } + #endregion + + #region preset rules + + private void menuImportRulesFromFile_Click(object sender, EventArgs e) + { + OpenFileDialog fileDialog = new OpenFileDialog + { + Multiselect = false, + Filter = "Rules|*.json|All|*.*" + }; + if (fileDialog.ShowDialog() != DialogResult.OK) + { + return; + } + string fileName = fileDialog.FileName; + if (Utils.IsNullOrEmpty(fileName)) + { + return; + } + string result = Utils.LoadResource(fileName); + if (Utils.IsNullOrEmpty(result)) + { + return; + } + + if (ConfigHandler.AddBatchRoutingRules(ref routingItem, result) == 0) + { + RefreshRoutingsView(); + UI.Show(UIRes.I18N("OperationSuccess")); + } + } + + private void menuImportRulesFromClipboard_Click(object sender, EventArgs e) + { + string clipboardData = Utils.GetClipboardData(); + if (ConfigHandler.AddBatchRoutingRules(ref routingItem, clipboardData) == 0) + { + RefreshRoutingsView(); + UI.Show(UIRes.I18N("OperationSuccess")); + } + } + private void menuImportRulesFromUrl_Click(object sender, EventArgs e) + { + var url = txtUrl.Text.Trim(); + if (Utils.IsNullOrEmpty(url)) + { + UI.Show(UIRes.I18N("MsgNeedUrl")); + return; + } + DownloadHandle downloadHandle = new DownloadHandle(); + string clipboardData = downloadHandle.WebDownloadStringSync(url); + if (ConfigHandler.AddBatchRoutingRules(ref routingItem, clipboardData) == 0) + { + RefreshRoutingsView(); + UI.Show(UIRes.I18N("OperationSuccess")); + } + } + + #endregion + + + } +} diff --git a/v2rayN/v2rayN/Forms/RoutingRuleSettingForm.resx b/v2rayN/v2rayN/Forms/RoutingRuleSettingForm.resx new file mode 100644 index 00000000..426ce16c --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingRuleSettingForm.resx @@ -0,0 +1,674 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + NoControl + + + + 568, 17 + + + 75, 23 + + + + 4 + + + &Cancel + + + btnClose + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 0 + + + NoControl + + + 475, 17 + + + 75, 23 + + + 5 + + + &OK + + + btnOK + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 1 + + + Bottom + + + 0, 515 + + + 762, 60 + + + 7 + + + panel2 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + True + + + NoControl + + + 18, 63 + + + 53, 12 + + + 35 + + + Optional + + + label1 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 0 + + + 91, 45 + + + True + + + Vertical + + + 644, 48 + + + 34 + + + txtUrl + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 1 + + + True + + + NoControl + + + 18, 45 + + + 47, 12 + + + 33 + + + Sub Url + + + label3 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 2 + + + 91, 13 + + + 166, 21 + + + 32 + + + txtRemarks + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 3 + + + True + + + NoControl + + + 18, 13 + + + 47, 12 + + + 31 + + + Remarks + + + label2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 4 + + + Top + + + 0, 25 + + + 762, 102 + + + 11 + + + panel1 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + 17, 17 + + + 202, 22 + + + Add + + + 202, 22 + + + Remove selected + + + 202, 22 + + + Select All (Ctrl+A) + + + 202, 22 + + + Export Selected Rules + + + 199, 6 + + + 202, 22 + + + Move to top (T) + + + 202, 22 + + + Up (U) + + + 202, 22 + + + Down (D) + + + 202, 22 + + + Move to bottom (B) + + + 120, 21 + + + Edit and Function + + + 203, 186 + + + cmsLv + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Fill + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkMAwAAAFFTeXN0 + ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2Vu + PWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACFTeXN0ZW0uV2luZG93cy5Gb3Jtcy5MaXN0Vmlld0l0ZW0HAAAA + BFRleHQKSW1hZ2VJbmRleAlCYWNrQ29sb3IHQ2hlY2tlZARGb250CUZvcmVDb2xvchdVc2VJdGVtU3R5 + bGVGb3JTdWJJdGVtcwEABAAEBAAIFFN5c3RlbS5EcmF3aW5nLkNvbG9yAwAAAAETU3lzdGVtLkRyYXdp + bmcuRm9udAMAAAAUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAAQIAAAAGBAAAAAD/////Bfv///8UU3lz + dGVtLkRyYXdpbmcuQ29sb3IEAAAABG5hbWUFdmFsdWUKa25vd25Db2xvcgVzdGF0ZQEAAAAJBwcDAAAA + CgAAAAAAAAAAGAABAAAJBgAAAAH5////+////woAAAAAAAAAABoAAQABBQYAAAATU3lzdGVtLkRyYXdp + bmcuRm9udAQAAAAETmFtZQRTaXplBVN0eWxlBFVuaXQBAAQECxhTeXN0ZW0uRHJhd2luZy5Gb250U3R5 + bGUDAAAAG1N5c3RlbS5EcmF3aW5nLkdyYXBoaWNzVW5pdAMAAAADAAAABggAAAAG5a6L5L2TAAAQQQX3 + ////GFN5c3RlbS5EcmF3aW5nLkZvbnRTdHlsZQEAAAAHdmFsdWVfXwAIAwAAAAAAAAAF9v///xtTeXN0 + ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAMAAAADAAAACw== + + + + 3, 3 + + + 748, 356 + + + 12 + + + lvRoutings + + + v2rayN.Base.ListViewFlickerFree, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + + + tabPage2 + + + 0 + + + 4, 22 + + + 3, 3, 3, 3 + + + 754, 362 + + + 0 + + + RuleList + + + tabPage2 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl2 + + + 0 + + + Fill + + + 0, 127 + + + 762, 388 + + + 14 + + + tabControl2 + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + 139, 17 + + + 247, 22 + + + Import Rules From File + + + 247, 22 + + + Import Rules From Clipboard + + + 247, 22 + + + Import Rules From Sub Url + + + 95, 21 + + + Import Rules + + + 0, 0 + + + 762, 25 + + + 15 + + + menuServer + + + System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 + + + True + + + 6, 12 + + + 762, 575 + + + Rule Settings + + + menuAdd + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuRemove + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuSelectAll + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuExportSelectedRules + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripSeparator3 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuMoveTop + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuMoveUp + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuMoveDown + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuMoveBottom + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + MenuItem1 + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripMenuItem1 + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuImportRulesFromFile + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuImportRulesFromClipboard + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuImportRulesFromUrl + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + RoutingRuleSettingForm + + + 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/RoutingRuleSettingForm.zh-Hans.resx b/v2rayN/v2rayN/Forms/RoutingRuleSettingForm.zh-Hans.resx new file mode 100644 index 00000000..06ade53a --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingRuleSettingForm.zh-Hans.resx @@ -0,0 +1,285 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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) + + + + 0, 613 + + + 785, 60 + + + 29, 12 + + + 可选 + + + 101, 45 + + + 83, 12 + + + 订阅地址(Url) + + + 101, 13 + + + 29, 12 + + + 别名 + + + 785, 109 + + + 196, 22 + + + 添加规则 + + + 196, 22 + + + 移除所选规则 + + + 196, 22 + + + 全选 + + + 196, 22 + + + 导出所选规则至剪贴板 + + + 193, 6 + + + 196, 22 + + + 上移至顶 (T) + + + 196, 22 + + + 上移 (U) + + + 196, 22 + + + 下移 (D) + + + 196, 22 + + + 下移至底 (B) + + + 68, 21 + + + 规则功能 + + + 197, 186 + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkMAwAAAFFTeXN0 + ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2Vu + PWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACFTeXN0ZW0uV2luZG93cy5Gb3Jtcy5MaXN0Vmlld0l0ZW0HAAAA + BFRleHQKSW1hZ2VJbmRleAlCYWNrQ29sb3IHQ2hlY2tlZARGb250CUZvcmVDb2xvchdVc2VJdGVtU3R5 + bGVGb3JTdWJJdGVtcwEABAAEBAAIFFN5c3RlbS5EcmF3aW5nLkNvbG9yAwAAAAETU3lzdGVtLkRyYXdp + bmcuRm9udAMAAAAUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAAQIAAAAGBAAAAAD/////Bfv///8UU3lz + dGVtLkRyYXdpbmcuQ29sb3IEAAAABG5hbWUFdmFsdWUKa25vd25Db2xvcgVzdGF0ZQEAAAAJBwcDAAAA + CgAAAAAAAAAAGAABAAAJBgAAAAH5////+////woAAAAAAAAAABoAAQABBQYAAAATU3lzdGVtLkRyYXdp + bmcuRm9udAQAAAAETmFtZQRTaXplBVN0eWxlBFVuaXQBAAQECxhTeXN0ZW0uRHJhd2luZy5Gb250U3R5 + bGUDAAAAG1N5c3RlbS5EcmF3aW5nLkdyYXBoaWNzVW5pdAMAAAADAAAABggAAAAG5a6L5L2TAAAQQQX3 + ////GFN5c3RlbS5EcmF3aW5nLkZvbnRTdHlsZQEAAAAHdmFsdWVfXwAIAwAAAAAAAAAF9v///xtTeXN0 + ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAMAAAADAAAACw== + + + + 771, 447 + + + 777, 453 + + + 规则列表 + + + 0, 134 + + + 785, 479 + + + 189, 22 + + + 从文件中导入规则 + + + 189, 22 + + + 从剪贴板中导入规则 + + + 189, 22 + + + 从订阅Url中导入规则 + + + 68, 21 + + + 导入规则 + + + 785, 25 + + + 785, 673 + + + 规则集设置 + + \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/RoutingSettingDetailsForm.Designer.cs b/v2rayN/v2rayN/Forms/RoutingSettingDetailsForm.Designer.cs new file mode 100644 index 00000000..43d2de45 --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingSettingDetailsForm.Designer.cs @@ -0,0 +1,234 @@ +namespace v2rayN.Forms +{ + partial class RoutingSettingDetailsForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RoutingSettingDetailsForm)); + this.panel1 = new System.Windows.Forms.Panel(); + this.panel3 = new System.Windows.Forms.Panel(); + this.clbProtocol = new System.Windows.Forms.CheckedListBox(); + this.label3 = new System.Windows.Forms.Label(); + this.txtPort = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.labRoutingTips = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.cmbOutboundTag = new System.Windows.Forms.ComboBox(); + this.txtRemarks = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.panel4 = new System.Windows.Forms.Panel(); + this.btnClose = new System.Windows.Forms.Button(); + this.btnOK = new System.Windows.Forms.Button(); + this.panel2 = new System.Windows.Forms.Panel(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.txtIP = new System.Windows.Forms.TextBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.txtDomain = new System.Windows.Forms.TextBox(); + this.panel3.SuspendLayout(); + this.panel4.SuspendLayout(); + this.panel2.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + resources.ApplyResources(this.panel1, "panel1"); + this.panel1.Name = "panel1"; + // + // panel3 + // + this.panel3.Controls.Add(this.clbProtocol); + this.panel3.Controls.Add(this.label3); + this.panel3.Controls.Add(this.txtPort); + this.panel3.Controls.Add(this.label1); + this.panel3.Controls.Add(this.labRoutingTips); + this.panel3.Controls.Add(this.label4); + this.panel3.Controls.Add(this.cmbOutboundTag); + this.panel3.Controls.Add(this.txtRemarks); + this.panel3.Controls.Add(this.label2); + resources.ApplyResources(this.panel3, "panel3"); + this.panel3.Name = "panel3"; + // + // clbProtocol + // + this.clbProtocol.CheckOnClick = true; + resources.ApplyResources(this.clbProtocol, "clbProtocol"); + this.clbProtocol.FormattingEnabled = true; + this.clbProtocol.Items.AddRange(new object[] { + resources.GetString("clbProtocol.Items"), + resources.GetString("clbProtocol.Items1"), + resources.GetString("clbProtocol.Items2")}); + this.clbProtocol.MultiColumn = true; + this.clbProtocol.Name = "clbProtocol"; + // + // label3 + // + resources.ApplyResources(this.label3, "label3"); + this.label3.Name = "label3"; + // + // txtPort + // + resources.ApplyResources(this.txtPort, "txtPort"); + this.txtPort.Name = "txtPort"; + // + // label1 + // + resources.ApplyResources(this.label1, "label1"); + this.label1.Name = "label1"; + // + // labRoutingTips + // + this.labRoutingTips.ForeColor = System.Drawing.Color.Brown; + resources.ApplyResources(this.labRoutingTips, "labRoutingTips"); + this.labRoutingTips.Name = "labRoutingTips"; + // + // label4 + // + resources.ApplyResources(this.label4, "label4"); + this.label4.Name = "label4"; + // + // cmbOutboundTag + // + this.cmbOutboundTag.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbOutboundTag.FormattingEnabled = true; + this.cmbOutboundTag.Items.AddRange(new object[] { + resources.GetString("cmbOutboundTag.Items"), + resources.GetString("cmbOutboundTag.Items1"), + resources.GetString("cmbOutboundTag.Items2")}); + resources.ApplyResources(this.cmbOutboundTag, "cmbOutboundTag"); + this.cmbOutboundTag.Name = "cmbOutboundTag"; + // + // txtRemarks + // + resources.ApplyResources(this.txtRemarks, "txtRemarks"); + this.txtRemarks.Name = "txtRemarks"; + // + // label2 + // + resources.ApplyResources(this.label2, "label2"); + this.label2.Name = "label2"; + // + // panel4 + // + this.panel4.Controls.Add(this.btnClose); + this.panel4.Controls.Add(this.btnOK); + resources.ApplyResources(this.panel4, "panel4"); + this.panel4.Name = "panel4"; + // + // 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); + // + // btnOK + // + resources.ApplyResources(this.btnOK, "btnOK"); + this.btnOK.Name = "btnOK"; + this.btnOK.UseVisualStyleBackColor = true; + this.btnOK.Click += new System.EventHandler(this.btnOK_Click); + // + // panel2 + // + this.panel2.Controls.Add(this.groupBox2); + this.panel2.Controls.Add(this.groupBox1); + resources.ApplyResources(this.panel2, "panel2"); + this.panel2.Name = "panel2"; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.txtIP); + resources.ApplyResources(this.groupBox2, "groupBox2"); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.TabStop = false; + // + // txtIP + // + resources.ApplyResources(this.txtIP, "txtIP"); + this.txtIP.Name = "txtIP"; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.txtDomain); + resources.ApplyResources(this.groupBox1, "groupBox1"); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.TabStop = false; + // + // txtDomain + // + resources.ApplyResources(this.txtDomain, "txtDomain"); + this.txtDomain.Name = "txtDomain"; + // + // RoutingSettingDetailsForm + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnClose; + this.Controls.Add(this.panel2); + this.Controls.Add(this.panel4); + this.Controls.Add(this.panel3); + this.Controls.Add(this.panel1); + this.Name = "RoutingSettingDetailsForm"; + this.Load += new System.EventHandler(this.RoutingSettingDetailsForm_Load); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + this.panel4.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.ComboBox cmbOutboundTag; + private System.Windows.Forms.TextBox txtRemarks; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Button btnClose; + private System.Windows.Forms.Button btnOK; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.TextBox txtDomain; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.TextBox txtIP; + private System.Windows.Forms.Label labRoutingTips; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox txtPort; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.CheckedListBox clbProtocol; + } +} \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/RoutingSettingDetailsForm.cs b/v2rayN/v2rayN/Forms/RoutingSettingDetailsForm.cs new file mode 100644 index 00000000..65fe6a8f --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingSettingDetailsForm.cs @@ -0,0 +1,131 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; +using v2rayN.Base; +using v2rayN.Handler; +using v2rayN.Mode; + +namespace v2rayN.Forms +{ + public partial class RoutingSettingDetailsForm : BaseForm + { + public int EditIndex + { + get; set; + } + protected RulesItem routingItem = null; + + public RoutingSettingDetailsForm() + { + InitializeComponent(); + } + + private void RoutingSettingDetailsForm_Load(object sender, EventArgs e) + { + if (EditIndex >= 0) + { + routingItem = config.rules[EditIndex]; + BindingData(); + } + else + { + routingItem = new RulesItem(); + ClearBind(); + } + } + + private void EndBindingData() + { + if (routingItem != null) + { + routingItem.remarks = txtRemarks.Text.TrimEx(); + routingItem.port = txtPort.Text.TrimEx(); + routingItem.outboundTag = cmbOutboundTag.Text; + routingItem.domain = Utils.String2List(txtDomain.Text); + routingItem.ip = Utils.String2List(txtIP.Text); + + var protocol = new List(); + for (int i = 0; i < clbProtocol.Items.Count; i++) + { + if (clbProtocol.GetItemChecked(i)) + { + protocol.Add(clbProtocol.Items[i].ToString()); + } + } + routingItem.protocol = protocol; + } + } + private void BindingData() + { + if (routingItem != null) + { + txtRemarks.Text = routingItem.remarks ?? string.Empty; + txtPort.Text = routingItem.port ?? string.Empty; + cmbOutboundTag.Text = routingItem.outboundTag; + txtDomain.Text = Utils.List2String(routingItem.domain, true); + txtIP.Text = Utils.List2String(routingItem.ip, true); + + if (routingItem.protocol != null) + { + for (int i = 0; i < clbProtocol.Items.Count; i++) + { + if (routingItem.protocol.Contains(clbProtocol.Items[i].ToString())) + { + clbProtocol.SetItemChecked(i, true); + } + } + } + } + } + private void ClearBind() + { + txtRemarks.Text = string.Empty; + txtPort.Text = string.Empty; + cmbOutboundTag.Text = Global.agentTag; + txtDomain.Text = string.Empty; + txtIP.Text = string.Empty; + } + private void btnOK_Click(object sender, EventArgs e) + { + EndBindingData(); + var hasRule = false; + if (routingItem.domain != null && routingItem.domain.Count > 0) + { + hasRule = true; + } + if (routingItem.ip != null && routingItem.ip.Count > 0) + { + hasRule = true; + } + if (routingItem.protocol != null && routingItem.protocol.Count > 0) + { + hasRule = true; + } + if (!Utils.IsNullOrEmpty(routingItem.port)) + { + hasRule = true; + } + if (!hasRule) + { + UI.ShowWarning(string.Format(UIRes.I18N("RoutingRuleDetailRequiredTips"), "Port/Protocol/Domain/IP")); + return; + } + + if (ConfigHandler.AddRoutingRule(ref config, routingItem, EditIndex) == 0) + { + this.DialogResult = DialogResult.OK; + } + else + { + UI.ShowWarning(UIRes.I18N("OperationFailed")); + } + + this.DialogResult = DialogResult.OK; + } + + private void btnClose_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + } + } +} diff --git a/v2rayN/v2rayN/Forms/RoutingSettingDetailsForm.resx b/v2rayN/v2rayN/Forms/RoutingSettingDetailsForm.resx new file mode 100644 index 00000000..d9472064 --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingSettingDetailsForm.resx @@ -0,0 +1,723 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + Top + + + + 0, 0 + + + 742, 10 + + + + 7 + + + panel1 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + 80 + + + http + + + tls + + + bittorrent + + + 347, 43 + + + 245, 20 + + + 39 + + + clbProtocol + + + System.Windows.Forms.CheckedListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 0 + + + True + + + NoControl + + + 274, 47 + + + 53, 12 + + + 36 + + + Protocol + + + label3 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 1 + + + 84, 43 + + + 166, 21 + + + 35 + + + txtPort + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 2 + + + True + + + NoControl + + + 19, 47 + + + 29, 12 + + + 34 + + + Port + + + label1 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 3 + + + NoControl + + + 19, 82 + + + 598, 16 + + + 33 + + + *Set the rules, separated by commas (,); The comma in the regular is replaced by <COMMA> + + + labRoutingTips + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 4 + + + True + + + NoControl + + + 274, 20 + + + 47, 12 + + + 32 + + + Out Tag + + + label4 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 5 + + + proxy + + + direct + + + block + + + 347, 16 + + + 119, 20 + + + 31 + + + cmbOutboundTag + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 6 + + + 84, 16 + + + 166, 21 + + + 30 + + + txtRemarks + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 7 + + + True + + + NoControl + + + 19, 20 + + + 47, 12 + + + 29 + + + Remarks + + + label2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 8 + + + Top + + + 0, 10 + + + 742, 111 + + + 8 + + + panel3 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + btnClose + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel4 + + + 0 + + + btnOK + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel4 + + + 1 + + + Bottom + + + 0, 516 + + + 742, 60 + + + 10 + + + panel4 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + NoControl + + + 504, 15 + + + 75, 23 + + + 4 + + + &Cancel + + + btnClose + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel4 + + + 0 + + + NoControl + + + 411, 15 + + + 75, 23 + + + 5 + + + &OK + + + btnOK + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel4 + + + 1 + + + groupBox2 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 0 + + + groupBox1 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 1 + + + Fill + + + 0, 121 + + + 742, 395 + + + 11 + + + panel2 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + txtIP + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox2 + + + 0 + + + Fill + + + 392, 0 + + + 350, 395 + + + 4 + + + IP + + + groupBox2 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 0 + + + Fill + + + 3, 17 + + + True + + + 344, 375 + + + 25 + + + txtIP + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox2 + + + 0 + + + txtDomain + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 0 + + + Left + + + 0, 0 + + + 392, 395 + + + 3 + + + Domain + + + groupBox1 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 1 + + + Fill + + + 3, 17 + + + True + + + 386, 375 + + + 24 + + + txtDomain + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 0 + + + True + + + 6, 12 + + + 742, 576 + + + RoutingSettingDetailsForm + + + RoutingSettingDetailsForm + + + 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/RoutingSettingDetailsForm.zh-Hans.resx b/v2rayN/v2rayN/Forms/RoutingSettingDetailsForm.zh-Hans.resx new file mode 100644 index 00000000..bac9081a --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingSettingDetailsForm.zh-Hans.resx @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + *设置的路由规则,用逗号(,)分隔;正则中的逗号用<COMMA>替代 + + + + 71, 12 + + + OutboundTag + + + 29, 12 + + + 别名 + + + 取消(&C) + + + 确定(&O) + + + 路由规则详情设置 + + \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/RoutingSettingForm.Designer.cs b/v2rayN/v2rayN/Forms/RoutingSettingForm.Designer.cs new file mode 100644 index 00000000..1d5cf177 --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingSettingForm.Designer.cs @@ -0,0 +1,447 @@ +namespace v2rayN.Forms +{ + partial class RoutingSettingForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RoutingSettingForm)); + this.btnClose = new System.Windows.Forms.Button(); + this.panel2 = new System.Windows.Forms.Panel(); + this.labRoutingTips = new System.Windows.Forms.Label(); + this.btnOK = new System.Windows.Forms.Button(); + this.panel1 = new System.Windows.Forms.Panel(); + this.chkenableRoutingAdvanced = new System.Windows.Forms.CheckBox(); + this.linkLabelRoutingDoc = new System.Windows.Forms.LinkLabel(); + this.cmbdomainStrategy = new System.Windows.Forms.ComboBox(); + this.cmsLv = new System.Windows.Forms.ContextMenuStrip(this.components); + this.menuAdd = new System.Windows.Forms.ToolStripMenuItem(); + this.menuRemove = new System.Windows.Forms.ToolStripMenuItem(); + this.menuSelectAll = new System.Windows.Forms.ToolStripMenuItem(); + this.menuSetDefaultRouting = new System.Windows.Forms.ToolStripMenuItem(); + this.MenuItemAdvanced = new System.Windows.Forms.ToolStripMenuItem(); + this.menuServer = new System.Windows.Forms.MenuStrip(); + this.MenuItemBasic = new System.Windows.Forms.ToolStripMenuItem(); + this.menuImportBasicRules = new System.Windows.Forms.ToolStripMenuItem(); + this.tabNormal = new System.Windows.Forms.TabControl(); + this.tabPageProxy = new System.Windows.Forms.TabPage(); + this.panel5 = new System.Windows.Forms.Panel(); + this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.txtProxyIp = new System.Windows.Forms.TextBox(); + this.groupBox6 = new System.Windows.Forms.GroupBox(); + this.txtProxyDomain = new System.Windows.Forms.TextBox(); + this.tabPageDirect = new System.Windows.Forms.TabPage(); + this.panel4 = new System.Windows.Forms.Panel(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.txtDirectIp = new System.Windows.Forms.TextBox(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.txtDirectDomain = new System.Windows.Forms.TextBox(); + this.tabPageBlock = new System.Windows.Forms.TabPage(); + this.panel3 = new System.Windows.Forms.Panel(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.txtBlockIp = new System.Windows.Forms.TextBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.txtBlockDomain = new System.Windows.Forms.TextBox(); + this.tabPageRuleList = new System.Windows.Forms.TabPage(); + this.lvRoutings = new v2rayN.Base.ListViewFlickerFree(); + this.panel2.SuspendLayout(); + this.panel1.SuspendLayout(); + this.cmsLv.SuspendLayout(); + this.menuServer.SuspendLayout(); + this.tabNormal.SuspendLayout(); + this.tabPageProxy.SuspendLayout(); + this.panel5.SuspendLayout(); + this.groupBox5.SuspendLayout(); + this.groupBox6.SuspendLayout(); + this.tabPageDirect.SuspendLayout(); + this.panel4.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.groupBox4.SuspendLayout(); + this.tabPageBlock.SuspendLayout(); + this.panel3.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.tabPageRuleList.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); + // + // panel2 + // + this.panel2.Controls.Add(this.labRoutingTips); + this.panel2.Controls.Add(this.btnClose); + this.panel2.Controls.Add(this.btnOK); + resources.ApplyResources(this.panel2, "panel2"); + this.panel2.Name = "panel2"; + // + // labRoutingTips + // + this.labRoutingTips.ForeColor = System.Drawing.Color.Brown; + resources.ApplyResources(this.labRoutingTips, "labRoutingTips"); + this.labRoutingTips.Name = "labRoutingTips"; + // + // btnOK + // + resources.ApplyResources(this.btnOK, "btnOK"); + this.btnOK.Name = "btnOK"; + this.btnOK.UseVisualStyleBackColor = true; + this.btnOK.Click += new System.EventHandler(this.btnOK_Click); + // + // panel1 + // + this.panel1.Controls.Add(this.chkenableRoutingAdvanced); + this.panel1.Controls.Add(this.linkLabelRoutingDoc); + this.panel1.Controls.Add(this.cmbdomainStrategy); + resources.ApplyResources(this.panel1, "panel1"); + this.panel1.Name = "panel1"; + // + // chkenableRoutingAdvanced + // + resources.ApplyResources(this.chkenableRoutingAdvanced, "chkenableRoutingAdvanced"); + this.chkenableRoutingAdvanced.Name = "chkenableRoutingAdvanced"; + this.chkenableRoutingAdvanced.UseVisualStyleBackColor = true; + this.chkenableRoutingAdvanced.CheckedChanged += new System.EventHandler(this.chkenableRoutingAdvanced_CheckedChanged_1); + // + // 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); + // + // 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"; + // + // cmsLv + // + this.cmsLv.ImageScalingSize = new System.Drawing.Size(20, 20); + this.cmsLv.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.menuAdd, + this.menuRemove, + this.menuSelectAll, + this.menuSetDefaultRouting}); + this.cmsLv.Name = "cmsLv"; + this.cmsLv.OwnerItem = this.MenuItemAdvanced; + resources.ApplyResources(this.cmsLv, "cmsLv"); + // + // menuAdd + // + this.menuAdd.Name = "menuAdd"; + resources.ApplyResources(this.menuAdd, "menuAdd"); + this.menuAdd.Click += new System.EventHandler(this.menuAdd_Click); + // + // menuRemove + // + this.menuRemove.Name = "menuRemove"; + resources.ApplyResources(this.menuRemove, "menuRemove"); + this.menuRemove.Click += new System.EventHandler(this.menuRemove_Click); + // + // menuSelectAll + // + this.menuSelectAll.Name = "menuSelectAll"; + resources.ApplyResources(this.menuSelectAll, "menuSelectAll"); + this.menuSelectAll.Click += new System.EventHandler(this.menuSelectAll_Click); + // + // menuSetDefaultRouting + // + this.menuSetDefaultRouting.Name = "menuSetDefaultRouting"; + resources.ApplyResources(this.menuSetDefaultRouting, "menuSetDefaultRouting"); + this.menuSetDefaultRouting.Click += new System.EventHandler(this.menuSetDefaultRouting_Click); + // + // MenuItemAdvanced + // + this.MenuItemAdvanced.DropDown = this.cmsLv; + this.MenuItemAdvanced.Name = "MenuItemAdvanced"; + resources.ApplyResources(this.MenuItemAdvanced, "MenuItemAdvanced"); + // + // menuServer + // + this.menuServer.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.MenuItemBasic, + this.MenuItemAdvanced}); + resources.ApplyResources(this.menuServer, "menuServer"); + this.menuServer.Name = "menuServer"; + // + // MenuItemBasic + // + this.MenuItemBasic.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.menuImportBasicRules}); + this.MenuItemBasic.Name = "MenuItemBasic"; + resources.ApplyResources(this.MenuItemBasic, "MenuItemBasic"); + // + // menuImportBasicRules + // + this.menuImportBasicRules.Name = "menuImportBasicRules"; + resources.ApplyResources(this.menuImportBasicRules, "menuImportBasicRules"); + this.menuImportBasicRules.Click += new System.EventHandler(this.menuImportBasicRules_Click); + // + // tabNormal + // + this.tabNormal.Controls.Add(this.tabPageProxy); + this.tabNormal.Controls.Add(this.tabPageDirect); + this.tabNormal.Controls.Add(this.tabPageBlock); + this.tabNormal.Controls.Add(this.tabPageRuleList); + resources.ApplyResources(this.tabNormal, "tabNormal"); + this.tabNormal.Name = "tabNormal"; + this.tabNormal.SelectedIndex = 0; + this.tabNormal.Selecting += new System.Windows.Forms.TabControlCancelEventHandler(this.tabNormal_Selecting); + // + // tabPageProxy + // + this.tabPageProxy.Controls.Add(this.panel5); + resources.ApplyResources(this.tabPageProxy, "tabPageProxy"); + this.tabPageProxy.Name = "tabPageProxy"; + this.tabPageProxy.UseVisualStyleBackColor = true; + // + // panel5 + // + this.panel5.Controls.Add(this.groupBox5); + this.panel5.Controls.Add(this.groupBox6); + resources.ApplyResources(this.panel5, "panel5"); + this.panel5.Name = "panel5"; + // + // groupBox5 + // + this.groupBox5.Controls.Add(this.txtProxyIp); + resources.ApplyResources(this.groupBox5, "groupBox5"); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.TabStop = false; + // + // txtProxyIp + // + resources.ApplyResources(this.txtProxyIp, "txtProxyIp"); + this.txtProxyIp.Name = "txtProxyIp"; + // + // groupBox6 + // + this.groupBox6.Controls.Add(this.txtProxyDomain); + resources.ApplyResources(this.groupBox6, "groupBox6"); + this.groupBox6.Name = "groupBox6"; + this.groupBox6.TabStop = false; + // + // txtProxyDomain + // + resources.ApplyResources(this.txtProxyDomain, "txtProxyDomain"); + this.txtProxyDomain.Name = "txtProxyDomain"; + // + // tabPageDirect + // + this.tabPageDirect.Controls.Add(this.panel4); + resources.ApplyResources(this.tabPageDirect, "tabPageDirect"); + this.tabPageDirect.Name = "tabPageDirect"; + this.tabPageDirect.UseVisualStyleBackColor = true; + // + // panel4 + // + this.panel4.Controls.Add(this.groupBox3); + this.panel4.Controls.Add(this.groupBox4); + resources.ApplyResources(this.panel4, "panel4"); + this.panel4.Name = "panel4"; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.txtDirectIp); + resources.ApplyResources(this.groupBox3, "groupBox3"); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.TabStop = false; + // + // txtDirectIp + // + resources.ApplyResources(this.txtDirectIp, "txtDirectIp"); + this.txtDirectIp.Name = "txtDirectIp"; + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.txtDirectDomain); + resources.ApplyResources(this.groupBox4, "groupBox4"); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.TabStop = false; + // + // txtDirectDomain + // + resources.ApplyResources(this.txtDirectDomain, "txtDirectDomain"); + this.txtDirectDomain.Name = "txtDirectDomain"; + // + // tabPageBlock + // + this.tabPageBlock.Controls.Add(this.panel3); + resources.ApplyResources(this.tabPageBlock, "tabPageBlock"); + this.tabPageBlock.Name = "tabPageBlock"; + this.tabPageBlock.UseVisualStyleBackColor = true; + // + // panel3 + // + this.panel3.Controls.Add(this.groupBox2); + this.panel3.Controls.Add(this.groupBox1); + resources.ApplyResources(this.panel3, "panel3"); + this.panel3.Name = "panel3"; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.txtBlockIp); + resources.ApplyResources(this.groupBox2, "groupBox2"); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.TabStop = false; + // + // txtBlockIp + // + resources.ApplyResources(this.txtBlockIp, "txtBlockIp"); + this.txtBlockIp.Name = "txtBlockIp"; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.txtBlockDomain); + resources.ApplyResources(this.groupBox1, "groupBox1"); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.TabStop = false; + // + // txtBlockDomain + // + resources.ApplyResources(this.txtBlockDomain, "txtBlockDomain"); + this.txtBlockDomain.Name = "txtBlockDomain"; + // + // tabPageRuleList + // + this.tabPageRuleList.Controls.Add(this.lvRoutings); + resources.ApplyResources(this.tabPageRuleList, "tabPageRuleList"); + this.tabPageRuleList.Name = "tabPageRuleList"; + this.tabPageRuleList.UseVisualStyleBackColor = true; + // + // lvRoutings + // + this.lvRoutings.ContextMenuStrip = this.cmsLv; + resources.ApplyResources(this.lvRoutings, "lvRoutings"); + this.lvRoutings.FullRowSelect = true; + this.lvRoutings.GridLines = true; + this.lvRoutings.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this.lvRoutings.HideSelection = false; + this.lvRoutings.Items.AddRange(new System.Windows.Forms.ListViewItem[] { + ((System.Windows.Forms.ListViewItem)(resources.GetObject("lvRoutings.Items")))}); + this.lvRoutings.MultiSelect = false; + this.lvRoutings.Name = "lvRoutings"; + this.lvRoutings.UseCompatibleStateImageBehavior = false; + this.lvRoutings.View = System.Windows.Forms.View.Details; + this.lvRoutings.DoubleClick += new System.EventHandler(this.lvRoutings_DoubleClick); + // + // RoutingSettingForm + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnClose; + this.Controls.Add(this.tabNormal); + this.Controls.Add(this.panel1); + this.Controls.Add(this.panel2); + this.Controls.Add(this.menuServer); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Name = "RoutingSettingForm"; + this.Load += new System.EventHandler(this.RoutingSettingForm_Load); + this.panel2.ResumeLayout(false); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.cmsLv.ResumeLayout(false); + this.menuServer.ResumeLayout(false); + this.menuServer.PerformLayout(); + this.tabNormal.ResumeLayout(false); + this.tabPageProxy.ResumeLayout(false); + this.panel5.ResumeLayout(false); + this.groupBox5.ResumeLayout(false); + this.groupBox5.PerformLayout(); + this.groupBox6.ResumeLayout(false); + this.groupBox6.PerformLayout(); + this.tabPageDirect.ResumeLayout(false); + this.panel4.ResumeLayout(false); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); + this.tabPageBlock.ResumeLayout(false); + this.panel3.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.tabPageRuleList.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.Button btnClose; + private System.Windows.Forms.Button btnOK; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.LinkLabel linkLabelRoutingDoc; + private System.Windows.Forms.ComboBox cmbdomainStrategy; + private System.Windows.Forms.ContextMenuStrip cmsLv; + private System.Windows.Forms.ToolStripMenuItem menuRemove; + private System.Windows.Forms.ToolStripMenuItem menuSelectAll; + private System.Windows.Forms.ToolStripMenuItem menuAdd; + private System.Windows.Forms.MenuStrip menuServer; + private System.Windows.Forms.ToolStripMenuItem MenuItemAdvanced; + private System.Windows.Forms.ToolStripMenuItem menuSetDefaultRouting; + private System.Windows.Forms.TabControl tabNormal; + private System.Windows.Forms.TabPage tabPageProxy; + private System.Windows.Forms.TabPage tabPageDirect; + private System.Windows.Forms.TabPage tabPageBlock; + private System.Windows.Forms.Panel panel5; + private System.Windows.Forms.GroupBox groupBox5; + private System.Windows.Forms.TextBox txtProxyIp; + private System.Windows.Forms.GroupBox groupBox6; + private System.Windows.Forms.TextBox txtProxyDomain; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.TextBox txtDirectIp; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.TextBox txtDirectDomain; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.TextBox txtBlockIp; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.TextBox txtBlockDomain; + private System.Windows.Forms.TabPage tabPageRuleList; + private Base.ListViewFlickerFree lvRoutings; + private System.Windows.Forms.Label labRoutingTips; + private System.Windows.Forms.CheckBox chkenableRoutingAdvanced; + private System.Windows.Forms.ToolStripMenuItem MenuItemBasic; + private System.Windows.Forms.ToolStripMenuItem menuImportBasicRules; + } +} \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/RoutingSettingForm.cs b/v2rayN/v2rayN/Forms/RoutingSettingForm.cs new file mode 100644 index 00000000..c0fc32b4 --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingSettingForm.cs @@ -0,0 +1,302 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; +using v2rayN.Base; +using v2rayN.Handler; +using v2rayN.Mode; + +namespace v2rayN.Forms +{ + public partial class RoutingSettingForm : BaseForm + { + private List lvSelecteds = new List(); + private RoutingItem lockedItem; + public RoutingSettingForm() + { + InitializeComponent(); + } + + private void RoutingSettingForm_Load(object sender, EventArgs e) + { + ConfigHandler.InitBuiltinRouting(ref config); + + cmbdomainStrategy.Text = config.domainStrategy; + chkenableRoutingAdvanced.Checked = config.enableRoutingAdvanced; + + if (config.routings == null) + { + config.routings = new List(); + } + InitRoutingsView(); + RefreshRoutingsView(); + + BindingLockedData(); + InitUI(); + } + + + private void tabNormal_Selecting(object sender, TabControlCancelEventArgs e) + { + //if (tabNormal.SelectedTab == tabPageRuleList) + //{ + // MenuItem1.Enabled = true; + //} + //else + //{ + // MenuItem1.Enabled = false; + //} + } + private void btnOK_Click(object sender, EventArgs e) + { + config.domainStrategy = cmbdomainStrategy.Text; + config.enableRoutingAdvanced = chkenableRoutingAdvanced.Checked; + EndBindingLockedData(); + + if (ConfigHandler.SaveRouting(ref config) == 0) + { + this.DialogResult = DialogResult.OK; + } + else + { + UI.ShowWarning(UIRes.I18N("OperationFailed")); + } + } + + private void btnClose_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + } + private void chkenableRoutingAdvanced_CheckedChanged_1(object sender, EventArgs e) + { + InitUI(); + } + private void InitUI() + { + if (chkenableRoutingAdvanced.Checked) + { + this.tabPageProxy.Parent = null; + this.tabPageDirect.Parent = null; + this.tabPageBlock.Parent = null; + this.tabPageRuleList.Parent = tabNormal; + MenuItemBasic.Enabled = false; + MenuItemAdvanced.Enabled = true; + + } + else + { + this.tabPageProxy.Parent = tabNormal; + this.tabPageDirect.Parent = tabNormal; + this.tabPageBlock.Parent = tabNormal; + this.tabPageRuleList.Parent = null; + MenuItemBasic.Enabled = true; + MenuItemAdvanced.Enabled = false; + } + + } + + + #region locked + private void BindingLockedData() + { + lockedItem = ConfigHandler.GetLockedRoutingItem(ref config); + if (lockedItem != null) + { + txtProxyDomain.Text = Utils.List2String(lockedItem.rules[0].domain, true); + txtProxyIp.Text = Utils.List2String(lockedItem.rules[0].ip, true); + + txtDirectDomain.Text = Utils.List2String(lockedItem.rules[1].domain, true); + txtDirectIp.Text = Utils.List2String(lockedItem.rules[1].ip, true); + + txtBlockDomain.Text = Utils.List2String(lockedItem.rules[2].domain, true); + txtBlockIp.Text = Utils.List2String(lockedItem.rules[2].ip, true); + } + } + private void EndBindingLockedData() + { + if (lockedItem != null) + { + lockedItem.rules[0].domain = Utils.String2List(txtProxyDomain.Text.TrimEx()); + lockedItem.rules[0].ip = Utils.String2List(txtProxyIp.Text.TrimEx()); + + lockedItem.rules[1].domain = Utils.String2List(txtDirectDomain.Text.TrimEx()); + lockedItem.rules[1].ip = Utils.String2List(txtDirectIp.Text.TrimEx()); + + lockedItem.rules[2].domain = Utils.String2List(txtBlockDomain.Text.TrimEx()); + lockedItem.rules[2].ip = Utils.String2List(txtBlockIp.Text.TrimEx()); + + } + } + #endregion + + #region ListView + private void InitRoutingsView() + { + lvRoutings.BeginUpdate(); + lvRoutings.Items.Clear(); + + lvRoutings.GridLines = true; + lvRoutings.FullRowSelect = true; + lvRoutings.View = View.Details; + lvRoutings.MultiSelect = true; + lvRoutings.HeaderStyle = ColumnHeaderStyle.Clickable; + + lvRoutings.Columns.Add("", 30); + lvRoutings.Columns.Add(UIRes.I18N("LvAlias"), 200); + lvRoutings.Columns.Add(UIRes.I18N("LvCount"), 60); + lvRoutings.Columns.Add(UIRes.I18N("LvUrl"), 240); + + lvRoutings.EndUpdate(); + } + + private void RefreshRoutingsView() + { + lvRoutings.BeginUpdate(); + lvRoutings.Items.Clear(); + + for (int k = 0; k < config.routings.Count; k++) + { + var item = config.routings[k]; + if (item.locked == true) + { + continue; + } + + string def = string.Empty; + if (config.routingIndex.Equals(k)) + { + def = "√"; + } + + ListViewItem lvItem = new ListViewItem(def); + Utils.AddSubItem(lvItem, "remarks", item.remarks); + Utils.AddSubItem(lvItem, "count", item.rules.Count.ToString()); + Utils.AddSubItem(lvItem, "url", item.url); + + if (lvItem != null) lvRoutings.Items.Add(lvItem); + } + lvRoutings.EndUpdate(); + } + + + private void linkLabelRoutingDoc_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + System.Diagnostics.Process.Start("https://www.v2fly.org/config/routing.html"); + } + + private void lvRoutings_DoubleClick(object sender, EventArgs e) + { + int index = GetLvSelectedIndex(); + if (index < 0) + { + return; + } + var fm = new RoutingRuleSettingForm(); + fm.EditIndex = index; + if (fm.ShowDialog() == DialogResult.OK) + { + RefreshRoutingsView(); + } + } + + private int GetLvSelectedIndex() + { + int index = -1; + lvSelecteds.Clear(); + try + { + if (lvRoutings.SelectedIndices.Count <= 0) + { + UI.Show(UIRes.I18N("PleaseSelectRules")); + return index; + } + + index = lvRoutings.SelectedIndices[0]; + foreach (int i in lvRoutings.SelectedIndices) + { + lvSelecteds.Add(i); + } + return index; + } + catch + { + return index; + } + } + + #endregion + + + #region Edit function + + + private void menuSelectAll_Click(object sender, EventArgs e) + { + foreach (ListViewItem item in lvRoutings.Items) + { + item.Selected = true; + } + } + + private void menuAdd_Click(object sender, EventArgs e) + { + var fm = new RoutingRuleSettingForm(); + fm.EditIndex = -1; + if (fm.ShowDialog() == DialogResult.OK) + { + RefreshRoutingsView(); + } + } + + private void menuRemove_Click(object sender, EventArgs e) + { + int index = GetLvSelectedIndex(); + if (index < 0) + { + return; + } + if (UI.ShowYesNo(UIRes.I18N("RemoveRules")) == DialogResult.No) + { + return; + } + for (int k = lvSelecteds.Count - 1; k >= 0; k--) + { + config.routings.RemoveAt(index); + } + RefreshRoutingsView(); + } + private void menuSetDefaultRouting_Click(object sender, EventArgs e) + { + int index = GetLvSelectedIndex(); + if (index < 0) + { + return; + } + SetDefaultRouting(index); + } + private int SetDefaultRouting(int index) + { + if (index < 0) + { + UI.Show(UIRes.I18N("PleaseSelectServer")); + return -1; + } + if (ConfigHandler.SetDefaultRouting(ref config, index) == 0) + { + RefreshRoutingsView(); + } + return 0; + } + + private void menuImportBasicRules_Click(object sender, EventArgs e) + { + //Extra to bypass the mainland + txtDirectDomain.Text = "geosite:cn"; + txtDirectIp.Text = "geoip:private,geoip:cn"; + + txtBlockDomain.Text = "geosite:category-ads-all"; + } + + #endregion + + } +} diff --git a/v2rayN/v2rayN/Forms/RoutingSettingForm.resx b/v2rayN/v2rayN/Forms/RoutingSettingForm.resx new file mode 100644 index 00000000..8e33444c --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingSettingForm.resx @@ -0,0 +1,1070 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + NoControl + + + + 753, 17 + + + 75, 23 + + + + 4 + + + &Cancel + + + btnClose + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 1 + + + NoControl + + + 5, 22 + + + 562, 16 + + + 34 + + + *Set the rules, separated by commas (,); The comma in the regular is replaced by <COMMA> + + + labRoutingTips + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 0 + + + NoControl + + + 660, 17 + + + 75, 23 + + + 5 + + + &OK + + + btnOK + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 2 + + + Bottom + + + 0, 613 + + + 853, 60 + + + 7 + + + panel2 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + True + + + NoControl + + + 318, 17 + + + 216, 16 + + + 26 + + + Enable advanced routing function + + + chkenableRoutingAdvanced + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 0 + + + True + + + NoControl + + + 6, 21 + + + 0, 0, 0, 0 + + + 95, 12 + + + 19 + + + Domain strategy + + + linkLabelRoutingDoc + + + System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 1 + + + AsIs + + + IPIfNonMatch + + + IPOnDemand + + + 116, 17 + + + 165, 20 + + + 16 + + + cmbdomainStrategy + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 2 + + + Top + + + 0, 25 + + + 853, 51 + + + 11 + + + panel1 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + 17, 17 + + + 194, 22 + + + Add + + + 194, 22 + + + Remove selected + + + 194, 22 + + + Select All (Ctrl+A) + + + 194, 22 + + + Set as active routing + + + 129, 21 + + + Advanced Function + + + 195, 92 + + + cmsLv + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 139, 17 + + + 185, 22 + + + Import Basic Rules + + + 102, 21 + + + Basic Function + + + 0, 0 + + + 853, 25 + + + 15 + + + menuServer + + + System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 + + + Fill + + + 3, 17 + + + True + + + Vertical + + + 441, 485 + + + 25 + + + txtProxyIp + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox5 + + + 0 + + + Fill + + + 392, 0 + + + 447, 505 + + + 4 + + + IP + + + groupBox5 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel5 + + + 0 + + + Fill + + + 3, 17 + + + True + + + Vertical + + + 386, 485 + + + 24 + + + txtProxyDomain + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox6 + + + 0 + + + Left + + + 0, 0 + + + 392, 505 + + + 3 + + + Domain + + + groupBox6 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel5 + + + 1 + + + Fill + + + 3, 3 + + + 839, 505 + + + 12 + + + panel5 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPageProxy + + + 0 + + + 4, 22 + + + 3, 3, 3, 3 + + + 845, 511 + + + 0 + + + 1.Proxy Domain or IP + + + tabPageProxy + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabNormal + + + 0 + + + Fill + + + 3, 17 + + + True + + + Vertical + + + 441, 485 + + + 25 + + + txtDirectIp + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox3 + + + 0 + + + Fill + + + 392, 0 + + + 447, 505 + + + 4 + + + IP + + + groupBox3 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel4 + + + 0 + + + Fill + + + 3, 17 + + + True + + + Vertical + + + 386, 485 + + + 24 + + + txtDirectDomain + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox4 + + + 0 + + + Left + + + 0, 0 + + + 392, 505 + + + 3 + + + Domain + + + groupBox4 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel4 + + + 1 + + + Fill + + + 3, 3 + + + 839, 505 + + + 12 + + + panel4 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPageDirect + + + 0 + + + 4, 22 + + + 3, 3, 3, 3 + + + 845, 511 + + + 1 + + + 2.Direct Domain or IP + + + tabPageDirect + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabNormal + + + 1 + + + Fill + + + 3, 17 + + + True + + + Vertical + + + 441, 485 + + + 25 + + + txtBlockIp + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox2 + + + 0 + + + Fill + + + 392, 0 + + + 447, 505 + + + 4 + + + IP + + + groupBox2 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 0 + + + Fill + + + 3, 17 + + + True + + + Vertical + + + 386, 485 + + + 24 + + + txtBlockDomain + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 0 + + + Left + + + 0, 0 + + + 392, 505 + + + 3 + + + Domain + + + groupBox1 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 1 + + + Fill + + + 3, 3 + + + 839, 505 + + + 12 + + + panel3 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPageBlock + + + 0 + + + 4, 22 + + + 3, 3, 3, 3 + + + 845, 511 + + + 2 + + + 3.Block Domain or IP + + + tabPageBlock + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabNormal + + + 2 + + + Fill + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkMAwAAAFFTeXN0 + ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2Vu + PWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACFTeXN0ZW0uV2luZG93cy5Gb3Jtcy5MaXN0Vmlld0l0ZW0HAAAA + BFRleHQKSW1hZ2VJbmRleAlCYWNrQ29sb3IHQ2hlY2tlZARGb250CUZvcmVDb2xvchdVc2VJdGVtU3R5 + bGVGb3JTdWJJdGVtcwEABAAEBAAIFFN5c3RlbS5EcmF3aW5nLkNvbG9yAwAAAAETU3lzdGVtLkRyYXdp + bmcuRm9udAMAAAAUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAAQIAAAAGBAAAAAD/////Bfv///8UU3lz + dGVtLkRyYXdpbmcuQ29sb3IEAAAABG5hbWUFdmFsdWUKa25vd25Db2xvcgVzdGF0ZQEAAAAJBwcDAAAA + CgAAAAAAAAAAGAABAAAJBgAAAAH5////+////woAAAAAAAAAABoAAQABBQYAAAATU3lzdGVtLkRyYXdp + bmcuRm9udAQAAAAETmFtZQRTaXplBVN0eWxlBFVuaXQBAAQECxhTeXN0ZW0uRHJhd2luZy5Gb250U3R5 + bGUDAAAAG1N5c3RlbS5EcmF3aW5nLkdyYXBoaWNzVW5pdAMAAAADAAAABggAAAAG5a6L5L2TAAAQQQX3 + ////GFN5c3RlbS5EcmF3aW5nLkZvbnRTdHlsZQEAAAAHdmFsdWVfXwAIAwAAAAAAAAAF9v///xtTeXN0 + ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAMAAAADAAAACw== + + + + 3, 3 + + + 839, 505 + + + 15 + + + lvRoutings + + + v2rayN.Base.ListViewFlickerFree, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + + + tabPageRuleList + + + 0 + + + 4, 22 + + + 3, 3, 3, 3 + + + 845, 511 + + + 3 + + + Pre-defined Rule Set List + + + tabPageRuleList + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabNormal + + + 3 + + + Fill + + + 0, 76 + + + 853, 537 + + + 16 + + + tabNormal + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + True + + + 6, 12 + + + 853, 673 + + + Routing Settings + + + menuAdd + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuRemove + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuSelectAll + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuSetDefaultRouting + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + MenuItemAdvanced + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + MenuItemBasic + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuImportBasicRules + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + RoutingSettingForm + + + 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/RoutingSettingForm.zh-Hans.resx b/v2rayN/v2rayN/Forms/RoutingSettingForm.zh-Hans.resx new file mode 100644 index 00000000..992f0e9e --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingSettingForm.zh-Hans.resx @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + 691, 17 + + + 取消(&C) + + + 0, 545 + + + 817, 60 + + + 518, 16 + + + *设置的路由规则,用逗号(,)分隔;正则中的逗号用<COMMA>替代 + + + 598, 17 + + + 确定(&O) + + + 817, 51 + + + 120, 16 + + + 启用路由高级功能 + + + 77, 12 + + + 域名解析策略 + + + 149, 92 + + + 148, 22 + + + 添加规则集 + + + 148, 22 + + + 移除所选规则 + + + 148, 22 + + + 全选 + + + 148, 22 + + + 设为活动路由 + + + 68, 21 + + + 高级功能 + + + 817, 25 + + + 68, 21 + + + 基础功能 + + + 180, 22 + + + 一键导入基础规则 + + + 817, 469 + + + 809, 443 + + + 1.代理的Domain或IP + + + 803, 437 + + + 411, 437 + + + 405, 417 + + + 392, 437 + + + 386, 417 + + + 809, 443 + + + 2.直连的Domain或IP + + + 803, 437 + + + 411, 437 + + + 405, 417 + + + 392, 437 + + + 386, 417 + + + 809, 443 + + + 3.阻止的Domain或IP + + + 803, 437 + + + 411, 437 + + + 405, 417 + + + 392, 437 + + + 386, 417 + + + 809, 443 + + + 预定义规则集列表 + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkMAwAAAFFTeXN0 + ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2Vu + PWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACFTeXN0ZW0uV2luZG93cy5Gb3Jtcy5MaXN0Vmlld0l0ZW0HAAAA + BFRleHQKSW1hZ2VJbmRleAlCYWNrQ29sb3IHQ2hlY2tlZARGb250CUZvcmVDb2xvchdVc2VJdGVtU3R5 + bGVGb3JTdWJJdGVtcwEABAAEBAAIFFN5c3RlbS5EcmF3aW5nLkNvbG9yAwAAAAETU3lzdGVtLkRyYXdp + bmcuRm9udAMAAAAUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAAQIAAAAGBAAAAAD/////Bfv///8UU3lz + dGVtLkRyYXdpbmcuQ29sb3IEAAAABG5hbWUFdmFsdWUKa25vd25Db2xvcgVzdGF0ZQEAAAAJBwcDAAAA + CgAAAAAAAAAAGAABAAAJBgAAAAH5////+////woAAAAAAAAAABoAAQABBQYAAAATU3lzdGVtLkRyYXdp + bmcuRm9udAQAAAAETmFtZQRTaXplBVN0eWxlBFVuaXQBAAQECxhTeXN0ZW0uRHJhd2luZy5Gb250U3R5 + bGUDAAAAG1N5c3RlbS5EcmF3aW5nLkdyYXBoaWNzVW5pdAMAAAADAAAABggAAAAG5a6L5L2TAAAQQQX3 + ////GFN5c3RlbS5EcmF3aW5nLkZvbnRTdHlsZQEAAAAHdmFsdWVfXwAIAwAAAAAAAAAF9v///xtTeXN0 + ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAMAAAADAAAACw== + + + + 803, 437 + + + 817, 605 + + + 路由设置 + + \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/RoutingSubSettingForm.Designer.cs b/v2rayN/v2rayN/Forms/RoutingSubSettingForm.Designer.cs new file mode 100644 index 00000000..e085f27f --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingSubSettingForm.Designer.cs @@ -0,0 +1,106 @@ +namespace v2rayN.Forms +{ + partial class RoutingSubSettingForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RoutingSubSettingForm)); + this.panel2 = new System.Windows.Forms.Panel(); + this.btnClose = new System.Windows.Forms.Button(); + this.btnOK = new System.Windows.Forms.Button(); + this.panCon = new System.Windows.Forms.Panel(); + this.txtUrl = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.panel2.SuspendLayout(); + this.panCon.SuspendLayout(); + this.SuspendLayout(); + // + // panel2 + // + this.panel2.Controls.Add(this.btnClose); + this.panel2.Controls.Add(this.btnOK); + resources.ApplyResources(this.panel2, "panel2"); + this.panel2.Name = "panel2"; + // + // 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); + // + // btnOK + // + resources.ApplyResources(this.btnOK, "btnOK"); + this.btnOK.Name = "btnOK"; + this.btnOK.UseVisualStyleBackColor = true; + this.btnOK.Click += new System.EventHandler(this.btnOK_Click); + // + // panCon + // + resources.ApplyResources(this.panCon, "panCon"); + this.panCon.Controls.Add(this.txtUrl); + this.panCon.Controls.Add(this.label3); + this.panCon.Name = "panCon"; + // + // txtUrl + // + resources.ApplyResources(this.txtUrl, "txtUrl"); + this.txtUrl.Name = "txtUrl"; + // + // label3 + // + resources.ApplyResources(this.label3, "label3"); + this.label3.Name = "label3"; + // + // RoutingSubSettingForm + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnClose; + this.Controls.Add(this.panCon); + this.Controls.Add(this.panel2); + this.Name = "RoutingSubSettingForm"; + this.Load += new System.EventHandler(this.RoutingSubSettingForm_Load); + this.panel2.ResumeLayout(false); + this.panCon.ResumeLayout(false); + this.panCon.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Button btnClose; + private System.Windows.Forms.Button btnOK; + private System.Windows.Forms.Panel panCon; + private System.Windows.Forms.TextBox txtUrl; + private System.Windows.Forms.Label label3; + } +} \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/RoutingSubSettingForm.cs b/v2rayN/v2rayN/Forms/RoutingSubSettingForm.cs new file mode 100644 index 00000000..7ccb683d --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingSubSettingForm.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using v2rayN.Handler; +using v2rayN.Mode; + +namespace v2rayN.Forms +{ + public partial class RoutingSubSettingForm : BaseForm + { + public string Url; + public RoutingSubSettingForm() + { + InitializeComponent(); + } + + private void RoutingSubSettingForm_Load(object sender, EventArgs e) + { + if (config.ruleSubItem == null) + { + config.ruleSubItem = new List(); + } + if (config.ruleSubItem.Count <= 0) + { + config.ruleSubItem.Add(new SubItem + { + remarks = "def", + url = Global.CustomRoutingListUrl + "custom_routing_rules" + }); + } + txtUrl.Text = config.ruleSubItem[0].url; + } + + private void btnOK_Click(object sender, EventArgs e) + { + var url = txtUrl.Text.Trim(); + + if (Utils.IsNullOrEmpty(url)) + { + return; + } + Url = url; + config.ruleSubItem[0].url = url; + ConfigHandler.SaveRuleSubItem(ref config); + + this.DialogResult = DialogResult.OK; + } + + private void btnClose_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + } + + } +} diff --git a/v2rayN/v2rayN/Forms/RoutingSubSettingForm.resx b/v2rayN/v2rayN/Forms/RoutingSubSettingForm.resx new file mode 100644 index 00000000..144946ab --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingSubSettingForm.resx @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + NoControl + + + + 448, 17 + + + 75, 23 + + + + 4 + + + &Cancel + + + btnClose + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 0 + + + NoControl + + + 355, 17 + + + 75, 23 + + + 5 + + + &OK + + + btnOK + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 1 + + + Bottom + + + 0, 166 + + + 545, 60 + + + 8 + + + panel2 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + True + + + 83, 19 + + + True + + + 450, 113 + + + 25 + + + txtUrl + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panCon + + + 0 + + + True + + + NoControl + + + 12, 19 + + + 23, 12 + + + 24 + + + Url + + + label3 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panCon + + + 1 + + + Fill + + + 0, 0 + + + 545, 166 + + + 11 + + + panCon + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + True + + + 6, 12 + + + 545, 226 + + + RoutingSubSetting + + + RoutingSubSettingForm + + + 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/RoutingSubSettingForm.zh-Hans.resx b/v2rayN/v2rayN/Forms/RoutingSubSettingForm.zh-Hans.resx new file mode 100644 index 00000000..614f26d1 --- /dev/null +++ b/v2rayN/v2rayN/Forms/RoutingSubSettingForm.zh-Hans.resx @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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) + + + + 65, 12 + + + 地址 (url) + + \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/SubSettingControl.Designer.cs b/v2rayN/v2rayN/Forms/SubSettingControl.Designer.cs index 30fcadf5..8ffe9ca4 100644 --- a/v2rayN/v2rayN/Forms/SubSettingControl.Designer.cs +++ b/v2rayN/v2rayN/Forms/SubSettingControl.Designer.cs @@ -29,27 +29,38 @@ private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SubSettingControl)); - this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.grbMain = new System.Windows.Forms.GroupBox(); + this.btnShare = new System.Windows.Forms.Button(); this.chkEnabled = new System.Windows.Forms.CheckBox(); this.btnRemove = new System.Windows.Forms.Button(); this.txtUrl = new System.Windows.Forms.TextBox(); this.txtRemarks = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); - this.groupBox2.SuspendLayout(); + this.picQRCode = new System.Windows.Forms.PictureBox(); + this.grbMain.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picQRCode)).BeginInit(); this.SuspendLayout(); // - // groupBox2 + // grbMain // - resources.ApplyResources(this.groupBox2, "groupBox2"); - this.groupBox2.Controls.Add(this.chkEnabled); - this.groupBox2.Controls.Add(this.btnRemove); - this.groupBox2.Controls.Add(this.txtUrl); - this.groupBox2.Controls.Add(this.txtRemarks); - this.groupBox2.Controls.Add(this.label2); - this.groupBox2.Controls.Add(this.label3); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.TabStop = false; + this.grbMain.Controls.Add(this.btnShare); + this.grbMain.Controls.Add(this.chkEnabled); + this.grbMain.Controls.Add(this.btnRemove); + this.grbMain.Controls.Add(this.txtUrl); + this.grbMain.Controls.Add(this.txtRemarks); + this.grbMain.Controls.Add(this.label2); + this.grbMain.Controls.Add(this.label3); + resources.ApplyResources(this.grbMain, "grbMain"); + this.grbMain.Name = "grbMain"; + this.grbMain.TabStop = false; + // + // btnShare + // + resources.ApplyResources(this.btnShare, "btnShare"); + this.btnShare.Name = "btnShare"; + this.btnShare.UseVisualStyleBackColor = true; + this.btnShare.Click += new System.EventHandler(this.btnShare_Click); // // chkEnabled // @@ -87,27 +98,37 @@ resources.ApplyResources(this.label3, "label3"); this.label3.Name = "label3"; // + // picQRCode + // + resources.ApplyResources(this.picQRCode, "picQRCode"); + this.picQRCode.Name = "picQRCode"; + this.picQRCode.TabStop = false; + // // SubSettingControl // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.groupBox2); + this.Controls.Add(this.picQRCode); + this.Controls.Add(this.grbMain); this.Name = "SubSettingControl"; this.Load += new System.EventHandler(this.SubSettingControl_Load); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); + this.grbMain.ResumeLayout(false); + this.grbMain.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picQRCode)).EndInit(); this.ResumeLayout(false); } #endregion - private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.GroupBox grbMain; private System.Windows.Forms.TextBox txtUrl; private System.Windows.Forms.TextBox txtRemarks; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; private System.Windows.Forms.Button btnRemove; private System.Windows.Forms.CheckBox chkEnabled; + private System.Windows.Forms.Button btnShare; + private System.Windows.Forms.PictureBox picQRCode; } } diff --git a/v2rayN/v2rayN/Forms/SubSettingControl.cs b/v2rayN/v2rayN/Forms/SubSettingControl.cs index 9836be5d..652e389e 100644 --- a/v2rayN/v2rayN/Forms/SubSettingControl.cs +++ b/v2rayN/v2rayN/Forms/SubSettingControl.cs @@ -1,6 +1,7 @@ using System; using System.Windows.Forms; using v2rayN.Base; +using v2rayN.Handler; using v2rayN.Mode; namespace v2rayN.Forms @@ -11,7 +12,10 @@ namespace v2rayN.Forms public event ChangeEventHandler OnButtonClicked; - public SubItem subItem { get; set; } + public SubItem subItem + { + get; set; + } public SubSettingControl() { @@ -20,6 +24,7 @@ namespace v2rayN.Forms private void SubSettingControl_Load(object sender, EventArgs e) { + this.Height = grbMain.Height; BindingSub(); } @@ -56,5 +61,23 @@ namespace v2rayN.Forms OnButtonClicked?.Invoke(sender, e); } + + private void btnShare_Click(object sender, EventArgs e) + { + if (this.Height <= grbMain.Height) + { + if (Utils.IsNullOrEmpty(subItem.url)) + { + picQRCode.Image = null; + return; + } + picQRCode.Image = QRCodeHelper.GetQRCode(subItem.url); + this.Height = grbMain.Height + 200; + } + else + { + this.Height = grbMain.Height; + } + } } } diff --git a/v2rayN/v2rayN/Forms/SubSettingControl.resx b/v2rayN/v2rayN/Forms/SubSettingControl.resx index a5dec524..f06a5702 100644 --- a/v2rayN/v2rayN/Forms/SubSettingControl.resx +++ b/v2rayN/v2rayN/Forms/SubSettingControl.resx @@ -118,34 +118,34 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - 6, 12 - - - zh-Hans - - - True - - - 584, 119 - - + NoControl - - 484, 21 + + + 434, 21 - + 75, 23 - - 24 + + + 26 - - &Remove + + Share + + + btnShare + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grbMain + + + 0 True @@ -154,7 +154,7 @@ NoControl - 406, 23 + 368, 23 60, 16 @@ -165,20 +165,92 @@ Enable - - Bottom + + chkEnabled - - 0, 9 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 584, 110 + + grbMain - - 10 + + 1 - - Subscription details + + NoControl + + + 525, 21 + + + 75, 23 + + + 24 + + + Remove + + + btnRemove + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grbMain + + + 2 + + + 127, 55 + + + True + + + Vertical + + + 473, 46 + + + 23 + + + txtUrl + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grbMain + + + 3 + + + 127, 21 + + + 232, 21 + + + 11 + + + txtRemarks + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grbMain + + + 4 True @@ -198,6 +270,18 @@ Remarks + + label2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grbMain + + + 5 + True @@ -216,25 +300,88 @@ Address (url) - - 127, 21 + + label3 - - 265, 21 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 11 + + grbMain - - 127, 55 + + 6 - + + Top + + + 0, 0 + + + 619, 110 + + + 10 + + + Subscription details + + + grbMain + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + Fill + + + NoControl + + + 0, 110 + + + 619, 200 + + + Zoom + + + 25 + + + picQRCode + + + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + True + + + 6, 12 - - 432, 46 + + 619, 310 - - 23 + + SubSettingControl + + + System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/SubSettingControl.zh-Hans.resx b/v2rayN/v2rayN/Forms/SubSettingControl.zh-Hans.resx index 95e5122f..6979e601 100644 --- a/v2rayN/v2rayN/Forms/SubSettingControl.zh-Hans.resx +++ b/v2rayN/v2rayN/Forms/SubSettingControl.zh-Hans.resx @@ -117,18 +117,18 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 移除 + + 分享 + 48, 16 启用 - - 订阅详情 + + 移除 29, 12 @@ -142,4 +142,7 @@ 地址 (url) + + 订阅详情 + \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/SubSettingForm.resx b/v2rayN/v2rayN/Forms/SubSettingForm.resx index e2001bb5..0f5ca1f3 100644 --- a/v2rayN/v2rayN/Forms/SubSettingForm.resx +++ b/v2rayN/v2rayN/Forms/SubSettingForm.resx @@ -118,19 +118,61 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + NoControl + + + 448, 17 + + + 75, 23 + - - 6, 12 + + 4 - - 581, 629 + + &Cancel - + + btnClose + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 1 + + True - - Subscription settings + + Fill + + + 0, 0 + + + 614, 569 + + + 10 + + + panCon + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 NoControl @@ -147,20 +189,17 @@ &Add - - NoControl + + btnAdd - - 448, 17 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 75, 23 + + panel2 - - 4 - - - &Cancel + + 0 NoControl @@ -177,20 +216,17 @@ &OK - - True + + btnOK - - Fill + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0, 0 + + panel2 - - 581, 569 - - - 10 + + 2 Bottom @@ -199,9 +235,39 @@ 0, 569 - 581, 60 + 614, 60 7 + + panel2 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + True + + + 6, 12 + + + 614, 629 + + + Subscription settings + + + SubSettingForm + + + v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/v2rayN/v2rayN/Global.cs b/v2rayN/v2rayN/Global.cs index 55eeea14..5fbf1fdc 100644 --- a/v2rayN/v2rayN/Global.cs +++ b/v2rayN/v2rayN/Global.cs @@ -1,4 +1,6 @@  +using System.Collections.Generic; + namespace v2rayN { class Global @@ -9,6 +11,9 @@ namespace v2rayN public const string v2rayWebsiteUrl = @"https://www.v2fly.org/"; public const string AboutUrl = @"https://github.com/2dust/v2rayN"; public const string UpdateUrl = AboutUrl + @"/releases"; + public const string v2flyCoreUrl = "https://github.com/v2fly/v2ray-core/releases"; + public const string xrayCoreUrl = "https://github.com/XTLS/Xray-core/releases"; + public const string NUrl = @"https://github.com/2dust/v2rayN/releases"; /// @@ -23,7 +28,6 @@ namespace v2rayN /// public const string CustomRoutingListUrl = @"https://raw.githubusercontent.com/2dust/v2rayCustomRoutingList/master/"; - public const string GFWLIST_URL = "https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt"; /// /// PromotionUrl @@ -56,10 +60,7 @@ namespace v2rayN /// v2ray配置Httpresponse文件名 /// public const string v2raySampleHttpresponseFileName = "v2rayN.Sample.SampleHttpresponse.txt"; - /// - /// 空白的pac文件 - /// - public const string BlankPacFileName = "v2rayN.Sample.BlankPac.txt"; + public const string CustomRoutingFileName = "v2rayN.Sample.custom_routing_"; @@ -161,11 +162,6 @@ namespace v2rayN /// public const string trojanProtocolLite = "trojan"; - /// - /// pac - /// - public const string pacFILE = "pac.txt"; - /// /// email /// @@ -195,6 +191,9 @@ namespace v2rayN public const string IEProxyExceptions = "localhost;127.*;10.*;172.16.*;172.17.*;172.18.*;172.19.*;172.20.*;172.21.*;172.22.*;172.23.*;172.24.*;172.25.*;172.26.*;172.27.*;172.28.*;172.29.*;172.30.*;172.31.*;192.168.*"; + public const string RoutingRuleComma = ""; + + public static readonly IEnumerable ssSecuritys = new HashSet { "aes-256-gcm", "aes-128-gcm", "chacha20-poly1305", "chacha20-ietf-poly1305", "none", "plain" }; #endregion #region 全局变量 @@ -231,13 +230,6 @@ namespace v2rayN get; set; } - /// - /// PAC端口 - /// - public static int pacPort - { - get; set; - } /// /// diff --git a/v2rayN/v2rayN/Handler/ConfigHandler.cs b/v2rayN/v2rayN/Handler/ConfigHandler.cs index 59c0dcd7..61cd330f 100644 --- a/v2rayN/v2rayN/Handler/ConfigHandler.cs +++ b/v2rayN/v2rayN/Handler/ConfigHandler.cs @@ -16,6 +16,8 @@ namespace v2rayN.Handler { private static string configRes = Global.ConfigFileName; + #region ConfigHandler + /// /// 载入配置文件 /// @@ -87,22 +89,7 @@ namespace v2rayN.Handler { config.domainStrategy = "IPIfNonMatch"; } - if (Utils.IsNullOrEmpty(config.routingMode)) - { - config.routingMode = "0"; - } - if (config.useragent == null) - { - config.useragent = new List(); - } - if (config.userdirect == null) - { - config.userdirect = new List(); - } - if (config.userblock == null) - { - config.userblock = new List(); - } + //kcp if (config.kcpItem == null) { @@ -139,10 +126,6 @@ namespace v2rayN.Handler { config.speedPingTestUrl = Global.SpeedPingTestUrl; } - if (Utils.IsNullOrEmpty(config.urlGFWList)) - { - config.urlGFWList = Global.GFWLIST_URL; - } //if (Utils.IsNullOrEmpty(config.remoteDNS)) //{ // config.remoteDNS = "1.1.1.1"; @@ -152,10 +135,6 @@ namespace v2rayN.Handler { config.subItem = new List(); } - if (config.userPacRule == null) - { - config.userPacRule = new List(); - } if (config == null || config.index < 0 @@ -180,6 +159,10 @@ namespace v2rayN.Handler return 0; } + #endregion + + #region Server + /// /// 添加服务器或编辑 /// @@ -299,7 +282,9 @@ namespace v2rayN.Handler path = config.vmess[index].path, streamSecurity = config.vmess[index].streamSecurity, allowInsecure = config.vmess[index].allowInsecure, - configType = config.vmess[index].configType + configType = config.vmess[index].configType, + flow = config.vmess[index].flow, + sni = config.vmess[index].sni }; config.vmess.Insert(index + 1, vmessItem); // 插入到下一项 @@ -358,95 +343,6 @@ namespace v2rayN.Handler Utils.ToJsonFile(config, Utils.GetPath(configRes)); } - /// - /// 取得服务器QRCode配置 - /// - /// - /// - /// - public static string GetVmessQRCode(Config config, int index) - { - try - { - string url = string.Empty; - - VmessItem vmessItem = config.vmess[index]; - if (vmessItem.configType == (int)EConfigType.Vmess) - { - VmessQRCode vmessQRCode = new VmessQRCode - { - v = vmessItem.configVersion.ToString(), - ps = vmessItem.remarks.TrimEx(), //备注也许很长 ; - add = vmessItem.address, - port = vmessItem.port.ToString(), - id = vmessItem.id, - aid = vmessItem.alterId.ToString(), - net = vmessItem.network, - type = vmessItem.headerType, - host = vmessItem.requestHost, - path = vmessItem.path, - tls = vmessItem.streamSecurity - }; - - url = Utils.ToJson(vmessQRCode); - url = Utils.Base64Encode(url); - url = string.Format("{0}{1}", Global.vmessProtocol, url); - - } - else if (vmessItem.configType == (int)EConfigType.Shadowsocks) - { - string remark = string.Empty; - if (!Utils.IsNullOrEmpty(vmessItem.remarks)) - { - remark = "#" + WebUtility.UrlEncode(vmessItem.remarks); - } - url = string.Format("{0}:{1}@{2}:{3}", - vmessItem.security, - vmessItem.id, - vmessItem.address, - vmessItem.port); - url = Utils.Base64Encode(url); - url = string.Format("{0}{1}{2}", Global.ssProtocol, url, remark); - } - else if (vmessItem.configType == (int)EConfigType.Socks) - { - string remark = string.Empty; - if (!Utils.IsNullOrEmpty(vmessItem.remarks)) - { - remark = "#" + WebUtility.UrlEncode(vmessItem.remarks); - } - url = string.Format("{0}:{1}@{2}:{3}", - vmessItem.security, - vmessItem.id, - vmessItem.address, - vmessItem.port); - url = Utils.Base64Encode(url); - url = string.Format("{0}{1}{2}", Global.socksProtocol, url, remark); - } - else if (vmessItem.configType == (int)EConfigType.Trojan) - { - string remark = string.Empty; - if (!Utils.IsNullOrEmpty(vmessItem.remarks)) - { - remark = "#" + WebUtility.UrlEncode(vmessItem.remarks); - } - url = string.Format("{0}@{1}:{2}", - vmessItem.id, - vmessItem.address, - vmessItem.port); - url = string.Format("{0}{1}{2}", Global.trojanProtocol, url, remark); - } - else - { - } - return url; - } - catch - { - return ""; - } - } - /// /// 移动服务器 /// @@ -633,6 +529,11 @@ namespace v2rayN.Handler vmessItem.id = vmessItem.id.TrimEx(); vmessItem.security = vmessItem.security.TrimEx(); + if (!Global.ssSecuritys.Contains(vmessItem.security)) + { + return -1; + } + if (index >= 0) { //修改 @@ -714,7 +615,10 @@ namespace v2rayN.Handler vmessItem.id = vmessItem.id.TrimEx(); vmessItem.streamSecurity = Global.StreamSecurity; - vmessItem.allowInsecure = "false"; + if (Utils.IsNullOrEmpty(vmessItem.allowInsecure)) + { + vmessItem.allowInsecure = config.defAllowInsecure.ToString(); + } if (index >= 0) { @@ -838,7 +742,7 @@ namespace v2rayN.Handler } continue; } - VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(str, out string msg); + VmessItem vmessItem = ShareHandler.ImportFromClipboardConfig(str, out string msg); if (vmessItem == null) { continue; @@ -872,6 +776,13 @@ namespace v2rayN.Handler countServers++; } } + else if (vmessItem.configType == (int)EConfigType.VLESS) + { + if (AddVlessServer(ref config, vmessItem, -1) == 0) + { + countServers++; + } + } } return countServers; } @@ -952,38 +863,6 @@ namespace v2rayN.Handler return 0; } - public static int AddformMainLvColWidth(ref Config config, string name, int width) - { - if (config.uiItem.mainLvColWidth == null) - { - config.uiItem.mainLvColWidth = new Dictionary(); - } - if (config.uiItem.mainLvColWidth.ContainsKey(name)) - { - config.uiItem.mainLvColWidth[name] = width; - } - else - { - config.uiItem.mainLvColWidth.Add(name, width); - } - return 0; - } - public static int GetformMainLvColWidth(ref Config config, string name, int width) - { - if (config.uiItem.mainLvColWidth == null) - { - config.uiItem.mainLvColWidth = new Dictionary(); - } - if (config.uiItem.mainLvColWidth.ContainsKey(name)) - { - return config.uiItem.mainLvColWidth[name]; - } - else - { - return width; - } - } - public static int SortServers(ref Config config, EServerColName name, bool asc) { if (config.vmess.Count <= 0) @@ -1075,5 +954,252 @@ namespace v2rayN.Handler return 0; } + #endregion + + #region UI + + public static int AddformMainLvColWidth(ref Config config, string name, int width) + { + if (config.uiItem.mainLvColWidth == null) + { + config.uiItem.mainLvColWidth = new Dictionary(); + } + if (config.uiItem.mainLvColWidth.ContainsKey(name)) + { + config.uiItem.mainLvColWidth[name] = width; + } + else + { + config.uiItem.mainLvColWidth.Add(name, width); + } + return 0; + } + public static int GetformMainLvColWidth(ref Config config, string name, int width) + { + if (config.uiItem.mainLvColWidth == null) + { + config.uiItem.mainLvColWidth = new Dictionary(); + } + if (config.uiItem.mainLvColWidth.ContainsKey(name)) + { + return config.uiItem.mainLvColWidth[name]; + } + else + { + return width; + } + } + + #endregion + + #region Routing + + public static int SaveRouting(ref Config config) + { + if (config.routings == null) + { + return -1; + } + + foreach (var item in config.routings) + { + + } + //move locked item + int index = config.routings.FindIndex(it => it.locked == true); + if (index != -1) + { + var item = Utils.DeepCopy(config.routings[index]); + config.routings.RemoveAt(index); + config.routings.Add(item); + } + if (config.routingIndex >= config.routings.Count) + { + config.routingIndex = 0; + } + + Global.reloadV2ray = true; + + ToJsonFile(config); + return 0; + } + + public static int AddRoutingItem(ref Config config, RoutingItem item, int index) + { + if (index >= 0) + { + config.routings[index] = item; + } + else + { + config.routings.Add(item); + } + ToJsonFile(config); + + return 0; + } + + /// + /// AddBatchRoutingRules + /// + /// + /// + /// + public static int AddBatchRoutingRules(ref RoutingItem routingItem, string clipboardData) + { + if (Utils.IsNullOrEmpty(clipboardData)) + { + return -1; + } + + var lstRules = Utils.FromJson>(clipboardData); + if (lstRules == null) + { + return -1; + } + + routingItem.rules.Clear(); + foreach (var item in lstRules) + { + routingItem.rules.Add(item); + } + return 0; + } + + /// + /// MoveRoutingRule + /// + /// + /// + /// + /// + public static int MoveRoutingRule(ref RoutingItem routingItem, int index, EMove eMove) + { + int count = routingItem.rules.Count; + if (index < 0 || index > routingItem.rules.Count - 1) + { + return -1; + } + switch (eMove) + { + case EMove.Top: + { + if (index == 0) + { + return 0; + } + var item = Utils.DeepCopy(routingItem.rules[index]); + routingItem.rules.RemoveAt(index); + routingItem.rules.Insert(0, item); + + break; + } + case EMove.Up: + { + if (index == 0) + { + return 0; + } + var item = Utils.DeepCopy(routingItem.rules[index]); + routingItem.rules.RemoveAt(index); + routingItem.rules.Insert(index - 1, item); + + break; + } + + case EMove.Down: + { + if (index == count - 1) + { + return 0; + } + var item = Utils.DeepCopy(routingItem.rules[index]); + routingItem.rules.RemoveAt(index); + routingItem.rules.Insert(index + 1, item); + + break; + } + case EMove.Bottom: + { + if (index == count - 1) + { + return 0; + } + var item = Utils.DeepCopy(routingItem.rules[index]); + routingItem.rules.RemoveAt(index); + routingItem.rules.Add(item); + + break; + } + + } + return 0; + } + + public static int SetDefaultRouting(ref Config config, int index) + { + if (index < 0 || index > config.routings.Count - 1) + { + return -1; + } + + ////和现在相同 + //if (config.index.Equals(index)) + //{ + // return -1; + //} + config.routingIndex = index; + Global.reloadV2ray = true; + + ToJsonFile(config); + + return 0; + } + + public static int InitBuiltinRouting(ref Config config) + { + if (config.routings == null) + { + config.routings = new List(); + } + if (config.routings.Count <= 0) + { + //Bypass the mainland + var item2 = new RoutingItem(); + item2.remarks = "绕过大陆(Whitelist)"; + item2.url = string.Empty; + item2.rules = new List(); + string result2 = Utils.GetEmbedText(Global.CustomRoutingFileName + "white"); + AddBatchRoutingRules(ref item2, result2); + config.routings.Add(item2); + + config.routingIndex = 0; + } + + if (GetLockedRoutingItem(ref config) == null) + { + var item1 = new RoutingItem(); + item1.remarks = "locked"; + item1.url = string.Empty; + item1.rules = new List(); + item1.locked = true; + string result1 = Utils.GetEmbedText(Global.CustomRoutingFileName + "locked"); + AddBatchRoutingRules(ref item1, result1); + config.routings.Add(item1); + } + + SaveRouting(ref config); + return 0; + } + + public static RoutingItem GetLockedRoutingItem(ref Config config) + { + if (config.routings == null) + { + return null; + } + return config.routings.Find(it => it.locked == true); + } + #endregion } } diff --git a/v2rayN/v2rayN/Handler/DownloadHandle.cs b/v2rayN/v2rayN/Handler/DownloadHandle.cs index 67a936f2..66612ac8 100644 --- a/v2rayN/v2rayN/Handler/DownloadHandle.cs +++ b/v2rayN/v2rayN/Handler/DownloadHandle.cs @@ -52,10 +52,12 @@ namespace v2rayN.Handler #region Check for updates - private readonly string nLatestUrl = "https://github.com/2dust/v2rayN/releases/latest"; - private const string nUrl = "https://github.com/2dust/v2rayN/releases/download/{0}/v2rayN.zip"; - private readonly string coreLatestUrl = "https://github.com/v2fly/v2ray-core/releases/latest"; - private const string coreUrl = "https://github.com/v2fly/v2ray-core/releases/download/{0}/v2ray-windows-{1}.zip"; + private readonly string nLatestUrl = Global.NUrl + "/latest"; + private const string nUrl = Global.NUrl + "/download/{0}/v2rayN.zip"; + private readonly string v2flyCoreLatestUrl = Global.v2flyCoreUrl + "/latest"; + private const string v2flyCoreUrl = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip"; + private readonly string xrayCoreLatestUrl = Global.xrayCoreUrl + "/latest"; + private const string xrayCoreUrl = Global.xrayCoreUrl + "/download/{0}/Xray-windows-{1}.zip"; public async void CheckUpdateAsync(string type) { @@ -67,9 +69,13 @@ namespace v2rayN.Handler HttpClient httpClient = new HttpClient(webRequestHandler); string url; - if (type == "Core") + if (type == "v2fly") { - url = coreLatestUrl; + url = v2flyCoreLatestUrl; + } + else if (type == "xray") + { + url = xrayCoreLatestUrl; } else if (type == "v2rayN") { @@ -94,14 +100,26 @@ namespace v2rayN.Handler /// /// 获取V2RayCore版本 /// - public string getV2rayVersion() + public string getCoreVersion(string type) { try { - string filePath = Utils.GetPath("V2ray.exe"); + var core = string.Empty; + var match = string.Empty; + if (type == "v2fly") + { + core = "v2ray.exe"; + match = "V2Ray"; + } + else if (type == "xray") + { + core = "xray.exe"; + match = "Xray"; + } + string filePath = Utils.GetPath(core); if (!File.Exists(filePath)) { - string msg = string.Format(UIRes.I18N("NotFoundCore"), @"https://github.com/v2fly/v2ray-core/releases"); + string msg = string.Format(UIRes.I18N("NotFoundCore"), @""); //ShowMsg(true, msg); return ""; } @@ -117,10 +135,9 @@ namespace v2rayN.Handler p.Start(); p.WaitForExit(5000); string echo = p.StandardOutput.ReadToEnd(); - string version = Regex.Match(echo, "V2Ray ([0-9.]+) \\(").Groups[1].Value; + string version = Regex.Match(echo, $"{match} ([0-9.]+) \\(").Groups[1].Value; return version; } - catch (Exception ex) { Utils.SaveLog(ex.Message, ex); @@ -136,12 +153,19 @@ namespace v2rayN.Handler string curVersion; string message; string url; - if (type == "Core") + if (type == "v2fly") { - curVersion = "v" + getV2rayVersion(); + curVersion = "v" + getCoreVersion(type); message = string.Format(UIRes.I18N("IsLatestCore"), curVersion); string osBit = Environment.Is64BitProcess ? "64" : "32"; - url = string.Format(coreUrl, version, osBit); + url = string.Format(v2flyCoreUrl, version, osBit); + } + else if (type == "xray") + { + curVersion = "v" + getCoreVersion(type); + message = string.Format(UIRes.I18N("IsLatestCore"), curVersion); + string osBit = Environment.Is64BitProcess ? "64" : "32"; + url = string.Format(xrayCoreUrl, version, osBit); } else if (type == "v2rayN") { @@ -242,8 +266,8 @@ namespace v2rayN.Handler { ((WebClientEx)sender).Dispose(); TimeSpan ts = (DateTime.Now - totalDatetime); - string speed = string.Format("{0} M/s", (totalBytesToReceive / ts.TotalMilliseconds / 1000).ToString("#0.##")); - UpdateCompleted(this, new ResultEventArgs(true, speed)); + string speed = string.Format("{0} M/s", (totalBytesToReceive / ts.TotalMilliseconds / 1000).ToString("#0.0")); + UpdateCompleted(this, new ResultEventArgs(true, speed.PadLeft(8, ' '))); return; } @@ -252,8 +276,8 @@ namespace v2rayN.Handler { TimeSpan ts = (DateTime.Now - totalDatetime); - string speed = string.Format("{0} M/s", (totalBytesToReceive / ts.TotalMilliseconds / 1000).ToString("#0.##")); - UpdateCompleted(this, new ResultEventArgs(true, speed)); + string speed = string.Format("{0} M/s", (totalBytesToReceive / ts.TotalMilliseconds / 1000).ToString("#0.0")); + UpdateCompleted(this, new ResultEventArgs(true, speed.PadLeft(8, ' '))); } else { @@ -313,47 +337,24 @@ namespace v2rayN.Handler } } - #endregion - - #region PAC - - public string GenPacFile(string result) + public string WebDownloadStringSync(string url) { + string source = string.Empty; try { - File.WriteAllText(Utils.GetTempPath("gfwlist.txt"), result, Encoding.UTF8); - List lines = ParsePacResult(result); - string abpContent = Utils.UnGzip(Resources.abp_js); - abpContent = abpContent.Replace("__RULES__", JsonConvert.SerializeObject(lines, Formatting.Indented)); - File.WriteAllText(Utils.GetPath(Global.pacFILE), abpContent, Encoding.UTF8); + Utils.SetSecurityProtocol(); + + WebClientEx ws = new WebClientEx(); + + return ws.DownloadString(new Uri(url)); } catch (Exception ex) { Utils.SaveLog(ex.Message, ex); - return ex.Message; + return string.Empty; } - return string.Empty; } - - private List ParsePacResult(string response) - { - IEnumerable IgnoredLineBegins = new[] { '!', '[' }; - - byte[] bytes = Convert.FromBase64String(response); - string content = Encoding.UTF8.GetString(bytes); - List valid_lines = new List(); - using (StringReader sr = new StringReader(content)) - { - foreach (string line in sr.NonWhiteSpaceLines()) - { - if (line.BeginWithAny(IgnoredLineBegins)) - continue; - valid_lines.Add(line); - } - } - return valid_lines; - } - #endregion + } } diff --git a/v2rayN/v2rayN/Handler/MainFormHandler.cs b/v2rayN/v2rayN/Handler/MainFormHandler.cs index 419ba374..6842a5b9 100644 --- a/v2rayN/v2rayN/Handler/MainFormHandler.cs +++ b/v2rayN/v2rayN/Handler/MainFormHandler.cs @@ -1,6 +1,7 @@ using System; using System.Drawing; using System.Windows.Forms; +using v2rayN.Base; using v2rayN.Mode; namespace v2rayN.Handler @@ -8,6 +9,7 @@ namespace v2rayN.Handler class MainFormHandler { private static MainFormHandler instance; + Action updateUI; //private DownloadHandle downloadHandle2; //private Config _config; @@ -32,7 +34,7 @@ namespace v2rayN.Handler try { Color color = ColorTranslator.FromHtml("#3399CC"); - int index = (int)config.listenerType; + int index = (int)config.sysProxyType; if (index > 0) { color = (new Color[] { Color.Red, Color.Purple, Color.DarkGreen, Color.Orange, Color.DarkSlateBlue, Color.RoyalBlue })[index - 1]; @@ -147,6 +149,93 @@ namespace v2rayN.Handler } } + public int AddBatchServers(Config config, string clipboardData, string subid = "") + { + int counter; + int _Add() + { + return ConfigHandler.AddBatchServers(ref config, clipboardData, subid); + } + counter = _Add(); + if (counter < 1) + { + clipboardData = Utils.Base64Decode(clipboardData); + counter = _Add(); + } + + return counter; + } + + + public void UpdateSubscriptionProcess(Config config, Action update) + { + updateUI = update; + + updateUI(false, UIRes.I18N("MsgUpdateSubscriptionStart")); + + if (config.subItem == null || config.subItem.Count <= 0) + { + updateUI(false, UIRes.I18N("MsgNoValidSubscription")); + return; + } + + for (int k = 1; k <= config.subItem.Count; k++) + { + string id = config.subItem[k - 1].id.TrimEx(); + string url = config.subItem[k - 1].url.TrimEx(); + string hashCode = $"{k}->"; + if (config.subItem[k - 1].enabled == false) + { + continue; + } + if (Utils.IsNullOrEmpty(id) || Utils.IsNullOrEmpty(url)) + { + updateUI(false, $"{hashCode}{UIRes.I18N("MsgNoValidSubscription")}"); + continue; + } + + DownloadHandle downloadHandle3 = new DownloadHandle(); + downloadHandle3.UpdateCompleted += (sender2, args) => + { + if (args.Success) + { + updateUI(false, $"{hashCode}{UIRes.I18N("MsgGetSubscriptionSuccessfully")}"); + string result = Utils.Base64Decode(args.Msg); + if (Utils.IsNullOrEmpty(result)) + { + updateUI(false, $"{hashCode}{UIRes.I18N("MsgSubscriptionDecodingFailed")}"); + return; + } + + ConfigHandler.RemoveServerViaSubid(ref config, id); + updateUI(false, $"{hashCode}{UIRes.I18N("MsgClearSubscription")}"); + // RefreshServers(); + int ret = MainFormHandler.Instance.AddBatchServers(config, result, id); + if (ret > 0) + { + // RefreshServers(); + } + else + { + updateUI(false, $"{hashCode}{UIRes.I18N("MsgFailedImportSubscription")}"); + } + updateUI(true, $"{hashCode}{UIRes.I18N("MsgUpdateSubscriptionEnd")}"); + } + else + { + updateUI(false, args.Msg); + } + }; + downloadHandle3.Error += (sender2, args) => + { + updateUI(false, args.GetException().Message); + }; + + downloadHandle3.WebDownloadString(url); + updateUI(false, $"{hashCode}{UIRes.I18N("MsgStartGettingSubscriptions")}"); + } + + } } } diff --git a/v2rayN/v2rayN/Handler/ShareHandler.cs b/v2rayN/v2rayN/Handler/ShareHandler.cs new file mode 100644 index 00000000..810dbc1c --- /dev/null +++ b/v2rayN/v2rayN/Handler/ShareHandler.cs @@ -0,0 +1,694 @@ +using System; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Linq; +using System.Net; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using System.Web; +using v2rayN.Base; +using v2rayN.Mode; + +namespace v2rayN.Handler +{ + class ShareHandler + { + + #region GetShareUrl + + /// + /// GetShareUrl + /// + /// + /// + /// + public static string GetShareUrl(Config config, int index) + { + try + { + string url = string.Empty; + + VmessItem item = config.vmess[index]; + if (item.configType == (int)EConfigType.Vmess) + { + VmessQRCode vmessQRCode = new VmessQRCode + { + v = item.configVersion.ToString(), + ps = item.remarks.TrimEx(), //备注也许很长 ; + add = item.address, + port = item.port.ToString(), + id = item.id, + aid = item.alterId.ToString(), + net = item.network, + type = item.headerType, + host = item.requestHost, + path = item.path, + tls = item.streamSecurity, + sni = item.sni + }; + + url = Utils.ToJson(vmessQRCode); + url = Utils.Base64Encode(url); + url = string.Format("{0}{1}", Global.vmessProtocol, url); + + } + else if (item.configType == (int)EConfigType.Shadowsocks) + { + string remark = string.Empty; + if (!Utils.IsNullOrEmpty(item.remarks)) + { + remark = "#" + Utils.UrlEncode(item.remarks); + } + url = string.Format("{0}:{1}@{2}:{3}", + item.security, + item.id, + item.address, + item.port); + url = Utils.Base64Encode(url); + url = string.Format("{0}{1}{2}", Global.ssProtocol, url, remark); + } + else if (item.configType == (int)EConfigType.Socks) + { + string remark = string.Empty; + if (!Utils.IsNullOrEmpty(item.remarks)) + { + remark = "#" + Utils.UrlEncode(item.remarks); + } + url = string.Format("{0}:{1}@{2}:{3}", + item.security, + item.id, + item.address, + item.port); + url = Utils.Base64Encode(url); + url = string.Format("{0}{1}{2}", Global.socksProtocol, url, remark); + } + else if (item.configType == (int)EConfigType.Trojan) + { + string remark = string.Empty; + if (!Utils.IsNullOrEmpty(item.remarks)) + { + remark = "#" + Utils.UrlEncode(item.remarks); + } + string query = string.Empty; + if (!Utils.IsNullOrEmpty(item.sni)) + { + query = string.Format("?sni={0}", Utils.UrlEncode(item.sni)); + } + url = string.Format("{0}@{1}:{2}", + item.id, + GetIpv6(item.address), + item.port); + url = string.Format("{0}{1}{2}{3}", Global.trojanProtocol, url, query, remark); + } + else if (item.configType == (int)EConfigType.VLESS) + { + string remark = string.Empty; + if (!Utils.IsNullOrEmpty(item.remarks)) + { + remark = "#" + Utils.UrlEncode(item.remarks); + } + var dicQuery = new Dictionary(); + if (!Utils.IsNullOrEmpty(item.flow)) + { + dicQuery.Add("flow", item.flow); + } + if (!Utils.IsNullOrEmpty(item.security)) + { + dicQuery.Add("encryption", item.security); + } + else + { + dicQuery.Add("encryption", "none"); + } + if (!Utils.IsNullOrEmpty(item.streamSecurity)) + { + dicQuery.Add("security", item.streamSecurity); + } + else + { + dicQuery.Add("security", "none"); + } + if (!Utils.IsNullOrEmpty(item.sni)) + { + dicQuery.Add("sni", item.sni); + } + if (!Utils.IsNullOrEmpty(item.network)) + { + dicQuery.Add("type", item.network); + } + else + { + dicQuery.Add("type", "tcp"); + } + + switch (item.network) + { + case "tcp": + if (!Utils.IsNullOrEmpty(item.headerType)) + { + dicQuery.Add("headerType", item.headerType); + } + else + { + dicQuery.Add("headerType", "none"); + } + if (!Utils.IsNullOrEmpty(item.requestHost)) + { + dicQuery.Add("host", Utils.UrlEncode(item.requestHost)); + } + break; + case "kcp": + if (!Utils.IsNullOrEmpty(item.headerType)) + { + dicQuery.Add("headerType", item.headerType); + } + else + { + dicQuery.Add("headerType", "none"); + } + if (!Utils.IsNullOrEmpty(item.path)) + { + dicQuery.Add("seed", Utils.UrlEncode(item.path)); + } + break; + + case "ws": + if (!Utils.IsNullOrEmpty(item.requestHost)) + { + dicQuery.Add("host", Utils.UrlEncode(item.requestHost)); + } + if (!Utils.IsNullOrEmpty(item.path)) + { + dicQuery.Add("path", Utils.UrlEncode(item.path)); + } + break; + + case "http": + case "h2": + dicQuery["type"] = "http"; + if (!Utils.IsNullOrEmpty(item.requestHost)) + { + dicQuery.Add("host", Utils.UrlEncode(item.requestHost)); + } + if (!Utils.IsNullOrEmpty(item.path)) + { + dicQuery.Add("path", Utils.UrlEncode(item.path)); + } + break; + + case "quic": + if (!Utils.IsNullOrEmpty(item.headerType)) + { + dicQuery.Add("headerType", item.headerType); + } + else + { + dicQuery.Add("headerType", "none"); + } + dicQuery.Add("quicSecurity", Utils.UrlEncode(item.requestHost)); + dicQuery.Add("key", Utils.UrlEncode(item.path)); + break; + } + string query = "?" + string.Join("&", dicQuery.Select(x => x.Key + "=" + x.Value).ToArray()); + + url = string.Format("{0}@{1}:{2}", + item.id, + GetIpv6(item.address), + item.port); + url = string.Format("{0}{1}{2}{3}", Global.vlessProtocol, url, query, remark); + } + else + { + } + return url; + } + catch + { + return ""; + } + } + + private static string GetIpv6(string address) + { + return Utils.IsIpv6(address) ? $"[{address}]" : address; + } + #endregion + + #region ImportShareUrl + + + /// + /// 从剪贴板导入URL + /// + /// + /// + /// + public static VmessItem ImportFromClipboardConfig(string clipboardData, out string msg) + { + msg = string.Empty; + VmessItem vmessItem = new VmessItem(); + + try + { + //载入配置文件 + string result = clipboardData.TrimEx();// Utils.GetClipboardData(); + if (Utils.IsNullOrEmpty(result)) + { + msg = UIRes.I18N("FailedReadConfiguration"); + return null; + } + + if (result.StartsWith(Global.vmessProtocol)) + { + int indexSplit = result.IndexOf("?"); + if (indexSplit > 0) + { + vmessItem = ResolveStdVmess(result) ?? ResolveVmess4Kitsunebi(result); + } + else + { + vmessItem.configType = (int)EConfigType.Vmess; + result = result.Substring(Global.vmessProtocol.Length); + result = Utils.Base64Decode(result); + + //转成Json + VmessQRCode vmessQRCode = Utils.FromJson(result); + if (vmessQRCode == null) + { + msg = UIRes.I18N("FailedConversionConfiguration"); + return null; + } + vmessItem.security = Global.DefaultSecurity; + vmessItem.network = Global.DefaultNetwork; + vmessItem.headerType = Global.None; + + + vmessItem.configVersion = Utils.ToInt(vmessQRCode.v); + vmessItem.remarks = Utils.ToString(vmessQRCode.ps); + vmessItem.address = Utils.ToString(vmessQRCode.add); + vmessItem.port = Utils.ToInt(vmessQRCode.port); + vmessItem.id = Utils.ToString(vmessQRCode.id); + vmessItem.alterId = Utils.ToInt(vmessQRCode.aid); + + if (!Utils.IsNullOrEmpty(vmessQRCode.net)) + { + vmessItem.network = vmessQRCode.net; + } + if (!Utils.IsNullOrEmpty(vmessQRCode.type)) + { + vmessItem.headerType = vmessQRCode.type; + } + + vmessItem.requestHost = Utils.ToString(vmessQRCode.host); + vmessItem.path = Utils.ToString(vmessQRCode.path); + vmessItem.streamSecurity = Utils.ToString(vmessQRCode.tls); + vmessItem.sni = Utils.ToString(vmessQRCode.sni); + } + + ConfigHandler.UpgradeServerVersion(ref vmessItem); + } + else if (result.StartsWith(Global.ssProtocol)) + { + msg = UIRes.I18N("ConfigurationFormatIncorrect"); + + vmessItem = ResolveSSLegacy(result); + if (vmessItem == null) + { + vmessItem = ResolveSip002(result); + } + if (vmessItem == null) + { + return null; + } + if (vmessItem.address.Length == 0 || vmessItem.port == 0 || vmessItem.security.Length == 0 || vmessItem.id.Length == 0) + { + return null; + } + + vmessItem.configType = (int)EConfigType.Shadowsocks; + } + else if (result.StartsWith(Global.socksProtocol)) + { + msg = UIRes.I18N("ConfigurationFormatIncorrect"); + + vmessItem.configType = (int)EConfigType.Socks; + result = result.Substring(Global.socksProtocol.Length); + //remark + int indexRemark = result.IndexOf("#"); + if (indexRemark > 0) + { + try + { + vmessItem.remarks = Utils.UrlDecode(result.Substring(indexRemark + 1, result.Length - indexRemark - 1)); + } + catch { } + result = result.Substring(0, indexRemark); + } + //part decode + int indexS = result.IndexOf("@"); + if (indexS > 0) + { + } + else + { + result = Utils.Base64Decode(result); + } + + string[] arr1 = result.Split('@'); + if (arr1.Length != 2) + { + return null; + } + string[] arr21 = arr1[0].Split(':'); + //string[] arr22 = arr1[1].Split(':'); + int indexPort = arr1[1].LastIndexOf(":"); + if (arr21.Length != 2 || indexPort < 0) + { + return null; + } + vmessItem.address = arr1[1].Substring(0, indexPort); + vmessItem.port = Utils.ToInt(arr1[1].Substring(indexPort + 1, arr1[1].Length - (indexPort + 1))); + vmessItem.security = arr21[0]; + vmessItem.id = arr21[1]; + } + else if (result.StartsWith(Global.trojanProtocol)) + { + msg = UIRes.I18N("ConfigurationFormatIncorrect"); + + vmessItem.configType = (int)EConfigType.Trojan; + + Uri uri = new Uri(result); + vmessItem.address = uri.IdnHost; + vmessItem.port = uri.Port; + vmessItem.id = uri.UserInfo; + + var qurery = HttpUtility.ParseQueryString(uri.Query); + vmessItem.sni = qurery["sni"] ?? ""; + + var remarks = uri.Fragment.Replace("#", ""); + if (Utils.IsNullOrEmpty(remarks)) + { + vmessItem.remarks = "NONE"; + } + else + { + vmessItem.remarks = Utils.UrlDecode(remarks); + } + } + else if (result.StartsWith(Global.vlessProtocol)) + { + vmessItem = ResolveStdVLESS(result); + + ConfigHandler.UpgradeServerVersion(ref vmessItem); + } + else + { + msg = UIRes.I18N("NonvmessOrssProtocol"); + return null; + } + } + catch + { + msg = UIRes.I18N("Incorrectconfiguration"); + return null; + } + + return vmessItem; + } + + + private static VmessItem ResolveVmess4Kitsunebi(string result) + { + VmessItem vmessItem = new VmessItem + { + configType = (int)EConfigType.Vmess + }; + result = result.Substring(Global.vmessProtocol.Length); + int indexSplit = result.IndexOf("?"); + if (indexSplit > 0) + { + result = result.Substring(0, indexSplit); + } + result = Utils.Base64Decode(result); + + string[] arr1 = result.Split('@'); + if (arr1.Length != 2) + { + return null; + } + string[] arr21 = arr1[0].Split(':'); + string[] arr22 = arr1[1].Split(':'); + if (arr21.Length != 2 || arr21.Length != 2) + { + return null; + } + + vmessItem.address = arr22[0]; + vmessItem.port = Utils.ToInt(arr22[1]); + vmessItem.security = arr21[0]; + vmessItem.id = arr21[1]; + + vmessItem.network = Global.DefaultNetwork; + vmessItem.headerType = Global.None; + vmessItem.remarks = "Alien"; + vmessItem.alterId = 0; + + return vmessItem; + } + + private static VmessItem ResolveSip002(string result) + { + Uri parsedUrl; + try + { + parsedUrl = new Uri(result); + } + catch (UriFormatException) + { + return null; + } + VmessItem server = new VmessItem + { + remarks = parsedUrl.GetComponents(UriComponents.Fragment, UriFormat.Unescaped), + address = parsedUrl.IdnHost, + port = parsedUrl.Port, + }; + + // parse base64 UserInfo + string rawUserInfo = parsedUrl.GetComponents(UriComponents.UserInfo, UriFormat.Unescaped); + string base64 = rawUserInfo.Replace('-', '+').Replace('_', '/'); // Web-safe base64 to normal base64 + string userInfo; + try + { + userInfo = Encoding.UTF8.GetString(Convert.FromBase64String( + base64.PadRight(base64.Length + (4 - base64.Length % 4) % 4, '='))); + } + catch (FormatException) + { + return null; + } + string[] userInfoParts = userInfo.Split(new char[] { ':' }, 2); + if (userInfoParts.Length != 2) + { + return null; + } + server.security = userInfoParts[0]; + server.id = userInfoParts[1]; + + NameValueCollection queryParameters = HttpUtility.ParseQueryString(parsedUrl.Query); + if (queryParameters["plugin"] != null) + { + return null; + } + + return server; + } + + private static readonly Regex UrlFinder = new Regex(@"ss://(?[A-Za-z0-9+-/=_]+)(?:#(?\S+))?", RegexOptions.IgnoreCase); + private static readonly Regex DetailsParser = new Regex(@"^((?.+?):(?.*)@(?.+?):(?\d+?))$", RegexOptions.IgnoreCase); + + private static VmessItem ResolveSSLegacy(string result) + { + var match = UrlFinder.Match(result); + if (!match.Success) + return null; + + VmessItem server = new VmessItem(); + var base64 = match.Groups["base64"].Value.TrimEnd('/'); + var tag = match.Groups["tag"].Value; + if (!Utils.IsNullOrEmpty(tag)) + { + server.remarks = Utils.UrlDecode(tag); + } + Match details; + try + { + details = DetailsParser.Match(Encoding.UTF8.GetString(Convert.FromBase64String( + base64.PadRight(base64.Length + (4 - base64.Length % 4) % 4, '=')))); + } + catch (FormatException) + { + return null; + } + if (!details.Success) + return null; + server.security = details.Groups["method"].Value; + server.id = details.Groups["password"].Value; + server.address = details.Groups["hostname"].Value; + server.port = int.Parse(details.Groups["port"].Value); + return server; + } + + + private static readonly Regex StdVmessUserInfo = new Regex( + @"^(?[a-z]+)(\+(?[a-z]+))?:(?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})-(?[0-9]+)$"); + + private static VmessItem ResolveStdVmess(string result) + { + VmessItem i = new VmessItem + { + configType = (int)EConfigType.Vmess, + security = "auto" + }; + + Uri u = new Uri(result); + + i.address = u.IdnHost; + i.port = u.Port; + i.remarks = u.GetComponents(UriComponents.Fragment, UriFormat.Unescaped); + var q = HttpUtility.ParseQueryString(u.Query); + + var m = StdVmessUserInfo.Match(u.UserInfo); + if (!m.Success) return null; + + i.id = m.Groups["id"].Value; + if (!int.TryParse(m.Groups["alterId"].Value, out int aid)) + { + return null; + } + i.alterId = aid; + + if (m.Groups["streamSecurity"].Success) + { + i.streamSecurity = m.Groups["streamSecurity"].Value; + } + switch (i.streamSecurity) + { + case "tls": + // TODO tls config + break; + default: + if (!string.IsNullOrWhiteSpace(i.streamSecurity)) + return null; + break; + } + + i.network = m.Groups["network"].Value; + switch (i.network) + { + case "tcp": + string t1 = q["type"] ?? "none"; + i.headerType = t1; + // TODO http option + + break; + case "kcp": + i.headerType = q["type"] ?? "none"; + // TODO kcp seed + break; + + case "ws": + string p1 = q["path"] ?? "/"; + string h1 = q["host"] ?? ""; + i.requestHost = Utils.UrlDecode(h1); + i.path = p1; + break; + + case "http": + case "h2": + i.network = "h2"; + string p2 = q["path"] ?? "/"; + string h2 = q["host"] ?? ""; + i.requestHost = Utils.UrlDecode(h2); + i.path = p2; + break; + + case "quic": + string s = q["security"] ?? "none"; + string k = q["key"] ?? ""; + string t3 = q["type"] ?? "none"; + i.headerType = t3; + i.requestHost = Utils.UrlDecode(s); + i.path = k; + break; + + default: + return null; + } + + return i; + } + + private static VmessItem ResolveStdVLESS(string result) + { + VmessItem item = new VmessItem + { + configType = (int)EConfigType.VLESS, + security = "none" + }; + + Uri url = new Uri(result); + + item.address = url.IdnHost; + item.port = url.Port; + item.remarks = url.GetComponents(UriComponents.Fragment, UriFormat.Unescaped); + item.id = url.UserInfo; + + var query = HttpUtility.ParseQueryString(url.Query); + + item.flow = query["flow"] ?? ""; + item.security = query["encryption"] ?? "none"; + item.streamSecurity = query["security"] ?? ""; + item.sni = query["sni"] ?? ""; + item.network = query["type"] ?? "tcp"; + switch (item.network) + { + case "tcp": + item.headerType = query["headerType"] ?? "none"; + item.requestHost = Utils.UrlDecode(query["host"] ?? ""); + + break; + case "kcp": + item.headerType = query["headerType"] ?? "none"; + item.path = Utils.UrlDecode(query["seed"] ?? ""); + break; + + case "ws": + item.requestHost = Utils.UrlDecode(query["host"] ?? ""); + item.path = Utils.UrlDecode(query["path"] ?? "/"); + break; + + case "http": + case "h2": + item.network = "h2"; + item.requestHost = Utils.UrlDecode(query["host"] ?? ""); + item.path = Utils.UrlDecode(query["path"] ?? "/"); + break; + + case "quic": + item.headerType = query["headerType"] ?? "none"; + item.requestHost = query["quicSecurity"] ?? "none"; + item.path = Utils.UrlDecode(query["key"] ?? ""); + break; + + default: + return null; + } + + return item; + } + + #endregion + } +} diff --git a/v2rayN/v2rayN/Handler/SpeedtestHandler.cs b/v2rayN/v2rayN/Handler/SpeedtestHandler.cs index 91523091..fb0bd5dd 100644 --- a/v2rayN/v2rayN/Handler/SpeedtestHandler.cs +++ b/v2rayN/v2rayN/Handler/SpeedtestHandler.cs @@ -289,7 +289,7 @@ namespace v2rayN.Handler { return "Timeout"; } - return string.Format("{0}{1}", time, unit).PadLeft(6, ' '); + return string.Format("{0}{1}", time, unit).PadLeft(8, ' '); } } } diff --git a/v2rayN/v2rayN/Handler/StatisticsHandler.cs b/v2rayN/v2rayN/Handler/StatisticsHandler.cs index ab4d4a6a..de013922 100644 --- a/v2rayN/v2rayN/Handler/StatisticsHandler.cs +++ b/v2rayN/v2rayN/Handler/StatisticsHandler.cs @@ -30,6 +30,7 @@ namespace v2rayN.Handler get; set; } + public List Statistic { get @@ -191,6 +192,25 @@ namespace v2rayN.Handler } } + public void ClearAllServerStatistics() + { + if (serverStatistics_ != null) + { + foreach (var item in serverStatistics_.server) + { + item.todayUp = 0; + item.todayDown = 0; + item.totalUp = 0; + item.totalDown = 0; + // update ui display to zero + updateFunc_(0, 0, new List { item }); + } + + // update statistic json file + SaveToFile(); + } + } + private ServerStatItem GetServerStatItem(string itemId) { long ticks = DateTime.Now.Date.Ticks; diff --git a/v2rayN/v2rayN/Handler/V2rayConfigHandler.cs b/v2rayN/v2rayN/Handler/V2rayConfigHandler.cs index 9ca18e61..bd4da3f0 100644 --- a/v2rayN/v2rayN/Handler/V2rayConfigHandler.cs +++ b/v2rayN/v2rayN/Handler/V2rayConfigHandler.cs @@ -1,13 +1,7 @@ using System; using System.Collections.Generic; -using System.Collections.Specialized; using System.IO; using System.Linq; -using System.Net; -using System.Text; -using System.Text.RegularExpressions; -using System.Web; -using v2rayN.Base; using v2rayN.Mode; namespace v2rayN.Handler @@ -84,7 +78,7 @@ namespace v2rayN.Handler // TODO: 统计配置 statistic(config, ref v2rayConfig); - Utils.ToJsonFile(v2rayConfig, fileName); + Utils.ToJsonFile(v2rayConfig, fileName, false); msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), config.getSummary()); } @@ -152,7 +146,7 @@ namespace v2rayN.Handler try { Inbounds inbound = v2rayConfig.inbounds[0]; - //端口 + inbound.tag = Global.InboundSocks; inbound.port = config.inbound[0].localPort; inbound.protocol = config.inbound[0].protocol; if (config.allowLANConn) @@ -163,9 +157,17 @@ namespace v2rayN.Handler { inbound.listen = Global.Loopback; } - //开启udp + //udp inbound.settings.udp = config.inbound[0].udpEnabled; inbound.sniffing.enabled = config.inbound[0].sniffingEnabled; + + //http + Inbounds inbound2 = v2rayConfig.inbounds[1]; + inbound2.tag = Global.InboundHttp; + inbound2.port = config.GetLocalPort(Global.InboundHttp); + inbound2.protocol = Global.InboundHttp; + inbound2.listen = inbound.listen; + inbound2.settings.allowTransparent = false; } catch { @@ -188,88 +190,26 @@ namespace v2rayN.Handler { v2rayConfig.routing.domainStrategy = config.domainStrategy; - //自定义 - //需代理 - routingUserRule(config.useragent, Global.agentTag, ref v2rayConfig); - //直连 - routingUserRule(config.userdirect, Global.directTag, ref v2rayConfig); - //阻止 - routingUserRule(config.userblock, Global.blockTag, ref v2rayConfig); - - - switch (config.routingMode) + if (config.enableRoutingAdvanced) { - case "0": - break; - case "1": - routingGeo("ip", "private", Global.directTag, ref v2rayConfig); - break; - case "2": - routingGeo("", "cn", Global.directTag, ref v2rayConfig); - break; - case "3": - routingGeo("ip", "private", Global.directTag, ref v2rayConfig); - routingGeo("", "cn", Global.directTag, ref v2rayConfig); - break; - } - - } - } - catch - { - } - return 0; - } - private static int routingUserRule(List userRule, string tag, ref V2rayConfig v2rayConfig) - { - try - { - if (userRule != null - && userRule.Count > 0) - { - //Domain - RulesItem rulesDomain = new RulesItem - { - type = "field", - outboundTag = tag, - domain = new List() - }; - - //IP - RulesItem rulesIP = new RulesItem - { - type = "field", - outboundTag = tag, - ip = new List() - }; - - foreach (string u in userRule) - { - string url = u.TrimEx(); - if (Utils.IsNullOrEmpty(url)) + if (config.routings != null && config.routingIndex < config.routings.Count) { - continue; - } - if (Utils.IsIP(url) || url.StartsWith("geoip:")) - { - rulesIP.ip.Add(url); - } - else if (Utils.IsDomain(url) - || url.StartsWith("geosite:") - || url.StartsWith("regexp:") - || url.StartsWith("domain:") - || url.StartsWith("full:")) - { - rulesDomain.domain.Add(url); + foreach (var item in config.routings[config.routingIndex].rules) + { + routingUserRule(item, ref v2rayConfig); + } } } - if (rulesDomain.domain.Count > 0) + else { - v2rayConfig.routing.rules.Add(rulesDomain); - } - if (rulesIP.ip.Count > 0) - { - v2rayConfig.routing.rules.Add(rulesIP); + var lockedItem = ConfigHandler.GetLockedRoutingItem(ref config); + if (lockedItem != null) + { + foreach (var item in lockedItem.rules) + { + routingUserRule(item, ref v2rayConfig); + } + } } } } @@ -278,38 +218,93 @@ namespace v2rayN.Handler } return 0; } - - - private static int routingGeo(string ipOrDomain, string code, string tag, ref V2rayConfig v2rayConfig) + private static int routingUserRule(RulesItem rules, ref V2rayConfig v2rayConfig) { try { - if (!Utils.IsNullOrEmpty(code)) + if (rules == null) { - //IP - if (ipOrDomain == "ip" || ipOrDomain == "") - { - RulesItem rulesItem = new RulesItem - { - type = "field", - outboundTag = Global.directTag, - ip = new List() - }; - rulesItem.ip.Add($"geoip:{code}"); + return 0; + } + if (Utils.IsNullOrEmpty(rules.port)) + { + rules.port = null; + } + if (rules.domain != null && rules.domain.Count == 0) + { + rules.domain = null; + } + if (rules.ip != null && rules.ip.Count == 0) + { + rules.ip = null; + } + if (rules.protocol != null && rules.protocol.Count == 0) + { + rules.protocol = null; + } - v2rayConfig.routing.rules.Add(rulesItem); + var hasDomainIp = false; + if (rules.domain != null && rules.domain.Count > 0) + { + var it = Utils.DeepCopy(rules); + it.ip = null; + it.type = "field"; + for (int k = 0; k < it.domain.Count; k++) + { + it.domain[k] = it.domain[k].Replace(Global.RoutingRuleComma, ","); } - - if (ipOrDomain == "domain" || ipOrDomain == "") + //if (Utils.IsNullOrEmpty(it.port)) + //{ + // it.port = null; + //} + //if (it.protocol != null && it.protocol.Count == 0) + //{ + // it.protocol = null; + //} + v2rayConfig.routing.rules.Add(it); + hasDomainIp = true; + } + if (rules.ip != null && rules.ip.Count > 0) + { + var it = Utils.DeepCopy(rules); + it.domain = null; + it.type = "field"; + //if (Utils.IsNullOrEmpty(it.port)) + //{ + // it.port = null; + //} + //if (it.protocol != null && it.protocol.Count == 0) + //{ + // it.protocol = null; + //} + v2rayConfig.routing.rules.Add(it); + hasDomainIp = true; + } + if (!hasDomainIp) + { + if (!Utils.IsNullOrEmpty(rules.port)) { - RulesItem rulesItem = new RulesItem - { - type = "field", - outboundTag = Global.directTag, - domain = new List() - }; - rulesItem.domain.Add($"geosite:{code}"); - v2rayConfig.routing.rules.Add(rulesItem); + var it = Utils.DeepCopy(rules); + //it.domain = null; + //it.ip = null; + //if (it.protocol != null && it.protocol.Count == 0) + //{ + // it.protocol = null; + //} + it.type = "field"; + v2rayConfig.routing.rules.Add(it); + } + else if (rules.protocol != null && rules.protocol.Count > 0) + { + var it = Utils.DeepCopy(rules); + //it.domain = null; + //it.ip = null; + //if (Utils.IsNullOrEmpty(it.port)) + //{ + // it.port = null; + //} + it.type = "field"; + v2rayConfig.routing.rules.Add(it); } } } @@ -389,7 +384,15 @@ namespace v2rayN.Handler serversItem.address = config.address(); serversItem.port = config.port(); serversItem.password = config.id(); - serversItem.method = config.security(); + if (Global.ssSecuritys.Contains(config.security())) + { + serversItem.method = config.security(); + } + else + { + serversItem.method = "none"; + } + serversItem.ota = false; serversItem.level = 1; @@ -470,7 +473,7 @@ namespace v2rayN.Handler usersItem.flow = string.Empty; usersItem.email = Global.userEMail; usersItem.encryption = config.security(); - + //Mux outbound.mux.enabled = config.muxEnabled; outbound.mux.concurrency = config.muxEnabled ? 8 : -1; @@ -488,9 +491,9 @@ namespace v2rayN.Handler } else { - usersItem.flow = config.flow(); + usersItem.flow = config.flow().Replace("splice", "direct"); } - + outbound.mux.enabled = false; outbound.mux.concurrency = -1; } @@ -550,6 +553,8 @@ namespace v2rayN.Handler //远程服务器底层传输配置 streamSettings.network = config.network(); string host = config.requestHost(); + string sni = config.sni(); + //if tls if (config.streamSecurity() == Global.StreamSecurity) { @@ -559,9 +564,13 @@ namespace v2rayN.Handler { allowInsecure = config.allowInsecure() }; - if (!string.IsNullOrWhiteSpace(host)) + if (!string.IsNullOrWhiteSpace(sni)) { - tlsSettings.serverName = host; + tlsSettings.serverName = sni; + } + else if (!string.IsNullOrWhiteSpace(host)) + { + tlsSettings.serverName = Utils.String2List(host)[0]; } streamSettings.tlsSettings = tlsSettings; } @@ -575,9 +584,13 @@ namespace v2rayN.Handler { allowInsecure = config.allowInsecure() }; - if (!string.IsNullOrWhiteSpace(host)) + if (!string.IsNullOrWhiteSpace(sni)) { - xtlsSettings.serverName = host; + xtlsSettings.serverName = sni; + } + else if (!string.IsNullOrWhiteSpace(host)) + { + xtlsSettings.serverName = Utils.String2List(host)[0]; } streamSettings.xtlsSettings = xtlsSettings; } @@ -625,7 +638,6 @@ namespace v2rayN.Handler case "ws": WsSettings wsSettings = new WsSettings { - connectionReuse = true }; string path = config.path(); @@ -680,16 +692,28 @@ namespace v2rayN.Handler streamSettings.quicSettings = quicsettings; if (config.streamSecurity() == Global.StreamSecurity) { - streamSettings.tlsSettings.serverName = config.address(); + if (!string.IsNullOrWhiteSpace(sni)) + { + streamSettings.tlsSettings.serverName = sni; + } + else + { + streamSettings.tlsSettings.serverName = config.address(); + } } break; + case "grpc": + var grpcSettings = new GrpcSettings(); + + grpcSettings.serviceName = config.path(); + streamSettings.grpcSettings = grpcSettings; + break; default: //tcp带http伪装 if (config.headerType().Equals(Global.TcpHeaderHttp)) { TcpSettings tcpSettings = new TcpSettings { - connectionReuse = true, header = new Header { type = config.headerType() @@ -746,21 +770,30 @@ namespace v2rayN.Handler { return 0; } - List servers = new List(); - string[] arrDNS = config.remoteDNS.Split(','); - foreach (string str in arrDNS) + var obj = Utils.ParseJson(config.remoteDNS); + if (obj != null && obj.ContainsKey("servers")) { - //if (Utils.IsIP(str)) - //{ - servers.Add(str); - //} + v2rayConfig.dns = obj; } - //servers.Add("localhost"); - v2rayConfig.dns = new Mode.Dns + else { - servers = servers - }; + List servers = new List(); + + string[] arrDNS = config.remoteDNS.Split(','); + foreach (string str in arrDNS) + { + //if (Utils.IsIP(str)) + //{ + servers.Add(str); + //} + } + //servers.Add("localhost"); + v2rayConfig.dns = new Mode.Dns + { + servers = servers + }; + } } catch { @@ -785,8 +818,8 @@ namespace v2rayN.Handler apiObj.services = services.ToList(); v2rayConfig.api = apiObj; - policySystemSetting.statsInboundDownlink = true; - policySystemSetting.statsInboundUplink = true; + policySystemSetting.statsOutboundDownlink = true; + policySystemSetting.statsOutboundUplink = true; policyObj.system = policySystemSetting; v2rayConfig.policy = policyObj; @@ -919,7 +952,7 @@ namespace v2rayN.Handler //传出设置 ServerOutbound(config, ref v2rayConfig); - Utils.ToJsonFile(v2rayConfig, fileName); + Utils.ToJsonFile(v2rayConfig, fileName, false); msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), config.getSummary()); } @@ -1297,176 +1330,6 @@ namespace v2rayN.Handler return vmessItem; } - /// - /// 从剪贴板导入URL - /// - /// - /// - /// - public static VmessItem ImportFromClipboardConfig(string clipboardData, out string msg) - { - msg = string.Empty; - VmessItem vmessItem = new VmessItem(); - - try - { - //载入配置文件 - string result = clipboardData.TrimEx();// Utils.GetClipboardData(); - if (Utils.IsNullOrEmpty(result)) - { - msg = UIRes.I18N("FailedReadConfiguration"); - return null; - } - - if (result.StartsWith(Global.vmessProtocol)) - { - int indexSplit = result.IndexOf("?"); - if (indexSplit > 0) - { - vmessItem = ResolveStdVmess(result) ?? ResolveVmess4Kitsunebi(result); - } - else - { - vmessItem.configType = (int)EConfigType.Vmess; - result = result.Substring(Global.vmessProtocol.Length); - result = Utils.Base64Decode(result); - - //转成Json - VmessQRCode vmessQRCode = Utils.FromJson(result); - if (vmessQRCode == null) - { - msg = UIRes.I18N("FailedConversionConfiguration"); - return null; - } - vmessItem.security = Global.DefaultSecurity; - vmessItem.network = Global.DefaultNetwork; - vmessItem.headerType = Global.None; - - - vmessItem.configVersion = Utils.ToInt(vmessQRCode.v); - vmessItem.remarks = Utils.ToString(vmessQRCode.ps); - vmessItem.address = Utils.ToString(vmessQRCode.add); - vmessItem.port = Utils.ToInt(vmessQRCode.port); - vmessItem.id = Utils.ToString(vmessQRCode.id); - vmessItem.alterId = Utils.ToInt(vmessQRCode.aid); - - if (!Utils.IsNullOrEmpty(vmessQRCode.net)) - { - vmessItem.network = vmessQRCode.net; - } - if (!Utils.IsNullOrEmpty(vmessQRCode.type)) - { - vmessItem.headerType = vmessQRCode.type; - } - - vmessItem.requestHost = Utils.ToString(vmessQRCode.host); - vmessItem.path = Utils.ToString(vmessQRCode.path); - vmessItem.streamSecurity = Utils.ToString(vmessQRCode.tls); - } - - ConfigHandler.UpgradeServerVersion(ref vmessItem); - } - else if (result.StartsWith(Global.ssProtocol)) - { - msg = UIRes.I18N("ConfigurationFormatIncorrect"); - - vmessItem = ResolveSSLegacy(result); - if (vmessItem == null) - { - vmessItem = ResolveSip002(result); - } - if (vmessItem == null) - { - return null; - } - if (vmessItem.address.Length == 0 || vmessItem.port == 0 || vmessItem.security.Length == 0 || vmessItem.id.Length == 0) - { - return null; - } - - vmessItem.configType = (int)EConfigType.Shadowsocks; - } - else if (result.StartsWith(Global.socksProtocol)) - { - msg = UIRes.I18N("ConfigurationFormatIncorrect"); - - vmessItem.configType = (int)EConfigType.Socks; - result = result.Substring(Global.socksProtocol.Length); - //remark - int indexRemark = result.IndexOf("#"); - if (indexRemark > 0) - { - try - { - vmessItem.remarks = WebUtility.UrlDecode(result.Substring(indexRemark + 1, result.Length - indexRemark - 1)); - } - catch { } - result = result.Substring(0, indexRemark); - } - //part decode - int indexS = result.IndexOf("@"); - if (indexS > 0) - { - } - else - { - result = Utils.Base64Decode(result); - } - - string[] arr1 = result.Split('@'); - if (arr1.Length != 2) - { - return null; - } - string[] arr21 = arr1[0].Split(':'); - //string[] arr22 = arr1[1].Split(':'); - int indexPort = arr1[1].LastIndexOf(":"); - if (arr21.Length != 2 || indexPort < 0) - { - return null; - } - vmessItem.address = arr1[1].Substring(0, indexPort); - vmessItem.port = Utils.ToInt(arr1[1].Substring(indexPort + 1, arr1[1].Length - (indexPort + 1))); - vmessItem.security = arr21[0]; - vmessItem.id = arr21[1]; - } - else if (result.StartsWith(Global.trojanProtocol)) - { - msg = UIRes.I18N("ConfigurationFormatIncorrect"); - - vmessItem.configType = (int)EConfigType.Trojan; - - Uri uri = new Uri(result); - vmessItem.address = uri.IdnHost; - vmessItem.port = uri.Port; - vmessItem.id = uri.UserInfo; - - var remarks = uri.Fragment.Replace("#", ""); - if (Utils.IsNullOrEmpty(remarks)) - { - vmessItem.remarks = "NONE"; - } - else - { - vmessItem.remarks = WebUtility.UrlDecode(remarks); - } - } - else - { - msg = UIRes.I18N("NonvmessOrssProtocol"); - return null; - } - } - catch - { - msg = UIRes.I18N("Incorrectconfiguration"); - return null; - } - - return vmessItem; - } - - /// /// 导出为客户端配置 /// @@ -1491,216 +1354,6 @@ namespace v2rayN.Handler return GenerateServerConfig(config, fileName, out msg); } - private static VmessItem ResolveVmess4Kitsunebi(string result) - { - VmessItem vmessItem = new VmessItem - { - configType = (int)EConfigType.Vmess - }; - result = result.Substring(Global.vmessProtocol.Length); - int indexSplit = result.IndexOf("?"); - if (indexSplit > 0) - { - result = result.Substring(0, indexSplit); - } - result = Utils.Base64Decode(result); - - string[] arr1 = result.Split('@'); - if (arr1.Length != 2) - { - return null; - } - string[] arr21 = arr1[0].Split(':'); - string[] arr22 = arr1[1].Split(':'); - if (arr21.Length != 2 || arr21.Length != 2) - { - return null; - } - - vmessItem.address = arr22[0]; - vmessItem.port = Utils.ToInt(arr22[1]); - vmessItem.security = arr21[0]; - vmessItem.id = arr21[1]; - - vmessItem.network = Global.DefaultNetwork; - vmessItem.headerType = Global.None; - vmessItem.remarks = "Alien"; - vmessItem.alterId = 0; - - return vmessItem; - } - - private static VmessItem ResolveSip002(string result) - { - Uri parsedUrl; - try - { - parsedUrl = new Uri(result); - } - catch (UriFormatException) - { - return null; - } - VmessItem server = new VmessItem - { - remarks = parsedUrl.GetComponents(UriComponents.Fragment, UriFormat.Unescaped), - address = parsedUrl.IdnHost, - port = parsedUrl.Port, - }; - - // parse base64 UserInfo - string rawUserInfo = parsedUrl.GetComponents(UriComponents.UserInfo, UriFormat.Unescaped); - string base64 = rawUserInfo.Replace('-', '+').Replace('_', '/'); // Web-safe base64 to normal base64 - string userInfo; - try - { - userInfo = Encoding.UTF8.GetString(Convert.FromBase64String( - base64.PadRight(base64.Length + (4 - base64.Length % 4) % 4, '='))); - } - catch (FormatException) - { - return null; - } - string[] userInfoParts = userInfo.Split(new char[] { ':' }, 2); - if (userInfoParts.Length != 2) - { - return null; - } - server.security = userInfoParts[0]; - server.id = userInfoParts[1]; - - NameValueCollection queryParameters = HttpUtility.ParseQueryString(parsedUrl.Query); - if (queryParameters["plugin"] != null) - { - return null; - } - - return server; - } - - private static readonly Regex UrlFinder = new Regex(@"ss://(?[A-Za-z0-9+-/=_]+)(?:#(?\S+))?", RegexOptions.IgnoreCase); - private static readonly Regex DetailsParser = new Regex(@"^((?.+?):(?.*)@(?.+?):(?\d+?))$", RegexOptions.IgnoreCase); - - private static VmessItem ResolveSSLegacy(string result) - { - var match = UrlFinder.Match(result); - if (!match.Success) - return null; - - VmessItem server = new VmessItem(); - var base64 = match.Groups["base64"].Value.TrimEnd('/'); - var tag = match.Groups["tag"].Value; - if (!tag.IsNullOrEmpty()) - { - server.remarks = HttpUtility.UrlDecode(tag, Encoding.UTF8); - } - Match details; - try - { - details = DetailsParser.Match(Encoding.UTF8.GetString(Convert.FromBase64String( - base64.PadRight(base64.Length + (4 - base64.Length % 4) % 4, '=')))); - } - catch (FormatException) - { - return null; - } - if (!details.Success) - return null; - server.security = details.Groups["method"].Value; - server.id = details.Groups["password"].Value; - server.address = details.Groups["hostname"].Value; - server.port = int.Parse(details.Groups["port"].Value); - return server; - } - - - private static readonly Regex StdVmessUserInfo = new Regex( - @"^(?[a-z]+)(\+(?[a-z]+))?:(?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})-(?[0-9]+)$"); - - private static VmessItem ResolveStdVmess(string result) - { - VmessItem i = new VmessItem - { - configType = (int)EConfigType.Vmess, - security = "auto" - }; - - Uri u = new Uri(result); - - i.address = u.IdnHost; - i.port = u.Port; - i.remarks = u.GetComponents(UriComponents.Fragment, UriFormat.Unescaped); - var q = HttpUtility.ParseQueryString(u.Query); - - var m = StdVmessUserInfo.Match(u.UserInfo); - if (!m.Success) return null; - - i.id = m.Groups["id"].Value; - if (!int.TryParse(m.Groups["alterId"].Value, out int aid)) - { - return null; - } - i.alterId = aid; - - if (m.Groups["streamSecurity"].Success) - { - i.streamSecurity = m.Groups["streamSecurity"].Value; - } - switch (i.streamSecurity) - { - case "tls": - // TODO tls config - break; - default: - if (!string.IsNullOrWhiteSpace(i.streamSecurity)) - return null; - break; - } - - i.network = m.Groups["network"].Value; - switch (i.network) - { - case "tcp": - string t1 = q["type"] ?? "none"; - i.headerType = t1; - // TODO http option - - break; - case "kcp": - i.headerType = q["type"] ?? "none"; - // TODO kcp seed - break; - - case "ws": - string p1 = q["path"] ?? "/"; - string h1 = q["host"] ?? ""; - i.requestHost = h1; - i.path = p1; - break; - - case "http": - i.network = "h2"; - string p2 = q["path"] ?? "/"; - string h2 = q["host"] ?? ""; - i.requestHost = h2; - i.path = p2; - break; - - case "quic": - string s = q["security"] ?? "none"; - string k = q["key"] ?? ""; - string t3 = q["type"] ?? "none"; - i.headerType = t3; - i.requestHost = s; - i.path = k; - break; - - default: - return null; - } - - return i; - } #endregion #region Gen speedtest config @@ -1742,7 +1395,7 @@ namespace v2rayN.Handler //routing(config, ref v2rayConfig); dns(configCopy, ref v2rayConfig); - v2rayConfig.inbounds.RemoveAt(0); // Remove "proxy" service for speedtest, avoiding port conflicts. + v2rayConfig.inbounds.Clear(); // Remove "proxy" service for speedtest, avoiding port conflicts. int httpPort = configCopy.GetLocalPort("speedtest"); foreach (int index in selecteds) diff --git a/v2rayN/v2rayN/Handler/V2rayHandler.cs b/v2rayN/v2rayN/Handler/V2rayHandler.cs index cc6c404e..95951b5e 100644 --- a/v2rayN/v2rayN/Handler/V2rayHandler.cs +++ b/v2rayN/v2rayN/Handler/V2rayHandler.cs @@ -22,17 +22,13 @@ namespace v2rayN.Handler { private static string v2rayConfigRes = Global.v2rayConfigFileName; private List lstV2ray; + private string coreUrl; public event ProcessDelegate ProcessEvent; //private int processId = 0; private Process _process; public V2rayHandler() { - lstV2ray = new List - { - "wv2ray", - "v2ray" - }; } /// @@ -40,6 +36,24 @@ namespace v2rayN.Handler /// public void LoadV2ray(Config config) { + if (config.coreType == ECoreType.v2fly_core) + { + lstV2ray = new List + { + "wv2ray", + "v2ray" + }; + coreUrl = Global.v2flyCoreUrl; + } + else + { + lstV2ray = new List + { + "xray" + }; + coreUrl = Global.xrayCoreUrl; + } + if (Global.reloadV2ray) { string fileName = Utils.GetPath(v2rayConfigRes); @@ -158,10 +172,11 @@ namespace v2rayN.Handler } } - private string V2rayFindexe() { + private string V2rayFindexe() + { //查找v2ray文件是否存在 string fileName = string.Empty; - lstV2ray.Reverse(); + //lstV2ray.Reverse(); foreach (string name in lstV2ray) { string vName = string.Format("{0}.exe", name); @@ -174,7 +189,7 @@ namespace v2rayN.Handler } if (Utils.IsNullOrEmpty(fileName)) { - string msg = string.Format(UIRes.I18N("NotFoundCore"), @"https://github.com/v2fly/v2ray-core/releases"); + string msg = string.Format(UIRes.I18N("NotFoundCore"), coreUrl); ShowMsg(false, msg); } return fileName; @@ -317,6 +332,6 @@ namespace v2rayN.Handler { Utils.SaveLog(ex.Message, ex); } - } + } } } diff --git a/v2rayN/v2rayN/HttpProxyHandler/HttpProxyHandle.cs b/v2rayN/v2rayN/HttpProxyHandler/HttpProxyHandle.cs index 0236c5a8..cab3c055 100644 --- a/v2rayN/v2rayN/HttpProxyHandler/HttpProxyHandle.cs +++ b/v2rayN/v2rayN/HttpProxyHandler/HttpProxyHandle.cs @@ -10,23 +10,20 @@ namespace v2rayN.HttpProxyHandler { noHttpProxy = 0, GlobalHttp = 1, - GlobalPac = 2, - HttpOpenAndClear = 3, - PacOpenAndClear = 4, - HttpOpenOnly = 5, - PacOpenOnly = 6 + HttpOpenAndClear = 2, + HttpOpenOnly = 3, } /// /// 系统代理(http)总处理 /// 启动privoxy提供http协议 - /// 设置IE系统代理或者PAC模式 + /// 设置IE系统代理 /// class HttpProxyHandle { private static bool Update(Config config, bool forceDisable) { - ListenerType type = config.listenerType; - + // ListenerType type = config.listenerType; + var type = ListenerType.noHttpProxy; if (forceDisable) { type = ListenerType.noHttpProxy; @@ -43,47 +40,21 @@ namespace v2rayN.HttpProxyHandler } if (type == ListenerType.GlobalHttp) { - //PACServerHandle.Stop(); //ProxySetting.SetProxy($"{Global.Loopback}:{port}", Global.IEProxyExceptions, 2); SysProxyHandle.SetIEProxy(true, true, $"{Global.Loopback}:{port}"); } - else if (type == ListenerType.GlobalPac) - { - string pacUrl = GetPacUrl(); - //ProxySetting.SetProxy(pacUrl, "", 4); - SysProxyHandle.SetIEProxy(true, false, pacUrl); - //PACServerHandle.Stop(); - PACServerHandle.Init(config); - } else if (type == ListenerType.HttpOpenAndClear) { - //PACServerHandle.Stop(); SysProxyHandle.ResetIEProxy(); } - else if (type == ListenerType.PacOpenAndClear) - { - string pacUrl = GetPacUrl(); - SysProxyHandle.ResetIEProxy(); - //PACServerHandle.Stop(); - PACServerHandle.Init(config); - } else if (type == ListenerType.HttpOpenOnly) { - //PACServerHandle.Stop(); //SysProxyHandle.ResetIEProxy(); } - else if (type == ListenerType.PacOpenOnly) - { - string pacUrl = GetPacUrl(); - //SysProxyHandle.ResetIEProxy(); - //PACServerHandle.Stop(); - PACServerHandle.Init(config); - } } else { SysProxyHandle.ResetIEProxy(); - //PACServerHandle.Stop(); } } catch (Exception ex) @@ -110,7 +81,6 @@ namespace v2rayN.HttpProxyHandler Global.sysAgent = true; Global.socksPort = localPort; Global.httpPort = PrivoxyHandler.Instance.RunningPort; - Global.pacPort = config.GetLocalPort("pac"); } } } @@ -127,10 +97,10 @@ namespace v2rayN.HttpProxyHandler { try { - if (config.listenerType != ListenerType.HttpOpenOnly && config.listenerType != ListenerType.PacOpenOnly) - { - Update(config, true); - } + //if (config.listenerType != ListenerType.HttpOpenOnly) + //{ + // Update(config, true); + //} PrivoxyHandler.Instance.Stop(); @@ -151,11 +121,11 @@ namespace v2rayN.HttpProxyHandler public static void RestartHttpAgent(Config config, bool forced) { bool isRestart = false; - if (config.listenerType == ListenerType.noHttpProxy) - { - // 关闭http proxy时,直接返回 - return; - } + //if (config.listenerType == ListenerType.noHttpProxy) + //{ + // // 关闭http proxy时,直接返回 + // return; + //} //强制重启或者socks端口变化 if (forced) { @@ -177,10 +147,40 @@ namespace v2rayN.HttpProxyHandler Update(config, false); } - public static string GetPacUrl() + public static bool UpdateSysProxy(Config config, bool forceDisable) { - string pacUrl = $"http://{Global.Loopback}:{Global.pacPort}/pac/?t={ DateTime.Now.ToString("HHmmss")}"; - return pacUrl; + var type = config.sysProxyType; + + if (forceDisable) + { + type = ESysProxyType.ForcedClear; + } + + try + { + Global.httpPort = config.GetLocalPort(Global.InboundHttp); + int port = Global.httpPort; + if (port <= 0) + { + return false; + } + if (type == ESysProxyType.ForcedChange) + { + SysProxyHandle.SetIEProxy(true, true, $"{Global.Loopback}:{port}"); + } + else if (type == ESysProxyType.ForcedClear) + { + SysProxyHandle.ResetIEProxy(); + } + else if (type == ESysProxyType.Unchanged) + { + } + } + catch (Exception ex) + { + Utils.SaveLog(ex.Message, ex); + } + return true; } } } diff --git a/v2rayN/v2rayN/HttpProxyHandler/PACServerHandle.cs b/v2rayN/v2rayN/HttpProxyHandler/PACServerHandle.cs deleted file mode 100644 index 23bf8087..00000000 --- a/v2rayN/v2rayN/HttpProxyHandler/PACServerHandle.cs +++ /dev/null @@ -1,209 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using v2rayN.Mode; -using v2rayN.Properties; -using v2rayN.Tool; -using v2rayN.Base; - -namespace v2rayN.HttpProxyHandler -{ - /// - /// 提供PAC功能支持 - /// - class PACServerHandle - { - private static int pacPort = 0; - private static HttpWebServer server; - private static HttpWebServerB serverB; - private static Config _config; - - public static bool IsRunning - { - get - { - return (pacPort > 0); - } - } - - public static void Init(Config config) - { - _config = config; - Global.pacPort = config.GetLocalPort("pac"); - - if (InitServer("*")) - { - pacPort = Global.pacPort; - } - //else if (InitServer(Global.Loopback)) - //{ - // pacPort = Global.pacPort; - //} - else if (InitServerB(Global.Loopback)) - { - pacPort = Global.pacPort; - } - else - { - Utils.SaveLog("Webserver init failed "); - pacPort = 0; - } - } - - private static bool InitServer(string address) - { - try - { - if (pacPort != Global.pacPort) - { - if (server != null) - { - server.Stop(); - server = null; - } - - if (server == null) - { - string prefixes = string.Format("http://{0}:{1}/pac/", address, Global.pacPort); - Utils.SaveLog("Webserver prefixes " + prefixes); - - server = new HttpWebServer(SendResponse, prefixes); - server.Run(); - - } - } - Utils.SaveLog("Webserver at " + address); - } - catch (Exception ex) - { - Utils.SaveLog("Webserver InitServer " + ex.Message); - return false; - } - return true; - } - - public static bool InitServerB(string address) - { - try - { - if (pacPort != Global.pacPort) - { - if (serverB != null) - { - serverB.Stop(); - serverB = null; - } - - if (serverB == null) - { - serverB = new HttpWebServerB(Global.pacPort, SendResponse); - } - } - Utils.SaveLog("WebserverB at " + address); - } - catch (Exception ex) - { - Utils.SaveLog("WebserverB InitServer " + ex.Message); - return false; - } - return true; - } - - public static string SendResponse(string address) - { - try - { - string pac = GetPacList(address); - return pac; - } - catch (Exception ex) - { - Utils.SaveLog("Webserver SendResponse " + ex.Message); - return ex.Message; - } - } - - public static void Stop() - { - try - { - if (server != null) - { - server.Stop(); - server = null; - } - if (serverB != null) - { - serverB.Stop(); - serverB = null; - } - } - catch (Exception ex) - { - Utils.SaveLog("Webserver Stop " + ex.Message); - } - - //try - //{ - // if (httpWebServer == null) - // { - // return; - // } - // foreach (var key in httpWebServer.Keys) - // { - // Utils.SaveLog("Webserver Stop " + key.ToString()); - // ((HttpWebServer)httpWebServer[key]).Stop(); - // } - // httpWebServer.Clear(); - //} - //catch (Exception ex) - //{ - // Utils.SaveLog("Webserver Stop " + ex.Message); - //} - } - - private static string GetPacList(string address) - { - int port = Global.httpPort; - if (port <= 0) - { - return "No port"; - } - try - { - List lstProxy = new List - { - string.Format("PROXY {0}:{1};", address, port) - }; - string proxy = string.Join("", lstProxy.ToArray()); - - string strPacfile = Utils.GetPath(Global.pacFILE); - if (!File.Exists(strPacfile)) - { - FileManager.UncompressFile(strPacfile, Resources.pac_txt); - } - string pac = File.ReadAllText(strPacfile, Encoding.UTF8); - pac = pac.Replace("__PROXY__", proxy); - - if (_config.userPacRule.Count > 0) - { - string keyWords = "var rules = ["; - if (pac.IndexOf(keyWords) >= 0) - { - string userPac = string.Join($"\",{Environment.NewLine}\"", _config.userPacRule.ToArray()); - userPac = string.Format("\"{0}\",", userPac); - pac = pac.Replace(keyWords, keyWords + userPac); - } - } - - return pac; - } - catch - { - } - return "No pac content"; - } - - } -} diff --git a/v2rayN/v2rayN/HttpProxyHandler/PrivoxyHandler.cs b/v2rayN/v2rayN/HttpProxyHandler/PrivoxyHandler.cs index f738a318..a49e2d04 100644 --- a/v2rayN/v2rayN/HttpProxyHandler/PrivoxyHandler.cs +++ b/v2rayN/v2rayN/HttpProxyHandler/PrivoxyHandler.cs @@ -74,7 +74,7 @@ namespace v2rayN.HttpProxyHandler if (_process == null) { - string privoxyConfig = Resources.privoxy_conf; + string privoxyConfig = "";//Resources.privoxy_conf; RunningPort = config.GetLocalPort(Global.InboundHttp); privoxyConfig = privoxyConfig.Replace("__SOCKS_PORT__", localPort.ToString()); privoxyConfig = privoxyConfig.Replace("__PRIVOXY_BIND_PORT__", RunningPort.ToString()); diff --git a/v2rayN/v2rayN/Mode/ComboItem.cs b/v2rayN/v2rayN/Mode/ComboItem.cs new file mode 100644 index 00000000..e69373ef --- /dev/null +++ b/v2rayN/v2rayN/Mode/ComboItem.cs @@ -0,0 +1,14 @@ +namespace v2rayN.Mode +{ + class ComboItem + { + public int ID + { + get; set; + } + public string Text + { + get; set; + } + } +} diff --git a/v2rayN/v2rayN/Mode/Config.cs b/v2rayN/v2rayN/Mode/Config.cs index fb737942..90189fe9 100644 --- a/v2rayN/v2rayN/Mode/Config.cs +++ b/v2rayN/v2rayN/Mode/Config.cs @@ -60,46 +60,6 @@ namespace v2rayN.Mode get; set; } - /// - /// 域名解析策略 - /// - public string domainStrategy - { - get; set; - } - - /// - /// 路由模式 - /// - public string routingMode - { - get; set; - } - - /// - /// 用户自定义需代理的网址或ip - /// - public List useragent - { - get; set; - } - - /// - /// 用户自定义直连的网址或ip - /// - public List userdirect - { - get; set; - } - - /// - /// 用户自定义阻止的网址或ip - /// - public List userblock - { - get; set; - } - /// /// KcpItem /// @@ -109,9 +69,9 @@ namespace v2rayN.Mode } /// - /// 监听状态 + /// /// - public ListenerType listenerType + public ESysProxyType sysProxyType { get; set; } @@ -130,13 +90,6 @@ namespace v2rayN.Mode { get; set; } - /// - /// 自定义GFWList url - /// - public string urlGFWList - { - get; set; - } /// /// 允许来自局域网的连接 @@ -201,8 +154,31 @@ namespace v2rayN.Mode { get; set; } + /// + /// 域名解析策略 + /// + public string domainStrategy + { + get; set; + } + public int routingIndex + { + get; set; + } + public List routings + { + get; set; + } + public bool enableRoutingAdvanced + { + get; set; + } - public List userPacRule + public ECoreType coreType + { + get; set; + } + public bool ignoreGeoUpdateCore { get; set; } @@ -317,10 +293,7 @@ namespace v2rayN.Mode { return GetLocalPort(Global.InboundSocks) + 1; } - else if (protocol == "pac") - { - return GetLocalPort(Global.InboundSocks) + 2; - } + else if (protocol == "speedtest") { return GetLocalPort(Global.InboundSocks) + 103; @@ -373,6 +346,14 @@ namespace v2rayN.Mode } return vmess[index].flow.TrimEx(); } + public string sni() + { + if (index < 0) + { + return string.Empty; + } + return vmess[index].sni.TrimEx(); + } #endregion } @@ -599,6 +580,13 @@ namespace v2rayN.Mode { get; set; } + /// + /// tls sni + /// + public string sni + { + get; set; + } } [Serializable] diff --git a/v2rayN/v2rayN/Mode/ECoreType.cs b/v2rayN/v2rayN/Mode/ECoreType.cs new file mode 100644 index 00000000..3076b8b7 --- /dev/null +++ b/v2rayN/v2rayN/Mode/ECoreType.cs @@ -0,0 +1,9 @@ + +namespace v2rayN.Mode +{ + public enum ECoreType + { + v2fly_core = 0, + Xray_core = 1 + } +} diff --git a/v2rayN/v2rayN/Mode/ESysProxyType.cs b/v2rayN/v2rayN/Mode/ESysProxyType.cs new file mode 100644 index 00000000..7e33357e --- /dev/null +++ b/v2rayN/v2rayN/Mode/ESysProxyType.cs @@ -0,0 +1,10 @@ + +namespace v2rayN.Mode +{ + public enum ESysProxyType + { + ForcedClear = 0, + ForcedChange = 1, + Unchanged = 2 + } +} diff --git a/v2rayN/v2rayN/Mode/RoutingItem.cs b/v2rayN/v2rayN/Mode/RoutingItem.cs new file mode 100644 index 00000000..2344e227 --- /dev/null +++ b/v2rayN/v2rayN/Mode/RoutingItem.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace v2rayN.Mode +{ + [Serializable] + public class RoutingItem + { + public string remarks + { + get; set; + } + public string url + { + get; set; + } + public List rules + { + get; set; + } + public bool enabled { get; set; } = true; + + public bool locked + { + get; set; + } + + } +} diff --git a/v2rayN/v2rayN/Mode/RulesItem.cs b/v2rayN/v2rayN/Mode/RulesItem.cs new file mode 100644 index 00000000..738a889f --- /dev/null +++ b/v2rayN/v2rayN/Mode/RulesItem.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace v2rayN.Mode +{ + [Serializable] + public class RulesItem + { + public string type { get; set; } + + public string port { get; set; } + + public List inboundTag { get; set; } + + public string outboundTag { get; set; } + + public List ip { get; set; } + + public List domain { get; set; } + + public List protocol { get; set; } + + } + +} diff --git a/v2rayN/v2rayN/Mode/V2rayConfig.cs b/v2rayN/v2rayN/Mode/V2rayConfig.cs index 9f0cbf1f..c52957e9 100644 --- a/v2rayN/v2rayN/Mode/V2rayConfig.cs +++ b/v2rayN/v2rayN/Mode/V2rayConfig.cs @@ -35,7 +35,7 @@ namespace v2rayN.Mode /// /// DNS 配置 /// - public Dns dns { get; set; } + public object dns { get; set; } /// /// 路由配置 /// @@ -57,8 +57,8 @@ namespace v2rayN.Mode public class SystemPolicy { - public bool statsInboundUplink; - public bool statsInboundDownlink; + public bool statsOutboundUplink; + public bool statsOutboundDownlink; } public class Log @@ -138,7 +138,9 @@ namespace v2rayN.Mode /// VLESS /// public string decryption { get; set; } - + + public bool allowTransparent { get; set; } + } public class UsersItem @@ -321,34 +323,6 @@ namespace v2rayN.Mode public List servers { get; set; } } - public class RulesItem - { - /// - /// - /// - public string type { get; set; } - /// - /// - /// - public string port { get; set; } - - public List inboundTag { get; set; } - /// - /// - /// - public string outboundTag { get; set; } - - /// - /// - /// - public List ip { get; set; } - - /// - /// - /// - public List domain { get; set; } - } - public class Routing { /// @@ -403,6 +377,10 @@ namespace v2rayN.Mode /// VLESS xtls /// public TlsSettings xtlsSettings { get; set; } + /// + /// grpc + /// + public GrpcSettings grpcSettings { get; set; } } @@ -420,11 +398,7 @@ namespace v2rayN.Mode } public class TcpSettings - { - /// - /// 是否重用 TCP 连接 - /// - public bool connectionReuse { get; set; } + { /// /// 数据包头部伪装设置 /// @@ -488,12 +462,7 @@ namespace v2rayN.Mode } public class WsSettings - { - /// - /// - /// - public bool connectionReuse { get; set; } - + { /// /// /// @@ -543,4 +512,12 @@ namespace v2rayN.Mode public Header header { get; set; } } + public class GrpcSettings + { + /// + /// + /// + public string serviceName { get; set; } + } + } diff --git a/v2rayN/v2rayN/Mode/VmessQRCode.cs b/v2rayN/v2rayN/Mode/VmessQRCode.cs index 0a9cc8ab..32fdbbd1 100644 --- a/v2rayN/v2rayN/Mode/VmessQRCode.cs +++ b/v2rayN/v2rayN/Mode/VmessQRCode.cs @@ -49,5 +49,9 @@ namespace v2rayN.Mode /// 底层传输安全 /// public string tls { get; set; } = string.Empty; - } + /// + /// SNI + /// + public string sni { get; set; } = string.Empty; + } } diff --git a/v2rayN/v2rayN/Properties/AssemblyInfo.cs b/v2rayN/v2rayN/Properties/AssemblyInfo.cs index fa240436..705703f6 100644 --- a/v2rayN/v2rayN/Properties/AssemblyInfo.cs +++ b/v2rayN/v2rayN/Properties/AssemblyInfo.cs @@ -32,4 +32,4 @@ using System.Runtime.InteropServices; // 方法是按如下所示使用“*”: //[assembly: AssemblyVersion("1.0.*")] //[assembly: AssemblyVersion("1.0.0")] -[assembly: AssemblyFileVersion("3.26")] +[assembly: AssemblyFileVersion("4.13")] diff --git a/v2rayN/v2rayN/Properties/Resources.Designer.cs b/v2rayN/v2rayN/Properties/Resources.Designer.cs index f21638d7..672c250f 100644 --- a/v2rayN/v2rayN/Properties/Resources.Designer.cs +++ b/v2rayN/v2rayN/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace v2rayN.Properties { // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen // (以 /str 作为命令选项),或重新生成 VS 项目。 - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { @@ -70,16 +70,6 @@ namespace v2rayN.Properties { } } - /// - /// 查找 System.Byte[] 类型的本地化资源。 - /// - internal static byte[] abp_js { - get { - object obj = ResourceManager.GetObject("abp_js", resourceCulture); - return ((byte[])(obj)); - } - } - /// /// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// @@ -130,33 +120,6 @@ namespace v2rayN.Properties { } } - /// - /// 查找 System.Byte[] 类型的本地化资源。 - /// - internal static byte[] pac_txt { - get { - object obj = ResourceManager.GetObject("pac_txt", resourceCulture); - return ((byte[])(obj)); - } - } - - /// - /// 查找类似 listen-address __PRIVOXY_BIND_IP__:__PRIVOXY_BIND_PORT__ - ///toggle 0 - ///logfile v2ray_privoxy.log - ///show-on-task-bar 0 - ///activity-animation 0 - ///forward-socks5 / 127.0.0.1:__SOCKS_PORT__ . - ///max-client-connections 2048 - ///hide-console - /// 的本地化字符串。 - /// - internal static string privoxy_conf { - get { - return ResourceManager.GetString("privoxy_conf", resourceCulture); - } - } - /// /// 查找 System.Byte[] 类型的本地化资源。 /// diff --git a/v2rayN/v2rayN/Properties/Resources.resx b/v2rayN/v2rayN/Properties/Resources.resx index 706454a0..2ffcd3a9 100644 --- a/v2rayN/v2rayN/Properties/Resources.resx +++ b/v2rayN/v2rayN/Properties/Resources.resx @@ -151,21 +151,12 @@ ..\resources\sysproxy64.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\resources\privoxy_conf.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;gb2312 - ..\Resources\minimize.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\pac.txt.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - ..\resources\help.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\abp.js.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - ..\resources\share.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/v2rayN/v2rayN/Resources/abp.js.gz b/v2rayN/v2rayN/Resources/abp.js.gz deleted file mode 100644 index 0577c7f5..00000000 Binary files a/v2rayN/v2rayN/Resources/abp.js.gz and /dev/null differ diff --git a/v2rayN/v2rayN/Resources/pac.txt b/v2rayN/v2rayN/Resources/pac.txt deleted file mode 100644 index 6695b760..00000000 --- a/v2rayN/v2rayN/Resources/pac.txt +++ /dev/null @@ -1,7614 +0,0 @@ -// Generated by gfwlist2pac in precise mode -// https://github.com/clowwindy/gfwlist2pac - -var proxy = "__PROXY__"; - -var rules = [ - "|http://85.17.73.31/", - "||agnesb.fr", - "||akiba-web.com", - "||altrec.com", - "||angela-merkel.de", - "||angola.org", - "||apartmentratings.com", - "||apartments.com", - "||arena.taipei", - "||asianspiss.com", - "||assimp.org", - "||athenaeizou.com", - "||azubu.tv", - "||bankmobilevibe.com", - "||banorte.com", - "||bash-hackers.org", - "||beeg.com", - "||global.bing.com", - "||bloombergview.com", - "||booktopia.com.au", - "||boysmaster.com", - "||bynet.co.il", - "||carfax.com", - ".casinobellini.com", - "||casinobellini.com", - "||centauro.com.br", - "||chobit.cc", - "||clearsurance.com", - "||images.comico.tw", - "||static.comico.tw", - "||counter.social", - "||costco.com", - "||crossfire.co.kr", - "||d2pass.com", - "||darpa.mil", - "||dawangidc.com", - "||deezer.com", - "||desipro.de", - "||dingchin.com.tw", - "||discordapp.com", - "||discordapp.net", - "||dish.com", - "|http://img.dlsite.jp/", - "||dm530.net", - "share.dmhy.org", - "||dmhy.org", - "||dmm.co.jp", - "|http://www.dmm.com/netgame", - "||dnvod.tv", - "||dvdpac.com", - "||eesti.ee", - "||esurance.com", - ".expekt.com", - "||expekt.com", - ".extmatrix.com", - "||extmatrix.com", - "||fakku.net", - "||fastpic.ru", - "||filesor.com", - "||financetwitter.com", - "||flipboard.com", - "||flitto.com", - "||fnac.be", - "||fnac.com", - "||funkyimg.com", - "||fxnetworks.com", - "||g-area.org", - "||gettyimages.com", - "||getuploader.com", - "|https://raw.githubusercontent.com/programthink/zhao", - "||glass8.eu", - "||glype.com", - "||go141.com", - "||guo.media", - "||hautelook.com", - "||hautelookcdn.com", - "||wego.here.com", - "||gamer-cds.cdn.hinet.net", - "||gamer2-cds.cdn.hinet.net", - "||hmvdigital.ca", - "||hmvdigital.com", - "||homedepot.com", - "||hoovers.com", - "||hulu.com", - "||huluim.com", - "|http://secure.hustler.com", - "|http://hustlercash.com", - "|http://www.hustlercash.com", - "||hybrid-analysis.com", - "||cdn*.i-scmp.com", - "||ilovelongtoes.com", - "|http://imgmega.com/*.gif.html", - "|http://imgmega.com/*.jpg.html", - "|http://imgmega.com/*.jpeg.html", - "|http://imgmega.com/*.png.html", - "||imlive.com", - "||tw.iqiyi.com", - "||javhub.net", - "||javhuge.com", - ".javlibrary.com", - "||javlibrary.com", - "||jcpenney.com", - "||jims.net", - "||jukujo-club.com", - "||juliepost.com", - "||kawaiikawaii.jp", - "||kendatire.com", - "||khatrimaza.org", - "||kkbox.com", - "||leisurepro.com", - "||lifemiles.com", - "||longtoes.com", - "||lovetvshow.com", - "|http://www.m-sport.co.uk", - "||macgamestore.com", - "||madonna-av.com", - "||mangafox.com", - "||mangafox.me", - "||manta.com", - "||matome-plus.com", - "||matome-plus.net", - "||mattwilcox.net", - "||metarthunter.com", - "||mfxmedia.com", - "||mojim.com", - "||kb.monitorware.com", - "||monster.com", - "||moodyz.com", - "||moonbingo.com", - "||mos.ru", - "||msha.gov", - "||muzu.tv", - "||mvg.jp", - ".mybet.com", - "||mybet.com", - "||nationwide.com", - "|http://www.nbc.com/live", - "||neo-miracle.com", - "||netflix.com", - "||nflximg.com", - "||nflximg.net", - "||nflxext.com", - "||nflxso.net", - "||nflxvideo.net", - "||nic.gov", - "|http://mo.nightlife141.com", - "||nordstrom.com", - "||nordstromimage.com", - "||nordstromrack.com", - "||nottinghampost.com", - "||npsboost.com", - "||ntdtv.cz", - "||s1.nudezz.com", - "||nusatrip.com", - "||nuuvem.com", - "||omni7.jp", - "||onapp.com", - "||ontrac.com", - "@@|http://blog.ontrac.com", - "||pandora.com", - ".pandora.tv", - "||parkansky.com", - "||phmsociety.org", - "|http://*.pimg.tw/", - "||pure18.com", - "||pytorch.org", - "||qq.co.za", - "||r18.com", - "|http://radiko.jp", - "||ramcity.com.au", - "||rd.com", - "||rdio.com", - "|https://riseup.net", - "||sadistic-v.com", - "||isc.sans.edu", - "|http://cdn*.search.xxx/", - "||shiksha.com", - "||slacker.com", - "||sm-miracle.com", - "||soylentnews.org", - "||spotify.com", - "||spreadshirt.es", - "||springboardplatform.com", - "||sprite.org", - "@@|http://store.sprite.org", - "||superokayama.com", - "||superpages.com", - "||swagbucks.com", - "||switch1.jp", - "||tapanwap.com", - "||gsp.target.com", - "||login.target.com", - "||rcam.target.com", - "||thinkgeek.com", - "||thebodyshop-usa.com", - "||tma.co.jp", - "||tracfone.com", - "||tryheart.jp", - "||turntable.fm", - "||twerkingbutt.com", - "||ulop.net", - "||uukanshu.com", - "||vegasred.com", - "||vevo.com", - "||vip-enterprise.com", - "|http://viu.tv/ch/", - "|http://viu.tv/encore/", - "||vmpsoft.com", - "|http://ecsm.vs.com/", - "||wanz-factory.com", - "||ssl.webpack.de", - "||wheretowatch.com", - "||wingamestore.com", - "||wizcrafts.net", - "||vod.wwe.com", - "||xfinity.com", - "||youwin.com", - "||ytn.co.kr", - "||zattoo.com", - "||zim.vn", - "||zozotown.com", - "14.102.250.18", - "14.102.250.19", - "50.7.31.230:8898", - "174.142.105.153", - "69.65.19.160", - "||xn--4gq171p.com", - "||xn--czq75pvv1aj5c.org", - "||xn--i2ru8q2qg.com", - "||xn--oiq.cc", - "||xn--p8j9a0d9c9a.xn--q9jyb4c", - "||abebooks.com", - "|https://*.s3.amazonaws.com", - "||s3-ap-southeast-2.amazonaws.com", - "||43110.cf", - "||9gag.com", - "||agro.hk", - "||share.america.gov", - "||apkmirror.com", - "||arte.tv", - "||artstation.com", - "||bangdream.space", - "||behance.net", - "||bird.so", - "||zh.bitterwinter.org", - "||bnn.co", - "||businessinsider.com", - "||boomssr.com", - "||bwgyhw.com", - "||castbox.fm", - "||chinatimes.com", - "||clyp.it", - "||cmcn.org", - "||cmx.im", - "||dailyview.tw", - "||daum.net", - "||depositphotos.com", - "||disconnect.me", - "||documentingreality.com", - "||doubibackup.com", - "||doubmirror.cf", - "||encyclopedia.com", - "||fangeqiang.com", - "||fanqiangdang.com", - "||cloud.feedly.com", - "||feedx.net", - "||flyzy2005.com", - "||foreignpolicy.com", - "||free-ss.site", - "||freehongkong.org", - "||blog.fuckgfw233.org", - "||g0v.social", - "||globalvoices.org", - "||glorystar.me", - "||goregrish.com", - "||guangnianvpn.com", - "||hanime.tv", - "||hbo.com", - "||spaces.hightail.com", - "||hkgalden.com", - "||hkgolden.com", - "||hudson.org", - "||ipfs.io", - "||japantimes.co.jp", - "||jiji.com", - "||jintian.net", - "||jinx.com", - "||joinmastodon.org", - "||liangzhichuanmei.com", - "||lighti.me", - "||lightyearvpn.com", - "||lihkg.com", - "||line-scdn.net", - "||i.lithium.com", - "||cloud.mail.ru", - "||cdn-images.mailchimp.com", - "||mastodon.cloud", - "||mastodon.host", - "||mastodon.social", - "||matters.news", - "||me.me", - "||metart.com", - "||mohu.club", - "||mohu.ml", - "||motiyun.com", - "||msa-it.org", - "||dictionary.goo.ne.jp", - "||go.nesnode.com", - "||international-news.newsmagazine.asia", - "||nikkei.com", - "||niu.moe", - "||nofile.io", - "||now.com", - "||sukebei.nyaa.si", - "||openvpn.org", - "||onejav.com", - "||paste.ee", - "||my.pcloud.com", - "||picacomic.com", - "||pincong.rocks", - "||pixiv.net", - "||potato.im", - "||premproxy.com", - "||prism-break.org", - "||protonvpn.com", - "||api.pureapk.com", - "||quora.com", - "||quoracdn.net", - "||qz.com", - "||cdn.seatguru.com", - "||secure.raxcdn.com", - "||redd.it", - "||reddit.com", - ".redditlist.com", - "|http://redditlist.com", - "||redditmedia.com", - "||redditstatic.com", - "||rixcloud.com", - "||rixcloud.us", - "||rsdlmonitor.com", - "||shadowsocks.be", - "||shadowsocks9.com", - "||tn1.shemalez.com", - "||tn2.shemalez.com", - "||tn3.shemalez.com", - "||static.shemalez.com", - "||six-degrees.io", - "||softfamous.com", - "||softsmirror.cf", - "||sosreader.com", - "||sspanel.net", - "||sulian.me", - "||supchina.com", - "||teddysun.com", - "||textnow.me", - "||tineye.com", - "||top10vpn.com", - "||tubepornclassic.com", - "||uku.im", - "||unseen.is", - "||cn.uptodown.com", - "||uraban.me", - "||vrsmash.com", - "||vultryhw.com", - "||scache.vzw.com", - "||scache1.vzw.com", - "||scache2.vzw.com", - "||ss7.vzw.com", - "||ssr.tools", - "||steemit.com", - "||taiwanjustice.net", - "||tinc-vpn.org", - "||u15.info", - "||washingtonpost.com", - "||wenzhao.ca", - "||whatsonweibo.com", - "||wire.com", - "||blog.workflow.is", - "||xm.com", - "||xuehua.us", - "||yes-news.com", - "||yigeni.com", - "||you-get.org", - "||zzcloud.me", - "||aex.com", - "||allcoin.com", - "||adcex.com", - "||bcex.ca", - "||bibox.com", - "||big.one", - "||binance.com", - "||bit-z.com", - "||bitcoinworld.com", - "||bitfinex.com", - "||bithumb.com", - "||bitinka.com.ar", - "||bitmex.com", - "||btc98.com", - "||btcbank.bank", - "||btctrade.im", - "||c2cx.com", - "||chaoex.com", - "||cobinhood.com", - "||coin2co.in", - "||coinbene.com", - ".coinegg.com", - "||coinegg.com", - "||coinex.com", - "||coingi.com", - "||coinrail.co.kr", - "||cointiger.com", - "||cointobe.com", - "||coinut.com", - "||discoins.com", - "||dragonex.io", - "||ebtcbank.com", - "||etherdelta.com", - "||exmo.com", - "||exrates.me", - "||exx.com", - "||fatbtc.com", - "||gate.io", - "||gatecoin.com", - "||hbg.com", - "||hitbtc.com", - "||huobi.com", - "||huobi.pro", - "||huobipro.com", - "||bx.in.th", - "||jex.com", - "||kex.com", - "||kspcoin.com", - "||kucoin.com", - "||lbank.info", - "||livecoin.net", - "||localbitcoins.com", - "||mercatox.com", - "||oex.com", - "||okex.com", - "||otcbtc.com", - "||rightbtc.com", - "||topbtc.com", - "||xbtce.com", - "||yobit.net", - "||zb.com", - "||read01.com", - "||kknews.cc", - "china-mmm.jp.net", - ".lsxszzg.com", - ".china-mmm.net", - "||china-mmm.net", - "china-mmm.sa.com", - ".allowed.org", - ".now.im", - "||amazon.co.jp", - ".amazon.com/Dalai-Lama", - "amazon.com/Prisoner-State-Secret-Journal-Premier", - "s3-ap-northeast-1.amazonaws.com", - "||aolchannels.aol.com", - "video.aol.ca/video-detail", - "video.aol.co.uk/video-detail", - "video.aol.com", - "||video.aol.com", - "||search.aol.com", - "www.aolnews.com", - ".avmo.pw", - ".avmoo.com", - "|http://avmoo.com", - ".avmoo.net", - "|http://avmoo.net", - "||avmoo.pw", - ".javmoo.xyz", - "|http://javmoo.xyz", - ".javtag.com", - "|http://javtag.com", - ".javzoo.com", - "|http://javzoo.com", - ".tellme.pw", - ".bbc.com", - "||bbc.com", - ".bbc.co.uk", - "||bbc.co.uk", - "||bbci.co.uk", - ".bbcchinese.com", - "||bbcchinese.com", - "|http://bbc.in", - ".1dumb.com", - ".25u.com", - ".2waky.com", - ".3-a.net", - ".4dq.com", - ".4mydomain.com", - ".4pu.com", - ".acmetoy.com", - ".almostmy.com", - ".americanunfinished.com", - ".authorizeddns.net", - ".authorizeddns.org", - ".authorizeddns.us", - ".bigmoney.biz", - ".changeip.name", - ".changeip.net", - ".changeip.org", - ".cleansite.biz", - ".cleansite.info", - ".cleansite.us", - ".compress.to", - ".ddns.info", - ".ddns.me.uk", - ".ddns.mobi", - ".ddns.ms", - ".ddns.name", - ".ddns.us", - ".dhcp.biz", - ".dns-dns.com", - ".dns-stuff.com", - ".dns04.com", - ".dns05.com", - ".dns1.us", - ".dns2.us", - ".dnset.com", - ".dnsrd.com", - ".dsmtp.com", - ".dumb1.com", - ".dynamic-dns.net", - ".dynamicdns.biz", - ".dynamicdns.co.uk", - ".dynamicdns.me.uk", - ".dynamicdns.org.uk", - ".dyndns.pro", - ".dynssl.com", - ".edns.biz", - ".epac.to", - ".esmtp.biz", - ".ezua.com", - ".faqserv.com", - ".fartit.com", - ".freeddns.com", - ".freetcp.com", - ".freewww.biz", - ".freewww.info", - ".ftp1.biz", - ".ftpserver.biz", - ".gettrials.com", - ".got-game.org", - ".gr8domain.biz", - ".gr8name.biz", - ".https443.net", - ".https443.org", - ".ikwb.com", - ".instanthq.com", - ".iownyour.biz", - ".iownyour.org", - ".isasecret.com", - ".itemdb.com", - ".itsaol.com", - ".jetos.com", - ".jkub.com", - ".jungleheart.com", - ".justdied.com", - ".lflink.com", - ".lflinkup.com", - ".lflinkup.net", - ".lflinkup.org", - ".longmusic.com", - ".mefound.com", - ".moneyhome.biz", - ".mrbasic.com", - ".mrbonus.com", - ".mrface.com", - ".mrslove.com", - ".my03.com", - ".mydad.info", - ".myddns.com", - ".myftp.info", - ".myftp.name", - ".mylftv.com", - ".mymom.info", - ".mynetav.net", - ".mynetav.org", - ".mynumber.org", - ".mypicture.info", - ".mypop3.net", - ".mypop3.org", - ".mysecondarydns.com", - ".mywww.biz", - ".myz.info", - ".ninth.biz", - ".ns01.biz", - ".ns01.info", - ".ns01.us", - ".ns02.biz", - ".ns02.info", - ".ns02.us", - ".ns1.name", - ".ns2.name", - ".ns3.name", - ".ocry.com", - ".onedumb.com", - ".onmypc.biz", - ".onmypc.info", - ".onmypc.net", - ".onmypc.org", - ".onmypc.us", - ".organiccrap.com", - ".otzo.com", - ".ourhobby.com", - ".pcanywhere.net", - ".port25.biz", - ".proxydns.com", - ".qhigh.com", - ".qpoe.com", - ".rebatesrule.net", - ".sellclassics.com", - ".sendsmtp.com", - ".serveuser.com", - ".serveusers.com", - ".sexidude.com", - ".sexxxy.biz", - ".sixth.biz", - ".squirly.info", - ".ssl443.org", - ".toh.info", - ".toythieves.com", - ".trickip.net", - ".trickip.org", - ".vizvaz.com", - ".wha.la", - ".wikaba.com", - ".www1.biz", - ".wwwhost.biz", - "@@|http://xx.wwwhost.biz", - ".x24hr.com", - ".xxuz.com", - ".xxxy.biz", - ".xxxy.info", - ".ygto.com", - ".youdontcare.com", - ".yourtrap.com", - ".zyns.com", - ".zzux.com", - "d1b183sg0nvnuh.cloudfront.net", - "|https://d1b183sg0nvnuh.cloudfront.net", - "d1c37gjwa26taa.cloudfront.net", - "|https://d1c37gjwa26taa.cloudfront.net", - "d3c33hcgiwev3.cloudfront.net", - "|https://d3c33hcgiwev3.cloudfront.net", - "||d3rhr7kgmtrq1v.cloudfront.net", - ".3d-game.com", - ".4irc.com", - ".b0ne.com", - ".chatnook.com", - ".darktech.org", - ".deaftone.com", - ".dtdns.net", - ".effers.com", - ".etowns.net", - ".etowns.org", - ".flnet.org", - ".gotgeeks.com", - ".scieron.com", - ".slyip.com", - ".slyip.net", - ".suroot.com", - ".blogdns.org", - ".dyndns.org", - ".dyndns-ip.com", - ".dyndns-pics.com", - ".from-sd.com", - ".from-pr.com", - ".is-a-hunter.com", - ".dynu.com", - ".dynu.net", - ".freeddns.org", - "cdninstagram.com", - "||cdninstagram.com", - "||facebook.br", - ".facebook.com", - "||facebook.com", - "@@||v6.facebook.com", - "||facebook.design", - "||connect.facebook.net", - "||facebook.hu", - "||facebook.in", - "||facebook.nl", - "||facebook.se", - "||facebookmail.com", - "||fb.com", - "||fb.me", - "||fbcdn.net", - "||fbsbx.com", - "||fbaddins.com", - "||fbworkmail.com", - ".instagram.com", - "||instagram.com", - "||m.me", - "||messenger.com", - "||oculus.com", - "||oculuscdn.com", - "||rocksdb.org", - "@@||ip6.static.sl-reverse.com", - "||thefacebook.com", - "||whatsapp.com", - "||whatsapp.net", - ".ftchinese.com", - "||ftchinese.com", - "||1e100.net", - "||466453.com", - "||abc.xyz", - "||about.google", - "||admob.com", - "||adsense.com", - "||agoogleaday.com", - "||ai.google", - "||ampproject.org", - "@@|https://www.ampproject.org", - "@@|https://cdn.ampproject.org", - "||android.com", - "||androidify.com", - "||androidtv.com", - "||api.ai", - ".appspot.com", - "||appspot.com", - "||autodraw.com", - "||blog.google", - "||blogblog.com", - "blogspot.com", - "/^https?:\\/\\/[^\\/]+blogspot\\.(.*)/", - ".blogspot.hk", - ".blogspot.jp", - ".blogspot.tw", - "||certificate-transparency.org", - "||chrome.com", - "||chromecast.com", - "||chromeexperiments.com", - "||chromercise.com", - "||chromestatus.com", - "||chromium.org", - "||com.google", - "||crbug.com", - "||creativelab5.com", - "||crisisresponse.google", - "||crrev.com", - "||data-vocabulary.org", - "||debug.com", - "||deepmind.com", - "||deja.com", - "||design.google", - "||digisfera.com", - "||dns.google", - "||domains.google", - "||duck.com", - "||environment.google", - "||feedburner.com", - "||firebaseio.com", - "||g.co", - "||gcr.io", - "||get.app", - "||get.dev", - "||get.how", - "||get.page", - "||getmdl.io", - "||getoutline.org", - "||ggpht.com", - "||gmail.com", - "||gmodules.com", - "||godoc.org", - "||golang.org", - "||goo.gl", - ".google.ae", - ".google.as", - ".google.am", - ".google.at", - ".google.az", - ".google.ba", - ".google.be", - ".google.bg", - ".google.ca", - ".google.cd", - ".google.ci", - ".google.co.id", - ".google.co.jp", - ".google.co.kr", - ".google.co.ma", - ".google.co.uk", - ".google.com", - ".google.de", - "||google.dev", - ".google.dj", - ".google.dk", - ".google.es", - ".google.fi", - ".google.fm", - ".google.fr", - ".google.gg", - ".google.gl", - ".google.gr", - ".google.ie", - ".google.is", - ".google.it", - ".google.jo", - ".google.kz", - ".google.lv", - ".google.mn", - ".google.ms", - ".google.nl", - ".google.nu", - ".google.no", - ".google.ro", - ".google.ru", - ".google.rw", - ".google.sc", - ".google.sh", - ".google.sk", - ".google.sm", - ".google.sn", - ".google.tk", - ".google.tm", - ".google.to", - ".google.tt", - ".google.vu", - ".google.ws", - "/^https?:\\/\\/([^\\/]+\\.)*google\\.(ac|ad|ae|af|al|am|as|at|az|ba|be|bf|bg|bi|bj|bs|bt|by|ca|cat|cd|cf|cg|ch|ci|cl|cm|co.ao|co.bw|co.ck|co.cr|co.id|co.il|co.in|co.jp|co.ke|co.kr|co.ls|co.ma|com|com.af|com.ag|com.ai|com.ar|com.au|com.bd|com.bh|com.bn|com.bo|com.br|com.bz|com.co|com.cu|com.cy|com.do|com.ec|com.eg|com.et|com.fj|com.gh|com.gi|com.gt|com.hk|com.jm|com.kh|com.kw|com.lb|com.ly|com.mm|com.mt|com.mx|com.my|com.na|com.nf|com.ng|com.ni|com.np|com.om|com.pa|com.pe|com.pg|com.ph|com.pk|com.pr|com.py|com.qa|com.sa|com.sb|com.sg|com.sl|com.sv|com.tj|com.tr|com.tw|com.ua|com.uy|com.vc|com.vn|co.mz|co.nz|co.th|co.tz|co.ug|co.uk|co.uz|co.ve|co.vi|co.za|co.zm|co.zw|cv|cz|de|dj|dk|dm|dz|ee|es|eu|fi|fm|fr|ga|ge|gg|gl|gm|gp|gr|gy|hk|hn|hr|ht|hu|ie|im|iq|is|it|it.ao|je|jo|kg|ki|kz|la|li|lk|lt|lu|lv|md|me|mg|mk|ml|mn|ms|mu|mv|mw|mx|ne|nl|no|nr|nu|org|pl|pn|ps|pt|ro|rs|ru|rw|sc|se|sh|si|sk|sm|sn|so|sr|st|td|tg|tk|tl|tm|tn|to|tt|us|vg|vn|vu|ws)\\/.*/", - "||googleapis.cn", - "||googleapis.com", - "||googleapps.com", - "||googleartproject.com", - "||googleblog.com", - "||googlebot.com", - "||googlechinawebmaster.com", - "||googlecode.com", - "||googlecommerce.com", - "||googledomains.com", - "||googlearth.com", - "||googleearth.com", - "||googledrive.com", - "||googlegroups.com", - "||googlehosted.com", - "||googleideas.com", - "||googleinsidesearch.com", - "||googlelabs.com", - "||googlemail.com", - "||googlemashups.com", - "||googlepagecreator.com", - "||googleplay.com", - "||googleplus.com", - "||googlescholar.com", - "||googlesource.com", - "||googleusercontent.com", - ".googlevideo.com", - "||googlevideo.com", - "||googleweblight.com", - "||googlezip.net", - "||groups.google.cn", - "||grow.google", - "||gstatic.com", - "||gvt0.com", - "||gvt1.com", - "@@||redirector.gvt1.com", - "||gvt3.com", - "||gwtproject.org", - "||html5rocks.com", - "||iam.soy", - "||igoogle.com", - "||itasoftware.com", - "||lers.google", - "||like.com", - "||madewithcode.com", - "||material.io", - "||nic.google", - "||on2.com", - "||panoramio.com", - "||picasaweb.com", - "||pki.goog", - "||plus.codes", - "||polymer-project.org", - "||pride.google", - "||questvisual.com", - "||admin.recaptcha.net", - "||api.recaptcha.net", - "||api-secure.recaptcha.net", - "||api-verify.recaptcha.net", - "||redhotlabs.com", - "||registry.google", - "||safety.google", - "||savethedate.foo", - "||schema.org", - "||shattered.io", - "|http://sipml5.org/", - "||stories.google", - "||sustainability.google", - "||synergyse.com", - "||teachparentstech.org", - "||tensorflow.org", - "||tfhub.dev", - "||thinkwithgoogle.com", - "||tiltbrush.com", - "||urchin.com", - "||waveprotocol.org", - "||waymo.com", - "||web.dev", - "||webmproject.org", - "||webrtc.org", - "||whatbrowser.org", - "||widevine.com", - "||withgoogle.com", - "||withyoutube.com", - "||x.company", - "||xn--ngstr-lra8j.com", - "||youtu.be", - ".youtube.com", - "||youtube.com", - "||youtube-nocookie.com", - "||youtubeeducation.com", - "||youtubegaming.com", - "||yt.be", - "||ytimg.com", - "||zynamics.com", - "||naughtyamerica.com", - "static01.nyt.com", - "||nyt.com", - "nytchina.com", - "nytcn.me", - "||nytcn.me", - "||nytco.com", - "|http://nyti.ms/", - ".nytimes.com", - "||nytimes.com", - "||nytimg.com", - "userapi.nytlog.com", - "cn.nytstyle.com", - "||nytstyle.com", - ".steamcommunity.com", - "||steamcommunity.com", - "|http://store.steampowered.com/app/333600", - "||t.me", - "||updates.tdesktop.com", - "||telegram.dog", - "||telegram.me", - "||telegram.org", - ".telegramdownload.com", - "||telesco.pe", - "||jtvnw.net", - "||ttvnw.net", - "||twitch.tv", - "||twitchcdn.net", - "||periscope.tv", - ".pscp.tv", - "||pscp.tv", - ".t.co", - "||t.co", - ".tweetdeck.com", - "||tweetdeck.com", - "||twimg.com", - ".twitpic.com", - "||twitpic.com", - ".twitter.com", - "||twitter.com", - "||twitter.jp", - "||vine.co", - "||gov.taipei", - ".gov.tw", - "|https://aiss.anws.gov.tw", - "||archives.gov.tw", - "||tacc.cwb.gov.tw", - "||data.gov.tw", - "||epa.gov.tw", - "||fa.gov.tw", - "||fda.gov.tw", - "||hpa.gov.tw", - "||immigration.gov.tw", - "||itaiwan.gov.tw", - "||mjib.gov.tw", - "||moeaic.gov.tw", - "||mofa.gov.tw", - "||mol.gov.tw", - "||mvdis.gov.tw", - "||nat.gov.tw", - "||nhi.gov.tw", - "||npa.gov.tw", - "||nsc.gov.tw", - "||ntbk.gov.tw", - "||ntbna.gov.tw", - "||ntbt.gov.tw", - "||ntsna.gov.tw", - "||pcc.gov.tw", - "||stat.gov.tw", - "||taipei.gov.tw", - "||taiwanjobs.gov.tw", - "||thb.gov.tw", - "||tipo.gov.tw", - "||wda.gov.tw", - "||teco-hk.org", - "||teco-mo.org", - "@@||aftygh.gov.tw", - "@@||aide.gov.tw", - "@@||tpde.aide.gov.tw", - "@@||arte.gov.tw", - "@@||chukuang.gov.tw", - "@@||cwb.gov.tw", - "@@||cycab.gov.tw", - "@@||dbnsa.gov.tw", - "@@||df.gov.tw", - "@@||eastcoast-nsa.gov.tw", - "@@||erv-nsa.gov.tw", - "@@||grb.gov.tw", - "@@||gysd.nyc.gov.tw", - "@@||hchcc.gov.tw", - "@@||hsinchu-cc.gov.tw", - "@@||iner.gov.tw", - "@@||klsio.gov.tw", - "@@||kmseh.gov.tw", - "@@||lungtanhr.gov.tw", - "@@||maolin-nsa.gov.tw", - "@@||matsu-news.gov.tw", - "@@||matsu-nsa.gov.tw", - "@@||matsucc.gov.tw", - "@@||moe.gov.tw", - "@@||mvdis.gov.tw", - "@@||nankan.gov.tw", - "@@||ncree.gov.tw", - "@@||necoast-nsa.gov.tw", - "@@||siraya-nsa.gov.tw", - "@@||cromotc.nat.gov.tw", - "@@||tax.nat.gov.tw", - "@@||necoast-nsa.gov.tw", - "@@||ner.gov.tw", - "@@||nmmba.gov.tw", - "@@||nmp.gov.tw", - "@@||nmvttc.gov.tw", - "@@||northguan-nsa.gov.tw", - "@@||npm.gov.tw", - "@@||nstm.gov.tw", - "@@||ntdmh.gov.tw", - "@@||ntl.gov.tw", - "@@||ntsec.gov.tw", - "@@||ntuh.gov.tw", - "@@||nvri.gov.tw", - "@@||penghu-nsa.gov.tw", - "@@||post.gov.tw", - "@@||siraya-nsa.gov.tw", - "@@||stdtime.gov.tw", - "@@||sunmoonlake.gov.tw", - "@@||taitung-house.gov.tw", - "@@||taoyuan.gov.tw", - "@@||tphcc.gov.tw", - "@@||trimt-nsa.gov.tw", - "@@||vghtpe.gov.tw", - "@@||vghks.gov.tw", - "@@||vghtc.gov.tw", - "@@||wanfang.gov.tw", - "@@||yatsen.gov.tw", - "@@||yda.gov.tw", - "||kinmen.org.tw", - ".v2ex.com", - "@@|http://v2ex.com", - "@@|http://cdn.v2ex.com", - "@@|http://cn.v2ex.com", - "@@|http://hk.v2ex.com", - "@@|http://i.v2ex.com", - "@@|http://lax.v2ex.com", - "@@|http://neue.v2ex.com", - "@@|http://pagespeed.v2ex.com", - "@@|http://static.v2ex.com", - "@@|http://workspace.v2ex.com", - "@@|http://www.v2ex.com", - "||data.flurry.com", - "page.bid.yahoo.com", - "tw.bid.yahoo.com", - "|https://tw.bid.yahoo.com", - "blogs.yahoo.co.jp", - "||search.yahoo.co.jp", - "buy.yahoo.com.tw/gdsale", - "hk.yahoo.com", - "hk.knowledge.yahoo.com", - "tw.money.yahoo.com", - "hk.myblog.yahoo.com", - "news.yahoo.com/china-blocks-bbc", - "||hk.news.yahoo.com", - "hk.rd.yahoo.com", - "hk.search.yahoo.com/search", - "hk.video.news.yahoo.com/video", - "meme.yahoo.com", - "tw.answers.yahoo.com", - "|https://tw.answers.yahoo.com", - "||tw.knowledge.yahoo.com", - "||tw.mall.yahoo.com", - "tw.yahoo.com", - "||tw.mobi.yahoo.com", - "tw.myblog.yahoo.com", - "||tw.news.yahoo.com", - "pulse.yahoo.com", - "||search.yahoo.com", - "upcoming.yahoo.com", - "video.yahoo.com", - "||yahoo.com.hk", - "||duckduckgo-owned-server.yahoo.net", - ".030buy.com", - ".0rz.tw", - "|http://0rz.tw", - "1-apple.com.tw", - "||1-apple.com.tw", - ".10.tt", - ".100ke.org", - ".1000giri.net", - "||1000giri.net", - ".10conditionsoflove.com", - "||10musume.com", - "123rf.com", - ".12bet.com", - "||12bet.com", - ".12vpn.com", - ".12vpn.net", - "||12vpn.com", - "||12vpn.net", - ".138.com", - "141hongkong.com/forum", - "||141jj.com", - ".141tube.com", - ".1688.com.au", - ".173ng.com", - "||173ng.com", - ".177pic.info", - ".17t17p.com", - "||18board.com", - "||18board.info", - "18onlygirls.com", - ".18p2p.com", - ".18virginsex.com", - ".1949er.org", - "zhao.1984.city", - "||zhao.1984.city", - "1984bbs.com", - "||1984bbs.com", - ".1984bbs.org", - "||1984bbs.org", - ".1991way.com", - "||1991way.com", - ".1998cdp.org", - ".1bao.org", - "|http://1bao.org", - ".1eew.com", - ".1mobile.com", - "|http://*.1mobile.tw", - "||1pondo.tv", - ".2-hand.info", - ".2000fun.com/bbs", - ".2008xianzhang.info", - "||2008xianzhang.info", - "||2017.hk", - "21andy.com/blog", - ".21join.com", - ".21pron.com", - "21sextury.com", - ".228.net.tw", - "||233abc.com", - "||24hrs.ca", - "24smile.org", - "2lipstube.com", - ".2shared.com", - "30boxes.com", - ".315lz.com", - "||32red.com", - "||36rain.com", - ".3a5a.com", - "3arabtv.com", - ".3boys2girls.com", - ".3proxy.ru", - ".3ren.ca", - ".3tui.net", - "||4bluestones.biz", - ".4chan.com", - ".4everproxy.com", - "||4everproxy.com", - "||4rbtv.com", - "||4shared.com", - "taiwannation.50webs.com", - "||51.ca", - "||51jav.org", - ".51luoben.com", - "||51luoben.com", - ".5278.cc", - ".5299.tv", - "5aimiku.com", - "5i01.com", - ".5isotoi5.org", - ".5maodang.com", - "||63i.com", - ".64museum.org", - "64tianwang.com", - "64wiki.com", - ".66.ca", - "666kb.com", - ".6park.com", - "||6park.com", - "||6parker.com", - "||6parknews.com", - "||7capture.com", - ".7cow.com", - ".8-d.com", - "|http://8-d.com", - "85cc.net", - ".85cc.us", - "|http://85cc.us", - "|http://85st.com", - ".881903.com/page/zh-tw/", - "||881903.com", - ".888.com", - ".888poker.com", - "89.64.charter.constitutionalism.solutions", - "89-64.org", - "||89-64.org", - ".8news.com.tw", - ".8z1.net", - "||8z1.net", - ".9001700.com", - "|http://908taiwan.org/", - "||91porn.com", - "||91vps.club", - ".92ccav.com", - ".991.com", - "|http://991.com", - ".99btgc01.com", - "||99btgc01.com", - ".99cn.info", - "|http://99cn.info", - "||9bis.com", - "||9bis.net", - ".tibet.a.se", - "|http://tibet.a.se", - "||a-normal-day.com", - "a5.com.ru", - "|http://aamacau.com", - ".abc.com", - ".abc.net.au", - "||abc.net.au", - ".abchinese.com", - "abclite.net", - "|https://www.abclite.net", - ".ablwang.com", - ".aboluowang.com", - "||aboluowang.com", - ".aboutgfw.com", - ".abs.edu", - ".accim.org", - ".aceros-de-hispania.com", - ".acevpn.com", - "||acevpn.com", - ".acg18.me", - "|http://acg18.me", - "||acgkj.com", - ".acmedia365.com", - ".acnw.com.au", - "actfortibet.org", - "actimes.com.au", - "activpn.com", - "||activpn.com", - "||aculo.us", - "||addictedtocoffee.de", - ".adelaidebbs.com/bbs", - ".adpl.org.hk", - "|http://adpl.org.hk", - ".adult-sex-games.com", - "||adult-sex-games.com", - "adultfriendfinder.com", - "adultkeep.net/peepshow/members/main.htm", - "||advanscene.com", - "||advertfan.com", - ".ae.org", - "||aenhancers.com", - "||af.mil", - ".afantibbs.com", - "|http://afantibbs.com", - ".ai-kan.net", - "||ai-kan.net", - "ai-wen.net", - ".aiph.net", - "||aiph.net", - ".airasia.com", - "||airconsole.com", - "|http://download.aircrack-ng.org", - ".airvpn.org", - "||airvpn.org", - ".aisex.com", - "||ait.org.tw", - "aiweiwei.com", - ".aiweiweiblog.com", - "||aiweiweiblog.com", - "||www.ajsands.com", - "a248.e.akamai.net", - "||a248.e.akamai.net", - "rfalive1.akacast.akamaistream.net", - "voa-11.akacast.akamaistream.net", - "||abematv.akamaized.net", - "||linear-abematv.akamaized.net", - "||vod-abematv.akamaized.net", - "|https://fbcdn*.akamaihd.net/", - "rthklive2-lh.akamaihd.net", - ".akademiye.org/ug", - "|http://akademiye.org/ug", - "||akiba-online.com", - "||akow.org", - ".al-islam.com", - "||al-qimmah.net", - "||alabout.com", - ".alanhou.com", - "|http://alanhou.com", - ".alarab.qa", - "||alasbarricadas.org", - "alexlur.org", - "||alforattv.net", - ".alhayat.com", - ".alicejapan.co.jp", - "aliengu.com", - "||alkasir.com", - "||allconnected.co", - ".alldrawnsex.com", - "||alldrawnsex.com", - ".allervpn.com", - "||allfinegirls.com", - ".allgirlmassage.com", - "allgirlsallowed.org", - ".allgravure.com", - "alliance.org.hk", - ".allinfa.com", - "||allinfa.com", - ".alljackpotscasino.com", - "||allmovie.com", - "||almasdarnews.com", - ".alphaporno.com", - "||alternate-tools.com", - "alternativeto.net/software", - "alvinalexander.com", - "alwaysdata.com", - "||alwaysdata.com", - "||alwaysdata.net", - ".alwaysvpn.com", - "||alwaysvpn.com", - "||am730.com.hk", - "ameblo.jp", - "||ameblo.jp", - "www1.american.edu/ted/ice/tibet", - "||americangreencard.com", - "|http://www.americorps.gov", - "||amiblockedornot.com", - ".amigobbs.net", - ".amitabhafoundation.us", - "|http://amitabhafoundation.us", - ".amnesty.org", - "||amnesty.org", - "||amnesty.org.hk", - ".amnesty.tw", - ".amnestyusa.org", - "||amnestyusa.org", - ".amnyemachen.org", - ".amoiist.com", - ".amtb-taipei.org", - "androidplus.co/apk", - ".andygod.com", - "|http://andygod.com", - "annatam.com/chinese", - "||anchorfree.com", - "||ancsconf.org", - "||andfaraway.net", - "||android-x86.org", - "angelfire.com/hi/hayashi", - "||angularjs.org", - "animecrazy.net", - ".animeshippuuden.com", - "aniscartujo.com", - "||aniscartujo.com", - "||anobii.com", - "anonymise.us", - ".anonymitynetwork.com", - ".anonymizer.com", - ".anonymouse.org", - "||anonymouse.org", - "anontext.com", - ".anpopo.com", - ".answering-islam.org", - "|http://www.antd.org", - "||anthonycalzadilla.com", - ".anti1984.com", - "antichristendom.com", - ".antiwave.net", - "|http://antiwave.net", - ".anyporn.com", - ".anysex.com", - "|http://anysex.com", - "||aobo.com.au", - ".aofriend.com", - "|http://aofriend.com", - ".aofriend.com.au", - ".aojiao.org", - "||aomiwang.com", - "video.ap.org", - ".apetube.com", - "||apiary.io", - ".apigee.com", - "||apigee.com", - "apk-dl.com", - "apkdler.com/apk/view", - ".apkmonk.com/app", - "||apkplz.com", - "apkpure.com", - "||apkpure.com", - ".aplusvpn.com", - ".appdownloader.net/Android", - ".appledaily.com", - "||appledaily.com", - "appledaily.com.hk", - "||appledaily.com.hk", - "appledaily.com.tw", - "||appledaily.com.tw", - ".appshopper.com", - "|http://appshopper.com", - "||appsocks.net", - "||appsto.re", - ".aptoide.com", - "||aptoide.com", - "||archives.gov", - ".archive.fo", - "||archive.fo", - ".archive.is", - "||archive.is", - ".archive.li", - "||archive.li", - "||archive.org", - "archive.today", - "|https://archive.today", - ".arctosia.com", - "|http://arctosia.com", - "||areca-backup.org", - ".arethusa.su", - "||arethusa.su", - "||arlingtoncemetery.mil", - "||army.mil", - ".art4tibet1998.org", - "artofpeacefoundation.org", - "artsy.net", - "||asacp.org", - "asdfg.jp/dabr", - "asg.to", - ".asia-gaming.com", - ".asiaharvest.org", - "||asiaharvest.org", - "asianews.it", - "|http://japanfirst.asianfreeforum.com/", - "||asiansexdiary.com", - "||asianwomensfilm.de", - ".asiatgp.com", - ".asiatoday.us", - "||askstudent.com", - ".askynz.net", - "||askynz.net", - "||assembla.com", - "||astrill.com", - "||atc.org.au", - ".atchinese.com", - "|http://atchinese.com", - "atgfw.org", - ".atlaspost.com", - "||atlaspost.com", - "||atdmt.com", - ".atlanta168.com/forum", - ".atnext.com", - "||atnext.com", - "ice.audionow.com", - ".av.com", - "||av.movie", - ".av-e-body.com", - "avaaz.org", - "||avaaz.org", - ".avbody.tv", - ".avcity.tv", - ".avcool.com", - ".avdb.in", - "||avdb.in", - ".avdb.tv", - "||avdb.tv", - ".avfantasy.com", - "||avg.com", - ".avgle.com", - "||avgle.com", - "||avidemux.org", - "||avoision.com", - ".avyahoo.com", - "||axureformac.com", - ".azerbaycan.tv", - "azerimix.com", - "boxun*.azurewebsites.net", - "||boxun*.azurewebsites.net", - "forum.baby-kingdom.com", - "babynet.com.hk", - "backchina.com", - "||backchina.com", - ".backpackers.com.tw/forum", - "backtotiananmen.com", - ".badiucao.com", - "||badiucao.com", - ".badjojo.com", - "badoo.com", - "|http://*2.bahamut.com.tw", - "||baidu.jp", - ".baijie.org", - "|http://baijie.org", - "||bailandaily.com", - "||baixing.me", - "||bakgeekhome.tk", - ".banana-vpn.com", - "||banana-vpn.com", - ".band.us", - ".bandwagonhost.com", - "||bandwagonhost.com", - ".bangbrosnetwork.com", - ".bangchen.net", - "|http://bangchen.net", - "||bangyoulater.com", - "bannedbook.org", - "||bannedbook.org", - ".bannednews.org", - ".baramangaonline.com", - "|http://baramangaonline.com", - ".barenakedislam.com", - "||barnabu.co.uk", - "||barton.de", - "bartvpn.com", - ".bastillepost.com", - "bayvoice.net", - "||bayvoice.net", - "dajusha.baywords.com", - "||bbchat.tv", - "||bb-chat.tv", - ".bbg.gov", - ".bbkz.com/forum", - ".bbnradio.org", - "bbs-tw.com", - ".bbsdigest.com/thread", - "||bbsfeed.com", - "bbsland.com", - ".bbsmo.com", - ".bbsone.com", - "bbtoystore.com", - ".bcast.co.nz", - ".bcc.com.tw/board", - ".bcchinese.net", - ".bcmorning.com", - "bdsmvideos.net", - ".beaconevents.com", - ".bebo.com", - "||bebo.com", - ".beevpn.com", - "||beevpn.com", - ".behindkink.com", - "||beijing1989.com", - "beijingspring.com", - "||beijingspring.com", - ".beijingzx.org", - "|http://beijingzx.org", - ".belamionline.com", - ".bell.wiki", - "|http://bell.wiki", - "bemywife.cc", - "beric.me", - ".berlintwitterwall.com", - "||berlintwitterwall.com", - ".berm.co.nz", - ".bestforchina.org", - "||bestforchina.org", - ".bestgore.com", - ".bestpornstardb.com", - "||bestvpn.com", - ".bestvpnanalysis.com", - ".bestvpnserver.com", - ".bestvpnservice.com", - ".bestvpnusa.com", - "||bet365.com", - ".betfair.com", - "||betternet.co", - ".bettervpn.com", - "||bettervpn.com", - ".bettween.com", - "||bettween.com", - "||betvictor.com", - ".bewww.net", - ".beyondfirewall.com", - "||bfnn.org", - "||bfsh.hk", - ".bgvpn.com", - "||bgvpn.com", - ".bianlei.com", - "@@||bianlei.com", - "biantailajiao.com", - "biantailajiao.in", - ".biblesforamerica.org", - "|http://biblesforamerica.org", - ".bic2011.org", - "bigfools.com", - "||bigjapanesesex.com", - ".bignews.org", - "||bignews.org", - ".bigsound.org", - ".biliworld.com", - "|http://biliworld.com", - "|http://billypan.com/wiki", - ".binux.me", - "ai.binwang.me/couplet", - "bipic.net", - ".bit.do", - "|http://bit.do", - ".bit.ly", - "|http://bit.ly", - "||bitcointalk.org", - ".bitshare.com", - "||bitshare.com", - "bitsnoop.com", - ".bitvise.com", - "||bitvise.com", - "bizhat.com", - "||bl-doujinsouko.com", - ".bjnewlife.org", - ".bjs.org", - "bjzc.org", - "||bjzc.org", - ".blacklogic.com", - ".blackvpn.com", - "||blackvpn.com", - "blewpass.com", - "tor.blingblingsquad.net", - ".blinkx.com", - "||blinkx.com", - "blinw.com", - ".blip.tv", - "||blip.tv/", - ".blockcn.com", - "||blockcn.com", - "||blockless.com", - "||blog.de", - ".blog.jp", - "|http://blog.jp", - "@@||jpush.cn", - ".blogcatalog.com", - "||blogcatalog.com", - "||blogcity.me", - ".blogger.com", - "||blogger.com", - "blogimg.jp", - "||blog.kangye.org", - ".bloglines.com", - "||bloglines.com", - "||bloglovin.com", - "rconversation.blogs.com", - "blogtd.net", - ".blogtd.org", - "|http://blogtd.org", - "||bloodshed.net", - ".bloomberg.cn", - "||bloomberg.cn", - ".bloomberg.com", - "||bloomberg.com", - "bloomberg.de", - "||bloomberg.de", - "||assets.bwbx.io", - "||bloomfortune.com", - "blueangellive.com", - ".bmfinn.com", - ".bnews.co", - "||bnews.co", - "||bnrmetal.com", - "boardreader.com/thread", - "||boardreader.com", - ".bod.asia", - "|http://bod.asia", - ".bodog88.com", - ".bolehvpn.net", - "||bolehvpn.net", - "bonbonme.com", - ".bonbonsex.com", - ".bonfoundation.org", - ".bongacams.com", - "||boobstagram.com", - "||book.com.tw", - "bookepub.com", - "||books.com.tw", - "||botanwang.com", - ".bot.nu", - ".bowenpress.com", - "||bowenpress.com", - "||app.box.com", - "dl.box.net", - "||dl.box.net", - ".boxpn.com", - "||boxpn.com", - "boxun.com", - "||boxun.com", - ".boxun.tv", - "||boxun.tv", - "boxunblog.com", - "||boxunblog.com", - ".boxunclub.com", - "boyangu.com", - ".boyfriendtv.com", - ".boysfood.com", - "||br.st", - ".brainyquote.com/quotes/authors/d/dalai_lama", - "||brandonhutchinson.com", - "||braumeister.org", - ".bravotube.net", - "||bravotube.net", - ".brazzers.com", - "||brazzers.com", - ".break.com", - "||break.com", - "breakgfw.com", - "||breakgfw.com", - "breaking911.com", - ".breakingtweets.com", - "||breakingtweets.com", - "||breakwall.net", - "briian.com/6511/freegate", - ".briefdream.com/%E7%B4%A0%E6%A3%BA", - "brizzly.com", - "||brizzly.com", - "||brkmd.com", - "broadbook.com", - ".broadpressinc.com", - "||broadpressinc.com", - "bbs.brockbbs.com", - "brucewang.net", - ".brutaltgp.com", - "||brutaltgp.com", - ".bt2mag.com", - "||bt95.com", - ".btaia.com", - ".btbtav.com", - "|http://btdigg.org", - ".btku.me", - "||btku.me", - "||btku.org", - ".btspread.com", - ".btsynckeys.com", - ".budaedu.org", - "||budaedu.org", - ".buddhanet.com.tw/zfrop/tibet", - ".buddhistchannel.tv", - ".buffered.com", - "|http://buffered.com", - ".bullog.org", - "||bullog.org", - ".bullogger.com", - "||bullogger.com", - "bunbunhk.com", - ".busayari.com", - "|http://busayari.com", - ".businessinsider.com/bing-could-be-censoring-search-results-2014", - ".businessinsider.com/china-banks-preparing-for-debt-implosion-2014", - ".businessinsider.com/hong-kong-activists-defy-police-tear-gas-as-protests-continue-overnight-2014", - ".businessinsider.com/internet-outages-reported-in-north-korea-2014", - ".businessinsider.com/iphone-6-is-approved-for-sale-in-china-2014", - ".businessinsider.com/nfl-announcers-surface-tablets-2014", - ".businessinsider.com/panama-papers", - ".businessinsider.com/umbrella-man-hong-kong-2014", - "|http://www.businessinsider.com.au/*", - ".businesstoday.com.tw", - "||businesstoday.com.tw", - ".businessweek.com", - ".busu.org/news", - "|http://busu.org/news", - "busytrade.com", - ".buugaa.com", - ".buzzhand.com", - ".buzzhand.net", - ".buzzorange.com", - "||buzzorange.com", - "||bvpn.com", - "||bwh1.net", - "bwsj.hk", - "||bx.tl", - ".c-spanvideo.org", - "||c-spanvideo.org", - "||c-est-simple.com", - ".c100tibet.org", - "||cablegatesearch.net", - ".cachinese.com", - ".cacnw.com", - "|http://cacnw.com", - ".cactusvpn.com", - "||cactusvpn.com", - ".cafepress.com", - ".cahr.org.tw", - ".calameo.com/books", - "cn.calameo.com", - "|http://cn.calameo.com", - ".calgarychinese.ca", - ".calgarychinese.com", - ".calgarychinese.net", - "|http://blog.calibre-ebook.com", - "|http://google.calstate.edu", - "falun.caltech.edu", - ".its.caltech.edu/~falun/", - ".cam4.com", - ".cam4.jp", - ".cam4.sg", - ".camfrog.com", - "||camfrog.com", - "||cams.com", - ".cams.org.sg", - "canadameet.com", - ".canalporno.com", - "|http://bbs.cantonese.asia/", - ".canyu.org", - "||canyu.org", - ".cao.im", - ".caobian.info", - "||caobian.info", - "caochangqing.com", - "||caochangqing.com", - ".cap.org.hk", - "||cap.org.hk", - ".carabinasypistolas.com", - "cardinalkungfoundation.org", - "carmotorshow.com", - "ss.carryzhou.com", - ".cartoonmovement.com", - "||cartoonmovement.com", - ".casadeltibetbcn.org", - ".casatibet.org.mx", - "|http://casatibet.org.mx", - "cari.com.my", - "||caribbeancom.com", - ".casinoking.com", - ".casinoriva.com", - "||catch22.net", - ".catchgod.com", - "|http://catchgod.com", - "||catfightpayperview.xxx", - ".catholic.org.hk", - "||catholic.org.hk", - "catholic.org.tw", - "||catholic.org.tw", - ".cathvoice.org.tw", - "||cattt.com", - ".cbc.ca", - "||cbc.ca", - ".cbsnews.com/video", - ".cbtc.org.hk", - "||cccat.cc", - "||cccat.co", - ".ccdtr.org", - "||ccdtr.org", - ".cchere.com", - "||cchere.com", - ".ccim.org", - ".cclife.ca", - "cclife.org", - "cclifefl.org", - ".ccthere.com", - "||ccthere.com", - "||ccthere.net", - ".cctmweb.net", - ".cctongbao.com/article/2078732", - "ccue.ca", - "ccue.com", - ".ccvoice.ca", - ".ccw.org.tw", - ".cgdepot.org", - "|http://cgdepot.org", - "||cdbook.org", - ".cdcparty.com", - ".cdef.org", - "||cdef.org", - "||cdig.info", - "cdjp.org", - "||cdjp.org", - ".cdn-apple.com", - "||cdn-apple.com", - ".cdnews.com.tw", - "cdp1989.org", - "cdp1998.org", - "||cdp1998.org", - "cdp2006.org", - "||cdp2006.org", - ".cdpa.url.tw", - "cdpeu.org", - "cdpusa.org", - "cdpweb.org", - "||cdpweb.org", - "cdpwu.org", - "||cdpwu.org", - "||cdw.com", - ".cecc.gov", - "||cecc.gov", - "||cellulo.info", - "||cenews.eu", - "||centerforhumanreprod.com", - "||centralnation.com", - ".centurys.net", - "|http://centurys.net", - ".cfhks.org.hk", - ".cfos.de", - ".cftfc.com", - ".cgst.edu", - ".change.org", - "||change.org", - ".changp.com", - "||changp.com", - ".changsa.net", - "|http://changsa.net", - ".channel8news.sg/news8", - ".chapm25.com", - ".chaturbate.com", - ".chuang-yen.org", - "chengmingmag.com", - ".chenguangcheng.com", - "||chenguangcheng.com", - ".chenpokong.com", - ".chenpokong.net", - "|http://chenpokong.net", - "||cherrysave.com", - ".chhongbi.org", - "chicagoncmtv.com", - "|http://chicagoncmtv.com", - ".china-week.com", - "china101.com", - "||china101.com", - "||china18.org", - "||china21.com", - "china21.org", - "||china21.org", - ".china5000.us", - "chinaaffairs.org", - "||chinaaffairs.org", - "||chinaaid.me", - "chinaaid.us", - "chinaaid.org", - "chinaaid.net", - "chinacomments.org", - "||chinacomments.org", - ".chinachange.org", - "||chinachange.org", - "chinachannel.hk", - "||chinachannel.hk", - ".chinacitynews.be", - ".chinadialogue.net", - ".chinadigitaltimes.net", - "||chinadigitaltimes.net", - ".chinaelections.org", - "||chinaelections.org", - ".chinaeweekly.com", - "||chinaeweekly.com", - "||chinafreepress.org", - ".chinagate.com", - "chinageeks.org", - "chinagfw.org", - "||chinagfw.org", - ".chinagonet.com", - ".chinagreenparty.org", - "||chinagreenparty.org", - ".chinahorizon.org", - "||chinahorizon.org", - ".chinahush.com", - ".chinainperspective.com", - "||chinainterimgov.org", - "chinalaborwatch.org", - "chinalawtranslate.com", - ".chinapost.com.tw/taiwan/national/national-news", - "chinaxchina.com/howto", - "chinalawandpolicy.com", - ".chinamule.com", - "||chinamule.com", - "chinamz.org", - ".chinanewscenter.com", - "|https://chinanewscenter.com", - ".chinapress.com.my", - "||chinapress.com.my", - ".china-review.com.ua", - "|http://china-review.com.ua", - ".chinarightsia.org", - "chinasmile.net/forums", - "chinasocialdemocraticparty.com", - "||chinasocialdemocraticparty.com", - "chinasoul.org", - "||chinasoul.org", - ".chinasucks.net", - "||chinatopsex.com", - ".chinatown.com.au", - "chinatweeps.com", - "chinaway.org", - ".chinaworker.info", - "||chinaworker.info", - "chinayouth.org.hk", - "chinayuanmin.org", - "||chinayuanmin.org", - ".chinese-hermit.net", - "chinese-leaders.org", - "chinese-memorial.org", - ".chinesedaily.com", - "||chinesedailynews.com", - ".chinesedemocracy.com", - "||chinesedemocracy.com", - "||chinesegay.org", - ".chinesen.de", - "||chinesen.de", - ".chinesenews.net.au/", - ".chinesepen.org", - ".chinesetalks.net/ch", - "||chineseupress.com", - ".chingcheong.com", - "||chingcheong.com", - ".chinman.net", - "|http://chinman.net", - "chithu.org", - "|http://chn.chosun.com", - "cnnews.chosun.com/client/news/viw.asp?cate=C01&mcate", - ".chrdnet.com", - "|http://chrdnet.com", - ".christianfreedom.org", - "|http://christianfreedom.org", - "christianstudy.com", - "||christianstudy.com", - "christusrex.org/www1/sdc", - ".chubold.com", - "chubun.com", - "chuizi.net", - "christiantimes.org.hk", - ".chrlawyers.hk", - "|http://chrlawyers.hk", - ".churchinhongkong.org/b5/index.php", - "|http://churchinhongkong.org/b5/index.php", - ".chushigangdrug.ch", - ".cienen.com", - ".cineastentreff.de", - ".cipfg.org", - "||circlethebayfortibet.org", - "||cirosantilli.com", - ".citizencn.com", - "||citizencn.com", - "|http://citizenlab.org", - "|http://www.citizenlab.org", - "||citizenscommission.hk", - ".citizenlab.org", - "citizensradio.org", - ".city365.ca", - "|http://city365.ca", - "city9x.com", - "||citypopulation.de", - ".citytalk.tw/event", - ".civicparty.hk", - "||civicparty.hk", - ".civildisobediencemovement.org", - "civilhrfront.org", - "||civilhrfront.org", - ".civiliangunner.com", - ".civilmedia.tw", - "||civilmedia.tw", - "psiphon.civisec.org", - "||vpn.cjb.net", - ".ck101.com", - "||ck101.com", - ".clarionproject.org/news/islamic-state-isis-isil-propaganda", - "||classicalguitarblog.net", - ".clb.org.hk", - "clearharmony.net", - "clearwisdom.net", - "clinica-tibet.ru", - ".clipfish.de", - "cloakpoint.com", - "||club1069.com", - "cmi.org.tw", - "|http://www.cmoinc.org", - "cmp.hku.hk", - "hkupop.hku.hk", - "||cmule.com", - "||cmule.org", - "||cms.gov", - "|http://vpn.cmu.edu", - "|http://vpn.sv.cmu.edu", - ".cn6.eu", - ".cna.com.tw", - "||cna.com.tw", - ".cnabc.com", - ".cnd.org", - "||cnd.org", - "download.cnet.com", - ".cnex.org.cn", - ".cnineu.com", - "wiki.cnitter.com", - ".cnn.com/video", - ".cnpolitics.org", - "||cnpolitics.org", - ".cn-proxy.com", - "|http://cn-proxy.com", - ".cnproxy.com", - "blog.cnyes.com", - "news.cnyes.com", - "||coat.co.jp", - ".cochina.co", - "||cochina.co", - "||cochina.org", - ".code1984.com/64", - "|http://goagent.codeplex.com", - "||codeshare.io", - "||codeskulptor.org", - "|http://tosh.comedycentral.com", - "comefromchina.com", - "||comefromchina.com", - ".comic-mega.me", - "commandarms.com", - "||commentshk.com", - ".communistcrimes.org", - "||communistcrimes.org", - "||communitychoicecu.com", - "||compileheart.com", - "||conoha.jp", - ".contactmagazine.net", - ".convio.net", - ".coobay.com", - "|http://www.cool18.com/bbs*/", - ".coolaler.com", - "||coolaler.com", - "coolder.com", - "||coolder.com", - "||coolloud.org.tw", - ".coolncute.com", - "||coolstuffinc.com", - "corumcollege.com", - ".cos-moe.com", - "|http://cos-moe.com", - ".cosplayjav.pl", - "|http://cosplayjav.pl", - ".cotweet.com", - "||cotweet.com", - ".coursehero.com", - "||coursehero.com", - "cpj.org", - "||cpj.org", - ".cq99.us", - "|http://cq99.us", - "crackle.com", - "||crackle.com", - ".crazys.cc", - ".crazyshit.com", - "||crchina.org", - "crd-net.org", - "creaders.net", - "||creaders.net", - ".creadersnet.com", - "||cristyli.com", - ".crocotube.com", - "|http://crocotube.com", - ".crossthewall.net", - "||crossthewall.net", - ".crossvpn.net", - "||crossvpn.net", - "||crucial.com", - "csdparty.com", - "||csdparty.com", - "||csuchen.de", - ".csw.org.uk", - ".ct.org.tw", - "||ct.org.tw", - ".ctao.org", - ".ctfriend.net", - ".ctitv.com.tw", - "cts.com.tw", - "|http://library.usc.cuhk.edu.hk/", - "|http://mjlsh.usc.cuhk.edu.hk/", - ".cuhkacs.org/~benng", - ".cuihua.org", - "||cuihua.org", - ".cuiweiping.net", - "||cuiweiping.net", - "||culture.tw", - ".cumlouder.com", - "||cumlouder.com", - "||curvefish.com", - ".cusu.hk", - "||cusu.hk", - ".cutscenes.net", - ".cw.com.tw", - "||cw.com.tw", - "|http://forum.cyberctm.com", - "cyberghostvpn.com", - "||cyberghostvpn.com", - "||cynscribe.com", - "cytode.us", - "||ifan.cz.cc", - "||mike.cz.cc", - "||nic.cz.cc", - ".d-fukyu.com", - "|http://d-fukyu.com", - "cl.d0z.net", - ".d100.net", - "||d100.net", - ".d2bay.com", - "|http://d2bay.com", - ".dabr.co.uk", - "||dabr.co.uk", - "dabr.eu", - "dabr.mobi", - "||dabr.mobi", - "||dabr.me", - "dadazim.com", - "||dadazim.com", - ".dadi360.com", - ".dafabet.com", - "dafagood.com", - "dafahao.com", - ".dafoh.org", - ".daftporn.com", - ".dagelijksestandaard.nl", - ".daidostup.ru", - "|http://daidostup.ru", - ".dailidaili.com", - "||dailidaili.com", - ".dailymotion.com", - "||dailymotion.com", - "daiphapinfo.net", - ".dajiyuan.com", - "||dajiyuan.de", - "dajiyuan.eu", - "dalailama.com", - ".dalailama.mn", - "|http://dalailama.mn", - ".dalailama.ru", - "||dalailama.ru", - "dalailama80.org", - ".dalailama-archives.org", - ".dalailamacenter.org", - "|http://dalailamacenter.org", - "dalailamafellows.org", - ".dalailamafilm.com", - ".dalailamafoundation.org", - ".dalailamahindi.com", - ".dalailamainaustralia.org", - ".dalailamajapanese.com", - ".dalailamaprotesters.info", - ".dalailamaquotes.org", - ".dalailamatrust.org", - ".dalailamavisit.org.nz", - ".dalailamaworld.com", - "||dalailamaworld.com", - "dalianmeng.org", - "||dalianmeng.org", - ".daliulian.org", - "||daliulian.org", - ".danke4china.net", - "||danke4china.net", - ".danwei.org", - "daolan.net", - ".daozhongxing.org", - "darktoy.net", - "||dastrassi.org", - "blog.daum.net/_blog", - ".david-kilgour.com", - "|http://david-kilgour.com", - "daxa.cn", - "||daxa.cn", - "cn.dayabook.com", - ".daylife.com/topic/dalai_lama", - "||db.tt", - ".dbc.hk/main", - "||dcard.tw", - "dcmilitary.com", - ".ddc.com.tw", - ".ddhw.info", - "||de-sci.org", - ".de-sci.org", - "packages.debian.org/zh-cn/lenny/gpass", - "||decodet.co", - ".definebabe.com", - "||delcamp.net", - "delicious.com/GFWbookmark", - ".democrats.org", - "||democrats.org", - ".demosisto.hk", - "||demosisto.hk", - "||desc.se", - "||dessci.com", - ".destroy-china.jp", - "||deutsche-welle.de", - "||devio.us", - "||devpn.com", - "||dfas.mil", - "dfn.org", - "dharmakara.net", - ".dharamsalanet.com", - ".diaoyuislands.org", - "||diaoyuislands.org", - ".difangwenge.org", - "|http://digiland.tw/", - "||digitalnomadsproject.org", - ".diigo.com", - "||diigo.com", - "||dilber.se", - "||furl.net", - ".dipity.com", - "||directcreative.com", - ".discuss.com.hk", - "||discuss.com.hk", - ".discuss4u.com", - "disp.cc", - ".disqus.com", - "||disqus.com", - ".dit-inc.us", - "||dit-inc.us", - ".dizhidizhi.com", - "||dizhuzhishang.com", - "djangosnippets.org", - ".djorz.com", - "||djorz.com", - "||dl-laby.jp", - "||dlsite.com", - "||dlyoutube.com", - "||dmcdn.net", - ".dnscrypt.org", - "||dnscrypt.org", - "||dns2go.com", - "||dnssec.net", - "doctorvoice.org", - ".dogfartnetwork.com/tour", - "gloryhole.com", - ".dojin.com", - ".dok-forum.net", - "||dolc.de", - "||dolf.org.hk", - "||dollf.com", - ".domain.club.tw", - ".domaintoday.com.au", - "chinese.donga.com", - "dongtaiwang.com", - "||dongtaiwang.com", - ".dongtaiwang.net", - "||dongtaiwang.net", - ".dongyangjing.com", - "|http://danbooru.donmai.us", - ".dontfilter.us", - "||dontmovetochina.com", - ".dorjeshugden.com", - ".dotplane.com", - "||dotplane.com", - "||dotsub.com", - ".dotvpn.com", - "||dotvpn.com", - ".doub.io", - "||doub.io", - "||dougscripts.com", - "||douhokanko.net", - "||doujincafe.com", - "dowei.org", - "dphk.org", - "dpp.org.tw", - "||dpp.org.tw", - "||dpr.info", - "||dragonsprings.org", - ".dreamamateurs.com", - ".drepung.org", - "||drgan.net", - ".drmingxia.org", - "|http://drmingxia.org", - "||dropbooks.tv", - "||dropbox.com", - "||api.dropboxapi.com", - "||notify.dropboxapi.com", - "||dropboxusercontent.com", - "drsunacademy.com", - ".drtuber.com", - ".dscn.info", - "|http://dscn.info", - ".dstk.dk", - "|http://dstk.dk", - "||dtiblog.com", - "||dtic.mil", - ".dtwang.org", - ".duanzhihu.com", - ".duckdns.org", - "|http://duckdns.org", - ".duckduckgo.com", - "||duckduckgo.com", - ".duckload.com/download", - "||duckmylife.com", - ".duga.jp", - "|http://duga.jp", - ".duihua.org", - "||duihua.org", - "||duihuahrjournal.org", - ".dunyabulteni.net", - ".duoweitimes.com", - "||duoweitimes.com", - "duping.net", - "||duplicati.com", - "dupola.com", - "dupola.net", - ".dushi.ca", - "||dvorak.org", - ".dw.com", - "||dw.com", - "||dw.de", - ".dw-world.com", - "||dw-world.com", - ".dw-world.de", - "|http://dw-world.de", - "www.dwheeler.com", - "dwnews.com", - "||dwnews.com", - "dwnews.net", - "||dwnews.net", - "xys.dxiong.com", - "||dynawebinc.com", - "||dysfz.cc", - ".dzze.com", - "||e-classical.com.tw", - "||e-gold.com", - ".e-gold.com", - ".e-hentai.org", - "||e-hentai.org", - ".e-hentaidb.com", - "|http://e-hentaidb.com", - "e-info.org.tw", - ".e-traderland.net/board", - ".e-zone.com.hk/discuz", - "|http://e-zone.com.hk/discuz", - ".e123.hk", - "||e123.hk", - ".earlytibet.com", - "|http://earlytibet.com", - ".earthcam.com", - ".earthvpn.com", - "||earthvpn.com", - "eastern-ark.com", - ".easternlightning.org", - ".eastturkestan.com", - "|http://www.eastturkistan.net/", - ".eastturkistan-gov.org", - ".eastturkistancc.org", - ".eastturkistangovernmentinexile.us", - "||eastturkistangovernmentinexile.us", - ".easyca.ca", - ".easypic.com", - ".ebony-beauty.com", - "ebookbrowse.com", - "ebookee.com", - "||ecfa.org.tw", - "ushuarencity.echainhost.com", - "||ecimg.tw", - "ecministry.net", - ".economist.com", - "bbs.ecstart.com", - "edgecastcdn.net", - "||edgecastcdn.net", - "/twimg\\.edgesuite\\.net\\/\\/?appledaily/", - "edicypages.com", - ".edmontonchina.cn", - ".edmontonservice.com", - "edoors.com", - ".edubridge.com", - "||edubridge.com", - ".edupro.org", - "||eevpn.com", - "efcc.org.hk", - ".efukt.com", - "|http://efukt.com", - "||eic-av.com", - "||eireinikotaerukai.com", - ".eisbb.com", - ".eksisozluk.com", - "||eksisozluk.com", - "electionsmeter.com", - "||elgoog.im", - ".ellawine.org", - ".elpais.com", - "||elpais.com", - ".eltondisney.com", - ".emaga.com/info/3407", - "emilylau.org.hk", - ".emanna.com/chineseTraditional", - "bitc.bme.emory.edu/~lzhou/blogs", - ".empfil.com", - ".emule-ed2k.com", - "|http://emule-ed2k.com", - ".emulefans.com", - "|http://emulefans.com", - ".emuparadise.me", - ".enanyang.my", - "||enewstree.com", - ".enfal.de", - "chinese.engadget.com", - "||engagedaily.org", - "englishforeveryone.org", - "||englishfromengland.co.uk", - "englishpen.org", - ".enlighten.org.tw", - "||entermap.com", - ".entnt.com", - "|http://entnt.com", - ".episcopalchurch.org", - ".epochhk.com", - "|http://epochhk.com", - "epochtimes-bg.com", - "||epochtimes-bg.com", - "epochtimes-romania.com", - "||epochtimes-romania.com", - "epochtimes.co.il", - "||epochtimes.co.il", - "epochtimes.co.kr", - "||epochtimes.co.kr", - "epochtimes.com", - "||epochtimes.com", - ".epochtimes.cz", - "epochtimes.de", - "epochtimes.fr", - ".epochtimes.ie", - ".epochtimes.it", - "epochtimes.jp", - "epochtimes.ru", - "epochtimes.se", - "epochtimestr.com", - ".epochweek.com", - "||epochweek.com", - "||epochweekly.com", - ".eporner.com", - ".equinenow.com", - "erabaru.net", - ".eracom.com.tw", - ".eraysoft.com.tr", - ".erepublik.com", - ".erights.net", - "||erights.net", - ".erktv.com", - "|http://erktv.com", - "||ernestmandel.org", - "||erodaizensyu.com", - "||erodoujinlog.com", - "||erodoujinworld.com", - "||eromanga-kingdom.com", - "||eromangadouzin.com", - ".eromon.net", - "|http://eromon.net", - ".eroprofile.com", - ".eroticsaloon.net", - ".eslite.com", - "||eslite.com", - "wiki.esu.im/%E8%9B%A4%E8%9B%A4%E8%AF%AD%E5%BD%95", - ".etaa.org.au", - ".etadult.com", - "etaiwannews.com", - "||etizer.org", - "||etokki.com", - ".ettoday.net/news/20151216/614081", - "etvonline.hk", - ".eu.org", - "||eu.org", - ".eucasino.com", - ".eulam.com", - ".eurekavpt.com", - "||eurekavpt.com", - ".euronews.com", - "||euronews.com", - "eeas.europa.eu/delegations/china/press_corner/all_news/news/2015/20150716_zh", - "eeas.europa.eu/statements-eeas/2015/151022", - ".evschool.net", - "|http://evschool.net", - "||exblog.jp", - "||blog.exblog.co.jp", - "@@||www.exblog.jp", - ".exchristian.hk", - "||exchristian.hk", - "|http://blog.excite.co.jp", - "||exmormon.org", - "||expatshield.com", - ".expecthim.com", - "||expecthim.com", - "experts-univers.com", - "||exploader.net", - ".expressvpn.com", - "||expressvpn.com", - ".extremetube.com", - "eyevio.jp", - "||eyevio.jp", - ".eyny.com", - "||eyny.com", - ".ezpc.tk/category/soft", - ".ezpeer.com", - "||facebookquotes4u.com", - ".faceless.me", - "||faceless.me", - "|http://facesoftibetanselfimmolators.info", - "||facesofnyfw.com", - ".faith100.org", - "|http://faith100.org", - ".faithfuleye.com", - "||faiththedog.info", - ".fakku.net", - ".falsefire.com", - "||falsefire.com", - "falun-co.org", - "falunart.org", - "||falunasia.info", - "|http://falunau.org", - ".falunaz.net", - "falundafa.org", - "falundafa-dc.org", - "||falundafa-florida.org", - "||falundafa-nc.org", - "||falundafa-pa.net", - "||falundafa-sacramento.org", - "falun-ny.net", - "||falundafaindia.org", - "falundafamuseum.org", - ".falungong.club", - ".falungong.de", - "falungong.org.uk", - "||falunhr.org", - "faluninfo.de", - "faluninfo.net", - ".falunpilipinas.net", - "||falunworld.net", - "familyfed.org", - ".fangeming.com", - "||fanglizhi.info", - "||fangong.org", - "fangongheike.com", - ".fanqiang.tk", - "fanqianghou.com", - "||fanqianghou.com", - ".fanqiangzhe.com", - "||fanqiangzhe.com", - "fapdu.com", - "faproxy.com", - ".fawanghuihui.org", - "fanqiangyakexi.net", - "fail.hk", - "||famunion.com", - ".fan-qiang.com", - ".fangbinxing.com", - "||fangbinxing.com", - "fangeming.com", - ".fangmincn.org", - "||fangmincn.org", - ".fanhaodang.com", - "||fanswong.com", - ".fanyue.info", - ".farwestchina.com", - "en.favotter.net", - "nytimes.map.fastly.net", - "||nytimes.map.fastly.net", - "||fast.wistia.com", - "||fastssh.com", - "||faststone.org", - "favstar.fm", - "||favstar.fm", - "faydao.com/weblog", - ".fc2.com", - ".fc2china.com", - ".fc2cn.com", - "||fc2cn.com", - "fc2blog.net", - "|http://uygur.fc2web.com/", - "video.fdbox.com", - ".fdc64.de", - ".fdc64.org", - ".fdc89.jp", - "||fourface.nodesnoop.com", - "||feelssh.com", - "feer.com", - ".feifeiss.com", - "|http://feitianacademy.org", - ".feitian-california.org", - "||feministteacher.com", - ".fengzhenghu.com", - "||fengzhenghu.com", - ".fengzhenghu.net", - "||fengzhenghu.net", - ".fevernet.com", - "|http://ff.im", - "fffff.at", - "fflick.com", - ".ffvpn.com", - "fgmtv.net", - ".fgmtv.org", - ".fhreports.net", - "|http://fhreports.net", - ".figprayer.com", - "||figprayer.com", - ".fileflyer.com", - "||fileflyer.com", - "|http://feeds.fileforum.com", - ".files2me.com", - ".fileserve.com/file", - "fillthesquare.org", - "filmingfortibet.org", - ".filthdump.com", - ".finchvpn.com", - "||finchvpn.com", - "findmespot.com", - "||findyoutube.com", - "||findyoutube.net", - ".fingerdaily.com", - "finler.net", - ".firearmsworld.net", - "|http://firearmsworld.net", - ".fireofliberty.org", - "||fireofliberty.org", - ".firetweet.io", - "||firetweet.io", - ".flagsonline.it", - "fleshbot.com", - ".fleursdeslettres.com", - "|http://fleursdeslettres.com", - "||flgg.us", - "||flgjustice.org", - "||flickr.com", - "||staticflickr.com", - "flickrhivemind.net", - ".flickriver.com", - ".fling.com", - "||flipkart.com", - "||flog.tw", - ".flyvpn.com", - "||flyvpn.com", - "|http://cn.fmnnow.com", - "fofldfradio.org", - "blog.foolsmountain.com", - ".forum4hk.com", - "fangong.forums-free.com", - "pioneer-worker.forums-free.com", - "|https://ss*.4sqi.net", - "video.foxbusiness.com", - "|http://foxgay.com", - "||fringenetwork.com", - "||flecheinthepeche.fr", - ".fochk.org", - "|http://fochk.org", - "||focustaiwan.tw", - ".focusvpn.com", - "||fofg.org", - ".fofg-europe.net", - ".fooooo.com", - "||fooooo.com", - "footwiball.com", - ".fotile.me", - "||fourthinternational.org", - "||foxdie.us", - "||foxsub.com", - "foxtang.com", - ".fpmt.org", - "|http://fpmt.org", - ".fpmt.tw", - ".fpmt-osel.org", - "||fpmtmexico.org", - "fqok.org", - "||fqrouter.com", - "||franklc.com", - ".freakshare.com", - "|http://freakshare.com", - "||free4u.com.ar", - "free-gate.org", - ".free-hada-now.org", - "free-proxy.cz", - ".free.fr/adsl", - "kineox.free.fr", - "tibetlibre.free.fr", - "||freealim.com", - "whitebear.freebearblog.org", - "||freebrowser.org", - ".freechal.com", - ".freedomchina.info", - "||freedomchina.info", - ".freedomhouse.org", - "||freedomhouse.org", - ".freedomsherald.org", - "||freedomsherald.org", - ".freefq.com", - ".freefuckvids.com", - ".freegao.com", - "||freegao.com", - "freeilhamtohti.org", - ".freekwonpyong.org", - "||saveliuxiaobo.com", - ".freelotto.com", - "||freelotto.com", - "freeman2.com", - ".freeopenvpn.com", - "freemoren.com", - "freemorenews.com", - "freemuse.org/archives/789", - "freenet-china.org", - "freenewscn.com", - "cn.freeones.com", - ".freeoz.org/bbs", - "||freeoz.org", - "||freessh.us", - "free4u.com.ar", - ".free-ssh.com", - "||free-ssh.com", - ".freechina.news/", - "||freechinaforum.org", - "||freechinaweibo.com", - ".freedomcollection.org/interviews/rebiya_kadeer", - ".freeforums.org", - "||freenetproject.org", - ".freeoz.org", - ".freetibet.net", - "||freetibet.org", - ".freetibetanheroes.org", - "|http://freetibetanheroes.org", - ".freeviewmovies.com", - ".freevpn.me", - "|http://freevpn.me", - "||freewallpaper4.me", - ".freewebs.com", - ".freewechat.com", - "||freewechat.com", - "freeweibo.com", - "||freeweibo.com", - ".freexinwen.com", - ".freeyoutubeproxy.net", - "||freeyoutubeproxy.net", - "friendfeed.com", - "friendfeed-media.com/e99a4ebe2fb4c1985c2a58775eb4422961aa5a2e", - "friends-of-tibet.org", - ".friendsoftibet.org", - "freechina.net", - "|http://www.zensur.freerk.com/", - "freevpn.nl", - "freeyellow.com", - "hk.frienddy.com/hk", - "|http://adult.friendfinder.com/", - ".fring.com", - "||fring.com", - ".fromchinatousa.net", - "||frommel.net", - ".frontlinedefenders.org", - ".frootvpn.com", - "||frootvpn.com", - "||fscked.org", - ".fsurf.com", - ".ftv.com.tw", - "fucd.com", - ".fuckcnnic.net", - "||fuckcnnic.net", - "fuckgfw.org", - ".fulione.com", - "|https://fulione.com", - "||fullerconsideration.com", - "fulue.com", - ".funf.tw", - "funp.com", - ".fuq.com", - ".furhhdl.org", - "||furinkan.com", - ".futurechinaforum.org", - "||futuremessage.org", - ".fux.com", - ".fuyin.net", - ".fuyindiantai.org", - ".fuyu.org.tw", - "||fw.cm", - ".fxcm-chinese.com", - "||fxcm-chinese.com", - "fzh999.com", - "fzh999.net", - "fzlm.com", - ".g6hentai.com", - "|http://g6hentai.com", - "||g-queen.com", - "||gabocorp.com", - ".gaeproxy.com", - ".gaforum.org", - ".galaxymacau.com", - "||galenwu.com", - ".galstars.net", - "||game735.com", - "gamebase.com.tw", - "gamejolt.com", - "|http://wiki.gamerp.jp", - "||gamer.com.tw", - ".gamer.com.tw", - ".gamez.com.tw", - "||gamez.com.tw", - ".gamousa.com", - ".gaoming.net", - "||gaoming.net", - "ganges.com", - ".gaopi.net", - "|http://gaopi.net", - ".gaozhisheng.org", - ".gaozhisheng.net", - "gardennetworks.com", - "||gardennetworks.org", - "72.52.81.22", - "||gartlive.com", - "||gate-project.com", - "||gather.com", - ".gatherproxy.com", - "gati.org.tw", - ".gaybubble.com", - ".gaycn.net", - ".gayhub.com", - "||gaymap.cc", - ".gaymenring.com", - ".gaytube.com", - "||images-gaytube.com", - ".gaywatch.com", - "|http://gaywatch.com", - ".gazotube.com", - "||gazotube.com", - "||gcc.org.hk", - "||gclooney.com", - "||gcmasia.com", - ".gcpnews.com", - "|http://gcpnews.com", - ".gdbt.net/forum", - "gdzf.org", - "||geek-art.net", - "geekerhome.com/2010/03/xixiang-project-cross-gfw", - "||geekheart.info", - ".gekikame.com", - "|http://gekikame.com", - ".gelbooru.com", - "|http://gelbooru.com", - ".geocities.co.jp", - ".geocities.com/SiliconValley/Circuit/5683/download.html", - "hk.geocities.com", - "geocities.jp", - ".gerefoundation.org", - "||getastrill.com", - ".getchu.com", - ".getcloak.com", - "||getcloak.com", - "||getfoxyproxy.org", - ".getfreedur.com", - "||getgom.com", - ".geti2p.net", - "||geti2p.net", - ".getlantern.org", - "||getlantern.org", - ".getjetso.com/forum", - "getiton.com", - ".getsocialscope.com", - "||getsync.com", - "gfbv.de", - ".gfgold.com.hk", - ".gfsale.com", - "||gfsale.com", - "gfw.org.ua", - ".gfw.press", - "||gfw.press", - ".ggssl.com", - "||ggssl.com", - ".ghostpath.com", - "||ghostpath.com", - "||ghut.org", - ".giantessnight.com", - "|http://giantessnight.com", - ".gifree.com", - "||giga-web.jp", - "tw.gigacircle.com", - "|http://cn.giganews.com/", - "gigporno.ru", - "||girlbanker.com", - ".git.io", - "||git.io", - "|http://softwaredownload.gitbooks.io", - "github.com/getlantern", - "|https://gist.github.com", - "http://cthlo.github.io/hktv", - "hahaxixi.github.io", - "|https://hahaxixi.github.io", - "||haoel.github.io", - "||rg3.github.io", - "||sikaozhe1997.github.io", - "||sodatea.github.io", - "||terminus2049.github.io", - "||toutyrater.github.io", - "wsgzao.github.io", - "|https://wsgzao.github.io", - "||raw.githubusercontent.com", - ".gizlen.net", - "||gizlen.net", - ".gjczz.com", - "||gjczz.com", - "globaljihad.net", - "globalmediaoutreach.com", - "globalmuseumoncommunism.org", - "||globalrescue.net", - ".globaltm.org", - ".globalvoicesonline.org", - "||globalvoicesonline.org", - "||globalvpn.net", - ".glock.com", - "gluckman.com/DalaiLama", - "gmbd.cn", - "||gmhz.org", - "|http://www.gmiddle.com", - "|http://www.gmiddle.net", - ".gmll.org", - "||gnci.org.hk", - "go-pki.com", - "||goagent.biz", - "||goagentplus.com", - "gobet.cc", - "godfootsteps.org", - "||godfootsteps.org", - "godns.work", - "godsdirectcontact.co.uk", - ".godsdirectcontact.org", - "godsdirectcontact.org.tw", - ".godsimmediatecontact.com", - ".gogotunnel.com", - "||gohappy.com.tw", - ".gokbayrak.com", - ".goldbet.com", - "||goldbetsports.com", - "||goldeneyevault.com", - ".goldenfrog.com", - "||goldenfrog.com", - ".goldjizz.com", - "|http://goldjizz.com", - ".goldstep.net", - "||goldwave.com", - "gongmeng.info", - "gongm.in", - "gongminliliang.com", - ".gongwt.com", - "|http://gongwt.com", - "blog.goo.ne.jp/duck-tail_2009", - ".gooday.xyz", - "|http://gooday.xyz", - ".goodreads.com", - "||goodreads.com", - ".goodreaders.com", - "||goodreaders.com", - ".goodtv.com.tw", - ".goodtv.tv", - "||goofind.com", - ".googlesile.com", - ".gopetition.com", - "||gopetition.com", - ".goproxing.net", - ".gotrusted.com", - "||gotrusted.com", - "||gotw.ca", - "||grammaly.com", - "grandtrial.org", - ".graphis.ne.jp", - "||graphis.ne.jp", - "||graphql.org", - "greatfirewall.biz", - "||greatfirewallofchina.net", - ".greatfirewallofchina.org", - "||greatfirewallofchina.org", - "||greenfieldbookstore.com.hk", - ".greenparty.org.tw", - "||greenpeace.org", - ".greenreadings.com/forum", - "great-firewall.com", - "great-roc.org", - "greatroc.org", - "greatzhonghua.org", - ".greenpeace.com.tw", - ".greenvpn.net", - "||greenvpn.net", - ".greenvpn.org", - "||grotty-monday.com", - "gs-discuss.com", - "||gtricks.com", - "guancha.org", - "guaneryu.com", - ".guardster.com", - ".gun-world.net", - "gunsandammo.com", - "||gutteruncensored.com", - "||gvm.com.tw", - ".gzm.tv", - "||gzone-anime.info", - "||clementine-player.org", - "echofon.com", - "||greasespot.net", - "||www.klip.me", - "@@||site.locql.com", - "||stephaniered.com", - "@@||download.syniumsoftware.com", - "|http://ub0.cc", - "wozy.in", - "gospelherald.com", - "||gospelherald.com", - "|http://hk.gradconnection.com/", - "||grangorz.org", - "greatfire.org", - "||greatfire.org", - "greatfirewallofchina.org", - "||greatroc.tw", - ".gts-vpn.com", - "|http://gts-vpn.com", - ".gu-chu-sum.org", - "|http://gu-chu-sum.org", - ".guaguass.com", - "|http://guaguass.com", - ".guaguass.org", - "|http://guaguass.org", - ".guangming.com.my", - "guishan.org", - "||guishan.org", - ".gumroad.com", - "||gumroad.com", - "||gunsamerica.com", - "guruonline.hk", - "|http://gvlib.com", - ".gyalwarinpoche.com", - ".gyatsostudio.com", - ".h528.com", - ".h5dm.com", - ".h5galgame.me", - "||h-china.org", - ".h-moe.com", - "|http://h-moe.com", - "h1n1china.org", - ".hacg.club", - "||hacg.club", - ".hacg.in", - "|http://hacg.in", - ".hacg.li", - "|http://hacg.li", - ".hacg.me", - "|http://hacg.me", - ".hacg.red", - "|http://hacg.red", - ".hacken.cc/bbs", - ".hacker.org", - "||hackthatphone.net", - "hahlo.com", - "||hakkatv.org.tw", - ".handcraftedsoftware.org", - "|http://bbs.hanminzu.org/", - ".hanunyi.com", - ".hao.news/news", - "|http://ae.hao123.com", - "|http://ar.hao123.com", - "|http://br.hao123.com", - "|http://en.hao123.com", - "|http://id.hao123.com", - "|http://jp.hao123.com", - "|http://ma.hao123.com", - "|http://mx.hao123.com", - "|http://sa.hao123.com", - "|http://th.hao123.com", - "|http://tw.hao123.com", - "|http://vn.hao123.com", - "|http://hk.hao123img.com", - "|http://ld.hao123img.com", - "||happy-vpn.com", - ".haproxy.org", - "||hardsextube.com", - ".harunyahya.com", - "|http://harunyahya.com", - "bbs.hasi.wang", - "have8.com", - "@@||haygo.com", - ".hclips.com", - "||hdlt.me", - "||hdtvb.net", - ".hdzog.com", - "|http://hdzog.com", - "||heartyit.com", - ".heavy-r.com", - ".hec.su", - "|http://hec.su", - ".hecaitou.net", - "||hecaitou.net", - ".hechaji.com", - "||hechaji.com", - "||heeact.edu.tw", - ".hegre-art.com", - "|http://hegre-art.com", - "||cdn.helixstudios.net", - "||helplinfen.com", - "||helloandroid.com", - "||helloqueer.com", - ".helloss.pw", - "hellotxt.com", - "||hellotxt.com", - ".hentai.to", - ".hellouk.org/forum/lofiversion", - ".helpeachpeople.com", - "||helpeachpeople.com", - "||helpster.de", - ".helpzhuling.org", - "hentaitube.tv", - ".hentaivideoworld.com", - "||id.heroku.com", - "heqinglian.net", - "||heungkongdiscuss.com", - ".hexieshe.com", - "||hexieshe.com", - "||hexieshe.xyz", - "||hexxeh.net", - "app.heywire.com", - ".heyzo.com", - ".hgseav.com", - ".hhdcb3office.org", - ".hhthesakyatrizin.org", - "hi-on.org.tw", - "hidden-advent.org", - "||hidden-advent.org", - "hidecloud.com/blog/2008/07/29/fuck-beijing-olympics.html", - "||hide.me", - ".hidein.net", - ".hideipvpn.com", - "||hideipvpn.com", - ".hideman.net", - "||hideman.net", - "hideme.nl", - "||hidemy.name", - ".hidemyass.com", - "||hidemyass.com", - "hidemycomp.com", - "||hidemycomp.com", - ".hihiforum.com", - ".hihistory.net", - "||hihistory.net", - ".higfw.com", - "highpeakspureearth.com", - "||highrockmedia.com", - "||hiitch.com", - "||hikinggfw.org", - ".hilive.tv", - ".himalayan-foundation.org", - "himalayanglacier.com", - ".himemix.com", - "||himemix.com", - ".himemix.net", - "times.hinet.net", - ".hitomi.la", - "|http://hitomi.la", - ".hiwifi.com", - "@@||hiwifi.com", - "hizbuttahrir.org", - "hizb-ut-tahrir.info", - "hizb-ut-tahrir.org", - ".hjclub.info", - ".hk-pub.com/forum", - "|http://hk-pub.com", - ".hk01.com", - "||hk01.com", - ".hk32168.com", - "||hk32168.com", - "||hkacg.com", - "||hkacg.net", - ".hkatvnews.com", - "hkbc.net", - ".hkbf.org", - ".hkbookcity.com", - "||hkbookcity.com", - ".hkchurch.org", - "hkci.org.hk", - ".hkcmi.edu", - "||hkcnews.com", - "||hkcoc.com", - "hkday.net", - ".hkdailynews.com.hk/china.php", - "hkdf.org", - ".hkej.com", - ".hkepc.com/forum/viewthread.php?tid=1153322", - "china.hket.com", - "||hkfaa.com", - "hkfreezone.com", - "hkfront.org", - "m.hkgalden.com", - "|https://m.hkgalden.com", - ".hkgreenradio.org/home", - ".hkheadline.com*blog", - ".hkheadline.com/instantnews", - "hkhkhk.com", - "hkhrc.org.hk", - "hkhrm.org.hk", - "||hkip.org.uk", - "1989report.hkja.org.hk", - "hkjc.com", - ".hkjp.org", - ".hklft.com", - ".hklts.org.hk", - "||hklts.org.hk", - "news.hkpeanut.com", - "hkptu.org", - ".hkreporter.com", - "||hkreporter.com", - "|http://hkupop.hku.hk/", - ".hkusu.net", - "||hkusu.net", - ".hkvwet.com", - ".hkwcc.org.hk", - "||hkzone.org", - ".hmonghot.com", - "|http://hmonghot.com", - ".hmv.co.jp/", - "hnjhj.com", - "||hnjhj.com", - ".hnntube.com", - "||hola.com", - "||hola.org", - "holymountaincn.com", - "holyspiritspeaks.org", - "||holyspiritspeaks.org", - "||derekhsu.homeip.net", - ".homeperversion.com", - "|http://homeservershow.com", - "|http://old.honeynet.org/scans/scan31/sub/doug_eric/spam_translation.html", - ".hongkongfp.com", - "||hongkongfp.com", - "hongmeimei.com", - "||hongzhi.li", - ".hootsuite.com", - "||hootsuite.com", - ".hopedialogue.org", - "|http://hopedialogue.org", - ".hopto.org", - ".hornygamer.com", - ".hornytrip.com", - "|http://hornytrip.com", - ".hotav.tv", - ".hotels.cn", - "hotfrog.com.tw", - "hotgoo.com", - ".hotpornshow.com", - "hotpot.hk", - ".hotshame.com", - "||hotspotshield.com", - ".hotvpn.com", - "||hotvpn.com", - "||hougaige.com", - "||howtoforge.com", - "||hoxx.com", - ".hqcdp.org", - "||hqcdp.org", - "||hqjapanesesex.com", - "hqmovies.com", - ".hrcir.com", - ".hrcchina.org", - ".hrea.org", - ".hrichina.org", - "||hrichina.org", - ".hrtsea.com", - ".hrw.org", - "||hrw.org", - "hrweb.org", - "||hsjp.net", - "||hsselite.com", - "|http://hst.net.tw", - ".hstern.net", - ".hstt.net", - ".htkou.net", - "||htkou.net", - ".hua-yue.net", - ".huaglad.com", - "||huaglad.com", - ".huanghuagang.org", - "||huanghuagang.org", - ".huangyiyu.com", - ".huaren.us", - "||huaren.us", - ".huaren4us.com", - ".huashangnews.com", - "|http://huashangnews.com", - "bbs.huasing.org", - "huaxia-news.com", - "huaxiabao.org", - "huaxin.ph", - "||huayuworld.org", - ".huffingtonpost.com/rebiya-kadeer", - "||hugoroy.eu", - "||huhaitai.com", - "||huhamhire.com", - "huiyi.in", - ".hulkshare.com", - "humanrightsbriefing.org", - "||hung-ya.com", - "||hungerstrikeforaids.org", - "||huping.net", - "hurgokbayrak.com", - ".hurriyet.com.tr", - ".hut2.ru", - "||hutianyi.net", - "hutong9.net", - "huyandex.com", - ".hwadzan.tw", - "||hwayue.org.tw", - "||hwinfo.com", - "||hxwk.org", - "hxwq.org", - "||hyperrate.com", - "ebook.hyread.com.tw", - "||ebook.hyread.com.tw", - "||i1.hk", - "||i2p2.de", - "||i2runner.com", - "||i818hk.com", - ".i-cable.com", - ".i-part.com.tw", - ".iamtopone.com", - "iask.ca", - "||iask.ca", - "iask.bz", - "||iask.bz", - ".iav19.com", - "ibiblio.org/pub/packages/ccic", - ".iblist.com", - "||iblogserv-f.net", - "ibros.org", - "|http://cn.ibtimes.com", - ".ibvpn.com", - "||ibvpn.com", - "icams.com", - "blogs.icerocket.com/tag", - ".icij.org", - "||icij.org", - "||icl-fi.org", - ".icoco.com", - "||icoco.com", - "||furbo.org", - "||warbler.iconfactory.net", - "||iconpaper.org", - "||icu-project.org", - "w.idaiwan.com/forum", - "||iddddg.com", - "idemocracy.asia", - ".identi.ca", - "||identi.ca", - "||idiomconnection.com", - "|http://www.idlcoyote.com", - ".idouga.com", - ".idreamx.com", - "forum.idsam.com", - ".idv.tw", - ".ieasy5.com", - "|http://ieasy5.com", - ".ied2k.net", - ".ienergy1.com", - "|http://if.ttt/", - "ifanqiang.com", - ".ifcss.org", - "||ifcss.org", - "ifjc.org", - ".ift.tt", - "|http://ift.tt", - "||ifreewares.com", - "||igcd.net", - ".igfw.net", - "||igfw.net", - ".igfw.tech", - "||igfw.tech", - ".igmg.de", - "||ignitedetroit.net", - ".igotmail.com.tw", - "||igvita.com", - "||ihakka.net", - ".ihao.org/dz5", - "||iicns.com", - ".ikstar.com", - "||illusionfactory.com", - "||ilove80.be", - "||im.tv", - "@@||myvlog.im.tv", - "||im88.tw", - ".imgchili.net", - "|http://imgchili.net", - ".imageab.com", - ".imagefap.com", - "||imagefap.com", - "||imageflea.com", - "imageshack.us", - "||imagevenue.com", - "||imagezilla.net", - ".imb.org", - "|http://imb.org", - "|http://www.imdb.com/name/nm0482730", - ".imdb.com/title/tt0819354", - ".imdb.com/title/tt1540068", - ".imdb.com/title/tt4908644", - ".img.ly", - "||img.ly", - ".imgur.com", - "||imgur.com", - ".imkev.com", - "||imkev.com", - ".imlive.com", - ".immoral.jp", - "impact.org.au", - "impp.mn", - "|http://tech2.in.com/video/", - "in99.org", - "in-disguise.com", - ".incapdns.net", - ".incloak.com", - "||incloak.com", - "||incredibox.fr", - "||indiandefensenews.in", - "timesofindia.indiatimes.com/dalai", - "timesofindia.indiatimes.com/defaultinterstitial.cms", - ".indiemerch.com", - "||indiemerch.com", - "info-graf.fr", - "website.informer.com", - ".initiativesforchina.org", - ".inkui.com", - ".inmediahk.net", - "||inmediahk.net", - "||innermongolia.org", - "|http://blog.inoreader.com", - ".inote.tw", - ".insecam.org", - "|http://insecam.org", - "||insidevoa.com", - ".institut-tibetain.org", - "|http://internet.org/", - "internetdefenseleague.org", - "internetfreedom.org", - "||internetpopculture.com", - ".inthenameofconfuciusmovie.com", - "||inthenameofconfuciusmovie.com", - "inxian.com", - "||inxian.com", - "ipalter.com", - ".ipfire.org", - "||iphone4hongkong.com", - "||iphonehacks.com", - "||iphonetaiwan.org", - "||iphonix.fr", - "||ipicture.ru", - ".ipjetable.net", - "||ipjetable.net", - ".ipobar.com/read.php?", - "ipoock.com/img", - ".iportal.me", - "|http://iportal.me", - "||ippotv.com", - ".ipredator.se", - "||ipredator.se", - ".iptv.com.tw", - "||iptvbin.com", - "||ipvanish.com", - "iredmail.org", - "chinese.irib.ir", - "||ironbigfools.compython.net", - "||ironpython.net", - ".ironsocket.com", - "||ironsocket.com", - ".is.gd", - ".islahhaber.net", - ".islam.org.hk", - "|http://islam.org.hk", - ".islamawareness.net/Asia/China", - ".islamhouse.com", - "||islamhouse.com", - ".islamicity.com", - ".islamicpluralism.org", - ".islamtoday.net", - ".isaacmao.com", - "||isaacmao.com", - "||isgreat.org", - "||ismaelan.com", - ".ismalltits.com", - "||ismprofessional.net", - "isohunt.com", - "||israbox.com", - ".issuu.com", - "||issuu.com", - ".istars.co.nz", - "oversea.istarshine.com", - "||oversea.istarshine.com", - "blog.istef.info/2007/10/21/myentunnel", - ".istiqlalhewer.com", - ".istockphoto.com", - "isunaffairs.com", - "isuntv.com", - "itaboo.info", - "||itaboo.info", - ".italiatibet.org", - "download.ithome.com.tw", - "ithelp.ithome.com.tw", - "||itshidden.com", - ".itsky.it", - ".itweet.net", - "|http://itweet.net", - ".iu45.com", - ".iuhrdf.org", - "||iuhrdf.org", - ".iuksky.com", - ".ivacy.com", - "||ivacy.com", - ".iverycd.com", - ".ivpn.net", - "||ixquick.com", - ".ixxx.com", - "iyouport.com", - "||iyouport.com", - ".izaobao.us", - "||gmozomg.izihost.org", - ".izles.net", - ".izlesem.org", - "||j.mp", - "blog.jackjia.com", - "jamaat.org", - ".jamyangnorbu.com", - "|http://jamyangnorbu.com", - ".jandyx.com", - "||janwongphoto.com", - "||japan-whores.com", - ".jav.com", - ".jav101.com", - ".jav2be.com", - "||jav2be.com", - ".jav68.tv", - ".javakiba.org", - "|http://javakiba.org", - ".javbus.com", - "||javbus.com", - "||javfor.me", - ".javhd.com", - ".javhip.com", - ".javmobile.net", - "|http://javmobile.net", - ".javmoo.com", - ".javseen.com", - "|http://javseen.com", - "jbtalks.cc", - "jbtalks.com", - "jbtalks.my", - ".jdwsy.com", - "jeanyim.com", - "||jfqu36.club", - "||jfqu37.xyz", - "||jgoodies.com", - ".jiangweiping.com", - "||jiangweiping.com", - "||jiaoyou8.com", - ".jiehua.cz", - "||hk.jiepang.com", - "||tw.jiepang.com", - "jieshibaobao.com", - ".jigglegifs.com", - "56cun04.jigsy.com", - "jigong1024.com", - "daodu14.jigsy.com", - "specxinzl.jigsy.com", - "wlcnew.jigsy.com", - ".jihadology.net", - "|http://jihadology.net", - "jinbushe.org", - "||jinbushe.org", - ".jingsim.org", - "zhao.jinhai.de", - "jingpin.org", - "||jingpin.org", - "jinpianwang.com", - ".jinroukong.com", - "ac.jiruan.net", - "||jitouch.com", - ".jizzthis.com", - "jjgirls.com", - ".jkb.cc", - "|http://jkb.cc", - "jkforum.net", - "||jma.go.jp", - "research.jmsc.hku.hk/social", - "weiboscope.jmsc.hku.hk", - ".jmscult.com", - "|http://jmscult.com", - "||joachims.org", - "||jobso.tv", - ".sunwinism.joinbbs.net", - ".journalchretien.net", - "||journalofdemocracy.org", - ".joymiihub.com", - ".joyourself.com", - "jpopforum.net", - "||fiddle.jshell.net", - ".jubushoushen.com", - "||jubushoushen.com", - ".juhuaren.com", - "||juliereyc.com", - "||junauza.com", - ".june4commemoration.org", - ".junefourth-20.net", - "||junefourth-20.net", - "||bbs.junglobal.net", - ".juoaa.com", - "|http://juoaa.com", - "justfreevpn.com", - ".justicefortenzin.org", - "justpaste.it", - "justtristan.com", - "juyuange.org", - "juziyue.com", - "||juziyue.com", - "||jwmusic.org", - "@@||music.jwmusic.org", - ".jyxf.net", - "||k-doujin.net", - "||ka-wai.com", - ".kagyu.org", - "||kagyu.org.za", - ".kagyumonlam.org", - ".kagyunews.com.hk", - ".kagyuoffice.org", - "||kagyuoffice.org", - "||kagyuoffice.org.tw", - ".kaiyuan.de", - ".kakao.com", - "||kakao.com", - ".kalachakralugano.org", - ".kankan.today", - ".kannewyork.com", - "||kannewyork.com", - ".kanshifang.com", - "||kanshifang.com", - "||kantie.org", - "kanzhongguo.com", - "kanzhongguo.eu", - ".kaotic.com", - "||karayou.com", - "karkhung.com", - ".karmapa.org", - ".karmapa-teachings.org", - "||kawase.com", - ".kba-tx.org", - ".kcoolonline.com", - ".kebrum.com", - "||kebrum.com", - ".kechara.com", - ".keepandshare.com/visit/visit_page.php?i=688154", - ".keezmovies.com", - ".kendincos.net", - ".kenengba.com", - "||kenengba.com", - "||keontech.net", - ".kepard.com", - "||kepard.com", - "wiki.keso.cn/Home", - "||keycdn.com", - ".khabdha.org", - ".khmusic.com.tw", - "||kichiku-doujinko.com", - ".kik.com", - "||kik.com", - "bbs.kimy.com.tw", - ".kindleren.com", - "|http://kindleren.com", - "|http://www.kindleren.com", - ".kingdomsalvation.org", - "||kingdomsalvation.org", - "kinghost.com", - "||kingstone.com.tw", - ".kink.com", - ".kinokuniya.com", - "||kinokuniya.com", - "killwall.com", - "||killwall.com", - "||kinmen.travel", - ".kir.jp", - ".kissbbao.cn", - "|http://kiwi.kz", - "||kk-whys.co.jp", - ".kmuh.org.tw", - ".knowledgerush.com/kr/encyclopedia", - ".kobo.com", - "||kobo.com", - ".kobobooks.com", - "||kobobooks.com", - "||kodingen.com", - "@@||www.kodingen.com", - "||kompozer.net", - ".konachan.com", - "|http://konachan.com", - ".kone.com", - "||koolsolutions.com", - ".koornk.com", - "||koornk.com", - "||koranmandarin.com", - ".korenan2.com", - "|http://gojet.krtco.com.tw", - ".ksdl.org", - ".ksnews.com.tw", - "||ktzhk.com", - ".kui.name/event", - "kun.im", - ".kurashsultan.com", - "||kurtmunger.com", - "kusocity.com", - "||kwcg.ca", - "kwongwah.com.my", - ".kxsw.life", - "||kxsw.life", - ".kyofun.com", - "kyohk.net", - "||kyoyue.com", - ".kyzyhello.com", - "||kyzyhello.com", - ".kzeng.info", - "||kzeng.info", - "la-forum.org", - "ladbrokes.com", - "||labiennale.org", - ".lagranepoca.com", - "||lagranepoca.com", - ".lalulalu.com", - ".lama.com.tw", - "||lama.com.tw", - ".lamayeshe.com", - "|http://lamayeshe.com", - "|http://www.lamenhu.com", - ".lamnia.co.uk", - "||lamnia.co.uk", - "lamrim.com", - ".lanterncn.cn", - "|http://lanterncn.cn", - ".lantosfoundation.org", - ".laod.cn", - "|http://laod.cn", - "laogai.org", - "||laogai.org", - "laomiu.com", - ".laoyang.info", - "|http://laoyang.info", - "||laptoplockdown.com", - ".laqingdan.net", - "||laqingdan.net", - "||larsgeorge.com", - ".lastcombat.com", - "|http://lastcombat.com", - "||lastfm.es", - "latelinenews.com", - ".latibet.org", - "||le-vpn.com", - ".leafyvpn.net", - "||leafyvpn.net", - "leeao.com.cn/bbs/forum.php", - "lefora.com", - "||left21.hk", - ".legalporno.com", - ".legsjapan.com", - "|http://leirentv.ca", - "leisurecafe.ca", - "||lematin.ch", - ".lemonde.fr", - "||lenwhite.com", - "lerosua.org", - "||lerosua.org", - "blog.lester850.info", - "||lesoir.be", - ".letou.com", - "letscorp.net", - "||letscorp.net", - "||ss.levyhsu.com", - "||cdn.assets.lfpcontent.com", - ".lhakar.org", - "|http://lhakar.org", - ".lhasocialwork.org", - ".liangyou.net", - "||liangyou.net", - ".lianyue.net", - "||liaowangxizang.net", - ".liaowangxizang.net", - "||liberal.org.hk", - ".libertytimes.com.tw", - "blogs.libraryinformationtechnology.com/jxyz", - ".lidecheng.com/blog/fucking-gfw", - ".lighten.org.tw", - ".lightnovel.cn", - "@@|https://www.lightnovel.cn", - "limiao.net", - "linkuswell.com", - "abitno.linpie.com/use-ipv6-to-fuck-gfw", - "||line.me", - "||line-apps.com", - ".linglingfa.com", - "||lingvodics.com", - ".link-o-rama.com", - "|http://link-o-rama.com", - ".linkideo.com", - "||api.linksalpha.com", - "||apidocs.linksalpha.com", - "||www.linksalpha.com", - "||help.linksalpha.com", - "||linux.org.hk", - "linuxtoy.org/archives/installing-west-chamber-on-ubuntu", - ".lionsroar.com", - ".lipuman.com", - "||liquidvpn.com", - "||greatfire.us7.list-manage.com", - "||listentoyoutube.com", - "listorious.com", - ".liu-xiaobo.org", - "||liudejun.com", - ".liuhanyu.com", - ".liujianshu.com", - "||liujianshu.com", - ".liuxiaobo.net", - "|http://liuxiaobo.net", - "liuxiaotong.com", - "||liuxiaotong.com", - ".livedoor.jp", - ".liveleak.com", - "||liveleak.com", - ".livestation.com", - "livestream.com", - "||livestream.com", - "||livingonline.us", - "||livingstream.com", - "||livevideo.com", - ".livevideo.com", - ".liwangyang.com", - "lizhizhuangbi.com", - "lkcn.net", - ".llss.me/", - ".load.to", - ".lobsangwangyal.com", - ".localdomain.ws", - "||localdomain.ws", - "localpresshk.com", - "||lockestek.com", - "logbot.net", - "||logiqx.com", - "secure.logmein.com", - "||secure.logmein.com", - ".londonchinese.ca", - ".longhair.hk", - "longmusic.com", - "||longtermly.net", - "||lookpic.com", - ".looktoronto.com", - "|http://looktoronto.com", - ".lotsawahouse.org/tibetan-masters/fourteenth-dalai-lama", - ".lotuslight.org.hk", - ".lotuslight.org.tw", - "hkreporter.loved.hk", - "||lpsg.com", - "||lrfz.com", - ".lrip.org", - "||lrip.org", - ".lsd.org.hk", - "||lsd.org.hk", - "lsforum.net", - ".lsm.org", - "||lsm.org", - ".lsmchinese.org", - "||lsmchinese.org", - ".lsmkorean.org", - "||lsmkorean.org", - ".lsmradio.com/rad_archives", - ".lsmwebcast.com", - ".ltn.com.tw", - "||ltn.com.tw", - ".luke54.com", - ".luke54.org", - ".lupm.org", - "||lupm.org", - "||lushstories.com", - "luxebc.com", - "lvhai.org", - "||lvhai.org", - "||lvv2.com", - ".lyfhk.net", - "|http://lyfhk.net", - ".lzmtnews.org", - "||lzmtnews.org", - "http://*.m-team.cc", - ".macrovpn.com", - "macts.com.tw", - "||mad-ar.ch", - "||madrau.com", - "||madthumbs.com", - "||magic-net.info", - "mahabodhi.org", - "my.mail.ru", - ".maiplus.com", - "|http://maiplus.com", - ".maizhong.org", - "makkahnewspaper.com", - ".mamingzhe.com", - "manicur4ik.ru", - ".maplew.com", - "|http://maplew.com", - "||marc.info", - "marguerite.su", - "||martincartoons.com", - "maskedip.com", - ".maiio.net", - ".mail-archive.com", - ".malaysiakini.com", - "||makemymood.com", - ".manchukuo.net", - ".maniash.com", - "|http://maniash.com", - ".mansion.com", - ".mansionpoker.com", - "||martau.com", - "|http://blog.martinoei.com", - ".martsangkagyuofficial.org", - "|http://martsangkagyuofficial.org", - "maruta.be/forget", - ".marxist.com", - "||marxist.net", - ".marxists.org/chinese", - "||matainja.com", - "||mathable.io", - "||mathiew-badimon.com", - "||matsushimakaede.com", - "|http://maturejp.com", - "mayimayi.com", - ".maxing.jp", - ".mcaf.ee", - "|http://mcaf.ee", - "||mcadforums.com", - "mcfog.com", - "mcreasite.com", - ".md-t.org", - "||md-t.org", - "||meansys.com", - ".media.org.hk", - ".mediachinese.com", - "||mediachinese.com", - ".mediafire.com/?", - ".mediafire.com/download", - ".mediafreakcity.com", - "||mediafreakcity.com", - ".medium.com", - "||medium.com", - ".meetav.com", - "||meetup.com", - "mefeedia.com", - "jihadintel.meforum.org", - "||mega.nz", - "||megaproxy.com", - "||megarotic.com", - "megavideo.com", - "||megurineluka.com", - "meirixiaochao.com", - ".meltoday.com", - ".memehk.com", - "||memehk.com", - "memorybbs.com", - ".memri.org", - ".memrijttm.org", - ".mercyprophet.org", - "|http://mercyprophet.org", - "||mergersandinquisitions.org", - ".meridian-trust.org", - "|http://meridian-trust.org", - ".meripet.biz", - "|http://meripet.biz", - ".meripet.com", - "|http://meripet.com", - "merit-times.com.tw", - "meshrep.com", - ".mesotw.com/bbs", - "metacafe.com/watch", - "||meteorshowersonline.com", - "|http://www.metro.taipei/", - ".metrohk.com.hk/?cmd=detail&categoryID=2", - "||metrolife.ca", - ".metroradio.com.hk", - "|http://metroradio.com.hk", - "meyou.jp", - ".meyul.com", - "||mgoon.com", - "||mgstage.com", - "||mh4u.org", - "mhradio.org", - "|http://michaelanti.com", - "||michaelmarketl.com", - "|http://bbs.mikocon.com", - ".microvpn.com", - "|http://microvpn.com", - "middle-way.net", - ".mihk.hk/forum", - ".mihr.com", - "mihua.org", - "||mikesoltys.com", - ".milph.net", - "|http://milph.net", - ".milsurps.com", - "mimiai.net", - ".mimivip.com", - ".mimivv.com", - ".mindrolling.org", - "|http://mindrolling.org", - ".minghui.or.kr", - "|http://minghui.or.kr", - "minghui.org", - "||minghui.org", - "minghui-a.org", - "minghui-b.org", - "minghui-school.org", - ".mingjinglishi.com", - "||mingjinglishi.com", - "mingjingnews.com", - "||mingjingtimes.com", - ".mingpao.com", - "||mingpao.com", - ".mingpaocanada.com", - ".mingpaomonthly.com", - "|http://mingpaomonthly.com", - "mingpaonews.com", - ".mingpaony.com", - ".mingpaosf.com", - ".mingpaotor.com", - ".mingpaovan.com", - ".mingshengbao.com", - ".minhhue.net", - ".miniforum.org", - ".ministrybooks.org", - ".minzhuhua.net", - "||minzhuhua.net", - "minzhuzhanxian.com", - "minzhuzhongguo.org", - "||miroguide.com", - "mirrorbooks.com", - ".mist.vip", - "thecenter.mit.edu", - ".mitao.com.tw", - ".mitbbs.com", - "||mitbbs.com", - "mitbbsau.com", - ".mixero.com", - "||mixero.com", - "mixpod.com", - ".mixx.com", - "||mixx.com", - "||mizzmona.com", - ".mk5000.com", - ".mlcool.com", - "||mlzs.work", - ".mm-cg.com", - "||mmaaxx.com", - ".mmmca.com", - "mnewstv.com", - "||mobatek.net", - ".mobile01.com", - "||mobile01.com", - "||mobileways.de", - ".mobypicture.com", - "|http://moby.to", - "||moeerolibrary.com", - "wiki.moegirl.org", - ".mofaxiehui.com", - ".mofos.com", - "||mog.com", - "molihua.org", - "||mondex.org", - ".money-link.com.tw", - "|http://money-link.com.tw", - "|http://www.monlamit.org", - ".moonbbs.com", - "||moonbbs.com", - "c1522.mooo.com", - "||monitorchina.org", - "bbs.morbell.com", - "||morningsun.org", - "||moroneta.com", - ".motherless.com", - "|http://motherless.com", - "motor4ik.ru", - ".mousebreaker.com", - ".movements.org", - "||movements.org", - "||moviefap.com", - "||www.moztw.org", - ".mp3buscador.com", - "mp3ye.eu", - "||mpettis.com", - "mpfinance.com", - "mpinews.com", - "mponline.hk", - ".mqxd.org", - "|http://mqxd.org", - "mrtweet.com", - "||mrtweet.com", - "news.hk.msn.com", - "news.msn.com.tw", - "msguancha.com", - ".mswe1.org", - "|http://mswe1.org", - "||mthruf.com", - "muchosucko.com", - "||multiply.com", - "multiproxy.org", - "multiupload.com", - ".mullvad.net", - "||mullvad.net", - ".mummysgold.com", - ".murmur.tw", - "|http://murmur.tw", - ".musicade.net", - ".muslimvideo.com", - "||muzi.com", - "||muzi.net", - "||mx981.com", - ".my-formosa.com", - ".my-proxy.com", - ".my-private-network.co.uk", - "||my-private-network.co.uk", - "forum.my903.com", - ".myactimes.com/actimes", - "||myanniu.com", - ".myaudiocast.com", - "||myaudiocast.com", - ".myav.com.tw/bbs", - ".mybbs.us", - ".myca168.com", - ".mycanadanow.com", - "||bbs.mychat.to", - "||mychinamyhome.com", - ".mychinamyhome.com", - ".mychinanet.com", - ".mychinanews.com", - "||mychinanews.com", - ".mychinese.news", - "||mycnnews.com", - "||mykomica.org", - "mycould.com/discuz", - ".myeasytv.com", - "||myeclipseide.com", - ".myforum.com.hk", - "||myforum.com.hk", - "||myforum.com.uk", - ".myfreecams.com", - ".myfreepaysite.com", - ".myfreshnet.com", - ".myiphide.com", - "||myiphide.com", - "forum.mymaji.com", - "mymediarom.com/files/box", - "||mymoe.moe", - "||mymusic.net.tw", - "||myparagliding.com", - "||mypopescu.com", - "myradio.hk/podcast", - ".myreadingmanga.info", - "mysinablog.com", - ".myspace.com", - "||myspacecdn.com", - ".mytalkbox.com", - ".mytizi.com", - "||naacoalition.org", - "old.nabble.com", - "||naitik.net", - ".nakuz.com/bbs", - "||nalandabodhi.org", - "||nalandawest.org", - ".namgyal.org", - "namgyalmonastery.org", - "||namsisi.com", - ".nanyang.com", - "||nanyang.com", - ".nanyangpost.com", - "||nanyangpost.com", - ".nanzao.com", - "||jpl.nasa.gov", - "||pds.nasa.gov", - "||solarsystem.nasa.gov", - ".nakido.com", - "||nakido.com", - ".naol.ca", - ".naol.cc", - "uighur.narod.ru", - ".nat.moe", - "||nat.moe", - "cyberghost.natado.com", - "||national-lottery.co.uk", - "news.nationalgeographic.com/news/2014/06/140603-tiananmen-square", - ".nationsonline.org/oneworld/tibet", - "||line.naver.jp", - "||navyfamily.navy.mil", - "||navyreserve.navy.mil", - "||nko.navy.mil", - "||usno.navy.mil", - "naweeklytimes.com", - ".nbtvpn.com", - "|http://nbtvpn.com", - "nccwatch.org.tw", - ".nch.com.tw", - ".ncn.org", - "||ncn.org", - "||etools.ncol.com", - ".nde.de", - ".ndr.de", - ".ned.org", - "||nekoslovakia.net", - "||nepusoku.com", - "||net-fits.pro", - "bbs.netbig.com", - ".netbirds.com", - "netcolony.com", - "bolin.netfirms.com", - "||netme.cc", - "netsneak.com", - ".network54.com", - "networkedblogs.com", - ".networktunnel.net", - "neverforget8964.org", - "new-3lunch.net", - ".new-akiba.com", - ".new96.ca", - ".newcenturymc.com", - "|http://newcenturymc.com", - "newcenturynews.com", - "||newchen.com", - ".newchen.com", - ".newgrounds.com", - "newipnow.com", - ".newlandmagazine.com.au", - ".newnews.ca", - "news100.com.tw", - "newschinacomment.org", - ".newscn.org", - "||newscn.org", - "newspeak.cc/story", - ".newsancai.com", - "||newsancai.com", - ".newsdetox.ca", - ".newsdh.com", - "||newstamago.com", - "||newstapa.org", - "newstarnet.com", - ".newtaiwan.com.tw", - "newtalk.tw", - "||newtalk.tw", - "newyorktimes.com", - "||nexon.com", - ".next11.co.jp", - ".nextmag.com.tw", - ".nextmedia.com", - "||nexton-net.jp", - "nexttv.com.tw", - ".nfjtyd.com", - "||co.ng.mil", - "||nga.mil", - "ngensis.com", - ".nhentai.net", - "|http://nhentai.net", - ".nhk-ondemand.jp", - ".nicovideo.jp/watch", - "||nicovideo.jp", - "||nighost.org", - "av.nightlife141.com", - "ninecommentaries.com", - ".ninjacloak.com", - "||ninjaproxy.ninja", - "nintendium.com", - "taiwanyes.ning.com", - "usmgtcg.ning.com/forum", - "||niusnews.com", - "||njactb.org", - "njuice.com", - "||njuice.com", - "nlfreevpn.com", - ".ddns.net/", - ".gooddns.info", - "||gotdns.ch", - ".maildns.xyz", - ".no-ip.org", - ".opendn.xyz", - ".servehttp.com", - "sytes.net", - ".whodns.xyz", - ".zapto.org", - "|http://dynupdate.no-ip.com/", - "||nobel.se", - "nobelprize.org/nobel_prizes/peace/laureates/1989", - "nobelprize.org/nobel_prizes/peace/laureates/2010", - "nobodycanstop.us", - "||nobodycanstop.us", - "||nokogiri.org", - "||nokola.com", - "noodlevpn.com", - ".norbulingka.org", - "nordvpn.com", - "||nordvpn.com", - "||novelasia.com", - ".news.now.com", - "|http://news.now.com", - "news.now.com%2Fhome", - "||nownews.com", - ".nowtorrents.com", - ".noypf.com", - "||noypf.com", - "||npa.go.jp", - ".npnt.me", - "|http://npnt.me", - ".nps.gov", - ".nradio.me", - "|http://nradio.me", - ".nrk.no", - "||nrk.no", - ".ntd.tv", - "||ntd.tv", - ".ntdtv.com", - "||ntdtv.com", - ".ntdtv.co.kr", - "ntdtv.ca", - "ntdtv.org", - "ntdtv.ru", - "ntdtvla.com", - ".ntrfun.com", - "||cbs.ntu.edu.tw", - "||media.nu.nl", - ".nubiles.net", - "||nuexpo.com", - ".nukistream.com", - "||nurgo-software.com", - "||nutaku.net", - ".nuvid.com", - "||nvdst.com", - "nuzcom.com", - ".nvquan.org", - ".nvtongzhisheng.org", - "|http://nvtongzhisheng.org", - ".nwtca.org", - "|http://nyaa.eu", - "||nyaa.si", - ".nydus.ca", - "nylon-angel.com", - "nylonstockingsonline.com", - ".nzchinese.com", - "||nzchinese.net.nz", - "observechina.net", - ".obutu.com", - "ocaspro.com", - "occupytiananmen.com", - "oclp.hk", - ".ocreampies.com", - "||october-review.org", - "offbeatchina.com", - "officeoftibet.com", - "|http://ofile.org", - "||ogaoga.org", - "twtr2src.ogaoga.org", - ".ogate.org", - "||ogate.org", - "www2.ohchr.org/english/bodies/cat/docs/ngos/II_China_41.pdf", - ".oikos.com.tw/v4", - ".oiktv.com", - "oizoblog.com", - ".ok.ru", - "||ok.ru", - ".okayfreedom.com", - "||okayfreedom.com", - "okk.tw", - "|http://filmy.olabloga.pl/player", - "old-cat.net", - "||olumpo.com", - ".olympicwatch.org", - "omgili.com", - "||omnitalk.com", - "||omnitalk.org", - "cling.omy.sg", - "forum.omy.sg", - "news.omy.sg", - "showbiz.omy.sg", - "||on.cc", - "||onedrive.live.com", - "||onion.city", - ".onlinecha.com", - "||onlineyoutube.com", - ".onlytweets.com", - "|http://onlytweets.com", - "onmoon.net", - "onmoon.com", - ".onthehunt.com", - "|http://onthehunt.com", - ".oopsforum.com", - "open.com.hk", - "openallweb.com", - "opendemocracy.net", - "||opendemocracy.net", - ".openervpn.in", - "openid.net", - "||openid.net", - ".openleaks.org", - "||openleaks.org", - "openvpn.net", - "||openvpn.net", - "||openwebster.com", - ".openwrt.org.cn", - "@@||openwrt.org.cn", - "my.opera.com/dahema", - "||demo.opera-mini.net", - ".opus-gaming.com", - "|http://opus-gaming.com", - "www.orchidbbs.com", - ".organcare.org.tw", - "organharvestinvestigation.net", - ".orgasm.com", - ".orgfree.com", - "||orient-doll.com", - "orientaldaily.com.my", - "||orientaldaily.com.my", - "||orn.jp", - "t.orzdream.com", - "||t.orzdream.com", - "tui.orzdream.com", - "||orzistic.org", - "||osfoora.com", - ".otnd.org", - "||otnd.org", - "||otto.de", - "||ourdearamy.com", - "oursogo.com", - ".oursteps.com.au", - "||oursteps.com.au", - ".oursweb.net", - "||ourtv.hk", - "xinqimeng.over-blog.com", - "||overplay.net", - "share.ovi.com/media", - "|http://owl.li", - "|http://ht.ly", - "|http://htl.li", - "|http://mash.to", - "www.owind.com", - "|http://www.oxid.it", - "oyax.com", - "oyghan.com/wps", - ".ozchinese.com/bbs", - "||ow.ly", - "bbs.ozchinese.com", - ".ozvoice.org", - "||ozvoice.org", - ".ozxw.com", - ".ozyoyo.com", - "||pachosting.com", - ".pacificpoker.com", - ".packetix.net", - "||pacopacomama.com", - ".padmanet.com", - "page2rss.com", - "||pagodabox.com", - ".palacemoon.com", - "forum.palmislife.com", - "||eriversoft.com", - ".paldengyal.com", - "paljorpublications.com", - ".paltalk.com", - "||pandapow.co", - ".pandapow.net", - ".pandavpn-jp.com", - ".panluan.net", - "||panluan.net", - "||pao-pao.net", - "paper.li", - "paperb.us", - ".paradisehill.cc", - ".paradisepoker.com", - ".partycasino.com", - ".partypoker.com", - ".passion.com", - "||passion.com", - ".passiontimes.hk", - "pastebin.com", - ".pastie.org", - "||pastie.org", - "||blog.pathtosharepoint.com", - "pbs.org/wgbh/pages/frontline/gate", - "pbs.org/wgbh/pages/frontline/tankman", - "pbs.org/wgbh/pages/frontline/tibet", - "video.pbs.org", - "pbwiki.com", - "||pbworks.com", - "||developers.box.net", - "||wiki.oauth.net", - "||wiki.phonegap.com", - "||wiki.jqueryui.com", - "||pbxes.com", - "||pbxes.org", - "pcdvd.com.tw", - ".pchome.com.tw", - "|http://pcij.org", - ".pcstore.com.tw", - "||pct.org.tw", - "pdetails.com", - "||pdproxy.com", - "||peace.ca", - "peacefire.org", - "peacehall.com", - "||peacehall.com", - "|http://pearlher.org", - ".peeasian.com", - ".pekingduck.org", - "||pekingduck.org", - ".pemulihan.or.id", - "|http://pemulihan.or.id", - "||pen.io", - "penchinese.com", - "||penchinese.net", - ".penchinese.net", - "pengyulong.com", - "penisbot.com", - "||blog.pentalogic.net", - ".penthouse.com", - ".pentoy.hk/%E4%B8%AD%E5%9C%8B", - ".pentoy.hk/%E6%99%82%E4%BA%8B", - ".peoplebookcafe.com", - ".peoplenews.tw", - "||peoplenews.tw", - ".peopo.org", - "||peopo.org", - ".percy.in", - ".perfectgirls.net", - "perfectvpn.net", - ".persecutionblog.com", - ".persiankitty.com", - "pfd.org.hk", - "phapluan.org", - "phayul.com", - "philborges.com", - "philly.com", - "||phncdn.com", - "||photodharma.net", - "||photofocus.com", - "||phuquocservices.com", - "||picacomiccn.com", - ".picidae.net", - "||img*.picturedip.com", - "picturesocial.com", - "||pin-cong.com", - ".pin6.com", - "||pin6.com", - ".ping.fm", - "||ping.fm", - "||pinimg.com", - ".pinkrod.com", - "||pinoy-n.com", - "||pinterest.at", - "||pinterest.ca", - "||pinterest.co.kr", - "||pinterest.co.uk", - ".pinterest.com", - "||pinterest.com", - "||pinterest.de", - "||pinterest.dk", - "||pinterest.fr", - "||pinterest.jp", - "||pinterest.nl", - "||pinterest.se", - ".pipii.tv", - ".piposay.com", - "piraattilahti.org", - ".piring.com", - "||pixelqi.com", - "||css.pixnet.in", - "||pixnet.net", - ".pixnet.net", - ".pk.com", - "||placemix.com", - "|http://pictures.playboy.com", - "||playboy.com", - ".playboyplus.com", - "||playboyplus.com", - "||player.fm", - ".playno1.com", - "||playno1.com", - "||playpcesor.com", - "plays.com.tw", - "||m.plixi.com", - "plm.org.hk", - "plunder.com", - ".plurk.com", - "||plurk.com", - ".plus28.com", - ".plusbb.com", - ".pmatehunter.com", - "|http://pmatehunter.com", - ".pmates.com", - "||po2b.com", - "pobieramy.top", - "||podictionary.com", - ".pokerstars.com", - "||pokerstars.com", - ".pokerstars.net", - "zh.pokerstrategy.com", - "politicalchina.org", - "politicalconsultation.org", - ".politiscales.net", - "||poloniex.com", - ".polymerhk.com", - "|http://polymerhk.com", - ".popo.tw", - "||popvote.hk", - ".popyard.com", - "||popyard.org", - ".porn.com", - ".porn2.com", - ".porn5.com", - ".pornbase.org", - ".pornerbros.com", - "||pornhd.com", - ".pornhost.com", - ".pornhub.com", - "||pornhub.com", - ".pornhubdeutsch.net", - "|http://pornhubdeutsch.net", - "||pornmm.net", - ".pornoxo.com", - ".pornrapidshare.com", - "||pornrapidshare.com", - ".pornsharing.com", - "|http://pornsharing.com", - ".pornsocket.com", - ".pornstarclub.com", - "||pornstarclub.com", - ".porntube.com", - ".porntubenews.com", - ".porntvblog.com", - "||porntvblog.com", - ".pornvisit.com", - ".portablevpn.nl", - "||poskotanews.com", - ".post01.com", - ".post76.com", - "||post76.com", - ".post852.com", - "postadult.com", - ".postimg.org", - "||potvpn.com", - "||powercx.com", - ".powerphoto.org", - "||www.powerpointninja.com", - "||presidentlee.tw", - "||cdn.printfriendly.com", - ".pritunl.com", - "provpnaccounts.com", - "||provpnaccounts.com", - ".proxfree.com", - "||proxfree.com", - "proxyanonimo.es", - ".proxynetwork.org.uk", - "||proxynetwork.org.uk", - "||pts.org.tw", - ".pttvan.org", - "pubu.com.tw", - "puffinbrowser.com", - "pureinsight.org", - ".pushchinawall.com", - ".putty.org", - "||putty.org", - "||calebelston.com", - "||blog.fizzik.com", - "||nf.id.au", - "||sogrady.me", - "||vatn.org", - "||ventureswell.com", - "||whereiswerner.com", - ".power.com", - "||power.com", - "powerapple.com", - "||powerapple.com", - "||abc.pp.ru", - "heix.pp.ru", - "||prayforchina.net", - "||premeforwindows7.com", - "||presentationzen.com", - "||prestige-av.com", - "prisoner-state-secret-journal-premier", - ".prisoneralert.com", - "||pritunl.com", - "||privacybox.de", - ".private.com/home", - "||privateinternetaccess.com", - "privatepaste.com", - "||privatepaste.com", - "privatetunnel.com", - "||privatetunnel.com", - "||privatevpn.com", - "||procopytips.com", - "provideocoalition.com", - "||prosiben.de", - "proxifier.com", - "api.proxlet.com", - "||proxomitron.info", - ".proxpn.com", - "||proxpn.com", - ".proxylist.org.uk", - "||proxylist.org.uk", - ".proxypy.net", - "||proxypy.net", - "proxyroad.com", - ".proxytunnel.net", - "||proyectoclubes.com", - "prozz.net", - "psblog.name", - "||psblog.name", - "||psiphon.ca", - ".psiphon3.com", - "||psiphon3.com", - ".psiphontoday.com", - ".ptt.cc", - "||ptt.cc", - ".puffstore.com", - ".puuko.com", - "||pullfolio.com", - ".punyu.com/puny", - "||pureconcepts.net", - "||pureinsight.org", - "||purepdf.com", - "||purevpn.com", - ".purplelotus.org", - ".pursuestar.com", - "||pursuestar.com", - ".pussyspace.com", - ".putihome.org", - ".putlocker.com/file", - "pwned.com", - "python.com", - ".python.com.tw", - "|http://python.com.tw", - "pythonhackers.com/p", - "ss.pythonic.life/", - ".qanote.com", - "||qanote.com", - ".qgirl.com.tw", - "||qiandao.today", - ".qi-gong.me", - "||qi-gong.me", - "||qiangyou.org", - ".qidian.ca", - ".qienkuen.org", - "||qienkuen.org", - "||qiwen.lu", - "qixianglu.cn", - "bbs.qmzdd.com", - ".qkshare.com", - "qoos.com", - "||qoos.com", - "blog.qooza.hk/dafengqixi", - "||efksoft.com", - "||qstatus.com", - "||qtweeter.com", - "||qtrac.eu", - ".quannengshen.org", - "|http://quannengshen.org", - "quantumbooter.net", - "||quitccp.net", - ".quitccp.net", - "||quitccp.org", - ".quitccp.org", - ".quora.com/Chinas-Future", - ".quran.com", - "|http://quran.com", - ".quranexplorer.com", - "qusi8.net", - ".qvodzy.org", - "nemesis2.qx.net/pages/MyEnTunnel", - "qxbbs.org", - ".ra.gg", - "|http://ra.gg/", - ".radicalparty.org", - "||rael.org", - "radicalparty.org", - "radioaustralia.net.au", - ".radiohilight.net", - "||radiohilight.net", - "opml.radiotime.com", - "||radiovaticana.org", - "||radiovncr.com", - "||raggedbanner.com", - "||raidcall.com.tw", - ".raidtalk.com.tw", - ".rainbowplan.org/bbs", - "|https://raindrop.io/", - ".raizoji.or.jp", - "|http://raizoji.or.jp", - "rangwang.biz", - "rangzen.com", - "rangzen.net", - "rangzen.org", - "|http://blog.ranxiang.com/", - "ranyunfei.com", - "||ranyunfei.com", - ".rapbull.net", - "|http://rapidgator.net/", - "||rapidmoviez.com", - "rapidvpn.com", - "||rapidvpn.com", - "||rarbgprx.org", - ".raremovie.cc", - "|http://raremovie.cc", - ".raremovie.net", - "|http://raremovie.net", - "||rawgit.com", - "||rawgithub.com", - "||razyboard.com", - "rcinet.ca", - ".read100.com", - ".readingtimes.com.tw", - "||readingtimes.com.tw", - "||readmoo.com", - ".readydown.com", - "|http://readydown.com", - ".realcourage.org", - ".realitykings.com", - "||realitykings.com", - ".realraptalk.com", - ".realsexpass.com", - ".recordhistory.org", - ".recovery.org.tw", - "|http://online.recoveryversion.org", - "||recoveryversion.com.tw", - "||red-lang.org", - "redballoonsolidarity.org", - ".redchinacn.net", - "|http://redchinacn.net", - "redchinacn.org", - "redtube.com", - "referer.us", - "||referer.us", - "||reflectivecode.com", - "relaxbbs.com", - ".relay.com.tw", - ".releaseinternational.org", - "religioustolerance.org", - "renminbao.com", - "||renminbao.com", - ".renyurenquan.org", - "||renyurenquan.org", - "|http://certificate.revocationcheck.com", - "subacme.rerouted.org", - "||resilio.com", - ".reuters.com", - "||reuters.com", - "||reutersmedia.net", - ".revleft.com", - "retweetist.com", - "||retweetrank.com", - "revver.com", - ".rfa.org", - "||rfa.org", - ".rfachina.com", - ".rfamobile.org", - "rfaweb.org", - "||rferl.org", - ".rfi.fr", - "||rfi.fr", - "|http://rfi.my/", - "|http://vds.rightster.com/", - ".rigpa.org", - ".rileyguide.com", - "riku.me/", - ".ritouki.jp", - "||ritter.vg", - ".rlwlw.com", - "||rlwlw.com", - ".rmjdw.com", - ".rmjdw132.info", - ".roadshow.hk", - ".roboforex.com", - "||robustnessiskey.com", - "||rocket-inc.net", - "|http://www2.rocketbbs.com/11/bbs.cgi?id=5mus", - "|http://www2.rocketbbs.com/11/bbs.cgi?id=freemgl", - "||rojo.com", - "||ronjoneswriter.com", - "||rolia.net", - ".roodo.com", - ".rosechina.net", - ".rotten.com", - ".rsf.org", - "||rsf.org", - ".rsf-chinese.org", - "||rsf-chinese.org", - ".rsgamen.org", - "||phosphation13.rssing.com", - ".rssmeme.com", - "||rssmeme.com", - "||rtalabel.org", - ".rthk.hk", - "|http://rthk.hk", - ".rthk.org.hk", - "|http://rthk.org.hk", - ".rti.org.tw", - "||rti.org.tw", - ".rtycminnesota.org", - ".ruanyifeng.com/blog*some_ways_to_break_the_great_firewall", - "rukor.org", - ".runbtx.com", - ".rushbee.com", - ".ruten.com.tw", - "rutube.ru", - ".ruyiseek.com", - ".rxhj.net", - "|http://rxhj.net", - ".s1s1s1.com", - "||s-cute.com", - ".s-dragon.org", - "||s1heng.com", - "|http://www.s4miniarchive.com", - "||s8forum.com", - "cdn1.lp.saboom.com", - "||sacks.com", - "sacom.hk", - "||sacom.hk", - "||sadpanda.us", - ".safervpn.com", - "||safervpn.com", - ".saintyculture.com", - "|http://saintyculture.com", - ".saiq.me", - "||saiq.me", - "||sakuralive.com", - ".sakya.org", - ".salvation.org.hk", - "||salvation.org.hk", - ".samair.ru/proxy/type-01", - ".sambhota.org", - ".cn.sandscotaicentral.com", - "|http://cn.sandscotaicentral.com", - ".sanmin.com.tw", - "sapikachu.net", - "savemedia.com", - "||savethesounds.info", - ".savetibet.de", - "||savetibet.de", - "savetibet.fr", - "savetibet.nl", - ".savetibet.org", - "||savetibet.org", - "savetibet.ru", - ".savetibetstore.org", - "||savetibetstore.org", - "savevid.com", - "||say2.info", - ".sbme.me", - "|http://sbme.me", - ".sbs.com.au/yourlanguage", - ".scasino.com", - "|http://www.sciencemag.org/content/344/6187/953", - ".sciencenets.com", - ".scmp.com", - "||scmp.com", - ".scmpchinese.com", - "||scramble.io", - ".scribd.com", - "||scribd.com", - "||scriptspot.com", - "seapuff.com", - "domainhelp.search.com", - ".searchtruth.com", - "secretchina.com", - "||secretchina.com", - "||secretgarden.no", - ".secretsline.biz", - "||secretsline.biz", - "||securetunnel.com", - "securityinabox.org", - "|https://securityinabox.org", - ".securitykiss.com", - "||securitykiss.com", - "||seed4.me", - "news.seehua.com", - "seesmic.com", - "||seevpn.com", - "||seezone.net", - "sejie.com", - ".sendspace.com", - "|http://tweets.seraph.me/", - "sesawe.net", - "||sesawe.net", - ".sesawe.org", - "||sethwklein.net", - ".setn.com", - ".settv.com.tw", - "forum.setty.com.tw", - ".sevenload.com", - "||sevenload.com", - ".sex.com", - ".sex-11.com", - "||sex3.com", - "||sex8.cc", - ".sexandsubmission.com", - ".sexbot.com", - ".sexhu.com", - ".sexhuang.com", - "sexinsex.net", - "||sexinsex.net", - ".sextvx.com", - "67.220.91.15", - "67.220.91.18", - "67.220.91.23", - "|http://*.sf.net", - ".sfileydy.com", - "||sfshibao.com", - ".sftindia.org", - ".sftuk.org", - "||sftuk.org", - "||shadeyouvpn.com", - "shadow.ma", - ".shadowsky.xyz", - ".shadowsocks.asia", - "||www.shadowsocks.com", - ".shadowsocks.com", - "||shadowsocks.com.hk", - ".shadowsocks.org", - "||shadowsocks.org", - "||shadowsocks-r.com", - "|http://cn.shafaqna.com", - ".shambalapost.com", - ".shambhalasun.com", - ".shangfang.org", - "||shangfang.org", - "shapeservices.com", - ".sharebee.com", - "||sharecool.org", - "sharpdaily.com.hk", - "||sharpdaily.com.hk", - ".sharpdaily.hk", - ".sharpdaily.tw", - ".shat-tibet.com", - "sheikyermami.com", - ".shellfire.de", - "||shellfire.de", - ".shenshou.org", - "shenyun.com", - "shenyunperformingarts.org", - "||shenyunperformingarts.org", - "shenzhoufilm.com", - "||shenzhoufilm.com", - "||sherabgyaltsen.com", - ".shiatv.net", - ".shicheng.org", - "shinychan.com", - "shipcamouflage.com", - ".shireyishunjian.com", - ".shitaotv.org", - "||shixiao.org", - "||shizhao.org", - "shizhao.org", - "shkspr.mobi/dabr", - "||shodanhq.com", - "||shooshtime.com", - ".shop2000.com.tw", - ".shopping.com", - ".showhaotu.com", - ".showtime.jp", - ".shutterstock.com", - "||shutterstock.com", - "ch.shvoong.com", - ".shwchurch.org", - "||www.shwchurch.org", - ".shwchurch3.com", - "|http://shwchurch3.com", - ".siddharthasintent.org", - "||sidelinesnews.com", - ".sidelinessportseatery.com", - ".sijihuisuo.club", - ".sijihuisuo.com", - ".silkbook.com", - "||simbolostwitter.com", - "simplecd.org", - "||simplecd.org", - "@@||simplecd.me", - "simpleproductivityblog.com", - "bbs.sina.com/", - "bbs.sina.com%2F", - "blog.sina.com.tw", - "dailynews.sina.com/", - "dailynews.sina.com%2F", - "forum.sina.com.hk", - "home.sina.com", - "||magazines.sina.com.tw", - "news.sina.com.hk", - "news.sina.com.tw", - "news.sinchew.com.my", - ".sinchew.com.my/node/", - ".sinchew.com.my/taxonomy/term", - ".singaporepools.com.sg", - "||singaporepools.com.sg", - ".singfortibet.com", - ".singpao.com.hk", - "singtao.com", - "||singtao.com", - "news.singtao.ca", - ".singtaousa.com", - "||singtaousa.com", - "sino-monthly.com", - "||sinocast.com", - "sinocism.com", - "sinomontreal.ca", - ".sinonet.ca", - ".sinopitt.info", - ".sinoants.com", - "||sinoants.com", - ".sinoquebec.com", - ".sierrafriendsoftibet.org", - "sis.xxx", - "||sis001.com", - "sis001.us", - ".site2unblock.com", - "||site90.net", - ".sitebro.tw", - "||sitekreator.com", - "||siteks.uk.to", - "||sitemaps.org", - ".sjrt.org", - "|http://sjrt.org", - "||sjum.cn", - "||sketchappsources.com", - "||skimtube.com", - "||skybet.com", - "|http://users.skynet.be/reves/tibethome.html", - ".skyking.com.tw", - "bbs.skykiwi.com", - "|http://www.skype.com/intl/", - "|http://www.skype.com/zh-Hant", - "||skyvegas.com", - ".xskywalker.com", - "||xskywalker.com", - "||skyxvpn.com", - "m.slandr.net", - ".slaytizle.com", - ".sleazydream.com", - "||slheng.com", - "||slideshare.net", - "forum.slime.com.tw", - ".slinkset.com", - "||slickvpn.com", - ".slutload.com", - "||smartdnsproxy.com", - ".smarthide.com", - "||app.smartmailcloud.com", - "smchbooks.com", - ".smh.com.au/world/death-of-chinese-playboy-leaves-fresh-scratches-in-party-paintwork-20120903-25a8v", - "smhric.org", - ".smith.edu/dalailama", - ".smyxy.org", - "||snapchat.com", - ".snaptu.com", - "||snaptu.com", - "||sndcdn.com", - "sneakme.net", - "snowlionpub.com", - "home.so-net.net.tw/yisa_tsai", - "||soc.mil", - ".socks-proxy.net", - "||socks-proxy.net", - ".sockscap64.com", - "||sockslist.net", - ".socrec.org", - "|http://socrec.org", - ".sod.co.jp", - ".softether.org", - "||softether.org", - ".softether-download.com", - "||softether-download.com", - "||cdn.softlayer.net", - "||sogclub.com", - "sohcradio.com", - "||sohcradio.com", - ".sokmil.com", - "||sorting-algorithms.com", - ".sostibet.org", - ".soumo.info", - "||soup.io", - "@@||static.soup.io", - ".sobees.com", - "||sobees.com", - "socialwhale.com", - ".softether.co.jp", - "||softwarebychuck.com", - "blog.sogoo.org", - "soh.tw", - "||soh.tw", - "sohfrance.org", - "||sohfrance.org", - "chinese.soifind.com", - "sokamonline.com", - ".solidaritetibet.org", - ".solidfiles.com", - "||somee.com", - ".songjianjun.com", - "||songjianjun.com", - ".sonicbbs.cc", - ".sonidodelaesperanza.org", - ".sopcast.com", - ".sopcast.org", - ".sorazone.net", - "||sos.org", - "bbs.sou-tong.org", - ".soubory.com", - "|http://soubory.com", - ".soul-plus.net", - ".soulcaliburhentai.net", - "||soulcaliburhentai.net", - "||soundcloud.com", - ".soundofhope.kr", - "soundofhope.org", - "||soundofhope.org", - "||soupofmedia.com", - "|http://sourceforge.net/p*/shadowsocksgui/", - ".sourcewadio.com", - "southnews.com.tw", - "sowers.org.hk", - "||wlx.sowiki.net", - "||spankbang.com", - ".spankingtube.com", - ".spankwire.com", - "||spb.com", - "||speakerdeck.com", - "||speedify.com", - "spem.at", - "||spencertipping.com", - "||spendee.com", - "||spicevpn.com", - ".spideroak.com", - "||spideroak.com", - ".spike.com", - ".spotflux.com", - "||spotflux.com", - ".spring4u.info", - "|http://spring4u.info", - "||sproutcore.com", - "||sproxy.info", - "||srocket.us", - ".ss-link.com", - "||ss-link.com", - ".ssglobal.co/wp", - "|http://ssglobal.co", - ".ssglobal.me", - "||ssh91.com", - ".sspro.ml", - "|http://sspro.ml", - ".ssrshare.com", - "||ssrshare.com", - "||sss.camp", - "||sstmlt.moe", - "sstmlt.net", - "||sstmlt.net", - "|http://stackoverflow.com/users/895245", - ".stage64.hk", - "||stage64.hk", - "||standupfortibet.org", - "stanford.edu/group/falun", - "usinfo.state.gov", - "||statueofdemocracy.org", - ".starfishfx.com", - ".starp2p.com", - "||starp2p.com", - ".startpage.com", - "||startpage.com", - ".startuplivingchina.com", - "|http://startuplivingchina.com", - "||static-economist.com", - "||stc.com.sa", - "||steel-storm.com", - ".steganos.com", - "||steganos.com", - ".steganos.net", - ".stepchina.com", - "ny.stgloballink.com", - "hd.stheadline.com/news/realtime", - "sthoo.com", - "||sthoo.com", - ".stickam.com", - "stickeraction.com/sesawe", - ".stileproject.com", - ".sto.cc", - ".stoporganharvesting.org", - "||storagenewsletter.com", - ".storm.mg", - "||storm.mg", - ".stoptibetcrisis.net", - "||stoptibetcrisis.net", - "||storify.com", - ".stormmediagroup.com", - "||stoweboyd.com", - "stranabg.com", - "||straplessdildo.com", - "||streamingthe.net", - "streema.com/tv/NTDTV_Chinese", - "cn.streetvoice.com/article", - "cn.streetvoice.com/diary", - "cn2.streetvoice.com", - "tw.streetvoice.com", - ".strikingly.com", - "||strongvpn.com", - ".strongwindpress.com", - ".student.tw/db", - "||studentsforafreetibet.org", - "||stumbleupon.com", - "stupidvideos.com", - ".successfn.com", - "panamapapers.sueddeutsche.de", - ".sugarsync.com", - "||sugarsync.com", - ".sugobbs.com", - "||sugumiru18.com", - "||suissl.com", - "summify.com", - ".sumrando.com", - "||sumrando.com", - "sun1911.com", - ".sunporno.com", - "||sunmedia.ca", - "||sunporno.com", - ".sunskyforum.com", - ".sunta.com.tw", - ".sunvpn.net", - ".suoluo.org", - ".superfreevpn.com", - ".supervpn.net", - "||supervpn.net", - ".superzooi.com", - "|http://superzooi.com", - ".suppig.net", - ".suprememastertv.com", - "|http://suprememastertv.com", - ".surfeasy.com", - "||surfeasy.com", - ".surfeasy.com.au", - "|http://surfeasy.com.au", - "||surrenderat20.net", - ".suyangg.com", - "|http://suyangg.com", - ".svsfx.com", - ".swissinfo.ch", - "||swissinfo.ch", - ".swissvpn.net", - "||swissvpn.net", - "switchvpn.net", - "||switchvpn.net", - ".sydneytoday.com", - "||sydneytoday.com", - ".sylfoundation.org", - "||syncback.com", - "sysresccd.org", - ".sytes.net", - "blog.syx86.com/2009/09/puff", - "blog.syx86.cn/2009/09/puff", - ".szbbs.net", - ".szetowah.org.hk", - "||t-g.com", - ".t35.com", - ".t66y.com", - "||t66y.com", - ".taa-usa.org", - "|http://taa-usa.org", - ".taaze.tw", - "||taaze.tw", - "|http://www.tablesgenerator.com/", - "tabtter.jp", - ".tacem.org", - ".taconet.com.tw", - "||taedp.org.tw", - ".tafm.org", - ".tagwa.org.au", - "tagwalk.com", - "||tagwalk.com", - "tahr.org.tw", - ".taipeisociety.org", - "||taipeisociety.org", - ".taiwanbible.com", - ".taiwancon.com", - ".taiwandaily.net", - "||taiwandaily.net", - ".taiwandc.org", - ".taiwanjustice.com", - "taiwankiss.com", - "taiwannation.com", - "taiwannation.com.tw", - "||taiwanncf.org.tw", - "||taiwannews.com.tw", - "|http://www.taiwanonline.cc/", - "taiwantp.net", - "||taiwantt.org.tw", - "taiwanus.net", - "taiwanyes.com", - "taiwan-sex.com", - ".talk853.com", - ".talkboxapp.com", - "||talkboxapp.com", - ".talkcc.com", - "||talkcc.com", - ".talkonly.net", - "||talkonly.net", - "||tamiaode.tk", - "||tanc.org", - "tangben.com", - ".tangren.us", - ".taoism.net", - "|http://taoism.net", - ".taolun.info", - "||taolun.info", - ".tapatalk.com", - "||tapatalk.com", - "blog.taragana.com", - ".tascn.com.au", - "||taup.net", - "|http://www.taup.org.tw", - ".taweet.com", - "||taweet.com", - ".tbcollege.org", - "||tbcollege.org", - ".tbi.org.hk", - ".tbicn.org", - ".tbjyt.org", - "||tbpic.info", - ".tbrc.org", - "tbs-rainbow.org", - ".tbsec.org", - "||tbsec.org", - "tbskkinabalu.page.tl", - ".tbsmalaysia.org", - ".tbsn.org", - "||tbsn.org", - ".tbsseattle.org", - ".tbssqh.org", - "|http://tbssqh.org", - "tbswd.org", - ".tbtemple.org.uk", - ".tbthouston.org", - ".tccwonline.org", - ".tcewf.org", - "tchrd.org", - "tcnynj.org", - "||tcpspeed.co", - ".tcpspeed.com", - "||tcpspeed.com", - ".tcsofbc.org", - ".tcsovi.org", - ".tdm.com.mo", - "teamamericany.com", - "||techviz.net", - "||teck.in", - ".teeniefuck.net", - "teensinasia.com", - ".telecomspace.com", - "||telegraph.co.uk", - ".tenacy.com", - "||tenzinpalmo.com", - ".tew.org", - ".thaicn.com", - "||theatrum-belli.com", - "theblemish.com", - "||thebcomplex.com", - ".thebobs.com", - "||thebobs.com", - ".thechinabeat.org", - "|http://www.thechinastory.org/yearbooks/yearbook-2012/", - ".thedalailamamovie.com", - "|http://thedalailamamovie.com", - "||thedw.us", - "thefrontier.hk/tf", - "cn.thegay.com", - "|http://thegioitinhoc.vn/", - ".thegly.com", - ".thehots.info", - "thehousenews.com", - "||thehun.net", - ".theinitium.com", - "||theinitium.com", - ".thenewslens.com", - "||thenewslens.com", - ".thepiratebay.org", - "||thepiratebay.org", - ".theporndude.com", - "||theporndude.com", - "||theportalwiki.com", - "thereallove.kr", - "therock.net.nz", - "thespeeder.com", - "||thestandnews.com", - "thetibetcenter.org", - "thetibetconnection.org", - ".thetibetmuseum.org", - ".thetibetpost.com", - "||thetibetpost.com", - "||thetinhat.com", - "thetrotskymovie.com", - "thevivekspot.com", - "||thewgo.org", - ".theync.com", - "|http://theync.com", - ".thinkingtaiwan.com", - ".thisav.com", - "|http://thisav.com", - ".thlib.org", - "||thomasbernhard.org", - ".thongdreams.com", - "threatchaos.com", - "||throughnightsfire.com", - ".thumbzilla.com", - "||thywords.com", - ".thywords.com.tw", - "tiananmenmother.org", - ".tiananmenduizhi.com", - "||tiananmenduizhi.com", - "||tiananmenuniv.com", - "||tiananmenuniv.net", - "||tiandixing.org", - ".tianhuayuan.com", - ".tianlawoffice.com", - "||tianti.io", - "tiantibooks.org", - "||tiantibooks.org", - "tianyantong.org.cn", - ".tianzhu.org", - ".tibet.at", - "tibet.ca", - ".tibet.com", - "||tibet.com", - "tibet.fr", - ".tibet.net", - "||tibet.net", - "tibet.nu", - ".tibet.org", - "||tibet.org", - ".tibet.sk", - "tibet.org.tw", - ".tibet.to", - ".tibet-envoy.eu", - "||tibet-envoy.eu", - ".tibet-foundation.org", - ".tibet-house-trust.co.uk", - "tibet-info.net", - "tibet-initiative.de", - "||tibet-initiative.de", - ".tibet-munich.de", - ".tibet3rdpole.org", - "|http://tibet3rdpole.org", - "tibetaction.net", - "||tibetaction.net", - ".tibetaid.org", - "tibetalk.com", - ".tibetan.fr", - "tibetan-alliance.org", - ".tibetanarts.org", - ".tibetanbuddhistinstitute.org", - "|http://tibetanbuddhistinstitute.org", - "tibetancommunity.org", - ".tibetanjournal.com", - ".tibetanlanguage.org", - ".tibetanliberation.org", - "||tibetanliberation.org", - ".tibetcollection.com", - ".tibetanaidproject.org", - ".tibetancommunityuk.net", - "|http://tibetancommunityuk.net", - "tibetanculture.org", - "tibetanfeministcollective.org", - ".tibetanpaintings.com", - ".tibetanphotoproject.com", - ".tibetanpoliticalreview.org", - ".tibetanreview.net", - "|http://tibetansports.org", - ".tibetanwomen.org", - "|http://tibetanwomen.org", - ".tibetanyouth.org", - ".tibetanyouthcongress.org", - "||tibetanyouthcongress.org", - ".tibetcharity.dk", - "tibetcharity.in", - ".tibetchild.org", - ".tibetcity.com", - ".tibetcorps.org", - ".tibetexpress.net", - "|http://tibetexpress.net", - "tibetfocus.com", - "tibetfund.org", - ".tibetgermany.com", - "||tibetgermany.de", - ".tibethaus.com", - ".tibetheritagefund.org", - "tibethouse.jp", - "tibethouse.org", - "||tibethouse.us", - ".tibetinfonet.net", - ".tibetjustice.org", - ".tibetkomite.dk", - "|http://tibetmuseum.org", - "tibetnetwork.org", - "||tibetnetwork.org", - ".tibetoffice.ch", - "|http://tibetoffice.ch", - "tibetoffice.eu", - "tibetoffice.org", - "tibetonline.com", - "||tibetonline.com", - ".tibetoffice.com.au", - "|http://tibetoffice.com.au", - "||tibetonline.tv", - ".tibetonline.tv", - ".tibetoralhistory.org", - "|http://tibetoralhistory.org", - ".tibetpolicy.eu", - ".tibetrelieffund.co.uk", - "tibetsites.com", - ".tibetsociety.com", - "||tibetsociety.com", - ".tibetsun.com", - ".tibetsupportgroup.org", - "|http://tibetsupportgroup.org", - ".tibetswiss.ch", - ".tibettelegraph.com", - "tibettimes.net", - "||tibetwrites.org", - ".ticket.com.tw", - ".tigervpn.com", - "||tigervpn.com", - ".timdir.com", - "|http://timdir.com", - ".time.com", - "|http://time.com", - ".timsah.com", - "||blog.tiney.com", - "tintuc101.com", - ".tiny.cc", - "|http://tiny.cc", - "tinychat.com", - "||tinypaste.com", - ".tistory.com", - "||tkcs-collins.com", - ".tmagazine.com", - "||tmagazine.com", - ".tmdfish.com", - "|http://tmi.me", - ".tmpp.org", - "|http://tmpp.org", - ".tnaflix.com", - "||tnaflix.com", - ".tngrnow.com", - ".tngrnow.net", - ".tnp.org", - "|http://tnp.org", - ".to-porno.com", - "||to-porno.com", - "togetter.com", - ".tokyo-247.com", - ".tokyo-hot.com", - "||tokyo-porn-tube.com", - "||tokyocn.com", - "tw.tomonews.net", - ".tongil.or.kr", - ".tono-oka.jp", - "tonyyan.net", - ".toodoc.com", - "toonel.net", - "top81.ws", - ".topnews.in", - ".toppornsites.com", - "|http://toppornsites.com", - ".torguard.net", - "||torguard.net", - "||top.tv", - ".topshareware.com", - ".topsy.com", - "||topsy.com", - "||toptip.ca", - "tora.to", - ".torcn.com", - ".torproject.org", - "||torproject.org", - "torrentprivacy.com", - "||torrentprivacy.com", - "|http://torrentproject.se", - "||torrenty.org", - "||torrentz.eu", - "||torvpn.com", - "||totalvpn.com", - ".toutiaoabc.com", - "towngain.com", - "toypark.in", - "toytractorshow.com", - ".tparents.org", - ".tpi.org.tw", - "||tpi.org.tw", - "traffichaus.com", - "||transparency.org", - "||treemall.com.tw", - "trendsmap.com", - "||trendsmap.com", - ".trialofccp.org", - "||trialofccp.org", - ".trimondi.de/SDLE", - ".trouw.nl", - "|http://trouw.nl", - ".trt.net.tr", - "trtc.com.tw", - ".truebuddha-md.org", - "|http://truebuddha-md.org", - "trulyergonomic.com", - ".truth101.co.tv", - "|http://truth101.co.tv", - ".truthontour.org", - "|http://truthontour.org", - ".truveo.com", - ".tsctv.net", - ".tsemtulku.com", - "tsquare.tv", - ".tsu.org.tw", - "tsunagarumon.com", - ".tsctv.net", - "||tt1069.com", - ".tttan.com", - "||tttan.com", - "bb.ttv.com.tw/bb", - "tu8964.com", - ".tubaholic.com", - ".tube.com", - "tube8.com", - "||tube8.com", - ".tube911.com", - "||tube911.com", - ".tubecup.com", - ".tubegals.com", - ".tubeislam.com", - "|http://tubeislam.com", - ".tubestack.com", - "||tubewolf.com", - ".tuibeitu.net", - "tuidang.net", - ".tuidang.org", - "||tuidang.org", - ".tuidang.se", - "bbs.tuitui.info", - ".tumutanzi.com", - "|http://tumutanzi.com", - "||tumview.com", - ".tunein.com", - "|http://tunein.com", - "||tunnelbear.com", - ".tunnelr.com", - "||tunnelr.com", - ".tuo8.blue", - "||tuo8.blue", - ".tuo8.cc", - ".tuo8.club", - "||tuo8.club", - ".tuo8.fit", - ".tuo8.hk", - ".tuo8.in", - ".tuo8.ninja", - ".tuo8.org", - "||tuo8.fit", - "||tuo8.org", - ".tuo8.pw", - "|http://tuo8.pw", - "||tuo8.red", - ".tuo8.space", - "tuitwit.com", - ".turansam.org", - ".turbobit.net", - "|http://turbobit.net", - ".turbohide.com", - "||turbohide.com", - ".tushycash.com", - "|http://tushycash.com", - "||app.tutanota.com", - ".tuvpn.com", - "||tuvpn.com", - "|http://tuzaijidi.com", - "|http://*.tuzaijidi.com", - ".tw01.org", - "|http://tw01.org", - ".tumblr.com", - "||tumblr.com", - "||lecloud.net", - "|http://cosmic.monar.ch", - "||slutmoonbeam.com", - "|http://blog.soylent.com", - ".tv.com", - "|http://tv.com", - "tvants.com", - "forum.tvb.com", - "news.tvb.com/list/world", - "news.tvb.com/local", - "news.tvbs.com.tw", - ".tvboxnow.com", - "|http://tvboxnow.com/", - "tvider.com", - ".tvmost.com.hk", - ".tvplayvideos.com", - "||tvunetworks.com", - ".tw-blog.com", - "|https://tw-blog.com", - ".tw-npo.org", - ".twaitter.com", - "twapperkeeper.com", - "||twapperkeeper.com", - "||twaud.io", - ".twaud.io", - ".twavi.com", - ".twbbs.net.tw", - "twbbs.org", - "twbbs.tw", - "||twblogger.com", - "tweepmag.com", - ".tweepml.org", - "||tweepml.org", - ".tweetbackup.com", - "||tweetbackup.com", - "tweetboard.com", - "||tweetboard.com", - ".tweetboner.biz", - "||tweetboner.biz", - ".tweetcs.com", - "|http://tweetcs.com", - "|http://deck.ly", - "||mtw.tl", - "||tweetedtimes.com", - "||tweetmylast.fm", - "tweetphoto.com", - "||tweetphoto.com", - "||tweetrans.com", - "tweetree.com", - "||tweetree.com", - ".tweettunnel.com", - "||tweettunnel.com", - "||tweetwally.com", - "tweetymail.com", - "||twelve.today", - ".tweez.net", - "|http://tweez.net", - "||twftp.org", - "||twgreatdaily.com", - "twibase.com", - ".twibble.de", - "||twibble.de", - "twibbon.com", - "||twibs.com", - ".twicountry.org", - "|http://twicountry.org", - "twicsy.com", - ".twiends.com", - "|http://twiends.com", - ".twifan.com", - "|http://twifan.com", - "twiffo.com", - "||twiffo.com", - ".twilightsex.com", - "twilog.org", - "twimbow.com", - "||twindexx.com", - "twipple.jp", - "||twipple.jp", - "||twip.me", - "twishort.com", - "||twishort.com", - "twistar.cc", - "||twister.net.co", - "||twisterio.com", - "twisternow.com", - "twistory.net", - "twitbrowser.net", - "||twitcause.com", - "||twitgether.com", - "||twiggit.org", - "twitgoo.com", - "twitiq.com", - "||twitiq.com", - ".twitlonger.com", - "||twitlonger.com", - "|http://tl.gd/", - "twitmania.com", - "twitoaster.com", - "||twitoaster.com", - "||twitonmsn.com", - ".twit2d.com", - "||twit2d.com", - ".twitstat.com", - "||twitstat.com", - "||firstfivefollowers.com", - "||retweeteffect.com", - "||tweeplike.me", - "||tweepguide.com", - "||turbotwitter.com", - ".twitvid.com", - "||twitvid.com", - "|http://twt.tl", - "twittbot.net", - "||ads-twitter.com", - "||twttr.com", - "||twitter4j.org", - ".twittercounter.com", - "||twittercounter.com", - "twitterfeed.com", - ".twittergadget.com", - "||twittergadget.com", - ".twitterkr.com", - "||twitterkr.com", - "||twittermail.com", - "||twitterrific.com", - "twittertim.es", - "||twittertim.es", - "twitthat.com", - "||twitturk.com", - ".twitturly.com", - "||twitturly.com", - ".twitzap.com", - "twiyia.com", - "||twstar.net", - ".twtkr.com", - "|http://twtkr.com", - ".twnorth.org.tw", - "twskype.com", - "twtrland.com", - "twurl.nl", - ".twyac.org", - "||twyac.org", - ".txxx.com", - ".tycool.com", - "||tycool.com", - "||typepad.com", - "@@||www.typepad.com", - "@@||static.typepad.com", - "||blog.expofutures.com", - "||legaltech.law.com", - "||blogs.tampabay.com", - "||contests.twilio.com", - ".embr.in", - "||embr.in", - ".u9un.com", - "||u9un.com", - ".ubddns.org", - "|http://ubddns.org", - "||uberproxy.net", - ".uc-japan.org", - "||uc-japan.org", - ".srcf.ucam.org/salon/", - "|http://china.ucanews.com/", - "||ucdc1998.org", - "|http://hum*.uchicago.edu/faculty/ywang/history", - "||uderzo.it", - ".udn.com", - "||udn.com", - "||udn.com.tw", - "udnbkk.com/bbs", - "||uforadio.com.tw", - "ufreevpn.com", - ".ugo.com", - "||uhdwallpapers.org", - "||uhrp.org", - ".uighur.nl", - "||uighur.nl", - "uighurbiz.net", - ".ulike.net", - "ukcdp.co.uk", - "ukliferadio.co.uk", - "||ukliferadio.co.uk", - "ultravpn.fr", - "||ultravpn.fr", - "ultraxs.com", - "umich.edu/~falun", - "||unblock.cn.com", - ".unblocker.yt", - "unblock-us.com", - "||unblock-us.com", - ".unblockdmm.com", - "|http://unblockdmm.com", - "||unblocksit.es", - "uncyclomedia.org", - ".uncyclopedia.hk/wiki", - "|http://uncyclopedia.hk", - "|http://uncyclopedia.tw", - "underwoodammo.com", - "||underwoodammo.com", - "||unholyknight.com", - ".uni.cc", - "||cldr.unicode.org", - ".unification.net", - ".unification.org.tw", - "||unirule.cloud", - ".unitedsocialpress.com", - ".unix100.com", - "||unknownspace.org", - ".unodedos.com", - "unpo.org", - ".untraceable.us", - "|http://untraceable.us", - "||uocn.org", - "tor.updatestar.com", - ".upholdjustice.org", - ".upload4u.info", - "uploaded.net/file", - "|http://uploaded.net/file", - "|http://uploaded.to/file", - ".uploadstation.com/file", - ".upmedia.mg", - "||upmedia.mg", - ".upornia.com", - "|http://upornia.com", - "||uproxy.org", - "|http://tor.cn.uptodown.com/", - ".upwill.org", - "ur7s.com", - "||urbansurvival.com", - "myshare.url.com.tw/", - "||urlborg.com", - "||urlparser.com", - "us.to", - "||usacn.com", - ".usaip.eu", - "||usaip.eu", - "dalailama.usc.edu", - "iipdigital.usembassy.gov", - "||usfk.mil", - "||usma.edu", - "||usmc.mil", - ".usocctn.com", - "|http://tarr.uspto.gov/", - "||tsdr.uspto.gov", - ".ustream.tv", - "||ustream.tv", - ".usunitednews.com", - "|http://usunitednews.com", - "usus.cc", - ".utopianpal.com", - "||utopianpal.com", - ".uu-gg.com", - ".uvwxyz.xyz", - "||uvwxyz.xyz", - ".uwants.com", - ".uwants.net", - "uyghur.co.uk", - "|http://uyghur-j.org", - "||uyghuramerican.org", - ".uyghurcanadiansociety.org", - ".uyghurensemble.co.uk", - "||uyghurcongress.org", - ".uyghurpen.org", - ".uyghurpress.com", - "|https://uyghurpress.com", - ".uyghurstudies.org", - "|http://uyghurstudies.org", - "uygur.org", - "|http://uymaarip.com/", - ".v2ray.com", - "||v2ray.com", - ".van001.com", - ".van698.com", - ".vanemu.cn", - ".vanilla-jp.com", - ".vanpeople.com", - "vansky.com", - "||vaticannews.va", - "||vcf-online.org", - "||vcfbuilder.org", - ".vegasred.com", - ".velkaepocha.sk", - ".venbbs.com", - ".venchina.com", - ".venetianmacao.com", - "||venetianmacao.com", - "veoh.com", - "mysite.verizon.net", - "vermonttibet.org", - ".versavpn.com", - "||versavpn.com", - "||verybs.com", - ".vft.com.tw", - ".viber.com", - "||viber.com", - ".vica.info", - ".victimsofcommunism.org", - "|http://victimsofcommunism.org", - "||vid.me", - "||vidble.com", - "videobam.com", - "||videobam.com", - ".videodetective.com", - ".videomega.tv", - "||videomega.tv", - ".videomo.com", - "videopediaworld.com", - ".videopress.com", - ".vidinfo.org/video", - "vietdaikynguyen.com", - ".vijayatemple.org", - "vimeo.com", - "||vimeo.com", - "||vimperator.org", - "||vincnd.com", - "||vinniev.com", - "|http://www.lib.virginia.edu/area-studies/Tibet/tibet.html", - ".virtualrealporn.com", - "||virtualrealporn.com", - "visibletweets.com", - "|http://ny.visiontimes.com", - ".vital247.org", - "||viu.com", - ".vivahentai4u.net", - ".vivatube.com", - ".vivthomas.com", - "||vivthomas.com", - ".vjav.com", - "||vjav.com", - ".vjmedia.com.hk", - ".vllcs.org", - "|http://vllcs.org", - "||vmixcore.com", - "||vnet.link", - "cn.voa.mobi", - "tw.voa.mobi", - ".voachineseblog.com", - "||voachineseblog.com", - "voagd.com", - ".voacantonese.com", - "||voacantonese.com", - "voachinese.com", - "||voachinese.com", - ".voanews.com", - "||voanews.com", - "voatibetan.com", - "||voatibetan.com", - ".voatibetanenglish.com", - "||voatibetanenglish.com", - ".vocativ.com", - "vocn.tv", - ".vot.org", - "||vot.org", - ".vovo2000.com", - "|http://vovo2000.com", - ".voxer.com", - "||voxer.com", - ".voy.com", - "||vpn.ac", - ".vpn4all.com", - "||vpn4all.com", - ".vpnaccount.org", - "|http://vpnaccount.org", - ".vpnaccounts.com", - "||vpnaccounts.com", - ".vpncomparison.org", - ".vpncup.com", - "||vpncup.com", - "vpnbook.com", - ".vpncoupons.com", - "|http://vpncoupons.com", - ".vpndada.com", - "||vpndada.com", - ".vpnfan.com", - "vpnfire.com", - ".vpnfires.biz", - ".vpnforgame.net", - "||vpnforgame.net", - "||vpngate.jp", - ".vpngate.net", - "||vpngate.net", - ".vpngratis.net", - "vpnhq.com", - ".vpnmaster.com", - "||vpnmaster.com", - ".vpnmentor.com", - "||vpnmentor.com", - ".vpninja.net", - "||vpninja.net", - ".vpnintouch.com", - "||vpnintouch.net", - "vpnjack.com", - "||vpnjack.com", - ".vpnpick.com", - "||vpnpick.com", - "||vpnpop.com", - "||vpnpronet.com", - ".vpnreactor.com", - "||vpnreactor.com", - "||vpnreviewz.com", - ".vpnsecure.me", - "||vpnsecure.me", - ".vpnshazam.com", - "||vpnshazam.com", - ".vpnshieldapp.com", - "||vpnshieldapp.com", - ".vpnsp.com", - ".vpntraffic.com", - ".vpntunnel.com", - "||vpntunnel.com", - ".vpnuk.info", - "||vpnuk.info", - "||vpnunlimitedapp.com", - ".vpnvip.com", - "||vpnvip.com", - ".vpnworldwide.com", - ".vporn.com", - "||vporn.com", - ".vpser.net", - "@@||vpser.net", - "vraiesagesse.net", - ".vrmtr.com", - "||vtunnel.com", - "||vuku.cc", - "lists.w3.org/archives/public", - "||w3schools.com", - "||waffle1999.com", - ".wahas.com", - ".waigaobu.com", - "waikeung.org/php_wind", - ".wailaike.net", - ".waiwaier.com", - "|http://waiwaier.com", - "||wallmama.com", - "wallornot.org", - "||wallpapercasa.com", - ".wallproxy.com", - "@@||wallproxy.com.cn", - "||waltermartin.com", - "||waltermartin.org", - "||www.wan-press.org", - "||wanderinghorse.net", - "||wangafu.net", - "||wangjinbo.org", - ".wangjinbo.org", - "wanglixiong.com", - ".wango.org", - "||wango.org", - "wangruoshui.net", - "www.wangruowang.org", - "want-daily.com", - "wapedia.mobi/zhsimp", - "||waselpro.com", - ".watchinese.com", - ".wattpad.com", - "||wattpad.com", - ".makzhou.warehouse333.com", - "washeng.net", - ".watch8x.com", - "||watchmygf.net", - "||wav.tv", - ".wdf5.com", - ".wearehairy.com", - ".wearn.com", - "||wearn.com", - "|http://hkcoc.weather.com.hk", - "||hudatoriq.web.id", - "||web2project.net", - "webbang.net", - ".webevader.org", - ".webfreer.com", - "weblagu.com", - ".webjb.org", - ".webrush.net", - "webs-tv.net", - ".websitepulse.com/help/testtools.china-test", - "|http://www.websnapr.com", - ".webwarper.net", - "|http://webwarper.net", - "webworkerdaily.com", - ".weekmag.info", - "||wefightcensorship.org", - ".wefong.com", - "weiboleak.com", - ".weihuo.org", - "weijingsheng.org", - ".weiming.info", - "||weiming.info", - "weiquanwang.org", - "|http://weisuo.ws", - ".welovecock.com", - ".wemigrate.org", - "|http://wemigrate.org", - "wengewang.com", - "||wengewang.org", - ".wenhui.ch", - "|http://trans.wenweipo.com/gb/", - ".wenxuecity.com", - "||wenxuecity.com", - ".wenyunchao.com", - "||wenyunchao.com", - ".westca.com", - "||westca.com", - "||westernwolves.com", - ".westkit.net", - "||westpoint.edu", - ".westernshugdensociety.org", - "wetpussygames.com", - ".wetplace.com", - "wexiaobo.org", - "||wexiaobo.org", - "wezhiyong.org", - "||wezone.net", - ".wforum.com", - "||wforum.com/", - ".whatblocked.com", - "||whatblocked.com", - ".wheatseeds.org", - "||wheelockslatin.com", - ".whippedass.com", - ".whoer.net", - "||whoer.net", - "whotalking.com", - "whylover.com", - "||whyx.org", - "|http://zh.ecdm.wikia.com", - "|http://evchk.wikia.com", - "fq.wikia.com", - "zh.pttpedia.wikia.com/wiki/%E7%BF%92%E5%8C%85%E5%AD%90%E4%B9%8B%E4%BA%82", - "cn.uncyclopedia.wikia.com", - "zh.uncyclopedia.wikia.com", - "||wikileaks.ch", - "||wikileaks.com", - "||wikileaks.de", - "||wikileaks.eu", - "||wikileaks.lu", - ".wikileaks.org", - "||wikileaks.org", - "||wikileaks.pl", - ".wikileaks-forum.com", - "wildammo.com", - ".williamhill.com", - "||collateralmurder.com", - "||collateralmurder.org", - "wikilivres.info/wiki/%E9%9B%B6%E5%85%AB%E5%AE%AA%E7%AB%A0", - "||wikimapia.org", - "|http://zh.wikisource.org", - "||zh.wikinews.org", - "||ja.wikipedia.org", - "||wikipedia.org", - "||wikiwiki.jp", - "||casino.williamhill.com", - "||sports.williamhill.com", - "||vegas.williamhill.com", - "||willw.net", - "||windowsphoneme.com", - ".windscribe.com", - "||windscribe.com", - "||community.windy.com", - "||wingy.site", - ".winning11.com", - "winwhispers.info", - "||wiredbytes.com", - "||wiredpen.com", - ".wisdompubs.org", - ".wisevid.com", - "||wisevid.com", - ".witnessleeteaching.com", - ".witopia.net", - ".wjbk.org", - "||wjbk.org", - "|http://wn.com", - ".wnacg.com", - ".wnacg.org", - ".wo.tc", - "||woeser.com", - "|http://woesermiddle-way.net/", - ".wokar.org", - "|http://wokar.org", - "wolfax.com", - "||wolfax.com", - "||woolyss.com", - "woopie.jp", - "||woopie.jp", - "woopie.tv", - "||woopie.tv", - "||workatruna.com", - ".workerdemo.org.hk", - ".workerempowerment.org", - "||workersthebig.net", - ".worldcat.org", - "worldjournal.com", - ".worldvpn.net", - "||worldvpn.net", - "||videopress.com", - ".wordpress.com", - "|http://*.wordpress.com", - "||chenshan20042005.wordpress.com", - "||chinaview.wordpress.com", - "||cnbbnews.wordpress.com", - "||freedominfonetweb.wordpress.com", - "||hka8964.wordpress.com", - "||hkanews.wordpress.com", - "||hqsbnet.wordpress.com", - "||hqsbonline.wordpress.com", - "||investigating.wordpress.com", - "||jobnewera.wordpress.com", - "||minghuiyw.wordpress.com", - "||wo3ttt.wordpress.com", - "||sujiatun.wordpress.com", - "||xijie.wordpress.com", - "||wp.com", - ".wow.com", - ".wow-life.net", - "||wowlegacy.ml", - "||wowporn.com", - "||wowgirls.com", - ".wowrk.com", - "woxinghuiguo.com", - ".woyaolian.org", - "|http://woyaolian.org", - ".wpoforum.com", - "||wpoforum.com", - ".wqyd.org", - "||wqyd.org", - "wrchina.org", - "wretch.cc", - ".wsj.com", - "||wsj.com", - ".wsj.net", - "||wsj.net", - ".wsjhk.com", - ".wtbn.org", - ".wtfpeople.com", - "wuerkaixi.com", - "||wufafangwen.com", - "wufi.org.tw", - "||wuguoguang.com", - "wujie.net", - "wujieliulan.com", - "||wujieliulan.com", - "wukangrui.net", - "||wuw.red", - "||wuyanblog.com", - ".wwitv.com", - "||wwitv.com", - "wzyboy.im/post/160", - ".x-berry.com", - "||x-berry.com", - "||x-art.com", - "||x-wall.org", - "x1949x.com", - "x365x.com", - "xanga.com", - "||xbabe.com", - ".xbookcn.com", - "||xbookcn.com", - "||xcafe.in", - "||xcity.jp", - ".xcritic.com", - "|http://cdn*.xda-developers.com", - ".xerotica.com", - "destiny.xfiles.to/ubbthreads", - ".xfm.pp.ru", - ".xgmyd.com", - "||xgmyd.com", - "xhamster.com", - "||xhamster.com", - ".xianba.net", - ".xianchawang.net", - ".xianjian.tw", - "|http://xianjian.tw", - ".xianqiao.net", - ".xiaobaiwu.com", - ".xiaochuncnjp.com", - ".xiaod.in", - ".xiaohexie.com", - "||xiaolan.me", - "||xiaoma.org", - "||xiaohexie.com", - "xiezhua.com", - ".xihua.es", - "forum.xinbao.de/forum", - ".xing.com", - "|http://xing.com", - ".xinmiao.com.hk", - "||xinmiao.com.hk", - "xinsheng.net", - "xinshijue.com", - "xinhuanet.org", - "|http://xinyubbs.net", - ".xiongpian.com", - ".xiuren.org", - "xizang-zhiye.org", - "xjp.cc", - "||xjp.cc", - "||xjtravelguide.com", - "xlfmtalk.com", - "||xlfmwz.info", - "||xml-training-guide.com", - "xmovies.com", - "||xnxx.com", - "xpdo.net", - "||xpud.org", - ".xrentdvd.com", - ".xskywalker.net", - "||xtube.com", - "blog.xuite.net", - "vlog.xuite.net", - "xuzhiyong.net", - "||xuchao.org", - "xuchao.net", - "||xuchao.net", - "xvideo.cc", - ".xvideos.com", - "||xvideos.com", - "||xvideos.es", - ".xkiwi.tk/", - ".xxbbx.com", - ".xxlmovies.com", - "||xxx.com", - ".xxx.xxx", - "|http://xxx.xxx", - ".xxxfuckmom.com", - "||xxxx.com.au", - ".xxxymovies.com", - "|http://xxxymovies.com", - "xys.org", - "xysblogs.org", - "xyy69.com", - "xyy69.info", - "||yakbutterblues.com", - "||yam.com", - "||yam.org.tw", - ".yanghengjun.com", - "yangjianli.com", - ".yasni.co.uk", - "||yasni.co.uk", - ".yayabay.com/forum", - ".ydy.com", - ".yeahteentube.com", - "||yeahteentube.com", - "||yecl.net", - "||yeelou.com", - "yeeyi.com", - "yegle.net", - "||yegle.net", - ".yes.xxx", - "||yes123.com.tw", - "||yesasia.com", - "||yesasia.com.hk", - ".yes-news.com", - "|http://yes-news.com", - ".yespornplease.com", - "||yespornplease.com", - "|http://yeyeclub.com", - "||yhcw.net", - ".yibada.com", - ".yibaochina.com", - ".yidio.com", - "||yidio.com", - "yilubbs.com", - "xa.yimg.com", - ".yingsuoss.com", - ".yipub.com", - "||yipub.com", - "yinlei.org/mt", - ".yizhihongxing.com", - ".yobt.com", - ".yobt.tv", - "||yobt.tv", - ".yogichen.org", - "||yogichen.org", - ".yolasite.com", - ".yomiuri.co.jp", - "yong.hu", - ".yorkbbs.ca", - "||youxu.info", - ".youjizz.com", - "||youjizz.com", - ".youmaker.com", - "||youmaker.com", - ".youngpornvideos.com", - "youngspiration.hk", - ".youpai.org", - "||youpai.org", - ".your-freedom.net", - "||yourepeat.com", - ".yourprivatevpn.com", - "||yourprivatevpn.com", - ".yousendit.com", - "||yousendit.com", - ".youthnetradio.org/tmit/forum", - "blog.youthwant.com.tw", - "me.youthwant.com.tw", - "share.youthwant.com.tw", - "topic.youthwant.com.tw", - ".youporn.com", - "||youporn.com", - ".youporngay.com", - "||youporngay.com", - ".yourlisten.com", - "|http://yourlisten.com", - ".yourlust.com", - "|http://yourlust.com", - "youshun12.com", - ".youtubecn.com", - "youversion.com", - "||youversion.com", - "blog.youxu.info/2010/03/14/west-chamber", - "ytht.net", - "yuanming.net", - ".yuanzhengtang.org", - ".yulghun.com", - "||yunchao.net", - "||yuntipub.com", - ".yuvutu.com", - "||yvesgeleyn.com", - ".ywpw.com/forums/history/post/A0/p0/html/227", - "yx51.net", - ".yyii.org", - "||yyii.org", - ".yzzk.com", - "|http://yzzk.com", - "zacebook.com", - ".zalmos.com", - "||zalmos.com", - "||zannel.com", - ".zaobao.com", - "||zaobao.com", - "|http://zaobao.com.sg", - "||zaobao.com.sg", - ".zaozon.com", - "||zdnet.com.tw", - ".zello.com", - "||zello.com", - ".zengjinyan.org", - ".zenmate.com", - "||zenmate.com", - "||zenmate.com.ru", - "||zeronet.io", - "||zeutch.com", - ".zfreet.com", - ".zgsddh.com", - "zgzcjj.net", - ".zhanbin.net", - "||zhanbin.net", - ".zhangboli.net", - "||zhangtianliang.com", - "||zhanlve.org", - "zhenghui.org", - ".zhengjian.org", - "||zhengjian.org", - "zhengwunet.org", - "zhenlibu.info", - "||zhenlibu.info", - ".zhenlibu1984.com", - "||zhenlibu1984.com", - "|http://zhenxiang.biz", - ".zhinengluyou.com", - "zhongguo.ca", - "|http://zhongguorenquan.org", - "zhongguotese.net", - "||zhongguotese.net", - "||zhongmeng.org", - ".zhoushuguang.com", - "||zhreader.com", - ".zhuangbi.me", - "||zhuangbi.me", - ".zhuanxing.cn", - "||zhuatieba.com", - "zhuichaguoji.org", - "||zhuichaguoji.org", - "|http://book.zi5.me", - ".ziddu.com/download", - "||zillionk.com", - ".zinio.com", - "||zinio.com", - ".ziporn.com", - ".zippyshare.com", - ".zkaip.com", - "||zkaip.com", - "realforum.zkiz.com", - "||zmw.cn", - ".zodgame.us", - "zomobo.net", - ".zonaeuropa.com", - "||zonaeuropa.com", - "||zonghexinwen.com", - ".zonghexinwen.net", - "||zoogvpn.com", - "||zootool.com", - ".zoozle.net", - "writer.zoho.com", - "||zorrovpn.com", - "||zpn.im", - "||zspeeder.me", - ".zsrhao.com", - ".zuo.la", - "||zuo.la", - "||zuobiao.me", - ".zuola.com", - "||zuola.com", - "||zvereff.com", - ".zynaima.com", - "zyzc9.com", - ".zzcartoon.com", - "64memo", - "aHR0cHM6Ly95ZWNsLm5ldA", - "freenet", - ".google.*/falun", - "phobos.apple.com*/video", - "q=freedom", - "q%3Dfreedom", - "remembering_tiananmen_20_years", - "search*safeweb", - "q=triangle", - "q%3DTriangle", - "ultrareach", - "ultrasurf", - "@@||aliyun.com", - "@@||baidu.com", - "@@||chinaso.com", - "@@||chinaz.com", - "@@|http://nrch.culture.tw/", - "@@||adservice.google.com", - "@@||dl.google.com", - "@@||kh.google.com", - "@@||khm.google.com", - "@@||khm0.google.com", - "@@||khm1.google.com", - "@@||khm2.google.com", - "@@||khm3.google.com", - "@@||khmdb.google.com", - "@@||tools.google.com", - "@@||clientservices.googleapis.com", - "@@||fonts.googleapis.com", - "@@||khm.googleapis.com", - "@@||khm0.googleapis.com", - "@@||khm1.googleapis.com", - "@@||khm2.googleapis.com", - "@@||khm3.googleapis.com", - "@@||khmdb.googleapis.com", - "@@||storage.googleapis.com", - "@@||translate.googleapis.com", - "@@||update.googleapis.com", - "@@||safebrowsing.googleapis.com", - "@@||cn.gravatar.com", - "@@||connectivitycheck.gstatic.com", - "@@||csi.gstatic.com", - "@@||fonts.gstatic.com", - "@@||ssl.gstatic.com", - "@@||haosou.com", - "@@||ip.cn", - "@@||jike.com", - "@@|http://translate.google.cn", - "@@|http://www.google.cn/maps", - "@@||http2.golang.org", - "@@||gov.cn", - "@@||qq.com", - "@@||sina.cn", - "@@||sina.com.cn", - "@@||sogou.com", - "@@||so.com", - "@@||soso.com", - "@@||uluai.com.cn", - "@@||weibo.com", - "@@||yahoo.cn", - "@@||youdao.com", - "@@||zhongsou.com", - "@@|http://ime.baidu.jp" -]; - -/* -* This file is part of Adblock Plus , -* Copyright (C) 2006-2014 Eyeo GmbH -* -* Adblock Plus is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 3 as -* published by the Free Software Foundation. -* -* Adblock Plus is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with Adblock Plus. If not, see . -*/ - -function createDict() -{ - var result = {}; - result.__proto__ = null; - return result; -} - -function getOwnPropertyDescriptor(obj, key) -{ - if (obj.hasOwnProperty(key)) - { - return obj[key]; - } - return null; -} - -function extend(subclass, superclass, definition) -{ - if (Object.__proto__) - { - definition.__proto__ = superclass.prototype; - subclass.prototype = definition; - } - else - { - var tmpclass = function(){}, ret; - tmpclass.prototype = superclass.prototype; - subclass.prototype = new tmpclass(); - subclass.prototype.constructor = superclass; - for (var i in definition) - { - if (definition.hasOwnProperty(i)) - { - subclass.prototype[i] = definition[i]; - } - } - } -} - -function Filter(text) -{ - this.text = text; - this.subscriptions = []; -} -Filter.prototype = { - text: null, - subscriptions: null, - toString: function() - { - return this.text; - } -}; -Filter.knownFilters = createDict(); -Filter.elemhideRegExp = /^([^\/\*\|\@"!]*?)#(\@)?(?:([\w\-]+|\*)((?:\([\w\-]+(?:[$^*]?=[^\(\)"]*)?\))*)|#([^{}]+))$/; -Filter.regexpRegExp = /^(@@)?\/.*\/(?:\$~?[\w\-]+(?:=[^,\s]+)?(?:,~?[\w\-]+(?:=[^,\s]+)?)*)?$/; -Filter.optionsRegExp = /\$(~?[\w\-]+(?:=[^,\s]+)?(?:,~?[\w\-]+(?:=[^,\s]+)?)*)$/; -Filter.fromText = function(text) -{ - if (text in Filter.knownFilters) - { - return Filter.knownFilters[text]; - } - var ret; - if (text.charAt(0) == "!") - { - ret = new CommentFilter(text); - } - else - { - ret = RegExpFilter.fromText(text); - } - Filter.knownFilters[ret.text] = ret; - return ret; -}; - -function InvalidFilter(text, reason) -{ - Filter.call(this, text); - this.reason = reason; -} -extend(InvalidFilter, Filter, { - reason: null -}); - -function CommentFilter(text) -{ - Filter.call(this, text); -} -extend(CommentFilter, Filter, { -}); - -function ActiveFilter(text, domains) -{ - Filter.call(this, text); - this.domainSource = domains; -} -extend(ActiveFilter, Filter, { - domainSource: null, - domainSeparator: null, - ignoreTrailingDot: true, - domainSourceIsUpperCase: false, - getDomains: function() - { - var prop = getOwnPropertyDescriptor(this, "domains"); - if (prop) - { - return prop; - } - var domains = null; - if (this.domainSource) - { - var source = this.domainSource; - if (!this.domainSourceIsUpperCase) - { - source = source.toUpperCase(); - } - var list = source.split(this.domainSeparator); - if (list.length == 1 && (list[0]).charAt(0) != "~") - { - domains = createDict(); - domains[""] = false; - if (this.ignoreTrailingDot) - { - list[0] = list[0].replace(/\.+$/, ""); - } - domains[list[0]] = true; - } - else - { - var hasIncludes = false; - for (var i = 0; i < list.length; i++) - { - var domain = list[i]; - if (this.ignoreTrailingDot) - { - domain = domain.replace(/\.+$/, ""); - } - if (domain == "") - { - continue; - } - var include; - if (domain.charAt(0) == "~") - { - include = false; - domain = domain.substr(1); - } - else - { - include = true; - hasIncludes = true; - } - if (!domains) - { - domains = createDict(); - } - domains[domain] = include; - } - domains[""] = !hasIncludes; - } - this.domainSource = null; - } - return this.domains; - }, - sitekeys: null, - isActiveOnDomain: function(docDomain, sitekey) - { - if (this.getSitekeys() && (!sitekey || this.getSitekeys().indexOf(sitekey.toUpperCase()) < 0)) - { - return false; - } - if (!this.getDomains()) - { - return true; - } - if (!docDomain) - { - return this.getDomains()[""]; - } - if (this.ignoreTrailingDot) - { - docDomain = docDomain.replace(/\.+$/, ""); - } - docDomain = docDomain.toUpperCase(); - while (true) - { - if (docDomain in this.getDomains()) - { - return this.domains[docDomain]; - } - var nextDot = docDomain.indexOf("."); - if (nextDot < 0) - { - break; - } - docDomain = docDomain.substr(nextDot + 1); - } - return this.domains[""]; - }, - isActiveOnlyOnDomain: function(docDomain) - { - if (!docDomain || !this.getDomains() || this.getDomains()[""]) - { - return false; - } - if (this.ignoreTrailingDot) - { - docDomain = docDomain.replace(/\.+$/, ""); - } - docDomain = docDomain.toUpperCase(); - for (var domain in this.getDomains()) - { - if (this.domains[domain] && domain != docDomain && (domain.length <= docDomain.length || domain.indexOf("." + docDomain) != domain.length - docDomain.length - 1)) - { - return false; - } - } - return true; - } -}); - -function RegExpFilter(text, regexpSource, contentType, matchCase, domains, thirdParty, sitekeys) -{ - ActiveFilter.call(this, text, domains, sitekeys); - if (contentType != null) - { - this.contentType = contentType; - } - if (matchCase) - { - this.matchCase = matchCase; - } - if (thirdParty != null) - { - this.thirdParty = thirdParty; - } - if (sitekeys != null) - { - this.sitekeySource = sitekeys; - } - if (regexpSource.length >= 2 && regexpSource.charAt(0) == "/" && regexpSource.charAt(regexpSource.length - 1) == "/") - { - var regexp = new RegExp(regexpSource.substr(1, regexpSource.length - 2), this.matchCase ? "" : "i"); - this.regexp = regexp; - } - else - { - this.regexpSource = regexpSource; - } -} -extend(RegExpFilter, ActiveFilter, { - domainSourceIsUpperCase: true, - length: 1, - domainSeparator: "|", - regexpSource: null, - getRegexp: function() - { - var prop = getOwnPropertyDescriptor(this, "regexp"); - if (prop) - { - return prop; - } - var source = this.regexpSource.replace(/\*+/g, "*").replace(/\^\|$/, "^").replace(/\W/g, "\\$&").replace(/\\\*/g, ".*").replace(/\\\^/g, "(?:[\\x00-\\x24\\x26-\\x2C\\x2F\\x3A-\\x40\\x5B-\\x5E\\x60\\x7B-\\x7F]|$)").replace(/^\\\|\\\|/, "^[\\w\\-]+:\\/+(?!\\/)(?:[^\\/]+\\.)?").replace(/^\\\|/, "^").replace(/\\\|$/, "$").replace(/^(\.\*)/, "").replace(/(\.\*)$/, ""); - var regexp = new RegExp(source, this.matchCase ? "" : "i"); - this.regexp = regexp; - return regexp; - }, - contentType: 2147483647, - matchCase: false, - thirdParty: null, - sitekeySource: null, - getSitekeys: function() - { - var prop = getOwnPropertyDescriptor(this, "sitekeys"); - if (prop) - { - return prop; - } - var sitekeys = null; - if (this.sitekeySource) - { - sitekeys = this.sitekeySource.split("|"); - this.sitekeySource = null; - } - this.sitekeys = sitekeys; - return this.sitekeys; - }, - matches: function(location, contentType, docDomain, thirdParty, sitekey) - { - if (this.getRegexp().test(location) && this.isActiveOnDomain(docDomain, sitekey)) - { - return true; - } - return false; - } -}); -RegExpFilter.prototype["0"] = "#this"; -RegExpFilter.fromText = function(text) -{ - var blocking = true; - var origText = text; - if (text.indexOf("@@") == 0) - { - blocking = false; - text = text.substr(2); - } - var contentType = null; - var matchCase = null; - var domains = null; - var sitekeys = null; - var thirdParty = null; - var collapse = null; - var options; - var match = text.indexOf("$") >= 0 ? Filter.optionsRegExp.exec(text) : null; - if (match) - { - options = match[1].toUpperCase().split(","); - text = match.input.substr(0, match.index); - for (var _loopIndex6 = 0; _loopIndex6 < options.length; ++_loopIndex6) - { - var option = options[_loopIndex6]; - var value = null; - var separatorIndex = option.indexOf("="); - if (separatorIndex >= 0) - { - value = option.substr(separatorIndex + 1); - option = option.substr(0, separatorIndex); - } - option = option.replace(/-/, "_"); - if (option in RegExpFilter.typeMap) - { - if (contentType == null) - { - contentType = 0; - } - contentType |= RegExpFilter.typeMap[option]; - } - else if (option.charAt(0) == "~" && option.substr(1) in RegExpFilter.typeMap) - { - if (contentType == null) - { - contentType = RegExpFilter.prototype.contentType; - } - contentType &= ~RegExpFilter.typeMap[option.substr(1)]; - } - else if (option == "MATCH_CASE") - { - matchCase = true; - } - else if (option == "~MATCH_CASE") - { - matchCase = false; - } - else if (option == "DOMAIN" && typeof value != "undefined") - { - domains = value; - } - else if (option == "THIRD_PARTY") - { - thirdParty = true; - } - else if (option == "~THIRD_PARTY") - { - thirdParty = false; - } - else if (option == "COLLAPSE") - { - collapse = true; - } - else if (option == "~COLLAPSE") - { - collapse = false; - } - else if (option == "SITEKEY" && typeof value != "undefined") - { - sitekeys = value; - } - else - { - return new InvalidFilter(origText, "Unknown option " + option.toLowerCase()); - } - } - } - if (!blocking && (contentType == null || contentType & RegExpFilter.typeMap.DOCUMENT) && (!options || options.indexOf("DOCUMENT") < 0) && !/^\|?[\w\-]+:/.test(text)) - { - if (contentType == null) - { - contentType = RegExpFilter.prototype.contentType; - } - contentType &= ~RegExpFilter.typeMap.DOCUMENT; - } - try - { - if (blocking) - { - return new BlockingFilter(origText, text, contentType, matchCase, domains, thirdParty, sitekeys, collapse); - } - else - { - return new WhitelistFilter(origText, text, contentType, matchCase, domains, thirdParty, sitekeys); - } - } - catch (e) - { - return new InvalidFilter(origText, e); - } -}; -RegExpFilter.typeMap = { - OTHER: 1, - SCRIPT: 2, - IMAGE: 4, - STYLESHEET: 8, - OBJECT: 16, - SUBDOCUMENT: 32, - DOCUMENT: 64, - XBL: 1, - PING: 1, - XMLHTTPREQUEST: 2048, - OBJECT_SUBREQUEST: 4096, - DTD: 1, - MEDIA: 16384, - FONT: 32768, - BACKGROUND: 4, - POPUP: 268435456, - ELEMHIDE: 1073741824 -}; -RegExpFilter.prototype.contentType &= ~ (RegExpFilter.typeMap.ELEMHIDE | RegExpFilter.typeMap.POPUP); - -function BlockingFilter(text, regexpSource, contentType, matchCase, domains, thirdParty, sitekeys, collapse) -{ - RegExpFilter.call(this, text, regexpSource, contentType, matchCase, domains, thirdParty, sitekeys); - this.collapse = collapse; -} -extend(BlockingFilter, RegExpFilter, { - collapse: null -}); - -function WhitelistFilter(text, regexpSource, contentType, matchCase, domains, thirdParty, sitekeys) -{ - RegExpFilter.call(this, text, regexpSource, contentType, matchCase, domains, thirdParty, sitekeys); -} -extend(WhitelistFilter, RegExpFilter, { -}); - -function Matcher() -{ - this.clear(); -} -Matcher.prototype = { - filterByKeyword: null, - keywordByFilter: null, - clear: function() - { - this.filterByKeyword = createDict(); - this.keywordByFilter = createDict(); - }, - add: function(filter) - { - if (filter.text in this.keywordByFilter) - { - return; - } - var keyword = this.findKeyword(filter); - var oldEntry = this.filterByKeyword[keyword]; - if (typeof oldEntry == "undefined") - { - this.filterByKeyword[keyword] = filter; - } - else if (oldEntry.length == 1) - { - this.filterByKeyword[keyword] = [oldEntry, filter]; - } - else - { - oldEntry.push(filter); - } - this.keywordByFilter[filter.text] = keyword; - }, - remove: function(filter) - { - if (!(filter.text in this.keywordByFilter)) - { - return; - } - var keyword = this.keywordByFilter[filter.text]; - var list = this.filterByKeyword[keyword]; - if (list.length <= 1) - { - delete this.filterByKeyword[keyword]; - } - else - { - var index = list.indexOf(filter); - if (index >= 0) - { - list.splice(index, 1); - if (list.length == 1) - { - this.filterByKeyword[keyword] = list[0]; - } - } - } - delete this.keywordByFilter[filter.text]; - }, - findKeyword: function(filter) - { - var result = ""; - var text = filter.text; - if (Filter.regexpRegExp.test(text)) - { - return result; - } - var match = Filter.optionsRegExp.exec(text); - if (match) - { - text = match.input.substr(0, match.index); - } - if (text.substr(0, 2) == "@@") - { - text = text.substr(2); - } - var candidates = text.toLowerCase().match(/[^a-z0-9%*][a-z0-9%]{3,}(?=[^a-z0-9%*])/g); - if (!candidates) - { - return result; - } - var hash = this.filterByKeyword; - var resultCount = 16777215; - var resultLength = 0; - for (var i = 0, l = candidates.length; i < l; i++) - { - var candidate = candidates[i].substr(1); - var count = candidate in hash ? hash[candidate].length : 0; - if (count < resultCount || count == resultCount && candidate.length > resultLength) - { - result = candidate; - resultCount = count; - resultLength = candidate.length; - } - } - return result; - }, - hasFilter: function(filter) - { - return filter.text in this.keywordByFilter; - }, - getKeywordForFilter: function(filter) - { - if (filter.text in this.keywordByFilter) - { - return this.keywordByFilter[filter.text]; - } - else - { - return null; - } - }, - _checkEntryMatch: function(keyword, location, contentType, docDomain, thirdParty, sitekey) - { - var list = this.filterByKeyword[keyword]; - for (var i = 0; i < list.length; i++) - { - var filter = list[i]; - if (filter == "#this") - { - filter = list; - } - if (filter.matches(location, contentType, docDomain, thirdParty, sitekey)) - { - return filter; - } - } - return null; - }, - matchesAny: function(location, contentType, docDomain, thirdParty, sitekey) - { - var candidates = location.toLowerCase().match(/[a-z0-9%]{3,}/g); - if (candidates === null) - { - candidates = []; - } - candidates.push(""); - for (var i = 0, l = candidates.length; i < l; i++) - { - var substr = candidates[i]; - if (substr in this.filterByKeyword) - { - var result = this._checkEntryMatch(substr, location, contentType, docDomain, thirdParty, sitekey); - if (result) - { - return result; - } - } - } - return null; - } -}; - -function CombinedMatcher() -{ - this.blacklist = new Matcher(); - this.whitelist = new Matcher(); - this.resultCache = createDict(); -} -CombinedMatcher.maxCacheEntries = 1000; -CombinedMatcher.prototype = { - blacklist: null, - whitelist: null, - resultCache: null, - cacheEntries: 0, - clear: function() - { - this.blacklist.clear(); - this.whitelist.clear(); - this.resultCache = createDict(); - this.cacheEntries = 0; - }, - add: function(filter) - { - if (filter instanceof WhitelistFilter) - { - this.whitelist.add(filter); - } - else - { - this.blacklist.add(filter); - } - if (this.cacheEntries > 0) - { - this.resultCache = createDict(); - this.cacheEntries = 0; - } - }, - remove: function(filter) - { - if (filter instanceof WhitelistFilter) - { - this.whitelist.remove(filter); - } - else - { - this.blacklist.remove(filter); - } - if (this.cacheEntries > 0) - { - this.resultCache = createDict(); - this.cacheEntries = 0; - } - }, - findKeyword: function(filter) - { - if (filter instanceof WhitelistFilter) - { - return this.whitelist.findKeyword(filter); - } - else - { - return this.blacklist.findKeyword(filter); - } - }, - hasFilter: function(filter) - { - if (filter instanceof WhitelistFilter) - { - return this.whitelist.hasFilter(filter); - } - else - { - return this.blacklist.hasFilter(filter); - } - }, - getKeywordForFilter: function(filter) - { - if (filter instanceof WhitelistFilter) - { - return this.whitelist.getKeywordForFilter(filter); - } - else - { - return this.blacklist.getKeywordForFilter(filter); - } - }, - isSlowFilter: function(filter) - { - var matcher = filter instanceof WhitelistFilter ? this.whitelist : this.blacklist; - if (matcher.hasFilter(filter)) - { - return !matcher.getKeywordForFilter(filter); - } - else - { - return !matcher.findKeyword(filter); - } - }, - matchesAnyInternal: function(location, contentType, docDomain, thirdParty, sitekey) - { - var candidates = location.toLowerCase().match(/[a-z0-9%]{3,}/g); - if (candidates === null) - { - candidates = []; - } - candidates.push(""); - var blacklistHit = null; - for (var i = 0, l = candidates.length; i < l; i++) - { - var substr = candidates[i]; - if (substr in this.whitelist.filterByKeyword) - { - var result = this.whitelist._checkEntryMatch(substr, location, contentType, docDomain, thirdParty, sitekey); - if (result) - { - return result; - } - } - if (substr in this.blacklist.filterByKeyword && blacklistHit === null) - { - blacklistHit = this.blacklist._checkEntryMatch(substr, location, contentType, docDomain, thirdParty, sitekey); - } - } - return blacklistHit; - }, - matchesAny: function(location, docDomain) - { - var key = location + " " + docDomain + " "; - if (key in this.resultCache) - { - return this.resultCache[key]; - } - var result = this.matchesAnyInternal(location, 0, docDomain, null, null); - if (this.cacheEntries >= CombinedMatcher.maxCacheEntries) - { - this.resultCache = createDict(); - this.cacheEntries = 0; - } - this.resultCache[key] = result; - this.cacheEntries++; - return result; - } -}; -var defaultMatcher = new CombinedMatcher(); - -var direct = 'DIRECT;'; - -for (var i = 0; i < rules.length; i++) { - defaultMatcher.add(Filter.fromText(rules[i])); -} - -function FindProxyForURL(url, host) { - if (defaultMatcher.matchesAny(url, host) instanceof BlockingFilter) { - return proxy; - } - return direct; -} diff --git a/v2rayN/v2rayN/Resources/pac.txt.gz b/v2rayN/v2rayN/Resources/pac.txt.gz deleted file mode 100644 index 7f621cb7..00000000 Binary files a/v2rayN/v2rayN/Resources/pac.txt.gz and /dev/null differ diff --git a/v2rayN/v2rayN/Resources/privoxy_conf.txt b/v2rayN/v2rayN/Resources/privoxy_conf.txt deleted file mode 100644 index 6a265b25..00000000 --- a/v2rayN/v2rayN/Resources/privoxy_conf.txt +++ /dev/null @@ -1,8 +0,0 @@ -listen-address __PRIVOXY_BIND_IP__:__PRIVOXY_BIND_PORT__ -toggle 0 -logfile v2ray_privoxy.log -show-on-task-bar 0 -activity-animation 0 -forward-socks5 / 127.0.0.1:__SOCKS_PORT__ . -max-client-connections 2048 -hide-console diff --git a/v2rayN/v2rayN/Resx/ResUI.Designer.cs b/v2rayN/v2rayN/Resx/ResUI.Designer.cs index b5b956d6..df456572 100644 --- a/v2rayN/v2rayN/Resx/ResUI.Designer.cs +++ b/v2rayN/v2rayN/Resx/ResUI.Designer.cs @@ -19,7 +19,7 @@ namespace v2rayN.Resx { // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen // (以 /str 作为命令选项),或重新生成 VS 项目。 - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class ResUI { @@ -312,6 +312,15 @@ namespace v2rayN.Resx { } } + /// + /// 查找类似 Count 的本地化字符串。 + /// + internal static string LvCount { + get { + return ResourceManager.GetString("LvCount", resourceCulture); + } + } + /// /// 查找类似 Security 的本地化字符串。 /// @@ -330,6 +339,15 @@ namespace v2rayN.Resx { } } + /// + /// 查找类似 remarks 的本地化字符串。 + /// + internal static string LvRemarks { + get { + return ResourceManager.GetString("LvRemarks", resourceCulture); + } + } + /// /// 查找类似 Type 的本地化字符串。 /// @@ -402,6 +420,15 @@ namespace v2rayN.Resx { } } + /// + /// 查找类似 Url 的本地化字符串。 + /// + internal static string LvUrl { + get { + return ResourceManager.GetString("LvUrl", resourceCulture); + } + } + /// /// 查找类似 MediumFresh 的本地化字符串。 /// @@ -447,6 +474,15 @@ namespace v2rayN.Resx { } } + /// + /// 查找类似 Please fill in the address (Url) 的本地化字符串。 + /// + internal static string MsgNeedUrl { + get { + return ResourceManager.GetString("MsgNeedUrl", resourceCulture); + } + } + /// /// 查找类似 No valid subscriptions set 的本地化字符串。 /// @@ -627,6 +663,15 @@ namespace v2rayN.Resx { } } + /// + /// 查找类似 Operation success 的本地化字符串。 + /// + internal static string OperationSuccess { + get { + return ResourceManager.GetString("OperationSuccess", resourceCulture); + } + } + /// /// 查找类似 Please Fill Remarks 的本地化字符串。 /// @@ -654,6 +699,15 @@ namespace v2rayN.Resx { } } + /// + /// 查找类似 Please select rules 的本地化字符串。 + /// + internal static string PleaseSelectRules { + get { + return ResourceManager.GetString("PleaseSelectRules", resourceCulture); + } + } + /// /// 查找类似 Please select the server first 的本地化字符串。 /// @@ -681,6 +735,15 @@ namespace v2rayN.Resx { } } + /// + /// 查找类似 Are you sure to remove the rules? 的本地化字符串。 + /// + internal static string RemoveRules { + get { + return ResourceManager.GetString("RemoveRules", resourceCulture); + } + } + /// /// 查找类似 Are you sure to remove the server? 的本地化字符串。 /// @@ -690,6 +753,15 @@ namespace v2rayN.Resx { } } + /// + /// 查找类似 {0},One of the required. 的本地化字符串。 + /// + internal static string RoutingRuleDetailRequiredTips { + get { + return ResourceManager.GetString("RoutingRuleDetailRequiredTips", resourceCulture); + } + } + /// /// 查找类似 The client configuration file is saved at: {0} 的本地化字符串。 /// diff --git a/v2rayN/v2rayN/Resx/ResUI.resx b/v2rayN/v2rayN/Resx/ResUI.resx index 50d37abe..0b848e00 100644 --- a/v2rayN/v2rayN/Resx/ResUI.resx +++ b/v2rayN/v2rayN/Resx/ResUI.resx @@ -238,7 +238,7 @@ Clear original subscription content - Download V2ray successfully + Download Core successfully Failed to import subscription content @@ -283,10 +283,10 @@ Update subscription starts - Update V2rayCore successfully + Update Core successfully - Update V2rayCore successfully! Restarting service... + Update Core successfully! Restarting service... This feature relies on the Http global proxy, please set it correctly first. @@ -298,7 +298,7 @@ non-Vmess service, this feature is invalid - V2ray-core not found, please download: {0} + Core not found, please download: {0} Scan completed, no valid QR code found @@ -361,4 +361,28 @@ The ping of current service: {0} - \ No newline at end of file + + Operation success + + + Please select rules + + + Are you sure to remove the rules? + + + {0},One of the required. + + + remarks + + + Url + + + Count + + + Please fill in the address (Url) + + diff --git a/v2rayN/v2rayN/Resx/ResUI.zh-Hans.resx b/v2rayN/v2rayN/Resx/ResUI.zh-Hans.resx index 4b312497..cde15548 100644 --- a/v2rayN/v2rayN/Resx/ResUI.zh-Hans.resx +++ b/v2rayN/v2rayN/Resx/ResUI.zh-Hans.resx @@ -238,7 +238,7 @@ 清除原订阅内容 - 下载V2ray成功 + 下载Core成功 导入订阅内容失败 @@ -283,10 +283,10 @@ 更新订阅开始 - 更新V2rayCore成功 + 更新Core成功 - 更新V2rayCore成功!正在重启服务... + 更新Core成功!正在重启服务... 此功能依赖Http全局代理,请先设置正确。 @@ -298,7 +298,7 @@ 非Vmess服务,此功能无效 - 找不到 v2ray-core,下载地址: {0} + 找不到Core,下载地址: {0} 扫描完成,未发现有效二维码 @@ -361,4 +361,28 @@ 当前服务的真连接延迟: {0} - \ No newline at end of file + + 操作成功 + + + 请先选择规则 + + + 是否确定移除规则? + + + {0},必填其中一项. + + + 别名 + + + 地址(Url) + + + 数量 + + + 请填写地址(Url) + + diff --git a/v2rayN/v2rayN/Resx/Resx.zip b/v2rayN/v2rayN/Resx/Resx.zip deleted file mode 100644 index 0cb38db9..00000000 Binary files a/v2rayN/v2rayN/Resx/Resx.zip and /dev/null differ diff --git a/v2rayN/v2rayN/Sample/BlankPac.txt b/v2rayN/v2rayN/Sample/BlankPac.txt deleted file mode 100644 index 906a14cb..00000000 --- a/v2rayN/v2rayN/Sample/BlankPac.txt +++ /dev/null @@ -1,5 +0,0 @@ -var proxy = "__PROXY__"; - -function FindProxyForURL(url, host) { - return proxy; -} \ No newline at end of file diff --git a/v2rayN/v2rayN/Sample/SampleClientConfig.txt b/v2rayN/v2rayN/Sample/SampleClientConfig.txt index a582c6ea..f2924c9a 100644 --- a/v2rayN/v2rayN/Sample/SampleClientConfig.txt +++ b/v2rayN/v2rayN/Sample/SampleClientConfig.txt @@ -1,17 +1,11 @@ -{ - "log": { - "access": "", - "error": "", - "loglevel": "error" - }, +{ "log": { "access": "Vaccess.log", "error": "Verror.log", "loglevel": "warning" }, - "inbounds": [ - { - "tag": "proxy", + "inbounds": [{ + "tag": "tag1", "port": 10808, "protocol": "socks", "listen": "127.0.0.1", @@ -26,6 +20,22 @@ "tls" ] } + }, + { + "tag": "tag2", + "port": 10809, + "protocol": "socks", + "listen": "127.0.0.1", + "settings": { + "allowTransparent": false + }, + "sniffing": { + "enabled": true, + "destOverride": [ + "http", + "tls" + ] + } } ], "outbounds": [{ diff --git a/v2rayN/v2rayN/Sample/custom_routing_block b/v2rayN/v2rayN/Sample/custom_routing_block deleted file mode 100644 index 738fe38c..00000000 --- a/v2rayN/v2rayN/Sample/custom_routing_block +++ /dev/null @@ -1 +0,0 @@ -geosite:category-ads, \ No newline at end of file diff --git a/v2rayN/v2rayN/Sample/custom_routing_direct b/v2rayN/v2rayN/Sample/custom_routing_direct deleted file mode 100644 index 5408992c..00000000 --- a/v2rayN/v2rayN/Sample/custom_routing_direct +++ /dev/null @@ -1,132 +0,0 @@ -domain:12306.com, -domain:51ym.me, -domain:52pojie.cn, -domain:8686c.com, -domain:abercrombie.com, -domain:adobesc.com, -domain:air-matters.com, -domain:air-matters.io, -domain:airtable.com, -domain:akadns.net, -domain:apache.org, -domain:api.crisp.chat, -domain:api.termius.com, -domain:appshike.com, -domain:appstore.com, -domain:aweme.snssdk.com, -domain:bababian.com, -domain:battle.net, -domain:beatsbydre.com, -domain:bet365.com, -domain:bilibili.cn, -domain:ccgslb.com, -domain:ccgslb.net, -domain:chunbo.com, -domain:chunboimg.com, -domain:clashroyaleapp.com, -domain:cloudsigma.com, -domain:cloudxns.net, -domain:cmfu.com, -domain:culturedcode.com, -domain:dct-cloud.com, -domain:didialift.com, -domain:douyutv.com, -domain:duokan.com, -domain:dytt8.net, -domain:easou.com, -domain:ecitic.net, -domain:eclipse.org, -domain:eudic.net, -domain:ewqcxz.com, -domain:fir.im, -domain:frdic.com, -domain:fresh-ideas.cc, -domain:godic.net, -domain:goodread.com, -domain:haibian.com, -domain:hdslb.net, -domain:hollisterco.com, -domain:hongxiu.com, -domain:hxcdn.net, -domain:images.unsplash.com, -domain:img4me.com, -domain:ipify.org, -domain:ixdzs.com, -domain:jd.hk, -domain:jianshuapi.com, -domain:jomodns.com, -domain:jsboxbbs.com, -domain:knewone.com, -domain:kuaidi100.com, -domain:lemicp.com, -domain:letvcloud.com, -domain:lizhi.io, -domain:localizecdn.com, -domain:lucifr.com, -domain:luoo.net, -domain:mai.tn, -domain:maven.org, -domain:miwifi.com, -domain:moji.com, -domain:moke.com, -domain:mtalk.google.com, -domain:mxhichina.com, -domain:myqcloud.com, -domain:myunlu.com, -domain:netease.com, -domain:nfoservers.com, -domain:nssurge.com, -domain:nuomi.com, -domain:ourdvs.com, -domain:overcast.fm, -domain:paypal.com, -domain:paypalobjects.com, -domain:pgyer.com, -domain:qdaily.com, -domain:qdmm.com, -domain:qin.io, -domain:qingmang.me, -domain:qingmang.mobi, -domain:qqurl.com, -domain:rarbg.to, -domain:rrmj.tv, -domain:ruguoapp.com, -domain:sm.ms, -domain:snwx.com, -domain:soku.com, -domain:startssl.com, -domain:store.steampowered.com, -domain:symcd.com, -domain:teamviewer.com, -domain:tmzvps.com, -domain:trello.com, -domain:trellocdn.com, -domain:ttmeiju.com, -domain:udache.com, -domain:uxengine.net, -domain:weather.bjango.com, -domain:weather.com, -domain:webqxs.com, -domain:weico.cc, -domain:wenku8.net, -domain:werewolf.53site.com, -domain:windowsupdate.com, -domain:wkcdn.com, -domain:workflowy.com, -domain:xdrig.com, -domain:xiaojukeji.com, -domain:xiaomi.net, -domain:xiaomicp.com, -domain:ximalaya.com, -domain:xitek.com, -domain:xmcdn.com, -domain:xslb.net, -domain:xteko.com, -domain:yach.me, -domain:yixia.com, -domain:yunjiasu-cdn.net, -domain:zealer.com, -domain:zgslb.net, -domain:zimuzu.tv, -domain:zmz002.com, -domain:samsungdm.com, \ No newline at end of file diff --git a/v2rayN/v2rayN/Sample/custom_routing_global b/v2rayN/v2rayN/Sample/custom_routing_global new file mode 100644 index 00000000..169d8156 --- /dev/null +++ b/v2rayN/v2rayN/Sample/custom_routing_global @@ -0,0 +1,6 @@ +[ + { + "port": "0-65535", + "outboundTag": "proxy" + } +] \ No newline at end of file diff --git a/v2rayN/v2rayN/Sample/custom_routing_locked b/v2rayN/v2rayN/Sample/custom_routing_locked new file mode 100644 index 00000000..018ee608 --- /dev/null +++ b/v2rayN/v2rayN/Sample/custom_routing_locked @@ -0,0 +1,21 @@ +[ + { + "domain": [ + "geosite:google" + ], + "outboundTag": "proxy" + }, + { + "outboundTag": "direct", + "domain": [ + "domain:example-example.com", + "domain:example-example2.com" + ] + }, + { + "outboundTag": "block", + "domain": [ + "geosite:category-ads-all" + ] + } +] \ No newline at end of file diff --git a/v2rayN/v2rayN/Sample/custom_routing_proxy b/v2rayN/v2rayN/Sample/custom_routing_proxy deleted file mode 100644 index d67a6237..00000000 --- a/v2rayN/v2rayN/Sample/custom_routing_proxy +++ /dev/null @@ -1,33 +0,0 @@ -geosite:google, -geosite:github, -geosite:netflix, -geosite:steam, -geosite:telegram, -geosite:tumblr, -geosite:speedtest, -geosite:bbc, -domain:gvt1.com, -domain:textnow.com, -domain:twitch.tv, -domain:wikileaks.org, -domain:naver.com, -91.108.4.0/22, -91.108.8.0/22, -91.108.12.0/22, -91.108.20.0/22, -91.108.36.0/23, -91.108.38.0/23, -91.108.56.0/22, -149.154.160.0/20, -149.154.164.0/22, -149.154.172.0/22, -74.125.0.0/16, -173.194.0.0/16, -172.217.0.0/16, -216.58.200.0/24, -216.58.220.0/24, -91.108.56.116, -91.108.56.0/24, -109.239.140.0/24, -149.154.167.0/24, -149.154.175.0/24, \ No newline at end of file diff --git a/v2rayN/v2rayN/Sample/custom_routing_rules b/v2rayN/v2rayN/Sample/custom_routing_rules new file mode 100644 index 00000000..94b28108 --- /dev/null +++ b/v2rayN/v2rayN/Sample/custom_routing_rules @@ -0,0 +1,28 @@ +[{ + "remarks": "block", + "outboundTag": "block", + "domain": [ + "geosite:category-ads-all" + ] + }, + { + "remarks": "direct", + "outboundTag": "direct", + "domain": [ + "geosite:cn" + ] + }, + { + "remarks": "direct", + "outboundTag": "direct", + "ip": [ + "geoip:private", + "geoip:cn" + ] + }, + { + "remarks": "proxy", + "port": "0-65535", + "outboundTag": "proxy" + } +] \ No newline at end of file diff --git a/v2rayN/v2rayN/Sample/custom_routing_white b/v2rayN/v2rayN/Sample/custom_routing_white new file mode 100644 index 00000000..a708ae0d --- /dev/null +++ b/v2rayN/v2rayN/Sample/custom_routing_white @@ -0,0 +1,32 @@ +[ + { + "outboundTag": "direct", + "domain": [ + "domain:example-example.com", + "domain:example-example2.com" + ] + }, + { + "outboundTag": "block", + "domain": [ + "geosite:category-ads-all" + ] + }, + { + "outboundTag": "direct", + "domain": [ + "geosite:cn" + ] + }, + { + "outboundTag": "direct", + "ip": [ + "geoip:private", + "geoip:cn" + ] + }, + { + "port": "0-65535", + "outboundTag": "proxy" + } +] \ No newline at end of file diff --git a/v2rayN/v2rayN/Tool/CDateTime.cs b/v2rayN/v2rayN/Tool/CDateTime.cs deleted file mode 100644 index fb7a2e25..00000000 --- a/v2rayN/v2rayN/Tool/CDateTime.cs +++ /dev/null @@ -1,156 +0,0 @@ -using System; -using System.Net; -using System.Runtime.InteropServices; -using System.Text; - -namespace v2rayN -{ - class CDateTime - { - /// - /// 设置本地系统时间 - /// - public static void SetLocalTime() - { - using (WebClient wc = new WebClient()) - { - string url = ""; - string result = string.Empty; - - try - { - wc.Encoding = Encoding.UTF8; - wc.DownloadStringCompleted += wc_DownloadStringCompleted; - wc.DownloadStringAsync(new Uri(url)); - } - catch - { - } - } - } - - static void wc_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) - { - try - { - string result = e.Result; - if (Utils.IsNullOrEmpty(result)) - { - return; - } - EWebTime webTime = Utils.FromJson(result); - if (webTime != null - && webTime.result != null - && webTime.result.stime != null - && !Utils.IsNullOrEmpty(webTime.result.stime)) - { - DateTime dtWeb = GetTimeFromLinux(webTime.result.stime); - - SYSTEMTIME st = new SYSTEMTIME(); - st.FromDateTime(dtWeb); - - //调用Win32 API设置系统时间 - Win32API.SetLocalTime(ref st); - } - } - catch - { - } - } - - /// - /// 时间戳转为C#格式时间 - /// - /// - /// - private static DateTime GetTimeFromLinux(string timeStamp) - { - DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); - long lTime = long.Parse(timeStamp + "0000000"); - TimeSpan toNow = new TimeSpan(lTime); return dtStart.Add(toNow); - } - } - - /// - /// - /// - public struct SYSTEMTIME - { - public ushort wYear; - public ushort wMonth; - public ushort wDayOfWeek; - public ushort wDay; - public ushort wHour; - public ushort wMinute; - public ushort wSecond; - public ushort wMilliseconds; - - /// - /// 从System.DateTime转换。 - /// - /// System.DateTime类型的时间。 - public void FromDateTime(DateTime time) - { - wYear = (ushort)time.Year; - wMonth = (ushort)time.Month; - wDayOfWeek = (ushort)time.DayOfWeek; - wDay = (ushort)time.Day; - wHour = (ushort)time.Hour; - wMinute = (ushort)time.Minute; - wSecond = (ushort)time.Second; - wMilliseconds = (ushort)time.Millisecond; - } - - /// - /// 转换为System.DateTime类型。 - /// - /// - public DateTime ToDateTime() - { - return new DateTime(wYear, wMonth, wDay, wHour, wMinute, wSecond, wMilliseconds); - } - - /// - /// 静态方法。转换为System.DateTime类型。 - /// - /// SYSTEMTIME类型的时间。 - /// - public static DateTime ToDateTime(SYSTEMTIME time) - { - return time.ToDateTime(); - } - } - - public class Win32API - { - [DllImport("Kernel32.dll")] - public static extern bool SetLocalTime(ref SYSTEMTIME Time); - [DllImport("Kernel32.dll")] - public static extern void GetLocalTime(ref SYSTEMTIME Time); - } - - public class WTResult - { - /// - /// - /// - public string stime { get; set; } - } - - public class EWebTime - { - /// - /// - /// - public WTResult result { get; set; } - /// - /// - /// - public int error_code { get; set; } - /// - /// - /// - public string reason { get; set; } - } -} - diff --git a/v2rayN/v2rayN/Tool/FileManager.cs b/v2rayN/v2rayN/Tool/FileManager.cs index bd5ebf93..d668b599 100644 --- a/v2rayN/v2rayN/Tool/FileManager.cs +++ b/v2rayN/v2rayN/Tool/FileManager.cs @@ -68,7 +68,7 @@ namespace v2rayN.Tool throw ex; } } - public static bool ZipExtractToFile(string fileName) + public static bool ZipExtractToFile(string fileName, string ignoredName) { try { @@ -82,6 +82,10 @@ namespace v2rayN.Tool } try { + if (!Utils.IsNullOrEmpty(ignoredName) && entry.Name.Contains(ignoredName)) + { + continue; + } entry.ExtractToFile(Utils.GetPath(entry.Name), true); } catch (IOException ex) diff --git a/v2rayN/v2rayN/Tool/Utils.cs b/v2rayN/v2rayN/Tool/Utils.cs index 09c023de..9ec80dcf 100644 --- a/v2rayN/v2rayN/Tool/Utils.cs +++ b/v2rayN/v2rayN/Tool/Utils.cs @@ -19,13 +19,14 @@ using ZXing.Common; using ZXing.QrCode; using System.Security.Principal; using v2rayN.Base; +using Newtonsoft.Json.Linq; +using System.Web; namespace v2rayN { class Utils { - #region 资源Json操作 /// @@ -119,16 +120,22 @@ namespace v2rayN /// /// /// - public static int ToJsonFile(Object obj, string filePath) + public static int ToJsonFile(Object obj, string filePath, bool nullValue = true) { int result; try { using (StreamWriter file = File.CreateText(filePath)) { - //JsonSerializer serializer = new JsonSerializer(); - JsonSerializer serializer = new JsonSerializer() { Formatting = Formatting.Indented }; - //JsonSerializer serializer = new JsonSerializer() { Formatting = Formatting.Indented, NullValueHandling = NullValueHandling.Ignore }; + JsonSerializer serializer; + if (nullValue) + { + serializer = new JsonSerializer() { Formatting = Formatting.Indented }; + } + else + { + serializer = new JsonSerializer() { Formatting = Formatting.Indented, NullValueHandling = NullValueHandling.Ignore }; + } serializer.Serialize(file, obj); } @@ -140,6 +147,19 @@ namespace v2rayN } return result; } + + public static JObject ParseJson(string strJson) + { + try + { + JObject obj = JObject.Parse(strJson); + return obj; + } + catch + { + return null; + } + } #endregion #region 转换函数 @@ -350,6 +370,14 @@ namespace v2rayN result = list; } + public static string UrlEncode(string url) + { + return HttpUtility.UrlEncode(url); + } + public static string UrlDecode(string url) + { + return HttpUtility.UrlDecode(url); + } #endregion @@ -459,6 +487,24 @@ namespace v2rayN return Regex.IsMatch(input, pattern, RegexOptions.IgnoreCase); } + public static bool IsIpv6(string ip) + { + IPAddress address; + if (IPAddress.TryParse(ip, out address)) + { + switch (address.AddressFamily) + { + case AddressFamily.InterNetwork: + return false; + case AddressFamily.InterNetworkV6: + return true; + default: + return false; + } + } + return false; + } + #endregion #region 开机自动启动 @@ -782,6 +828,10 @@ namespace v2rayN } } + public static void AddSubItem(ListViewItem i, string name, string text) + { + i.SubItems.Add(new ListViewItem.ListViewSubItem() { Name = name, Text = text }); + } #endregion #region TempPath @@ -800,7 +850,7 @@ namespace v2rayN public static string GetTempPath(string filename) { return Path.Combine(GetTempPath(), filename); - } + } public static string UnGzip(byte[] buf) { diff --git a/v2rayN/v2rayN/v2rayN.csproj b/v2rayN/v2rayN/v2rayN.csproj index d1f912ba..2f87020d 100644 --- a/v2rayN/v2rayN/v2rayN.csproj +++ b/v2rayN/v2rayN/v2rayN.csproj @@ -125,12 +125,32 @@ BaseServerForm.cs + + Form + + + RoutingRuleSettingDetailsForm.cs + + + Form + + + RoutingRuleSettingForm.cs + + + Form MainForm.cs + + Form + + + RoutingSettingForm.cs + Form @@ -165,18 +185,19 @@ - - - Component + + + + @@ -287,6 +308,21 @@ QRCodeControl.cs Designer + + RoutingRuleSettingDetailsForm.cs + Designer + + + RoutingRuleSettingDetailsForm.cs + Designer + + + RoutingRuleSettingForm.cs + Designer + + + RoutingRuleSettingForm.cs + SubSettingControl.cs Designer @@ -294,6 +330,13 @@ SubSettingControl.cs + + RoutingSettingForm.cs + Designer + + + RoutingSettingForm.cs + SubSettingForm.cs Designer @@ -341,14 +384,12 @@ Settings.settings True - - - + + + - - @@ -411,13 +452,11 @@ - -