├── .gitattributes
├── .gitignore
├── LICENSE
├── mV2RayConfig.sln
└── mV2RayConfig
├── App.config
├── Config.cs
├── Forms
├── ClientConfigForm.Designer.cs
├── ClientConfigForm.cs
├── ClientConfigForm.resx
├── EditForm.Designer.cs
├── EditForm.cs
├── EditForm.resx
├── MainForm.Designer.cs
├── MainForm.cs
├── MainForm.resx
├── TLSForm.Designer.cs
├── TLSForm.cs
└── TLSForm.resx
├── MyJson.cs
├── Program.cs
├── Properties
├── AssemblyInfo.cs
├── Resources.Designer.cs
├── Resources.resx
├── Settings.Designer.cs
└── Settings.settings
├── Resource.Designer.cs
├── Resource.resx
├── mV2RayConfig.csproj
└── packages.config
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | [Xx]64/
19 | [Xx]86/
20 | [Bb]uild/
21 | bld/
22 | [Bb]in/
23 | [Oo]bj/
24 |
25 | # Visual Studio 2015 cache/options directory
26 | .vs/
27 | # Uncomment if you have tasks that create the project's static files in wwwroot
28 | #wwwroot/
29 |
30 | # MSTest test Results
31 | [Tt]est[Rr]esult*/
32 | [Bb]uild[Ll]og.*
33 |
34 | # NUNIT
35 | *.VisualState.xml
36 | TestResult.xml
37 |
38 | # Build Results of an ATL Project
39 | [Dd]ebugPS/
40 | [Rr]eleasePS/
41 | dlldata.c
42 |
43 | # DNX
44 | project.lock.json
45 | artifacts/
46 |
47 | *_i.c
48 | *_p.c
49 | *_i.h
50 | *.ilk
51 | *.meta
52 | *.obj
53 | *.pch
54 | *.pdb
55 | *.pgc
56 | *.pgd
57 | *.rsp
58 | *.sbr
59 | *.tlb
60 | *.tli
61 | *.tlh
62 | *.tmp
63 | *.tmp_proj
64 | *.log
65 | *.vspscc
66 | *.vssscc
67 | .builds
68 | *.pidb
69 | *.svclog
70 | *.scc
71 |
72 | # Chutzpah Test files
73 | _Chutzpah*
74 |
75 | # Visual C++ cache files
76 | ipch/
77 | *.aps
78 | *.ncb
79 | *.opendb
80 | *.opensdf
81 | *.sdf
82 | *.cachefile
83 | *.VC.db
84 |
85 | # Visual Studio profiler
86 | *.psess
87 | *.vsp
88 | *.vspx
89 | *.sap
90 |
91 | # TFS 2012 Local Workspace
92 | $tf/
93 |
94 | # Guidance Automation Toolkit
95 | *.gpState
96 |
97 | # ReSharper is a .NET coding add-in
98 | _ReSharper*/
99 | *.[Rr]e[Ss]harper
100 | *.DotSettings.user
101 |
102 | # JustCode is a .NET coding add-in
103 | .JustCode
104 |
105 | # TeamCity is a build add-in
106 | _TeamCity*
107 |
108 | # DotCover is a Code Coverage Tool
109 | *.dotCover
110 |
111 | # NCrunch
112 | _NCrunch_*
113 | .*crunch*.local.xml
114 | nCrunchTemp_*
115 |
116 | # MightyMoose
117 | *.mm.*
118 | AutoTest.Net/
119 |
120 | # Web workbench (sass)
121 | .sass-cache/
122 |
123 | # Installshield output folder
124 | [Ee]xpress/
125 |
126 | # DocProject is a documentation generator add-in
127 | DocProject/buildhelp/
128 | DocProject/Help/*.HxT
129 | DocProject/Help/*.HxC
130 | DocProject/Help/*.hhc
131 | DocProject/Help/*.hhk
132 | DocProject/Help/*.hhp
133 | DocProject/Help/Html2
134 | DocProject/Help/html
135 |
136 | # Click-Once directory
137 | publish/
138 |
139 | # Publish Web Output
140 | *.[Pp]ublish.xml
141 | *.azurePubxml
142 |
143 | # TODO: Un-comment the next line if you do not want to checkin
144 | # your web deploy settings because they may include unencrypted
145 | # passwords
146 | #*.pubxml
147 | *.publishproj
148 |
149 | # NuGet Packages
150 | *.nupkg
151 | # The packages folder can be ignored because of Package Restore
152 | **/packages/*
153 | # except build/, which is used as an MSBuild target.
154 | !**/packages/build/
155 | # Uncomment if necessary however generally it will be regenerated when needed
156 | #!**/packages/repositories.config
157 | # NuGet v3's project.json files produces more ignoreable files
158 | *.nuget.props
159 | *.nuget.targets
160 |
161 | # Microsoft Azure Build Output
162 | csx/
163 | *.build.csdef
164 |
165 | # Microsoft Azure Emulator
166 | ecf/
167 | rcf/
168 |
169 | # Windows Store app package directory
170 | AppPackages/
171 | BundleArtifacts/
172 |
173 | # Visual Studio cache files
174 | # files ending in .cache can be ignored
175 | *.[Cc]ache
176 | # but keep track of directories ending in .cache
177 | !*.[Cc]ache/
178 |
179 | # Others
180 | ClientBin/
181 | [Ss]tyle[Cc]op.*
182 | ~$*
183 | *~
184 | *.dbmdl
185 | *.dbproj.schemaview
186 | *.pfx
187 | *.publishsettings
188 | node_modules/
189 | orleans.codegen.cs
190 |
191 | # RIA/Silverlight projects
192 | Generated_Code/
193 |
194 | # Backup & report files from converting an old project file
195 | # to a newer Visual Studio version. Backup files are not needed,
196 | # because we have git ;-)
197 | _UpgradeReport_Files/
198 | Backup*/
199 | UpgradeLog*.XML
200 | UpgradeLog*.htm
201 |
202 | # SQL Server files
203 | *.mdf
204 | *.ldf
205 |
206 | # Business Intelligence projects
207 | *.rdl.data
208 | *.bim.layout
209 | *.bim_*.settings
210 |
211 | # Microsoft Fakes
212 | FakesAssemblies/
213 |
214 | # GhostDoc plugin setting file
215 | *.GhostDoc.xml
216 |
217 | # Node.js Tools for Visual Studio
218 | .ntvs_analysis.dat
219 |
220 | # Visual Studio 6 build log
221 | *.plg
222 |
223 | # Visual Studio 6 workspace options file
224 | *.opt
225 |
226 | # Visual Studio LightSwitch build output
227 | **/*.HTMLClient/GeneratedArtifacts
228 | **/*.DesktopClient/GeneratedArtifacts
229 | **/*.DesktopClient/ModelManifest.xml
230 | **/*.Server/GeneratedArtifacts
231 | **/*.Server/ModelManifest.xml
232 | _Pvt_Extensions
233 |
234 | # LightSwitch generated files
235 | GeneratedArtifacts/
236 | ModelManifest.xml
237 |
238 | # Paket dependency manager
239 | .paket/paket.exe
240 |
241 | # FAKE - F# Make
242 | .fake/
243 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | mV2RayConfig
2 |
3 | ----------
4 |
5 | MIT License
6 |
7 | Copyright (c) 2017 Milkey Tan
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy
10 | of this software and associated documentation files (the "Software"), to deal
11 | in the Software without restriction, including without limitation the rights
12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 | copies of the Software, and to permit persons to whom the Software is
14 | furnished to do so, subject to the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be included in all
17 | copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 | SOFTWARE.
26 |
27 |
28 |
29 | Newtonsoft.Json
30 |
31 | ----------
32 |
33 | The MIT License (MIT)
34 |
35 | Copyright (c) 2007 James Newton-King
36 |
37 | Permission is hereby granted, free of charge, to any person obtaining a copy of
38 | this software and associated documentation files (the "Software"), to deal in
39 | the Software without restriction, including without limitation the rights to
40 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
41 | the Software, and to permit persons to whom the Software is furnished to do so,
42 | subject to the following conditions:
43 |
44 | The above copyright notice and this permission notice shall be included in all
45 | copies or substantial portions of the Software.
46 |
47 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
48 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
49 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
50 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
51 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
52 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/mV2RayConfig.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mV2RayConfig", "mV2RayConfig\mV2RayConfig.csproj", "{E0EA1756-2746-48FA-A2FC-01FD365E86D5}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {E0EA1756-2746-48FA-A2FC-01FD365E86D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {E0EA1756-2746-48FA-A2FC-01FD365E86D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {E0EA1756-2746-48FA-A2FC-01FD365E86D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {E0EA1756-2746-48FA-A2FC-01FD365E86D5}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/mV2RayConfig/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/mV2RayConfig/Config.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json.Linq;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace mV2RayConfig
9 | {
10 | public class Config
11 | {
12 | public class ServerInfo
13 | {
14 | public dynamic log { get; set; }
15 | public dynamic inbound { get; set; }
16 | public dynamic outbound { get; set; }
17 | }
18 |
19 | public class Log
20 | {
21 | public string access { get; set; }
22 | public string error { get; set; }
23 | public string loglevel { get; set; }
24 | }
25 |
26 | public class Inbound
27 | {
28 | public int port { get; set; }
29 | public string protocol { get; set; }
30 | public dynamic settings { get; set; }
31 | }
32 |
33 | public class Outbound
34 | {
35 | public string protocol { get; set; }
36 | public dynamic settings { get; set; }
37 | }
38 |
39 | public class InBoundSetting
40 | {
41 | public JArray clients { get; set; }
42 | }
43 |
44 | public class VmessClients
45 | {
46 | public string id { get; set; }
47 | public int level { get; set; }
48 | public int alterId { get; set; }
49 | }
50 |
51 | public class Vnext
52 | {
53 | public string address { get; set; }
54 | public int port { get; set; }
55 | public JArray users { get; set; }
56 | }
57 |
58 | public static string HttpFakeStr = Resource.httpFake;
59 | public static string RoutingStr = Resource.routing;
60 | public static string OutboundDetourStr = Resource.outboundDetour;
61 | public static string MKcpStr = Resource.mKCP;
62 | public static string ServerName = @"example.com";
63 | public static string CertificateFile = @"/etc/v2ray/v2ray.crt";
64 | public static string KeyFile = @"/etc/v2ray/v2ray.key";
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/mV2RayConfig/Forms/ClientConfigForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace mV2RayConfig.Forms
2 | {
3 | partial class ClientConfigForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.richTextBoxConfig = new System.Windows.Forms.RichTextBox();
32 | this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
33 | this.labelLocalPort = new System.Windows.Forms.Label();
34 | this.labelSecurity = new System.Windows.Forms.Label();
35 | this.labelHostName = new System.Windows.Forms.Label();
36 | this.textBoxHostName = new System.Windows.Forms.TextBox();
37 | this.labelProtocol = new System.Windows.Forms.Label();
38 | this.comboBoxProtocol = new System.Windows.Forms.ComboBox();
39 | this.comboBoxSecurity = new System.Windows.Forms.ComboBox();
40 | this.upDownPort = new System.Windows.Forms.NumericUpDown();
41 | this.checkBoxMux = new System.Windows.Forms.CheckBox();
42 | this.buttonNewGen = new System.Windows.Forms.Button();
43 | this.tableLayoutPanel1.SuspendLayout();
44 | ((System.ComponentModel.ISupportInitialize)(this.upDownPort)).BeginInit();
45 | this.SuspendLayout();
46 | //
47 | // richTextBoxConfig
48 | //
49 | this.richTextBoxConfig.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
50 | | System.Windows.Forms.AnchorStyles.Right)));
51 | this.richTextBoxConfig.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
52 | this.richTextBoxConfig.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
53 | this.richTextBoxConfig.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
54 | this.richTextBoxConfig.Location = new System.Drawing.Point(0, -1);
55 | this.richTextBoxConfig.Name = "richTextBoxConfig";
56 | this.richTextBoxConfig.Size = new System.Drawing.Size(430, 391);
57 | this.richTextBoxConfig.TabIndex = 1;
58 | this.richTextBoxConfig.Text = "";
59 | this.richTextBoxConfig.WordWrap = false;
60 | //
61 | // tableLayoutPanel1
62 | //
63 | this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
64 | | System.Windows.Forms.AnchorStyles.Right)));
65 | this.tableLayoutPanel1.ColumnCount = 2;
66 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 28.10945F));
67 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 71.89055F));
68 | this.tableLayoutPanel1.Controls.Add(this.labelLocalPort, 0, 3);
69 | this.tableLayoutPanel1.Controls.Add(this.labelSecurity, 0, 2);
70 | this.tableLayoutPanel1.Controls.Add(this.labelHostName, 0, 1);
71 | this.tableLayoutPanel1.Controls.Add(this.textBoxHostName, 1, 1);
72 | this.tableLayoutPanel1.Controls.Add(this.labelProtocol, 0, 0);
73 | this.tableLayoutPanel1.Controls.Add(this.comboBoxProtocol, 1, 0);
74 | this.tableLayoutPanel1.Controls.Add(this.comboBoxSecurity, 1, 2);
75 | this.tableLayoutPanel1.Controls.Add(this.upDownPort, 1, 3);
76 | this.tableLayoutPanel1.Controls.Add(this.checkBoxMux, 1, 4);
77 | this.tableLayoutPanel1.Location = new System.Drawing.Point(13, 397);
78 | this.tableLayoutPanel1.Name = "tableLayoutPanel1";
79 | this.tableLayoutPanel1.RowCount = 5;
80 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
81 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
82 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
83 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
84 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
85 | this.tableLayoutPanel1.Size = new System.Drawing.Size(402, 154);
86 | this.tableLayoutPanel1.TabIndex = 2;
87 | //
88 | // labelLocalPort
89 | //
90 | this.labelLocalPort.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
91 | this.labelLocalPort.AutoSize = true;
92 | this.labelLocalPort.Font = new System.Drawing.Font("微软雅黑", 7.8F);
93 | this.labelLocalPort.Location = new System.Drawing.Point(3, 94);
94 | this.labelLocalPort.Name = "labelLocalPort";
95 | this.labelLocalPort.Size = new System.Drawing.Size(106, 20);
96 | this.labelLocalPort.TabIndex = 15;
97 | this.labelLocalPort.Text = "本地端口";
98 | //
99 | // labelSecurity
100 | //
101 | this.labelSecurity.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
102 | this.labelSecurity.AutoSize = true;
103 | this.labelSecurity.Font = new System.Drawing.Font("微软雅黑", 7.8F);
104 | this.labelSecurity.Location = new System.Drawing.Point(3, 64);
105 | this.labelSecurity.Name = "labelSecurity";
106 | this.labelSecurity.Size = new System.Drawing.Size(106, 20);
107 | this.labelSecurity.TabIndex = 13;
108 | this.labelSecurity.Text = "加密方式";
109 | //
110 | // labelHostName
111 | //
112 | this.labelHostName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
113 | this.labelHostName.AutoSize = true;
114 | this.labelHostName.Font = new System.Drawing.Font("微软雅黑", 7.8F);
115 | this.labelHostName.Location = new System.Drawing.Point(3, 34);
116 | this.labelHostName.Name = "labelHostName";
117 | this.labelHostName.Size = new System.Drawing.Size(106, 20);
118 | this.labelHostName.TabIndex = 10;
119 | this.labelHostName.Text = "服务器地址";
120 | //
121 | // textBoxHostName
122 | //
123 | this.textBoxHostName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
124 | this.textBoxHostName.Font = new System.Drawing.Font("微软雅黑", 7.8F);
125 | this.textBoxHostName.Location = new System.Drawing.Point(115, 32);
126 | this.textBoxHostName.Name = "textBoxHostName";
127 | this.textBoxHostName.Size = new System.Drawing.Size(284, 25);
128 | this.textBoxHostName.TabIndex = 9;
129 | this.textBoxHostName.Text = "example.com";
130 | //
131 | // labelProtocol
132 | //
133 | this.labelProtocol.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
134 | this.labelProtocol.AutoSize = true;
135 | this.labelProtocol.Location = new System.Drawing.Point(3, 7);
136 | this.labelProtocol.Name = "labelProtocol";
137 | this.labelProtocol.Size = new System.Drawing.Size(106, 15);
138 | this.labelProtocol.TabIndex = 11;
139 | this.labelProtocol.Text = "服务类型";
140 | //
141 | // comboBoxProtocol
142 | //
143 | this.comboBoxProtocol.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
144 | this.comboBoxProtocol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
145 | this.comboBoxProtocol.FormattingEnabled = true;
146 | this.comboBoxProtocol.Items.AddRange(new object[] {
147 | "vmess"});
148 | this.comboBoxProtocol.Location = new System.Drawing.Point(115, 3);
149 | this.comboBoxProtocol.Name = "comboBoxProtocol";
150 | this.comboBoxProtocol.Size = new System.Drawing.Size(284, 23);
151 | this.comboBoxProtocol.TabIndex = 12;
152 | //
153 | // comboBoxSecurity
154 | //
155 | this.comboBoxSecurity.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
156 | this.comboBoxSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
157 | this.comboBoxSecurity.FormattingEnabled = true;
158 | this.comboBoxSecurity.Items.AddRange(new object[] {
159 | "aes-128-gcm",
160 | "chacha20-poly1305",
161 | "aes-128-cfb",
162 | "none"});
163 | this.comboBoxSecurity.Location = new System.Drawing.Point(115, 63);
164 | this.comboBoxSecurity.Name = "comboBoxSecurity";
165 | this.comboBoxSecurity.Size = new System.Drawing.Size(284, 23);
166 | this.comboBoxSecurity.TabIndex = 14;
167 | //
168 | // upDownPort
169 | //
170 | this.upDownPort.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
171 | this.upDownPort.Location = new System.Drawing.Point(115, 92);
172 | this.upDownPort.Maximum = new decimal(new int[] {
173 | 65535,
174 | 0,
175 | 0,
176 | 0});
177 | this.upDownPort.Minimum = new decimal(new int[] {
178 | 1,
179 | 0,
180 | 0,
181 | 0});
182 | this.upDownPort.Name = "upDownPort";
183 | this.upDownPort.Size = new System.Drawing.Size(284, 25);
184 | this.upDownPort.TabIndex = 16;
185 | this.upDownPort.Value = new decimal(new int[] {
186 | 1080,
187 | 0,
188 | 0,
189 | 0});
190 | //
191 | // checkBoxMux
192 | //
193 | this.checkBoxMux.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
194 | this.checkBoxMux.AutoSize = true;
195 | this.checkBoxMux.Checked = true;
196 | this.checkBoxMux.CheckState = System.Windows.Forms.CheckState.Checked;
197 | this.checkBoxMux.Font = new System.Drawing.Font("微软雅黑", 7.8F);
198 | this.checkBoxMux.Location = new System.Drawing.Point(115, 125);
199 | this.checkBoxMux.Name = "checkBoxMux";
200 | this.checkBoxMux.Size = new System.Drawing.Size(284, 24);
201 | this.checkBoxMux.TabIndex = 17;
202 | this.checkBoxMux.Text = "启用Mux.Cool(多路复用)";
203 | this.checkBoxMux.UseVisualStyleBackColor = true;
204 | //
205 | // buttonNewGen
206 | //
207 | this.buttonNewGen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
208 | this.buttonNewGen.Font = new System.Drawing.Font("微软雅黑", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
209 | this.buttonNewGen.Location = new System.Drawing.Point(340, 557);
210 | this.buttonNewGen.Name = "buttonNewGen";
211 | this.buttonNewGen.Size = new System.Drawing.Size(75, 29);
212 | this.buttonNewGen.TabIndex = 3;
213 | this.buttonNewGen.Text = "生成";
214 | this.buttonNewGen.UseVisualStyleBackColor = true;
215 | this.buttonNewGen.Click += new System.EventHandler(this.buttonNewGen_Click);
216 | //
217 | // ClientConfigForm
218 | //
219 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
220 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
221 | this.ClientSize = new System.Drawing.Size(427, 595);
222 | this.Controls.Add(this.buttonNewGen);
223 | this.Controls.Add(this.tableLayoutPanel1);
224 | this.Controls.Add(this.richTextBoxConfig);
225 | this.Name = "ClientConfigForm";
226 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
227 | this.Text = "ClientConfig";
228 | this.Load += new System.EventHandler(this.ClientConfigForm_Load);
229 | this.tableLayoutPanel1.ResumeLayout(false);
230 | this.tableLayoutPanel1.PerformLayout();
231 | ((System.ComponentModel.ISupportInitialize)(this.upDownPort)).EndInit();
232 | this.ResumeLayout(false);
233 |
234 | }
235 |
236 | #endregion
237 |
238 | private System.Windows.Forms.RichTextBox richTextBoxConfig;
239 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
240 | private System.Windows.Forms.TextBox textBoxHostName;
241 | private System.Windows.Forms.Label labelHostName;
242 | private System.Windows.Forms.Label labelProtocol;
243 | private System.Windows.Forms.ComboBox comboBoxProtocol;
244 | private System.Windows.Forms.Label labelSecurity;
245 | private System.Windows.Forms.ComboBox comboBoxSecurity;
246 | private System.Windows.Forms.Button buttonNewGen;
247 | private System.Windows.Forms.Label labelLocalPort;
248 | private System.Windows.Forms.NumericUpDown upDownPort;
249 | private System.Windows.Forms.CheckBox checkBoxMux;
250 | }
251 | }
--------------------------------------------------------------------------------
/mV2RayConfig/Forms/ClientConfigForm.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json.Linq;
2 | using System;
3 | using System.Windows.Forms;
4 | using static mV2RayConfig.Config;
5 |
6 | namespace mV2RayConfig.Forms
7 | {
8 | public partial class ClientConfigForm : Form
9 | {
10 | private string mUUID;
11 | private int aID;
12 | private int mPort;
13 |
14 | private ServerInfo serverInfo = new ServerInfo();
15 | private Outbound outbound = new Outbound();
16 | private Inbound inbound = new Inbound();
17 | private InBoundSetting inBoundSetting = new InBoundSetting();
18 | private VmessClients clients = new VmessClients();
19 | private Vnext vnext = new Vnext();
20 | private Log log = new Log();
21 |
22 | public ClientConfigForm(string UUID,int alterId,int port)
23 | {
24 | InitializeComponent();
25 | mUUID = UUID;
26 | aID = alterId;
27 | mPort = port;
28 |
29 | comboBoxProtocol.SelectedIndex = 0;
30 | comboBoxSecurity.SelectedIndex = 0;
31 | }
32 |
33 | private void ClientConfigForm_Load(object sender, EventArgs e)
34 | {
35 | richTextBoxConfig.Text = configGen();
36 | }
37 |
38 | private string configGen()
39 | {
40 | log.access = "Vaccess.log";
41 | log.error = "Verror.log";
42 | log.loglevel = "debug";
43 | serverInfo.log = log;
44 |
45 | inbound.port = Convert.ToInt32(upDownPort.Value);
46 | inbound.protocol = "socks";
47 | JObject setJson = new JObject();
48 | setJson["auth"] = "noauth";
49 | inbound.settings = setJson;
50 | serverInfo.inbound = inbound;
51 |
52 | outbound.protocol = comboBoxProtocol.Text;
53 | vnext.address = textBoxHostName.Text;
54 | vnext.port = mPort;
55 | clients.id = mUUID;
56 | clients.alterId = aID;
57 | JArray clientsArray = new JArray();
58 | JObject clientsJson = JObject.FromObject(clients);
59 | clientsJson.Remove("level");
60 | clientsJson["security"] = comboBoxSecurity.Text;
61 | clientsArray.Add(clientsJson);
62 | vnext.users = clientsArray;
63 |
64 | JObject vnextSetJson = new JObject();
65 | vnextSetJson["vnext"] = JArray.Parse(string.Format("[{0}]", JObject.FromObject(vnext).ToString()));
66 | outbound.settings = vnextSetJson;
67 |
68 | JObject outJson = JObject.FromObject(outbound);
69 |
70 | if (checkBoxMux.Checked)
71 | {
72 | JObject enabled = new JObject();
73 | enabled["enabled"] = true;
74 | outJson["mux"] = enabled;
75 | }
76 |
77 | serverInfo.outbound = outJson;
78 |
79 | JObject configJson = JObject.FromObject(serverInfo);
80 | return MyJson.FormatJsonString(configJson.ToString());
81 | }
82 |
83 | private void buttonNewGen_Click(object sender, EventArgs e)
84 | {
85 | richTextBoxConfig.Text = configGen();
86 | }
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/mV2RayConfig/Forms/ClientConfigForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/mV2RayConfig/Forms/EditForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace mV2RayConfig
2 | {
3 | partial class EditForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.richTextBoxConfig = new System.Windows.Forms.RichTextBox();
32 | this.buttonOK = new System.Windows.Forms.Button();
33 | this.SuspendLayout();
34 | //
35 | // richTextBoxConfig
36 | //
37 | this.richTextBoxConfig.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
38 | | System.Windows.Forms.AnchorStyles.Right)));
39 | this.richTextBoxConfig.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
40 | this.richTextBoxConfig.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
41 | this.richTextBoxConfig.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
42 | this.richTextBoxConfig.Location = new System.Drawing.Point(-2, -1);
43 | this.richTextBoxConfig.Name = "richTextBoxConfig";
44 | this.richTextBoxConfig.Size = new System.Drawing.Size(457, 304);
45 | this.richTextBoxConfig.TabIndex = 1;
46 | this.richTextBoxConfig.Text = "";
47 | this.richTextBoxConfig.WordWrap = false;
48 | //
49 | // buttonOK
50 | //
51 | this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
52 | this.buttonOK.Font = new System.Drawing.Font("微软雅黑", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
53 | this.buttonOK.Location = new System.Drawing.Point(365, 309);
54 | this.buttonOK.Name = "buttonOK";
55 | this.buttonOK.Size = new System.Drawing.Size(75, 29);
56 | this.buttonOK.TabIndex = 7;
57 | this.buttonOK.Text = "确定";
58 | this.buttonOK.UseVisualStyleBackColor = true;
59 | this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
60 | //
61 | // EditForm
62 | //
63 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
64 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
65 | this.BackColor = System.Drawing.SystemColors.ControlLightLight;
66 | this.ClientSize = new System.Drawing.Size(452, 353);
67 | this.Controls.Add(this.buttonOK);
68 | this.Controls.Add(this.richTextBoxConfig);
69 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
70 | this.Name = "EditForm";
71 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
72 | this.Text = "编辑";
73 | this.Load += new System.EventHandler(this.EditForm_Load);
74 | this.ResumeLayout(false);
75 |
76 | }
77 |
78 | #endregion
79 |
80 | private System.Windows.Forms.RichTextBox richTextBoxConfig;
81 | private System.Windows.Forms.Button buttonOK;
82 | }
83 | }
--------------------------------------------------------------------------------
/mV2RayConfig/Forms/EditForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms;
3 | using static mV2RayConfig.Config;
4 |
5 | namespace mV2RayConfig
6 | {
7 | public partial class EditForm : Form
8 | {
9 | public EditForm()
10 | {
11 | InitializeComponent();
12 | }
13 |
14 | private void EditForm_Load(object sender, EventArgs e)
15 | {
16 | richTextBoxConfig.Text = MyJson.FormatJsonString(HttpFakeStr);
17 | MaximizeBox = false;
18 | }
19 |
20 | private void buttonOK_Click(object sender, EventArgs e)
21 | {
22 | HttpFakeStr = richTextBoxConfig.Text;
23 | Close();
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/mV2RayConfig/Forms/EditForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/mV2RayConfig/Forms/MainForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace mV2RayConfig
2 | {
3 | partial class MainForm
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清理所有正在使用的资源。
12 | ///
13 | /// 如果应释放托管资源,为 true;否则为 false。
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows 窗体设计器生成的代码
24 |
25 | ///
26 | /// 设计器支持所需的方法 - 不要修改
27 | /// 使用代码编辑器修改此方法的内容。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.richTextBoxConfig = new System.Windows.Forms.RichTextBox();
32 | this.buttonNewGen = new System.Windows.Forms.Button();
33 | this.panelLog = new System.Windows.Forms.TableLayoutPanel();
34 | this.labelLoglevel = new System.Windows.Forms.Label();
35 | this.labelErrorLog = new System.Windows.Forms.Label();
36 | this.labelAccessLog = new System.Windows.Forms.Label();
37 | this.textBoxAccessLog = new System.Windows.Forms.TextBox();
38 | this.textBoxErrorLog = new System.Windows.Forms.TextBox();
39 | this.comboBoxLogLevel = new System.Windows.Forms.ComboBox();
40 | this.panelServerConfig = new System.Windows.Forms.TableLayoutPanel();
41 | this.labelPort = new System.Windows.Forms.Label();
42 | this.labelProtocol = new System.Windows.Forms.Label();
43 | this.comboBoxProtocol = new System.Windows.Forms.ComboBox();
44 | this.upDownPort = new System.Windows.Forms.NumericUpDown();
45 | this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
46 | this.upDownAlterID = new System.Windows.Forms.NumericUpDown();
47 | this.labelAlterID = new System.Windows.Forms.Label();
48 | this.labelUUID = new System.Windows.Forms.Label();
49 | this.textBoxUUID = new System.Windows.Forms.TextBox();
50 | this.buttonUUID = new System.Windows.Forms.Button();
51 | this.checkBoxUserLevel = new System.Windows.Forms.CheckBox();
52 | this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
53 | this.listBoxManyUser = new System.Windows.Forms.ListBox();
54 | this.panel1 = new System.Windows.Forms.Panel();
55 | this.buttonDel = new System.Windows.Forms.Button();
56 | this.buttonAdd = new System.Windows.Forms.Button();
57 | this.checkBoxManyUser = new System.Windows.Forms.CheckBox();
58 | this.buttonSave = new System.Windows.Forms.Button();
59 | this.checkBoxRouting = new System.Windows.Forms.CheckBox();
60 | this.checkBoxHttpFake = new System.Windows.Forms.CheckBox();
61 | this.editLink = new System.Windows.Forms.Label();
62 | this.checkBoxKCP = new System.Windows.Forms.CheckBox();
63 | this.checkBoxWS = new System.Windows.Forms.CheckBox();
64 | this.checkBoxTLS = new System.Windows.Forms.CheckBox();
65 | this.buttonUserConfig = new System.Windows.Forms.Button();
66 | this.labelFakeKCP = new System.Windows.Forms.Label();
67 | this.comboBoxFakeKCP = new System.Windows.Forms.ComboBox();
68 | this.panelLog.SuspendLayout();
69 | this.panelServerConfig.SuspendLayout();
70 | ((System.ComponentModel.ISupportInitialize)(this.upDownPort)).BeginInit();
71 | this.tableLayoutPanel1.SuspendLayout();
72 | ((System.ComponentModel.ISupportInitialize)(this.upDownAlterID)).BeginInit();
73 | this.tableLayoutPanel2.SuspendLayout();
74 | this.panel1.SuspendLayout();
75 | this.SuspendLayout();
76 | //
77 | // richTextBoxConfig
78 | //
79 | this.richTextBoxConfig.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
80 | | System.Windows.Forms.AnchorStyles.Left)
81 | | System.Windows.Forms.AnchorStyles.Right)));
82 | this.richTextBoxConfig.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
83 | this.richTextBoxConfig.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
84 | this.richTextBoxConfig.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
85 | this.richTextBoxConfig.Location = new System.Drawing.Point(13, 6);
86 | this.richTextBoxConfig.Name = "richTextBoxConfig";
87 | this.richTextBoxConfig.Size = new System.Drawing.Size(408, 585);
88 | this.richTextBoxConfig.TabIndex = 0;
89 | this.richTextBoxConfig.Text = "";
90 | this.richTextBoxConfig.WordWrap = false;
91 | //
92 | // buttonNewGen
93 | //
94 | this.buttonNewGen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
95 | this.buttonNewGen.Font = new System.Drawing.Font("微软雅黑", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
96 | this.buttonNewGen.Location = new System.Drawing.Point(765, 562);
97 | this.buttonNewGen.Name = "buttonNewGen";
98 | this.buttonNewGen.Size = new System.Drawing.Size(75, 29);
99 | this.buttonNewGen.TabIndex = 1;
100 | this.buttonNewGen.Text = "生成";
101 | this.buttonNewGen.UseVisualStyleBackColor = true;
102 | this.buttonNewGen.Click += new System.EventHandler(this.buttonNewGen_Click);
103 | //
104 | // panelLog
105 | //
106 | this.panelLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
107 | this.panelLog.BackColor = System.Drawing.Color.Transparent;
108 | this.panelLog.ColumnCount = 2;
109 | this.panelLog.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 32.68765F));
110 | this.panelLog.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67.31235F));
111 | this.panelLog.Controls.Add(this.labelLoglevel, 0, 2);
112 | this.panelLog.Controls.Add(this.labelErrorLog, 0, 1);
113 | this.panelLog.Controls.Add(this.labelAccessLog, 0, 0);
114 | this.panelLog.Controls.Add(this.textBoxAccessLog, 1, 0);
115 | this.panelLog.Controls.Add(this.textBoxErrorLog, 1, 1);
116 | this.panelLog.Controls.Add(this.comboBoxLogLevel, 1, 2);
117 | this.panelLog.Font = new System.Drawing.Font("微软雅黑", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
118 | this.panelLog.Location = new System.Drawing.Point(427, 6);
119 | this.panelLog.Name = "panelLog";
120 | this.panelLog.RowCount = 3;
121 | this.panelLog.RowStyles.Add(new System.Windows.Forms.RowStyle());
122 | this.panelLog.RowStyles.Add(new System.Windows.Forms.RowStyle());
123 | this.panelLog.RowStyles.Add(new System.Windows.Forms.RowStyle());
124 | this.panelLog.Size = new System.Drawing.Size(413, 97);
125 | this.panelLog.TabIndex = 2;
126 | //
127 | // labelLoglevel
128 | //
129 | this.labelLoglevel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
130 | this.labelLoglevel.AutoSize = true;
131 | this.labelLoglevel.Location = new System.Drawing.Point(3, 69);
132 | this.labelLoglevel.Name = "labelLoglevel";
133 | this.labelLoglevel.Size = new System.Drawing.Size(128, 20);
134 | this.labelLoglevel.TabIndex = 5;
135 | this.labelLoglevel.Text = "日志级别";
136 | //
137 | // labelErrorLog
138 | //
139 | this.labelErrorLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
140 | this.labelErrorLog.AutoSize = true;
141 | this.labelErrorLog.Location = new System.Drawing.Point(3, 36);
142 | this.labelErrorLog.Name = "labelErrorLog";
143 | this.labelErrorLog.Size = new System.Drawing.Size(128, 20);
144 | this.labelErrorLog.TabIndex = 2;
145 | this.labelErrorLog.Text = "错误日志储存位置";
146 | //
147 | // labelAccessLog
148 | //
149 | this.labelAccessLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
150 | this.labelAccessLog.AutoSize = true;
151 | this.labelAccessLog.Location = new System.Drawing.Point(3, 5);
152 | this.labelAccessLog.Name = "labelAccessLog";
153 | this.labelAccessLog.Size = new System.Drawing.Size(128, 20);
154 | this.labelAccessLog.TabIndex = 1;
155 | this.labelAccessLog.Text = "访问日志储存位置";
156 | //
157 | // textBoxAccessLog
158 | //
159 | this.textBoxAccessLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
160 | this.textBoxAccessLog.Location = new System.Drawing.Point(137, 3);
161 | this.textBoxAccessLog.Name = "textBoxAccessLog";
162 | this.textBoxAccessLog.Size = new System.Drawing.Size(273, 25);
163 | this.textBoxAccessLog.TabIndex = 3;
164 | this.textBoxAccessLog.Text = "/var/log/v2ray/access.log";
165 | //
166 | // textBoxErrorLog
167 | //
168 | this.textBoxErrorLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
169 | this.textBoxErrorLog.Location = new System.Drawing.Point(137, 34);
170 | this.textBoxErrorLog.Name = "textBoxErrorLog";
171 | this.textBoxErrorLog.Size = new System.Drawing.Size(273, 25);
172 | this.textBoxErrorLog.TabIndex = 4;
173 | this.textBoxErrorLog.Text = "/var/log/v2ray/error.log";
174 | //
175 | // comboBoxLogLevel
176 | //
177 | this.comboBoxLogLevel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
178 | this.comboBoxLogLevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
179 | this.comboBoxLogLevel.FormattingEnabled = true;
180 | this.comboBoxLogLevel.Items.AddRange(new object[] {
181 | "debug",
182 | "info",
183 | "warning",
184 | "error",
185 | "none"});
186 | this.comboBoxLogLevel.Location = new System.Drawing.Point(137, 66);
187 | this.comboBoxLogLevel.Name = "comboBoxLogLevel";
188 | this.comboBoxLogLevel.Size = new System.Drawing.Size(273, 27);
189 | this.comboBoxLogLevel.TabIndex = 6;
190 | //
191 | // panelServerConfig
192 | //
193 | this.panelServerConfig.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
194 | this.panelServerConfig.BackColor = System.Drawing.Color.Transparent;
195 | this.panelServerConfig.ColumnCount = 2;
196 | this.panelServerConfig.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 32.44552F));
197 | this.panelServerConfig.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67.55448F));
198 | this.panelServerConfig.Controls.Add(this.labelPort, 0, 1);
199 | this.panelServerConfig.Controls.Add(this.labelProtocol, 0, 0);
200 | this.panelServerConfig.Controls.Add(this.comboBoxProtocol, 1, 0);
201 | this.panelServerConfig.Controls.Add(this.upDownPort, 1, 1);
202 | this.panelServerConfig.Font = new System.Drawing.Font("微软雅黑", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
203 | this.panelServerConfig.Location = new System.Drawing.Point(427, 110);
204 | this.panelServerConfig.Name = "panelServerConfig";
205 | this.panelServerConfig.RowCount = 2;
206 | this.panelServerConfig.RowStyles.Add(new System.Windows.Forms.RowStyle());
207 | this.panelServerConfig.RowStyles.Add(new System.Windows.Forms.RowStyle());
208 | this.panelServerConfig.Size = new System.Drawing.Size(413, 64);
209 | this.panelServerConfig.TabIndex = 3;
210 | //
211 | // labelPort
212 | //
213 | this.labelPort.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
214 | this.labelPort.AutoSize = true;
215 | this.labelPort.Location = new System.Drawing.Point(3, 38);
216 | this.labelPort.Name = "labelPort";
217 | this.labelPort.Size = new System.Drawing.Size(127, 20);
218 | this.labelPort.TabIndex = 8;
219 | this.labelPort.Text = "端口 (1~65535)";
220 | this.labelPort.Click += new System.EventHandler(this.labelPort_Click);
221 | //
222 | // labelProtocol
223 | //
224 | this.labelProtocol.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
225 | this.labelProtocol.AutoSize = true;
226 | this.labelProtocol.Location = new System.Drawing.Point(3, 6);
227 | this.labelProtocol.Name = "labelProtocol";
228 | this.labelProtocol.Size = new System.Drawing.Size(127, 20);
229 | this.labelProtocol.TabIndex = 6;
230 | this.labelProtocol.Text = "服务类型";
231 | //
232 | // comboBoxProtocol
233 | //
234 | this.comboBoxProtocol.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
235 | this.comboBoxProtocol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
236 | this.comboBoxProtocol.FormattingEnabled = true;
237 | this.comboBoxProtocol.Items.AddRange(new object[] {
238 | "vmess"});
239 | this.comboBoxProtocol.Location = new System.Drawing.Point(136, 3);
240 | this.comboBoxProtocol.Name = "comboBoxProtocol";
241 | this.comboBoxProtocol.Size = new System.Drawing.Size(274, 27);
242 | this.comboBoxProtocol.TabIndex = 7;
243 | //
244 | // upDownPort
245 | //
246 | this.upDownPort.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
247 | this.upDownPort.Location = new System.Drawing.Point(136, 36);
248 | this.upDownPort.Maximum = new decimal(new int[] {
249 | 65535,
250 | 0,
251 | 0,
252 | 0});
253 | this.upDownPort.Minimum = new decimal(new int[] {
254 | 1,
255 | 0,
256 | 0,
257 | 0});
258 | this.upDownPort.Name = "upDownPort";
259 | this.upDownPort.Size = new System.Drawing.Size(274, 25);
260 | this.upDownPort.TabIndex = 9;
261 | this.upDownPort.Value = new decimal(new int[] {
262 | 2332,
263 | 0,
264 | 0,
265 | 0});
266 | //
267 | // tableLayoutPanel1
268 | //
269 | this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
270 | this.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
271 | this.tableLayoutPanel1.ColumnCount = 2;
272 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 32.44552F));
273 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67.55448F));
274 | this.tableLayoutPanel1.Controls.Add(this.upDownAlterID, 1, 1);
275 | this.tableLayoutPanel1.Controls.Add(this.labelAlterID, 0, 1);
276 | this.tableLayoutPanel1.Controls.Add(this.labelUUID, 0, 0);
277 | this.tableLayoutPanel1.Controls.Add(this.textBoxUUID, 1, 0);
278 | this.tableLayoutPanel1.Controls.Add(this.buttonUUID, 0, 2);
279 | this.tableLayoutPanel1.Controls.Add(this.checkBoxUserLevel, 1, 2);
280 | this.tableLayoutPanel1.Font = new System.Drawing.Font("微软雅黑", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
281 | this.tableLayoutPanel1.Location = new System.Drawing.Point(427, 180);
282 | this.tableLayoutPanel1.Name = "tableLayoutPanel1";
283 | this.tableLayoutPanel1.RowCount = 3;
284 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
285 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
286 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
287 | this.tableLayoutPanel1.Size = new System.Drawing.Size(413, 96);
288 | this.tableLayoutPanel1.TabIndex = 4;
289 | //
290 | // upDownAlterID
291 | //
292 | this.upDownAlterID.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
293 | this.upDownAlterID.Location = new System.Drawing.Point(136, 34);
294 | this.upDownAlterID.Maximum = new decimal(new int[] {
295 | 65535,
296 | 0,
297 | 0,
298 | 0});
299 | this.upDownAlterID.Minimum = new decimal(new int[] {
300 | 1,
301 | 0,
302 | 0,
303 | 0});
304 | this.upDownAlterID.Name = "upDownAlterID";
305 | this.upDownAlterID.Size = new System.Drawing.Size(274, 25);
306 | this.upDownAlterID.TabIndex = 10;
307 | this.upDownAlterID.Value = new decimal(new int[] {
308 | 32,
309 | 0,
310 | 0,
311 | 0});
312 | //
313 | // labelAlterID
314 | //
315 | this.labelAlterID.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
316 | this.labelAlterID.AutoSize = true;
317 | this.labelAlterID.Location = new System.Drawing.Point(3, 36);
318 | this.labelAlterID.Name = "labelAlterID";
319 | this.labelAlterID.Size = new System.Drawing.Size(127, 20);
320 | this.labelAlterID.TabIndex = 8;
321 | this.labelAlterID.Text = "AlterID数量";
322 | //
323 | // labelUUID
324 | //
325 | this.labelUUID.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
326 | this.labelUUID.AutoSize = true;
327 | this.labelUUID.Location = new System.Drawing.Point(3, 5);
328 | this.labelUUID.Name = "labelUUID";
329 | this.labelUUID.Size = new System.Drawing.Size(127, 20);
330 | this.labelUUID.TabIndex = 7;
331 | this.labelUUID.Text = "用户UUID";
332 | //
333 | // textBoxUUID
334 | //
335 | this.textBoxUUID.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
336 | this.textBoxUUID.Location = new System.Drawing.Point(136, 3);
337 | this.textBoxUUID.Name = "textBoxUUID";
338 | this.textBoxUUID.Size = new System.Drawing.Size(274, 25);
339 | this.textBoxUUID.TabIndex = 9;
340 | this.textBoxUUID.Text = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
341 | //
342 | // buttonUUID
343 | //
344 | this.buttonUUID.Location = new System.Drawing.Point(3, 65);
345 | this.buttonUUID.Name = "buttonUUID";
346 | this.buttonUUID.Size = new System.Drawing.Size(127, 29);
347 | this.buttonUUID.TabIndex = 11;
348 | this.buttonUUID.Text = "重新生成UUID";
349 | this.buttonUUID.UseVisualStyleBackColor = true;
350 | this.buttonUUID.Click += new System.EventHandler(this.buttonUUID_Click);
351 | //
352 | // checkBoxUserLevel
353 | //
354 | this.checkBoxUserLevel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
355 | this.checkBoxUserLevel.AutoSize = true;
356 | this.checkBoxUserLevel.Checked = true;
357 | this.checkBoxUserLevel.CheckState = System.Windows.Forms.CheckState.Checked;
358 | this.checkBoxUserLevel.Location = new System.Drawing.Point(136, 67);
359 | this.checkBoxUserLevel.Name = "checkBoxUserLevel";
360 | this.checkBoxUserLevel.Size = new System.Drawing.Size(274, 24);
361 | this.checkBoxUserLevel.TabIndex = 12;
362 | this.checkBoxUserLevel.Text = "信任此用户,放宽对此用户的限制";
363 | this.checkBoxUserLevel.UseVisualStyleBackColor = true;
364 | //
365 | // tableLayoutPanel2
366 | //
367 | this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
368 | | System.Windows.Forms.AnchorStyles.Right)));
369 | this.tableLayoutPanel2.ColumnCount = 2;
370 | this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 32.44552F));
371 | this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67.55448F));
372 | this.tableLayoutPanel2.Controls.Add(this.listBoxManyUser, 1, 0);
373 | this.tableLayoutPanel2.Controls.Add(this.panel1, 0, 0);
374 | this.tableLayoutPanel2.Location = new System.Drawing.Point(427, 306);
375 | this.tableLayoutPanel2.Name = "tableLayoutPanel2";
376 | this.tableLayoutPanel2.RowCount = 1;
377 | this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
378 | this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 136F));
379 | this.tableLayoutPanel2.Size = new System.Drawing.Size(413, 136);
380 | this.tableLayoutPanel2.TabIndex = 5;
381 | //
382 | // listBoxManyUser
383 | //
384 | this.listBoxManyUser.Dock = System.Windows.Forms.DockStyle.Fill;
385 | this.listBoxManyUser.Enabled = false;
386 | this.listBoxManyUser.Font = new System.Drawing.Font("微软雅黑", 7.8F);
387 | this.listBoxManyUser.FormattingEnabled = true;
388 | this.listBoxManyUser.HorizontalScrollbar = true;
389 | this.listBoxManyUser.ItemHeight = 19;
390 | this.listBoxManyUser.Location = new System.Drawing.Point(136, 3);
391 | this.listBoxManyUser.Name = "listBoxManyUser";
392 | this.listBoxManyUser.Size = new System.Drawing.Size(274, 130);
393 | this.listBoxManyUser.TabIndex = 0;
394 | this.listBoxManyUser.DoubleClick += new System.EventHandler(this.listBoxManyUser_DoubleClick);
395 | //
396 | // panel1
397 | //
398 | this.panel1.Controls.Add(this.buttonDel);
399 | this.panel1.Controls.Add(this.buttonAdd);
400 | this.panel1.Location = new System.Drawing.Point(3, 3);
401 | this.panel1.Name = "panel1";
402 | this.panel1.Size = new System.Drawing.Size(127, 117);
403 | this.panel1.TabIndex = 16;
404 | this.panel1.DoubleClick += new System.EventHandler(this.panel1_DoubleClick);
405 | //
406 | // buttonDel
407 | //
408 | this.buttonDel.Enabled = false;
409 | this.buttonDel.Font = new System.Drawing.Font("微软雅黑", 7.8F);
410 | this.buttonDel.Location = new System.Drawing.Point(0, 38);
411 | this.buttonDel.Name = "buttonDel";
412 | this.buttonDel.Size = new System.Drawing.Size(126, 29);
413 | this.buttonDel.TabIndex = 15;
414 | this.buttonDel.Text = "删除用户";
415 | this.buttonDel.UseVisualStyleBackColor = true;
416 | this.buttonDel.Click += new System.EventHandler(this.buttonDel_Click);
417 | //
418 | // buttonAdd
419 | //
420 | this.buttonAdd.Enabled = false;
421 | this.buttonAdd.Font = new System.Drawing.Font("微软雅黑", 7.8F);
422 | this.buttonAdd.Location = new System.Drawing.Point(0, 3);
423 | this.buttonAdd.Name = "buttonAdd";
424 | this.buttonAdd.Size = new System.Drawing.Size(126, 29);
425 | this.buttonAdd.TabIndex = 14;
426 | this.buttonAdd.Text = "添加用户";
427 | this.buttonAdd.UseVisualStyleBackColor = true;
428 | this.buttonAdd.Click += new System.EventHandler(this.buttonAdd_Click);
429 | //
430 | // checkBoxManyUser
431 | //
432 | this.checkBoxManyUser.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
433 | this.checkBoxManyUser.AutoSize = true;
434 | this.checkBoxManyUser.Font = new System.Drawing.Font("微软雅黑", 7.8F);
435 | this.checkBoxManyUser.Location = new System.Drawing.Point(563, 279);
436 | this.checkBoxManyUser.Name = "checkBoxManyUser";
437 | this.checkBoxManyUser.Size = new System.Drawing.Size(101, 24);
438 | this.checkBoxManyUser.TabIndex = 13;
439 | this.checkBoxManyUser.Text = "启用多用户";
440 | this.checkBoxManyUser.UseVisualStyleBackColor = true;
441 | this.checkBoxManyUser.CheckedChanged += new System.EventHandler(this.checkBoxManyUser_CheckedChanged);
442 | //
443 | // buttonSave
444 | //
445 | this.buttonSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
446 | this.buttonSave.Font = new System.Drawing.Font("微软雅黑", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
447 | this.buttonSave.Location = new System.Drawing.Point(684, 562);
448 | this.buttonSave.Name = "buttonSave";
449 | this.buttonSave.Size = new System.Drawing.Size(75, 29);
450 | this.buttonSave.TabIndex = 6;
451 | this.buttonSave.Text = "保存";
452 | this.buttonSave.UseVisualStyleBackColor = true;
453 | this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click);
454 | //
455 | // checkBoxRouting
456 | //
457 | this.checkBoxRouting.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
458 | this.checkBoxRouting.AutoSize = true;
459 | this.checkBoxRouting.Checked = true;
460 | this.checkBoxRouting.CheckState = System.Windows.Forms.CheckState.Checked;
461 | this.checkBoxRouting.Font = new System.Drawing.Font("微软雅黑", 7.8F);
462 | this.checkBoxRouting.Location = new System.Drawing.Point(564, 440);
463 | this.checkBoxRouting.Name = "checkBoxRouting";
464 | this.checkBoxRouting.Size = new System.Drawing.Size(203, 24);
465 | this.checkBoxRouting.TabIndex = 7;
466 | this.checkBoxRouting.Text = "启用路由规则 屏蔽内网访问";
467 | this.checkBoxRouting.UseVisualStyleBackColor = true;
468 | //
469 | // checkBoxHttpFake
470 | //
471 | this.checkBoxHttpFake.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
472 | this.checkBoxHttpFake.AutoSize = true;
473 | this.checkBoxHttpFake.Font = new System.Drawing.Font("微软雅黑", 7.8F);
474 | this.checkBoxHttpFake.Location = new System.Drawing.Point(564, 461);
475 | this.checkBoxHttpFake.Name = "checkBoxHttpFake";
476 | this.checkBoxHttpFake.Size = new System.Drawing.Size(117, 24);
477 | this.checkBoxHttpFake.TabIndex = 8;
478 | this.checkBoxHttpFake.Text = "启用Http伪装";
479 | this.checkBoxHttpFake.UseVisualStyleBackColor = true;
480 | this.checkBoxHttpFake.CheckedChanged += new System.EventHandler(this.checkBoxHttpFake_CheckedChanged);
481 | //
482 | // editLink
483 | //
484 | this.editLink.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
485 | this.editLink.AutoSize = true;
486 | this.editLink.Font = new System.Drawing.Font("微软雅黑", 7.8F);
487 | this.editLink.ForeColor = System.Drawing.SystemColors.ActiveCaption;
488 | this.editLink.Location = new System.Drawing.Point(680, 462);
489 | this.editLink.Name = "editLink";
490 | this.editLink.Size = new System.Drawing.Size(37, 20);
491 | this.editLink.TabIndex = 9;
492 | this.editLink.Text = "编辑";
493 | this.editLink.Click += new System.EventHandler(this.editLink_Click);
494 | //
495 | // checkBoxKCP
496 | //
497 | this.checkBoxKCP.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
498 | this.checkBoxKCP.AutoSize = true;
499 | this.checkBoxKCP.Font = new System.Drawing.Font("微软雅黑", 7.8F);
500 | this.checkBoxKCP.Location = new System.Drawing.Point(564, 482);
501 | this.checkBoxKCP.Name = "checkBoxKCP";
502 | this.checkBoxKCP.Size = new System.Drawing.Size(99, 24);
503 | this.checkBoxKCP.TabIndex = 10;
504 | this.checkBoxKCP.Text = "启用mKCP";
505 | this.checkBoxKCP.UseVisualStyleBackColor = true;
506 | this.checkBoxKCP.CheckedChanged += new System.EventHandler(this.checkBoxKCP_CheckedChanged);
507 | //
508 | // checkBoxWS
509 | //
510 | this.checkBoxWS.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
511 | this.checkBoxWS.AutoSize = true;
512 | this.checkBoxWS.Font = new System.Drawing.Font("微软雅黑", 7.8F);
513 | this.checkBoxWS.Location = new System.Drawing.Point(564, 503);
514 | this.checkBoxWS.Name = "checkBoxWS";
515 | this.checkBoxWS.Size = new System.Drawing.Size(135, 24);
516 | this.checkBoxWS.TabIndex = 11;
517 | this.checkBoxWS.Text = "启用WebSocket";
518 | this.checkBoxWS.UseVisualStyleBackColor = true;
519 | this.checkBoxWS.CheckedChanged += new System.EventHandler(this.checkBoxWS_CheckedChanged);
520 | //
521 | // checkBoxTLS
522 | //
523 | this.checkBoxTLS.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
524 | this.checkBoxTLS.AutoSize = true;
525 | this.checkBoxTLS.Font = new System.Drawing.Font("微软雅黑", 7.8F);
526 | this.checkBoxTLS.Location = new System.Drawing.Point(564, 524);
527 | this.checkBoxTLS.Name = "checkBoxTLS";
528 | this.checkBoxTLS.Size = new System.Drawing.Size(166, 24);
529 | this.checkBoxTLS.TabIndex = 12;
530 | this.checkBoxTLS.Text = "启用TLS (传输层安全)";
531 | this.checkBoxTLS.UseVisualStyleBackColor = true;
532 | this.checkBoxTLS.CheckedChanged += new System.EventHandler(this.checkBoxTLS_CheckedChanged);
533 | //
534 | // buttonUserConfig
535 | //
536 | this.buttonUserConfig.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
537 | this.buttonUserConfig.Font = new System.Drawing.Font("微软雅黑", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
538 | this.buttonUserConfig.Location = new System.Drawing.Point(563, 562);
539 | this.buttonUserConfig.Name = "buttonUserConfig";
540 | this.buttonUserConfig.Size = new System.Drawing.Size(115, 29);
541 | this.buttonUserConfig.TabIndex = 13;
542 | this.buttonUserConfig.Text = "生成客户端配置";
543 | this.buttonUserConfig.UseVisualStyleBackColor = true;
544 | this.buttonUserConfig.Click += new System.EventHandler(this.buttonUserConfig_Click);
545 | //
546 | // labelFakeKCP
547 | //
548 | this.labelFakeKCP.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
549 | this.labelFakeKCP.AutoSize = true;
550 | this.labelFakeKCP.Font = new System.Drawing.Font("微软雅黑", 7.8F);
551 | this.labelFakeKCP.Location = new System.Drawing.Point(680, 486);
552 | this.labelFakeKCP.Name = "labelFakeKCP";
553 | this.labelFakeKCP.Size = new System.Drawing.Size(37, 20);
554 | this.labelFakeKCP.TabIndex = 14;
555 | this.labelFakeKCP.Text = "伪装";
556 | //
557 | // comboBoxFakeKCP
558 | //
559 | this.comboBoxFakeKCP.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
560 | this.comboBoxFakeKCP.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
561 | this.comboBoxFakeKCP.Font = new System.Drawing.Font("微软雅黑", 7.8F);
562 | this.comboBoxFakeKCP.FormattingEnabled = true;
563 | this.comboBoxFakeKCP.Items.AddRange(new object[] {
564 | "none",
565 | "utp",
566 | "srtp",
567 | "wechat-video"});
568 | this.comboBoxFakeKCP.Location = new System.Drawing.Point(723, 482);
569 | this.comboBoxFakeKCP.Name = "comboBoxFakeKCP";
570 | this.comboBoxFakeKCP.Size = new System.Drawing.Size(117, 27);
571 | this.comboBoxFakeKCP.TabIndex = 15;
572 | //
573 | // MainForm
574 | //
575 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
576 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
577 | this.BackColor = System.Drawing.SystemColors.ControlLightLight;
578 | this.ClientSize = new System.Drawing.Size(852, 603);
579 | this.Controls.Add(this.comboBoxFakeKCP);
580 | this.Controls.Add(this.labelFakeKCP);
581 | this.Controls.Add(this.checkBoxManyUser);
582 | this.Controls.Add(this.buttonUserConfig);
583 | this.Controls.Add(this.checkBoxTLS);
584 | this.Controls.Add(this.checkBoxWS);
585 | this.Controls.Add(this.checkBoxKCP);
586 | this.Controls.Add(this.editLink);
587 | this.Controls.Add(this.checkBoxHttpFake);
588 | this.Controls.Add(this.checkBoxRouting);
589 | this.Controls.Add(this.buttonSave);
590 | this.Controls.Add(this.tableLayoutPanel2);
591 | this.Controls.Add(this.tableLayoutPanel1);
592 | this.Controls.Add(this.panelServerConfig);
593 | this.Controls.Add(this.panelLog);
594 | this.Controls.Add(this.buttonNewGen);
595 | this.Controls.Add(this.richTextBoxConfig);
596 | this.Name = "MainForm";
597 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
598 | this.Text = "V2RayConfig";
599 | this.Load += new System.EventHandler(this.Form1_Load);
600 | this.panelLog.ResumeLayout(false);
601 | this.panelLog.PerformLayout();
602 | this.panelServerConfig.ResumeLayout(false);
603 | this.panelServerConfig.PerformLayout();
604 | ((System.ComponentModel.ISupportInitialize)(this.upDownPort)).EndInit();
605 | this.tableLayoutPanel1.ResumeLayout(false);
606 | this.tableLayoutPanel1.PerformLayout();
607 | ((System.ComponentModel.ISupportInitialize)(this.upDownAlterID)).EndInit();
608 | this.tableLayoutPanel2.ResumeLayout(false);
609 | this.panel1.ResumeLayout(false);
610 | this.ResumeLayout(false);
611 | this.PerformLayout();
612 |
613 | }
614 |
615 | #endregion
616 |
617 | private System.Windows.Forms.RichTextBox richTextBoxConfig;
618 | private System.Windows.Forms.Button buttonNewGen;
619 | private System.Windows.Forms.TableLayoutPanel panelLog;
620 | private System.Windows.Forms.Label labelErrorLog;
621 | private System.Windows.Forms.Label labelAccessLog;
622 | private System.Windows.Forms.TextBox textBoxAccessLog;
623 | private System.Windows.Forms.TextBox textBoxErrorLog;
624 | private System.Windows.Forms.Label labelLoglevel;
625 | private System.Windows.Forms.ComboBox comboBoxLogLevel;
626 | private System.Windows.Forms.TableLayoutPanel panelServerConfig;
627 | private System.Windows.Forms.Label labelProtocol;
628 | private System.Windows.Forms.ComboBox comboBoxProtocol;
629 | private System.Windows.Forms.Label labelPort;
630 | private System.Windows.Forms.NumericUpDown upDownPort;
631 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
632 | private System.Windows.Forms.NumericUpDown upDownAlterID;
633 | private System.Windows.Forms.Label labelAlterID;
634 | private System.Windows.Forms.Label labelUUID;
635 | private System.Windows.Forms.TextBox textBoxUUID;
636 | private System.Windows.Forms.Button buttonUUID;
637 | private System.Windows.Forms.CheckBox checkBoxUserLevel;
638 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
639 | private System.Windows.Forms.ListBox listBoxManyUser;
640 | private System.Windows.Forms.CheckBox checkBoxManyUser;
641 | private System.Windows.Forms.Button buttonSave;
642 | private System.Windows.Forms.CheckBox checkBoxRouting;
643 | private System.Windows.Forms.CheckBox checkBoxHttpFake;
644 | private System.Windows.Forms.Label editLink;
645 | private System.Windows.Forms.CheckBox checkBoxKCP;
646 | private System.Windows.Forms.CheckBox checkBoxWS;
647 | private System.Windows.Forms.CheckBox checkBoxTLS;
648 | private System.Windows.Forms.Button buttonUserConfig;
649 | private System.Windows.Forms.Label labelFakeKCP;
650 | private System.Windows.Forms.ComboBox comboBoxFakeKCP;
651 | private System.Windows.Forms.Panel panel1;
652 | private System.Windows.Forms.Button buttonDel;
653 | private System.Windows.Forms.Button buttonAdd;
654 | }
655 | }
656 |
657 |
--------------------------------------------------------------------------------
/mV2RayConfig/Forms/MainForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Windows.Forms;
4 | using Newtonsoft.Json;
5 | using Newtonsoft.Json.Linq;
6 | using static mV2RayConfig.Config;
7 | using mV2RayConfig.Forms;
8 |
9 | namespace mV2RayConfig
10 | {
11 | public partial class MainForm : Form
12 | {
13 | private ServerInfo serverInfo = new ServerInfo();
14 | private Outbound outbound = new Outbound();
15 | private Inbound inbound = new Inbound();
16 | private InBoundSetting inBoundSetting = new InBoundSetting();
17 | private VmessClients clients = new VmessClients();
18 | private Log log = new Log();
19 |
20 | public MainForm()
21 | {
22 | InitializeComponent();
23 | comboBoxLogLevel.SelectedIndex = 2;
24 | comboBoxProtocol.SelectedIndex = 0;
25 | comboBoxFakeKCP.SelectedIndex = 0;
26 | textBoxUUID.Text = uuidGen();
27 | buttonUserConfig.Hide();
28 |
29 | //listBoxManyUser.HorizontalScrollbar = true;
30 | //listBoxManyUser.ScrollAlwaysVisible = true;
31 | }
32 |
33 | private void Form1_Load(object sender, EventArgs e)
34 | {
35 | richTextBoxConfig.Text = configGen();
36 | }
37 |
38 | private void buttonNewGen_Click(object sender, EventArgs e)
39 | {
40 | richTextBoxConfig.Text = configGen();
41 | if (!(checkBoxHttpFake.Checked||checkBoxKCP.Checked || checkBoxWS.Checked || checkBoxTLS.Checked))
42 | {
43 | buttonUserConfig.Show();
44 | }
45 | }
46 |
47 | private void labelPort_Click(object sender, EventArgs e)
48 | {
49 | upDownPort.Value = new Random(DateTime.Now.Second).Next(2000, 7000);
50 | }
51 |
52 | private void buttonUUID_Click(object sender, EventArgs e)
53 | {
54 | textBoxUUID.Text = uuidGen();
55 | }
56 |
57 | private void checkBoxManyUser_CheckedChanged(object sender, EventArgs e)
58 | {
59 | if (checkBoxManyUser.Checked)
60 | {
61 | listBoxManyUser.Enabled = true;
62 | buttonAdd.Enabled = true;
63 | buttonDel.Enabled = true;
64 | buttonUserConfig.Enabled = false;
65 | }
66 | else
67 | {
68 | listBoxManyUser.Enabled = false;
69 | buttonAdd.Enabled = false;
70 | buttonDel.Enabled = false;
71 | buttonUserConfig.Enabled = true;
72 | }
73 | }
74 |
75 | private void buttonAdd_Click(object sender, EventArgs e)
76 | {
77 | clients.id = textBoxUUID.Text;
78 | clients.alterId = Convert.ToInt32(upDownAlterID.Value);
79 | if (checkBoxUserLevel.Checked)
80 | {
81 | clients.level = 1;
82 | }
83 | else
84 | {
85 | clients.level = 0;
86 | }
87 | listBoxManyUser.Items.Add(JsonConvert.SerializeObject(clients));
88 | textBoxUUID.Text = uuidGen();
89 | }
90 |
91 | private void buttonDel_Click(object sender, EventArgs e)
92 | {
93 | listBoxManyUser.Items.Remove(listBoxManyUser.SelectedItem);
94 | }
95 |
96 | private void listBoxManyUser_DoubleClick(object sender, EventArgs e)
97 | {
98 | if (listBoxManyUser.SelectedItem != null)
99 | {
100 | MessageBox.Show(listBoxManyUser.SelectedItem.ToString());
101 | }
102 | }
103 |
104 | private string configGen()
105 | {
106 | log.access = textBoxAccessLog.Text;
107 | log.error = textBoxErrorLog.Text;
108 | log.loglevel = comboBoxLogLevel.Text;
109 | serverInfo.log = log;
110 |
111 | inbound.port = Convert.ToInt32(upDownPort.Value);
112 | inbound.protocol = comboBoxProtocol.Text;
113 | JArray centArray = new JArray();
114 |
115 | if (!checkBoxManyUser.Checked)
116 | {
117 | clients.id = textBoxUUID.Text;
118 | clients.alterId = Convert.ToInt32(upDownAlterID.Value);
119 | if (checkBoxUserLevel.Checked)
120 | {
121 | clients.level = 1;
122 | }
123 | else
124 | {
125 | clients.level = 0;
126 | }
127 | centArray.Add(JObject.FromObject(clients));
128 | }
129 | else
130 | {
131 | foreach (var item in listBoxManyUser.Items)
132 | {
133 | centArray.Add(JObject.Parse(item.ToString()));
134 | }
135 | }
136 |
137 | inBoundSetting.clients = centArray;
138 | inbound.settings = inBoundSetting;
139 | serverInfo.inbound = inbound;
140 |
141 | outbound.protocol = "freedom";
142 | outbound.settings = new JObject();
143 | serverInfo.outbound = outbound;
144 |
145 | JObject configJson = JObject.FromObject(serverInfo);
146 | JObject stream = new JObject();
147 |
148 | configJson["outboundDetour"] = JArray.Parse(OutboundDetourStr);
149 | if (checkBoxRouting.Checked)
150 | {
151 | configJson["routing"] = JObject.Parse(RoutingStr);
152 | }
153 |
154 | if (checkBoxHttpFake.Checked)
155 | {
156 | stream["network"] = "tcp";
157 | stream["tcpSettings"] = JObject.Parse(HttpFakeStr);
158 | configJson["streamSettings"] = stream;
159 | }
160 |
161 | if (checkBoxKCP.Checked)
162 | {
163 | stream["network"] = "kcp";
164 | JObject KCPSet = JObject.Parse(MKcpStr);
165 | JObject fakeType = new JObject();
166 | fakeType["type"] = comboBoxFakeKCP.Text;
167 | KCPSet["header"] = fakeType;
168 | stream["kcpSettings"] = KCPSet;
169 | configJson["streamSettings"] = stream;
170 | }
171 |
172 | if (checkBoxTLS.Checked)
173 | {
174 | if (!checkBoxWS.Checked)
175 | {
176 | stream["network"] = "tcp";
177 | }
178 | stream["security"] = "tls";
179 | JObject tlsSet = new JObject();
180 | JObject certSet = new JObject();
181 | certSet["certificateFile"] = CertificateFile;
182 | certSet["keyFile"] = KeyFile;
183 | JArray certificatesArray = new JArray();
184 | certificatesArray.Add(certSet);
185 | tlsSet["serverName"] = ServerName;
186 | tlsSet["certificates"] = certificatesArray;
187 | stream["tlsSettings"] = tlsSet;
188 | configJson["streamSettings"] = stream;
189 | }
190 |
191 | if (checkBoxWS.Checked)
192 | {
193 | stream["network"] = "ws";
194 | configJson["streamSettings"] = stream;
195 | }
196 |
197 | return MyJson.FormatJsonString(configJson.ToString());
198 | }
199 |
200 | private string uuidGen()
201 | {
202 | return Guid.NewGuid().ToString();
203 | }
204 |
205 | private void resetEnabled()
206 | {
207 | checkBoxHttpFake.Enabled = true;
208 | checkBoxWS.Enabled = true;
209 | checkBoxKCP.Enabled = true;
210 | checkBoxTLS.Enabled = true;
211 | }
212 |
213 | private void buttonSave_Click(object sender, EventArgs e)
214 | {
215 | SaveFileDialog saveFileDialog = new SaveFileDialog();
216 | saveFileDialog.Filter = "V2Ray配置文件Json|config.json";
217 | saveFileDialog.FileName = "config.json";
218 | saveFileDialog.Title = "保存V2Ray配置文件";
219 | if (saveFileDialog.ShowDialog() == DialogResult.OK)
220 | {
221 | File.WriteAllText(saveFileDialog.FileName, richTextBoxConfig.Text);
222 | }
223 | }
224 |
225 | private void editLink_Click(object sender, EventArgs e)
226 | {
227 | new EditForm().ShowDialog();
228 | }
229 |
230 | private void checkBoxHttpFake_CheckedChanged(object sender, EventArgs e)
231 | {
232 | if (checkBoxHttpFake.Checked)
233 | {
234 | checkBoxWS.Enabled = false;
235 | checkBoxKCP.Enabled = false;
236 | }
237 | else
238 | {
239 | resetEnabled();
240 | }
241 | }
242 |
243 | private void checkBoxKCP_CheckedChanged(object sender, EventArgs e)
244 | {
245 | if (checkBoxKCP.Checked)
246 | {
247 | checkBoxWS.Enabled = false;
248 | checkBoxHttpFake.Enabled = false;
249 | checkBoxTLS.Enabled = false;
250 | }
251 | else
252 | {
253 | resetEnabled();
254 | }
255 | }
256 |
257 | private void checkBoxWS_CheckedChanged(object sender, EventArgs e)
258 | {
259 | if (checkBoxWS.Checked)
260 | {
261 | checkBoxHttpFake.Enabled = false;
262 | checkBoxKCP.Enabled = false;
263 | }
264 | else
265 | {
266 | resetEnabled();
267 | }
268 | }
269 |
270 | private void checkBoxTLS_CheckedChanged(object sender, EventArgs e)
271 | {
272 | if (checkBoxTLS.Checked)
273 | {
274 | checkBoxKCP.Enabled = false;
275 | new TLSForm().ShowDialog();
276 | }
277 | else
278 | {
279 | resetEnabled();
280 | }
281 | }
282 |
283 | private void buttonUserConfig_Click(object sender, EventArgs e)
284 | {
285 | string uuid = clients.id;
286 | int id = clients.alterId;
287 | int port = inbound.port;
288 | new ClientConfigForm(uuid, id, port).Show();
289 | }
290 |
291 | private void panel1_DoubleClick(object sender, EventArgs e)
292 | {
293 | string uuid = clients.id;
294 | int id = clients.alterId;
295 | int port = inbound.port;
296 | new ClientConfigForm(uuid, id, port).Show();
297 | }
298 | }
299 | }
300 |
--------------------------------------------------------------------------------
/mV2RayConfig/Forms/MainForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/mV2RayConfig/Forms/TLSForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace mV2RayConfig
2 | {
3 | partial class TLSForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
32 | this.label2 = new System.Windows.Forms.Label();
33 | this.textBoxHostName = new System.Windows.Forms.TextBox();
34 | this.textBoxCertFile = new System.Windows.Forms.TextBox();
35 | this.textBoxKeyFile = new System.Windows.Forms.TextBox();
36 | this.labelHostName = new System.Windows.Forms.Label();
37 | this.label1 = new System.Windows.Forms.Label();
38 | this.buttonOK = new System.Windows.Forms.Button();
39 | this.tableLayoutPanel1.SuspendLayout();
40 | this.SuspendLayout();
41 | //
42 | // tableLayoutPanel1
43 | //
44 | this.tableLayoutPanel1.ColumnCount = 2;
45 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 34.88943F));
46 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 65.11057F));
47 | this.tableLayoutPanel1.Controls.Add(this.label2, 0, 2);
48 | this.tableLayoutPanel1.Controls.Add(this.textBoxHostName, 1, 0);
49 | this.tableLayoutPanel1.Controls.Add(this.textBoxCertFile, 1, 1);
50 | this.tableLayoutPanel1.Controls.Add(this.textBoxKeyFile, 1, 2);
51 | this.tableLayoutPanel1.Controls.Add(this.labelHostName, 0, 0);
52 | this.tableLayoutPanel1.Controls.Add(this.label1, 0, 1);
53 | this.tableLayoutPanel1.Font = new System.Drawing.Font("微软雅黑", 7.8F);
54 | this.tableLayoutPanel1.Location = new System.Drawing.Point(13, 13);
55 | this.tableLayoutPanel1.Name = "tableLayoutPanel1";
56 | this.tableLayoutPanel1.RowCount = 3;
57 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
58 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
59 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
60 | this.tableLayoutPanel1.Size = new System.Drawing.Size(407, 119);
61 | this.tableLayoutPanel1.TabIndex = 0;
62 | //
63 | // label2
64 | //
65 | this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
66 | this.label2.AutoSize = true;
67 | this.label2.Font = new System.Drawing.Font("微软雅黑", 7.8F);
68 | this.label2.Location = new System.Drawing.Point(3, 88);
69 | this.label2.Name = "label2";
70 | this.label2.Size = new System.Drawing.Size(135, 20);
71 | this.label2.TabIndex = 10;
72 | this.label2.Text = "秘钥文件(.key)位置";
73 | //
74 | // textBoxHostName
75 | //
76 | this.textBoxHostName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
77 | this.textBoxHostName.Font = new System.Drawing.Font("微软雅黑", 7.8F);
78 | this.textBoxHostName.Location = new System.Drawing.Point(144, 7);
79 | this.textBoxHostName.Name = "textBoxHostName";
80 | this.textBoxHostName.Size = new System.Drawing.Size(260, 25);
81 | this.textBoxHostName.TabIndex = 0;
82 | //
83 | // textBoxCertFile
84 | //
85 | this.textBoxCertFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
86 | this.textBoxCertFile.Font = new System.Drawing.Font("微软雅黑", 7.8F);
87 | this.textBoxCertFile.Location = new System.Drawing.Point(144, 46);
88 | this.textBoxCertFile.Name = "textBoxCertFile";
89 | this.textBoxCertFile.Size = new System.Drawing.Size(260, 25);
90 | this.textBoxCertFile.TabIndex = 1;
91 | //
92 | // textBoxKeyFile
93 | //
94 | this.textBoxKeyFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
95 | this.textBoxKeyFile.Font = new System.Drawing.Font("微软雅黑", 7.8F);
96 | this.textBoxKeyFile.Location = new System.Drawing.Point(144, 86);
97 | this.textBoxKeyFile.Name = "textBoxKeyFile";
98 | this.textBoxKeyFile.Size = new System.Drawing.Size(260, 25);
99 | this.textBoxKeyFile.TabIndex = 2;
100 | //
101 | // labelHostName
102 | //
103 | this.labelHostName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
104 | this.labelHostName.AutoSize = true;
105 | this.labelHostName.Font = new System.Drawing.Font("微软雅黑", 7.8F);
106 | this.labelHostName.Location = new System.Drawing.Point(3, 9);
107 | this.labelHostName.Name = "labelHostName";
108 | this.labelHostName.Size = new System.Drawing.Size(135, 20);
109 | this.labelHostName.TabIndex = 8;
110 | this.labelHostName.Text = "域名";
111 | //
112 | // label1
113 | //
114 | this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
115 | this.label1.AutoSize = true;
116 | this.label1.Font = new System.Drawing.Font("微软雅黑", 7.8F);
117 | this.label1.Location = new System.Drawing.Point(3, 48);
118 | this.label1.Name = "label1";
119 | this.label1.Size = new System.Drawing.Size(135, 20);
120 | this.label1.TabIndex = 9;
121 | this.label1.Text = "证书文件(.crt)位置";
122 | //
123 | // buttonOK
124 | //
125 | this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
126 | this.buttonOK.Font = new System.Drawing.Font("微软雅黑", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
127 | this.buttonOK.Location = new System.Drawing.Point(345, 141);
128 | this.buttonOK.Name = "buttonOK";
129 | this.buttonOK.Size = new System.Drawing.Size(75, 29);
130 | this.buttonOK.TabIndex = 8;
131 | this.buttonOK.Text = "确定";
132 | this.buttonOK.UseVisualStyleBackColor = true;
133 | this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
134 | //
135 | // TLSForm
136 | //
137 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
138 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
139 | this.BackColor = System.Drawing.SystemColors.ControlLightLight;
140 | this.ClientSize = new System.Drawing.Size(432, 186);
141 | this.Controls.Add(this.buttonOK);
142 | this.Controls.Add(this.tableLayoutPanel1);
143 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
144 | this.Name = "TLSForm";
145 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
146 | this.Text = "TLS配置";
147 | this.Load += new System.EventHandler(this.TLSForm_Load);
148 | this.tableLayoutPanel1.ResumeLayout(false);
149 | this.tableLayoutPanel1.PerformLayout();
150 | this.ResumeLayout(false);
151 |
152 | }
153 |
154 | #endregion
155 |
156 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
157 | private System.Windows.Forms.TextBox textBoxHostName;
158 | private System.Windows.Forms.TextBox textBoxCertFile;
159 | private System.Windows.Forms.TextBox textBoxKeyFile;
160 | private System.Windows.Forms.Label label2;
161 | private System.Windows.Forms.Label labelHostName;
162 | private System.Windows.Forms.Label label1;
163 | private System.Windows.Forms.Button buttonOK;
164 | }
165 | }
--------------------------------------------------------------------------------
/mV2RayConfig/Forms/TLSForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms;
3 |
4 | namespace mV2RayConfig
5 | {
6 | public partial class TLSForm : Form
7 | {
8 | public TLSForm()
9 | {
10 | InitializeComponent();
11 | }
12 |
13 | private void TLSForm_Load(object sender, EventArgs e)
14 | {
15 | textBoxHostName.Text = Config.ServerName;
16 | textBoxCertFile.Text = Config.CertificateFile;
17 | textBoxKeyFile.Text = Config.KeyFile;
18 | MaximizeBox = false;
19 | }
20 |
21 | private void buttonOK_Click(object sender, EventArgs e)
22 | {
23 | Config.ServerName = textBoxHostName.Text;
24 | Config.CertificateFile = textBoxCertFile.Text;
25 | Config.KeyFile = textBoxKeyFile.Text;
26 | Close();
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/mV2RayConfig/Forms/TLSForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/mV2RayConfig/MyJson.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.IO;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace mV2RayConfig
10 | {
11 | public class MyJson
12 | {
13 | public static string FormatJsonString(string Str)
14 | {
15 | JsonSerializer serializer = new JsonSerializer();
16 | TextReader textRead = new StringReader(Str);
17 | JsonTextReader jsonRead = new JsonTextReader(textRead);
18 | object obj = serializer.Deserialize(jsonRead);
19 | if (obj != null)
20 | {
21 | StringWriter textWriter = new StringWriter();
22 | JsonTextWriter jsonWriter = new JsonTextWriter(textWriter)
23 | {
24 | Formatting = Formatting.Indented,
25 | Indentation = 4,
26 | IndentChar = ' '
27 | };
28 | serializer.Serialize(jsonWriter, obj);
29 | return textWriter.ToString();
30 | }
31 | else
32 | {
33 | return Str;
34 | }
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/mV2RayConfig/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace mV2RayConfig
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new MainForm());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/mV2RayConfig/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("mV2RayConfig")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("mV2RayConfig")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | //将 ComVisible 设置为 false 将使此程序集中的类型
18 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("e0ea1756-2746-48fa-a2fc-01fd365e86d5")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/mV2RayConfig/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本: 4.0.30319.42000
5 | //
6 | // 对此文件的更改可能导致不正确的行为,如果
7 | // 重新生成代码,则所做更改将丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace mV2RayConfig.Properties
12 | {
13 |
14 |
15 | ///
16 | /// 强类型资源类,用于查找本地化字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// 返回此类使用的缓存 ResourceManager 实例。
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("mV2RayConfig.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// 覆盖当前线程的 CurrentUICulture 属性
56 | /// 使用此强类型的资源类的资源查找。
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/mV2RayConfig/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/mV2RayConfig/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace mV2RayConfig.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/mV2RayConfig/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/mV2RayConfig/Resource.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace mV2RayConfig {
12 | using System;
13 |
14 |
15 | ///
16 | /// 一个强类型的资源类,用于查找本地化的字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | public class Resource {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resource() {
33 | }
34 |
35 | ///
36 | /// 返回此类使用的缓存的 ResourceManager 实例。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | public static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("mV2RayConfig.Resource", typeof(Resource).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 使用此强类型资源类,为所有资源查找
51 | /// 重写当前线程的 CurrentUICulture 属性。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | public static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// 查找类似 {"header":{"type":"http","response":{"version":"1.1","status":"200","reason":"OK","headers":{"Content-Type":["application/octet-stream","application/x-msdownload","text/html","application/x-shockwave-flash"],"Transfer-Encoding":["chunked"],"Connection":["keep-alive"],"Pragma":"no-cache"}}}} 的本地化字符串。
65 | ///
66 | public static string httpFake {
67 | get {
68 | return ResourceManager.GetString("httpFake", resourceCulture);
69 | }
70 | }
71 |
72 | ///
73 | /// 查找类似 {"mtu":1350,"tti":20,"uplinkCapacity":5,"downlinkCapacity":100,"congestion":false,"readBufferSize":1,"writeBufferSize":1,"header":{"type":"none"}} 的本地化字符串。
74 | ///
75 | public static string mKCP {
76 | get {
77 | return ResourceManager.GetString("mKCP", resourceCulture);
78 | }
79 | }
80 |
81 | ///
82 | /// 查找类似 [{"protocol":"blackhole","settings":{},"tag":"blocked"}] 的本地化字符串。
83 | ///
84 | public static string outboundDetour {
85 | get {
86 | return ResourceManager.GetString("outboundDetour", resourceCulture);
87 | }
88 | }
89 |
90 | ///
91 | /// 查找类似 {"strategy":"rules","settings":{"rules":[{"type":"field","ip":["0.0.0.0/8","10.0.0.0/8","100.64.0.0/10","127.0.0.0/8","169.254.0.0/16","172.16.0.0/12","192.0.0.0/24","192.0.2.0/24","192.168.0.0/16","198.18.0.0/15","198.51.100.0/24","203.0.113.0/24","::1/128","fc00::/7","fe80::/10"],"outboundTag":"blocked"}]}} 的本地化字符串。
92 | ///
93 | public static string routing {
94 | get {
95 | return ResourceManager.GetString("routing", resourceCulture);
96 | }
97 | }
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/mV2RayConfig/Resource.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | {"header":{"type":"http","response":{"version":"1.1","status":"200","reason":"OK","headers":{"Content-Type":["application/octet-stream","application/x-msdownload","text/html","application/x-shockwave-flash"],"Transfer-Encoding":["chunked"],"Connection":["keep-alive"],"Pragma":"no-cache"}}}}
122 |
123 |
124 | {"mtu":1350,"tti":20,"uplinkCapacity":5,"downlinkCapacity":100,"congestion":false,"readBufferSize":1,"writeBufferSize":1,"header":{"type":"none"}}
125 |
126 |
127 | [{"protocol":"blackhole","settings":{},"tag":"blocked"}]
128 |
129 |
130 | {"strategy":"rules","settings":{"rules":[{"type":"field","ip":["0.0.0.0/8","10.0.0.0/8","100.64.0.0/10","127.0.0.0/8","169.254.0.0/16","172.16.0.0/12","192.0.0.0/24","192.0.2.0/24","192.168.0.0/16","198.18.0.0/15","198.51.100.0/24","203.0.113.0/24","::1/128","fc00::/7","fe80::/10"],"outboundTag":"blocked"}]}}
131 |
132 |
--------------------------------------------------------------------------------
/mV2RayConfig/mV2RayConfig.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {E0EA1756-2746-48FA-A2FC-01FD365E86D5}
8 | WinExe
9 | Properties
10 | mV2RayConfig
11 | mV2RayConfig
12 | v4.5
13 | 512
14 |
15 |
16 | AnyCPU
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | AnyCPU
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 |
36 | ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
37 | True
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | Form
55 |
56 |
57 | EditForm.cs
58 |
59 |
60 | Form
61 |
62 |
63 | MainForm.cs
64 |
65 |
66 | Form
67 |
68 |
69 | ClientConfigForm.cs
70 |
71 |
72 |
73 |
74 |
75 | True
76 | True
77 | Resource.resx
78 |
79 |
80 | Form
81 |
82 |
83 | TLSForm.cs
84 |
85 |
86 | EditForm.cs
87 |
88 |
89 | MainForm.cs
90 |
91 |
92 | ClientConfigForm.cs
93 |
94 |
95 | ResXFileCodeGenerator
96 | Resources.Designer.cs
97 | Designer
98 |
99 |
100 | True
101 | Resources.resx
102 |
103 |
104 | PublicResXFileCodeGenerator
105 | Resource.Designer.cs
106 |
107 |
108 | TLSForm.cs
109 |
110 |
111 | Designer
112 |
113 |
114 | SettingsSingleFileGenerator
115 | Settings.Designer.cs
116 |
117 |
118 | True
119 | Settings.settings
120 | True
121 |
122 |
123 |
124 |
125 |
126 |
127 |
134 |
--------------------------------------------------------------------------------
/mV2RayConfig/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------