Compare commits
241 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f3f52c5e0 | ||
|
|
1dcb72e9dc | ||
|
|
153c8a0a74 | ||
|
|
4e8ea374d8 | ||
|
|
e313e004eb | ||
|
|
93b8dec63e | ||
|
|
5c9c35c199 | ||
|
|
4a6b8968d5 | ||
|
|
088d2e6834 | ||
|
|
4f39f7a932 | ||
|
|
2615b72cee | ||
|
|
a799420d0f | ||
|
|
70069a05e6 | ||
|
|
d385b44a48 | ||
|
|
56c1557f4a | ||
|
|
737d563ebb | ||
|
|
81b70195cf | ||
|
|
e60851153b | ||
|
|
009a15f0d9 | ||
|
|
f234775bd5 | ||
|
|
9b8bd0fa8a | ||
|
|
f74191946c | ||
|
|
ffa8b6296d | ||
|
|
0b2a392de2 | ||
|
|
f6b044c10c | ||
|
|
88c87aec0e | ||
|
|
b632dee0ce | ||
|
|
0db772aaeb | ||
|
|
fedfed4028 | ||
|
|
3b27e7be36 | ||
|
|
78402118ef | ||
|
|
aa3094f796 | ||
|
|
20498ce453 | ||
|
|
56559e6509 | ||
|
|
9549d17b03 | ||
|
|
a822fa9766 | ||
|
|
dee4b19775 | ||
|
|
f4b885dce5 | ||
|
|
2c02285def | ||
|
|
be7d76947b | ||
|
|
a81254dfff | ||
|
|
cb24a909ae | ||
|
|
8a87318b68 | ||
|
|
219f544a43 | ||
|
|
46c887537e | ||
|
|
8cf66da07c | ||
|
|
57bcf8a1a7 | ||
|
|
05efff10da | ||
|
|
414ac3225a | ||
|
|
0a8e822f35 | ||
|
|
301d1dd998 | ||
|
|
621565f4a4 | ||
|
|
6f51d447c7 | ||
|
|
f9c7556c54 | ||
|
|
32b98524ff | ||
|
|
efaec3ee17 | ||
|
|
28826cad1b | ||
|
|
ca9840abf4 | ||
|
|
8813d66274 | ||
|
|
da2b0f7dd4 | ||
|
|
b1773dab90 | ||
|
|
9538a67be1 | ||
|
|
fbfbc811d4 | ||
|
|
1c04b752cd | ||
|
|
3b1a2287d5 | ||
|
|
f3e6bd2736 | ||
|
|
4e449811e7 | ||
|
|
910be7f471 | ||
|
|
1e088f851b | ||
|
|
a0b0ad53d2 | ||
|
|
5b3f09aaf7 | ||
|
|
f48468029e | ||
|
|
c837ba5482 | ||
|
|
2708ff7c1a | ||
|
|
1722e50402 | ||
|
|
244da05e70 | ||
|
|
0c26662602 | ||
|
|
2f65575fdf | ||
|
|
b1814c246a | ||
|
|
fd4af7c90c | ||
|
|
d337d4bc7b | ||
|
|
da96e75ad5 | ||
|
|
04e50d521a | ||
|
|
93aad41181 | ||
|
|
ab025b39f4 | ||
|
|
7b2bd8876d | ||
|
|
033f83465f | ||
|
|
e5547307b3 | ||
|
|
82f77b41ba | ||
|
|
8e37712175 | ||
|
|
3b06b553eb | ||
|
|
5de50009d2 | ||
|
|
56a8521893 | ||
|
|
33d541f067 | ||
|
|
957ffa203d | ||
|
|
3af13d64f3 | ||
|
|
f1e51ae1a3 | ||
|
|
6d2a1e0e9c | ||
|
|
ac2d71d7b0 | ||
|
|
002a8c505c | ||
|
|
49355da702 | ||
|
|
3b38dc51ba | ||
|
|
3a27b56cc1 | ||
|
|
fbb9c3cd64 | ||
|
|
07bdcb5491 | ||
|
|
01ac3be89f | ||
|
|
5f90b5b4c4 | ||
|
|
a616ba50c2 | ||
|
|
3ebaabc1ef | ||
|
|
1510549663 | ||
|
|
db0a757a49 | ||
|
|
20ab51e339 | ||
|
|
948b9c26d9 | ||
|
|
300a4d8067 | ||
|
|
a65afd7524 | ||
|
|
d8458e84f4 | ||
|
|
a6664fbc01 | ||
|
|
111f77c59c | ||
|
|
48218a3dad | ||
|
|
ec3eb2215b | ||
|
|
a6fcf53b10 | ||
|
|
be9bbcc2c7 | ||
|
|
a4a0b29250 | ||
|
|
01b34dd45a | ||
|
|
2d2e4deb82 | ||
|
|
3daa8f479c | ||
|
|
d2ab186e44 | ||
|
|
5b2a6b12af | ||
|
|
5357f504d8 | ||
|
|
df427d80a1 | ||
|
|
b1f5d5ad75 | ||
|
|
af71eed96e | ||
|
|
6293ddacc6 | ||
|
|
1a807c056c | ||
|
|
3bd65b8d85 | ||
|
|
cf6d0598f8 | ||
|
|
a2758f0e0a | ||
|
|
300f5ef949 | ||
|
|
01fef4d357 | ||
|
|
62b521718e | ||
|
|
6da0b6a628 | ||
|
|
9f3b128044 | ||
|
|
a7e215dd5b | ||
|
|
443605d1dc | ||
|
|
1865621a6a | ||
|
|
d94fcbd8a3 | ||
|
|
794b88e5ab | ||
|
|
e60369c817 | ||
|
|
2add30cc77 | ||
|
|
ec3c471df6 | ||
|
|
2f6236353b | ||
|
|
973d4ddbb2 | ||
|
|
0334d52cfb | ||
|
|
88d1948b51 | ||
|
|
11d90dfb68 | ||
|
|
cdc96817e8 | ||
|
|
edea40012c | ||
|
|
67b99c4c8b | ||
|
|
56c3c22568 | ||
|
|
d8d8346d45 | ||
|
|
8b68ecb891 | ||
|
|
c183f1ed6e | ||
|
|
4a9d9ac2ac | ||
|
|
5dffb30b27 | ||
|
|
cf195c7694 | ||
|
|
1922f30f0f | ||
|
|
b6d1c4330f | ||
|
|
aee8994c41 | ||
|
|
593313a684 | ||
|
|
c71caec9df | ||
|
|
89bc92b98e | ||
|
|
17dec098cd | ||
|
|
4e38ec8f57 | ||
|
|
eda7b1789a | ||
|
|
db2510fac5 | ||
|
|
e354dad70b | ||
|
|
02607e116e | ||
|
|
932fd330ce | ||
|
|
c9c0dc9b5b | ||
|
|
2b3e29f3d1 | ||
|
|
b83b624dc3 | ||
|
|
1d3832f562 | ||
|
|
daa358a0ca | ||
|
|
ecf1be42ee | ||
|
|
3d6afe50e3 | ||
|
|
c1bb333555 | ||
|
|
5a386c2802 | ||
|
|
6dddaa03ae | ||
|
|
643a8094a6 | ||
|
|
a62f375f5b | ||
|
|
a498578c17 | ||
|
|
7cf6ab4b51 | ||
|
|
dda920e33e | ||
|
|
ae296fced8 | ||
|
|
cdf381ce41 | ||
|
|
195828cee1 | ||
|
|
cc3560ab29 | ||
|
|
c975896c5e | ||
|
|
627e4513f3 | ||
|
|
c4c05bfafd | ||
|
|
31fb479459 | ||
|
|
1b0e3b3575 | ||
|
|
6206c81546 | ||
|
|
e09210e6c3 | ||
|
|
4089cc5cf0 | ||
|
|
2c6b2f8065 | ||
|
|
112273036b | ||
|
|
df5b55b14f | ||
|
|
40bb7a5ea1 | ||
|
|
cf5b0cbd06 | ||
|
|
504a6c5d89 | ||
|
|
a33e586ff4 | ||
|
|
a1d579e1ec | ||
|
|
59a9fc9a3d | ||
|
|
194d9a0abc | ||
|
|
5566df791c | ||
|
|
1ca416bacf | ||
|
|
97d7229974 | ||
|
|
6a0bfc43dd | ||
|
|
732da0c330 | ||
|
|
012bb5654b | ||
|
|
068fe3113b | ||
|
|
4a74102eb7 | ||
|
|
b310cfeda2 | ||
|
|
07cd855446 | ||
|
|
ab08660c20 | ||
|
|
daf271ee0d | ||
|
|
f949c9f4f0 | ||
|
|
a609eb4bcf | ||
|
|
fd9b6d0ff0 | ||
|
|
cb074528f4 | ||
|
|
5cadf59e10 | ||
|
|
86229bf73b | ||
|
|
cf04c64fee | ||
|
|
f8517a316b | ||
|
|
8bcbd34c27 | ||
|
|
3e35882fee | ||
|
|
cf204fac39 | ||
|
|
dfc22258dd | ||
|
|
b7ac195bfc | ||
|
|
45c74cfe59 |
4
.github/issue_template.md
vendored
4
.github/issue_template.md
vendored
@@ -1,4 +1,4 @@
|
||||
在提出问题前请先自行排除服务器端问题,同时也请通过搜索确认是否有人提出过相同问题。
|
||||
在提出问题前请先自行排除服务器端问题和升级到最新客户端,同时也请通过搜索确认是否有人提出过相同问题。
|
||||
|
||||
### 预期行为
|
||||
描述你认为应该发生什么
|
||||
@@ -19,7 +19,7 @@
|
||||
```
|
||||
</details>
|
||||
|
||||
### 环境信息
|
||||
### 环境信息(客户端请升级至最新正式版)
|
||||
|
||||
### 额外信息(可选)
|
||||
|
||||
|
||||
9
.gitignore
vendored
9
.gitignore
vendored
@@ -5,11 +5,14 @@
|
||||
/v2rayN/.vs/
|
||||
/v2rayN/v2rayN/bin/Debug/app.publish
|
||||
/v2rayN/v2rayN/bin/Debug
|
||||
/v2rayN/v2rayN/obj/Debug
|
||||
/v2rayN/.vs/v2rayN/DesignTimeBuild
|
||||
/v2rayN/v2rayN/bin/Release
|
||||
/v2rayN/v2rayN/obj/Release
|
||||
/v2rayN/v2rayN/obj/
|
||||
/v2rayN/.vs/v2rayN/DesignTimeBuild
|
||||
/v2rayN/packages
|
||||
.vs/ProjectSettings.json
|
||||
.vs/slnx.sqlite
|
||||
.vs/VSWorkspaceState.json
|
||||
/v2rayN/v2rayUpgrade/bin/Debug
|
||||
/v2rayN/v2rayUpgrade/obj/Debug
|
||||
/v2rayN/v2rayUpgrade/bin/Release
|
||||
/v2rayN/v2rayUpgrade/obj/Release
|
||||
@@ -1,10 +1,10 @@
|
||||
# v2rayN
|
||||
|
||||
### How to use
|
||||
- Download exe from release download
|
||||
- Also need to download v2ray core in the same folder
|
||||
- If you are newbie please download v2rayN-Core.zip from releases
|
||||
- Otherwise please download v2rayN.zip (Also need to download v2ray core in the same folder)
|
||||
- Run v2rayN.exe
|
||||
|
||||
### Requirements
|
||||
- Microsoft [.NET Framework 4.6](https://docs.microsoft.com/zh-cn/dotnet/framework/install/guide-for-developers) or higher
|
||||
- Project V core [https://github.com/v2ray/v2ray-core/releases](https://github.com/v2ray/v2ray-core/releases)
|
||||
- Project V core [https://github.com/v2fly/v2ray-core/releases](https://github.com/v2fly/v2ray-core/releases)
|
||||
|
||||
@@ -5,6 +5,8 @@ VisualStudioVersion = 15.0.28010.2050
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "v2rayN", "v2rayN\v2rayN.csproj", "{0A9785E6-D256-4B73-9757-4EF59955FD1E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "v2rayUpgrade", "v2rayUpgrade\v2rayUpgrade.csproj", "{F82BE52A-155C-492C-9E0A-1E917EC62C78}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -20,11 +22,20 @@ Global
|
||||
{0A9785E6-D256-4B73-9757-4EF59955FD1E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0A9785E6-D256-4B73-9757-4EF59955FD1E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0A9785E6-D256-4B73-9757-4EF59955FD1E}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{F82BE52A-155C-492C-9E0A-1E917EC62C78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F82BE52A-155C-492C-9E0A-1E917EC62C78}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F82BE52A-155C-492C-9E0A-1E917EC62C78}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{F82BE52A-155C-492C-9E0A-1E917EC62C78}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{F82BE52A-155C-492C-9E0A-1E917EC62C78}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F82BE52A-155C-492C-9E0A-1E917EC62C78}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F82BE52A-155C-492C-9E0A-1E917EC62C78}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{F82BE52A-155C-492C-9E0A-1E917EC62C78}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
RESX_SortFileContentOnSave = True
|
||||
SolutionGuid = {56B88873-C9CC-4069-A1E5-DABD6C6E865E}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace v2rayN.Base
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem((c) =>
|
||||
{
|
||||
var ctx = c as HttpListenerContext;
|
||||
HttpListenerContext ctx = c as HttpListenerContext;
|
||||
try
|
||||
{
|
||||
string address = ctx.Request.LocalEndPoint.Address.ToString();
|
||||
|
||||
@@ -17,8 +17,10 @@ namespace v2rayN.Base
|
||||
this.port = port;
|
||||
this._responderMethod = method;
|
||||
|
||||
Thread thread = new Thread(StartListen);
|
||||
thread.IsBackground = true;
|
||||
Thread thread = new Thread(StartListen)
|
||||
{
|
||||
IsBackground = true
|
||||
};
|
||||
thread.Start();
|
||||
}
|
||||
|
||||
@@ -33,42 +35,51 @@ namespace v2rayN.Base
|
||||
|
||||
private void StartListen()
|
||||
{
|
||||
listener = new TcpListener(IPAddress.Any, port);
|
||||
listener.Start();
|
||||
Utils.SaveLog("WebserverB running...");
|
||||
|
||||
while (true)
|
||||
try
|
||||
{
|
||||
if (!listener.Pending())
|
||||
{
|
||||
Thread.Sleep(100);
|
||||
continue;
|
||||
}
|
||||
listener = new TcpListener(IPAddress.Any, port);
|
||||
listener.Start();
|
||||
Utils.SaveLog("WebserverB running...");
|
||||
|
||||
TcpClient socket = listener.AcceptTcpClient();
|
||||
Thread thread = new Thread(new ParameterizedThreadStart(ProcessThread));
|
||||
thread.IsBackground = true;
|
||||
thread.Start(socket);
|
||||
Thread.Sleep(1);
|
||||
while (true)
|
||||
{
|
||||
if (!listener.Pending())
|
||||
{
|
||||
Thread.Sleep(100);
|
||||
continue;
|
||||
}
|
||||
|
||||
TcpClient socket = listener.AcceptTcpClient();
|
||||
Thread thread = new Thread(new ParameterizedThreadStart(ProcessThread))
|
||||
{
|
||||
IsBackground = true
|
||||
};
|
||||
thread.Start(socket);
|
||||
Thread.Sleep(1);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
Utils.SaveLog("WebserverB start fail.");
|
||||
}
|
||||
}
|
||||
private void ProcessThread(object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
var socket = obj as TcpClient;
|
||||
TcpClient socket = obj as TcpClient;
|
||||
|
||||
var inputStream = new BufferedStream(socket.GetStream());
|
||||
var outputStream = new StreamWriter(new BufferedStream(socket.GetStream()));
|
||||
BufferedStream inputStream = new BufferedStream(socket.GetStream());
|
||||
StreamWriter outputStream = new StreamWriter(new BufferedStream(socket.GetStream()));
|
||||
if (inputStream.CanRead)
|
||||
{
|
||||
var data = ReadStream(inputStream);
|
||||
string data = ReadStream(inputStream);
|
||||
|
||||
if (data.Contains("/pac/"))
|
||||
{
|
||||
if (_responderMethod != null)
|
||||
{
|
||||
var address = ((IPEndPoint)socket.Client.LocalEndPoint).Address.ToString();
|
||||
string address = ((IPEndPoint)socket.Client.LocalEndPoint).Address.ToString();
|
||||
Utils.SaveLog("WebserverB Request " + address);
|
||||
string pac = _responderMethod(address);
|
||||
|
||||
@@ -118,7 +129,7 @@ namespace v2rayN.Base
|
||||
|
||||
private void WriteStream(StreamWriter outputStream, string pac)
|
||||
{
|
||||
var content_type = "application/x-ns-proxy-autoconfig";
|
||||
string content_type = "application/x-ns-proxy-autoconfig";
|
||||
outputStream.WriteLine("HTTP/1.1 200 OK");
|
||||
outputStream.WriteLine(String.Format("Content-Type:{0}", content_type));
|
||||
outputStream.WriteLine("Connection: close");
|
||||
|
||||
@@ -18,37 +18,31 @@ namespace v2rayN.Base
|
||||
{
|
||||
try
|
||||
{
|
||||
int count = this.Columns.Count;
|
||||
int MaxWidth = 0;
|
||||
this.SuspendLayout();
|
||||
Graphics graphics = this.CreateGraphics();
|
||||
Font font = this.Font;
|
||||
ListView.ListViewItemCollection items = this.Items;
|
||||
|
||||
string str;
|
||||
int width;
|
||||
|
||||
// 原生 ColumnHeaderAutoResizeStyle.ColumnContent 将忽略列头宽度
|
||||
this.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
for (int i = 0; i < this.Columns.Count; i++)
|
||||
{
|
||||
str = this.Columns[i].Text;
|
||||
MaxWidth = this.Columns[i].Width;
|
||||
ColumnHeader c = this.Columns[i];
|
||||
int cWidth = c.Width;
|
||||
string MaxStr = "";
|
||||
Font font = this.Items[0].SubItems[0].Font;
|
||||
|
||||
foreach (ListViewItem item in items)
|
||||
foreach (ListViewItem item in this.Items)
|
||||
{
|
||||
str = item.SubItems[i].Text;
|
||||
width = (int)graphics.MeasureString(str, font).Width;
|
||||
if (width > MaxWidth)
|
||||
{
|
||||
MaxWidth = width;
|
||||
}
|
||||
// 整行视作相同字形,不单独计算每个单元格
|
||||
font = item.SubItems[i].Font;
|
||||
string str = item.SubItems[i].Text;
|
||||
if (str.Length > MaxStr.Length) // 未考虑非等宽问题
|
||||
MaxStr = str;
|
||||
}
|
||||
if (i == 0)
|
||||
{
|
||||
this.Columns[i].Width = MaxWidth;
|
||||
}
|
||||
this.Columns[i].Width = MaxWidth;
|
||||
int strWidth = (int)graphics.MeasureString(MaxStr, font).Width;
|
||||
c.Width = System.Math.Max(cWidth, strWidth);
|
||||
}
|
||||
this.ResumeLayout();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace v2rayN.Base
|
||||
|
||||
public static bool IsWhiteSpace(this string value)
|
||||
{
|
||||
foreach (var c in value)
|
||||
foreach (char c in value)
|
||||
{
|
||||
if (char.IsWhiteSpace(c)) continue;
|
||||
|
||||
|
||||
@@ -17,17 +17,7 @@ namespace v2rayN.Base
|
||||
protected override WebRequest GetWebRequest(Uri address)
|
||||
{
|
||||
HttpWebRequest request;
|
||||
if (address.Scheme == "https")
|
||||
{
|
||||
ServicePointManager.ServerCertificateValidationCallback = (a, b, c, d) => { return true; };
|
||||
request = (HttpWebRequest)base.GetWebRequest(address);
|
||||
request.ProtocolVersion = HttpVersion.Version10;
|
||||
}
|
||||
else
|
||||
{
|
||||
request = (HttpWebRequest)base.GetWebRequest(address);
|
||||
}
|
||||
|
||||
request = (HttpWebRequest)base.GetWebRequest(address);
|
||||
request.Timeout = Timeout;
|
||||
request.ReadWriteTimeout = Timeout;
|
||||
//request.AllowAutoRedirect = false;
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace v2rayN.Forms
|
||||
}
|
||||
else
|
||||
{
|
||||
UI.Show(UIRes.I18N("OperationFailed"));
|
||||
UI.ShowWarning(UIRes.I18N("OperationFailed"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -117,274 +117,148 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name=">>txtAddress.Name" xml:space="preserve">
|
||||
<value>txtAddress</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Address</value>
|
||||
</data>
|
||||
<data name=">>txtAddress.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>label6.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Bottom</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="label13.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>btnOK.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>btnOK.Name" xml:space="preserve">
|
||||
<value>btnOK</value>
|
||||
</data>
|
||||
<data name=">>txtRemarks.Name" xml:space="preserve">
|
||||
<value>txtRemarks</value>
|
||||
</data>
|
||||
<data name=">>panel2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>AddServer2Form</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>txtRemarks.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtRemarks.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>btnClose.Parent" xml:space="preserve">
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 27</value>
|
||||
</data>
|
||||
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="txtAddress.Multiline" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>313, 21</value>
|
||||
</data>
|
||||
<data name=">>label13.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 12</value>
|
||||
</data>
|
||||
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>Alias (remarks)</value>
|
||||
</data>
|
||||
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 23</value>
|
||||
</data>
|
||||
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>113, 12</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="groupBox1.Text" xml:space="preserve">
|
||||
<value>Server</value>
|
||||
</data>
|
||||
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>23</value>
|
||||
</data>
|
||||
<data name=">>btnClose.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>611, 60</value>
|
||||
</data>
|
||||
<data name=">>txtAddress.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Edit custom configuration server</value>
|
||||
</data>
|
||||
<data name="txtAddress.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>432, 104</value>
|
||||
</data>
|
||||
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>611, 10</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Name" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name="label13.Text" xml:space="preserve">
|
||||
<value>* Fill in manually</value>
|
||||
</data>
|
||||
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="label6.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name=">>panel1.Name" xml:space="preserve">
|
||||
<value>panel1</value>
|
||||
</data>
|
||||
<data name="btnClose.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<data name=">>txtRemarks.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>btnClose.Name" xml:space="preserve">
|
||||
<value>btnClose</value>
|
||||
</data>
|
||||
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>303, 17</value>
|
||||
</data>
|
||||
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 211</value>
|
||||
</data>
|
||||
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<data name=">>label13.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Top</value>
|
||||
</data>
|
||||
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 10</value>
|
||||
</data>
|
||||
<data name=">>label6.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>611, 201</value>
|
||||
</data>
|
||||
<data name=">>panel1.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="btnClose.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 62</value>
|
||||
</data>
|
||||
<data name=">>txtAddress.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>83, 12</value>
|
||||
</data>
|
||||
<data name="btnClose.Text" xml:space="preserve">
|
||||
<value>&Cancel</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 62</value>
|
||||
</data>
|
||||
<data name="btnOK.Text" xml:space="preserve">
|
||||
<value>&OK</value>
|
||||
</data>
|
||||
<data name=">>btnClose.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>panel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="label13.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>446, 26</value>
|
||||
</data>
|
||||
<data name=">>label6.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>label6.Name" xml:space="preserve">
|
||||
<value>label6</value>
|
||||
</data>
|
||||
<data name=">>panel1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>btnOK.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name=">>btnOK.Parent" xml:space="preserve">
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>label13.Name" xml:space="preserve">
|
||||
<value>label13</value>
|
||||
</data>
|
||||
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>83, 12</value>
|
||||
</data>
|
||||
<data name="label13.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name=">>label13.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>panel2.Name" xml:space="preserve">
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>611, 271</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
<data name="$this.Localizable" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>panel2.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Edit custom configuration server</value>
|
||||
</data>
|
||||
<data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>396, 17</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="btnClose.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<data name=">>panel2.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<data name="btnClose.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<data name="btnClose.Text" xml:space="preserve">
|
||||
<value>&Cancel</value>
|
||||
</data>
|
||||
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>303, 17</value>
|
||||
</data>
|
||||
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="btnOK.Text" xml:space="preserve">
|
||||
<value>&OK</value>
|
||||
</data>
|
||||
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 10</value>
|
||||
</data>
|
||||
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>611, 201</value>
|
||||
</data>
|
||||
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="groupBox1.Text" xml:space="preserve">
|
||||
<value>Server</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 62</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>83, 12</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Address</value>
|
||||
</data>
|
||||
<data name="label13.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label13.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>446, 26</value>
|
||||
</data>
|
||||
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>113, 12</value>
|
||||
</data>
|
||||
<data name="label13.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name="label13.Text" xml:space="preserve">
|
||||
<value>* Fill in manually</value>
|
||||
</data>
|
||||
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 27</value>
|
||||
</data>
|
||||
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>83, 12</value>
|
||||
</data>
|
||||
<data name="label6.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>Alias (remarks)</value>
|
||||
</data>
|
||||
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Top</value>
|
||||
</data>
|
||||
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>611, 10</value>
|
||||
</data>
|
||||
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Bottom</value>
|
||||
</data>
|
||||
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 211</value>
|
||||
</data>
|
||||
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>611, 60</value>
|
||||
</data>
|
||||
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 62</value>
|
||||
</data>
|
||||
<data name="txtAddress.Multiline" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="txtAddress.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>432, 104</value>
|
||||
</data>
|
||||
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>23</value>
|
||||
</data>
|
||||
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 23</value>
|
||||
</data>
|
||||
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>313, 21</value>
|
||||
</data>
|
||||
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -117,25 +117,25 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>编辑自定义配置服务器</value>
|
||||
</data>
|
||||
<data name="btnClose.Text" xml:space="preserve">
|
||||
<value>取消(&C)</value>
|
||||
</data>
|
||||
<data name="btnOK.Text" xml:space="preserve">
|
||||
<value>确定(&O)</value>
|
||||
</data>
|
||||
<data name="groupBox1.Text" xml:space="preserve">
|
||||
<value>服务器</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>地址(address)</value>
|
||||
</data>
|
||||
<data name="label13.Text" xml:space="preserve">
|
||||
<value>*手填,方便识别管理</value>
|
||||
</data>
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>别名(remarks)</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>地址(address)</value>
|
||||
</data>
|
||||
<data name="groupBox1.Text" xml:space="preserve">
|
||||
<value>服务器</value>
|
||||
</data>
|
||||
<data name="btnOK.Text" xml:space="preserve">
|
||||
<value>确定(&O)</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>编辑自定义配置服务器</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -96,7 +96,7 @@ namespace v2rayN.Forms
|
||||
}
|
||||
else
|
||||
{
|
||||
UI.Show(UIRes.I18N("OperationFailed"));
|
||||
UI.ShowWarning(UIRes.I18N("OperationFailed"));
|
||||
}
|
||||
}
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
@@ -121,11 +121,10 @@ namespace v2rayN.Forms
|
||||
{
|
||||
ClearServer();
|
||||
|
||||
string msg;
|
||||
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out msg);
|
||||
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg);
|
||||
if (vmessItem == null)
|
||||
{
|
||||
UI.Show(msg);
|
||||
UI.ShowWarning(msg);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -118,57 +118,43 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 12</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 291</value>
|
||||
</data>
|
||||
<data name="$this.Localizable" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Edit or add a [Shadowsocks] server</value>
|
||||
</data>
|
||||
<data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>396, 17</value>
|
||||
</data>
|
||||
<data name="btnClose.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="btnClose.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="btnClose.Text" xml:space="preserve">
|
||||
<value>&Cancel</value>
|
||||
</data>
|
||||
<data name=">>btnClose.Name" xml:space="preserve">
|
||||
<value>btnClose</value>
|
||||
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>303, 17</value>
|
||||
</data>
|
||||
<data name=">>btnClose.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<data name=">>btnClose.Parent" xml:space="preserve">
|
||||
<value>panel2</value>
|
||||
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name=">>btnClose.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label13.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label13.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>337, 158</value>
|
||||
</data>
|
||||
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>113, 12</value>
|
||||
</data>
|
||||
<data name="label13.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name="label13.Text" xml:space="preserve">
|
||||
<value>* Fill in manually</value>
|
||||
</data>
|
||||
<data name=">>label13.Name" xml:space="preserve">
|
||||
<value>label13</value>
|
||||
</data>
|
||||
<data name=">>label13.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label13.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>label13.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
<data name="btnOK.Text" xml:space="preserve">
|
||||
<value>&OK</value>
|
||||
</data>
|
||||
<data name="cmbSecurity.Items" xml:space="preserve">
|
||||
<value>aes-256-cfb</value>
|
||||
@@ -203,212 +189,20 @@
|
||||
<data name="cmbSecurity.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name=">>cmbSecurity.Name" xml:space="preserve">
|
||||
<value>cmbSecurity</value>
|
||||
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name=">>cmbSecurity.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 35</value>
|
||||
</data>
|
||||
<data name=">>cmbSecurity.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 196</value>
|
||||
</data>
|
||||
<data name=">>cmbSecurity.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 154</value>
|
||||
</data>
|
||||
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>194, 21</value>
|
||||
</data>
|
||||
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name=">>txtRemarks.Name" xml:space="preserve">
|
||||
<value>txtRemarks</value>
|
||||
</data>
|
||||
<data name=">>txtRemarks.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtRemarks.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>txtRemarks.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 158</value>
|
||||
</data>
|
||||
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>95, 12</value>
|
||||
</data>
|
||||
<data name="label6.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>Alias (remarks)</value>
|
||||
</data>
|
||||
<data name=">>label6.Name" xml:space="preserve">
|
||||
<value>label6</value>
|
||||
</data>
|
||||
<data name=">>label6.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label6.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>label6.ZOrder" xml:space="preserve">
|
||||
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 124</value>
|
||||
</data>
|
||||
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>65, 12</value>
|
||||
</data>
|
||||
<data name="label5.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="label5.Text" xml:space="preserve">
|
||||
<value>Encryption</value>
|
||||
</data>
|
||||
<data name=">>label5.Name" xml:space="preserve">
|
||||
<value>label5</value>
|
||||
</data>
|
||||
<data name=">>label5.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label5.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>label5.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="txtId.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 85</value>
|
||||
</data>
|
||||
<data name="txtId.PasswordChar" type="System.Char, mscorlib" xml:space="preserve">
|
||||
<value>*</value>
|
||||
</data>
|
||||
<data name="txtId.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 21</value>
|
||||
</data>
|
||||
<data name="txtId.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name=">>txtId.Name" xml:space="preserve">
|
||||
<value>txtId</value>
|
||||
</data>
|
||||
<data name=">>txtId.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtId.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>txtId.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 89</value>
|
||||
</data>
|
||||
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 12</value>
|
||||
</data>
|
||||
<data name="label3.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>Password</value>
|
||||
</data>
|
||||
<data name=">>label3.Name" xml:space="preserve">
|
||||
<value>label3</value>
|
||||
</data>
|
||||
<data name=">>label3.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label3.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>label3.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="txtPort.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 56</value>
|
||||
</data>
|
||||
<data name="txtPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>194, 21</value>
|
||||
</data>
|
||||
<data name="txtPort.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name=">>txtPort.Name" xml:space="preserve">
|
||||
<value>txtPort</value>
|
||||
</data>
|
||||
<data name=">>txtPort.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtPort.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>txtPort.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 60</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>71, 12</value>
|
||||
</data>
|
||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>Server port</value>
|
||||
</data>
|
||||
<data name=">>label2.Name" xml:space="preserve">
|
||||
<value>label2</value>
|
||||
</data>
|
||||
<data name=">>label2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label2.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 27</value>
|
||||
</data>
|
||||
<data name="txtAddress.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>359, 21</value>
|
||||
</data>
|
||||
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>txtAddress.Name" xml:space="preserve">
|
||||
<value>txtAddress</value>
|
||||
</data>
|
||||
<data name=">>txtAddress.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtAddress.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>txtAddress.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
<data name="groupBox1.Text" xml:space="preserve">
|
||||
<value>Server</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -425,93 +219,104 @@
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Server address</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
<data name="label13.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="label13.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>337, 158</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>113, 12</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<data name="label13.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name="label13.Text" xml:space="preserve">
|
||||
<value>* Fill in manually</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 60</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>71, 12</value>
|
||||
</data>
|
||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>Server port</value>
|
||||
</data>
|
||||
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 89</value>
|
||||
</data>
|
||||
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 12</value>
|
||||
</data>
|
||||
<data name="label3.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>Password</value>
|
||||
</data>
|
||||
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 124</value>
|
||||
</data>
|
||||
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>65, 12</value>
|
||||
</data>
|
||||
<data name="label5.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="label5.Text" xml:space="preserve">
|
||||
<value>Encryption</value>
|
||||
</data>
|
||||
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 158</value>
|
||||
</data>
|
||||
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>95, 12</value>
|
||||
</data>
|
||||
<data name="label6.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>Alias (remarks)</value>
|
||||
</data>
|
||||
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 35</value>
|
||||
<data name="MenuItem1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>162, 21</value>
|
||||
</data>
|
||||
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 196</value>
|
||||
<data name="MenuItem1.Text" xml:space="preserve">
|
||||
<value>Import configuration file</value>
|
||||
</data>
|
||||
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
<data name="menuItemImportClipboard.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>235, 22</value>
|
||||
</data>
|
||||
<data name="groupBox1.Text" xml:space="preserve">
|
||||
<value>Server</value>
|
||||
<data name="menuItemImportClipboard.Text" xml:space="preserve">
|
||||
<value>Import URL from clipboard</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Name" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
<data name="menuServer.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="menuServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 25</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
<data name="menuServer.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>303, 17</value>
|
||||
</data>
|
||||
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="btnOK.Text" xml:space="preserve">
|
||||
<value>&OK</value>
|
||||
</data>
|
||||
<data name=">>btnOK.Name" xml:space="preserve">
|
||||
<value>btnOK</value>
|
||||
</data>
|
||||
<data name=">>btnOK.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>btnOK.Parent" xml:space="preserve">
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>btnOK.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Bottom</value>
|
||||
</data>
|
||||
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 231</value>
|
||||
</data>
|
||||
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 60</value>
|
||||
</data>
|
||||
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name=">>panel2.Name" xml:space="preserve">
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panel2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>panel2.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>panel2.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<data name="menuServer.TrayLocation" type="System.Drawing.Point, System.Drawing">
|
||||
<value>17, 17</value>
|
||||
</data>
|
||||
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Top</value>
|
||||
@@ -525,82 +330,55 @@
|
||||
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name=">>panel1.Name" xml:space="preserve">
|
||||
<value>panel1</value>
|
||||
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Bottom</value>
|
||||
</data>
|
||||
<data name=">>panel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 231</value>
|
||||
</data>
|
||||
<data name=">>panel1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 60</value>
|
||||
</data>
|
||||
<data name=">>panel1.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<metadata name="menuServer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="menuItemImportClipboard.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>235, 22</value>
|
||||
<data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 27</value>
|
||||
</data>
|
||||
<data name="menuItemImportClipboard.Text" xml:space="preserve">
|
||||
<value>Import URL from clipboard</value>
|
||||
<data name="txtAddress.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>359, 21</value>
|
||||
</data>
|
||||
<data name="MenuItem1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>162, 21</value>
|
||||
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="MenuItem1.Text" xml:space="preserve">
|
||||
<value>Import configuration file</value>
|
||||
<data name="txtId.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 85</value>
|
||||
</data>
|
||||
<data name="menuServer.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
<data name="txtId.PasswordChar" type="System.Char, mscorlib" xml:space="preserve">
|
||||
<value>*</value>
|
||||
</data>
|
||||
<data name="menuServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 25</value>
|
||||
<data name="txtId.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 21</value>
|
||||
</data>
|
||||
<data name="menuServer.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
<data name="txtId.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name=">>menuServer.Name" xml:space="preserve">
|
||||
<value>menuServer</value>
|
||||
<data name="txtPort.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 56</value>
|
||||
</data>
|
||||
<data name=">>menuServer.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="txtPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>194, 21</value>
|
||||
</data>
|
||||
<data name=">>menuServer.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>menuServer.ZOrder" xml:space="preserve">
|
||||
<data name="txtPort.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 12</value>
|
||||
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 154</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 291</value>
|
||||
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>194, 21</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Edit or add a [Shadowsocks] server</value>
|
||||
</data>
|
||||
<data name=">>MenuItem1.Name" xml:space="preserve">
|
||||
<value>MenuItem1</value>
|
||||
</data>
|
||||
<data name=">>MenuItem1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>menuItemImportClipboard.Name" xml:space="preserve">
|
||||
<value>menuItemImportClipboard</value>
|
||||
</data>
|
||||
<data name=">>menuItemImportClipboard.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>AddServer3Form</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -117,43 +117,40 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>编辑或添加[Shadowsocks]服务器</value>
|
||||
</data>
|
||||
<data name="btnClose.Text" xml:space="preserve">
|
||||
<value>取消(&C)</value>
|
||||
</data>
|
||||
<data name="label13.Text" xml:space="preserve">
|
||||
<value>*手填,方便识别管理</value>
|
||||
</data>
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>别名(remarks)</value>
|
||||
</data>
|
||||
<data name="label5.Text" xml:space="preserve">
|
||||
<value>加密方式</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>密码</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>服务器端口</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>服务器地址</value>
|
||||
</data>
|
||||
<data name="groupBox1.Text" xml:space="preserve">
|
||||
<value>服务器</value>
|
||||
</data>
|
||||
<data name="btnOK.Text" xml:space="preserve">
|
||||
<value>确定(&O)</value>
|
||||
</data>
|
||||
<data name="menuItemImportClipboard.Text" xml:space="preserve">
|
||||
<value>从剪贴板导入URL</value>
|
||||
<data name="groupBox1.Text" xml:space="preserve">
|
||||
<value>服务器</value>
|
||||
</data>
|
||||
<data name="menuItemScanScreen.Text" xml:space="preserve">
|
||||
<value>扫描屏幕上的二维码</value>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>服务器地址</value>
|
||||
</data>
|
||||
<data name="label13.Text" xml:space="preserve">
|
||||
<value>*手填,方便识别管理</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>服务器端口</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>密码</value>
|
||||
</data>
|
||||
<data name="label5.Text" xml:space="preserve">
|
||||
<value>加密方式</value>
|
||||
</data>
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>别名(remarks)</value>
|
||||
</data>
|
||||
<data name="MenuItem1.Text" xml:space="preserve">
|
||||
<value>导入配置文件</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>编辑或添加[Shadowsocks]服务器</value>
|
||||
<data name="menuItemImportClipboard.Text" xml:space="preserve">
|
||||
<value>从剪贴板导入URL</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -85,7 +85,7 @@ namespace v2rayN.Forms
|
||||
}
|
||||
else
|
||||
{
|
||||
UI.Show(UIRes.I18N("OperationFailed"));
|
||||
UI.ShowWarning(UIRes.I18N("OperationFailed"));
|
||||
}
|
||||
}
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
@@ -110,11 +110,10 @@ namespace v2rayN.Forms
|
||||
{
|
||||
ClearServer();
|
||||
|
||||
string msg;
|
||||
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out msg);
|
||||
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg);
|
||||
if (vmessItem == null)
|
||||
{
|
||||
UI.Show(msg);
|
||||
UI.ShowWarning(msg);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -118,107 +118,104 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 12</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 291</value>
|
||||
</data>
|
||||
<data name="$this.Localizable" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Edit or add a [Socks] server</value>
|
||||
</data>
|
||||
<data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>396, 17</value>
|
||||
</data>
|
||||
<data name="btnClose.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="btnClose.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="btnClose.Text" xml:space="preserve">
|
||||
<value>&Cancel</value>
|
||||
</data>
|
||||
<data name=">>btnClose.Name" xml:space="preserve">
|
||||
<value>btnClose</value>
|
||||
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>303, 17</value>
|
||||
</data>
|
||||
<data name=">>btnClose.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<data name=">>btnClose.Parent" xml:space="preserve">
|
||||
<value>panel2</value>
|
||||
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name=">>btnClose.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
<data name="btnOK.Text" xml:space="preserve">
|
||||
<value>&OK</value>
|
||||
</data>
|
||||
<data name="txtSecurity.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 84</value>
|
||||
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="txtSecurity.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 21</value>
|
||||
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 35</value>
|
||||
</data>
|
||||
<data name="txtSecurity.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>26</value>
|
||||
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 196</value>
|
||||
</data>
|
||||
<data name=">>txtSecurity.Name" xml:space="preserve">
|
||||
<value>txtSecurity</value>
|
||||
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name=">>txtSecurity.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="groupBox1.Text" xml:space="preserve">
|
||||
<value>Server</value>
|
||||
</data>
|
||||
<data name=">>txtSecurity.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>txtSecurity.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="label4.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 31</value>
|
||||
</data>
|
||||
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 88</value>
|
||||
</data>
|
||||
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>89, 12</value>
|
||||
</data>
|
||||
<data name="label4.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>25</value>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>User(Optional)</value>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Server address</value>
|
||||
</data>
|
||||
<data name=">>label4.Name" xml:space="preserve">
|
||||
<value>label4</value>
|
||||
<data name="label13.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>label4.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="label13.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>337, 158</value>
|
||||
</data>
|
||||
<data name=">>label4.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>113, 12</value>
|
||||
</data>
|
||||
<data name=">>label4.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<data name="label13.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name="txtId.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 117</value>
|
||||
<data name="label13.Text" xml:space="preserve">
|
||||
<value>* Fill in manually</value>
|
||||
</data>
|
||||
<data name="txtId.PasswordChar" type="System.Char, mscorlib" xml:space="preserve">
|
||||
<value>*</value>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="txtId.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 21</value>
|
||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 60</value>
|
||||
</data>
|
||||
<data name="txtId.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>24</value>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>71, 12</value>
|
||||
</data>
|
||||
<data name=">>txtId.Name" xml:space="preserve">
|
||||
<value>txtId</value>
|
||||
</data>
|
||||
<data name=">>txtId.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtId.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>txtId.ZOrder" xml:space="preserve">
|
||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>Server port</value>
|
||||
</data>
|
||||
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
@@ -237,65 +234,23 @@
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>Password(Optional)</value>
|
||||
</data>
|
||||
<data name=">>label3.Name" xml:space="preserve">
|
||||
<value>label3</value>
|
||||
</data>
|
||||
<data name=">>label3.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label3.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>label3.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="label13.AutoSize" type="System.Boolean, mscorlib">
|
||||
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label13.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>337, 158</value>
|
||||
<data name="label4.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>113, 12</value>
|
||||
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 88</value>
|
||||
</data>
|
||||
<data name="label13.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>22</value>
|
||||
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>89, 12</value>
|
||||
</data>
|
||||
<data name="label13.Text" xml:space="preserve">
|
||||
<value>* Fill in manually</value>
|
||||
<data name="label4.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>25</value>
|
||||
</data>
|
||||
<data name=">>label13.Name" xml:space="preserve">
|
||||
<value>label13</value>
|
||||
</data>
|
||||
<data name=">>label13.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label13.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>label13.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 154</value>
|
||||
</data>
|
||||
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>194, 21</value>
|
||||
</data>
|
||||
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name=">>txtRemarks.Name" xml:space="preserve">
|
||||
<value>txtRemarks</value>
|
||||
</data>
|
||||
<data name=">>txtRemarks.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtRemarks.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>txtRemarks.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>User(Optional)</value>
|
||||
</data>
|
||||
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -312,188 +267,29 @@
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>Alias (remarks)</value>
|
||||
</data>
|
||||
<data name=">>label6.Name" xml:space="preserve">
|
||||
<value>label6</value>
|
||||
<data name="MenuItem1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>162, 21</value>
|
||||
</data>
|
||||
<data name=">>label6.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="MenuItem1.Text" xml:space="preserve">
|
||||
<value>Import configuration file</value>
|
||||
</data>
|
||||
<data name=">>label6.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
<data name="menuItemImportClipboard.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>235, 22</value>
|
||||
</data>
|
||||
<data name=">>label6.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
<data name="menuItemImportClipboard.Text" xml:space="preserve">
|
||||
<value>Import URL from clipboard</value>
|
||||
</data>
|
||||
<data name="txtPort.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 56</value>
|
||||
<data name="menuServer.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="txtPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>194, 21</value>
|
||||
<data name="menuServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 25</value>
|
||||
</data>
|
||||
<data name="txtPort.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name=">>txtPort.Name" xml:space="preserve">
|
||||
<value>txtPort</value>
|
||||
</data>
|
||||
<data name=">>txtPort.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtPort.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>txtPort.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 60</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>71, 12</value>
|
||||
</data>
|
||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>Server port</value>
|
||||
</data>
|
||||
<data name=">>label2.Name" xml:space="preserve">
|
||||
<value>label2</value>
|
||||
</data>
|
||||
<data name=">>label2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label2.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<data name="menuServer.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 27</value>
|
||||
</data>
|
||||
<data name="txtAddress.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>359, 21</value>
|
||||
</data>
|
||||
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>txtAddress.Name" xml:space="preserve">
|
||||
<value>txtAddress</value>
|
||||
</data>
|
||||
<data name=">>txtAddress.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtAddress.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>txtAddress.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 31</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>89, 12</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Server address</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 35</value>
|
||||
</data>
|
||||
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 196</value>
|
||||
</data>
|
||||
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="groupBox1.Text" xml:space="preserve">
|
||||
<value>Server</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Name" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>303, 17</value>
|
||||
</data>
|
||||
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="btnOK.Text" xml:space="preserve">
|
||||
<value>&OK</value>
|
||||
</data>
|
||||
<data name=">>btnOK.Name" xml:space="preserve">
|
||||
<value>btnOK</value>
|
||||
</data>
|
||||
<data name=">>btnOK.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>btnOK.Parent" xml:space="preserve">
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>btnOK.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Bottom</value>
|
||||
</data>
|
||||
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 231</value>
|
||||
</data>
|
||||
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 60</value>
|
||||
</data>
|
||||
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name=">>panel2.Name" xml:space="preserve">
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panel2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>panel2.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>panel2.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<data name="menuServer.TrayLocation" type="System.Drawing.Point, System.Drawing">
|
||||
<value>17, 17</value>
|
||||
</data>
|
||||
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Top</value>
|
||||
@@ -507,82 +303,64 @@
|
||||
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name=">>panel1.Name" xml:space="preserve">
|
||||
<value>panel1</value>
|
||||
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Bottom</value>
|
||||
</data>
|
||||
<data name=">>panel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 231</value>
|
||||
</data>
|
||||
<data name=">>panel1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 60</value>
|
||||
</data>
|
||||
<data name=">>panel1.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<metadata name="menuServer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="menuItemImportClipboard.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>235, 22</value>
|
||||
<data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 27</value>
|
||||
</data>
|
||||
<data name="menuItemImportClipboard.Text" xml:space="preserve">
|
||||
<value>Import URL from clipboard</value>
|
||||
<data name="txtAddress.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>359, 21</value>
|
||||
</data>
|
||||
<data name="MenuItem1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>162, 21</value>
|
||||
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="MenuItem1.Text" xml:space="preserve">
|
||||
<value>Import configuration file</value>
|
||||
<data name="txtId.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 117</value>
|
||||
</data>
|
||||
<data name="menuServer.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
<data name="txtId.PasswordChar" type="System.Char, mscorlib" xml:space="preserve">
|
||||
<value>*</value>
|
||||
</data>
|
||||
<data name="menuServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 25</value>
|
||||
<data name="txtId.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 21</value>
|
||||
</data>
|
||||
<data name="menuServer.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
<data name="txtId.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>24</value>
|
||||
</data>
|
||||
<data name=">>menuServer.Name" xml:space="preserve">
|
||||
<value>menuServer</value>
|
||||
<data name="txtPort.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 56</value>
|
||||
</data>
|
||||
<data name=">>menuServer.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="txtPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>194, 21</value>
|
||||
</data>
|
||||
<data name=">>menuServer.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>menuServer.ZOrder" xml:space="preserve">
|
||||
<data name="txtPort.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 12</value>
|
||||
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 154</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 291</value>
|
||||
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>194, 21</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Edit or add a [Socks] server</value>
|
||||
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name=">>MenuItem1.Name" xml:space="preserve">
|
||||
<value>MenuItem1</value>
|
||||
<data name="txtSecurity.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 84</value>
|
||||
</data>
|
||||
<data name=">>MenuItem1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="txtSecurity.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 21</value>
|
||||
</data>
|
||||
<data name=">>menuItemImportClipboard.Name" xml:space="preserve">
|
||||
<value>menuItemImportClipboard</value>
|
||||
</data>
|
||||
<data name=">>menuItemImportClipboard.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>AddServer4Form</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<data name="txtSecurity.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>26</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -117,27 +117,33 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>编辑或添加[Socks]服务器</value>
|
||||
</data>
|
||||
<data name="btnClose.Text" xml:space="preserve">
|
||||
<value>取消(&C)</value>
|
||||
</data>
|
||||
<data name="btnOK.Text" xml:space="preserve">
|
||||
<value>确定(&O)</value>
|
||||
</data>
|
||||
<data name="groupBox1.Text" xml:space="preserve">
|
||||
<value>服务器</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="txtSecurity.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 85</value>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>65, 12</value>
|
||||
</data>
|
||||
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 89</value>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>服务器地址</value>
|
||||
</data>
|
||||
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>77, 12</value>
|
||||
<data name="label13.Text" xml:space="preserve">
|
||||
<value>*手填,方便识别管理</value>
|
||||
</data>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>用户名(可选)</value>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>65, 12</value>
|
||||
</data>
|
||||
<data name="txtId.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 115</value>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>服务器端口</value>
|
||||
</data>
|
||||
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 119</value>
|
||||
@@ -148,8 +154,14 @@
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>密码(可选)</value>
|
||||
</data>
|
||||
<data name="label13.Text" xml:space="preserve">
|
||||
<value>*手填,方便识别管理</value>
|
||||
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 89</value>
|
||||
</data>
|
||||
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>77, 12</value>
|
||||
</data>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>用户名(可选)</value>
|
||||
</data>
|
||||
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>83, 12</value>
|
||||
@@ -157,21 +169,6 @@
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>别名(remarks)</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>65, 12</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>服务器端口</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>65, 12</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>服务器地址</value>
|
||||
</data>
|
||||
<data name="btnOK.Text" xml:space="preserve">
|
||||
<value>确定(&O)</value>
|
||||
</data>
|
||||
<data name="MenuItem1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>92, 21</value>
|
||||
</data>
|
||||
@@ -184,7 +181,10 @@
|
||||
<data name="menuItemImportClipboard.Text" xml:space="preserve">
|
||||
<value>从剪贴板导入URL</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>编辑或添加[Socks]服务器</value>
|
||||
<data name="txtId.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 115</value>
|
||||
</data>
|
||||
<data name="txtSecurity.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 85</value>
|
||||
</data>
|
||||
</root>
|
||||
40
v2rayN/v2rayN/Forms/AddServerForm.Designer.cs
generated
40
v2rayN/v2rayN/Forms/AddServerForm.Designer.cs
generated
@@ -37,7 +37,6 @@
|
||||
this.label24 = new System.Windows.Forms.Label();
|
||||
this.label23 = new System.Windows.Forms.Label();
|
||||
this.panTlsMore = new System.Windows.Forms.Panel();
|
||||
this.label22 = new System.Windows.Forms.Label();
|
||||
this.label21 = new System.Windows.Forms.Label();
|
||||
this.cmbAllowInsecure = new System.Windows.Forms.ComboBox();
|
||||
this.label20 = new System.Windows.Forms.Label();
|
||||
@@ -88,14 +87,15 @@
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.btnClose, "btnClose");
|
||||
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.UseVisualStyleBackColor = true;
|
||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
resources.ApplyResources(this.groupBox1, "groupBox1");
|
||||
this.groupBox1.Controls.Add(this.btnGUID);
|
||||
this.groupBox1.Controls.Add(this.label13);
|
||||
this.groupBox1.Controls.Add(this.groupBox2);
|
||||
@@ -115,7 +115,6 @@
|
||||
this.groupBox1.Controls.Add(this.label2);
|
||||
this.groupBox1.Controls.Add(this.txtAddress);
|
||||
this.groupBox1.Controls.Add(this.label1);
|
||||
resources.ApplyResources(this.groupBox1, "groupBox1");
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.TabStop = false;
|
||||
//
|
||||
@@ -133,6 +132,7 @@
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
resources.ApplyResources(this.groupBox2, "groupBox2");
|
||||
this.groupBox2.Controls.Add(this.label24);
|
||||
this.groupBox2.Controls.Add(this.label23);
|
||||
this.groupBox2.Controls.Add(this.panTlsMore);
|
||||
@@ -150,7 +150,6 @@
|
||||
this.groupBox2.Controls.Add(this.label11);
|
||||
this.groupBox2.Controls.Add(this.label10);
|
||||
this.groupBox2.Controls.Add(this.cmbHeaderType);
|
||||
resources.ApplyResources(this.groupBox2, "groupBox2");
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.TabStop = false;
|
||||
//
|
||||
@@ -166,17 +165,11 @@
|
||||
//
|
||||
// panTlsMore
|
||||
//
|
||||
this.panTlsMore.Controls.Add(this.label22);
|
||||
resources.ApplyResources(this.panTlsMore, "panTlsMore");
|
||||
this.panTlsMore.Controls.Add(this.label21);
|
||||
this.panTlsMore.Controls.Add(this.cmbAllowInsecure);
|
||||
resources.ApplyResources(this.panTlsMore, "panTlsMore");
|
||||
this.panTlsMore.Name = "panTlsMore";
|
||||
//
|
||||
// label22
|
||||
//
|
||||
resources.ApplyResources(this.label22, "label22");
|
||||
this.label22.Name = "label22";
|
||||
//
|
||||
// label21
|
||||
//
|
||||
resources.ApplyResources(this.label21, "label21");
|
||||
@@ -184,13 +177,13 @@
|
||||
//
|
||||
// cmbAllowInsecure
|
||||
//
|
||||
resources.ApplyResources(this.cmbAllowInsecure, "cmbAllowInsecure");
|
||||
this.cmbAllowInsecure.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbAllowInsecure.FormattingEnabled = true;
|
||||
this.cmbAllowInsecure.Items.AddRange(new object[] {
|
||||
resources.GetString("cmbAllowInsecure.Items"),
|
||||
resources.GetString("cmbAllowInsecure.Items1"),
|
||||
resources.GetString("cmbAllowInsecure.Items2")});
|
||||
resources.ApplyResources(this.cmbAllowInsecure, "cmbAllowInsecure");
|
||||
this.cmbAllowInsecure.Name = "cmbAllowInsecure";
|
||||
//
|
||||
// label20
|
||||
@@ -235,12 +228,12 @@
|
||||
//
|
||||
// cmbStreamSecurity
|
||||
//
|
||||
resources.ApplyResources(this.cmbStreamSecurity, "cmbStreamSecurity");
|
||||
this.cmbStreamSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbStreamSecurity.FormattingEnabled = true;
|
||||
this.cmbStreamSecurity.Items.AddRange(new object[] {
|
||||
resources.GetString("cmbStreamSecurity.Items"),
|
||||
resources.GetString("cmbStreamSecurity.Items1")});
|
||||
resources.ApplyResources(this.cmbStreamSecurity, "cmbStreamSecurity");
|
||||
this.cmbStreamSecurity.Name = "cmbStreamSecurity";
|
||||
this.cmbStreamSecurity.SelectedIndexChanged += new System.EventHandler(this.cmbStreamSecurity_SelectedIndexChanged);
|
||||
//
|
||||
@@ -266,6 +259,7 @@
|
||||
//
|
||||
// cmbHeaderType
|
||||
//
|
||||
resources.ApplyResources(this.cmbHeaderType, "cmbHeaderType");
|
||||
this.cmbHeaderType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbHeaderType.FormattingEnabled = true;
|
||||
this.cmbHeaderType.Items.AddRange(new object[] {
|
||||
@@ -276,7 +270,6 @@
|
||||
resources.GetString("cmbHeaderType.Items4"),
|
||||
resources.GetString("cmbHeaderType.Items5"),
|
||||
resources.GetString("cmbHeaderType.Items6")});
|
||||
resources.ApplyResources(this.cmbHeaderType, "cmbHeaderType");
|
||||
this.cmbHeaderType.Name = "cmbHeaderType";
|
||||
//
|
||||
// label9
|
||||
@@ -291,6 +284,7 @@
|
||||
//
|
||||
// cmbNetwork
|
||||
//
|
||||
resources.ApplyResources(this.cmbNetwork, "cmbNetwork");
|
||||
this.cmbNetwork.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbNetwork.FormattingEnabled = true;
|
||||
this.cmbNetwork.Items.AddRange(new object[] {
|
||||
@@ -299,7 +293,6 @@
|
||||
resources.GetString("cmbNetwork.Items2"),
|
||||
resources.GetString("cmbNetwork.Items3"),
|
||||
resources.GetString("cmbNetwork.Items4")});
|
||||
resources.ApplyResources(this.cmbNetwork, "cmbNetwork");
|
||||
this.cmbNetwork.Name = "cmbNetwork";
|
||||
this.cmbNetwork.SelectedIndexChanged += new System.EventHandler(this.cmbNetwork_SelectedIndexChanged);
|
||||
//
|
||||
@@ -310,6 +303,7 @@
|
||||
//
|
||||
// cmbSecurity
|
||||
//
|
||||
resources.ApplyResources(this.cmbSecurity, "cmbSecurity");
|
||||
this.cmbSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbSecurity.FormattingEnabled = true;
|
||||
this.cmbSecurity.Items.AddRange(new object[] {
|
||||
@@ -317,7 +311,6 @@
|
||||
resources.GetString("cmbSecurity.Items1"),
|
||||
resources.GetString("cmbSecurity.Items2"),
|
||||
resources.GetString("cmbSecurity.Items3")});
|
||||
resources.ApplyResources(this.cmbSecurity, "cmbSecurity");
|
||||
this.cmbSecurity.Name = "cmbSecurity";
|
||||
//
|
||||
// txtRemarks
|
||||
@@ -377,9 +370,9 @@
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
resources.ApplyResources(this.panel2, "panel2");
|
||||
this.panel2.Controls.Add(this.btnClose);
|
||||
this.panel2.Controls.Add(this.btnOK);
|
||||
resources.ApplyResources(this.panel2, "panel2");
|
||||
this.panel2.Name = "panel2";
|
||||
//
|
||||
// btnOK
|
||||
@@ -396,42 +389,42 @@
|
||||
//
|
||||
// menuServer
|
||||
//
|
||||
resources.ApplyResources(this.menuServer, "menuServer");
|
||||
this.menuServer.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.MenuItem1});
|
||||
resources.ApplyResources(this.menuServer, "menuServer");
|
||||
this.menuServer.Name = "menuServer";
|
||||
//
|
||||
// MenuItem1
|
||||
//
|
||||
resources.ApplyResources(this.MenuItem1, "MenuItem1");
|
||||
this.MenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.MenuItemImportClient,
|
||||
this.MenuItemImportServer,
|
||||
this.toolStripSeparator1,
|
||||
this.MenuItemImportClipboard});
|
||||
this.MenuItem1.Name = "MenuItem1";
|
||||
resources.ApplyResources(this.MenuItem1, "MenuItem1");
|
||||
//
|
||||
// MenuItemImportClient
|
||||
//
|
||||
this.MenuItemImportClient.Name = "MenuItemImportClient";
|
||||
resources.ApplyResources(this.MenuItemImportClient, "MenuItemImportClient");
|
||||
this.MenuItemImportClient.Name = "MenuItemImportClient";
|
||||
this.MenuItemImportClient.Click += new System.EventHandler(this.MenuItemImportClient_Click);
|
||||
//
|
||||
// MenuItemImportServer
|
||||
//
|
||||
this.MenuItemImportServer.Name = "MenuItemImportServer";
|
||||
resources.ApplyResources(this.MenuItemImportServer, "MenuItemImportServer");
|
||||
this.MenuItemImportServer.Name = "MenuItemImportServer";
|
||||
this.MenuItemImportServer.Click += new System.EventHandler(this.MenuItemImportServer_Click);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
//
|
||||
// MenuItemImportClipboard
|
||||
//
|
||||
this.MenuItemImportClipboard.Name = "MenuItemImportClipboard";
|
||||
resources.ApplyResources(this.MenuItemImportClipboard, "MenuItemImportClipboard");
|
||||
this.MenuItemImportClipboard.Name = "MenuItemImportClipboard";
|
||||
this.MenuItemImportClipboard.Click += new System.EventHandler(this.MenuItemImportClipboard_Click);
|
||||
//
|
||||
// AddServerForm
|
||||
@@ -508,7 +501,6 @@
|
||||
private System.Windows.Forms.Label label20;
|
||||
private System.Windows.Forms.Label label21;
|
||||
private System.Windows.Forms.ComboBox cmbAllowInsecure;
|
||||
private System.Windows.Forms.Label label22;
|
||||
private System.Windows.Forms.Panel panTlsMore;
|
||||
private System.Windows.Forms.Label label24;
|
||||
private System.Windows.Forms.Label label23;
|
||||
|
||||
@@ -166,7 +166,7 @@ namespace v2rayN.Forms
|
||||
}
|
||||
else
|
||||
{
|
||||
UI.Show(UIRes.I18N("OperationFailed"));
|
||||
UI.ShowWarning(UIRes.I18N("OperationFailed"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,9 +207,11 @@ namespace v2rayN.Forms
|
||||
{
|
||||
ClearServer();
|
||||
|
||||
OpenFileDialog fileDialog = new OpenFileDialog();
|
||||
fileDialog.Multiselect = false;
|
||||
fileDialog.Filter = "Config|*.json|All|*.*";
|
||||
OpenFileDialog fileDialog = new OpenFileDialog
|
||||
{
|
||||
Multiselect = false,
|
||||
Filter = "Config|*.json|All|*.*"
|
||||
};
|
||||
if (fileDialog.ShowDialog() != DialogResult.OK)
|
||||
{
|
||||
return;
|
||||
@@ -231,7 +233,7 @@ namespace v2rayN.Forms
|
||||
}
|
||||
if (vmessItem == null)
|
||||
{
|
||||
UI.Show(msg);
|
||||
UI.ShowWarning(msg);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -256,11 +258,10 @@ namespace v2rayN.Forms
|
||||
{
|
||||
ClearServer();
|
||||
|
||||
string msg;
|
||||
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out msg);
|
||||
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg);
|
||||
if (vmessItem == null)
|
||||
{
|
||||
UI.Show(msg);
|
||||
UI.ShowWarning(msg);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -145,11 +145,14 @@
|
||||
<data name="label23.Text" xml:space="preserve">
|
||||
<value>4)QUIC 加密方式</value>
|
||||
</data>
|
||||
<data name="label22.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 12</value>
|
||||
<data name="label21.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>203, 12</value>
|
||||
</data>
|
||||
<data name="label22.Text" xml:space="preserve">
|
||||
<value>默认true</value>
|
||||
<data name="label21.Text" xml:space="preserve">
|
||||
<value>跳过证书验证(allowInsecure)</value>
|
||||
</data>
|
||||
<data name="cmbAllowInsecure.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>223, 7</value>
|
||||
</data>
|
||||
<data name="label20.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>149, 12</value>
|
||||
|
||||
113
v2rayN/v2rayN/Forms/MainForm.Designer.cs
generated
113
v2rayN/v2rayN/Forms/MainForm.Designer.cs
generated
@@ -30,7 +30,7 @@
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.scMain = new System.Windows.Forms.SplitContainer();
|
||||
this.lvServers = new v2rayN.Base.ListViewFlickerFree();
|
||||
this.cmsLv = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.menuAddVmessServer = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -55,6 +55,7 @@
|
||||
this.menuTcpingServer = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuRealPingServer = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuSpeedServer = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tsbTestMe = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.menuExport2ClientConfig = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuExport2ServerConfig = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -70,10 +71,13 @@
|
||||
this.menuGlobalPAC = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuKeep = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuKeepPAC = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuKeepNothing = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuKeepPACNothing = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuServers = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuAddServers2 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuScanScreen2 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuCopyPACUrl = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuUpdateSubscriptions = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.menuExit = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.bgwScan = new System.ComponentModel.BackgroundWorker();
|
||||
@@ -98,6 +102,7 @@
|
||||
this.tsbSub = new System.Windows.Forms.ToolStripDropDownButton();
|
||||
this.tsbSubSetting = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tsbSubUpdate = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tsbQRCodeSwitch = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.tsbOptionSetting = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
||||
@@ -107,20 +112,22 @@
|
||||
this.tsbCheckUpdateN = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tsbCheckUpdateCore = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tsbCheckUpdatePACList = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.tsbCheckClearPACList = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.tsbHelp = new System.Windows.Forms.ToolStripDropDownButton();
|
||||
this.tsbAbout = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tsbV2rayWebsite = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.tsbLanguageDef = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tsbLanguageZhHans = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tsbPromotion = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.tsbClose = new System.Windows.Forms.ToolStripButton();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.scMain)).BeginInit();
|
||||
this.scMain.Panel1.SuspendLayout();
|
||||
this.scMain.Panel2.SuspendLayout();
|
||||
this.scMain.SuspendLayout();
|
||||
this.cmsLv.SuspendLayout();
|
||||
this.cmsMain.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
@@ -129,20 +136,20 @@
|
||||
this.tsMain.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
// scMain
|
||||
//
|
||||
resources.ApplyResources(this.splitContainer1, "splitContainer1");
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
resources.ApplyResources(this.scMain, "scMain");
|
||||
this.scMain.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.scMain.Name = "scMain";
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
// scMain.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.lvServers);
|
||||
this.scMain.Panel1.Controls.Add(this.lvServers);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
// scMain.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.qrCodeControl);
|
||||
this.splitContainer1.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.splitContainer1_SplitterMoved);
|
||||
this.scMain.Panel2.Controls.Add(this.qrCodeControl);
|
||||
this.scMain.TabStop = false;
|
||||
//
|
||||
// lvServers
|
||||
//
|
||||
@@ -158,6 +165,7 @@
|
||||
this.lvServers.Name = "lvServers";
|
||||
this.lvServers.UseCompatibleStateImageBehavior = false;
|
||||
this.lvServers.View = System.Windows.Forms.View.Details;
|
||||
this.lvServers.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.lvServers_ColumnClick);
|
||||
this.lvServers.SelectedIndexChanged += new System.EventHandler(this.lvServers_SelectedIndexChanged);
|
||||
this.lvServers.Click += new System.EventHandler(this.lvServers_Click);
|
||||
this.lvServers.DoubleClick += new System.EventHandler(this.lvServers_DoubleClick);
|
||||
@@ -189,6 +197,7 @@
|
||||
this.menuTcpingServer,
|
||||
this.menuRealPingServer,
|
||||
this.menuSpeedServer,
|
||||
this.tsbTestMe,
|
||||
this.toolStripSeparator6,
|
||||
this.menuExport2ClientConfig,
|
||||
this.menuExport2ServerConfig,
|
||||
@@ -327,6 +336,12 @@
|
||||
resources.ApplyResources(this.menuSpeedServer, "menuSpeedServer");
|
||||
this.menuSpeedServer.Click += new System.EventHandler(this.menuSpeedServer_Click);
|
||||
//
|
||||
// tsbTestMe
|
||||
//
|
||||
this.tsbTestMe.Name = "tsbTestMe";
|
||||
resources.ApplyResources(this.tsbTestMe, "tsbTestMe");
|
||||
this.tsbTestMe.Click += new System.EventHandler(this.tsbTestMe_Click);
|
||||
//
|
||||
// toolStripSeparator6
|
||||
//
|
||||
this.toolStripSeparator6.Name = "toolStripSeparator6";
|
||||
@@ -384,6 +399,7 @@
|
||||
this.menuAddServers2,
|
||||
this.menuScanScreen2,
|
||||
this.menuCopyPACUrl,
|
||||
this.menuUpdateSubscriptions,
|
||||
this.toolStripSeparator2,
|
||||
this.menuExit});
|
||||
this.cmsMain.Name = "contextMenuStrip1";
|
||||
@@ -398,7 +414,9 @@
|
||||
this.menuGlobal,
|
||||
this.menuGlobalPAC,
|
||||
this.menuKeep,
|
||||
this.menuKeepPAC});
|
||||
this.menuKeepPAC,
|
||||
this.menuKeepNothing,
|
||||
this.menuKeepPACNothing});
|
||||
this.menuSysAgentMode.Name = "menuSysAgentMode";
|
||||
resources.ApplyResources(this.menuSysAgentMode, "menuSysAgentMode");
|
||||
//
|
||||
@@ -432,6 +450,18 @@
|
||||
resources.ApplyResources(this.menuKeepPAC, "menuKeepPAC");
|
||||
this.menuKeepPAC.Click += new System.EventHandler(this.menuKeepPAC_Click);
|
||||
//
|
||||
// menuKeepNothing
|
||||
//
|
||||
this.menuKeepNothing.Name = "menuKeepNothing";
|
||||
resources.ApplyResources(this.menuKeepNothing, "menuKeepNothing");
|
||||
this.menuKeepNothing.Click += new System.EventHandler(this.menuKeepNothing_Click);
|
||||
//
|
||||
// menuKeepPACNothing
|
||||
//
|
||||
this.menuKeepPACNothing.Name = "menuKeepPACNothing";
|
||||
resources.ApplyResources(this.menuKeepPACNothing, "menuKeepPACNothing");
|
||||
this.menuKeepPACNothing.Click += new System.EventHandler(this.menuKeepPACNothing_Click);
|
||||
//
|
||||
// menuServers
|
||||
//
|
||||
this.menuServers.Name = "menuServers";
|
||||
@@ -455,6 +485,12 @@
|
||||
resources.ApplyResources(this.menuCopyPACUrl, "menuCopyPACUrl");
|
||||
this.menuCopyPACUrl.Click += new System.EventHandler(this.menuCopyPACUrl_Click);
|
||||
//
|
||||
// menuUpdateSubscriptions
|
||||
//
|
||||
this.menuUpdateSubscriptions.Name = "menuUpdateSubscriptions";
|
||||
resources.ApplyResources(this.menuUpdateSubscriptions, "menuUpdateSubscriptions");
|
||||
this.menuUpdateSubscriptions.Click += new System.EventHandler(this.menuUpdateSubscriptions_Click);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
@@ -474,7 +510,7 @@
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.splitContainer1);
|
||||
this.groupBox1.Controls.Add(this.scMain);
|
||||
resources.ApplyResources(this.groupBox1, "groupBox1");
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.TabStop = false;
|
||||
@@ -585,6 +621,7 @@
|
||||
this.tsbServer,
|
||||
this.toolStripSeparator4,
|
||||
this.tsbSub,
|
||||
this.tsbQRCodeSwitch,
|
||||
this.toolStripSeparator8,
|
||||
this.tsbOptionSetting,
|
||||
this.toolStripSeparator5,
|
||||
@@ -598,6 +635,7 @@
|
||||
this.tsbClose});
|
||||
resources.ApplyResources(this.tsMain, "tsMain");
|
||||
this.tsMain.Name = "tsMain";
|
||||
this.tsMain.TabStop = true;
|
||||
//
|
||||
// toolStripSeparator4
|
||||
//
|
||||
@@ -625,6 +663,15 @@
|
||||
resources.ApplyResources(this.tsbSubUpdate, "tsbSubUpdate");
|
||||
this.tsbSubUpdate.Click += new System.EventHandler(this.tsbSubUpdate_Click);
|
||||
//
|
||||
// tsbQRCodeSwitch
|
||||
//
|
||||
this.tsbQRCodeSwitch.CheckOnClick = true;
|
||||
this.tsbQRCodeSwitch.ForeColor = System.Drawing.Color.Black;
|
||||
this.tsbQRCodeSwitch.Image = global::v2rayN.Properties.Resources.share;
|
||||
resources.ApplyResources(this.tsbQRCodeSwitch, "tsbQRCodeSwitch");
|
||||
this.tsbQRCodeSwitch.Name = "tsbQRCodeSwitch";
|
||||
this.tsbQRCodeSwitch.CheckedChanged += new System.EventHandler(this.tsbQRCodeSwitch_CheckedChanged);
|
||||
//
|
||||
// toolStripSeparator8
|
||||
//
|
||||
this.toolStripSeparator8.Name = "toolStripSeparator8";
|
||||
@@ -659,6 +706,7 @@
|
||||
this.tsbCheckUpdateN,
|
||||
this.tsbCheckUpdateCore,
|
||||
this.tsbCheckUpdatePACList,
|
||||
this.toolStripSeparator13,
|
||||
this.tsbCheckClearPACList});
|
||||
this.tsbCheckUpdate.Image = global::v2rayN.Properties.Resources.checkupdate;
|
||||
resources.ApplyResources(this.tsbCheckUpdate, "tsbCheckUpdate");
|
||||
@@ -682,6 +730,11 @@
|
||||
resources.ApplyResources(this.tsbCheckUpdatePACList, "tsbCheckUpdatePACList");
|
||||
this.tsbCheckUpdatePACList.Click += new System.EventHandler(this.tsbCheckUpdatePACList_Click);
|
||||
//
|
||||
// toolStripSeparator13
|
||||
//
|
||||
this.toolStripSeparator13.Name = "toolStripSeparator13";
|
||||
resources.ApplyResources(this.toolStripSeparator13, "toolStripSeparator13");
|
||||
//
|
||||
// tsbCheckClearPACList
|
||||
//
|
||||
this.tsbCheckClearPACList.Name = "tsbCheckClearPACList";
|
||||
@@ -697,6 +750,7 @@
|
||||
//
|
||||
this.tsbHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.tsbAbout,
|
||||
this.tsbV2rayWebsite,
|
||||
this.toolStripSeparator12,
|
||||
this.tsbLanguageDef,
|
||||
this.tsbLanguageZhHans});
|
||||
@@ -710,6 +764,12 @@
|
||||
resources.ApplyResources(this.tsbAbout, "tsbAbout");
|
||||
this.tsbAbout.Click += new System.EventHandler(this.tsbAbout_Click);
|
||||
//
|
||||
// tsbV2rayWebsite
|
||||
//
|
||||
this.tsbV2rayWebsite.Name = "tsbV2rayWebsite";
|
||||
resources.ApplyResources(this.tsbV2rayWebsite, "tsbV2rayWebsite");
|
||||
this.tsbV2rayWebsite.Click += new System.EventHandler(this.tsbV2rayWebsite_Click);
|
||||
//
|
||||
// toolStripSeparator12
|
||||
//
|
||||
this.toolStripSeparator12.Name = "toolStripSeparator12";
|
||||
@@ -762,10 +822,10 @@
|
||||
this.Shown += new System.EventHandler(this.MainForm_Shown);
|
||||
this.VisibleChanged += new System.EventHandler(this.MainForm_VisibleChanged);
|
||||
this.Resize += new System.EventHandler(this.MainForm_Resize);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.scMain.Panel1.ResumeLayout(false);
|
||||
this.scMain.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.scMain)).EndInit();
|
||||
this.scMain.ResumeLayout(false);
|
||||
this.cmsLv.ResumeLayout(false);
|
||||
this.cmsMain.ResumeLayout(false);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
@@ -780,7 +840,7 @@
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
@@ -804,7 +864,6 @@
|
||||
private System.Windows.Forms.ToolStrip tsMain;
|
||||
private System.Windows.Forms.ToolStripDropDownButton tsbServer;
|
||||
private System.Windows.Forms.ToolStripButton tsbOptionSetting;
|
||||
private System.Windows.Forms.ToolStripButton tsbReload;
|
||||
private System.Windows.Forms.ToolStripButton tsbClose;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
|
||||
@@ -823,7 +882,7 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem menuAddCustomServer;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripMenuItem menuAddShadowsocksServer;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.SplitContainer scMain;
|
||||
private QRCodeControl qrCodeControl;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator10;
|
||||
private System.Windows.Forms.ToolStripDropDownButton tsbCheckUpdate;
|
||||
@@ -869,6 +928,14 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem menuTcpingServer;
|
||||
private System.Windows.Forms.ToolStripMenuItem menuRealPingServer;
|
||||
private System.Windows.Forms.ToolStripMenuItem menuNotEnabledHttp;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator13;
|
||||
private System.Windows.Forms.ToolStripMenuItem menuUpdateSubscriptions;
|
||||
private System.Windows.Forms.ToolStripMenuItem tsbV2rayWebsite;
|
||||
private System.Windows.Forms.ToolStripMenuItem menuKeepNothing;
|
||||
private System.Windows.Forms.ToolStripMenuItem menuKeepPACNothing;
|
||||
private System.Windows.Forms.ToolStripMenuItem tsbTestMe;
|
||||
private System.Windows.Forms.ToolStripButton tsbReload;
|
||||
private System.Windows.Forms.ToolStripButton tsbQRCodeSwitch;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -118,165 +118,171 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="splitContainer1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<data name="scMain.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="splitContainer1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<data name="scMain.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 17</value>
|
||||
</data>
|
||||
<metadata name="cmsLv.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>327, 17</value>
|
||||
</metadata>
|
||||
<data name="menuAddVmessServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuAddVmessServer.Text" xml:space="preserve">
|
||||
<value>Add [VMess] server</value>
|
||||
</data>
|
||||
<data name="menuAddShadowsocksServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuAddShadowsocksServer.Text" xml:space="preserve">
|
||||
<value>Add [Shadowsocks] server</value>
|
||||
</data>
|
||||
<data name="menuAddSocksServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuAddSocksServer.Text" xml:space="preserve">
|
||||
<value>Add [Socks] server</value>
|
||||
</data>
|
||||
<data name="menuAddCustomServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuAddCustomServer.Text" xml:space="preserve">
|
||||
<value>Add a custom configuration server</value>
|
||||
</data>
|
||||
<data name="menuAddServers.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuAddServers.Text" xml:space="preserve">
|
||||
<value>Import bulk URL from clipboard</value>
|
||||
<value>Import bulk URL from clipboard (Ctrl+V)</value>
|
||||
</data>
|
||||
<data name="menuScanScreen.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuScanScreen.Text" xml:space="preserve">
|
||||
<value>Scan QR code on the screen</value>
|
||||
<value>Scan QR code on the screen (Ctrl+S)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>444, 6</value>
|
||||
<value>352, 6</value>
|
||||
</data>
|
||||
<data name="menuRemoveServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuRemoveServer.Text" xml:space="preserve">
|
||||
<value>Remove selected server (multiple choice) (Delete)</value>
|
||||
<value>Remove selected servers (Delete)</value>
|
||||
</data>
|
||||
<data name="menuRemoveDuplicateServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuRemoveDuplicateServer.Text" xml:space="preserve">
|
||||
<value>Remove duplicate server</value>
|
||||
<value>Remove duplicate servers</value>
|
||||
</data>
|
||||
<data name="menuCopyServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuCopyServer.Text" xml:space="preserve">
|
||||
<value>Copy selected server</value>
|
||||
<value>Clone selected server</value>
|
||||
</data>
|
||||
<data name="menuSetDefaultServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuSetDefaultServer.Text" xml:space="preserve">
|
||||
<value>Set as active server (Enter)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>444, 6</value>
|
||||
<value>352, 6</value>
|
||||
</data>
|
||||
<data name="menuMoveTop.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuMoveTop.Text" xml:space="preserve">
|
||||
<value>Up to top</value>
|
||||
<value>Move to top (T)</value>
|
||||
</data>
|
||||
<data name="menuMoveUp.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuMoveUp.Text" xml:space="preserve">
|
||||
<value>Upward (U)</value>
|
||||
<value>Up (U)</value>
|
||||
</data>
|
||||
<data name="menuMoveDown.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuMoveDown.Text" xml:space="preserve">
|
||||
<value>Down (D)</value>
|
||||
</data>
|
||||
<data name="menuMoveBottom.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuMoveBottom.Text" xml:space="preserve">
|
||||
<value>Moves down to the bottom</value>
|
||||
<value>Move to bottom (B)</value>
|
||||
</data>
|
||||
<data name="menuSelectAll.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuSelectAll.Text" xml:space="preserve">
|
||||
<value>Select All (Ctrl+A)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator9.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>444, 6</value>
|
||||
<value>352, 6</value>
|
||||
</data>
|
||||
<data name="menuPingServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuPingServer.Text" xml:space="preserve">
|
||||
<value>Test server ping (multiple choice)(Ctrl+P)</value>
|
||||
<value>Test servers ping (Ctrl+P)</value>
|
||||
</data>
|
||||
<data name="menuTcpingServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuTcpingServer.Text" xml:space="preserve">
|
||||
<value>Test server tcping (multiple choice)(Ctrl+O)</value>
|
||||
<value>Test servers with tcping (Ctrl+O)</value>
|
||||
</data>
|
||||
<data name="menuRealPingServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuRealPingServer.Text" xml:space="preserve">
|
||||
<value>Test server real ping (multiple choice)(Ctrl+R)</value>
|
||||
<value>Test servers real delay (Ctrl+R)</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer.Text" xml:space="preserve">
|
||||
<value>Test server speed (multiple choice)(Ctrl+T)</value>
|
||||
<value>Test servers download speed (Ctrl+T)</value>
|
||||
</data>
|
||||
<data name="tsbTestMe.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="tsbTestMe.Text" xml:space="preserve">
|
||||
<value>Test current service status</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>444, 6</value>
|
||||
<value>352, 6</value>
|
||||
</data>
|
||||
<data name="menuExport2ClientConfig.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuExport2ClientConfig.Text" xml:space="preserve">
|
||||
<value>Export selected server for client configuration</value>
|
||||
</data>
|
||||
<data name="menuExport2ServerConfig.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuExport2ServerConfig.Text" xml:space="preserve">
|
||||
<value>Export selected server for server configuration</value>
|
||||
</data>
|
||||
<data name="menuExport2ShareUrl.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuExport2ShareUrl.Text" xml:space="preserve">
|
||||
<value>Batch export share URL to clipboard (multiple choice)</value>
|
||||
<value>Export share URLs to clipboard (Ctrl+C)</value>
|
||||
</data>
|
||||
<data name="menuExport2SubContent.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>447, 22</value>
|
||||
<value>355, 22</value>
|
||||
</data>
|
||||
<data name="menuExport2SubContent.Text" xml:space="preserve">
|
||||
<value>Batch export subscription content to clipboard (multiple choice)</value>
|
||||
<value>Export subscription (base64) share to clipboard</value>
|
||||
</data>
|
||||
<data name="tsbServer.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
|
||||
<value>Magenta</value>
|
||||
@@ -291,7 +297,7 @@
|
||||
<value>ImageAboveText</value>
|
||||
</data>
|
||||
<data name="cmsLv.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>448, 534</value>
|
||||
<value>356, 556</value>
|
||||
</data>
|
||||
<data name=">>cmsLv.Name" xml:space="preserve">
|
||||
<value>cmsLv</value>
|
||||
@@ -327,7 +333,7 @@
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="lvServers.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>lvServers.Name" xml:space="preserve">
|
||||
<value>lvServers</value>
|
||||
@@ -336,21 +342,21 @@
|
||||
<value>v2rayN.Base.ListViewFlickerFree, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>lvServers.Parent" xml:space="preserve">
|
||||
<value>splitContainer1.Panel1</value>
|
||||
<value>scMain.Panel1</value>
|
||||
</data>
|
||||
<data name=">>lvServers.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel1.Name" xml:space="preserve">
|
||||
<value>splitContainer1.Panel1</value>
|
||||
<data name=">>scMain.Panel1.Name" xml:space="preserve">
|
||||
<value>scMain.Panel1</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel1.Type" xml:space="preserve">
|
||||
<data name=">>scMain.Panel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel1.Parent" xml:space="preserve">
|
||||
<value>splitContainer1</value>
|
||||
<data name=">>scMain.Panel1.Parent" xml:space="preserve">
|
||||
<value>scMain</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel1.ZOrder" xml:space="preserve">
|
||||
<data name=">>scMain.Panel1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="qrCodeControl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
@@ -363,7 +369,7 @@
|
||||
<value>256, 331</value>
|
||||
</data>
|
||||
<data name="qrCodeControl.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>qrCodeControl.Name" xml:space="preserve">
|
||||
<value>qrCodeControl</value>
|
||||
@@ -372,45 +378,45 @@
|
||||
<value>v2rayN.Forms.QRCodeControl, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>qrCodeControl.Parent" xml:space="preserve">
|
||||
<value>splitContainer1.Panel2</value>
|
||||
<value>scMain.Panel2</value>
|
||||
</data>
|
||||
<data name=">>qrCodeControl.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel2.Name" xml:space="preserve">
|
||||
<value>splitContainer1.Panel2</value>
|
||||
<data name=">>scMain.Panel2.Name" xml:space="preserve">
|
||||
<value>scMain.Panel2</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel2.Type" xml:space="preserve">
|
||||
<data name=">>scMain.Panel2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel2.Parent" xml:space="preserve">
|
||||
<value>splitContainer1</value>
|
||||
<data name=">>scMain.Panel2.Parent" xml:space="preserve">
|
||||
<value>scMain</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel2.ZOrder" xml:space="preserve">
|
||||
<data name=">>scMain.Panel2.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="splitContainer1.Panel2MinSize" type="System.Int32, mscorlib">
|
||||
<data name="scMain.Panel2MinSize" type="System.Int32, mscorlib">
|
||||
<value>100</value>
|
||||
</data>
|
||||
<data name="splitContainer1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<data name="scMain.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>946, 331</value>
|
||||
</data>
|
||||
<data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib">
|
||||
<data name="scMain.SplitterDistance" type="System.Int32, mscorlib">
|
||||
<value>686</value>
|
||||
</data>
|
||||
<data name="splitContainer1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
<data name="scMain.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Name" xml:space="preserve">
|
||||
<value>splitContainer1</value>
|
||||
<data name=">>scMain.Name" xml:space="preserve">
|
||||
<value>scMain</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Type" xml:space="preserve">
|
||||
<data name=">>scMain.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Parent" xml:space="preserve">
|
||||
<data name=">>scMain.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.ZOrder" xml:space="preserve">
|
||||
<data name=">>scMain.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="notifyMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
@@ -423,34 +429,46 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="menuNotEnabledHttp.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 22</value>
|
||||
<value>411, 22</value>
|
||||
</data>
|
||||
<data name="menuNotEnabledHttp.Text" xml:space="preserve">
|
||||
<value>Not Enabled Http Proxy</value>
|
||||
</data>
|
||||
<data name="menuGlobal.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 22</value>
|
||||
<value>411, 22</value>
|
||||
</data>
|
||||
<data name="menuGlobal.Text" xml:space="preserve">
|
||||
<value>Open Http proxy and automatically configure proxy server (global mode)</value>
|
||||
<value>Open Http proxy and set the system proxy (global mode)</value>
|
||||
</data>
|
||||
<data name="menuGlobalPAC.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 22</value>
|
||||
<value>411, 22</value>
|
||||
</data>
|
||||
<data name="menuGlobalPAC.Text" xml:space="preserve">
|
||||
<value>Open PAC and automatically configure PAC (PAC mode)</value>
|
||||
<value>Open PAC and set the system proxy (PAC mode)</value>
|
||||
</data>
|
||||
<data name="menuKeep.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 22</value>
|
||||
<value>411, 22</value>
|
||||
</data>
|
||||
<data name="menuKeep.Text" xml:space="preserve">
|
||||
<value>Only open Http proxy, do not automatically configure proxy server (direct mode)</value>
|
||||
<value>Only open Http proxy and clear the proxy settings</value>
|
||||
</data>
|
||||
<data name="menuKeepPAC.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>547, 22</value>
|
||||
<value>411, 22</value>
|
||||
</data>
|
||||
<data name="menuKeepPAC.Text" xml:space="preserve">
|
||||
<value>Only open PAC, do not automatically configure PAC</value>
|
||||
<value>Only open PAC and clear the proxy settings</value>
|
||||
</data>
|
||||
<data name="menuKeepNothing.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>411, 22</value>
|
||||
</data>
|
||||
<data name="menuKeepNothing.Text" xml:space="preserve">
|
||||
<value>Only open Http proxy and do nothing</value>
|
||||
</data>
|
||||
<data name="menuKeepPACNothing.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>411, 22</value>
|
||||
</data>
|
||||
<data name="menuKeepPACNothing.Text" xml:space="preserve">
|
||||
<value>Only open PAC and do nothing</value>
|
||||
</data>
|
||||
<data name="menuSysAgentMode.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>264, 22</value>
|
||||
@@ -482,6 +500,12 @@
|
||||
<data name="menuCopyPACUrl.Text" xml:space="preserve">
|
||||
<value>Copy local PAC URL</value>
|
||||
</data>
|
||||
<data name="menuUpdateSubscriptions.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="menuUpdateSubscriptions.Text" xml:space="preserve">
|
||||
<value>Update subscriptions</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>261, 6</value>
|
||||
</data>
|
||||
@@ -492,7 +516,7 @@
|
||||
<value>Exit</value>
|
||||
</data>
|
||||
<data name="cmsMain.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>265, 142</value>
|
||||
<value>265, 164</value>
|
||||
</data>
|
||||
<data name=">>cmsMain.Name" xml:space="preserve">
|
||||
<value>cmsMain</value>
|
||||
@@ -519,10 +543,10 @@
|
||||
<value>952, 351</value>
|
||||
</data>
|
||||
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="groupBox1.Text" xml:space="preserve">
|
||||
<value>Server list</value>
|
||||
<value>Servers list</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Name" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
@@ -555,7 +579,7 @@
|
||||
<value>946, 134</value>
|
||||
</data>
|
||||
<data name="txtMsgBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name=">>txtMsgBox.Name" xml:space="preserve">
|
||||
<value>txtMsgBox</value>
|
||||
@@ -576,10 +600,10 @@
|
||||
<value>微软雅黑, 8pt</value>
|
||||
</data>
|
||||
<data name="toolSslSocksPortLab.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>49, 17</value>
|
||||
<value>52, 17</value>
|
||||
</data>
|
||||
<data name="toolSslSocksPortLab.Text" xml:space="preserve">
|
||||
<value>SOCKS5</value>
|
||||
<value>SOCKS5:</value>
|
||||
</data>
|
||||
<data name="toolSslSocksPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>0, 17</value>
|
||||
@@ -588,16 +612,16 @@
|
||||
<value>微软雅黑, 8pt</value>
|
||||
</data>
|
||||
<data name="toolSslBlank1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>198, 17</value>
|
||||
<value>195, 17</value>
|
||||
</data>
|
||||
<data name="toolSslHttpPortLab.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>微软雅黑, 8pt</value>
|
||||
</data>
|
||||
<data name="toolSslHttpPortLab.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>36, 17</value>
|
||||
<value>39, 17</value>
|
||||
</data>
|
||||
<data name="toolSslHttpPortLab.Text" xml:space="preserve">
|
||||
<value>HTTP</value>
|
||||
<value>HTTP:</value>
|
||||
</data>
|
||||
<data name="toolSslHttpPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>0, 17</value>
|
||||
@@ -606,16 +630,16 @@
|
||||
<value>微软雅黑, 8pt</value>
|
||||
</data>
|
||||
<data name="toolSslBlank2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>198, 17</value>
|
||||
<value>195, 17</value>
|
||||
</data>
|
||||
<data name="toolSslPacPortLab.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>微软雅黑, 8pt</value>
|
||||
</data>
|
||||
<data name="toolSslPacPortLab.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>30, 17</value>
|
||||
<value>33, 17</value>
|
||||
</data>
|
||||
<data name="toolSslPacPortLab.Text" xml:space="preserve">
|
||||
<value>PAC</value>
|
||||
<value>PAC:</value>
|
||||
</data>
|
||||
<data name="toolSslPacPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>0, 17</value>
|
||||
@@ -624,7 +648,7 @@
|
||||
<value>微软雅黑, 8pt</value>
|
||||
</data>
|
||||
<data name="toolSslBlank3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>198, 17</value>
|
||||
<value>195, 17</value>
|
||||
</data>
|
||||
<data name="toolSslServerSpeed.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
@@ -654,7 +678,7 @@
|
||||
<value>946, 22</value>
|
||||
</data>
|
||||
<data name="ssMain.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="ssMain.Text" xml:space="preserve">
|
||||
<value>statusStrip1</value>
|
||||
@@ -681,10 +705,10 @@
|
||||
<value>952, 176</value>
|
||||
</data>
|
||||
<data name="groupBox2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="groupBox2.Text" xml:space="preserve">
|
||||
<value>Information</value>
|
||||
<value>Informations</value>
|
||||
</data>
|
||||
<data name=">>groupBox2.Name" xml:space="preserve">
|
||||
<value>groupBox2</value>
|
||||
@@ -708,7 +732,7 @@
|
||||
<value>952, 10</value>
|
||||
</data>
|
||||
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>panel1.Name" xml:space="preserve">
|
||||
<value>panel1</value>
|
||||
@@ -729,29 +753,44 @@
|
||||
<value>6, 56</value>
|
||||
</data>
|
||||
<data name="tsbSubSetting.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>197, 22</value>
|
||||
<value>125, 22</value>
|
||||
</data>
|
||||
<data name="tsbSubSetting.Text" xml:space="preserve">
|
||||
<value>Subscription settings</value>
|
||||
<value>Settings</value>
|
||||
</data>
|
||||
<data name="tsbSubUpdate.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>197, 22</value>
|
||||
<value>125, 22</value>
|
||||
</data>
|
||||
<data name="tsbSubUpdate.Text" xml:space="preserve">
|
||||
<value>Update subscription</value>
|
||||
<value>Updates</value>
|
||||
</data>
|
||||
<data name="tsbSub.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
|
||||
<value>Magenta</value>
|
||||
</data>
|
||||
<data name="tsbSub.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>93, 53</value>
|
||||
<value>99, 53</value>
|
||||
</data>
|
||||
<data name="tsbSub.Text" xml:space="preserve">
|
||||
<value>Subscription</value>
|
||||
<value>Subscriptions</value>
|
||||
</data>
|
||||
<data name="tsbSub.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
||||
<value>ImageAboveText</value>
|
||||
</data>
|
||||
<data name="tsbQRCodeSwitch.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
|
||||
<value>Magenta</value>
|
||||
</data>
|
||||
<data name="tsbQRCodeSwitch.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>45, 53</value>
|
||||
</data>
|
||||
<data name="tsbQRCodeSwitch.Text" xml:space="preserve">
|
||||
<value>Share</value>
|
||||
</data>
|
||||
<data name="tsbQRCodeSwitch.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>BottomCenter</value>
|
||||
</data>
|
||||
<data name="tsbQRCodeSwitch.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
||||
<value>ImageAboveText</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator8.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>6, 56</value>
|
||||
</data>
|
||||
@@ -759,10 +798,10 @@
|
||||
<value>Magenta</value>
|
||||
</data>
|
||||
<data name="tsbOptionSetting.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>52, 53</value>
|
||||
<value>58, 53</value>
|
||||
</data>
|
||||
<data name="tsbOptionSetting.Text" xml:space="preserve">
|
||||
<value>Setting</value>
|
||||
<value>Settings</value>
|
||||
</data>
|
||||
<data name="tsbOptionSetting.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
||||
<value>ImageAboveText</value>
|
||||
@@ -800,28 +839,31 @@
|
||||
<value>6, 56</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdateN.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>338, 22</value>
|
||||
<value>393, 22</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdateN.Text" xml:space="preserve">
|
||||
<value>Check for updates to v2rayN</value>
|
||||
<value>v2rayN (this software)</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdateCore.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>338, 22</value>
|
||||
<value>393, 22</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdateCore.Text" xml:space="preserve">
|
||||
<value>Check for updates to v2rayCore</value>
|
||||
<value>Update v2rayCore</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdatePACList.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>338, 22</value>
|
||||
<value>393, 22</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdatePACList.Text" xml:space="preserve">
|
||||
<value>Check for updated PAC (requires Http proxy)</value>
|
||||
<value>Check for updated PAC (need the HTTP proxy are ON)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator13.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>390, 6</value>
|
||||
</data>
|
||||
<data name="tsbCheckClearPACList.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>338, 22</value>
|
||||
<value>393, 22</value>
|
||||
</data>
|
||||
<data name="tsbCheckClearPACList.Text" xml:space="preserve">
|
||||
<value>Simplify PAC (please set Core route)</value>
|
||||
<value>Simplify PAC (need to set Core route)</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdate.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
|
||||
<value>Magenta</value>
|
||||
@@ -842,7 +884,13 @@
|
||||
<value>187, 22</value>
|
||||
</data>
|
||||
<data name="tsbAbout.Text" xml:space="preserve">
|
||||
<value>About</value>
|
||||
<value>v2rayN Project</value>
|
||||
</data>
|
||||
<data name="tsbV2rayWebsite.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>187, 22</value>
|
||||
</data>
|
||||
<data name="tsbV2rayWebsite.Text" xml:space="preserve">
|
||||
<value>V2Ray Website</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator12.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>184, 6</value>
|
||||
@@ -912,7 +960,7 @@
|
||||
<value>952, 56</value>
|
||||
</data>
|
||||
<data name="tsMain.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>tsMain.Name" xml:space="preserve">
|
||||
<value>tsMain</value>
|
||||
@@ -930,7 +978,7 @@
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>65</value>
|
||||
<value>108</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 12</value>
|
||||
@@ -1076,6 +1124,12 @@
|
||||
<data name=">>menuSpeedServer.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tsbTestMe.Name" xml:space="preserve">
|
||||
<value>tsbTestMe</value>
|
||||
</data>
|
||||
<data name=">>tsbTestMe.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator6.Name" xml:space="preserve">
|
||||
<value>toolStripSeparator6</value>
|
||||
</data>
|
||||
@@ -1154,6 +1208,18 @@
|
||||
<data name=">>menuKeepPAC.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>menuKeepNothing.Name" xml:space="preserve">
|
||||
<value>menuKeepNothing</value>
|
||||
</data>
|
||||
<data name=">>menuKeepNothing.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>menuKeepPACNothing.Name" xml:space="preserve">
|
||||
<value>menuKeepPACNothing</value>
|
||||
</data>
|
||||
<data name=">>menuKeepPACNothing.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>menuServers.Name" xml:space="preserve">
|
||||
<value>menuServers</value>
|
||||
</data>
|
||||
@@ -1178,6 +1244,12 @@
|
||||
<data name=">>menuCopyPACUrl.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>menuUpdateSubscriptions.Name" xml:space="preserve">
|
||||
<value>menuUpdateSubscriptions</value>
|
||||
</data>
|
||||
<data name=">>menuUpdateSubscriptions.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator2.Name" xml:space="preserve">
|
||||
<value>toolStripSeparator2</value>
|
||||
</data>
|
||||
@@ -1286,6 +1358,12 @@
|
||||
<data name=">>tsbSubUpdate.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tsbQRCodeSwitch.Name" xml:space="preserve">
|
||||
<value>tsbQRCodeSwitch</value>
|
||||
</data>
|
||||
<data name=">>tsbQRCodeSwitch.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator8.Name" xml:space="preserve">
|
||||
<value>toolStripSeparator8</value>
|
||||
</data>
|
||||
@@ -1340,6 +1418,12 @@
|
||||
<data name=">>tsbCheckUpdatePACList.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator13.Name" xml:space="preserve">
|
||||
<value>toolStripSeparator13</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator13.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tsbCheckClearPACList.Name" xml:space="preserve">
|
||||
<value>tsbCheckClearPACList</value>
|
||||
</data>
|
||||
@@ -1364,6 +1448,12 @@
|
||||
<data name=">>tsbAbout.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tsbV2rayWebsite.Name" xml:space="preserve">
|
||||
<value>tsbV2rayWebsite</value>
|
||||
</data>
|
||||
<data name=">>tsbV2rayWebsite.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator12.Name" xml:space="preserve">
|
||||
<value>toolStripSeparator12</value>
|
||||
</data>
|
||||
|
||||
@@ -119,151 +119,151 @@
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="menuAddVmessServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuAddVmessServer.Text" xml:space="preserve">
|
||||
<value>添加[VMess]服务器</value>
|
||||
</data>
|
||||
<data name="menuAddShadowsocksServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuAddShadowsocksServer.Text" xml:space="preserve">
|
||||
<value>添加[Shadowsocks]服务器</value>
|
||||
</data>
|
||||
<data name="menuAddSocksServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuAddSocksServer.Text" xml:space="preserve">
|
||||
<value>添加[Socks]服务器</value>
|
||||
</data>
|
||||
<data name="menuAddCustomServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuAddCustomServer.Text" xml:space="preserve">
|
||||
<value>添加自定义配置服务器</value>
|
||||
</data>
|
||||
<data name="menuAddServers.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuAddServers.Text" xml:space="preserve">
|
||||
<value>从剪贴板导入批量URL</value>
|
||||
<value>从剪贴板导入批量URL (Ctrl+V)</value>
|
||||
</data>
|
||||
<data name="menuScanScreen.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuScanScreen.Text" xml:space="preserve">
|
||||
<value>扫描屏幕上的二维码</value>
|
||||
<value>扫描屏幕上的二维码 (Ctrl+S)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>275, 6</value>
|
||||
<value>297, 6</value>
|
||||
</data>
|
||||
<data name="menuRemoveServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuRemoveServer.Text" xml:space="preserve">
|
||||
<value>移除所选服务器(多选) (Delete)</value>
|
||||
<value>移除所选服务器(多选) (Delete)</value>
|
||||
</data>
|
||||
<data name="menuRemoveDuplicateServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuRemoveDuplicateServer.Text" xml:space="preserve">
|
||||
<value>移除重复的服务器</value>
|
||||
</data>
|
||||
<data name="menuCopyServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuCopyServer.Text" xml:space="preserve">
|
||||
<value>复制所选服务器</value>
|
||||
<value>克隆所选服务器</value>
|
||||
</data>
|
||||
<data name="menuSetDefaultServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuSetDefaultServer.Text" xml:space="preserve">
|
||||
<value>设为活动服务器 (Enter)</value>
|
||||
<value>设为活动服务器 (Enter)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>275, 6</value>
|
||||
<value>297, 6</value>
|
||||
</data>
|
||||
<data name="menuMoveTop.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuMoveTop.Text" xml:space="preserve">
|
||||
<value>上移至顶</value>
|
||||
<value>上移至顶 (T)</value>
|
||||
</data>
|
||||
<data name="menuMoveUp.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuMoveUp.Text" xml:space="preserve">
|
||||
<value>上移 (U)</value>
|
||||
<value>上移 (U)</value>
|
||||
</data>
|
||||
<data name="menuMoveDown.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuMoveDown.Text" xml:space="preserve">
|
||||
<value>下移 (D)</value>
|
||||
<value>下移 (D)</value>
|
||||
</data>
|
||||
<data name="menuMoveBottom.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuMoveBottom.Text" xml:space="preserve">
|
||||
<value>下移至底</value>
|
||||
<value>下移至底 (B)</value>
|
||||
</data>
|
||||
<data name="menuSelectAll.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuSelectAll.Text" xml:space="preserve">
|
||||
<value>全选 (Ctrl+A)</value>
|
||||
<value>全选 (Ctrl+A)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator9.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>275, 6</value>
|
||||
<value>297, 6</value>
|
||||
</data>
|
||||
<data name="menuPingServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuPingServer.Text" xml:space="preserve">
|
||||
<value>测试服务器延迟Ping(多选)(Ctrl+P)</value>
|
||||
<value>测试服务器延迟Ping(多选) (Ctrl+P)</value>
|
||||
</data>
|
||||
<data name="menuTcpingServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuTcpingServer.Text" xml:space="preserve">
|
||||
<value>测试服务器延迟Tcping(多选)(Ctrl+O)</value>
|
||||
<value>测试服务器延迟Tcping(多选) (Ctrl+O)</value>
|
||||
</data>
|
||||
<data name="menuRealPingServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuRealPingServer.Text" xml:space="preserve">
|
||||
<value>测试服务器真连接延迟(多选)(Ctrl+R)</value>
|
||||
<value>测试服务器真连接延迟(多选) (Ctrl+R)</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer.Text" xml:space="preserve">
|
||||
<value>测试服务器速度(多选)(Ctrl+T)</value>
|
||||
<value>测试服务器速度(多选) (Ctrl+T)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>275, 6</value>
|
||||
<value>297, 6</value>
|
||||
</data>
|
||||
<data name="menuExport2ClientConfig.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuExport2ClientConfig.Text" xml:space="preserve">
|
||||
<value>导出所选服务器为客户端配置</value>
|
||||
</data>
|
||||
<data name="menuExport2ServerConfig.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuExport2ServerConfig.Text" xml:space="preserve">
|
||||
<value>导出所选服务器为服务端配置</value>
|
||||
</data>
|
||||
<data name="menuExport2ShareUrl.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuExport2ShareUrl.Text" xml:space="preserve">
|
||||
<value>批量导出分享URL至剪贴板(多选)</value>
|
||||
<value>批量导出分享URL至剪贴板(多选) (Ctrl+C)</value>
|
||||
</data>
|
||||
<data name="menuExport2SubContent.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>278, 22</value>
|
||||
<value>300, 22</value>
|
||||
</data>
|
||||
<data name="menuExport2SubContent.Text" xml:space="preserve">
|
||||
<value>批量导出订阅内容至剪贴板(多选)</value>
|
||||
@@ -275,7 +275,7 @@
|
||||
<value> 服务器 </value>
|
||||
</data>
|
||||
<data name="cmsLv.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>279, 534</value>
|
||||
<value>301, 534</value>
|
||||
</data>
|
||||
<data name="lvServers.Items" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
@@ -295,34 +295,46 @@
|
||||
</value>
|
||||
</data>
|
||||
<data name="menuNotEnabledHttp.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>340, 22</value>
|
||||
<value>316, 22</value>
|
||||
</data>
|
||||
<data name="menuNotEnabledHttp.Text" xml:space="preserve">
|
||||
<value>关闭Http代理</value>
|
||||
</data>
|
||||
<data name="menuGlobal.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>340, 22</value>
|
||||
<value>316, 22</value>
|
||||
</data>
|
||||
<data name="menuGlobal.Text" xml:space="preserve">
|
||||
<value>开启Http代理,并自动配置代理服务器(全局模式)</value>
|
||||
<value>开启Http代理,并自动配置系统代理(全局模式)</value>
|
||||
</data>
|
||||
<data name="menuGlobalPAC.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>340, 22</value>
|
||||
<value>316, 22</value>
|
||||
</data>
|
||||
<data name="menuGlobalPAC.Text" xml:space="preserve">
|
||||
<value>开启PAC,并自动配置PAC(PAC模式)</value>
|
||||
<value>开启PAC,并自动配置系统代理(PAC模式)</value>
|
||||
</data>
|
||||
<data name="menuKeep.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>340, 22</value>
|
||||
<value>316, 22</value>
|
||||
</data>
|
||||
<data name="menuKeep.Text" xml:space="preserve">
|
||||
<value>仅开启Http代理,不自动配置代理服务器(直连模式)</value>
|
||||
<value>仅开启Http代理,并清除系统代理</value>
|
||||
</data>
|
||||
<data name="menuKeepPAC.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>340, 22</value>
|
||||
<value>316, 22</value>
|
||||
</data>
|
||||
<data name="menuKeepPAC.Text" xml:space="preserve">
|
||||
<value>仅开启PAC,不自动配置PAC</value>
|
||||
<value>仅开启PAC,并清除系统代理</value>
|
||||
</data>
|
||||
<data name="menuKeepNothing.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>316, 22</value>
|
||||
</data>
|
||||
<data name="menuKeepNothing.Text" xml:space="preserve">
|
||||
<value>仅开启Http代理,不改变系统代理</value>
|
||||
</data>
|
||||
<data name="menuKeepPACNothing.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>316, 22</value>
|
||||
</data>
|
||||
<data name="menuKeepPACNothing.Text" xml:space="preserve">
|
||||
<value>仅开启PAC,不改变系统代理</value>
|
||||
</data>
|
||||
<data name="menuSysAgentMode.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>195, 22</value>
|
||||
@@ -354,6 +366,12 @@
|
||||
<data name="menuCopyPACUrl.Text" xml:space="preserve">
|
||||
<value>复制本地PAC网址</value>
|
||||
</data>
|
||||
<data name="menuUpdateSubscriptions.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>195, 22</value>
|
||||
</data>
|
||||
<data name="menuUpdateSubscriptions.Text" xml:space="preserve">
|
||||
<value>更新订阅</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>192, 6</value>
|
||||
</data>
|
||||
@@ -364,7 +382,7 @@
|
||||
<value>退出</value>
|
||||
</data>
|
||||
<data name="cmsMain.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>196, 142</value>
|
||||
<value>196, 164</value>
|
||||
</data>
|
||||
<data name="groupBox1.Text" xml:space="preserve">
|
||||
<value>服务器列表</value>
|
||||
@@ -399,43 +417,58 @@
|
||||
<data name="tsbOptionSetting.Text" xml:space="preserve">
|
||||
<value> 参数设置 </value>
|
||||
</data>
|
||||
<data name="tsbReload.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAE3SURBVFhH7ZaBDQIhDEVvBEdwBDfQDXQER3AD3cARdAPd
|
||||
QDfSDbQvuSb1AicFjJrwkxcN0FIolOuamv5VE2E+gLaPayWchEcE+hhTXVPhIoQmDcFYbKpoJtwEdX4X
|
||||
jgIrXfTwnzb6dBw22BaJVdjJmWQs1/SdBRtE0U5cBXW2oSFRO0HtSEeW2FZ1wsq9sjuRdTDVAXnNuWLY
|
||||
6JnAl0sYa/Q5q1dhq35ci+Bkq2HJvbZpxGeybAAuw4Fq+cnW1wPITgHFYxvBUw+qHEIL1yq1vDKhVlH3
|
||||
NQwF4JkcFRWiUAB7IVW2FFPO3YqlgPd+LJf02e8Fdi3rMdIAcLDuf9UpeT0IS0G/hvhPm305vSl7EQFY
|
||||
B6zCvozvYGzRM8zEoeg5TPZwDaGvpHQni1yzSxbXPW9q+hF13ROHuJnQcjbhtQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="tsbReload.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>76, 53</value>
|
||||
<value>148, 22</value>
|
||||
</data>
|
||||
<data name="tsbReload.Text" xml:space="preserve">
|
||||
<value> 重启服务 </value>
|
||||
</data>
|
||||
<data name="tsbTestMe.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>148, 22</value>
|
||||
</data>
|
||||
<data name="tsbTestMe.Text" xml:space="preserve">
|
||||
<value>测试当前服务状态</value>
|
||||
</data>
|
||||
<data name="tsbService.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAATdJREFUWEftloENAiEMRW8ER3AEN9ANdARHcAPdwBF0A91AN9INtC+5JvUCJwWM
|
||||
mvCTFw3QUiiU65qa/lUTYT6Ato9rJZyERwT6GFNdU+EihCYNwVhsqmgm3AR1fheOAitd9PCfNvp0HDbY
|
||||
FolV2MmZZCzX9J0FG0TRTlwFdbahIVE7Qe1IR5bYVnXCyr2yO5F1MNUBec25YtjomcCXSxhr9DmrV2Gr
|
||||
flyL4GSrYcm9tmnEZ7JsAC7DgWr5ydbXA8hOAcVjG8FTD6ocQgvXKrW8MqFWUfc1DAXgmRwVFaJQAHsh
|
||||
VbYUU87diqWA934sl/TZ7wV2Lesx0gBwsO5/1Sl5PQhLQb+G+E+bfTm9KXsRAVgHrMK+jO9gbNEzzMSh
|
||||
6DlM9nANoa+kdCeLXLNLFtc9b2r6EXXdE4e4mdByNuG1AAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="tsbService.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>85, 53</value>
|
||||
</data>
|
||||
<data name="tsbService.Text" xml:space="preserve">
|
||||
<value> 当前服务 </value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdateN.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>232, 22</value>
|
||||
<value>223, 22</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdateN.Text" xml:space="preserve">
|
||||
<value>检查更新v2rayN</value>
|
||||
<value>v2rayN</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdateCore.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>232, 22</value>
|
||||
<value>223, 22</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdateCore.Text" xml:space="preserve">
|
||||
<value>检查更新v2rayCore</value>
|
||||
<value>v2rayCore</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdatePACList.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>232, 22</value>
|
||||
<value>223, 22</value>
|
||||
</data>
|
||||
<data name="tsbCheckUpdatePACList.Text" xml:space="preserve">
|
||||
<value>检查更新PAC (需要Http代理)</value>
|
||||
<value>PAC</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator13.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>220, 6</value>
|
||||
</data>
|
||||
<data name="tsbCheckClearPACList.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>232, 22</value>
|
||||
<value>223, 22</value>
|
||||
</data>
|
||||
<data name="tsbCheckClearPACList.Text" xml:space="preserve">
|
||||
<value>简化PAC (请设置Core路由)</value>
|
||||
@@ -447,7 +480,10 @@
|
||||
<value> 检查更新 </value>
|
||||
</data>
|
||||
<data name="tsbAbout.Text" xml:space="preserve">
|
||||
<value>关于</value>
|
||||
<value>v2rayN 项目</value>
|
||||
</data>
|
||||
<data name="tsbV2rayWebsite.Text" xml:space="preserve">
|
||||
<value>V2Ray 官网</value>
|
||||
</data>
|
||||
<data name="tsbHelp.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>69, 53</value>
|
||||
@@ -463,12 +499,18 @@
|
||||
</data>
|
||||
<data name="tsbClose.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAAySURBVFhH7c6xDQAgCEVBRnVTHU2ZABuMxV3yOvJDAAA/
|
||||
GqfZVG6X8mg1dfUAAPBQxAZd0SJruVXHWwAAAABJRU5ErkJggg==
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAADJJREFUWEftzrENACAIRUFGdVMdTZkAG4zFXfI68kMAAD8ap9lUbpfyaDV19QAA
|
||||
8FDEBl3RImu5VcdbAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="tsbClose.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>76, 53</value>
|
||||
</data>
|
||||
<data name="tsbClose.Text" xml:space="preserve">
|
||||
<value> 关闭 </value>
|
||||
<value> 关闭窗口 </value>
|
||||
</data>
|
||||
<data name="tsbQRCodeSwitch.Text" xml:space="preserve">
|
||||
<value> 分享 </value>
|
||||
</data>
|
||||
</root>
|
||||
125
v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs
generated
125
v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs
generated
@@ -33,6 +33,7 @@
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.chkdefAllowInsecure = new System.Windows.Forms.CheckBox();
|
||||
this.label16 = new System.Windows.Forms.Label();
|
||||
this.cmblistenerType = new System.Windows.Forms.ComboBox();
|
||||
this.chksniffingEnabled2 = new System.Windows.Forms.CheckBox();
|
||||
@@ -65,10 +66,10 @@
|
||||
this.tabPage8 = new System.Windows.Forms.TabPage();
|
||||
this.cmbroutingMode = new System.Windows.Forms.ComboBox();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.linkLabelRoutingDoc = new System.Windows.Forms.LinkLabel();
|
||||
this.btnSetDefRountingRule = new System.Windows.Forms.Button();
|
||||
this.labRoutingTips = new System.Windows.Forms.Label();
|
||||
this.cmbdomainStrategy = new System.Windows.Forms.ComboBox();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.tabPage6 = new System.Windows.Forms.TabPage();
|
||||
this.chkKcpcongestion = new System.Windows.Forms.CheckBox();
|
||||
this.txtKcpwriteBufferSize = new System.Windows.Forms.TextBox();
|
||||
@@ -84,6 +85,7 @@
|
||||
this.txtKcpmtu = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.tabPage7 = new System.Windows.Forms.TabPage();
|
||||
this.chkKeepOlderDedupl = new System.Windows.Forms.CheckBox();
|
||||
this.cbFreshrate = new System.Windows.Forms.ComboBox();
|
||||
this.lbFreshrate = new System.Windows.Forms.Label();
|
||||
this.chkEnableStatistics = new System.Windows.Forms.CheckBox();
|
||||
@@ -91,6 +93,10 @@
|
||||
this.txturlGFWList = new System.Windows.Forms.TextBox();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.chkAutoRun = new System.Windows.Forms.CheckBox();
|
||||
this.tabPage9 = new System.Windows.Forms.TabPage();
|
||||
this.txtuserPacRule = new System.Windows.Forms.TextBox();
|
||||
this.panel4 = new System.Windows.Forms.Panel();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.btnOK = new System.Windows.Forms.Button();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
@@ -107,36 +113,41 @@
|
||||
this.panel3.SuspendLayout();
|
||||
this.tabPage6.SuspendLayout();
|
||||
this.tabPage7.SuspendLayout();
|
||||
this.tabPage9.SuspendLayout();
|
||||
this.panel4.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.btnClose, "btnClose");
|
||||
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.UseVisualStyleBackColor = true;
|
||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||
//
|
||||
// tabControl1
|
||||
//
|
||||
resources.ApplyResources(this.tabControl1, "tabControl1");
|
||||
this.tabControl1.Controls.Add(this.tabPage1);
|
||||
this.tabControl1.Controls.Add(this.tabPage2);
|
||||
this.tabControl1.Controls.Add(this.tabPage6);
|
||||
this.tabControl1.Controls.Add(this.tabPage7);
|
||||
resources.ApplyResources(this.tabControl1, "tabControl1");
|
||||
this.tabControl1.Controls.Add(this.tabPage9);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
//
|
||||
// tabPage1
|
||||
//
|
||||
this.tabPage1.Controls.Add(this.groupBox1);
|
||||
resources.ApplyResources(this.tabPage1, "tabPage1");
|
||||
this.tabPage1.Controls.Add(this.groupBox1);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
resources.ApplyResources(this.groupBox1, "groupBox1");
|
||||
this.groupBox1.Controls.Add(this.chkdefAllowInsecure);
|
||||
this.groupBox1.Controls.Add(this.label16);
|
||||
this.groupBox1.Controls.Add(this.cmblistenerType);
|
||||
this.groupBox1.Controls.Add(this.chksniffingEnabled2);
|
||||
@@ -157,10 +168,15 @@
|
||||
this.groupBox1.Controls.Add(this.label5);
|
||||
this.groupBox1.Controls.Add(this.txtlocalPort);
|
||||
this.groupBox1.Controls.Add(this.label2);
|
||||
resources.ApplyResources(this.groupBox1, "groupBox1");
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.TabStop = false;
|
||||
//
|
||||
// chkdefAllowInsecure
|
||||
//
|
||||
resources.ApplyResources(this.chkdefAllowInsecure, "chkdefAllowInsecure");
|
||||
this.chkdefAllowInsecure.Name = "chkdefAllowInsecure";
|
||||
this.chkdefAllowInsecure.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label16
|
||||
//
|
||||
resources.ApplyResources(this.label16, "label16");
|
||||
@@ -168,6 +184,7 @@
|
||||
//
|
||||
// cmblistenerType
|
||||
//
|
||||
resources.ApplyResources(this.cmblistenerType, "cmblistenerType");
|
||||
this.cmblistenerType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmblistenerType.FormattingEnabled = true;
|
||||
this.cmblistenerType.Items.AddRange(new object[] {
|
||||
@@ -175,8 +192,9 @@
|
||||
resources.GetString("cmblistenerType.Items1"),
|
||||
resources.GetString("cmblistenerType.Items2"),
|
||||
resources.GetString("cmblistenerType.Items3"),
|
||||
resources.GetString("cmblistenerType.Items4")});
|
||||
resources.ApplyResources(this.cmblistenerType, "cmblistenerType");
|
||||
resources.GetString("cmblistenerType.Items4"),
|
||||
resources.GetString("cmblistenerType.Items5"),
|
||||
resources.GetString("cmblistenerType.Items6")});
|
||||
this.cmblistenerType.Name = "cmblistenerType";
|
||||
//
|
||||
// chksniffingEnabled2
|
||||
@@ -222,12 +240,12 @@
|
||||
//
|
||||
// cmbprotocol2
|
||||
//
|
||||
resources.ApplyResources(this.cmbprotocol2, "cmbprotocol2");
|
||||
this.cmbprotocol2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbprotocol2.FormattingEnabled = true;
|
||||
this.cmbprotocol2.Items.AddRange(new object[] {
|
||||
resources.GetString("cmbprotocol2.Items"),
|
||||
resources.GetString("cmbprotocol2.Items1")});
|
||||
resources.ApplyResources(this.cmbprotocol2, "cmbprotocol2");
|
||||
this.cmbprotocol2.Name = "cmbprotocol2";
|
||||
//
|
||||
// label3
|
||||
@@ -242,8 +260,8 @@
|
||||
//
|
||||
// cmbprotocol
|
||||
//
|
||||
this.cmbprotocol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
resources.ApplyResources(this.cmbprotocol, "cmbprotocol");
|
||||
this.cmbprotocol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbprotocol.FormattingEnabled = true;
|
||||
this.cmbprotocol.Items.AddRange(new object[] {
|
||||
resources.GetString("cmbprotocol.Items"),
|
||||
@@ -269,6 +287,7 @@
|
||||
//
|
||||
// cmbloglevel
|
||||
//
|
||||
resources.ApplyResources(this.cmbloglevel, "cmbloglevel");
|
||||
this.cmbloglevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbloglevel.FormattingEnabled = true;
|
||||
this.cmbloglevel.Items.AddRange(new object[] {
|
||||
@@ -277,7 +296,6 @@
|
||||
resources.GetString("cmbloglevel.Items2"),
|
||||
resources.GetString("cmbloglevel.Items3"),
|
||||
resources.GetString("cmbloglevel.Items4")});
|
||||
resources.ApplyResources(this.cmbloglevel, "cmbloglevel");
|
||||
this.cmbloglevel.Name = "cmbloglevel";
|
||||
//
|
||||
// label5
|
||||
@@ -297,33 +315,33 @@
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
this.tabPage2.Controls.Add(this.groupBox2);
|
||||
resources.ApplyResources(this.tabPage2, "tabPage2");
|
||||
this.tabPage2.Controls.Add(this.groupBox2);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
resources.ApplyResources(this.groupBox2, "groupBox2");
|
||||
this.groupBox2.Controls.Add(this.tabControl2);
|
||||
this.groupBox2.Controls.Add(this.panel3);
|
||||
resources.ApplyResources(this.groupBox2, "groupBox2");
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.TabStop = false;
|
||||
//
|
||||
// tabControl2
|
||||
//
|
||||
resources.ApplyResources(this.tabControl2, "tabControl2");
|
||||
this.tabControl2.Controls.Add(this.tabPage3);
|
||||
this.tabControl2.Controls.Add(this.tabPage4);
|
||||
this.tabControl2.Controls.Add(this.tabPage5);
|
||||
this.tabControl2.Controls.Add(this.tabPage8);
|
||||
resources.ApplyResources(this.tabControl2, "tabControl2");
|
||||
this.tabControl2.Name = "tabControl2";
|
||||
this.tabControl2.SelectedIndex = 0;
|
||||
//
|
||||
// tabPage3
|
||||
//
|
||||
this.tabPage3.Controls.Add(this.txtUseragent);
|
||||
resources.ApplyResources(this.tabPage3, "tabPage3");
|
||||
this.tabPage3.Controls.Add(this.txtUseragent);
|
||||
this.tabPage3.Name = "tabPage3";
|
||||
this.tabPage3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@@ -334,8 +352,8 @@
|
||||
//
|
||||
// tabPage4
|
||||
//
|
||||
this.tabPage4.Controls.Add(this.txtUserdirect);
|
||||
resources.ApplyResources(this.tabPage4, "tabPage4");
|
||||
this.tabPage4.Controls.Add(this.txtUserdirect);
|
||||
this.tabPage4.Name = "tabPage4";
|
||||
this.tabPage4.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@@ -346,8 +364,8 @@
|
||||
//
|
||||
// tabPage5
|
||||
//
|
||||
this.tabPage5.Controls.Add(this.txtUserblock);
|
||||
resources.ApplyResources(this.tabPage5, "tabPage5");
|
||||
this.tabPage5.Controls.Add(this.txtUserblock);
|
||||
this.tabPage5.Name = "tabPage5";
|
||||
this.tabPage5.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@@ -358,13 +376,14 @@
|
||||
//
|
||||
// tabPage8
|
||||
//
|
||||
this.tabPage8.Controls.Add(this.cmbroutingMode);
|
||||
resources.ApplyResources(this.tabPage8, "tabPage8");
|
||||
this.tabPage8.Controls.Add(this.cmbroutingMode);
|
||||
this.tabPage8.Name = "tabPage8";
|
||||
this.tabPage8.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cmbroutingMode
|
||||
//
|
||||
resources.ApplyResources(this.cmbroutingMode, "cmbroutingMode");
|
||||
this.cmbroutingMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbroutingMode.FormattingEnabled = true;
|
||||
this.cmbroutingMode.Items.AddRange(new object[] {
|
||||
@@ -372,18 +391,24 @@
|
||||
resources.GetString("cmbroutingMode.Items1"),
|
||||
resources.GetString("cmbroutingMode.Items2"),
|
||||
resources.GetString("cmbroutingMode.Items3")});
|
||||
resources.ApplyResources(this.cmbroutingMode, "cmbroutingMode");
|
||||
this.cmbroutingMode.Name = "cmbroutingMode";
|
||||
//
|
||||
// panel3
|
||||
//
|
||||
resources.ApplyResources(this.panel3, "panel3");
|
||||
this.panel3.Controls.Add(this.linkLabelRoutingDoc);
|
||||
this.panel3.Controls.Add(this.btnSetDefRountingRule);
|
||||
this.panel3.Controls.Add(this.labRoutingTips);
|
||||
this.panel3.Controls.Add(this.cmbdomainStrategy);
|
||||
this.panel3.Controls.Add(this.label15);
|
||||
resources.ApplyResources(this.panel3, "panel3");
|
||||
this.panel3.Name = "panel3";
|
||||
//
|
||||
// linkLabelRoutingDoc
|
||||
//
|
||||
resources.ApplyResources(this.linkLabelRoutingDoc, "linkLabelRoutingDoc");
|
||||
this.linkLabelRoutingDoc.Name = "linkLabelRoutingDoc";
|
||||
this.linkLabelRoutingDoc.TabStop = true;
|
||||
this.linkLabelRoutingDoc.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelRoutingDoc_LinkClicked);
|
||||
//
|
||||
// btnSetDefRountingRule
|
||||
//
|
||||
resources.ApplyResources(this.btnSetDefRountingRule, "btnSetDefRountingRule");
|
||||
@@ -393,28 +418,24 @@
|
||||
//
|
||||
// labRoutingTips
|
||||
//
|
||||
this.labRoutingTips.ForeColor = System.Drawing.Color.Brown;
|
||||
resources.ApplyResources(this.labRoutingTips, "labRoutingTips");
|
||||
this.labRoutingTips.ForeColor = System.Drawing.Color.Brown;
|
||||
this.labRoutingTips.Name = "labRoutingTips";
|
||||
//
|
||||
// cmbdomainStrategy
|
||||
//
|
||||
resources.ApplyResources(this.cmbdomainStrategy, "cmbdomainStrategy");
|
||||
this.cmbdomainStrategy.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbdomainStrategy.FormattingEnabled = true;
|
||||
this.cmbdomainStrategy.Items.AddRange(new object[] {
|
||||
resources.GetString("cmbdomainStrategy.Items"),
|
||||
resources.GetString("cmbdomainStrategy.Items1"),
|
||||
resources.GetString("cmbdomainStrategy.Items2")});
|
||||
resources.ApplyResources(this.cmbdomainStrategy, "cmbdomainStrategy");
|
||||
this.cmbdomainStrategy.Name = "cmbdomainStrategy";
|
||||
//
|
||||
// label15
|
||||
//
|
||||
resources.ApplyResources(this.label15, "label15");
|
||||
this.label15.Name = "label15";
|
||||
//
|
||||
// tabPage6
|
||||
//
|
||||
resources.ApplyResources(this.tabPage6, "tabPage6");
|
||||
this.tabPage6.Controls.Add(this.chkKcpcongestion);
|
||||
this.tabPage6.Controls.Add(this.txtKcpwriteBufferSize);
|
||||
this.tabPage6.Controls.Add(this.label10);
|
||||
@@ -428,7 +449,6 @@
|
||||
this.tabPage6.Controls.Add(this.label7);
|
||||
this.tabPage6.Controls.Add(this.txtKcpmtu);
|
||||
this.tabPage6.Controls.Add(this.label6);
|
||||
resources.ApplyResources(this.tabPage6, "tabPage6");
|
||||
this.tabPage6.Name = "tabPage6";
|
||||
this.tabPage6.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@@ -500,6 +520,8 @@
|
||||
//
|
||||
// tabPage7
|
||||
//
|
||||
resources.ApplyResources(this.tabPage7, "tabPage7");
|
||||
this.tabPage7.Controls.Add(this.chkKeepOlderDedupl);
|
||||
this.tabPage7.Controls.Add(this.cbFreshrate);
|
||||
this.tabPage7.Controls.Add(this.lbFreshrate);
|
||||
this.tabPage7.Controls.Add(this.chkEnableStatistics);
|
||||
@@ -507,15 +529,20 @@
|
||||
this.tabPage7.Controls.Add(this.txturlGFWList);
|
||||
this.tabPage7.Controls.Add(this.label13);
|
||||
this.tabPage7.Controls.Add(this.chkAutoRun);
|
||||
resources.ApplyResources(this.tabPage7, "tabPage7");
|
||||
this.tabPage7.Name = "tabPage7";
|
||||
this.tabPage7.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkKeepOlderDedupl
|
||||
//
|
||||
resources.ApplyResources(this.chkKeepOlderDedupl, "chkKeepOlderDedupl");
|
||||
this.chkKeepOlderDedupl.Name = "chkKeepOlderDedupl";
|
||||
this.chkKeepOlderDedupl.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbFreshrate
|
||||
//
|
||||
resources.ApplyResources(this.cbFreshrate, "cbFreshrate");
|
||||
this.cbFreshrate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbFreshrate.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.cbFreshrate, "cbFreshrate");
|
||||
this.cbFreshrate.Name = "cbFreshrate";
|
||||
//
|
||||
// lbFreshrate
|
||||
@@ -551,11 +578,36 @@
|
||||
this.chkAutoRun.Name = "chkAutoRun";
|
||||
this.chkAutoRun.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tabPage9
|
||||
//
|
||||
resources.ApplyResources(this.tabPage9, "tabPage9");
|
||||
this.tabPage9.Controls.Add(this.txtuserPacRule);
|
||||
this.tabPage9.Controls.Add(this.panel4);
|
||||
this.tabPage9.Name = "tabPage9";
|
||||
this.tabPage9.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// txtuserPacRule
|
||||
//
|
||||
resources.ApplyResources(this.txtuserPacRule, "txtuserPacRule");
|
||||
this.txtuserPacRule.Name = "txtuserPacRule";
|
||||
//
|
||||
// panel4
|
||||
//
|
||||
resources.ApplyResources(this.panel4, "panel4");
|
||||
this.panel4.Controls.Add(this.label4);
|
||||
this.panel4.Name = "panel4";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
resources.ApplyResources(this.label4, "label4");
|
||||
this.label4.ForeColor = System.Drawing.Color.Brown;
|
||||
this.label4.Name = "label4";
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
resources.ApplyResources(this.panel2, "panel2");
|
||||
this.panel2.Controls.Add(this.btnClose);
|
||||
this.panel2.Controls.Add(this.btnOK);
|
||||
resources.ApplyResources(this.panel2, "panel2");
|
||||
this.panel2.Name = "panel2";
|
||||
//
|
||||
// btnOK
|
||||
@@ -601,6 +653,9 @@
|
||||
this.tabPage6.PerformLayout();
|
||||
this.tabPage7.ResumeLayout(false);
|
||||
this.tabPage7.PerformLayout();
|
||||
this.tabPage9.ResumeLayout(false);
|
||||
this.tabPage9.PerformLayout();
|
||||
this.panel4.ResumeLayout(false);
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
@@ -662,7 +717,6 @@
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.Panel panel3;
|
||||
private System.Windows.Forms.ComboBox cmbdomainStrategy;
|
||||
private System.Windows.Forms.Label label15;
|
||||
private System.Windows.Forms.ComboBox cmbroutingMode;
|
||||
private System.Windows.Forms.CheckBox chksniffingEnabled;
|
||||
private System.Windows.Forms.CheckBox chksniffingEnabled2;
|
||||
@@ -673,5 +727,12 @@
|
||||
private System.Windows.Forms.Label label16;
|
||||
private System.Windows.Forms.ComboBox cmblistenerType;
|
||||
private System.Windows.Forms.TabPage tabPage8;
|
||||
private System.Windows.Forms.TabPage tabPage9;
|
||||
private System.Windows.Forms.TextBox txtuserPacRule;
|
||||
private System.Windows.Forms.Panel panel4;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.CheckBox chkKeepOlderDedupl;
|
||||
private System.Windows.Forms.LinkLabel linkLabelRoutingDoc;
|
||||
private System.Windows.Forms.CheckBox chkdefAllowInsecure;
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using v2rayN.Handler;
|
||||
using v2rayN.Base;
|
||||
using v2rayN.HttpProxyHandler;
|
||||
|
||||
namespace v2rayN.Forms
|
||||
{
|
||||
@@ -22,6 +23,8 @@ namespace v2rayN.Forms
|
||||
InitKCP();
|
||||
|
||||
InitGUI();
|
||||
|
||||
InitUserPAC();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -65,7 +68,9 @@ namespace v2rayN.Forms
|
||||
//remoteDNS
|
||||
txtremoteDNS.Text = config.remoteDNS;
|
||||
|
||||
cmblistenerType.SelectedIndex = config.listenerType;
|
||||
cmblistenerType.SelectedIndex = (int)config.listenerType;
|
||||
|
||||
chkdefAllowInsecure.Checked = config.defAllowInsecure;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -75,8 +80,7 @@ namespace v2rayN.Forms
|
||||
{
|
||||
//路由
|
||||
cmbdomainStrategy.Text = config.domainStrategy;
|
||||
int routingMode = 0;
|
||||
int.TryParse(config.routingMode, out routingMode);
|
||||
int.TryParse(config.routingMode, out int routingMode);
|
||||
cmbroutingMode.SelectedIndex = routingMode;
|
||||
|
||||
txtUseragent.Text = Utils.List2String(config.useragent, true);
|
||||
@@ -110,13 +114,13 @@ namespace v2rayN.Forms
|
||||
txturlGFWList.Text = config.urlGFWList;
|
||||
|
||||
chkAllowLANConn.Checked = config.allowLANConn;
|
||||
chkEnableStatistics.Checked = config.enableStatistics;
|
||||
chkKeepOlderDedupl.Checked = config.keepOlderDedupl;
|
||||
|
||||
|
||||
var enableStatistics = config.enableStatistics;
|
||||
chkEnableStatistics.Checked = enableStatistics;
|
||||
|
||||
|
||||
var cbSource = new ComboItem[]
|
||||
ComboItem[] cbSource = new ComboItem[]
|
||||
{
|
||||
new ComboItem{ID = (int)Global.StatisticsFreshRate.quick, Text = UIRes.I18N("QuickFresh")},
|
||||
new ComboItem{ID = (int)Global.StatisticsFreshRate.medium, Text = UIRes.I18N("MediumFresh")},
|
||||
@@ -142,6 +146,11 @@ namespace v2rayN.Forms
|
||||
|
||||
}
|
||||
|
||||
private void InitUserPAC()
|
||||
{
|
||||
txtuserPacRule.Text = Utils.List2String(config.userPacRule, true);
|
||||
}
|
||||
|
||||
private void btnOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (SaveBase() != 0)
|
||||
@@ -164,13 +173,18 @@ namespace v2rayN.Forms
|
||||
return;
|
||||
}
|
||||
|
||||
if (SaveUserPAC() != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (ConfigHandler.SaveConfig(ref config) == 0)
|
||||
{
|
||||
this.DialogResult = DialogResult.OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
UI.Show(UIRes.I18N("OperationFailed"));
|
||||
UI.ShowWarning(UIRes.I18N("OperationFailed"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,8 +264,11 @@ namespace v2rayN.Forms
|
||||
|
||||
//remoteDNS
|
||||
config.remoteDNS = txtremoteDNS.Text.TrimEx();
|
||||
|
||||
config.listenerType = cmblistenerType.SelectedIndex;
|
||||
|
||||
config.listenerType = (ListenerType)Enum.ToObject(typeof(ListenerType), cmblistenerType.SelectedIndex);
|
||||
|
||||
config.defAllowInsecure = chkdefAllowInsecure.Checked;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -328,9 +345,10 @@ namespace v2rayN.Forms
|
||||
|
||||
config.allowLANConn = chkAllowLANConn.Checked;
|
||||
|
||||
var lastEnableStatistics = config.enableStatistics;
|
||||
bool lastEnableStatistics = config.enableStatistics;
|
||||
config.enableStatistics = chkEnableStatistics.Checked;
|
||||
config.statisticsFreshRate = (int)cbFreshrate.SelectedValue;
|
||||
config.keepOlderDedupl = chkKeepOlderDedupl.Checked;
|
||||
|
||||
//if(lastEnableStatistics != config.enableStatistics)
|
||||
//{
|
||||
@@ -344,6 +362,15 @@ namespace v2rayN.Forms
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int SaveUserPAC()
|
||||
{
|
||||
string userPacRule = txtuserPacRule.Text.TrimEx();
|
||||
userPacRule = userPacRule.Replace("\"", "");
|
||||
|
||||
config.userPacRule = Utils.String2List(userPacRule);
|
||||
|
||||
return 0;
|
||||
}
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DialogResult = DialogResult.Cancel;
|
||||
@@ -368,25 +395,29 @@ namespace v2rayN.Forms
|
||||
txtUserblock.Text = Utils.GetEmbedText(Global.CustomRoutingFileName + Global.blockTag);
|
||||
cmbroutingMode.SelectedIndex = 3;
|
||||
|
||||
var lstUrl = new List<string>();
|
||||
lstUrl.Add(Global.CustomRoutingListUrl + Global.agentTag);
|
||||
lstUrl.Add(Global.CustomRoutingListUrl + Global.directTag);
|
||||
lstUrl.Add(Global.CustomRoutingListUrl + Global.blockTag);
|
||||
List<string> lstUrl = new List<string>
|
||||
{
|
||||
Global.CustomRoutingListUrl + Global.agentTag,
|
||||
Global.CustomRoutingListUrl + Global.directTag,
|
||||
Global.CustomRoutingListUrl + Global.blockTag
|
||||
};
|
||||
|
||||
var lstTxt = new List<TextBox>();
|
||||
lstTxt.Add(txtUseragent);
|
||||
lstTxt.Add(txtUserdirect);
|
||||
lstTxt.Add(txtUserblock);
|
||||
List<TextBox> lstTxt = new List<TextBox>
|
||||
{
|
||||
txtUseragent,
|
||||
txtUserdirect,
|
||||
txtUserblock
|
||||
};
|
||||
|
||||
for (int k = 0; k < lstUrl.Count; k++)
|
||||
{
|
||||
var txt = lstTxt[k];
|
||||
TextBox txt = lstTxt[k];
|
||||
DownloadHandle downloadHandle = new DownloadHandle();
|
||||
downloadHandle.UpdateCompleted += (sender2, args) =>
|
||||
{
|
||||
if (args.Success)
|
||||
{
|
||||
var result = args.Msg;
|
||||
string result = args.Msg;
|
||||
if (Utils.IsNullOrEmpty(result))
|
||||
{
|
||||
return;
|
||||
@@ -410,6 +441,11 @@ namespace v2rayN.Forms
|
||||
{
|
||||
labRoutingTips.Text = text;
|
||||
}
|
||||
|
||||
private void linkLabelRoutingDoc_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("https://www.v2fly.org/config/routing.html");
|
||||
}
|
||||
}
|
||||
|
||||
class ComboItem
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -124,6 +124,12 @@
|
||||
<value> Core:基础设置 </value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="chkdefAllowInsecure.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>222, 16</value>
|
||||
</data>
|
||||
<data name="chkdefAllowInsecure.Text" xml:space="preserve">
|
||||
<value>底层传输安全选tls时,默认跳过证书验证(allowInsecure)</value>
|
||||
</data>
|
||||
<data name="label16.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 12</value>
|
||||
</data>
|
||||
@@ -134,16 +140,22 @@
|
||||
<value>关闭Http代理</value>
|
||||
</data>
|
||||
<data name="cmblistenerType.Items1" xml:space="preserve">
|
||||
<value>开启Http代理,并自动配置代理服务器(全局模式)</value>
|
||||
<value>开启Http代理,并自动配置系统代理(全局模式)</value>
|
||||
</data>
|
||||
<data name="cmblistenerType.Items2" xml:space="preserve">
|
||||
<value>开启PAC,并自动配置PAC(PAC模式)</value>
|
||||
<value>开启PAC,并自动配置系统代理(PAC模式)</value>
|
||||
</data>
|
||||
<data name="cmblistenerType.Items3" xml:space="preserve">
|
||||
<value>仅开启Http代理,不自动配置代理服务器(直连模式)</value>
|
||||
<value>仅开启Http代理,并清除系统代理</value>
|
||||
</data>
|
||||
<data name="cmblistenerType.Items4" xml:space="preserve">
|
||||
<value>仅开启PAC,不自动配置PAC</value>
|
||||
<value>仅开启PAC,并清除系统代理</value>
|
||||
</data>
|
||||
<data name="cmblistenerType.Items5" xml:space="preserve">
|
||||
<value>仅开启Http代理,不改变系统代理</value>
|
||||
</data>
|
||||
<data name="cmblistenerType.Items6" xml:space="preserve">
|
||||
<value>仅开启PAC,不改变系统代理</value>
|
||||
</data>
|
||||
<data name="chksniffingEnabled2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>96, 16</value>
|
||||
@@ -277,6 +289,12 @@
|
||||
<data name="panel3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>642, 72</value>
|
||||
</data>
|
||||
<data name="linkLabelRoutingDoc.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>77, 12</value>
|
||||
</data>
|
||||
<data name="linkLabelRoutingDoc.Text" xml:space="preserve">
|
||||
<value>域名解析策略</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="btnSetDefRountingRule.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
@@ -303,41 +321,29 @@
|
||||
<data name="labRoutingTips.Text" xml:space="preserve">
|
||||
<value>*设置的规则,用逗号(,)隔开;支持Domain(纯字符串/正则/子域名)和IP</value>
|
||||
</data>
|
||||
<data name="cmbdomainStrategy.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>81, 14</value>
|
||||
</data>
|
||||
<data name="cmbdomainStrategy.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>186, 20</value>
|
||||
</data>
|
||||
<data name="label15.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 12</value>
|
||||
</data>
|
||||
<data name="label15.Text" xml:space="preserve">
|
||||
<value>域名策略</value>
|
||||
</data>
|
||||
<data name="tabPage6.Text" xml:space="preserve">
|
||||
<value> Core:KCP设置 </value>
|
||||
</data>
|
||||
<data name="tabPage7.Text" xml:space="preserve">
|
||||
<value> v2rayN设置 </value>
|
||||
</data>
|
||||
<data name="chkKeepOlderDedupl.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>156, 16</value>
|
||||
</data>
|
||||
<data name="chkKeepOlderDedupl.Text" xml:space="preserve">
|
||||
<value>去重时保留序号较小的项</value>
|
||||
</data>
|
||||
<data name="lbFreshrate.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>77, 12</value>
|
||||
</data>
|
||||
<data name="lbFreshrate.Text" xml:space="preserve">
|
||||
<value>统计刷新频率</value>
|
||||
</data>
|
||||
<data name="lbCacheDays.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>305, 12</value>
|
||||
</data>
|
||||
<data name="lbCacheDays.Text" xml:space="preserve">
|
||||
<value>缓存天数(0-30, 0关闭缓存单独每天的数据使用情况)</value>
|
||||
</data>
|
||||
<data name="chkEnableStatistics.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>384, 16</value>
|
||||
<value>372, 16</value>
|
||||
</data>
|
||||
<data name="chkEnableStatistics.Text" xml:space="preserve">
|
||||
<value>启用统计(实时网速显示和使用流量显示,需要重启v2rayN客户端)</value>
|
||||
<value>启用统计(实时网速显示和使用流量显示,需要重启v2rayN客户端)</value>
|
||||
</data>
|
||||
<data name="chkAllowLANConn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>144, 16</value>
|
||||
@@ -357,6 +363,12 @@
|
||||
<data name="chkAutoRun.Text" xml:space="preserve">
|
||||
<value>开机自动启动(可能会不成功)</value>
|
||||
</data>
|
||||
<data name="tabPage9.Text" xml:space="preserve">
|
||||
<value> 用户PAC设置 </value>
|
||||
</data>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>*设置用户PAC规则,用逗号(,)隔开</value>
|
||||
</data>
|
||||
<data name="btnOK.Text" xml:space="preserve">
|
||||
<value>确定(&O)</value>
|
||||
</data>
|
||||
|
||||
10
v2rayN/v2rayN/Forms/QRCodeControl.Designer.cs
generated
10
v2rayN/v2rayN/Forms/QRCodeControl.Designer.cs
generated
@@ -31,7 +31,6 @@
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(QRCodeControl));
|
||||
this.txtUrl = new System.Windows.Forms.TextBox();
|
||||
this.picQRCode = new System.Windows.Forms.PictureBox();
|
||||
this.chkShow = new System.Windows.Forms.CheckBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picQRCode)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@@ -47,20 +46,12 @@
|
||||
this.picQRCode.Name = "picQRCode";
|
||||
this.picQRCode.TabStop = false;
|
||||
//
|
||||
// chkShow
|
||||
//
|
||||
resources.ApplyResources(this.chkShow, "chkShow");
|
||||
this.chkShow.Name = "chkShow";
|
||||
this.chkShow.UseVisualStyleBackColor = true;
|
||||
this.chkShow.CheckedChanged += new System.EventHandler(this.chkShow_CheckedChanged);
|
||||
//
|
||||
// QRCodeControl
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.picQRCode);
|
||||
this.Controls.Add(this.txtUrl);
|
||||
this.Controls.Add(this.chkShow);
|
||||
this.Name = "QRCodeControl";
|
||||
this.Load += new System.EventHandler(this.QRCodeControl_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.picQRCode)).EndInit();
|
||||
@@ -73,6 +64,5 @@
|
||||
|
||||
private System.Windows.Forms.TextBox txtUrl;
|
||||
private System.Windows.Forms.PictureBox picQRCode;
|
||||
private System.Windows.Forms.CheckBox chkShow;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ namespace v2rayN.Forms
|
||||
}
|
||||
private void QRCodeControl_Load(object sender, System.EventArgs e)
|
||||
{
|
||||
chkShow_CheckedChanged(null, null);
|
||||
txtUrl.MouseUp += txtUrl_MouseUp;
|
||||
}
|
||||
|
||||
@@ -32,16 +31,9 @@ namespace v2rayN.Forms
|
||||
txtUrl.Text = string.Empty;
|
||||
return;
|
||||
}
|
||||
picQRCode.Image = QRCodeHelper.GetQRCode(url);
|
||||
txtUrl.Text = url;
|
||||
picQRCode.Image = QRCodeHelper.GetQRCode(url);
|
||||
}
|
||||
}
|
||||
|
||||
private void chkShow_CheckedChanged(object sender, System.EventArgs e)
|
||||
{
|
||||
picQRCode.Visible =
|
||||
txtUrl.Visible = chkShow.Checked;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,106 +117,76 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name=">>picQRCode.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>356, 441</value>
|
||||
</data>
|
||||
<data name="chkShow.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="txtUrl.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="chkShow.Text" xml:space="preserve">
|
||||
<value>Show shared content</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="chkShow.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>356, 16</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>QRCodeControl</value>
|
||||
</data>
|
||||
<data name="picQRCode.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>356, 355</value>
|
||||
</data>
|
||||
<data name="txtUrl.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 371</value>
|
||||
</data>
|
||||
<data name=">>chkShow.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>picQRCode.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="txtUrl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Bottom</value>
|
||||
</data>
|
||||
<data name="picQRCode.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>24</value>
|
||||
</data>
|
||||
<data name="chkShow.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Top</value>
|
||||
</data>
|
||||
<data name="picQRCode.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="txtUrl.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 371</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="txtUrl.Multiline" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="picQRCode.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
|
||||
<value>Zoom</value>
|
||||
</data>
|
||||
<data name=">>txtUrl.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtUrl.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>chkShow.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="picQRCode.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 16</value>
|
||||
</data>
|
||||
<data name=">>txtUrl.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>chkShow.Name" xml:space="preserve">
|
||||
<value>chkShow</value>
|
||||
</data>
|
||||
<data name=">>picQRCode.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>txtUrl.Name" xml:space="preserve">
|
||||
<value>txtUrl</value>
|
||||
</data>
|
||||
<data name=">>chkShow.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>picQRCode.Name" xml:space="preserve">
|
||||
<value>picQRCode</value>
|
||||
</data>
|
||||
<data name="txtUrl.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>356, 70</value>
|
||||
</data>
|
||||
<data name="chkShow.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>25</value>
|
||||
<data name="txtUrl.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 12</value>
|
||||
<data name=">>txtUrl.Name" xml:space="preserve">
|
||||
<value>txtUrl</value>
|
||||
</data>
|
||||
<data name="chkShow.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
<data name=">>txtUrl.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtUrl.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>txtUrl.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="picQRCode.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="picQRCode.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="picQRCode.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>356, 371</value>
|
||||
</data>
|
||||
<data name="picQRCode.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
|
||||
<value>Zoom</value>
|
||||
</data>
|
||||
<data name="picQRCode.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>24</value>
|
||||
</data>
|
||||
<data name=">>picQRCode.Name" xml:space="preserve">
|
||||
<value>picQRCode</value>
|
||||
</data>
|
||||
<data name=">>picQRCode.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>picQRCode.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>picQRCode.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 12</value>
|
||||
</data>
|
||||
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>356, 441</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>QRCodeControl</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -117,7 +117,4 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="chkShow.Text" xml:space="preserve">
|
||||
<value>显示分享内容</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -54,10 +54,7 @@ namespace v2rayN.Forms
|
||||
subItem.url = string.Empty;
|
||||
}
|
||||
|
||||
if (OnButtonClicked != null)
|
||||
{
|
||||
OnButtonClicked(sender, e);
|
||||
}
|
||||
OnButtonClicked?.Invoke(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,213 +118,123 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="label2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name=">>txtUrl.Parent" xml:space="preserve">
|
||||
<value>groupBox2</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="chkEnabled.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>60, 16</value>
|
||||
</data>
|
||||
<data name=">>txtUrl.Name" xml:space="preserve">
|
||||
<value>txtUrl</value>
|
||||
</data>
|
||||
<data name="btnRemove.Text" xml:space="preserve">
|
||||
<value>&Remove</value>
|
||||
</data>
|
||||
<data name="btnRemove.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>484, 21</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="btnRemove.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>24</value>
|
||||
</data>
|
||||
<data name="txtUrl.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>432, 46</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>SubSettingControl</value>
|
||||
</data>
|
||||
<data name=">>txtRemarks.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="txtUrl.Multiline" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>txtRemarks.Parent" xml:space="preserve">
|
||||
<value>groupBox2</value>
|
||||
</data>
|
||||
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>83, 12</value>
|
||||
</data>
|
||||
<data name=">>groupBox2.Name" xml:space="preserve">
|
||||
<value>groupBox2</value>
|
||||
</data>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 12</value>
|
||||
</data>
|
||||
<data name=">>label3.Name" xml:space="preserve">
|
||||
<value>label3</value>
|
||||
<data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib">
|
||||
<value>zh-Hans</value>
|
||||
</data>
|
||||
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 21</value>
|
||||
</data>
|
||||
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<data name="$this.Localizable" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>chkEnabled.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 55</value>
|
||||
</data>
|
||||
<data name="txtUrl.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 55</value>
|
||||
</data>
|
||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="groupBox2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Bottom</value>
|
||||
</data>
|
||||
<data name=">>label2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtUrl.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>chkEnabled.Parent" xml:space="preserve">
|
||||
<value>groupBox2</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>47, 12</value>
|
||||
</data>
|
||||
<data name="groupBox2.Text" xml:space="preserve">
|
||||
<value>Subscription details</value>
|
||||
</data>
|
||||
<data name="groupBox2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 9</value>
|
||||
</data>
|
||||
<data name="chkEnabled.Text" xml:space="preserve">
|
||||
<value>Enable</value>
|
||||
</data>
|
||||
<data name=">>chkEnabled.Name" xml:space="preserve">
|
||||
<value>chkEnabled</value>
|
||||
</data>
|
||||
<data name=">>txtRemarks.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="btnRemove.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>Address (url)</value>
|
||||
</data>
|
||||
<data name="chkEnabled.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>25</value>
|
||||
</data>
|
||||
<data name="txtUrl.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>23</value>
|
||||
</data>
|
||||
<data name=">>label2.Parent" xml:space="preserve">
|
||||
<value>groupBox2</value>
|
||||
</data>
|
||||
<data name=">>btnRemove.Parent" xml:space="preserve">
|
||||
<value>groupBox2</value>
|
||||
</data>
|
||||
<data name="chkEnabled.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>406, 23</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="chkEnabled.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>btnRemove.Name" xml:space="preserve">
|
||||
<value>btnRemove</value>
|
||||
</data>
|
||||
<data name="label3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name=">>label2.Name" xml:space="preserve">
|
||||
<value>label2</value>
|
||||
</data>
|
||||
<data name=">>groupBox2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>584, 110</value>
|
||||
</data>
|
||||
<data name="chkEnabled.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>584, 119</value>
|
||||
</data>
|
||||
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
<data name="btnRemove.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>Remarks</value>
|
||||
</data>
|
||||
<data name="label3.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 25</value>
|
||||
<data name="btnRemove.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>484, 21</value>
|
||||
</data>
|
||||
<data name="btnRemove.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<data name=">>label3.Parent" xml:space="preserve">
|
||||
<value>groupBox2</value>
|
||||
<data name="btnRemove.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>24</value>
|
||||
</data>
|
||||
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>265, 21</value>
|
||||
<data name="btnRemove.Text" xml:space="preserve">
|
||||
<value>&Remove</value>
|
||||
</data>
|
||||
<data name="chkEnabled.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="chkEnabled.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="chkEnabled.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>406, 23</value>
|
||||
</data>
|
||||
<data name="chkEnabled.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>60, 16</value>
|
||||
</data>
|
||||
<data name="chkEnabled.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>25</value>
|
||||
</data>
|
||||
<data name="chkEnabled.Text" xml:space="preserve">
|
||||
<value>Enable</value>
|
||||
</data>
|
||||
<data name="groupBox2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Bottom</value>
|
||||
</data>
|
||||
<data name="groupBox2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 9</value>
|
||||
</data>
|
||||
<data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>584, 110</value>
|
||||
</data>
|
||||
<data name="groupBox2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name=">>txtUrl.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="groupBox2.Text" xml:space="preserve">
|
||||
<value>Subscription details</value>
|
||||
</data>
|
||||
<data name=">>btnRemove.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>groupBox2.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
<data name="label2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name=">>btnRemove.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 25</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>47, 12</value>
|
||||
</data>
|
||||
<data name=">>groupBox2.ZOrder" xml:space="preserve">
|
||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>Remarks</value>
|
||||
</data>
|
||||
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 55</value>
|
||||
</data>
|
||||
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>83, 12</value>
|
||||
</data>
|
||||
<data name="label3.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>txtRemarks.Name" xml:space="preserve">
|
||||
<value>txtRemarks</value>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>Address (url)</value>
|
||||
</data>
|
||||
<data name=">>label3.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 21</value>
|
||||
</data>
|
||||
<data name=">>chkEnabled.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>265, 21</value>
|
||||
</data>
|
||||
<data name=">>label3.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<data name="txtUrl.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>127, 55</value>
|
||||
</data>
|
||||
<data name="txtUrl.Multiline" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>zh-Hans</value>
|
||||
</metadata>
|
||||
</data>
|
||||
<data name="txtUrl.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>432, 46</value>
|
||||
</data>
|
||||
<data name="txtUrl.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>23</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -118,14 +118,17 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="btnRemove.Text" xml:space="preserve">
|
||||
<value>移除</value>
|
||||
</data>
|
||||
<data name="chkEnabled.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>48, 16</value>
|
||||
</data>
|
||||
<data name="chkEnabled.Text" xml:space="preserve">
|
||||
<value>启用</value>
|
||||
</data>
|
||||
<data name="btnRemove.Text" xml:space="preserve">
|
||||
<value>移除</value>
|
||||
<data name="groupBox2.Text" xml:space="preserve">
|
||||
<value>订阅详情</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>29, 12</value>
|
||||
@@ -139,7 +142,4 @@
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>地址 (url)</value>
|
||||
</data>
|
||||
<data name="groupBox2.Text" xml:space="preserve">
|
||||
<value>订阅详情</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -35,7 +35,7 @@ namespace v2rayN.Forms
|
||||
|
||||
for (int k = config.subItem.Count - 1; k >= 0; k--)
|
||||
{
|
||||
var item = config.subItem[k];
|
||||
SubItem item = config.subItem[k];
|
||||
if (Utils.IsNullOrEmpty(item.remarks)
|
||||
&& Utils.IsNullOrEmpty(item.url))
|
||||
{
|
||||
@@ -47,9 +47,8 @@ namespace v2rayN.Forms
|
||||
}
|
||||
}
|
||||
|
||||
for (int k = 0; k < config.subItem.Count; k++)
|
||||
foreach (SubItem item in config.subItem)
|
||||
{
|
||||
var item = config.subItem[k];
|
||||
SubSettingControl control = new SubSettingControl();
|
||||
control.OnButtonClicked += Control_OnButtonClicked;
|
||||
control.subItem = item;
|
||||
@@ -80,7 +79,7 @@ namespace v2rayN.Forms
|
||||
}
|
||||
else
|
||||
{
|
||||
UI.Show(UIRes.I18N("OperationFailed"));
|
||||
UI.ShowWarning(UIRes.I18N("OperationFailed"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,10 +98,12 @@ namespace v2rayN.Forms
|
||||
|
||||
private void AddSub()
|
||||
{
|
||||
var subItem = new SubItem();
|
||||
subItem.id = string.Empty;
|
||||
subItem.remarks = "remarks";
|
||||
subItem.url = "url";
|
||||
SubItem subItem = new SubItem
|
||||
{
|
||||
id = string.Empty,
|
||||
remarks = "remarks",
|
||||
url = "url"
|
||||
};
|
||||
config.subItem.Add(subItem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,61 +118,19 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="btnClose.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>448, 17</value>
|
||||
</data>
|
||||
<data name="btnClose.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="btnClose.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 12</value>
|
||||
</data>
|
||||
<data name="btnClose.Text" xml:space="preserve">
|
||||
<value>&Cancel</value>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>581, 629</value>
|
||||
</data>
|
||||
<data name=">>btnClose.Name" xml:space="preserve">
|
||||
<value>btnClose</value>
|
||||
</data>
|
||||
<data name=">>btnClose.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>btnClose.Parent" xml:space="preserve">
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>btnClose.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="panCon.AutoScroll" type="System.Boolean, mscorlib">
|
||||
<data name="$this.Localizable" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="panCon.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="panCon.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="panCon.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>581, 569</value>
|
||||
</data>
|
||||
<data name="panCon.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name=">>panCon.Name" xml:space="preserve">
|
||||
<value>panCon</value>
|
||||
</data>
|
||||
<data name=">>panCon.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>panCon.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>panCon.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Subscription settings</value>
|
||||
</data>
|
||||
<data name="btnAdd.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
@@ -189,17 +147,20 @@
|
||||
<data name="btnAdd.Text" xml:space="preserve">
|
||||
<value>&Add</value>
|
||||
</data>
|
||||
<data name=">>btnAdd.Name" xml:space="preserve">
|
||||
<value>btnAdd</value>
|
||||
<data name="btnClose.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name=">>btnAdd.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>448, 17</value>
|
||||
</data>
|
||||
<data name=">>btnAdd.Parent" xml:space="preserve">
|
||||
<value>panel2</value>
|
||||
<data name="btnClose.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<data name=">>btnAdd.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
<data name="btnClose.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="btnClose.Text" xml:space="preserve">
|
||||
<value>&Cancel</value>
|
||||
</data>
|
||||
<data name="btnOK.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
@@ -216,17 +177,20 @@
|
||||
<data name="btnOK.Text" xml:space="preserve">
|
||||
<value>&OK</value>
|
||||
</data>
|
||||
<data name=">>btnOK.Name" xml:space="preserve">
|
||||
<value>btnOK</value>
|
||||
<data name="panCon.AutoScroll" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>btnOK.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="panCon.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name=">>btnOK.Parent" xml:space="preserve">
|
||||
<value>panel2</value>
|
||||
<data name="panCon.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name=">>btnOK.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<data name="panCon.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>581, 569</value>
|
||||
</data>
|
||||
<data name="panCon.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Bottom</value>
|
||||
@@ -240,34 +204,4 @@
|
||||
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name=">>panel2.Name" xml:space="preserve">
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panel2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>panel2.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>panel2.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 12</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>581, 629</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Subscription settings</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>SubSettingForm</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -117,12 +117,15 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnClose.Text" xml:space="preserve">
|
||||
<value>取消(&C)</value>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>订阅设置</value>
|
||||
</data>
|
||||
<data name="btnAdd.Text" xml:space="preserve">
|
||||
<value>添加(&A)</value>
|
||||
</data>
|
||||
<data name="btnClose.Text" xml:space="preserve">
|
||||
<value>取消(&C)</value>
|
||||
</data>
|
||||
<data name="btnOK.Text" xml:space="preserve">
|
||||
<value>确定(&O)</value>
|
||||
</data>
|
||||
@@ -143,7 +146,4 @@
|
||||
ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAMAAAADAAAACw==
|
||||
</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>订阅设置</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -6,6 +6,7 @@ namespace v2rayN
|
||||
#region 常量
|
||||
|
||||
|
||||
public const string v2rayWebsiteUrl = @"https://www.v2fly.org/";
|
||||
public const string AboutUrl = @"https://github.com/2dust/v2rayN";
|
||||
public const string UpdateUrl = AboutUrl + @"/releases";
|
||||
|
||||
@@ -15,6 +16,7 @@ namespace v2rayN
|
||||
/// </summary>
|
||||
public const string SpeedTestUrl = @"http://speedtest-sgp1.digitalocean.com/10mb.test";
|
||||
public const string SpeedPingTestUrl = @"https://www.google.com/generate_204";
|
||||
public const string AvailabilityTestUrl = @"https://www.google.com/generate_204";
|
||||
|
||||
/// <summary>
|
||||
/// CustomRoutingListUrl
|
||||
@@ -26,7 +28,7 @@ namespace v2rayN
|
||||
/// <summary>
|
||||
/// PromotionUrl
|
||||
/// </summary>
|
||||
public const string PromotionUrl = @"aHR0cHM6Ly8xLjIzNDQ1Ni54eXovYWRzLmh0bWw=";
|
||||
public const string PromotionUrl = @"aHR0cHM6Ly85LjIzNDQ1Ni54eXovYWJjLmh0bWw=";
|
||||
|
||||
/// <summary>
|
||||
/// 本软件配置文件名
|
||||
@@ -162,6 +164,8 @@ namespace v2rayN
|
||||
}
|
||||
public const string StatisticLogOverall = "StatisticLogOverall.json";
|
||||
|
||||
public const string IEProxyExceptions = "localhost;127.*;10.*;172.16.*;172.17.*;172.18.*;172.19.*;172.20.*;172.21.*;172.22.*;172.23.*;172.24.*;172.25.*;172.26.*;172.27.*;172.28.*;172.29.*;172.30.*;172.31.*;192.168.*";
|
||||
|
||||
#endregion
|
||||
|
||||
#region 全局变量
|
||||
@@ -214,6 +218,15 @@ namespace v2rayN
|
||||
get; set;
|
||||
}
|
||||
|
||||
public static Job processJob
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
public static System.Threading.Mutex mutexObj
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ using System.IO;
|
||||
using System.Net;
|
||||
using v2rayN.Mode;
|
||||
using v2rayN.Base;
|
||||
using System.Linq;
|
||||
using v2rayN.Tool;
|
||||
|
||||
namespace v2rayN.Handler
|
||||
{
|
||||
@@ -30,34 +32,38 @@ namespace v2rayN.Handler
|
||||
}
|
||||
if (config == null)
|
||||
{
|
||||
config = new Config();
|
||||
config.index = -1;
|
||||
config.logEnabled = false;
|
||||
config.loglevel = "warning";
|
||||
config.vmess = new List<VmessItem>();
|
||||
config = new Config
|
||||
{
|
||||
index = -1,
|
||||
logEnabled = false,
|
||||
loglevel = "warning",
|
||||
vmess = new List<VmessItem>(),
|
||||
|
||||
//Mux
|
||||
config.muxEnabled = true;
|
||||
//Mux
|
||||
muxEnabled = true,
|
||||
|
||||
////默认监听端口
|
||||
//config.pacPort = 8888;
|
||||
|
||||
// 默认不开启统计
|
||||
config.enableStatistics = false;
|
||||
////默认监听端口
|
||||
//config.pacPort = 8888;
|
||||
|
||||
// 默认中等刷新率
|
||||
config.statisticsFreshRate = (int)Global.StatisticsFreshRate.medium;
|
||||
// 默认不开启统计
|
||||
enableStatistics = false,
|
||||
|
||||
// 默认中等刷新率
|
||||
statisticsFreshRate = (int)Global.StatisticsFreshRate.medium
|
||||
};
|
||||
}
|
||||
|
||||
//本地监听
|
||||
if (config.inbound == null)
|
||||
{
|
||||
config.inbound = new List<InItem>();
|
||||
InItem inItem = new InItem();
|
||||
inItem.protocol = Global.InboundSocks;
|
||||
inItem.localPort = 10808;
|
||||
inItem.udpEnabled = true;
|
||||
inItem.sniffingEnabled = true;
|
||||
InItem inItem = new InItem
|
||||
{
|
||||
protocol = Global.InboundSocks,
|
||||
localPort = 10808,
|
||||
udpEnabled = true,
|
||||
sniffingEnabled = true
|
||||
};
|
||||
|
||||
config.inbound.Add(inItem);
|
||||
|
||||
@@ -100,24 +106,39 @@ namespace v2rayN.Handler
|
||||
//kcp
|
||||
if (config.kcpItem == null)
|
||||
{
|
||||
config.kcpItem = new KcpItem();
|
||||
config.kcpItem.mtu = 1350;
|
||||
config.kcpItem.tti = 50;
|
||||
config.kcpItem.uplinkCapacity = 12;
|
||||
config.kcpItem.downlinkCapacity = 100;
|
||||
config.kcpItem.readBufferSize = 2;
|
||||
config.kcpItem.writeBufferSize = 2;
|
||||
config.kcpItem.congestion = false;
|
||||
config.kcpItem = new KcpItem
|
||||
{
|
||||
mtu = 1350,
|
||||
tti = 50,
|
||||
uplinkCapacity = 12,
|
||||
downlinkCapacity = 100,
|
||||
readBufferSize = 2,
|
||||
writeBufferSize = 2,
|
||||
congestion = false
|
||||
};
|
||||
}
|
||||
if (config.uiItem == null)
|
||||
{
|
||||
config.uiItem = new UIItem();
|
||||
}
|
||||
if (config.uiItem.mainLvColWidth == null)
|
||||
{
|
||||
config.uiItem.mainLvColWidth = new Dictionary<string, int>();
|
||||
}
|
||||
|
||||
//// 如果是用户升级,首次会有端口号为0的情况,不可用,这里处理
|
||||
//if (config.pacPort == 0)
|
||||
//{
|
||||
// config.pacPort = 8888;
|
||||
//}
|
||||
if (Utils.IsNullOrEmpty(config.speedTestUrl))
|
||||
{
|
||||
config.speedTestUrl = Global.SpeedTestUrl;
|
||||
}
|
||||
if (Utils.IsNullOrEmpty(config.speedPingTestUrl))
|
||||
{
|
||||
config.speedPingTestUrl = Global.SpeedPingTestUrl;
|
||||
}
|
||||
if (Utils.IsNullOrEmpty(config.urlGFWList))
|
||||
{
|
||||
config.urlGFWList = Global.GFWLIST_URL;
|
||||
@@ -131,6 +152,10 @@ namespace v2rayN.Handler
|
||||
{
|
||||
config.subItem = new List<SubItem>();
|
||||
}
|
||||
if (config.userPacRule == null)
|
||||
{
|
||||
config.userPacRule = new List<string>();
|
||||
}
|
||||
|
||||
if (config == null
|
||||
|| config.index < 0
|
||||
@@ -188,6 +213,10 @@ namespace v2rayN.Handler
|
||||
else
|
||||
{
|
||||
//添加
|
||||
if (Utils.IsNullOrEmpty(vmessItem.allowInsecure))
|
||||
{
|
||||
vmessItem.allowInsecure = config.defAllowInsecure.ToString();
|
||||
}
|
||||
config.vmess.Add(vmessItem);
|
||||
if (config.vmess.Count == 1)
|
||||
{
|
||||
@@ -243,7 +272,7 @@ namespace v2rayN.Handler
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 复制服务器
|
||||
/// 克隆服务器
|
||||
/// </summary>
|
||||
/// <param name="config"></param>
|
||||
/// <param name="index"></param>
|
||||
@@ -255,22 +284,25 @@ namespace v2rayN.Handler
|
||||
return -1;
|
||||
}
|
||||
|
||||
VmessItem vmessItem = new VmessItem();
|
||||
vmessItem.configVersion = config.vmess[index].configVersion;
|
||||
vmessItem.configType = config.vmess[index].configType;
|
||||
vmessItem.address = config.vmess[index].address;
|
||||
vmessItem.port = config.vmess[index].port;
|
||||
vmessItem.id = config.vmess[index].id;
|
||||
vmessItem.alterId = config.vmess[index].alterId;
|
||||
vmessItem.security = config.vmess[index].security;
|
||||
vmessItem.network = config.vmess[index].network;
|
||||
vmessItem.headerType = config.vmess[index].headerType;
|
||||
vmessItem.requestHost = config.vmess[index].requestHost;
|
||||
vmessItem.path = config.vmess[index].path;
|
||||
vmessItem.streamSecurity = config.vmess[index].streamSecurity;
|
||||
vmessItem.remarks = string.Format("{0}-clone", config.vmess[index].remarks);
|
||||
VmessItem vmessItem = new VmessItem
|
||||
{
|
||||
configVersion = config.vmess[index].configVersion,
|
||||
address = config.vmess[index].address,
|
||||
port = config.vmess[index].port,
|
||||
id = config.vmess[index].id,
|
||||
alterId = config.vmess[index].alterId,
|
||||
security = config.vmess[index].security,
|
||||
network = config.vmess[index].network,
|
||||
remarks = string.Format("{0}-clone", config.vmess[index].remarks),
|
||||
headerType = config.vmess[index].headerType,
|
||||
requestHost = config.vmess[index].requestHost,
|
||||
path = config.vmess[index].path,
|
||||
streamSecurity = config.vmess[index].streamSecurity,
|
||||
allowInsecure = config.vmess[index].allowInsecure,
|
||||
configType = config.vmess[index].configType
|
||||
};
|
||||
|
||||
config.vmess.Add(vmessItem);
|
||||
config.vmess.Insert(index + 1, vmessItem); // 插入到下一项
|
||||
|
||||
ToJsonFile(config);
|
||||
|
||||
@@ -341,18 +373,20 @@ namespace v2rayN.Handler
|
||||
VmessItem vmessItem = config.vmess[index];
|
||||
if (vmessItem.configType == (int)EConfigType.Vmess)
|
||||
{
|
||||
VmessQRCode vmessQRCode = new VmessQRCode();
|
||||
vmessQRCode.v = vmessItem.configVersion.ToString();
|
||||
vmessQRCode.ps = vmessItem.remarks.TrimEx(); //备注也许很长 ;
|
||||
vmessQRCode.add = vmessItem.address;
|
||||
vmessQRCode.port = vmessItem.port.ToString();
|
||||
vmessQRCode.id = vmessItem.id;
|
||||
vmessQRCode.aid = vmessItem.alterId.ToString();
|
||||
vmessQRCode.net = vmessItem.network;
|
||||
vmessQRCode.type = vmessItem.headerType;
|
||||
vmessQRCode.host = vmessItem.requestHost;
|
||||
vmessQRCode.path = vmessItem.path;
|
||||
vmessQRCode.tls = vmessItem.streamSecurity;
|
||||
VmessQRCode vmessQRCode = new VmessQRCode
|
||||
{
|
||||
v = vmessItem.configVersion.ToString(),
|
||||
ps = vmessItem.remarks.TrimEx(), //备注也许很长 ;
|
||||
add = vmessItem.address,
|
||||
port = vmessItem.port.ToString(),
|
||||
id = vmessItem.id,
|
||||
aid = vmessItem.alterId.ToString(),
|
||||
net = vmessItem.network,
|
||||
type = vmessItem.headerType,
|
||||
host = vmessItem.requestHost,
|
||||
path = vmessItem.path,
|
||||
tls = vmessItem.streamSecurity
|
||||
};
|
||||
|
||||
url = Utils.ToJson(vmessQRCode);
|
||||
url = Utils.Base64Encode(url);
|
||||
@@ -361,7 +395,7 @@ namespace v2rayN.Handler
|
||||
}
|
||||
else if (vmessItem.configType == (int)EConfigType.Shadowsocks)
|
||||
{
|
||||
var remark = string.Empty;
|
||||
string remark = string.Empty;
|
||||
if (!Utils.IsNullOrEmpty(vmessItem.remarks))
|
||||
{
|
||||
remark = "#" + WebUtility.UrlEncode(vmessItem.remarks);
|
||||
@@ -376,7 +410,7 @@ namespace v2rayN.Handler
|
||||
}
|
||||
else if (vmessItem.configType == (int)EConfigType.Socks)
|
||||
{
|
||||
var remark = string.Empty;
|
||||
string remark = string.Empty;
|
||||
if (!Utils.IsNullOrEmpty(vmessItem.remarks))
|
||||
{
|
||||
remark = "#" + WebUtility.UrlEncode(vmessItem.remarks);
|
||||
@@ -422,7 +456,7 @@ namespace v2rayN.Handler
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
VmessItem vmess = Utils.DeepCopy<VmessItem>(config.vmess[index]);
|
||||
VmessItem vmess = Utils.DeepCopy(config.vmess[index]);
|
||||
config.vmess.RemoveAt(index);
|
||||
config.vmess.Insert(0, vmess);
|
||||
if (index < config.index)
|
||||
@@ -445,7 +479,7 @@ namespace v2rayN.Handler
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
VmessItem vmess = Utils.DeepCopy<VmessItem>(config.vmess[index]);
|
||||
VmessItem vmess = Utils.DeepCopy(config.vmess[index]);
|
||||
config.vmess.RemoveAt(index);
|
||||
config.vmess.Insert(index - 1, vmess);
|
||||
if (index == config.index + 1)
|
||||
@@ -465,7 +499,7 @@ namespace v2rayN.Handler
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
VmessItem vmess = Utils.DeepCopy<VmessItem>(config.vmess[index]);
|
||||
VmessItem vmess = Utils.DeepCopy(config.vmess[index]);
|
||||
config.vmess.RemoveAt(index);
|
||||
config.vmess.Insert(index + 1, vmess);
|
||||
if (index == config.index - 1)
|
||||
@@ -484,7 +518,7 @@ namespace v2rayN.Handler
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
VmessItem vmess = Utils.DeepCopy<VmessItem>(config.vmess[index]);
|
||||
VmessItem vmess = Utils.DeepCopy(config.vmess[index]);
|
||||
config.vmess.RemoveAt(index);
|
||||
config.vmess.Add(vmess);
|
||||
if (index < config.index)
|
||||
@@ -518,8 +552,7 @@ namespace v2rayN.Handler
|
||||
/// <returns></returns>
|
||||
public static int AddCustomServer(ref Config config, string fileName)
|
||||
{
|
||||
string newFileName = string.Empty;
|
||||
newFileName = string.Format("{0}.json", Utils.GetGUID());
|
||||
string newFileName = string.Format("{0}.json", Utils.GetGUID());
|
||||
//newFileName = Path.Combine(Utils.GetTempPath(), newFileName);
|
||||
|
||||
try
|
||||
@@ -531,10 +564,12 @@ namespace v2rayN.Handler
|
||||
return -1;
|
||||
}
|
||||
|
||||
VmessItem vmessItem = new VmessItem();
|
||||
vmessItem.address = newFileName;
|
||||
vmessItem.configType = (int)EConfigType.Custom;
|
||||
vmessItem.remarks = string.Format("import custom@{0}", DateTime.Now.ToShortDateString());
|
||||
VmessItem vmessItem = new VmessItem
|
||||
{
|
||||
address = newFileName,
|
||||
configType = (int)EConfigType.Custom,
|
||||
remarks = string.Format("import custom@{0}", DateTime.Now.ToShortDateString())
|
||||
};
|
||||
|
||||
config.vmess.Add(vmessItem);
|
||||
if (config.vmess.Count == 1)
|
||||
@@ -720,7 +755,7 @@ namespace v2rayN.Handler
|
||||
/// <param name="config"></param>
|
||||
/// <param name="clipboardData"></param>
|
||||
/// <param name="subid"></param>
|
||||
/// <returns></returns>
|
||||
/// <returns>成功导入的数量</returns>
|
||||
public static int AddBatchServers(ref Config config, string clipboardData, string subid = "")
|
||||
{
|
||||
if (Utils.IsNullOrEmpty(clipboardData))
|
||||
@@ -737,7 +772,6 @@ namespace v2rayN.Handler
|
||||
string[] arrData = clipboardData.Split(Environment.NewLine.ToCharArray());
|
||||
foreach (string str in arrData)
|
||||
{
|
||||
string msg;
|
||||
//maybe sub
|
||||
if (str.StartsWith(Global.httpsProtocol) || str.StartsWith(Global.httpProtocol))
|
||||
{
|
||||
@@ -747,7 +781,7 @@ namespace v2rayN.Handler
|
||||
}
|
||||
continue;
|
||||
}
|
||||
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(str, out msg);
|
||||
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(str, out string msg);
|
||||
if (vmessItem == null)
|
||||
{
|
||||
continue;
|
||||
@@ -775,11 +809,7 @@ namespace v2rayN.Handler
|
||||
}
|
||||
}
|
||||
}
|
||||
if (countServers > 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
return countServers;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -791,7 +821,7 @@ namespace v2rayN.Handler
|
||||
public static int AddSubItem(ref Config config, string url)
|
||||
{
|
||||
//already exists
|
||||
foreach (var sub in config.subItem)
|
||||
foreach (SubItem sub in config.subItem)
|
||||
{
|
||||
if (url == sub.url)
|
||||
{
|
||||
@@ -799,10 +829,12 @@ namespace v2rayN.Handler
|
||||
}
|
||||
}
|
||||
|
||||
var subItem = new SubItem();
|
||||
subItem.id = string.Empty;
|
||||
subItem.remarks = "import sub";
|
||||
subItem.url = url;
|
||||
SubItem subItem = new SubItem
|
||||
{
|
||||
id = string.Empty,
|
||||
remarks = "import sub",
|
||||
url = url
|
||||
};
|
||||
config.subItem.Add(subItem);
|
||||
|
||||
return SaveSubItem(ref config);
|
||||
@@ -855,5 +887,78 @@ namespace v2rayN.Handler
|
||||
ToJsonFile(config);
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int AddformMainLvColWidth(ref Config config, string name, int width)
|
||||
{
|
||||
if (config.uiItem.mainLvColWidth == null)
|
||||
{
|
||||
config.uiItem.mainLvColWidth = new Dictionary<string, int>();
|
||||
}
|
||||
if (config.uiItem.mainLvColWidth.ContainsKey(name))
|
||||
{
|
||||
config.uiItem.mainLvColWidth[name] = width;
|
||||
}
|
||||
else
|
||||
{
|
||||
config.uiItem.mainLvColWidth.Add(name, width);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
public static int GetformMainLvColWidth(ref Config config, string name, int width)
|
||||
{
|
||||
if (config.uiItem.mainLvColWidth == null)
|
||||
{
|
||||
config.uiItem.mainLvColWidth = new Dictionary<string, int>();
|
||||
}
|
||||
if (config.uiItem.mainLvColWidth.ContainsKey(name))
|
||||
{
|
||||
return config.uiItem.mainLvColWidth[name];
|
||||
}
|
||||
else
|
||||
{
|
||||
return width;
|
||||
}
|
||||
}
|
||||
|
||||
public static int SortServers(ref Config config, EServerColName name, bool asc)
|
||||
{
|
||||
if (config.vmess.Count <= 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
switch (name)
|
||||
{
|
||||
case EServerColName.configType:
|
||||
case EServerColName.remarks:
|
||||
case EServerColName.address:
|
||||
case EServerColName.port:
|
||||
case EServerColName.security:
|
||||
case EServerColName.network:
|
||||
case EServerColName.testResult:
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
string itemId = config.getItemId();
|
||||
var items = config.vmess.AsQueryable();
|
||||
|
||||
if (asc)
|
||||
{
|
||||
config.vmess = items.OrderBy(name.ToString()).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
config.vmess = items.OrderByDescending(name.ToString()).ToList();
|
||||
}
|
||||
|
||||
var index_ = config.vmess.FindIndex(it => it.getItemId() == itemId);
|
||||
if (index_ >= 0)
|
||||
{
|
||||
config.index = index_;
|
||||
}
|
||||
|
||||
ToJsonFile(config);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using v2rayN.Base;
|
||||
using v2rayN.Mode;
|
||||
using v2rayN.Properties;
|
||||
|
||||
namespace v2rayN.Handler
|
||||
{
|
||||
@@ -37,68 +45,147 @@ namespace v2rayN.Handler
|
||||
}
|
||||
}
|
||||
|
||||
private string latestUrl = "https://github.com/v2ray/v2ray-core/releases/latest";
|
||||
private const string coreURL = "https://github.com/v2ray/v2ray-core/releases/download/{0}/v2ray-windows-{1}.zip";
|
||||
private int progressPercentage = -1;
|
||||
private long totalBytesToReceive = 0;
|
||||
private DateTime totalDatetime = new DateTime();
|
||||
private int DownloadTimeout = -1;
|
||||
|
||||
public void AbsoluteV2rayCore(Config config)
|
||||
#region Check for updates
|
||||
|
||||
private readonly string nLatestUrl = "https://github.com/2dust/v2rayN/releases/latest";
|
||||
private const string nUrl = "https://github.com/2dust/v2rayN/releases/download/{0}/v2rayN.zip";
|
||||
private readonly string coreLatestUrl = "https://github.com/v2fly/v2ray-core/releases/latest";
|
||||
private const string coreUrl = "https://github.com/v2fly/v2ray-core/releases/download/{0}/v2ray-windows-{1}.zip";
|
||||
|
||||
public async void CheckUpdateAsync(string type)
|
||||
{
|
||||
SetSecurityProtocol();
|
||||
WebRequest request = WebRequest.Create(latestUrl);
|
||||
request.BeginGetResponse(new AsyncCallback(OnResponseV2rayCore), request);
|
||||
Utils.SetSecurityProtocol();
|
||||
WebRequestHandler webRequestHandler = new WebRequestHandler
|
||||
{
|
||||
AllowAutoRedirect = false
|
||||
};
|
||||
HttpClient httpClient = new HttpClient(webRequestHandler);
|
||||
|
||||
string url;
|
||||
if (type == "Core")
|
||||
{
|
||||
url = coreLatestUrl;
|
||||
}
|
||||
else if (type == "v2rayN")
|
||||
{
|
||||
url = nLatestUrl;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ArgumentException("Type");
|
||||
}
|
||||
HttpResponseMessage response = await httpClient.GetAsync(url);
|
||||
if (response.StatusCode.ToString() == "Redirect")
|
||||
{
|
||||
responseHandler(type, response.Headers.Location.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.SaveLog("StatusCode error: " + url);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnResponseV2rayCore(IAsyncResult ar)
|
||||
/// <summary>
|
||||
/// 获取V2RayCore版本
|
||||
/// </summary>
|
||||
public string getV2rayVersion()
|
||||
{
|
||||
try
|
||||
{
|
||||
string filePath = Utils.GetPath("V2ray.exe");
|
||||
if (!File.Exists(filePath))
|
||||
{
|
||||
string msg = string.Format(UIRes.I18N("NotFoundCore"), @"https://github.com/v2fly/v2ray-core/releases");
|
||||
//ShowMsg(true, msg);
|
||||
return "";
|
||||
}
|
||||
|
||||
Process p = new Process();
|
||||
p.StartInfo.FileName = filePath;
|
||||
p.StartInfo.Arguments = "-version";
|
||||
p.StartInfo.WorkingDirectory = Utils.StartupPath();
|
||||
p.StartInfo.UseShellExecute = false;
|
||||
p.StartInfo.RedirectStandardOutput = true;
|
||||
p.StartInfo.CreateNoWindow = true;
|
||||
p.StartInfo.StandardOutputEncoding = Encoding.UTF8;
|
||||
p.Start();
|
||||
p.WaitForExit(5000);
|
||||
string echo = p.StandardOutput.ReadToEnd();
|
||||
string version = Regex.Match(echo, "V2Ray ([0-9.]+) \\(").Groups[1].Value;
|
||||
return version;
|
||||
}
|
||||
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
private void responseHandler(string type, string redirectUrl)
|
||||
{
|
||||
try
|
||||
{
|
||||
HttpWebRequest request = (HttpWebRequest)ar.AsyncState;
|
||||
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(ar);
|
||||
string redirectUrl = response.ResponseUri.AbsoluteUri;
|
||||
string version = redirectUrl.Substring(redirectUrl.LastIndexOf("/", StringComparison.Ordinal) + 1);
|
||||
|
||||
string osBit = string.Empty;
|
||||
if (Environment.Is64BitProcess)
|
||||
string curVersion;
|
||||
string message;
|
||||
string url;
|
||||
if (type == "Core")
|
||||
{
|
||||
osBit = "64";
|
||||
curVersion = "v" + getV2rayVersion();
|
||||
message = string.Format(UIRes.I18N("IsLatestCore"), curVersion);
|
||||
string osBit = Environment.Is64BitProcess ? "64" : "32";
|
||||
url = string.Format(coreUrl, version, osBit);
|
||||
}
|
||||
else if (type == "v2rayN")
|
||||
{
|
||||
curVersion = FileVersionInfo.GetVersionInfo(Utils.GetExePath()).FileVersion.ToString();
|
||||
message = string.Format(UIRes.I18N("IsLatestN"), curVersion);
|
||||
url = string.Format(nUrl, version);
|
||||
}
|
||||
else
|
||||
{
|
||||
osBit = "32";
|
||||
throw new ArgumentException("Type");
|
||||
}
|
||||
string url = string.Format(coreURL, version, osBit);
|
||||
if (AbsoluteCompleted != null)
|
||||
|
||||
if (curVersion == version)
|
||||
{
|
||||
AbsoluteCompleted(this, new ResultEventArgs(true, url));
|
||||
AbsoluteCompleted?.Invoke(this, new ResultEventArgs(false, message));
|
||||
return;
|
||||
}
|
||||
|
||||
AbsoluteCompleted?.Invoke(this, new ResultEventArgs(true, url));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
|
||||
if (Error != null)
|
||||
Error(this, new ErrorEventArgs(ex));
|
||||
Error?.Invoke(this, new ErrorEventArgs(ex));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void DownloadFileAsync(Config config, string url, WebProxy webProxy, int downloadTimeout)
|
||||
#region Download
|
||||
|
||||
public WebClientEx DownloadFileAsync(string url, WebProxy webProxy, int downloadTimeout)
|
||||
{
|
||||
WebClientEx ws = new WebClientEx();
|
||||
try
|
||||
{
|
||||
SetSecurityProtocol();
|
||||
if (UpdateCompleted != null)
|
||||
{
|
||||
UpdateCompleted(this, new ResultEventArgs(false, "Downloading..."));
|
||||
}
|
||||
Utils.SetSecurityProtocol();
|
||||
UpdateCompleted?.Invoke(this, new ResultEventArgs(false, UIRes.I18N("Downloading")));
|
||||
|
||||
progressPercentage = -1;
|
||||
totalBytesToReceive = 0;
|
||||
|
||||
WebClientEx ws = new WebClientEx();
|
||||
//WebClientEx ws = new WebClientEx();
|
||||
DownloadTimeout = downloadTimeout;
|
||||
if (webProxy != null)
|
||||
{
|
||||
@@ -107,15 +194,15 @@ namespace v2rayN.Handler
|
||||
|
||||
ws.DownloadFileCompleted += ws_DownloadFileCompleted;
|
||||
ws.DownloadProgressChanged += ws_DownloadProgressChanged;
|
||||
ws.DownloadFileAsync(new Uri(url), Utils.GetPath(DownloadFileName));
|
||||
ws.DownloadFileAsync(new Uri(url), Utils.GetPath(DownloadFileName));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
|
||||
if (Error != null)
|
||||
Error(this, new ErrorEventArgs(ex));
|
||||
Error?.Invoke(this, new ErrorEventArgs(ex));
|
||||
}
|
||||
return ws;
|
||||
}
|
||||
|
||||
void ws_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
|
||||
@@ -145,7 +232,6 @@ namespace v2rayN.Handler
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ws_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
|
||||
{
|
||||
try
|
||||
@@ -156,7 +242,7 @@ namespace v2rayN.Handler
|
||||
{
|
||||
((WebClientEx)sender).Dispose();
|
||||
TimeSpan ts = (DateTime.Now - totalDatetime);
|
||||
string speed = string.Format("<{0} M/s", (totalBytesToReceive / ts.TotalMilliseconds / 1000).ToString("#0.##"));
|
||||
string speed = string.Format("{0} M/s", (totalBytesToReceive / ts.TotalMilliseconds / 1000).ToString("#0.##"));
|
||||
UpdateCompleted(this, new ResultEventArgs(true, speed));
|
||||
return;
|
||||
}
|
||||
@@ -179,8 +265,7 @@ namespace v2rayN.Handler
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
|
||||
if (Error != null)
|
||||
Error(this, new ErrorEventArgs(ex));
|
||||
Error?.Invoke(this, new ErrorEventArgs(ex));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,7 +278,7 @@ namespace v2rayN.Handler
|
||||
string source = string.Empty;
|
||||
try
|
||||
{
|
||||
SetSecurityProtocol();
|
||||
Utils.SetSecurityProtocol();
|
||||
|
||||
WebClientEx ws = new WebClientEx();
|
||||
ws.DownloadStringCompleted += Ws_DownloadStringCompleted;
|
||||
@@ -213,10 +298,7 @@ namespace v2rayN.Handler
|
||||
|| Utils.IsNullOrEmpty(e.Error.ToString()))
|
||||
{
|
||||
string source = e.Result;
|
||||
if (UpdateCompleted != null)
|
||||
{
|
||||
UpdateCompleted(this, new ResultEventArgs(true, source));
|
||||
}
|
||||
UpdateCompleted?.Invoke(this, new ResultEventArgs(true, source));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -227,18 +309,51 @@ namespace v2rayN.Handler
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
|
||||
if (Error != null)
|
||||
Error(this, new ErrorEventArgs(ex));
|
||||
Error?.Invoke(this, new ErrorEventArgs(ex));
|
||||
}
|
||||
}
|
||||
|
||||
private void SetSecurityProtocol()
|
||||
#endregion
|
||||
|
||||
#region PAC
|
||||
|
||||
public string GenPacFile(string result)
|
||||
{
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3
|
||||
| SecurityProtocolType.Tls
|
||||
| SecurityProtocolType.Tls11
|
||||
| SecurityProtocolType.Tls12;
|
||||
ServicePointManager.DefaultConnectionLimit = 256;
|
||||
try
|
||||
{
|
||||
File.WriteAllText(Utils.GetTempPath("gfwlist.txt"), result, Encoding.UTF8);
|
||||
List<string> lines = ParsePacResult(result);
|
||||
string abpContent = Utils.UnGzip(Resources.abp_js);
|
||||
abpContent = abpContent.Replace("__RULES__", JsonConvert.SerializeObject(lines, Formatting.Indented));
|
||||
File.WriteAllText(Utils.GetPath(Global.pacFILE), abpContent, Encoding.UTF8);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
return ex.Message;
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
private List<string> ParsePacResult(string response)
|
||||
{
|
||||
IEnumerable<char> IgnoredLineBegins = new[] { '!', '[' };
|
||||
|
||||
byte[] bytes = Convert.FromBase64String(response);
|
||||
string content = Encoding.UTF8.GetString(bytes);
|
||||
List<string> valid_lines = new List<string>();
|
||||
using (StringReader sr = new StringReader(content))
|
||||
{
|
||||
foreach (string line in sr.NonWhiteSpaceLines())
|
||||
{
|
||||
if (line.BeginWithAny(IgnoredLineBegins))
|
||||
continue;
|
||||
valid_lines.Add(line);
|
||||
}
|
||||
}
|
||||
return valid_lines;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
using Grpc.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using v2rayN.Base;
|
||||
using v2rayN.Mode;
|
||||
|
||||
namespace v2rayN.Handler
|
||||
@@ -38,23 +31,23 @@ namespace v2rayN.Handler
|
||||
{
|
||||
try
|
||||
{
|
||||
var color = ColorTranslator.FromHtml("#3399CC");
|
||||
var index = config.listenerType;
|
||||
Color color = ColorTranslator.FromHtml("#3399CC");
|
||||
int index = (int)config.listenerType;
|
||||
if (index > 0)
|
||||
{
|
||||
color = (new Color[] { Color.Red, Color.Purple, Color.DarkGreen, Color.Orange })[index - 1];
|
||||
color = (new Color[] { Color.Red, Color.Purple, Color.DarkGreen, Color.Orange, Color.DarkSlateBlue, Color.RoyalBlue })[index - 1];
|
||||
//color = ColorTranslator.FromHtml(new string[] { "#CC0066", "#CC6600", "#99CC99", "#666699" }[index - 1]);
|
||||
}
|
||||
|
||||
var width = 128;
|
||||
var height = 128;
|
||||
int width = 128;
|
||||
int height = 128;
|
||||
|
||||
var bitmap = new Bitmap(width, height);
|
||||
var graphics = Graphics.FromImage(bitmap);
|
||||
var drawBrush = new SolidBrush(color);
|
||||
Bitmap bitmap = new Bitmap(width, height);
|
||||
Graphics graphics = Graphics.FromImage(bitmap);
|
||||
SolidBrush drawBrush = new SolidBrush(color);
|
||||
|
||||
graphics.FillEllipse(drawBrush, new Rectangle(0, 0, width, height));
|
||||
var zoom = 16;
|
||||
int zoom = 16;
|
||||
graphics.DrawImage(new Bitmap(Properties.Resources.notify, width - zoom, width - zoom), zoom / 2, zoom / 2);
|
||||
|
||||
Icon createdIcon = Icon.FromHandle(bitmap.GetHicon());
|
||||
@@ -85,10 +78,12 @@ namespace v2rayN.Handler
|
||||
return;
|
||||
}
|
||||
|
||||
SaveFileDialog fileDialog = new SaveFileDialog();
|
||||
fileDialog.Filter = "Config|*.json";
|
||||
fileDialog.FilterIndex = 2;
|
||||
fileDialog.RestoreDirectory = true;
|
||||
SaveFileDialog fileDialog = new SaveFileDialog
|
||||
{
|
||||
Filter = "Config|*.json",
|
||||
FilterIndex = 2,
|
||||
RestoreDirectory = true
|
||||
};
|
||||
if (fileDialog.ShowDialog() != DialogResult.OK)
|
||||
{
|
||||
return;
|
||||
@@ -98,16 +93,15 @@ namespace v2rayN.Handler
|
||||
{
|
||||
return;
|
||||
}
|
||||
Config configCopy = Utils.DeepCopy<Config>(config);
|
||||
Config configCopy = Utils.DeepCopy(config);
|
||||
configCopy.index = index;
|
||||
string msg;
|
||||
if (V2rayConfigHandler.Export2ClientConfig(configCopy, fileName, out msg) != 0)
|
||||
if (V2rayConfigHandler.Export2ClientConfig(configCopy, fileName, out string msg) != 0)
|
||||
{
|
||||
UI.Show(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
UI.Show(string.Format(UIRes.I18N("SaveClientConfigurationIn"), fileName));
|
||||
UI.ShowWarning(string.Format(UIRes.I18N("SaveClientConfigurationIn"), fileName));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,10 +118,12 @@ namespace v2rayN.Handler
|
||||
return;
|
||||
}
|
||||
|
||||
SaveFileDialog fileDialog = new SaveFileDialog();
|
||||
fileDialog.Filter = "Config|*.json";
|
||||
fileDialog.FilterIndex = 2;
|
||||
fileDialog.RestoreDirectory = true;
|
||||
SaveFileDialog fileDialog = new SaveFileDialog
|
||||
{
|
||||
Filter = "Config|*.json",
|
||||
FilterIndex = 2,
|
||||
RestoreDirectory = true
|
||||
};
|
||||
if (fileDialog.ShowDialog() != DialogResult.OK)
|
||||
{
|
||||
return;
|
||||
@@ -137,19 +133,18 @@ namespace v2rayN.Handler
|
||||
{
|
||||
return;
|
||||
}
|
||||
Config configCopy = Utils.DeepCopy<Config>(config);
|
||||
Config configCopy = Utils.DeepCopy(config);
|
||||
configCopy.index = index;
|
||||
string msg;
|
||||
if (V2rayConfigHandler.Export2ServerConfig(configCopy, fileName, out msg) != 0)
|
||||
if (V2rayConfigHandler.Export2ServerConfig(configCopy, fileName, out string msg) != 0)
|
||||
{
|
||||
UI.Show(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
UI.Show(string.Format(UIRes.I18N("SaveServerConfigurationIn"), fileName));
|
||||
UI.ShowWarning(string.Format(UIRes.I18N("SaveServerConfigurationIn"), fileName));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,190 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.Win32;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace v2rayN.Handler
|
||||
{
|
||||
/// <summary>
|
||||
/// 设置系统代理类
|
||||
/// </summary>
|
||||
class ProxySetting
|
||||
{
|
||||
public static bool UnsetProxy()
|
||||
{
|
||||
return SetProxy(null, null);
|
||||
}
|
||||
public static bool SetProxy(string strProxy)
|
||||
{
|
||||
return SetProxy(strProxy, null);
|
||||
}
|
||||
|
||||
public static bool SetProxy(string strProxy, string exceptions)
|
||||
{
|
||||
InternetPerConnOptionList list = new InternetPerConnOptionList();
|
||||
|
||||
int optionCount = string.IsNullOrEmpty(strProxy) ? 1 : (string.IsNullOrEmpty(exceptions) ? 2 : 3);
|
||||
InternetConnectionOption[] options = new InternetConnectionOption[optionCount];
|
||||
// USE a proxy server ...
|
||||
options[0].m_Option = PerConnOption.INTERNET_PER_CONN_FLAGS;
|
||||
options[0].m_Value.m_Int = (int)((optionCount < 2) ? PerConnFlags.PROXY_TYPE_DIRECT : (PerConnFlags.PROXY_TYPE_DIRECT | PerConnFlags.PROXY_TYPE_PROXY));
|
||||
// use THIS proxy server
|
||||
if (optionCount > 1)
|
||||
{
|
||||
options[1].m_Option = PerConnOption.INTERNET_PER_CONN_PROXY_SERVER;
|
||||
options[1].m_Value.m_StringPtr = Marshal.StringToHGlobalAuto(strProxy);
|
||||
// except for these addresses ...
|
||||
if (optionCount > 2)
|
||||
{
|
||||
options[2].m_Option = PerConnOption.INTERNET_PER_CONN_PROXY_BYPASS;
|
||||
options[2].m_Value.m_StringPtr = Marshal.StringToHGlobalAuto(exceptions);
|
||||
}
|
||||
}
|
||||
|
||||
// default stuff
|
||||
list.dwSize = Marshal.SizeOf(list);
|
||||
list.szConnection = IntPtr.Zero;
|
||||
list.dwOptionCount = options.Length;
|
||||
list.dwOptionError = 0;
|
||||
|
||||
|
||||
int optSize = Marshal.SizeOf(typeof(InternetConnectionOption));
|
||||
// make a pointer out of all that ...
|
||||
IntPtr optionsPtr = Marshal.AllocCoTaskMem(optSize * options.Length);
|
||||
// copy the array over into that spot in memory ...
|
||||
for (int i = 0; i < options.Length; ++i)
|
||||
{
|
||||
IntPtr opt = new IntPtr(optionsPtr.ToInt32() + (i * optSize));
|
||||
Marshal.StructureToPtr(options[i], opt, false);
|
||||
}
|
||||
|
||||
list.options = optionsPtr;
|
||||
|
||||
// and then make a pointer out of the whole list
|
||||
IntPtr ipcoListPtr = Marshal.AllocCoTaskMem((Int32)list.dwSize);
|
||||
Marshal.StructureToPtr(list, ipcoListPtr, false);
|
||||
|
||||
// and finally, call the API method!
|
||||
int returnvalue = NativeMethods.InternetSetOption(IntPtr.Zero,
|
||||
InternetOption.INTERNET_OPTION_PER_CONNECTION_OPTION,
|
||||
ipcoListPtr, list.dwSize) ? -1 : 0;
|
||||
if (returnvalue == 0)
|
||||
{ // get the error codes, they might be helpful
|
||||
returnvalue = Marshal.GetLastWin32Error();
|
||||
}
|
||||
// FREE the data ASAP
|
||||
Marshal.FreeCoTaskMem(optionsPtr);
|
||||
Marshal.FreeCoTaskMem(ipcoListPtr);
|
||||
if (returnvalue > 0)
|
||||
{ // throw the error codes, they might be helpful
|
||||
//throw new Win32Exception(Marshal.GetLastWin32Error());
|
||||
}
|
||||
|
||||
return (returnvalue < 0);
|
||||
}
|
||||
|
||||
|
||||
#region WinInet structures
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||
public struct InternetPerConnOptionList
|
||||
{
|
||||
public int dwSize; // size of the INTERNET_PER_CONN_OPTION_LIST struct
|
||||
public IntPtr szConnection; // connection name to set/query options
|
||||
public int dwOptionCount; // number of options to set/query
|
||||
public int dwOptionError; // on error, which option failed
|
||||
//[MarshalAs(UnmanagedType.)]
|
||||
public IntPtr options;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||
public struct InternetConnectionOption
|
||||
{
|
||||
static readonly int Size;
|
||||
public PerConnOption m_Option;
|
||||
public InternetConnectionOptionValue m_Value;
|
||||
static InternetConnectionOption()
|
||||
{
|
||||
InternetConnectionOption.Size = Marshal.SizeOf(typeof(InternetConnectionOption));
|
||||
}
|
||||
|
||||
// Nested Types
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
public struct InternetConnectionOptionValue
|
||||
{
|
||||
// Fields
|
||||
[FieldOffset(0)]
|
||||
public System.Runtime.InteropServices.ComTypes.FILETIME m_FileTime;
|
||||
[FieldOffset(0)]
|
||||
public int m_Int;
|
||||
[FieldOffset(0)]
|
||||
public IntPtr m_StringPtr;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region WinInet enums
|
||||
//
|
||||
// options manifests for Internet{Query|Set}Option
|
||||
//
|
||||
public enum InternetOption : uint
|
||||
{
|
||||
INTERNET_OPTION_PER_CONNECTION_OPTION = 75
|
||||
}
|
||||
|
||||
//
|
||||
// Options used in INTERNET_PER_CONN_OPTON struct
|
||||
//
|
||||
public enum PerConnOption
|
||||
{
|
||||
INTERNET_PER_CONN_FLAGS = 1, // Sets or retrieves the connection type. The Value member will contain one or more of the values from PerConnFlags
|
||||
INTERNET_PER_CONN_PROXY_SERVER = 2, // Sets or retrieves a string containing the proxy servers.
|
||||
INTERNET_PER_CONN_PROXY_BYPASS = 3, // Sets or retrieves a string containing the URLs that do not use the proxy server.
|
||||
INTERNET_PER_CONN_AUTOCONFIG_URL = 4//, // Sets or retrieves a string containing the URL to the automatic configuration script.
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// PER_CONN_FLAGS
|
||||
//
|
||||
[Flags]
|
||||
public enum PerConnFlags
|
||||
{
|
||||
PROXY_TYPE_DIRECT = 0x00000001, // direct to net
|
||||
PROXY_TYPE_PROXY = 0x00000002, // via named proxy
|
||||
PROXY_TYPE_AUTO_PROXY_URL = 0x00000004, // autoproxy URL
|
||||
PROXY_TYPE_AUTO_DETECT = 0x00000008 // use autoproxy detection
|
||||
}
|
||||
#endregion
|
||||
|
||||
internal static class NativeMethods
|
||||
{
|
||||
[DllImport("WinInet.dll", SetLastError = true, CharSet = CharSet.Auto)]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static extern bool InternetSetOption(IntPtr hInternet, InternetOption dwOption, IntPtr lpBuffer, int dwBufferLength);
|
||||
}
|
||||
|
||||
//判断是否使用代理
|
||||
public static bool UsedProxy()
|
||||
{
|
||||
RegistryKey rk = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Internet Settings", true);
|
||||
if (rk.GetValue("ProxyEnable").ToString() == "1")
|
||||
{
|
||||
rk.Close();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
rk.Close();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//获得代理的IP和端口
|
||||
public static string GetProxyProxyServer()
|
||||
{
|
||||
RegistryKey rk = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Internet Settings", true);
|
||||
string ProxyServer = rk.GetValue("ProxyServer").ToString();
|
||||
rk.Close();
|
||||
return ProxyServer;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using ZXing;
|
||||
using ZXing.QrCode;
|
||||
|
||||
@@ -16,18 +14,22 @@ namespace v2rayN.Handler
|
||||
Image img = null;
|
||||
try
|
||||
{
|
||||
QrCodeEncodingOptions options = new QrCodeEncodingOptions();
|
||||
options.CharacterSet = "UTF-8";
|
||||
options.DisableECI = true; // Extended Channel Interpretation (ECI) 主要用于特殊的字符集。并不是所有的扫描器都支持这种编码。
|
||||
options.ErrorCorrection = ZXing.QrCode.Internal.ErrorCorrectionLevel.M; // 纠错级别
|
||||
options.Width = 500;
|
||||
options.Height = 500;
|
||||
options.Margin = 1;
|
||||
QrCodeEncodingOptions options = new QrCodeEncodingOptions
|
||||
{
|
||||
CharacterSet = "UTF-8",
|
||||
DisableECI = true, // Extended Channel Interpretation (ECI) 主要用于特殊的字符集。并不是所有的扫描器都支持这种编码。
|
||||
ErrorCorrection = ZXing.QrCode.Internal.ErrorCorrectionLevel.M, // 纠错级别
|
||||
Width = 500,
|
||||
Height = 500,
|
||||
Margin = 1
|
||||
};
|
||||
// options.Hints,更多属性,也可以在这里添加。
|
||||
|
||||
BarcodeWriter writer = new BarcodeWriter();
|
||||
writer.Format = BarcodeFormat.QR_CODE;
|
||||
writer.Options = options;
|
||||
BarcodeWriter writer = new BarcodeWriter
|
||||
{
|
||||
Format = BarcodeFormat.QR_CODE,
|
||||
Options = options
|
||||
};
|
||||
Bitmap bmp = writer.Write(strContent);
|
||||
img = (Image)bmp;
|
||||
return img;
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace v2rayN.Handler
|
||||
{
|
||||
/// <summary>
|
||||
/// 路由规则文件处理类
|
||||
/// </summary>
|
||||
class RoutingRuleHandler
|
||||
{
|
||||
/// <summary>
|
||||
/// Parse Pac to v2ray rule
|
||||
/// </summary>
|
||||
/// <param name="filePath"></param>
|
||||
/// <returns></returns>
|
||||
public static List<string> ParsePac(string filePath)
|
||||
{
|
||||
string result = Utils.LoadResource(filePath);
|
||||
if (Utils.IsNullOrEmpty(result))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
//取得rule
|
||||
string pattern = @"(?is)(?<=\[)(.*)(?=\])";
|
||||
Regex rgx = new Regex(pattern);
|
||||
result = rgx.Match(result).Value;
|
||||
int index = result.IndexOf("];");
|
||||
result = result.Substring(0, index);
|
||||
if (Utils.IsNullOrEmpty(result))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
string[] arrPac = result.Split(',');
|
||||
List<string> lstPac = new List<string>();
|
||||
foreach (string str in arrPac)
|
||||
{
|
||||
//处理有效值
|
||||
if (Utils.IsNullOrEmpty(str)
|
||||
|| str.Length <= 3)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
string value = str.Replace("\",", "").Replace("\"", "").Replace(",", "").Replace("\r\n", "").Replace(" ", "");
|
||||
lstPac.Add(value);
|
||||
}
|
||||
|
||||
return lstPac;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4,85 +4,57 @@ using System.Diagnostics;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using v2rayN.Mode;
|
||||
|
||||
namespace v2rayN.Handler
|
||||
{
|
||||
class SpeedtestHandler
|
||||
{
|
||||
private DownloadHandle downloadHandle2;
|
||||
private Config _config;
|
||||
private V2rayHandler _v2rayHandler;
|
||||
private List<int> _selecteds;
|
||||
private Thread _workThread;
|
||||
Action<int, string> _updateFunc;
|
||||
|
||||
private int testCounter = 0;
|
||||
private int ItemIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
return _selecteds[testCounter - 1];
|
||||
}
|
||||
}
|
||||
|
||||
public SpeedtestHandler(ref Config config, ref V2rayHandler v2rayHandler, List<int> selecteds, string actionType, Action<int, string> update)
|
||||
{
|
||||
_config = config;
|
||||
_v2rayHandler = v2rayHandler;
|
||||
_selecteds = selecteds;
|
||||
_selecteds = Utils.DeepCopy(selecteds);
|
||||
_updateFunc = update;
|
||||
|
||||
if (actionType == "ping")
|
||||
{
|
||||
_workThread = new Thread(new ThreadStart(RunPing));
|
||||
_workThread.IsBackground = true;
|
||||
_workThread.Start();
|
||||
Task.Run(() => RunPing());
|
||||
}
|
||||
if (actionType == "tcping")
|
||||
{
|
||||
_workThread = new Thread(new ThreadStart(RunTcping));
|
||||
_workThread.IsBackground = true;
|
||||
_workThread.Start();
|
||||
Task.Run(() => RunTcping());
|
||||
}
|
||||
else if (actionType == "realping")
|
||||
{
|
||||
_workThread = new Thread(new ThreadStart(RunRealPing));
|
||||
_workThread.IsBackground = true;
|
||||
_workThread.Start();
|
||||
Task.Run(() => RunRealPing());
|
||||
}
|
||||
else if (actionType == "speedtest")
|
||||
{
|
||||
RunSpeedTest();
|
||||
Task.Run(() => RunSpeedTest());
|
||||
}
|
||||
}
|
||||
|
||||
public void Close()
|
||||
private void RunPingSub(Action<int> updateFun)
|
||||
{
|
||||
try
|
||||
{
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
|
||||
private void RunPing()
|
||||
{
|
||||
try
|
||||
{
|
||||
for (int k = 0; k < _selecteds.Count; k++)
|
||||
foreach (int index in _selecteds)
|
||||
{
|
||||
int index = _selecteds[k];
|
||||
if (_config.vmess[index].configType == (int)EConfigType.Custom)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
try
|
||||
{
|
||||
long time = Utils.Ping(_config.vmess[index].address);
|
||||
_updateFunc(index, string.Format("{0}ms", time));
|
||||
updateFun(index);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -90,8 +62,7 @@ namespace v2rayN.Handler
|
||||
}
|
||||
}
|
||||
|
||||
Thread.Sleep(100);
|
||||
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -99,170 +70,177 @@ namespace v2rayN.Handler
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void RunPing()
|
||||
{
|
||||
RunPingSub((int index) =>
|
||||
{
|
||||
long time = Utils.Ping(_config.vmess[index].address);
|
||||
_updateFunc(index, FormatOut(time, "ms"));
|
||||
});
|
||||
}
|
||||
|
||||
private void RunTcping()
|
||||
{
|
||||
try
|
||||
RunPingSub((int index) =>
|
||||
{
|
||||
for (int k = 0; k < _selecteds.Count; k++)
|
||||
{
|
||||
int index = _selecteds[k];
|
||||
if (_config.vmess[index].configType == (int)EConfigType.Custom)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
try
|
||||
{
|
||||
var time = GetTcpingTime(_config.vmess[index].address, _config.vmess[index].port);
|
||||
_updateFunc(index, string.Format("{0}ms", time));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
|
||||
Thread.Sleep(100);
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
int time = GetTcpingTime(_config.vmess[index].address, _config.vmess[index].port);
|
||||
_updateFunc(index, FormatOut(time, "ms"));
|
||||
});
|
||||
}
|
||||
|
||||
private void RunRealPing()
|
||||
{
|
||||
int pid = -1;
|
||||
try
|
||||
{
|
||||
string msg = string.Empty;
|
||||
|
||||
Global.reloadV2ray = true;
|
||||
_v2rayHandler.LoadV2ray(_config, _selecteds);
|
||||
pid = _v2rayHandler.LoadV2rayConfigString(_config, _selecteds);
|
||||
|
||||
Thread.Sleep(5000);
|
||||
|
||||
var httpPort = _config.GetLocalPort("speedtest");
|
||||
for (int k = 0; k < _selecteds.Count; k++)
|
||||
//Thread.Sleep(5000);
|
||||
int httpPort = _config.GetLocalPort("speedtest");
|
||||
List<Task> tasks = new List<Task>();
|
||||
foreach (int itemIndex in _selecteds)
|
||||
{
|
||||
int index = _selecteds[k];
|
||||
if (_config.vmess[index].configType == (int)EConfigType.Custom)
|
||||
if (_config.vmess[itemIndex].configType == (int)EConfigType.Custom)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
try
|
||||
tasks.Add(Task.Run(() =>
|
||||
{
|
||||
var webProxy = new WebProxy(Global.Loopback, httpPort + index);
|
||||
int responseTime = -1;
|
||||
var status = GetRealPingTime(Global.SpeedPingTestUrl, webProxy, out responseTime);
|
||||
if (!Utils.IsNullOrEmpty(status))
|
||||
try
|
||||
{
|
||||
_updateFunc(index, string.Format("{0}", status));
|
||||
WebProxy webProxy = new WebProxy(Global.Loopback, httpPort + itemIndex);
|
||||
int responseTime = -1;
|
||||
string status = GetRealPingTime(_config.speedPingTestUrl, webProxy, out responseTime);
|
||||
string output = Utils.IsNullOrEmpty(status) ? FormatOut(responseTime, "ms") : FormatOut(status, "");
|
||||
_updateFunc(itemIndex, output);
|
||||
}
|
||||
else
|
||||
catch (Exception ex)
|
||||
{
|
||||
_updateFunc(index, string.Format("{0}ms", responseTime));
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
Thread.Sleep(100);
|
||||
}));
|
||||
//Thread.Sleep(100);
|
||||
}
|
||||
|
||||
Global.reloadV2ray = true;
|
||||
_v2rayHandler.LoadV2ray(_config);
|
||||
Thread.Sleep(100);
|
||||
|
||||
Task.WaitAll(tasks.ToArray());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (pid > 0) _v2rayHandler.V2rayStopPid(pid);
|
||||
}
|
||||
}
|
||||
|
||||
public int RunAvailabilityCheck() // alias: isLive
|
||||
{
|
||||
try
|
||||
{
|
||||
int httpPort = _config.GetLocalPort(Global.InboundHttp);
|
||||
|
||||
Task<int> t = Task.Run(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
WebProxy webProxy = new WebProxy(Global.Loopback, httpPort);
|
||||
int responseTime = -1;
|
||||
string status = GetRealPingTime(Global.AvailabilityTestUrl, webProxy, out responseTime);
|
||||
bool noError = Utils.IsNullOrEmpty(status);
|
||||
return noError ? responseTime : -1;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
return -1;
|
||||
}
|
||||
});
|
||||
return t.Result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
private void RunSpeedTest()
|
||||
{
|
||||
int testCounter = 0;
|
||||
int pid = -1;
|
||||
|
||||
if (_config.vmess.Count <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Global.reloadV2ray = true;
|
||||
_v2rayHandler.LoadV2ray(_config, _selecteds);
|
||||
pid = _v2rayHandler.LoadV2rayConfigString(_config, _selecteds);
|
||||
|
||||
Thread.Sleep(5000);
|
||||
|
||||
string url = Global.SpeedTestUrl;
|
||||
testCounter = 0;
|
||||
if (downloadHandle2 == null)
|
||||
string url = _config.speedTestUrl;
|
||||
DownloadHandle downloadHandle2 = new DownloadHandle();
|
||||
downloadHandle2.UpdateCompleted += (sender2, args) =>
|
||||
{
|
||||
downloadHandle2 = new DownloadHandle();
|
||||
downloadHandle2.UpdateCompleted += (sender2, args) =>
|
||||
{
|
||||
if (args.Success)
|
||||
{
|
||||
_updateFunc(ItemIndex, args.Msg);
|
||||
if (ServerSpeedTestSub(testCounter, url) != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_updateFunc(ItemIndex, args.Msg);
|
||||
}
|
||||
};
|
||||
downloadHandle2.Error += (sender2, args) =>
|
||||
{
|
||||
_updateFunc(ItemIndex, args.GetException().Message);
|
||||
if (ServerSpeedTestSub(testCounter, url) != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if (ServerSpeedTestSub(testCounter, url) != 0)
|
||||
_updateFunc(testCounter, args.Msg);
|
||||
};
|
||||
downloadHandle2.Error += (sender2, args) =>
|
||||
{
|
||||
return;
|
||||
_updateFunc(testCounter, args.GetException().Message);
|
||||
};
|
||||
|
||||
var timeout = 10;
|
||||
foreach (int itemIndex in _selecteds)
|
||||
{
|
||||
if (itemIndex >= _config.vmess.Count)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (_config.vmess[itemIndex].configType == (int)EConfigType.Custom)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
testCounter = itemIndex;
|
||||
int httpPort = _config.GetLocalPort("speedtest");
|
||||
|
||||
WebProxy webProxy = new WebProxy(Global.Loopback, httpPort + itemIndex);
|
||||
var ws = downloadHandle2.DownloadFileAsync(url, webProxy, timeout - 2);
|
||||
|
||||
Thread.Sleep(1000 * timeout);
|
||||
|
||||
ws.CancelAsync();
|
||||
|
||||
Thread.Sleep(1000 * 2);
|
||||
}
|
||||
if (pid > 0) _v2rayHandler.V2rayStopPid(pid);
|
||||
}
|
||||
|
||||
private int ServerSpeedTestSub(int index, string url)
|
||||
{
|
||||
if (index >= _selecteds.Count)
|
||||
{
|
||||
Global.reloadV2ray = true;
|
||||
_v2rayHandler.LoadV2ray(_config);
|
||||
return -1;
|
||||
}
|
||||
|
||||
var httpPort = _config.GetLocalPort("speedtest");
|
||||
index = _selecteds[index];
|
||||
|
||||
testCounter++;
|
||||
var webProxy = new WebProxy(Global.Loopback, httpPort + index);
|
||||
downloadHandle2.DownloadFileAsync(_config, url, webProxy, 30);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int GetTcpingTime(string url, int port)
|
||||
{
|
||||
var responseTime = -1;
|
||||
int responseTime = -1;
|
||||
|
||||
try
|
||||
{
|
||||
IPHostEntry ipHostInfo = System.Net.Dns.GetHostEntry(url);
|
||||
IPAddress ipAddress = ipHostInfo.AddressList[0];
|
||||
if (!IPAddress.TryParse(url, out IPAddress ipAddress))
|
||||
{
|
||||
IPHostEntry ipHostInfo = System.Net.Dns.GetHostEntry(url);
|
||||
ipAddress = ipHostInfo.AddressList[0];
|
||||
}
|
||||
|
||||
var timer = new Stopwatch();
|
||||
Stopwatch timer = new Stopwatch();
|
||||
timer.Start();
|
||||
|
||||
Socket clientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||
clientSocket.Connect(new IPEndPoint(ipAddress, port));
|
||||
IPEndPoint endPoint = new IPEndPoint(ipAddress, port);
|
||||
Socket clientSocket = new Socket(endPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
|
||||
|
||||
IAsyncResult result = clientSocket.BeginConnect(endPoint, null, null);
|
||||
if (!result.AsyncWaitHandle.WaitOne(TimeSpan.FromSeconds(5)))
|
||||
throw new TimeoutException("connect timeout (5s): " + url);
|
||||
clientSocket.EndConnect(result);
|
||||
|
||||
timer.Stop();
|
||||
responseTime = timer.Elapsed.Milliseconds;
|
||||
clientSocket.Close();
|
||||
@@ -278,14 +256,13 @@ namespace v2rayN.Handler
|
||||
{
|
||||
string msg = string.Empty;
|
||||
responseTime = -1;
|
||||
|
||||
try
|
||||
{
|
||||
HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(url);
|
||||
myHttpWebRequest.Timeout = 5000;
|
||||
myHttpWebRequest.Proxy = webProxy;//new WebProxy(Global.Loopback, Global.httpPort);
|
||||
|
||||
var timer = new Stopwatch();
|
||||
Stopwatch timer = new Stopwatch();
|
||||
timer.Start();
|
||||
|
||||
HttpWebResponse myHttpWebResponse = (HttpWebResponse)myHttpWebRequest.GetResponse();
|
||||
@@ -305,7 +282,14 @@ namespace v2rayN.Handler
|
||||
msg = ex.Message;
|
||||
}
|
||||
return msg;
|
||||
|
||||
}
|
||||
private string FormatOut(object time, string unit)
|
||||
{
|
||||
if (time.ToString().Equals("-1"))
|
||||
{
|
||||
return "Timeout";
|
||||
}
|
||||
return string.Format("{0}{1}", time, unit).PadLeft(6, ' ');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
using Grpc.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using v2rayN.Mode;
|
||||
using v2rayN.Properties;
|
||||
using v2rayN.Protos.Statistics;
|
||||
using v2rayN.Tool;
|
||||
|
||||
namespace v2rayN.Handler
|
||||
{
|
||||
@@ -18,7 +16,6 @@ namespace v2rayN.Handler
|
||||
private ServerStatistics serverStatistics_;
|
||||
private Channel channel_;
|
||||
private StatsService.StatsServiceClient client_;
|
||||
private Thread workThread_;
|
||||
private bool exitFlag_;
|
||||
|
||||
Action<ulong, ulong, List<ServerStatItem>> updateFunc_;
|
||||
@@ -43,22 +40,22 @@ namespace v2rayN.Handler
|
||||
|
||||
public StatisticsHandler(Mode.Config config, Action<ulong, ulong, List<ServerStatItem>> update)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Environment.Is64BitOperatingSystem)
|
||||
{
|
||||
FileManager.UncompressFile(Utils.GetPath("grpc_csharp_ext.x64.dll"), Resources.grpc_csharp_ext_x64_dll);
|
||||
}
|
||||
else
|
||||
{
|
||||
FileManager.UncompressFile(Utils.GetPath("grpc_csharp_ext.x86.dll"), Resources.grpc_csharp_ext_x86_dll);
|
||||
}
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
//try
|
||||
//{
|
||||
// if (Environment.Is64BitOperatingSystem)
|
||||
// {
|
||||
// FileManager.UncompressFile(Utils.GetPath("grpc_csharp_ext.x64.dll"), Resources.grpc_csharp_ext_x64_dll);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// FileManager.UncompressFile(Utils.GetPath("grpc_csharp_ext.x86.dll"), Resources.grpc_csharp_ext_x86_dll);
|
||||
// }
|
||||
//}
|
||||
//catch (IOException ex)
|
||||
//{
|
||||
// Utils.SaveLog(ex.Message, ex);
|
||||
|
||||
}
|
||||
//}
|
||||
|
||||
config_ = config;
|
||||
Enable = config.enableStatistics;
|
||||
@@ -70,9 +67,7 @@ namespace v2rayN.Handler
|
||||
|
||||
GrpcInit();
|
||||
|
||||
workThread_ = new Thread(new ThreadStart(Run));
|
||||
workThread_.IsBackground = true;
|
||||
workThread_.Start();
|
||||
Task.Run(() => Run());
|
||||
}
|
||||
|
||||
private void GrpcInit()
|
||||
@@ -120,13 +115,11 @@ namespace v2rayN.Handler
|
||||
|
||||
if (res != null)
|
||||
{
|
||||
var itemId = config_.getItemId();
|
||||
var serverStatItem = GetServerStatItem(itemId);
|
||||
ulong up = 0,
|
||||
down = 0;
|
||||
string itemId = config_.getItemId();
|
||||
ServerStatItem serverStatItem = GetServerStatItem(itemId);
|
||||
|
||||
//TODO: parse output
|
||||
ParseOutput(res.Stat, out up, out down);
|
||||
ParseOutput(res.Stat, out ulong up, out ulong down);
|
||||
|
||||
serverStatItem.todayUp += up;
|
||||
serverStatItem.todayDown += down;
|
||||
@@ -169,8 +162,8 @@ namespace v2rayN.Handler
|
||||
serverStatistics_.server = new List<ServerStatItem>();
|
||||
}
|
||||
|
||||
var ticks = DateTime.Now.Date.Ticks;
|
||||
foreach (var item in serverStatistics_.server)
|
||||
long ticks = DateTime.Now.Date.Ticks;
|
||||
foreach (ServerStatItem item in serverStatistics_.server)
|
||||
{
|
||||
if (item.dateNow != ticks)
|
||||
{
|
||||
@@ -200,8 +193,8 @@ namespace v2rayN.Handler
|
||||
|
||||
private ServerStatItem GetServerStatItem(string itemId)
|
||||
{
|
||||
var ticks = DateTime.Now.Date.Ticks;
|
||||
var cur = Statistic.FindIndex(item => item.itemId == itemId);
|
||||
long ticks = DateTime.Now.Date.Ticks;
|
||||
int cur = Statistic.FindIndex(item => item.itemId == itemId);
|
||||
if (cur < 0)
|
||||
{
|
||||
Statistic.Add(new ServerStatItem
|
||||
@@ -231,12 +224,12 @@ namespace v2rayN.Handler
|
||||
try
|
||||
{
|
||||
|
||||
foreach (var stat in source)
|
||||
foreach (Stat stat in source)
|
||||
{
|
||||
var name = stat.Name;
|
||||
var value = stat.Value;
|
||||
var nStr = name.Split(">>>".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
||||
var type = "";
|
||||
string name = stat.Name;
|
||||
long value = stat.Value;
|
||||
string[] nStr = name.Split(">>>".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
||||
string type = "";
|
||||
|
||||
name = name.Trim();
|
||||
|
||||
@@ -270,7 +263,7 @@ namespace v2rayN.Handler
|
||||
// TCP stack please do me a favor
|
||||
TcpListener l = new TcpListener(IPAddress.Loopback, 0);
|
||||
l.Start();
|
||||
var port = ((IPEndPoint)l.LocalEndpoint).Port;
|
||||
int port = ((IPEndPoint)l.LocalEndpoint).Port;
|
||||
l.Stop();
|
||||
return port;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web;
|
||||
using v2rayN.Base;
|
||||
using v2rayN.Mode;
|
||||
|
||||
@@ -27,8 +31,6 @@ namespace v2rayN.Handler
|
||||
/// <returns></returns>
|
||||
public static int GenerateClientConfig(Config config, string fileName, bool blExport, out string msg)
|
||||
{
|
||||
msg = string.Empty;
|
||||
|
||||
try
|
||||
{
|
||||
//检查GUI设置
|
||||
@@ -149,7 +151,7 @@ namespace v2rayN.Handler
|
||||
{
|
||||
try
|
||||
{
|
||||
var inbound = v2rayConfig.inbounds[0];
|
||||
Inbounds inbound = v2rayConfig.inbounds[0];
|
||||
//端口
|
||||
inbound.port = config.inbound[0].localPort;
|
||||
inbound.protocol = config.inbound[0].protocol;
|
||||
@@ -226,20 +228,24 @@ namespace v2rayN.Handler
|
||||
&& userRule.Count > 0)
|
||||
{
|
||||
//Domain
|
||||
RulesItem rulesDomain = new RulesItem();
|
||||
rulesDomain.type = "field";
|
||||
rulesDomain.outboundTag = tag;
|
||||
rulesDomain.domain = new List<string>();
|
||||
RulesItem rulesDomain = new RulesItem
|
||||
{
|
||||
type = "field",
|
||||
outboundTag = tag,
|
||||
domain = new List<string>()
|
||||
};
|
||||
|
||||
//IP
|
||||
RulesItem rulesIP = new RulesItem();
|
||||
rulesIP.type = "field";
|
||||
rulesIP.outboundTag = tag;
|
||||
rulesIP.ip = new List<string>();
|
||||
|
||||
for (int k = 0; k < userRule.Count; k++)
|
||||
RulesItem rulesIP = new RulesItem
|
||||
{
|
||||
string url = userRule[k].TrimEx();
|
||||
type = "field",
|
||||
outboundTag = tag,
|
||||
ip = new List<string>()
|
||||
};
|
||||
|
||||
foreach (string u in userRule)
|
||||
{
|
||||
string url = u.TrimEx();
|
||||
if (Utils.IsNullOrEmpty(url))
|
||||
{
|
||||
continue;
|
||||
@@ -283,10 +289,12 @@ namespace v2rayN.Handler
|
||||
//IP
|
||||
if (ipOrDomain == "ip" || ipOrDomain == "")
|
||||
{
|
||||
RulesItem rulesItem = new RulesItem();
|
||||
rulesItem.type = "field";
|
||||
rulesItem.outboundTag = Global.directTag;
|
||||
rulesItem.ip = new List<string>();
|
||||
RulesItem rulesItem = new RulesItem
|
||||
{
|
||||
type = "field",
|
||||
outboundTag = Global.directTag,
|
||||
ip = new List<string>()
|
||||
};
|
||||
rulesItem.ip.Add($"geoip:{code}");
|
||||
|
||||
v2rayConfig.routing.rules.Add(rulesItem);
|
||||
@@ -294,10 +302,12 @@ namespace v2rayN.Handler
|
||||
|
||||
if (ipOrDomain == "domain" || ipOrDomain == "")
|
||||
{
|
||||
RulesItem rulesItem = new RulesItem();
|
||||
rulesItem.type = "field";
|
||||
rulesItem.outboundTag = Global.directTag;
|
||||
rulesItem.domain = new List<string>();
|
||||
RulesItem rulesItem = new RulesItem
|
||||
{
|
||||
type = "field",
|
||||
outboundTag = Global.directTag,
|
||||
domain = new List<string>()
|
||||
};
|
||||
rulesItem.domain.Add($"geosite:{code}");
|
||||
v2rayConfig.routing.rules.Add(rulesItem);
|
||||
}
|
||||
@@ -319,7 +329,7 @@ namespace v2rayN.Handler
|
||||
{
|
||||
try
|
||||
{
|
||||
var outbound = v2rayConfig.outbounds[0];
|
||||
Outbounds outbound = v2rayConfig.outbounds[0];
|
||||
if (config.configType() == (int)EConfigType.Vmess)
|
||||
{
|
||||
VnextItem vnextItem;
|
||||
@@ -354,6 +364,7 @@ namespace v2rayN.Handler
|
||||
|
||||
//Mux
|
||||
outbound.mux.enabled = config.muxEnabled;
|
||||
outbound.mux.concurrency = config.muxEnabled ? 8 : -1;
|
||||
|
||||
//远程服务器底层传输配置
|
||||
StreamSettings streamSettings = outbound.streamSettings;
|
||||
@@ -384,6 +395,8 @@ namespace v2rayN.Handler
|
||||
serversItem.level = 1;
|
||||
|
||||
outbound.mux.enabled = false;
|
||||
outbound.mux.concurrency = -1;
|
||||
|
||||
|
||||
outbound.protocol = "shadowsocks";
|
||||
outbound.settings.vnext = null;
|
||||
@@ -403,19 +416,24 @@ namespace v2rayN.Handler
|
||||
//远程服务器地址和端口
|
||||
serversItem.address = config.address();
|
||||
serversItem.port = config.port();
|
||||
serversItem.method = null;
|
||||
serversItem.password = null;
|
||||
|
||||
if (!Utils.IsNullOrEmpty(config.security())
|
||||
&& !Utils.IsNullOrEmpty(config.id()))
|
||||
{
|
||||
var socksUsersItem = new SocksUsersItem();
|
||||
socksUsersItem.user = config.security();
|
||||
socksUsersItem.pass = config.id();
|
||||
socksUsersItem.level = 1;
|
||||
SocksUsersItem socksUsersItem = new SocksUsersItem
|
||||
{
|
||||
user = config.security(),
|
||||
pass = config.id(),
|
||||
level = 1
|
||||
};
|
||||
|
||||
serversItem.users = new List<SocksUsersItem>() { socksUsersItem };
|
||||
}
|
||||
|
||||
outbound.mux.enabled = false;
|
||||
outbound.mux.concurrency = -1;
|
||||
|
||||
outbound.protocol = "socks";
|
||||
outbound.settings.vnext = null;
|
||||
@@ -440,15 +458,16 @@ namespace v2rayN.Handler
|
||||
{
|
||||
//远程服务器底层传输配置
|
||||
streamSettings.network = config.network();
|
||||
var host = config.requestHost();
|
||||
|
||||
string host = config.requestHost();
|
||||
//if tls
|
||||
if (config.streamSecurity() == Global.StreamSecurity)
|
||||
{
|
||||
streamSettings.security = config.streamSecurity();
|
||||
|
||||
TlsSettings tlsSettings = new TlsSettings();
|
||||
tlsSettings.allowInsecure = config.allowInsecure();
|
||||
TlsSettings tlsSettings = new TlsSettings
|
||||
{
|
||||
allowInsecure = config.allowInsecure()
|
||||
};
|
||||
if (!string.IsNullOrWhiteSpace(host))
|
||||
{
|
||||
tlsSettings.serverName = host;
|
||||
@@ -461,9 +480,11 @@ namespace v2rayN.Handler
|
||||
{
|
||||
//kcp基本配置暂时是默认值,用户能自己设置伪装类型
|
||||
case "kcp":
|
||||
KcpSettings kcpSettings = new KcpSettings();
|
||||
kcpSettings.mtu = config.kcpItem.mtu;
|
||||
kcpSettings.tti = config.kcpItem.tti;
|
||||
KcpSettings kcpSettings = new KcpSettings
|
||||
{
|
||||
mtu = config.kcpItem.mtu,
|
||||
tti = config.kcpItem.tti
|
||||
};
|
||||
if (iobound.Equals("out"))
|
||||
{
|
||||
kcpSettings.uplinkCapacity = config.kcpItem.uplinkCapacity;
|
||||
@@ -483,20 +504,26 @@ namespace v2rayN.Handler
|
||||
kcpSettings.congestion = config.kcpItem.congestion;
|
||||
kcpSettings.readBufferSize = config.kcpItem.readBufferSize;
|
||||
kcpSettings.writeBufferSize = config.kcpItem.writeBufferSize;
|
||||
kcpSettings.header = new Header();
|
||||
kcpSettings.header.type = config.headerType();
|
||||
kcpSettings.header = new Header
|
||||
{
|
||||
type = config.headerType()
|
||||
};
|
||||
streamSettings.kcpSettings = kcpSettings;
|
||||
break;
|
||||
//ws
|
||||
case "ws":
|
||||
WsSettings wsSettings = new WsSettings();
|
||||
wsSettings.connectionReuse = true;
|
||||
WsSettings wsSettings = new WsSettings
|
||||
{
|
||||
connectionReuse = true
|
||||
};
|
||||
|
||||
string path = config.path();
|
||||
if (!string.IsNullOrWhiteSpace(host))
|
||||
{
|
||||
wsSettings.headers = new Headers();
|
||||
wsSettings.headers.Host = host;
|
||||
wsSettings.headers = new Headers
|
||||
{
|
||||
Host = host
|
||||
};
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(path))
|
||||
{
|
||||
@@ -530,22 +557,33 @@ namespace v2rayN.Handler
|
||||
break;
|
||||
//quic
|
||||
case "quic":
|
||||
QuicSettings quicsettings = new QuicSettings();
|
||||
quicsettings.security = host;
|
||||
quicsettings.key = config.path();
|
||||
quicsettings.header = new Header();
|
||||
quicsettings.header.type = config.headerType();
|
||||
|
||||
QuicSettings quicsettings = new QuicSettings
|
||||
{
|
||||
security = host,
|
||||
key = config.path(),
|
||||
header = new Header
|
||||
{
|
||||
type = config.headerType()
|
||||
}
|
||||
};
|
||||
streamSettings.quicSettings = quicsettings;
|
||||
if (config.streamSecurity() == Global.StreamSecurity)
|
||||
{
|
||||
streamSettings.tlsSettings.serverName = config.address();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
//tcp带http伪装
|
||||
if (config.headerType().Equals(Global.TcpHeaderHttp))
|
||||
{
|
||||
TcpSettings tcpSettings = new TcpSettings();
|
||||
tcpSettings.connectionReuse = true;
|
||||
tcpSettings.header = new Header();
|
||||
tcpSettings.header.type = config.headerType();
|
||||
TcpSettings tcpSettings = new TcpSettings
|
||||
{
|
||||
connectionReuse = true,
|
||||
header = new Header
|
||||
{
|
||||
type = config.headerType()
|
||||
}
|
||||
};
|
||||
|
||||
if (iobound.Equals("out"))
|
||||
{
|
||||
@@ -608,8 +646,10 @@ namespace v2rayN.Handler
|
||||
//}
|
||||
}
|
||||
//servers.Add("localhost");
|
||||
v2rayConfig.dns = new Mode.Dns();
|
||||
v2rayConfig.dns.servers = servers;
|
||||
v2rayConfig.dns = new Mode.Dns
|
||||
{
|
||||
servers = servers
|
||||
};
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -621,10 +661,10 @@ namespace v2rayN.Handler
|
||||
{
|
||||
if (config.enableStatistics)
|
||||
{
|
||||
var tag = Global.InboundAPITagName;
|
||||
var apiObj = new Mode.API();
|
||||
var policyObj = new Mode.Policy();
|
||||
var policySystemSetting = new Mode.SystemPolicy();
|
||||
string tag = Global.InboundAPITagName;
|
||||
API apiObj = new API();
|
||||
Policy policyObj = new Policy();
|
||||
SystemPolicy policySystemSetting = new SystemPolicy();
|
||||
|
||||
string[] services = { "StatsService" };
|
||||
|
||||
@@ -641,8 +681,8 @@ namespace v2rayN.Handler
|
||||
|
||||
if (!v2rayConfig.inbounds.Exists(item => { return item.tag == tag; }))
|
||||
{
|
||||
var apiInbound = new Mode.Inbounds();
|
||||
var apiInboundSettings = new Mode.Inboundsettings();
|
||||
Inbounds apiInbound = new Inbounds();
|
||||
Inboundsettings apiInboundSettings = new Inboundsettings();
|
||||
apiInbound.tag = tag;
|
||||
apiInbound.listen = Global.Loopback;
|
||||
apiInbound.port = Global.statePort;
|
||||
@@ -654,10 +694,12 @@ namespace v2rayN.Handler
|
||||
|
||||
if (!v2rayConfig.routing.rules.Exists(item => { return item.outboundTag == tag; }))
|
||||
{
|
||||
var apiRoutingRule = new Mode.RulesItem();
|
||||
apiRoutingRule.inboundTag = new List<string> { tag };
|
||||
apiRoutingRule.outboundTag = tag;
|
||||
apiRoutingRule.type = "field";
|
||||
RulesItem apiRoutingRule = new RulesItem
|
||||
{
|
||||
inboundTag = new List<string> { tag },
|
||||
outboundTag = tag,
|
||||
type = "field"
|
||||
};
|
||||
v2rayConfig.routing.rules.Add(apiRoutingRule);
|
||||
}
|
||||
}
|
||||
@@ -673,8 +715,6 @@ namespace v2rayN.Handler
|
||||
/// <returns></returns>
|
||||
public static int GenerateClientCustomConfig(Config config, string fileName, out string msg)
|
||||
{
|
||||
msg = string.Empty;
|
||||
|
||||
try
|
||||
{
|
||||
//检查GUI设置
|
||||
@@ -728,8 +768,6 @@ namespace v2rayN.Handler
|
||||
/// <returns></returns>
|
||||
public static int GenerateServerConfig(Config config, string fileName, out string msg)
|
||||
{
|
||||
msg = string.Empty;
|
||||
|
||||
try
|
||||
{
|
||||
//检查GUI设置
|
||||
@@ -792,7 +830,7 @@ namespace v2rayN.Handler
|
||||
{
|
||||
try
|
||||
{
|
||||
var inbound = v2rayConfig.inbounds[0];
|
||||
Inbounds inbound = v2rayConfig.inbounds[0];
|
||||
UsersItem usersItem;
|
||||
if (inbound.settings.clients.Count <= 0)
|
||||
{
|
||||
@@ -881,7 +919,7 @@ namespace v2rayN.Handler
|
||||
return null;
|
||||
}
|
||||
|
||||
var outbound = v2rayConfig.outbounds[0];
|
||||
Outbounds outbound = v2rayConfig.outbounds[0];
|
||||
if (outbound == null
|
||||
|| Utils.IsNullOrEmpty(outbound.protocol)
|
||||
|| outbound.protocol != "vmess"
|
||||
@@ -1027,7 +1065,7 @@ namespace v2rayN.Handler
|
||||
return null;
|
||||
}
|
||||
|
||||
var inbound = v2rayConfig.inbounds[0];
|
||||
Inbounds inbound = v2rayConfig.inbounds[0];
|
||||
if (inbound == null
|
||||
|| Utils.IsNullOrEmpty(inbound.protocol)
|
||||
|| inbound.protocol != "vmess"
|
||||
@@ -1161,7 +1199,7 @@ namespace v2rayN.Handler
|
||||
int indexSplit = result.IndexOf("?");
|
||||
if (indexSplit > 0)
|
||||
{
|
||||
vmessItem = ResolveVmess4Kitsunebi(result);
|
||||
vmessItem = ResolveStdVmess(result) ?? ResolveVmess4Kitsunebi(result);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1208,46 +1246,21 @@ namespace v2rayN.Handler
|
||||
{
|
||||
msg = UIRes.I18N("ConfigurationFormatIncorrect");
|
||||
|
||||
vmessItem.configType = (int)EConfigType.Shadowsocks;
|
||||
result = result.Substring(Global.ssProtocol.Length);
|
||||
//remark
|
||||
int indexRemark = result.IndexOf("#");
|
||||
if (indexRemark > 0)
|
||||
vmessItem = ResolveSSLegacy(result);
|
||||
if (vmessItem == null)
|
||||
{
|
||||
try
|
||||
{
|
||||
vmessItem.remarks = WebUtility.UrlDecode(result.Substring(indexRemark + 1, result.Length - indexRemark - 1));
|
||||
}
|
||||
catch { }
|
||||
result = result.Substring(0, indexRemark);
|
||||
vmessItem = ResolveSip002(result);
|
||||
}
|
||||
//part decode
|
||||
int indexS = result.IndexOf("@");
|
||||
if (indexS > 0)
|
||||
if (vmessItem == null)
|
||||
{
|
||||
result = Utils.Base64Decode(result.Substring(0, indexS)) + result.Substring(indexS, result.Length - indexS);
|
||||
return null;
|
||||
}
|
||||
else
|
||||
if (vmessItem.address.Length == 0 || vmessItem.port == 0 || vmessItem.security.Length == 0 || vmessItem.id.Length == 0)
|
||||
{
|
||||
result = Utils.Base64Decode(result);
|
||||
return null;
|
||||
}
|
||||
|
||||
string[] arr1 = result.Split('@');
|
||||
if (arr1.Length != 2)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
string[] arr21 = arr1[0].Split(':');
|
||||
//string[] arr22 = arr1[1].Split(':');
|
||||
int indexPort = arr1[1].LastIndexOf(":");
|
||||
if (arr21.Length != 2 || indexPort < 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
vmessItem.address = arr1[1].Substring(0, indexPort);
|
||||
vmessItem.port = Utils.ToInt(arr1[1].Substring(indexPort + 1, arr1[1].Length - (indexPort + 1)));
|
||||
vmessItem.security = arr21[0];
|
||||
vmessItem.id = arr21[1];
|
||||
vmessItem.configType = (int)EConfigType.Shadowsocks;
|
||||
}
|
||||
else if (result.StartsWith(Global.socksProtocol))
|
||||
{
|
||||
@@ -1318,7 +1331,6 @@ namespace v2rayN.Handler
|
||||
/// <returns></returns>
|
||||
public static int Export2ClientConfig(Config config, string fileName, out string msg)
|
||||
{
|
||||
msg = string.Empty;
|
||||
return GenerateClientConfig(config, fileName, true, out msg);
|
||||
}
|
||||
|
||||
@@ -1331,15 +1343,15 @@ namespace v2rayN.Handler
|
||||
/// <returns></returns>
|
||||
public static int Export2ServerConfig(Config config, string fileName, out string msg)
|
||||
{
|
||||
msg = string.Empty;
|
||||
return GenerateServerConfig(config, fileName, out msg);
|
||||
}
|
||||
|
||||
private static VmessItem ResolveVmess4Kitsunebi(string result)
|
||||
{
|
||||
VmessItem vmessItem = new VmessItem();
|
||||
|
||||
vmessItem.configType = (int)EConfigType.Vmess;
|
||||
VmessItem vmessItem = new VmessItem
|
||||
{
|
||||
configType = (int)EConfigType.Vmess
|
||||
};
|
||||
result = result.Substring(Global.vmessProtocol.Length);
|
||||
int indexSplit = result.IndexOf("?");
|
||||
if (indexSplit > 0)
|
||||
@@ -1373,15 +1385,184 @@ namespace v2rayN.Handler
|
||||
return vmessItem;
|
||||
}
|
||||
|
||||
private static VmessItem ResolveSip002(string result)
|
||||
{
|
||||
Uri parsedUrl;
|
||||
try
|
||||
{
|
||||
parsedUrl = new Uri(result);
|
||||
}
|
||||
catch (UriFormatException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
VmessItem server = new VmessItem
|
||||
{
|
||||
remarks = parsedUrl.GetComponents(UriComponents.Fragment, UriFormat.Unescaped),
|
||||
address = parsedUrl.IdnHost,
|
||||
port = parsedUrl.Port,
|
||||
};
|
||||
|
||||
// parse base64 UserInfo
|
||||
string rawUserInfo = parsedUrl.GetComponents(UriComponents.UserInfo, UriFormat.Unescaped);
|
||||
string base64 = rawUserInfo.Replace('-', '+').Replace('_', '/'); // Web-safe base64 to normal base64
|
||||
string userInfo;
|
||||
try
|
||||
{
|
||||
userInfo = Encoding.UTF8.GetString(Convert.FromBase64String(
|
||||
base64.PadRight(base64.Length + (4 - base64.Length % 4) % 4, '=')));
|
||||
}
|
||||
catch (FormatException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
string[] userInfoParts = userInfo.Split(new char[] { ':' }, 2);
|
||||
if (userInfoParts.Length != 2)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
server.security = userInfoParts[0];
|
||||
server.id = userInfoParts[1];
|
||||
|
||||
NameValueCollection queryParameters = HttpUtility.ParseQueryString(parsedUrl.Query);
|
||||
if (queryParameters["plugin"] != null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return server;
|
||||
}
|
||||
|
||||
private static readonly Regex UrlFinder = new Regex(@"ss://(?<base64>[A-Za-z0-9+-/=_]+)(?:#(?<tag>\S+))?", RegexOptions.IgnoreCase);
|
||||
private static readonly Regex DetailsParser = new Regex(@"^((?<method>.+?):(?<password>.*)@(?<hostname>.+?):(?<port>\d+?))$", RegexOptions.IgnoreCase);
|
||||
|
||||
private static VmessItem ResolveSSLegacy(string result)
|
||||
{
|
||||
var match = UrlFinder.Match(result);
|
||||
if (!match.Success)
|
||||
return null;
|
||||
|
||||
VmessItem server = new VmessItem();
|
||||
var base64 = match.Groups["base64"].Value.TrimEnd('/');
|
||||
var tag = match.Groups["tag"].Value;
|
||||
if (!tag.IsNullOrEmpty())
|
||||
{
|
||||
server.remarks = HttpUtility.UrlDecode(tag, Encoding.UTF8);
|
||||
}
|
||||
Match details;
|
||||
try
|
||||
{
|
||||
details = DetailsParser.Match(Encoding.UTF8.GetString(Convert.FromBase64String(
|
||||
base64.PadRight(base64.Length + (4 - base64.Length % 4) % 4, '='))));
|
||||
}
|
||||
catch (FormatException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if (!details.Success)
|
||||
return null;
|
||||
server.security = details.Groups["method"].Value;
|
||||
server.id = details.Groups["password"].Value;
|
||||
server.address = details.Groups["hostname"].Value;
|
||||
server.port = int.Parse(details.Groups["port"].Value);
|
||||
return server;
|
||||
}
|
||||
|
||||
|
||||
private static readonly Regex StdVmessUserInfo = new Regex(
|
||||
@"^(?<network>[a-z]+)(\+(?<streamSecurity>[a-z]+))?:(?<id>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})-(?<alterId>[0-9]+)$");
|
||||
|
||||
private static VmessItem ResolveStdVmess(string result)
|
||||
{
|
||||
VmessItem i = new VmessItem
|
||||
{
|
||||
configType = (int)EConfigType.Vmess,
|
||||
security = "auto"
|
||||
};
|
||||
|
||||
Uri u = new Uri(result);
|
||||
|
||||
i.address = u.IdnHost;
|
||||
i.port = u.Port;
|
||||
i.remarks = u.GetComponents(UriComponents.Fragment, UriFormat.Unescaped);
|
||||
var q = HttpUtility.ParseQueryString(u.Query);
|
||||
|
||||
var m = StdVmessUserInfo.Match(u.UserInfo);
|
||||
if (!m.Success) return null;
|
||||
|
||||
i.id = m.Groups["id"].Value;
|
||||
if (!int.TryParse(m.Groups["alterId"].Value, out int aid))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
i.alterId = aid;
|
||||
|
||||
if (m.Groups["streamSecurity"].Success)
|
||||
{
|
||||
i.streamSecurity = m.Groups["streamSecurity"].Value;
|
||||
}
|
||||
switch (i.streamSecurity)
|
||||
{
|
||||
case "tls":
|
||||
// TODO tls config
|
||||
break;
|
||||
default:
|
||||
if (!string.IsNullOrWhiteSpace(i.streamSecurity))
|
||||
return null;
|
||||
break;
|
||||
}
|
||||
|
||||
i.network = m.Groups["network"].Value;
|
||||
switch (i.network)
|
||||
{
|
||||
case "tcp":
|
||||
string t1 = q["type"] ?? "none";
|
||||
i.headerType = t1;
|
||||
// TODO http option
|
||||
|
||||
break;
|
||||
case "kcp":
|
||||
i.headerType = q["type"] ?? "none";
|
||||
// TODO kcp seed
|
||||
break;
|
||||
|
||||
case "ws":
|
||||
string p1 = q["path"] ?? "/";
|
||||
string h1 = q["host"] ?? "";
|
||||
i.requestHost = h1;
|
||||
i.path = p1;
|
||||
break;
|
||||
|
||||
case "http":
|
||||
i.network = "h2";
|
||||
string p2 = q["path"] ?? "/";
|
||||
string h2 = q["host"] ?? "";
|
||||
i.requestHost = h2;
|
||||
i.path = p2;
|
||||
break;
|
||||
|
||||
case "quic":
|
||||
string s = q["security"] ?? "none";
|
||||
string k = q["key"] ?? "";
|
||||
string t3 = q["type"] ?? "none";
|
||||
i.headerType = t3;
|
||||
i.requestHost = s;
|
||||
i.path = k;
|
||||
break;
|
||||
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Gen speedtest config
|
||||
|
||||
|
||||
public static int GenerateClientSpeedtestConfig(Config config, List<int> selecteds, string fileName, out string msg)
|
||||
public static string GenerateClientSpeedtestConfigString(Config config, List<int> selecteds, out string msg)
|
||||
{
|
||||
msg = string.Empty;
|
||||
|
||||
try
|
||||
{
|
||||
if (config == null
|
||||
@@ -1391,71 +1572,75 @@ namespace v2rayN.Handler
|
||||
)
|
||||
{
|
||||
msg = UIRes.I18N("CheckServerSettings");
|
||||
return -1;
|
||||
return "";
|
||||
}
|
||||
|
||||
msg = UIRes.I18N("InitialConfiguration");
|
||||
|
||||
Config configCopy = Utils.DeepCopy(config);
|
||||
|
||||
string result = Utils.GetEmbedText(SampleClient);
|
||||
if (Utils.IsNullOrEmpty(result))
|
||||
{
|
||||
msg = UIRes.I18N("FailedGetDefaultConfiguration");
|
||||
return -1;
|
||||
return "";
|
||||
}
|
||||
|
||||
V2rayConfig v2rayConfig = Utils.FromJson<V2rayConfig>(result);
|
||||
if (v2rayConfig == null)
|
||||
{
|
||||
msg = UIRes.I18N("FailedGenDefaultConfiguration");
|
||||
return -1;
|
||||
return "";
|
||||
}
|
||||
|
||||
log(config, ref v2rayConfig, false);
|
||||
log(configCopy, ref v2rayConfig, false);
|
||||
//routing(config, ref v2rayConfig);
|
||||
dns(config, ref v2rayConfig);
|
||||
dns(configCopy, ref v2rayConfig);
|
||||
|
||||
v2rayConfig.inbounds.RemoveAt(0); // Remove "proxy" service for speedtest, avoiding port conflicts.
|
||||
|
||||
var httpPort = config.GetLocalPort("speedtest");
|
||||
for (int k = 0; k < selecteds.Count; k++)
|
||||
int httpPort = configCopy.GetLocalPort("speedtest");
|
||||
foreach (int index in selecteds)
|
||||
{
|
||||
int index = selecteds[k];
|
||||
if (config.vmess[index].configType == (int)EConfigType.Custom)
|
||||
if (configCopy.vmess[index].configType == (int)EConfigType.Custom)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
config.index = index;
|
||||
configCopy.index = index;
|
||||
|
||||
var inbound = new Inbounds();
|
||||
inbound.listen = Global.Loopback;
|
||||
inbound.port = httpPort + index;
|
||||
inbound.protocol = Global.InboundHttp;
|
||||
Inbounds inbound = new Inbounds
|
||||
{
|
||||
listen = Global.Loopback,
|
||||
port = httpPort + index,
|
||||
protocol = Global.InboundHttp
|
||||
};
|
||||
inbound.tag = Global.InboundHttp + inbound.port.ToString();
|
||||
v2rayConfig.inbounds.Add(inbound);
|
||||
|
||||
|
||||
var v2rayConfigCopy = Utils.FromJson<V2rayConfig>(result);
|
||||
outbound(config, ref v2rayConfigCopy);
|
||||
V2rayConfig v2rayConfigCopy = Utils.FromJson<V2rayConfig>(result);
|
||||
outbound(configCopy, ref v2rayConfigCopy);
|
||||
v2rayConfigCopy.outbounds[0].tag = Global.agentTag + inbound.port.ToString();
|
||||
v2rayConfig.outbounds.Add(v2rayConfigCopy.outbounds[0]);
|
||||
|
||||
var rule = new Mode.RulesItem();
|
||||
rule.inboundTag = new List<string> { inbound.tag };
|
||||
rule.outboundTag = v2rayConfigCopy.outbounds[0].tag;
|
||||
rule.type = "field";
|
||||
RulesItem rule = new RulesItem
|
||||
{
|
||||
inboundTag = new List<string> { inbound.tag },
|
||||
outboundTag = v2rayConfigCopy.outbounds[0].tag,
|
||||
type = "field"
|
||||
};
|
||||
v2rayConfig.routing.rules.Add(rule);
|
||||
}
|
||||
|
||||
Utils.ToJsonFile(v2rayConfig, fileName);
|
||||
|
||||
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), config.getSummary());
|
||||
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), configCopy.getSummary());
|
||||
return Utils.ToJson(v2rayConfig);
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch
|
||||
{
|
||||
msg = UIRes.I18N("FailedGenDefaultConfiguration");
|
||||
return -1;
|
||||
return "";
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using v2rayN.Mode;
|
||||
|
||||
namespace v2rayN.Handler
|
||||
@@ -22,13 +23,16 @@ namespace v2rayN.Handler
|
||||
private static string v2rayConfigRes = Global.v2rayConfigFileName;
|
||||
private List<string> lstV2ray;
|
||||
public event ProcessDelegate ProcessEvent;
|
||||
private int processId = 0;
|
||||
//private int processId = 0;
|
||||
private Process _process;
|
||||
|
||||
public V2rayHandler()
|
||||
{
|
||||
lstV2ray = new List<string>();
|
||||
lstV2ray.Add("wv2ray");
|
||||
lstV2ray.Add("v2ray");
|
||||
lstV2ray = new List<string>
|
||||
{
|
||||
"wv2ray",
|
||||
"v2ray"
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -38,9 +42,8 @@ namespace v2rayN.Handler
|
||||
{
|
||||
if (Global.reloadV2ray)
|
||||
{
|
||||
string msg = string.Empty;
|
||||
string fileName = Utils.GetPath(v2rayConfigRes);
|
||||
if (V2rayConfigHandler.GenerateClientConfig(config, fileName, false, out msg) != 0)
|
||||
if (V2rayConfigHandler.GenerateClientConfig(config, fileName, false, out string msg) != 0)
|
||||
{
|
||||
ShowMsg(false, msg);
|
||||
}
|
||||
@@ -53,24 +56,25 @@ namespace v2rayN.Handler
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 载入V2ray
|
||||
/// 新建进程,载入V2ray配置文件字符串
|
||||
/// 返回新进程pid。
|
||||
/// </summary>
|
||||
public void LoadV2ray(Config config, List<int> _selecteds)
|
||||
public int LoadV2rayConfigString(Config config, List<int> _selecteds)
|
||||
{
|
||||
if (Global.reloadV2ray)
|
||||
int pid = -1;
|
||||
string configStr = V2rayConfigHandler.GenerateClientSpeedtestConfigString(config, _selecteds, out string msg);
|
||||
if (configStr == "")
|
||||
{
|
||||
string msg = string.Empty;
|
||||
string fileName = Utils.GetPath(v2rayConfigRes);
|
||||
if (V2rayConfigHandler.GenerateClientSpeedtestConfig(config, _selecteds, fileName, out msg) != 0)
|
||||
{
|
||||
ShowMsg(false, msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowMsg(true, msg);
|
||||
V2rayRestart();
|
||||
}
|
||||
ShowMsg(false, msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowMsg(false, msg);
|
||||
pid = V2rayStartNew(configStr);
|
||||
//V2rayRestart();
|
||||
// start with -config
|
||||
}
|
||||
return pid;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -89,33 +93,92 @@ namespace v2rayN.Handler
|
||||
{
|
||||
try
|
||||
{
|
||||
bool blExist = true;
|
||||
if (processId > 0)
|
||||
if (_process != null)
|
||||
{
|
||||
Process p1 = Process.GetProcessById(processId);
|
||||
if (p1 != null)
|
||||
{
|
||||
p1.Kill();
|
||||
blExist = false;
|
||||
}
|
||||
KillProcess(_process);
|
||||
_process.Dispose();
|
||||
_process = null;
|
||||
}
|
||||
if (blExist)
|
||||
else
|
||||
{
|
||||
foreach (string vName in lstV2ray)
|
||||
{
|
||||
Process[] killPro = Process.GetProcessesByName(vName);
|
||||
foreach (Process p in killPro)
|
||||
Process[] existing = Process.GetProcessesByName(vName);
|
||||
foreach (Process p in existing)
|
||||
{
|
||||
p.Kill();
|
||||
string path = p.MainModule.FileName;
|
||||
if (path == $"{Utils.GetPath(vName)}.exe")
|
||||
{
|
||||
KillProcess(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//bool blExist = true;
|
||||
//if (processId > 0)
|
||||
//{
|
||||
// Process p1 = Process.GetProcessById(processId);
|
||||
// if (p1 != null)
|
||||
// {
|
||||
// p1.Kill();
|
||||
// blExist = false;
|
||||
// }
|
||||
//}
|
||||
//if (blExist)
|
||||
//{
|
||||
// foreach (string vName in lstV2ray)
|
||||
// {
|
||||
// Process[] killPro = Process.GetProcessesByName(vName);
|
||||
// foreach (Process p in killPro)
|
||||
// {
|
||||
// p.Kill();
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// V2ray停止
|
||||
/// </summary>
|
||||
public void V2rayStopPid(int pid)
|
||||
{
|
||||
try
|
||||
{
|
||||
Process _p = Process.GetProcessById(pid);
|
||||
KillProcess(_p);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
|
||||
private string V2rayFindexe() {
|
||||
//查找v2ray文件是否存在
|
||||
string fileName = string.Empty;
|
||||
lstV2ray.Reverse();
|
||||
foreach (string name in lstV2ray)
|
||||
{
|
||||
string vName = string.Format("{0}.exe", name);
|
||||
vName = Utils.GetPath(vName);
|
||||
if (File.Exists(vName))
|
||||
{
|
||||
fileName = vName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (Utils.IsNullOrEmpty(fileName))
|
||||
{
|
||||
string msg = string.Format(UIRes.I18N("NotFoundCore"), @"https://github.com/v2fly/v2ray-core/releases");
|
||||
ShowMsg(false, msg);
|
||||
}
|
||||
return fileName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// V2ray启动
|
||||
@@ -126,30 +189,77 @@ namespace v2rayN.Handler
|
||||
|
||||
try
|
||||
{
|
||||
//查找v2ray文件是否存在
|
||||
string fileName = string.Empty;
|
||||
for (int k = 0; k < lstV2ray.Count; k++)
|
||||
string fileName = V2rayFindexe();
|
||||
if (fileName == "") return;
|
||||
|
||||
Process p = new Process
|
||||
{
|
||||
string vName = string.Format("{0}.exe", lstV2ray[k]);
|
||||
vName = Utils.GetPath(vName);
|
||||
if (File.Exists(vName))
|
||||
StartInfo = new ProcessStartInfo
|
||||
{
|
||||
fileName = vName;
|
||||
break;
|
||||
FileName = fileName,
|
||||
WorkingDirectory = Utils.StartupPath(),
|
||||
UseShellExecute = false,
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
CreateNoWindow = true,
|
||||
StandardOutputEncoding = Encoding.UTF8
|
||||
}
|
||||
}
|
||||
if (Utils.IsNullOrEmpty(fileName))
|
||||
};
|
||||
p.OutputDataReceived += new DataReceivedEventHandler((sender, e) =>
|
||||
{
|
||||
string msg = string.Format(UIRes.I18N("NotFoundCore"), @"https://github.com/v2ray/v2ray-core/releases");
|
||||
ShowMsg(true, msg);
|
||||
return;
|
||||
if (!String.IsNullOrEmpty(e.Data))
|
||||
{
|
||||
string msg = e.Data + Environment.NewLine;
|
||||
ShowMsg(false, msg);
|
||||
}
|
||||
});
|
||||
p.Start();
|
||||
p.PriorityClass = ProcessPriorityClass.High;
|
||||
p.BeginOutputReadLine();
|
||||
//processId = p.Id;
|
||||
_process = p;
|
||||
|
||||
if (p.WaitForExit(1000))
|
||||
{
|
||||
throw new Exception(p.StandardError.ReadToEnd());
|
||||
}
|
||||
|
||||
Process p = new Process();
|
||||
p.StartInfo.FileName = fileName;
|
||||
p.StartInfo.UseShellExecute = false;
|
||||
p.StartInfo.RedirectStandardOutput = true;
|
||||
p.StartInfo.CreateNoWindow = true;
|
||||
Global.processJob.AddProcess(p.Handle);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
string msg = ex.Message;
|
||||
ShowMsg(true, msg);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// V2ray启动,新建进程,传入配置字符串
|
||||
/// </summary>
|
||||
private int V2rayStartNew(string configStr)
|
||||
{
|
||||
ShowMsg(false, string.Format(UIRes.I18N("StartService"), DateTime.Now.ToString()));
|
||||
|
||||
try
|
||||
{
|
||||
string fileName = V2rayFindexe();
|
||||
if (fileName == "") return -1;
|
||||
|
||||
Process p = new Process
|
||||
{
|
||||
StartInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = fileName,
|
||||
Arguments = "-config stdin:",
|
||||
WorkingDirectory = Utils.StartupPath(),
|
||||
UseShellExecute = false,
|
||||
RedirectStandardInput = true,
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
CreateNoWindow = true,
|
||||
StandardOutputEncoding = Encoding.UTF8
|
||||
}
|
||||
};
|
||||
p.OutputDataReceived += new DataReceivedEventHandler((sender, e) =>
|
||||
{
|
||||
if (!String.IsNullOrEmpty(e.Data))
|
||||
@@ -160,27 +270,53 @@ namespace v2rayN.Handler
|
||||
});
|
||||
p.Start();
|
||||
p.BeginOutputReadLine();
|
||||
processId = p.Id;
|
||||
|
||||
p.StandardInput.Write(configStr);
|
||||
p.StandardInput.Close();
|
||||
|
||||
if (p.WaitForExit(1000))
|
||||
{
|
||||
throw new Exception(p.StandardError.ReadToEnd());
|
||||
}
|
||||
|
||||
Global.processJob.AddProcess(p.Handle);
|
||||
return p.Id;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
string msg = ex.Message;
|
||||
ShowMsg(true, msg);
|
||||
ShowMsg(false, msg);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 消息委托
|
||||
/// </summary>
|
||||
/// <param name="notify"></param>
|
||||
/// <param name="msg"></param>
|
||||
private void ShowMsg(bool notify, string msg)
|
||||
/// <param name="updateToTrayTooltip">是否更新托盘图标的工具提示</param>
|
||||
/// <param name="msg">输出到日志框</param>
|
||||
private void ShowMsg(bool updateToTrayTooltip, string msg)
|
||||
{
|
||||
if (ProcessEvent != null)
|
||||
{
|
||||
ProcessEvent(notify, msg);
|
||||
}
|
||||
ProcessEvent?.Invoke(updateToTrayTooltip, msg);
|
||||
}
|
||||
|
||||
private void KillProcess(Process p)
|
||||
{
|
||||
try
|
||||
{
|
||||
p.CloseMainWindow();
|
||||
p.WaitForExit(100);
|
||||
if (!p.HasExited)
|
||||
{
|
||||
p.Kill();
|
||||
p.WaitForExit(100);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,151 +1,186 @@
|
||||
using System;
|
||||
using v2rayN.Mode;
|
||||
|
||||
namespace v2rayN.HttpProxyHandler
|
||||
{
|
||||
/// <summary>
|
||||
/// 系统代理(http)总处理
|
||||
/// 启动privoxy提供http协议
|
||||
/// 使用SysProxy设置IE系统代理或者PAC模式
|
||||
/// </summary>
|
||||
class HttpProxyHandle
|
||||
{
|
||||
private static bool Update(Config config, bool forceDisable)
|
||||
{
|
||||
int type = config.listenerType;
|
||||
|
||||
if (forceDisable)
|
||||
{
|
||||
type = 0;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (type != 0)
|
||||
{
|
||||
var port = Global.httpPort;
|
||||
if (port <= 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (type == 1)
|
||||
{
|
||||
//PACServerHandle.Stop();
|
||||
SysProxyHandle.SetIEProxy(true, true, $"{Global.Loopback}:{port}", null);
|
||||
}
|
||||
else if (type == 2)
|
||||
{
|
||||
string pacUrl = GetPacUrl();
|
||||
SysProxyHandle.SetIEProxy(true, false, null, pacUrl);
|
||||
//PACServerHandle.Stop();
|
||||
PACServerHandle.Init(config);
|
||||
}
|
||||
else if (type == 3)
|
||||
{
|
||||
//PACServerHandle.Stop();
|
||||
SysProxyHandle.SetIEProxy(false, false, null, null);
|
||||
}
|
||||
else if (type == 4)
|
||||
{
|
||||
string pacUrl = GetPacUrl();
|
||||
SysProxyHandle.SetIEProxy(false, false, null, null);
|
||||
//PACServerHandle.Stop();
|
||||
PACServerHandle.Init(config);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SysProxyHandle.SetIEProxy(false, false, null, null);
|
||||
//PACServerHandle.Stop();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 启用系统代理(http)
|
||||
/// </summary>
|
||||
/// <param name="config"></param>
|
||||
private static void StartHttpAgent(Config config)
|
||||
{
|
||||
try
|
||||
{
|
||||
int localPort = config.GetLocalPort(Global.InboundSocks);
|
||||
if (localPort > 0)
|
||||
{
|
||||
PrivoxyHandler.Instance.Start(localPort, config);
|
||||
if (PrivoxyHandler.Instance.RunningPort > 0)
|
||||
{
|
||||
Global.sysAgent = true;
|
||||
Global.socksPort = localPort;
|
||||
Global.httpPort = PrivoxyHandler.Instance.RunningPort;
|
||||
Global.pacPort = config.GetLocalPort("pac");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭系统代理
|
||||
/// </summary>
|
||||
/// <param name="config"></param>
|
||||
public static void CloseHttpAgent(Config config)
|
||||
{
|
||||
try
|
||||
{
|
||||
Update(config, true);
|
||||
|
||||
PrivoxyHandler.Instance.Stop();
|
||||
|
||||
Global.sysAgent = false;
|
||||
Global.socksPort = 0;
|
||||
Global.httpPort = 0;
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重启系统代理(http)
|
||||
/// </summary>
|
||||
/// <param name="config"></param>
|
||||
/// <param name="forced"></param>
|
||||
public static void RestartHttpAgent(Config config, bool forced)
|
||||
{
|
||||
bool isRestart = false;
|
||||
//强制重启或者socks端口变化
|
||||
if (forced)
|
||||
{
|
||||
isRestart = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
int localPort = config.GetLocalPort(Global.InboundSocks);
|
||||
if (localPort != Global.socksPort)
|
||||
{
|
||||
isRestart = true;
|
||||
}
|
||||
}
|
||||
if (isRestart)
|
||||
{
|
||||
CloseHttpAgent(config);
|
||||
StartHttpAgent(config);
|
||||
}
|
||||
Update(config, false);
|
||||
}
|
||||
|
||||
public static string GetPacUrl()
|
||||
{
|
||||
string pacUrl = $"http://{Global.Loopback}:{Global.pacPort}/pac/?t={ DateTime.Now.ToString("HHmmss")}";
|
||||
return pacUrl;
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using v2rayN.Mode;
|
||||
|
||||
namespace v2rayN.HttpProxyHandler
|
||||
{
|
||||
/// <summary>
|
||||
/// 系统代理(http)模式
|
||||
/// </summary>
|
||||
public enum ListenerType
|
||||
{
|
||||
noHttpProxy = 0,
|
||||
GlobalHttp = 1,
|
||||
GlobalPac = 2,
|
||||
HttpOpenAndClear = 3,
|
||||
PacOpenAndClear = 4,
|
||||
HttpOpenOnly = 5,
|
||||
PacOpenOnly = 6
|
||||
}
|
||||
/// <summary>
|
||||
/// 系统代理(http)总处理
|
||||
/// 启动privoxy提供http协议
|
||||
/// 设置IE系统代理或者PAC模式
|
||||
/// </summary>
|
||||
class HttpProxyHandle
|
||||
{
|
||||
private static bool Update(Config config, bool forceDisable)
|
||||
{
|
||||
ListenerType type = config.listenerType;
|
||||
|
||||
if (forceDisable)
|
||||
{
|
||||
type = ListenerType.noHttpProxy;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (type != ListenerType.noHttpProxy)
|
||||
{
|
||||
int port = Global.httpPort;
|
||||
if (port <= 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (type == ListenerType.GlobalHttp)
|
||||
{
|
||||
//PACServerHandle.Stop();
|
||||
//ProxySetting.SetProxy($"{Global.Loopback}:{port}", Global.IEProxyExceptions, 2);
|
||||
SysProxyHandle.SetIEProxy(true, true, $"{Global.Loopback}:{port}");
|
||||
}
|
||||
else if (type == ListenerType.GlobalPac)
|
||||
{
|
||||
string pacUrl = GetPacUrl();
|
||||
//ProxySetting.SetProxy(pacUrl, "", 4);
|
||||
SysProxyHandle.SetIEProxy(true, false, pacUrl);
|
||||
//PACServerHandle.Stop();
|
||||
PACServerHandle.Init(config);
|
||||
}
|
||||
else if (type == ListenerType.HttpOpenAndClear)
|
||||
{
|
||||
//PACServerHandle.Stop();
|
||||
SysProxyHandle.ResetIEProxy();
|
||||
}
|
||||
else if (type == ListenerType.PacOpenAndClear)
|
||||
{
|
||||
string pacUrl = GetPacUrl();
|
||||
SysProxyHandle.ResetIEProxy();
|
||||
//PACServerHandle.Stop();
|
||||
PACServerHandle.Init(config);
|
||||
}
|
||||
else if (type == ListenerType.HttpOpenOnly)
|
||||
{
|
||||
//PACServerHandle.Stop();
|
||||
//SysProxyHandle.ResetIEProxy();
|
||||
}
|
||||
else if (type == ListenerType.PacOpenOnly)
|
||||
{
|
||||
string pacUrl = GetPacUrl();
|
||||
//SysProxyHandle.ResetIEProxy();
|
||||
//PACServerHandle.Stop();
|
||||
PACServerHandle.Init(config);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SysProxyHandle.ResetIEProxy();
|
||||
//PACServerHandle.Stop();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 启用系统代理(http)
|
||||
/// </summary>
|
||||
/// <param name="config"></param>
|
||||
private static void StartHttpAgent(Config config)
|
||||
{
|
||||
try
|
||||
{
|
||||
int localPort = config.GetLocalPort(Global.InboundSocks);
|
||||
if (localPort > 0)
|
||||
{
|
||||
PrivoxyHandler.Instance.Restart(localPort, config);
|
||||
if (PrivoxyHandler.Instance.RunningPort > 0)
|
||||
{
|
||||
Global.sysAgent = true;
|
||||
Global.socksPort = localPort;
|
||||
Global.httpPort = PrivoxyHandler.Instance.RunningPort;
|
||||
Global.pacPort = config.GetLocalPort("pac");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭系统代理
|
||||
/// </summary>
|
||||
/// <param name="config"></param>
|
||||
public static void CloseHttpAgent(Config config)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (config.listenerType != ListenerType.HttpOpenOnly && config.listenerType != ListenerType.PacOpenOnly)
|
||||
{
|
||||
Update(config, true);
|
||||
}
|
||||
|
||||
PrivoxyHandler.Instance.Stop();
|
||||
|
||||
Global.sysAgent = false;
|
||||
Global.socksPort = 0;
|
||||
Global.httpPort = 0;
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重启系统代理(http)
|
||||
/// </summary>
|
||||
/// <param name="config"></param>
|
||||
/// <param name="forced"></param>
|
||||
public static void RestartHttpAgent(Config config, bool forced)
|
||||
{
|
||||
bool isRestart = false;
|
||||
if (config.listenerType == ListenerType.noHttpProxy)
|
||||
{
|
||||
// 关闭http proxy时,直接返回
|
||||
return;
|
||||
}
|
||||
//强制重启或者socks端口变化
|
||||
if (forced)
|
||||
{
|
||||
isRestart = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
int localPort = config.GetLocalPort(Global.InboundSocks);
|
||||
if (localPort != Global.socksPort)
|
||||
{
|
||||
isRestart = true;
|
||||
}
|
||||
}
|
||||
if (isRestart)
|
||||
{
|
||||
CloseHttpAgent(config);
|
||||
StartHttpAgent(config);
|
||||
}
|
||||
Update(config, false);
|
||||
}
|
||||
|
||||
public static string GetPacUrl()
|
||||
{
|
||||
string pacUrl = $"http://{Global.Loopback}:{Global.pacPort}/pac/?t={ DateTime.Now.ToString("HHmmss")}";
|
||||
return pacUrl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
using v2rayN.Base;
|
||||
using v2rayN.Mode;
|
||||
using v2rayN.Properties;
|
||||
|
||||
namespace v2rayN.HttpProxyHandler
|
||||
{
|
||||
/// <summary>
|
||||
/// 提供PAC功能支持
|
||||
/// </summary>
|
||||
class PACListHandle
|
||||
{
|
||||
public event EventHandler<ResultEventArgs> UpdateCompleted;
|
||||
|
||||
public event ErrorEventHandler Error;
|
||||
|
||||
public class ResultEventArgs : EventArgs
|
||||
{
|
||||
public bool Success;
|
||||
|
||||
public ResultEventArgs(bool success)
|
||||
{
|
||||
this.Success = success;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static readonly IEnumerable<char> IgnoredLineBegins = new[] { '!', '[' };
|
||||
|
||||
public void UpdatePACFromGFWList(Config config)
|
||||
{
|
||||
string url = Global.GFWLIST_URL;
|
||||
if (!Utils.IsNullOrEmpty(config.urlGFWList))
|
||||
{
|
||||
url = config.urlGFWList;
|
||||
}
|
||||
|
||||
//默认用户已开启系统代理
|
||||
//var httpProxy = config.inbound.FirstOrDefault(x => x.protocol=="http");
|
||||
//if (httpProxy == null)
|
||||
//{
|
||||
// throw new Exception("未发现HTTP代理,无法设置代理更新");
|
||||
//}
|
||||
var http = new WebClientEx();
|
||||
//http.Headers.Add("Connection", "Close");
|
||||
//http.Proxy = new WebProxy(IPAddress.Loopback.ToString(), httpProxy.localPort);
|
||||
http.DownloadStringCompleted += http_DownloadStringCompleted;
|
||||
http.DownloadStringAsync(new Uri(url));
|
||||
}
|
||||
|
||||
private void http_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
File.WriteAllText(Utils.GetTempPath("gfwlist.txt"), e.Result, Encoding.UTF8);
|
||||
List<string> lines = ParseResult(e.Result);
|
||||
string abpContent = Utils.UnGzip(Resources.abp_js);
|
||||
abpContent = abpContent.Replace("__RULES__", JsonConvert.SerializeObject(lines, Formatting.Indented));
|
||||
File.WriteAllText(Utils.GetPath(Global.pacFILE), abpContent, Encoding.UTF8);
|
||||
if (UpdateCompleted != null) UpdateCompleted(this, new ResultEventArgs(true));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
|
||||
if (Error != null) Error(this, new ErrorEventArgs(ex));
|
||||
}
|
||||
}
|
||||
|
||||
public static List<string> ParseResult(string response)
|
||||
{
|
||||
byte[] bytes = Convert.FromBase64String(response);
|
||||
string content = Encoding.UTF8.GetString(bytes);
|
||||
List<string> valid_lines = new List<string>();
|
||||
using (var sr = new StringReader(content))
|
||||
{
|
||||
foreach (var line in sr.NonWhiteSpaceLines())
|
||||
{
|
||||
if (line.BeginWithAny(IgnoredLineBegins))
|
||||
continue;
|
||||
valid_lines.Add(line);
|
||||
}
|
||||
}
|
||||
return valid_lines;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@ namespace v2rayN.HttpProxyHandler
|
||||
private static int pacPort = 0;
|
||||
private static HttpWebServer server;
|
||||
private static HttpWebServerB serverB;
|
||||
private static Config _config;
|
||||
|
||||
public static bool IsRunning
|
||||
{
|
||||
@@ -28,6 +29,7 @@ namespace v2rayN.HttpProxyHandler
|
||||
|
||||
public static void Init(Config config)
|
||||
{
|
||||
_config = config;
|
||||
Global.pacPort = config.GetLocalPort("pac");
|
||||
|
||||
if (InitServer("*"))
|
||||
@@ -112,7 +114,7 @@ namespace v2rayN.HttpProxyHandler
|
||||
{
|
||||
try
|
||||
{
|
||||
var pac = GetPacList(address);
|
||||
string pac = GetPacList(address);
|
||||
return pac;
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -161,27 +163,40 @@ namespace v2rayN.HttpProxyHandler
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
private static string GetPacList(string address)
|
||||
{
|
||||
var port = Global.httpPort;
|
||||
int port = Global.httpPort;
|
||||
if (port <= 0)
|
||||
{
|
||||
return "No port";
|
||||
}
|
||||
try
|
||||
{
|
||||
List<string> lstProxy = new List<string>();
|
||||
lstProxy.Add(string.Format("PROXY {0}:{1};", address, port));
|
||||
var proxy = string.Join("", lstProxy.ToArray());
|
||||
List<string> lstProxy = new List<string>
|
||||
{
|
||||
string.Format("PROXY {0}:{1};", address, port)
|
||||
};
|
||||
string proxy = string.Join("", lstProxy.ToArray());
|
||||
|
||||
string strPacfile = Utils.GetPath(Global.pacFILE);
|
||||
if (!File.Exists(strPacfile))
|
||||
{
|
||||
FileManager.UncompressFile(strPacfile, Resources.pac_txt);
|
||||
}
|
||||
var pac = File.ReadAllText(strPacfile, Encoding.UTF8);
|
||||
string pac = File.ReadAllText(strPacfile, Encoding.UTF8);
|
||||
pac = pac.Replace("__PROXY__", proxy);
|
||||
|
||||
if (_config.userPacRule.Count > 0)
|
||||
{
|
||||
string keyWords = "var rules = [";
|
||||
if (pac.IndexOf(keyWords) >= 0)
|
||||
{
|
||||
string userPac = string.Join($"\",{Environment.NewLine}\"", _config.userPacRule.ToArray());
|
||||
userPac = string.Format("\"{0}\",", userPac);
|
||||
pac = pac.Replace(keyWords, keyWords + userPac);
|
||||
}
|
||||
}
|
||||
|
||||
return pac;
|
||||
}
|
||||
catch
|
||||
|
||||
@@ -22,18 +22,17 @@ namespace v2rayN.HttpProxyHandler
|
||||
|
||||
private static int _uid;
|
||||
private static string _uniqueConfigFile;
|
||||
private static Job _privoxyJob;
|
||||
private Process _process;
|
||||
private static string _privoxyName = "v2ray_privoxy";
|
||||
|
||||
static PrivoxyHandler()
|
||||
{
|
||||
try
|
||||
{
|
||||
_uid = Application.StartupPath.GetHashCode(); // Currently we use ss's StartupPath to identify different Privoxy instance.
|
||||
_uid = Application.StartupPath.GetHashCode();
|
||||
_uniqueConfigFile = string.Format("privoxy_{0}.conf", _uid);
|
||||
_privoxyJob = new Job();
|
||||
|
||||
FileManager.UncompressFile(Utils.GetTempPath("v2ray_privoxy.exe"), Resources.privoxy_exe);
|
||||
FileManager.UncompressFile(Utils.GetTempPath($"{_privoxyName}.exe"), Resources.privoxy_exe);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
@@ -41,11 +40,6 @@ namespace v2rayN.HttpProxyHandler
|
||||
}
|
||||
}
|
||||
|
||||
private PrivoxyHandler()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 单例
|
||||
/// </summary>
|
||||
@@ -66,17 +60,20 @@ namespace v2rayN.HttpProxyHandler
|
||||
get; set;
|
||||
}
|
||||
|
||||
public void Restart(int localPort, Config config)
|
||||
{
|
||||
Stop();
|
||||
Start(localPort, config);
|
||||
}
|
||||
|
||||
|
||||
public void Start(int localPort, Config config)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (_process == null)
|
||||
{
|
||||
Process[] existingPrivoxy = Process.GetProcessesByName("v2ray_privoxy");
|
||||
foreach (Process p in existingPrivoxy.Where(IsChildProcess))
|
||||
{
|
||||
KillProcess(p);
|
||||
}
|
||||
|
||||
string privoxyConfig = Resources.privoxy_conf;
|
||||
RunningPort = config.GetLocalPort(Global.InboundHttp);
|
||||
privoxyConfig = privoxyConfig.Replace("__SOCKS_PORT__", localPort.ToString());
|
||||
@@ -96,7 +93,7 @@ namespace v2rayN.HttpProxyHandler
|
||||
// Configure the process using the StartInfo properties.
|
||||
StartInfo =
|
||||
{
|
||||
FileName = "v2ray_privoxy.exe",
|
||||
FileName = $"{_privoxyName}.exe",
|
||||
Arguments = _uniqueConfigFile,
|
||||
WorkingDirectory = Utils.GetTempPath(),
|
||||
WindowStyle = ProcessWindowStyle.Hidden,
|
||||
@@ -110,12 +107,13 @@ namespace v2rayN.HttpProxyHandler
|
||||
* Add this process to job obj associated with this ss process, so that
|
||||
* when ss exit unexpectedly, this process will be forced killed by system.
|
||||
*/
|
||||
_privoxyJob.AddProcess(_process.Handle);
|
||||
|
||||
Global.processJob.AddProcess(_process.Handle);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
RunningPort = 0;
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
@@ -129,6 +127,14 @@ namespace v2rayN.HttpProxyHandler
|
||||
_process = null;
|
||||
RunningPort = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Process[] existingPrivoxy = Process.GetProcessesByName(_privoxyName);
|
||||
foreach (Process p in existingPrivoxy.Where(IsChildProcess))
|
||||
{
|
||||
KillProcess(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void KillProcess(Process p)
|
||||
@@ -140,7 +146,7 @@ namespace v2rayN.HttpProxyHandler
|
||||
if (!p.HasExited)
|
||||
{
|
||||
p.Kill();
|
||||
p.WaitForExit();
|
||||
p.WaitForExit(100);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -166,9 +172,9 @@ namespace v2rayN.HttpProxyHandler
|
||||
/*
|
||||
* Under PortableMode, we could identify it by the path of v2ray_privoxy.exe.
|
||||
*/
|
||||
var path = process.MainModule.FileName;
|
||||
string path = process.MainModule.FileName;
|
||||
|
||||
return Utils.GetTempPath("v2ray_privoxy.exe").Equals(path);
|
||||
return Utils.GetTempPath($"{_privoxyName}.exe").Equals(path);
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -8,26 +8,46 @@ namespace v2rayN.HttpProxyHandler
|
||||
{
|
||||
public static bool UnsetProxy()
|
||||
{
|
||||
return SetProxy(null, null);
|
||||
}
|
||||
public static bool SetProxy(string strProxy)
|
||||
{
|
||||
return SetProxy(strProxy, null);
|
||||
return SetProxy(null, null, 1);
|
||||
}
|
||||
|
||||
public static bool SetProxy(string strProxy, string exceptions)
|
||||
public static bool SetProxy(string strProxy, string exceptions, int type)
|
||||
{
|
||||
InternetPerConnOptionList list = new InternetPerConnOptionList();
|
||||
|
||||
int optionCount = Utils.IsNullOrEmpty(strProxy) ? 1 : (Utils.IsNullOrEmpty(exceptions) ? 2 : 3);
|
||||
int optionCount = 1;
|
||||
if (type == 1)
|
||||
{
|
||||
optionCount = 1;
|
||||
}
|
||||
else if (type == 2 || type == 4)
|
||||
{
|
||||
optionCount = Utils.IsNullOrEmpty(exceptions) ? 2 : 3;
|
||||
}
|
||||
|
||||
int m_Int = (int)PerConnFlags.PROXY_TYPE_DIRECT;
|
||||
PerConnOption m_Option = PerConnOption.INTERNET_PER_CONN_FLAGS;
|
||||
if (type == 2)
|
||||
{
|
||||
m_Int = (int)(PerConnFlags.PROXY_TYPE_DIRECT | PerConnFlags.PROXY_TYPE_PROXY);
|
||||
m_Option = PerConnOption.INTERNET_PER_CONN_PROXY_SERVER;
|
||||
}
|
||||
else if (type == 4)
|
||||
{
|
||||
m_Int = (int)(PerConnFlags.PROXY_TYPE_DIRECT | PerConnFlags.PROXY_TYPE_AUTO_PROXY_URL);
|
||||
m_Option = PerConnOption.INTERNET_PER_CONN_AUTOCONFIG_URL;
|
||||
}
|
||||
|
||||
//int optionCount = Utils.IsNullOrEmpty(strProxy) ? 1 : (Utils.IsNullOrEmpty(exceptions) ? 2 : 3);
|
||||
InternetConnectionOption[] options = new InternetConnectionOption[optionCount];
|
||||
// USE a proxy server ...
|
||||
options[0].m_Option = PerConnOption.INTERNET_PER_CONN_FLAGS;
|
||||
options[0].m_Value.m_Int = (int)((optionCount < 2) ? PerConnFlags.PROXY_TYPE_DIRECT : (PerConnFlags.PROXY_TYPE_DIRECT | PerConnFlags.PROXY_TYPE_PROXY));
|
||||
//options[0].m_Value.m_Int = (int)((optionCount < 2) ? PerConnFlags.PROXY_TYPE_DIRECT : (PerConnFlags.PROXY_TYPE_DIRECT | PerConnFlags.PROXY_TYPE_PROXY));
|
||||
options[0].m_Value.m_Int = m_Int;
|
||||
// use THIS proxy server
|
||||
if (optionCount > 1)
|
||||
{
|
||||
options[1].m_Option = PerConnOption.INTERNET_PER_CONN_PROXY_SERVER;
|
||||
options[1].m_Option = m_Option;
|
||||
options[1].m_Value.m_StringPtr = Marshal.StringToHGlobalAuto(strProxy);
|
||||
// except for these addresses ...
|
||||
if (optionCount > 2)
|
||||
@@ -50,14 +70,22 @@ namespace v2rayN.HttpProxyHandler
|
||||
// copy the array over into that spot in memory ...
|
||||
for (int i = 0; i < options.Length; ++i)
|
||||
{
|
||||
IntPtr opt = new IntPtr(optionsPtr.ToInt32() + (i * optSize));
|
||||
Marshal.StructureToPtr(options[i], opt, false);
|
||||
if (Environment.Is64BitOperatingSystem)
|
||||
{
|
||||
IntPtr opt = new IntPtr(optionsPtr.ToInt64() + (i * optSize));
|
||||
Marshal.StructureToPtr(options[i], opt, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
IntPtr opt = new IntPtr(optionsPtr.ToInt32() + (i * optSize));
|
||||
Marshal.StructureToPtr(options[i], opt, false);
|
||||
}
|
||||
}
|
||||
|
||||
list.options = optionsPtr;
|
||||
|
||||
// and then make a pointer out of the whole list
|
||||
IntPtr ipcoListPtr = Marshal.AllocCoTaskMem((Int32)list.dwSize);
|
||||
IntPtr ipcoListPtr = Marshal.AllocCoTaskMem((int)list.dwSize);
|
||||
Marshal.StructureToPtr(list, ipcoListPtr, false);
|
||||
|
||||
// and finally, call the API method!
|
||||
@@ -100,7 +128,7 @@ namespace v2rayN.HttpProxyHandler
|
||||
public InternetConnectionOptionValue m_Value;
|
||||
static InternetConnectionOption()
|
||||
{
|
||||
InternetConnectionOption.Size = Marshal.SizeOf(typeof(InternetConnectionOption));
|
||||
Size = Marshal.SizeOf(typeof(InternetConnectionOption));
|
||||
}
|
||||
|
||||
// Nested Types
|
||||
@@ -181,7 +209,7 @@ namespace v2rayN.HttpProxyHandler
|
||||
string ProxyServer = rk.GetValue("ProxyServer").ToString();
|
||||
rk.Close();
|
||||
return ProxyServer;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using v2rayN.Base;
|
||||
using System.Threading;
|
||||
using v2rayN.Mode;
|
||||
using v2rayN.Properties;
|
||||
using v2rayN.Tool;
|
||||
|
||||
namespace v2rayN.HttpProxyHandler
|
||||
{
|
||||
class SysProxyHandle
|
||||
public static class SysProxyHandle
|
||||
{
|
||||
private const string _userWininetConfigFile = "user-wininet.json";
|
||||
//private const string _userWininetConfigFile = "user-wininet.json";
|
||||
|
||||
private static string _queryStr;
|
||||
//private static string _queryStr;
|
||||
|
||||
// In general, this won't change
|
||||
// format:
|
||||
@@ -44,11 +44,10 @@ namespace v2rayN.HttpProxyHandler
|
||||
catch (IOException ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetIEProxy(bool enable, bool global, string proxyServer, string pacURL)
|
||||
public static void SetIEProxy(bool enable, bool global, string strProxy)
|
||||
{
|
||||
//Read();
|
||||
|
||||
@@ -56,130 +55,138 @@ namespace v2rayN.HttpProxyHandler
|
||||
//{
|
||||
// // record user settings
|
||||
// ExecSysproxy("query");
|
||||
// ParseQueryStr(_queryStr);
|
||||
// //ParseQueryStr(_queryStr);
|
||||
//}
|
||||
|
||||
string arguments;
|
||||
if (enable)
|
||||
{
|
||||
arguments = global
|
||||
? string.Format(
|
||||
//"global {0} <local>;localhost;127.*;10.*;172.16.*;172.17.*;172.18.*;172.19.*;172.20.*;172.21.*;172.22.*;172.23.*;172.24.*;172.25.*;172.26.*;172.27.*;172.28.*;172.29.*;172.30.*;172.31.*;172.32.*;192.168.*",
|
||||
"global {0} <local>;localhost;127.*;10.*;172.16.*;172.17.*;172.18.*;172.19.*;172.20.*;172.21.*;172.22.*;172.23.*;172.24.*;172.25.*;172.26.*;172.27.*;172.28.*;172.29.*;172.30.*;172.31.*;172.32.*",
|
||||
proxyServer)
|
||||
: string.Format("pac {0}", pacURL);
|
||||
? $"global {strProxy} {Global.IEProxyExceptions}"
|
||||
: $"pac {strProxy}";
|
||||
}
|
||||
else
|
||||
{
|
||||
// restore user settings
|
||||
//var flags = _userSettings.Flags;
|
||||
//var proxy_server = _userSettings.ProxyServer ?? "-";
|
||||
//var bypass_list = _userSettings.BypassList ?? "-";
|
||||
//var pac_url = _userSettings.PacUrl ?? "-";
|
||||
////arguments = string.Format("set {0} {1} {2} {3}", flags, proxy_server, bypass_list, pac_url);
|
||||
//set null settings
|
||||
arguments = string.Format("set {0} {1} {2} {3}", 1, "-", "<local>", @"http://127.0.0.1");
|
||||
string flags = _userSettings.Flags;
|
||||
string proxy_server = _userSettings.ProxyServer ?? "-";
|
||||
string bypass_list = _userSettings.BypassList ?? "-";
|
||||
string pac_url = _userSettings.PacUrl ?? "-";
|
||||
arguments = $"set {flags} {proxy_server} {bypass_list} {pac_url}";
|
||||
|
||||
// have to get new settings
|
||||
//_userSettings.UserSettingsRecorded = false;
|
||||
_userSettings.UserSettingsRecorded = false;
|
||||
}
|
||||
|
||||
//Save();
|
||||
ExecSysproxy(arguments);
|
||||
}
|
||||
|
||||
// set system proxy to 1 (null) (null) (null)
|
||||
public static bool ResetIEProxy()
|
||||
{
|
||||
try
|
||||
{
|
||||
// clear user-wininet.json
|
||||
//_userSettings = new SysproxyConfig();
|
||||
//Save();
|
||||
// clear system setting
|
||||
ExecSysproxy("set 1 - - -");
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static void ExecSysproxy(string arguments)
|
||||
{
|
||||
using (var process = new Process())
|
||||
// using event to avoid hanging when redirect standard output/error
|
||||
// ref: https://stackoverflow.com/questions/139593/processstartinfo-hanging-on-waitforexit-why
|
||||
// and http://blog.csdn.net/zhangweixing0/article/details/7356841
|
||||
using (AutoResetEvent outputWaitHandle = new AutoResetEvent(false))
|
||||
using (AutoResetEvent errorWaitHandle = new AutoResetEvent(false))
|
||||
{
|
||||
// Configure the process using the StartInfo properties.
|
||||
process.StartInfo.FileName = Utils.GetTempPath("sysproxy.exe");
|
||||
process.StartInfo.Arguments = arguments;
|
||||
process.StartInfo.WorkingDirectory = Utils.GetTempPath();
|
||||
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
process.StartInfo.UseShellExecute = false;
|
||||
process.StartInfo.RedirectStandardError = true;
|
||||
process.StartInfo.RedirectStandardOutput = true;
|
||||
|
||||
// Need to provide encoding info, or output/error strings we got will be wrong.
|
||||
process.StartInfo.StandardOutputEncoding = Encoding.Unicode;
|
||||
process.StartInfo.StandardErrorEncoding = Encoding.Unicode;
|
||||
|
||||
process.StartInfo.CreateNoWindow = true;
|
||||
process.Start();
|
||||
|
||||
var stderr = process.StandardError.ReadToEnd();
|
||||
var stdout = process.StandardOutput.ReadToEnd();
|
||||
|
||||
process.WaitForExit();
|
||||
|
||||
var exitCode = process.ExitCode;
|
||||
if (exitCode != (int)RET_ERRORS.RET_NO_ERROR)
|
||||
using (Process process = new Process())
|
||||
{
|
||||
throw new Exception(stderr);
|
||||
}
|
||||
// Configure the process using the StartInfo properties.
|
||||
process.StartInfo.FileName = Utils.GetTempPath("sysproxy.exe");
|
||||
process.StartInfo.Arguments = arguments;
|
||||
process.StartInfo.WorkingDirectory = Utils.GetTempPath();
|
||||
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
process.StartInfo.UseShellExecute = false;
|
||||
process.StartInfo.RedirectStandardError = true;
|
||||
process.StartInfo.RedirectStandardOutput = true;
|
||||
|
||||
if (arguments == "query")
|
||||
{
|
||||
if (stdout.IsNullOrWhiteSpace() || stdout.IsNullOrEmpty())
|
||||
// Need to provide encoding info, or output/error strings we got will be wrong.
|
||||
process.StartInfo.StandardOutputEncoding = Encoding.Unicode;
|
||||
process.StartInfo.StandardErrorEncoding = Encoding.Unicode;
|
||||
|
||||
process.StartInfo.CreateNoWindow = true;
|
||||
|
||||
StringBuilder output = new StringBuilder();
|
||||
StringBuilder error = new StringBuilder();
|
||||
|
||||
process.OutputDataReceived += (sender, e) =>
|
||||
{
|
||||
// we cannot get user settings
|
||||
throw new Exception("failed to query wininet settings");
|
||||
if (e.Data == null)
|
||||
{
|
||||
outputWaitHandle.Set();
|
||||
}
|
||||
else
|
||||
{
|
||||
output.AppendLine(e.Data);
|
||||
}
|
||||
};
|
||||
process.ErrorDataReceived += (sender, e) =>
|
||||
{
|
||||
if (e.Data == null)
|
||||
{
|
||||
errorWaitHandle.Set();
|
||||
}
|
||||
else
|
||||
{
|
||||
error.AppendLine(e.Data);
|
||||
}
|
||||
};
|
||||
try
|
||||
{
|
||||
process.Start();
|
||||
|
||||
process.BeginErrorReadLine();
|
||||
process.BeginOutputReadLine();
|
||||
|
||||
process.WaitForExit();
|
||||
}
|
||||
_queryStr = stdout;
|
||||
catch (System.ComponentModel.Win32Exception e)
|
||||
{
|
||||
|
||||
// log the arguments
|
||||
throw new Exception(process.StartInfo.Arguments);
|
||||
}
|
||||
string stderr = error.ToString();
|
||||
string stdout = output.ToString();
|
||||
|
||||
int exitCode = process.ExitCode;
|
||||
if (exitCode != (int)RET_ERRORS.RET_NO_ERROR)
|
||||
{
|
||||
throw new Exception(stderr);
|
||||
}
|
||||
|
||||
//if (arguments == "query")
|
||||
//{
|
||||
// if (stdout.IsNullOrWhiteSpace() || stdout.IsNullOrEmpty())
|
||||
// {
|
||||
// throw new Exception("failed to query wininet settings");
|
||||
// }
|
||||
// _queryStr = stdout;
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void Save()
|
||||
{
|
||||
try
|
||||
{
|
||||
using (StreamWriter sw = new StreamWriter(File.Open(Utils.GetPath(_userWininetConfigFile), FileMode.Create)))
|
||||
{
|
||||
string jsonString = JsonConvert.SerializeObject(_userSettings, Formatting.Indented);
|
||||
sw.Write(jsonString);
|
||||
sw.Flush();
|
||||
}
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
|
||||
private static void Read()
|
||||
{
|
||||
try
|
||||
{
|
||||
string configContent = File.ReadAllText(Utils.GetPath(_userWininetConfigFile));
|
||||
_userSettings = JsonConvert.DeserializeObject<SysproxyConfig>(configContent);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
// Suppress all exceptions. finally block will initialize new user config settings.
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (_userSettings == null) _userSettings = new SysproxyConfig();
|
||||
}
|
||||
}
|
||||
|
||||
private static void ParseQueryStr(string str)
|
||||
{
|
||||
string[] userSettingsArr = str.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
_userSettings.Flags = userSettingsArr[0];
|
||||
|
||||
// handle output from WinINET
|
||||
if (userSettingsArr[1] == "(null)") _userSettings.ProxyServer = null;
|
||||
else _userSettings.ProxyServer = userSettingsArr[1];
|
||||
if (userSettingsArr[2] == "(null)") _userSettings.BypassList = null;
|
||||
else _userSettings.BypassList = userSettingsArr[2];
|
||||
if (userSettingsArr[3] == "(null)") _userSettings.PacUrl = null;
|
||||
else _userSettings.PacUrl = userSettingsArr[3];
|
||||
|
||||
_userSettings.UserSettingsRecorded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using v2rayN.Base;
|
||||
using v2rayN.HttpProxyHandler;
|
||||
|
||||
|
||||
namespace v2rayN.Mode
|
||||
{
|
||||
@@ -107,13 +109,27 @@ namespace v2rayN.Mode
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 监听状态 0-not 1-http 2-PAC
|
||||
/// 监听状态
|
||||
/// </summary>
|
||||
public int listenerType
|
||||
public ListenerType listenerType
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 自定义服务器下载测速url
|
||||
/// </summary>
|
||||
public string speedTestUrl
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 自定义“服务器真连接延迟”测试url
|
||||
/// </summary>
|
||||
public string speedPingTestUrl
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 自定义GFWList url
|
||||
/// </summary>
|
||||
@@ -138,6 +154,14 @@ namespace v2rayN.Mode
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 去重时优先保留较旧(顶部)节点
|
||||
/// </summary>
|
||||
public bool keepOlderDedupl
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 视图刷新率
|
||||
/// </summary>
|
||||
@@ -145,7 +169,7 @@ namespace v2rayN.Mode
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 自定义远程DNS
|
||||
@@ -154,6 +178,15 @@ namespace v2rayN.Mode
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否允许不安全连接
|
||||
/// </summary>
|
||||
public bool defAllowInsecure
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 订阅
|
||||
/// </summary>
|
||||
@@ -169,6 +202,11 @@ namespace v2rayN.Mode
|
||||
get; set;
|
||||
}
|
||||
|
||||
public List<string> userPacRule
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
#region 函数
|
||||
|
||||
public string address()
|
||||
@@ -268,7 +306,7 @@ namespace v2rayN.Mode
|
||||
{
|
||||
if (index < 0 || Utils.IsNullOrEmpty(vmess[index].allowInsecure))
|
||||
{
|
||||
return true;
|
||||
return defAllowInsecure;
|
||||
}
|
||||
return Convert.ToBoolean(vmess[index].allowInsecure);
|
||||
}
|
||||
@@ -357,10 +395,9 @@ namespace v2rayN.Mode
|
||||
|
||||
public string getSummary()
|
||||
{
|
||||
string summary = string.Empty;
|
||||
summary = string.Format("{0}-", ((EConfigType)configType).ToString());
|
||||
string summary = string.Format("{0}-", ((EConfigType)configType).ToString());
|
||||
string[] arrAddr = address.Split('.');
|
||||
string addr = string.Empty;
|
||||
string addr;
|
||||
if (arrAddr.Length > 2)
|
||||
{
|
||||
addr = $"{arrAddr[0]}***{arrAddr[arrAddr.Length - 1]}";
|
||||
@@ -414,7 +451,7 @@ namespace v2rayN.Mode
|
||||
|
||||
public string getItemId()
|
||||
{
|
||||
var itemId = $"{address}{port}{requestHost}{path}";
|
||||
string itemId = $"{address}{port}{requestHost}{path}";
|
||||
itemId = Utils.Base64Encode(itemId);
|
||||
return itemId;
|
||||
}
|
||||
@@ -463,7 +500,7 @@ namespace v2rayN.Mode
|
||||
get; set;
|
||||
}
|
||||
/// <summary>
|
||||
/// tcp,kcp,ws
|
||||
/// tcp,kcp,ws,h2,quic
|
||||
/// </summary>
|
||||
public string network
|
||||
{
|
||||
@@ -667,10 +704,16 @@ namespace v2rayN.Mode
|
||||
[Serializable]
|
||||
public class UIItem
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int mainQRCodeWidth { get; set; } = 600;
|
||||
|
||||
|
||||
public System.Drawing.Size mainSize
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public Dictionary<string, int> mainLvColWidth
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
21
v2rayN/v2rayN/Mode/EServerColName.cs
Normal file
21
v2rayN/v2rayN/Mode/EServerColName.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
namespace v2rayN.Mode
|
||||
{
|
||||
public enum EServerColName
|
||||
{
|
||||
def = 0,
|
||||
configType,
|
||||
remarks,
|
||||
address,
|
||||
port,
|
||||
security,
|
||||
network,
|
||||
subRemarks,
|
||||
testResult,
|
||||
|
||||
todayDown,
|
||||
todayUp,
|
||||
totalDown,
|
||||
totalUp
|
||||
}
|
||||
}
|
||||
@@ -281,6 +281,11 @@ namespace v2rayN.Mode
|
||||
///
|
||||
/// </summary>
|
||||
public bool enabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int concurrency { get; set; }
|
||||
}
|
||||
|
||||
public class Response
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using v2rayN.Forms;
|
||||
using v2rayN.Properties;
|
||||
using v2rayN.Tool;
|
||||
|
||||
namespace v2rayN
|
||||
{
|
||||
@@ -23,20 +25,20 @@ namespace v2rayN
|
||||
}
|
||||
|
||||
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
|
||||
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
|
||||
Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
|
||||
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
|
||||
|
||||
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
|
||||
|
||||
//AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
|
||||
|
||||
Process instance = RunningInstance();
|
||||
if (instance == null)
|
||||
if (!IsDuplicateInstance())
|
||||
{
|
||||
Utils.SaveLog("v2rayN start up");
|
||||
|
||||
Utils.SaveLog("v2rayN start up " + Utils.GetVersion());
|
||||
|
||||
//设置语言环境
|
||||
string lang = Utils.RegReadValue(Global.MyRegPath, Global.MyRegKeyLanguage, "zh-Hans");
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(lang);
|
||||
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(lang);
|
||||
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
@@ -44,53 +46,47 @@ namespace v2rayN
|
||||
}
|
||||
else
|
||||
{
|
||||
UI.Show($"v2rayN is already running(v2rayN已经运行)");
|
||||
UI.ShowWarning($"v2rayN is already running(v2rayN已经运行)");
|
||||
}
|
||||
}
|
||||
|
||||
private static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
|
||||
{
|
||||
try
|
||||
{
|
||||
string resourceName = "v2rayN.LIB." + new AssemblyName(args.Name).Name + ".dll";
|
||||
using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))
|
||||
{
|
||||
if (stream == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
byte[] assemblyData = new byte[stream.Length];
|
||||
stream.Read(assemblyData, 0, assemblyData.Length);
|
||||
return Assembly.Load(assemblyData);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
//private static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// string resourceName = "v2rayN.LIB." + new AssemblyName(args.Name).Name + ".dll";
|
||||
// using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))
|
||||
// {
|
||||
// if (stream == null)
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// byte[] assemblyData = new byte[stream.Length];
|
||||
// stream.Read(assemblyData, 0, assemblyData.Length);
|
||||
// return Assembly.Load(assemblyData);
|
||||
// }
|
||||
// }
|
||||
// catch
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 获取正在运行的实例,没有运行的实例返回null;
|
||||
/// 检查是否已在运行
|
||||
/// </summary>
|
||||
public static Process RunningInstance()
|
||||
public static bool IsDuplicateInstance()
|
||||
{
|
||||
Process current = Process.GetCurrentProcess();
|
||||
Process[] processes = Process.GetProcessesByName(current.ProcessName);
|
||||
foreach (Process process in processes)
|
||||
{
|
||||
if (process.Id != current.Id)
|
||||
{
|
||||
if (Assembly.GetExecutingAssembly().Location.Replace("/", "\\") == process.MainModule.FileName)
|
||||
{
|
||||
return process;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
//string name = "v2rayN";
|
||||
|
||||
string name = Utils.GetExePath(); // Allow different locations to run
|
||||
name = name.Replace("\\", "/"); // https://stackoverflow.com/questions/20714120/could-not-find-a-part-of-the-path-error-while-creating-mutex
|
||||
|
||||
Global.mutexObj = new Mutex(false, name, out bool bCreatedNew);
|
||||
return !bCreatedNew;
|
||||
}
|
||||
|
||||
static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
|
||||
static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
|
||||
{
|
||||
Utils.SaveLog("Application_ThreadException", e.Exception);
|
||||
}
|
||||
@@ -99,6 +95,5 @@ namespace v2rayN
|
||||
{
|
||||
Utils.SaveLog("CurrentDomain_UnhandledException", (Exception)e.ExceptionObject);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的常规信息通过以下
|
||||
@@ -8,9 +7,9 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyTitle("v2rayN")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("v2rayN")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2019")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019-2020 (GPLv3)")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -33,4 +32,4 @@ using System.Runtime.InteropServices;
|
||||
// 方法是按如下所示使用“*”:
|
||||
//[assembly: AssemblyVersion("1.0.*")]
|
||||
//[assembly: AssemblyVersion("1.0.0")]
|
||||
[assembly: AssemblyFileVersion("2.53")]
|
||||
[assembly: AssemblyFileVersion("3.19")]
|
||||
|
||||
30
v2rayN/v2rayN/Properties/Resources.Designer.cs
generated
30
v2rayN/v2rayN/Properties/Resources.Designer.cs
generated
@@ -90,26 +90,6 @@ namespace v2rayN.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Byte[] 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static byte[] grpc_csharp_ext_x64_dll {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("grpc_csharp_ext_x64_dll", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Byte[] 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static byte[] grpc_csharp_ext_x86_dll {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("grpc_csharp_ext_x86_dll", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
@@ -217,6 +197,16 @@ namespace v2rayN.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap share {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("share", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
|
||||
@@ -118,58 +118,55 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="privoxy_exe" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\privoxy.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="about" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\about.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="abp_js" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\abp.js.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="checkupdate" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\checkupdate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="grpc_csharp_ext_x64_dll" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\grpc_csharp_ext.x64.dll.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="grpc_csharp_ext_x86_dll" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\grpc_csharp_ext.x86.dll.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="help" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\help.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="minimize" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\minimize.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="notify" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\notify.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="option" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\option.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="pac_txt" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\pac.txt.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="privoxy_conf" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\privoxy_conf.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;gb2312</value>
|
||||
</data>
|
||||
<data name="privoxy_exe" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\privoxy.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="promotion" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\promotion.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="restart" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\restart.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="server" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\server.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="sysproxy_exe" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\sysproxy.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="sub" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\sub.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="sysproxy64_exe" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\sysproxy64.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="server" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\server.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="sysproxy_exe" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\sysproxy.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="notify" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\notify.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="checkupdate" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\checkupdate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="promotion" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\promotion.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="sysproxy64_exe" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\sysproxy64.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="privoxy_conf" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\privoxy_conf.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;gb2312</value>
|
||||
</data>
|
||||
<data name="minimize" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\minimize.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="pac_txt" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\pac.txt.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="help" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\help.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="abp_js" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\abp.js.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="share" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\share.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
Binary file not shown.
Binary file not shown.
@@ -49,7 +49,7 @@ var rules = [
|
||||
"|http://img.dlsite.jp/",
|
||||
"||dm530.net",
|
||||
"share.dmhy.org",
|
||||
"@@|https://share.dmhy.org",
|
||||
"||dmhy.org",
|
||||
"||dmm.co.jp",
|
||||
"|http://www.dmm.com/netgame",
|
||||
"||dnvod.tv",
|
||||
@@ -262,19 +262,25 @@ var rules = [
|
||||
"||daum.net",
|
||||
"||depositphotos.com",
|
||||
"||disconnect.me",
|
||||
"||documentingreality.com",
|
||||
"||doubibackup.com",
|
||||
"||doubmirror.cf",
|
||||
"||encyclopedia.com",
|
||||
"||fangeqiang.com",
|
||||
"||fanqiangdang.com",
|
||||
"||cloud.feedly.com",
|
||||
"||feedx.net",
|
||||
"||flyzy2005.com",
|
||||
"||foreignpolicy.com",
|
||||
"||free-ss.site",
|
||||
"||freehongkong.org",
|
||||
"||blog.fuckgfw233.org",
|
||||
"||g0v.social",
|
||||
"||globalvoices.org",
|
||||
"||glorystar.me",
|
||||
"||goregrish.com",
|
||||
"||guangnianvpn.com",
|
||||
"||hanime.tv",
|
||||
"||hbo.com",
|
||||
"||spaces.hightail.com",
|
||||
"||hkgalden.com",
|
||||
@@ -288,6 +294,7 @@ var rules = [
|
||||
"||joinmastodon.org",
|
||||
"||liangzhichuanmei.com",
|
||||
"||lighti.me",
|
||||
"||lightyearvpn.com",
|
||||
"||lihkg.com",
|
||||
"||line-scdn.net",
|
||||
"||i.lithium.com",
|
||||
@@ -325,6 +332,7 @@ var rules = [
|
||||
"||api.pureapk.com",
|
||||
"||quora.com",
|
||||
"||quoracdn.net",
|
||||
"||qz.com",
|
||||
"||cdn.seatguru.com",
|
||||
"||secure.raxcdn.com",
|
||||
"||redd.it",
|
||||
@@ -368,6 +376,8 @@ var rules = [
|
||||
"||steemit.com",
|
||||
"||taiwanjustice.net",
|
||||
"||tinc-vpn.org",
|
||||
"||u15.info",
|
||||
"||washingtonpost.com",
|
||||
"||wenzhao.ca",
|
||||
"||whatsonweibo.com",
|
||||
"||wire.com",
|
||||
@@ -375,6 +385,7 @@ var rules = [
|
||||
"||xm.com",
|
||||
"||xuehua.us",
|
||||
"||yes-news.com",
|
||||
"||yigeni.com",
|
||||
"||you-get.org",
|
||||
"||zzcloud.me",
|
||||
"||aex.com",
|
||||
@@ -697,459 +708,8 @@ var rules = [
|
||||
"||thefacebook.com",
|
||||
"||whatsapp.com",
|
||||
"||whatsapp.net",
|
||||
"|https://www.ftchinese.com",
|
||||
".ftchinese.com/channel/video",
|
||||
".ftchinese.com/premium/001081066",
|
||||
".ftchinese.com/story/00102753",
|
||||
".ftchinese.com/story/001026616",
|
||||
".ftchinese.com/story/001026749",
|
||||
".ftchinese.com/story/001026807",
|
||||
".ftchinese.com/story/001026808",
|
||||
".ftchinese.com/story/001026834",
|
||||
".ftchinese.com/story/001026880",
|
||||
".ftchinese.com/story/001027429",
|
||||
".ftchinese.com/story/001030341",
|
||||
".ftchinese.com/story/001030502",
|
||||
".ftchinese.com/story/001030803",
|
||||
".ftchinese.com/story/001031317",
|
||||
".ftchinese.com/story/001032617",
|
||||
".ftchinese.com/story/001032636",
|
||||
".ftchinese.com/story/001032692",
|
||||
".ftchinese.com/story/001032762",
|
||||
".ftchinese.com/story/001033138",
|
||||
".ftchinese.com/story/001034917",
|
||||
".ftchinese.com/story/001034926",
|
||||
".ftchinese.com/story/001034927",
|
||||
".ftchinese.com/story/001034928",
|
||||
".ftchinese.com/story/001034952",
|
||||
".ftchinese.com/story/001035890",
|
||||
".ftchinese.com/story/001035972",
|
||||
".ftchinese.com/story/001035993",
|
||||
".ftchinese.com/story/001036417",
|
||||
".ftchinese.com/story/001037090",
|
||||
".ftchinese.com/story/001037091",
|
||||
".ftchinese.com/story/001038178",
|
||||
".ftchinese.com/story/001038199",
|
||||
".ftchinese.com/story/001038220",
|
||||
".ftchinese.com/story/001038819",
|
||||
".ftchinese.com/story/001038862",
|
||||
".ftchinese.com/story/001039067",
|
||||
".ftchinese.com/story/001039178",
|
||||
".ftchinese.com/story/001039211",
|
||||
".ftchinese.com/story/001039271",
|
||||
".ftchinese.com/story/001039295",
|
||||
".ftchinese.com/story/001039369",
|
||||
".ftchinese.com/story/001039482",
|
||||
".ftchinese.com/story/001039534",
|
||||
".ftchinese.com/story/001039555",
|
||||
".ftchinese.com/story/001039576",
|
||||
".ftchinese.com/story/001039712",
|
||||
".ftchinese.com/story/001039779",
|
||||
".ftchinese.com/story/001039809",
|
||||
".ftchinese.com/story/001040134",
|
||||
".ftchinese.com/story/001040835",
|
||||
".ftchinese.com/story/001040890",
|
||||
".ftchinese.com/story/001040918",
|
||||
".ftchinese.com/story/001040992",
|
||||
".ftchinese.com/story/001041209",
|
||||
".ftchinese.com/story/001042100",
|
||||
".ftchinese.com/story/001042252",
|
||||
".ftchinese.com/story/001042272",
|
||||
".ftchinese.com/story/001042280",
|
||||
".ftchinese.com/story/001043029",
|
||||
".ftchinese.com/story/001043066",
|
||||
".ftchinese.com/story/001043096",
|
||||
".ftchinese.com/story/001043124",
|
||||
".ftchinese.com/story/001043152",
|
||||
".ftchinese.com/story/001043189",
|
||||
".ftchinese.com/story/001043428",
|
||||
".ftchinese.com/story/001043439",
|
||||
".ftchinese.com/story/001043534",
|
||||
".ftchinese.com/story/001043675",
|
||||
".ftchinese.com/story/001043680",
|
||||
".ftchinese.com/story/001043702",
|
||||
".ftchinese.com/story/001043849",
|
||||
".ftchinese.com/story/001044099",
|
||||
".ftchinese.com/story/001044776",
|
||||
".ftchinese.com/story/001044871",
|
||||
".ftchinese.com/story/001044897",
|
||||
".ftchinese.com/story/001045114",
|
||||
".ftchinese.com/story/001045139",
|
||||
".ftchinese.com/story/001045186",
|
||||
".ftchinese.com/story/001045755",
|
||||
".ftchinese.com/story/001046087",
|
||||
".ftchinese.com/story/001046105",
|
||||
".ftchinese.com/story/001046118",
|
||||
".ftchinese.com/story/001046132",
|
||||
".ftchinese.com/story/001046517",
|
||||
".ftchinese.com/story/001046822",
|
||||
".ftchinese.com/story/001046866",
|
||||
".ftchinese.com/story/001046942",
|
||||
".ftchinese.com/story/001047180",
|
||||
".ftchinese.com/story/001047206",
|
||||
".ftchinese.com/story/001047304",
|
||||
".ftchinese.com/story/001047317",
|
||||
".ftchinese.com/story/001047345",
|
||||
".ftchinese.com/story/001047358",
|
||||
".ftchinese.com/story/001047375",
|
||||
".ftchinese.com/story/001047381",
|
||||
".ftchinese.com/story/001047413",
|
||||
".ftchinese.com/story/001047456",
|
||||
".ftchinese.com/story/001047491",
|
||||
".ftchinese.com/story/001047545",
|
||||
".ftchinese.com/story/001047558",
|
||||
".ftchinese.com/story/001047568",
|
||||
".ftchinese.com/story/001047627",
|
||||
".ftchinese.com/story/001048293",
|
||||
".ftchinese.com/story/001048343",
|
||||
".ftchinese.com/story/001048710",
|
||||
".ftchinese.com/story/001049289",
|
||||
".ftchinese.com/story/001049360",
|
||||
".ftchinese.com/story/001049896",
|
||||
".ftchinese.com/story/001050152",
|
||||
".ftchinese.com/story/001051027",
|
||||
".ftchinese.com/story/001051161",
|
||||
".ftchinese.com/story/001051372",
|
||||
".ftchinese.com/story/001051479",
|
||||
".ftchinese.com/story/001052138",
|
||||
".ftchinese.com/story/001052161",
|
||||
".ftchinese.com/story/001052525",
|
||||
".ftchinese.com/story/001052549",
|
||||
".ftchinese.com/story/001052701",
|
||||
".ftchinese.com/story/001052965",
|
||||
".ftchinese.com/story/001053149",
|
||||
".ftchinese.com/story/001053150",
|
||||
".ftchinese.com/story/001053200",
|
||||
".ftchinese.com/story/001053425",
|
||||
".ftchinese.com/story/001053496",
|
||||
".ftchinese.com/story/001053526",
|
||||
".ftchinese.com/story/001053557",
|
||||
".ftchinese.com/story/001053906",
|
||||
".ftchinese.com/story/001054049",
|
||||
".ftchinese.com/story/001054103",
|
||||
".ftchinese.com/story/001054109",
|
||||
".ftchinese.com/story/001054119",
|
||||
".ftchinese.com/story/001054123",
|
||||
".ftchinese.com/story/001054139",
|
||||
".ftchinese.com/story/001054166",
|
||||
".ftchinese.com/story/001054168",
|
||||
".ftchinese.com/story/001054190",
|
||||
".ftchinese.com/story/001054437",
|
||||
".ftchinese.com/story/001054526",
|
||||
".ftchinese.com/story/001054607",
|
||||
".ftchinese.com/story/001054644",
|
||||
".ftchinese.com/story/001054786",
|
||||
".ftchinese.com/story/001054843",
|
||||
".ftchinese.com/story/001054925",
|
||||
".ftchinese.com/story/001054940",
|
||||
".ftchinese.com/story/001055051",
|
||||
".ftchinese.com/story/001055063",
|
||||
".ftchinese.com/story/001055069",
|
||||
".ftchinese.com/story/001055136",
|
||||
".ftchinese.com/story/001055170",
|
||||
".ftchinese.com/story/001055202",
|
||||
".ftchinese.com/story/001055242",
|
||||
".ftchinese.com/story/001055263",
|
||||
".ftchinese.com/story/001055274",
|
||||
".ftchinese.com/story/001055299",
|
||||
".ftchinese.com/story/001055480",
|
||||
".ftchinese.com/story/001055551",
|
||||
".ftchinese.com/story/001055559",
|
||||
".ftchinese.com/story/001055566",
|
||||
".ftchinese.com/story/001055840",
|
||||
".ftchinese.com/story/001056099",
|
||||
".ftchinese.com/story/001056108",
|
||||
".ftchinese.com/story/001056131",
|
||||
".ftchinese.com/story/001056375",
|
||||
".ftchinese.com/story/001056491",
|
||||
".ftchinese.com/story/001056529",
|
||||
".ftchinese.com/story/001056534",
|
||||
".ftchinese.com/story/001056538",
|
||||
".ftchinese.com/story/001056541",
|
||||
".ftchinese.com/story/001056554",
|
||||
".ftchinese.com/story/001056557",
|
||||
".ftchinese.com/story/001056560",
|
||||
".ftchinese.com/story/001056567",
|
||||
".ftchinese.com/story/001056574",
|
||||
".ftchinese.com/story/001056588",
|
||||
".ftchinese.com/story/001056594",
|
||||
".ftchinese.com/story/001056596",
|
||||
".ftchinese.com/story/001056684",
|
||||
".ftchinese.com/story/001056832",
|
||||
".ftchinese.com/story/001056833",
|
||||
".ftchinese.com/story/001056851",
|
||||
".ftchinese.com/story/001056874",
|
||||
".ftchinese.com/story/001056896",
|
||||
".ftchinese.com/story/001056927",
|
||||
".ftchinese.com/story/001057011",
|
||||
".ftchinese.com/story/001057018",
|
||||
".ftchinese.com/story/001057044",
|
||||
".ftchinese.com/story/001057162",
|
||||
".ftchinese.com/story/001057500",
|
||||
".ftchinese.com/story/001057504",
|
||||
".ftchinese.com/story/001057509",
|
||||
".ftchinese.com/story/001057518",
|
||||
".ftchinese.com/story/001057532",
|
||||
".ftchinese.com/story/001057533",
|
||||
".ftchinese.com/story/001057556",
|
||||
".ftchinese.com/story/001057580",
|
||||
".ftchinese.com/story/001057638",
|
||||
".ftchinese.com/story/001057644",
|
||||
".ftchinese.com/story/001057817",
|
||||
".ftchinese.com/story/001057875",
|
||||
".ftchinese.com/story/001058009",
|
||||
".ftchinese.com/story/001058056",
|
||||
".ftchinese.com/story/001058224",
|
||||
".ftchinese.com/story/001058257",
|
||||
".ftchinese.com/story/001058295",
|
||||
".ftchinese.com/story/001058328",
|
||||
".ftchinese.com/story/001058339",
|
||||
".ftchinese.com/story/001058344",
|
||||
".ftchinese.com/story/001058352",
|
||||
".ftchinese.com/story/001058413",
|
||||
".ftchinese.com/story/001058421",
|
||||
".ftchinese.com/story/001058440",
|
||||
".ftchinese.com/story/001058458",
|
||||
".ftchinese.com/story/001058468",
|
||||
".ftchinese.com/story/001058561",
|
||||
".ftchinese.com/story/001058566",
|
||||
".ftchinese.com/story/001058567",
|
||||
".ftchinese.com/story/001058585",
|
||||
".ftchinese.com/story/001058628",
|
||||
".ftchinese.com/story/001058656",
|
||||
".ftchinese.com/story/001058665",
|
||||
".ftchinese.com/story/001058678",
|
||||
".ftchinese.com/story/001058691",
|
||||
".ftchinese.com/story/001058721",
|
||||
".ftchinese.com/story/001058728",
|
||||
".ftchinese.com/story/001059464",
|
||||
".ftchinese.com/story/001059484",
|
||||
".ftchinese.com/story/001059537",
|
||||
".ftchinese.com/story/001059538",
|
||||
".ftchinese.com/story/001059551",
|
||||
".ftchinese.com/story/001059818",
|
||||
".ftchinese.com/story/001059914",
|
||||
".ftchinese.com/story/001059920",
|
||||
".ftchinese.com/story/001059957",
|
||||
".ftchinese.com/story/001060088",
|
||||
".ftchinese.com/story/001060156",
|
||||
".ftchinese.com/story/001060157",
|
||||
".ftchinese.com/story/001060160",
|
||||
".ftchinese.com/story/001060181",
|
||||
".ftchinese.com/story/001060185",
|
||||
".ftchinese.com/story/001060493",
|
||||
".ftchinese.com/story/001060495",
|
||||
".ftchinese.com/story/001060590",
|
||||
".ftchinese.com/story/001060846",
|
||||
".ftchinese.com/story/001060847",
|
||||
".ftchinese.com/story/001060875",
|
||||
".ftchinese.com/story/001060921",
|
||||
".ftchinese.com/story/001060946",
|
||||
".ftchinese.com/story/001061120",
|
||||
".ftchinese.com/story/001061474",
|
||||
".ftchinese.com/story/001061524",
|
||||
".ftchinese.com/story/001061642",
|
||||
".ftchinese.com/story/001062017",
|
||||
".ftchinese.com/story/001062020",
|
||||
".ftchinese.com/story/001062028",
|
||||
".ftchinese.com/story/001062092",
|
||||
".ftchinese.com/story/001062096",
|
||||
".ftchinese.com/story/001062147",
|
||||
".ftchinese.com/story/001062176",
|
||||
".ftchinese.com/story/001062188",
|
||||
".ftchinese.com/story/001062254",
|
||||
".ftchinese.com/story/001062374",
|
||||
".ftchinese.com/story/001062482",
|
||||
".ftchinese.com/story/001062496",
|
||||
".ftchinese.com/story/001062501",
|
||||
".ftchinese.com/story/001062508",
|
||||
".ftchinese.com/story/001062519",
|
||||
".ftchinese.com/story/001062554",
|
||||
".ftchinese.com/story/001062741",
|
||||
".ftchinese.com/story/001062794",
|
||||
".ftchinese.com/story/001063160",
|
||||
".ftchinese.com/story/001063359",
|
||||
".ftchinese.com/story/001063512",
|
||||
".ftchinese.com/story/001063668",
|
||||
".ftchinese.com/story/001063692",
|
||||
".ftchinese.com/story/001063763",
|
||||
".ftchinese.com/story/001063764",
|
||||
".ftchinese.com/story/001063826",
|
||||
".ftchinese.com/story/001064127",
|
||||
".ftchinese.com/story/001064312",
|
||||
".ftchinese.com/story/001064705",
|
||||
".ftchinese.com/story/001064807",
|
||||
".ftchinese.com/story/001065120",
|
||||
".ftchinese.com/story/001065168",
|
||||
".ftchinese.com/story/001065249",
|
||||
".ftchinese.com/story/001065287",
|
||||
".ftchinese.com/story/001065335",
|
||||
".ftchinese.com/story/001065337",
|
||||
".ftchinese.com/story/001065541",
|
||||
".ftchinese.com/story/001065715",
|
||||
".ftchinese.com/story/001065735",
|
||||
".ftchinese.com/story/001065756",
|
||||
".ftchinese.com/story/001065802",
|
||||
".ftchinese.com/story/001066112",
|
||||
".ftchinese.com/story/001066136",
|
||||
".ftchinese.com/story/001066140",
|
||||
".ftchinese.com/story/001066465",
|
||||
".ftchinese.com/story/001066881",
|
||||
".ftchinese.com/story/001066950",
|
||||
".ftchinese.com/story/001066959",
|
||||
".ftchinese.com/story/001067435",
|
||||
"www.ftchinese.com/story/001067479",
|
||||
".ftchinese.com/story/001067528",
|
||||
".ftchinese.com/story/001067545",
|
||||
".ftchinese.com/story/001067572",
|
||||
".ftchinese.com/story/001067648",
|
||||
".ftchinese.com/story/001067650",
|
||||
".ftchinese.com/story/001067680",
|
||||
".ftchinese.com/story/001067692",
|
||||
".ftchinese.com/story/001067871",
|
||||
".ftchinese.com/story/001067923",
|
||||
".ftchinese.com/story/001068062",
|
||||
".ftchinese.com/story/001068248",
|
||||
".ftchinese.com/story/001068278",
|
||||
".ftchinese.com/story/001068379",
|
||||
".ftchinese.com/story/001068483",
|
||||
".ftchinese.com/story/001068506",
|
||||
".ftchinese.com/story/001068547",
|
||||
".ftchinese.com/story/001068616",
|
||||
".ftchinese.com/story/001068622",
|
||||
".ftchinese.com/story/001068707",
|
||||
".ftchinese.com/story/001069146",
|
||||
".ftchinese.com/story/001069373",
|
||||
".ftchinese.com/story/001069516",
|
||||
".ftchinese.com/story/001069517",
|
||||
".ftchinese.com/story/001069687",
|
||||
".ftchinese.com/story/001069741",
|
||||
".ftchinese.com/story/001069861",
|
||||
".ftchinese.com/story/001069952",
|
||||
".ftchinese.com/story/001070053",
|
||||
".ftchinese.com/story/001070177",
|
||||
".ftchinese.com/story/001070307",
|
||||
".ftchinese.com/story/001070809",
|
||||
".ftchinese.com/story/001070990",
|
||||
".ftchinese.com/story/001071042",
|
||||
".ftchinese.com/story/001071044",
|
||||
".ftchinese.com/story/001071106",
|
||||
".ftchinese.com/story/001071166",
|
||||
".ftchinese.com/story/001071181",
|
||||
"ftchinese.com/story/001071200",
|
||||
".ftchinese.com/story/001071208",
|
||||
".ftchinese.com/story/001071238",
|
||||
".ftchinese.com/story/001071683",
|
||||
".ftchinese.com/story/001072271",
|
||||
".ftchinese.com/story/001072348",
|
||||
".ftchinese.com/story/001072677",
|
||||
".ftchinese.com/story/001072726",
|
||||
".ftchinese.com/story/001072794",
|
||||
".ftchinese.com/story/001072853",
|
||||
".ftchinese.com/story/001072895",
|
||||
".ftchinese.com/story/001072993",
|
||||
".ftchinese.com/story/001073043",
|
||||
".ftchinese.com/story/001073103",
|
||||
".ftchinese.com/story/001073157",
|
||||
".ftchinese.com/story/001073216",
|
||||
".ftchinese.com/story/001073246",
|
||||
".ftchinese.com/story/001073305",
|
||||
".ftchinese.com/story/001073307",
|
||||
".ftchinese.com/story/001073408",
|
||||
".ftchinese.com/story/001073537",
|
||||
".ftchinese.com/story/001073672",
|
||||
".ftchinese.com/story/001073849",
|
||||
".ftchinese.com/story/001073906",
|
||||
".ftchinese.com/story/001074089",
|
||||
".ftchinese.com/story/001074110",
|
||||
".ftchinese.com/story/001074128",
|
||||
".ftchinese.com/story/001074157",
|
||||
".ftchinese.com/story/001074246",
|
||||
".ftchinese.com/story/001074307",
|
||||
".ftchinese.com/story/001074347",
|
||||
".ftchinese.com/story/001074423",
|
||||
".ftchinese.com/story/001074454",
|
||||
".ftchinese.com/story/001074467",
|
||||
".ftchinese.com/story/001074493",
|
||||
".ftchinese.com/story/001074550",
|
||||
".ftchinese.com/story/001074562",
|
||||
".ftchinese.com/story/001074653",
|
||||
".ftchinese.com/story/001074693",
|
||||
".ftchinese.com/story/001074699",
|
||||
".ftchinese.com/story/001074712",
|
||||
".ftchinese.com/story/001074713",
|
||||
".ftchinese.com/story/001074768",
|
||||
".ftchinese.com/story/001074782",
|
||||
".ftchinese.com/story/001074794",
|
||||
".ftchinese.com/story/001074822",
|
||||
".ftchinese.com/story/001074874",
|
||||
".ftchinese.com/story/001074891",
|
||||
".ftchinese.com/story/001074918",
|
||||
".ftchinese.com/story/001075081",
|
||||
".ftchinese.com/story/001075134",
|
||||
".ftchinese.com/story/001075142",
|
||||
".ftchinese.com/story/001075216",
|
||||
".ftchinese.com/story/001075230",
|
||||
".ftchinese.com/story/001075238",
|
||||
".ftchinese.com/story/001075262",
|
||||
".ftchinese.com/story/001075269",
|
||||
".ftchinese.com/story/001075491",
|
||||
".ftchinese.com/story/001075500",
|
||||
".ftchinese.com/story/001075650",
|
||||
".ftchinese.com/story/001075678",
|
||||
".ftchinese.com/story/001075703",
|
||||
".ftchinese.com/story/001075739",
|
||||
".ftchinese.com/story/001076066",
|
||||
".ftchinese.com/story/001076142",
|
||||
".ftchinese.com/story/001076459",
|
||||
".ftchinese.com/story/001076470",
|
||||
".ftchinese.com/story/001076538",
|
||||
".ftchinese.com/story/001076573",
|
||||
".ftchinese.com/story/001076901",
|
||||
".ftchinese.com/story/001077067",
|
||||
".ftchinese.com/story/001077084",
|
||||
".ftchinese.com/story/001077235",
|
||||
".ftchinese.com/story/001077344",
|
||||
".ftchinese.com/story/001077390",
|
||||
".ftchinese.com/story/001077392",
|
||||
".ftchinese.com/story/001077465",
|
||||
".ftchinese.com/story/001077468",
|
||||
".ftchinese.com/story/001077492",
|
||||
".ftchinese.com/story/001077745",
|
||||
".ftchinese.com/story/001077768",
|
||||
".ftchinese.com/story/001077804",
|
||||
".ftchinese.com/story/001077852",
|
||||
".ftchinese.com/story/001078646",
|
||||
".ftchinese.com/story/001078928",
|
||||
".ftchinese.com/story/001078967",
|
||||
".ftchinese.com/story/001079559",
|
||||
".ftchinese.com/story/001079641",
|
||||
".ftchinese.com/story/001079909",
|
||||
".ftchinese.com/story/001079934",
|
||||
".ftchinese.com/story/001079992",
|
||||
".ftchinese.com/story/001080054",
|
||||
".ftchinese.com/story/001080109",
|
||||
".ftchinese.com/story/001080169",
|
||||
".ftchinese.com/story/001080226",
|
||||
".ftchinese.com/story/001080429",
|
||||
".ftchinese.com/story/001080471",
|
||||
".ftchinese.com/story/001080550",
|
||||
".ftchinese.com/story/001080581",
|
||||
".ftchinese.com/story/001080647",
|
||||
".ftchinese.com/story/001080778",
|
||||
".ftchinese.com/story/001080892",
|
||||
".ftchinese.com/story/001080915",
|
||||
".ftchinese.com/story/001080935",
|
||||
".ftchinese.com/story/001081059",
|
||||
".ftchinese.com/story/001081127",
|
||||
".ftchinese.com/tag/%E5%8D%81%E5%85%AB%E5%B1%8A%E4%B8%89%E4%B8%AD%E5%85%A8%E4%BC%9A",
|
||||
".ftchinese.com/tag/%E6%B8%A9%E5%AE%B6%E5%AE%9D",
|
||||
".ftchinese.com/tag/%E8%96%84%E7%86%99%E6%9D%A5",
|
||||
".ftchinese.com/video/1437",
|
||||
".ftchinese.com/video/1882",
|
||||
".ftchinese.com/video/2446",
|
||||
".ftchinese.com/video/2601",
|
||||
".ftchinese.com/comments",
|
||||
".ftchinese.com",
|
||||
"||ftchinese.com",
|
||||
"||1e100.net",
|
||||
"||466453.com",
|
||||
"||abc.xyz",
|
||||
@@ -1595,6 +1155,7 @@ var rules = [
|
||||
"||2008xianzhang.info",
|
||||
"||2017.hk",
|
||||
"21andy.com/blog",
|
||||
".21join.com",
|
||||
".21pron.com",
|
||||
"21sextury.com",
|
||||
".228.net.tw",
|
||||
@@ -1636,9 +1197,10 @@ var rules = [
|
||||
"64wiki.com",
|
||||
".66.ca",
|
||||
"666kb.com",
|
||||
"6park.com",
|
||||
".6park.com",
|
||||
"||6park.com",
|
||||
"||6parker.com",
|
||||
"||6parknews.com",
|
||||
"||7capture.com",
|
||||
".7cow.com",
|
||||
".8-d.com",
|
||||
@@ -1923,6 +1485,7 @@ var rules = [
|
||||
".avdb.tv",
|
||||
"||avdb.tv",
|
||||
".avfantasy.com",
|
||||
"||avg.com",
|
||||
".avgle.com",
|
||||
"||avgle.com",
|
||||
"||avidemux.org",
|
||||
@@ -2716,6 +2279,8 @@ var rules = [
|
||||
"delicious.com/GFWbookmark",
|
||||
".democrats.org",
|
||||
"||democrats.org",
|
||||
".demosisto.hk",
|
||||
"||demosisto.hk",
|
||||
"||desc.se",
|
||||
"||dessci.com",
|
||||
".destroy-china.jp",
|
||||
@@ -3416,6 +2981,7 @@ var rules = [
|
||||
"||toutyrater.github.io",
|
||||
"wsgzao.github.io",
|
||||
"|https://wsgzao.github.io",
|
||||
"||raw.githubusercontent.com",
|
||||
".gizlen.net",
|
||||
"||gizlen.net",
|
||||
".gjczz.com",
|
||||
@@ -4390,7 +3956,7 @@ var rules = [
|
||||
".lsmradio.com/rad_archives",
|
||||
".lsmwebcast.com",
|
||||
".ltn.com.tw",
|
||||
"|http://ltn.com.tw",
|
||||
"||ltn.com.tw",
|
||||
".luke54.com",
|
||||
".luke54.org",
|
||||
".lupm.org",
|
||||
@@ -4858,6 +4424,7 @@ var rules = [
|
||||
"|http://nvtongzhisheng.org",
|
||||
".nwtca.org",
|
||||
"|http://nyaa.eu",
|
||||
"||nyaa.si",
|
||||
".nydus.ca",
|
||||
"nylon-angel.com",
|
||||
"nylonstockingsonline.com",
|
||||
@@ -5321,6 +4888,7 @@ var rules = [
|
||||
"||rapidmoviez.com",
|
||||
"rapidvpn.com",
|
||||
"||rapidvpn.com",
|
||||
"||rarbgprx.org",
|
||||
".raremovie.cc",
|
||||
"|http://raremovie.cc",
|
||||
".raremovie.net",
|
||||
@@ -6861,7 +6429,7 @@ var rules = [
|
||||
"||windscribe.com",
|
||||
"||community.windy.com",
|
||||
"||wingy.site",
|
||||
"winning11.com",
|
||||
".winning11.com",
|
||||
"winwhispers.info",
|
||||
"||wiredbytes.com",
|
||||
"||wiredpen.com",
|
||||
|
||||
Binary file not shown.
BIN
v2rayN/v2rayN/Resources/share.png
Normal file
BIN
v2rayN/v2rayN/Resources/share.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 802 B |
81
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
81
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
@@ -19,7 +19,7 @@ namespace v2rayN.Resx {
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class ResUI {
|
||||
@@ -105,6 +105,15 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Downloading... 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string Downloading {
|
||||
get {
|
||||
return ResourceManager.GetString("Downloading", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 DOWN 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -267,6 +276,24 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 {0} already up to date. 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string IsLatestCore {
|
||||
get {
|
||||
return ResourceManager.GetString("IsLatestCore", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 {0} already up to date. 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string IsLatestN {
|
||||
get {
|
||||
return ResourceManager.GetString("IsLatestN", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Address 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -394,7 +421,7 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Download V2rayCore successfully 的本地化字符串。
|
||||
/// 查找类似 Download V2ray successfully 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string MsgDownloadV2rayCoreSuccessfully {
|
||||
get {
|
||||
@@ -448,11 +475,11 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Resolve V2rayCore successfully 的本地化字符串。
|
||||
/// 查找类似 Resolve {0} successfully 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string MsgParsingV2rayCoreSuccessfully {
|
||||
internal static string MsgParsingSuccessfully {
|
||||
get {
|
||||
return ResourceManager.GetString("MsgParsingV2rayCoreSuccessfully", resourceCulture);
|
||||
return ResourceManager.GetString("MsgParsingSuccessfully", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -474,6 +501,15 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Start updating {0}... 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string MsgStartUpdating {
|
||||
get {
|
||||
return ResourceManager.GetString("MsgStartUpdating", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Start updating PAC... 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -483,15 +519,6 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Start updating V2rayCore... 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string MsgStartUpdatingV2rayCore {
|
||||
get {
|
||||
return ResourceManager.GetString("MsgStartUpdatingV2rayCore", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Subscription content decoding failed (non-BASE64 code) 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -574,7 +601,7 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 V2ray-core not found, download address: {0} 的本地化字符串。
|
||||
/// 查找类似 V2ray-core not found, please download: {0} 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string NotFoundCore {
|
||||
get {
|
||||
@@ -645,6 +672,15 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Servers deduplication completed. Old: {0}, New: {1}. 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string RemoveDuplicateServerResult {
|
||||
get {
|
||||
return ResourceManager.GetString("RemoveDuplicateServerResult", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Are you sure to remove the server? 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -691,7 +727,7 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 PAC failed to start. Pls with an administrator. 的本地化字符串。
|
||||
/// 查找类似 PAC failed to start. Run it with Admin right. 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string StartPacFailed {
|
||||
get {
|
||||
@@ -700,7 +736,7 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Start service ({0})...... 的本地化字符串。
|
||||
/// 查找类似 Start service ({0})... 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string StartService {
|
||||
get {
|
||||
@@ -728,7 +764,7 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Imported bulk URL from clipboard successfully 的本地化字符串。
|
||||
/// 查找类似 {0} servers have been imported from clipboard. 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string SuccessfullyImportedServerViaClipboard {
|
||||
get {
|
||||
@@ -744,5 +780,14 @@ namespace v2rayN.Resx {
|
||||
return ResourceManager.GetString("SuccessfullyImportedServerViaScan", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 The ping of current service: {0} 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string TestMeOutput {
|
||||
get {
|
||||
return ResourceManager.GetString("TestMeOutput", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,9 +123,39 @@
|
||||
<data name="BatchExportURLSuccessfully" xml:space="preserve">
|
||||
<value>Batch export share URL to clipboard successfully</value>
|
||||
</data>
|
||||
<data name="CheckServerSettings" xml:space="preserve">
|
||||
<value>Please check the server settings first</value>
|
||||
</data>
|
||||
<data name="ConfigurationFormatIncorrect" xml:space="preserve">
|
||||
<value> configuration format is incorrect</value>
|
||||
</data>
|
||||
<data name="CustomServerTips" xml:space="preserve">
|
||||
<value>Note that custom configuration relies entirely on your own configuration and does not work with all settings. The system agent is available when the socks port is equal to the port in the settings in the custom configuration inbound.</value>
|
||||
</data>
|
||||
<data name="Downloading" xml:space="preserve">
|
||||
<value>Downloading...</value>
|
||||
</data>
|
||||
<data name="downloadSpeed" xml:space="preserve">
|
||||
<value>DOWN</value>
|
||||
</data>
|
||||
<data name="DownloadYesNo" xml:space="preserve">
|
||||
<value>Whether to download? {0}</value>
|
||||
</data>
|
||||
<data name="FailedConversionConfiguration" xml:space="preserve">
|
||||
<value>Failed to convert configuration file</value>
|
||||
</data>
|
||||
<data name="FailedGenDefaultConfiguration" xml:space="preserve">
|
||||
<value>Failed to generate default configuration file</value>
|
||||
</data>
|
||||
<data name="FailedGetDefaultConfiguration" xml:space="preserve">
|
||||
<value> Failed to get the default configuration</value>
|
||||
</data>
|
||||
<data name="FailedImportedCustomServer" xml:space="preserve">
|
||||
<value>Failed to import custom configuration server</value>
|
||||
</data>
|
||||
<data name="FailedReadConfiguration" xml:space="preserve">
|
||||
<value>Failed to read configuration file</value>
|
||||
</data>
|
||||
<data name="FillCorrectAlterId" xml:space="preserve">
|
||||
<value>Please fill in the correct format extra ID</value>
|
||||
</data>
|
||||
@@ -147,75 +177,6 @@
|
||||
<data name="FillUUID" xml:space="preserve">
|
||||
<value>Please fill in the user ID</value>
|
||||
</data>
|
||||
<data name="NeedHttpGlobalProxy" xml:space="preserve">
|
||||
<value> This feature relies on the Http global proxy, please set it correctly first.</value>
|
||||
</data>
|
||||
<data name="NonVmessService" xml:space="preserve">
|
||||
<value> non-Vmess service, this feature is invalid</value>
|
||||
</data>
|
||||
<data name="NoValidQRcodeFound" xml:space="preserve">
|
||||
<value>Scan completed, no valid QR code found</value>
|
||||
</data>
|
||||
<data name="OperationFailed" xml:space="preserve">
|
||||
<value> operation failed, please check retry</value>
|
||||
</data>
|
||||
<data name="PleaseFillRemarks" xml:space="preserve">
|
||||
<value>Please Fill Remarks</value>
|
||||
</data>
|
||||
<data name="PleaseSelectEncryption" xml:space="preserve">
|
||||
<value>Please select the encryption method</value>
|
||||
</data>
|
||||
<data name="PleaseSelectProtocol" xml:space="preserve">
|
||||
<value>Please select an agreement</value>
|
||||
</data>
|
||||
<data name="PleaseSelectServer" xml:space="preserve">
|
||||
<value>Please select the server first</value>
|
||||
</data>
|
||||
<data name="SuccessfullyImportedCustomServer" xml:space="preserve">
|
||||
<value>Successfully imported custom configuration server</value>
|
||||
</data>
|
||||
<data name="SuccessfullyImportedServerViaClipboard" xml:space="preserve">
|
||||
<value>Imported bulk URL from clipboard successfully</value>
|
||||
</data>
|
||||
<data name="CustomServerTips" xml:space="preserve">
|
||||
<value>Note that custom configuration relies entirely on your own configuration and does not work with all settings. The system agent is available when the socks port is equal to the port in the settings in the custom configuration inbound.</value>
|
||||
</data>
|
||||
<data name="SaveClientConfigurationIn" xml:space="preserve">
|
||||
<value>The client configuration file is saved at: {0}</value>
|
||||
</data>
|
||||
<data name="SaveServerConfigurationIn" xml:space="preserve">
|
||||
<value>The server configuration file is saved at: {0}</value>
|
||||
</data>
|
||||
<data name="SpeedServerTips" xml:space="preserve">
|
||||
<value>Note: After this function relies on the Http global proxy test, please manually adjust the Http global proxy and active node!</value>
|
||||
</data>
|
||||
<data name="SuccessfullyImportedServerViaScan" xml:space="preserve">
|
||||
<value>Scan import URL successfully</value>
|
||||
</data>
|
||||
<data name="DownloadYesNo" xml:space="preserve">
|
||||
<value>Whether to download? {0}</value>
|
||||
</data>
|
||||
<data name="RemoveServer" xml:space="preserve">
|
||||
<value>Are you sure to remove the server?</value>
|
||||
</data>
|
||||
<data name="CheckServerSettings" xml:space="preserve">
|
||||
<value>Please check the server settings first</value>
|
||||
</data>
|
||||
<data name="ConfigurationFormatIncorrect" xml:space="preserve">
|
||||
<value> configuration format is incorrect</value>
|
||||
</data>
|
||||
<data name="FailedConversionConfiguration" xml:space="preserve">
|
||||
<value>Failed to convert configuration file</value>
|
||||
</data>
|
||||
<data name="FailedGenDefaultConfiguration" xml:space="preserve">
|
||||
<value>Failed to generate default configuration file</value>
|
||||
</data>
|
||||
<data name="FailedGetDefaultConfiguration" xml:space="preserve">
|
||||
<value> Failed to get the default configuration</value>
|
||||
</data>
|
||||
<data name="FailedReadConfiguration" xml:space="preserve">
|
||||
<value>Failed to read configuration file</value>
|
||||
</data>
|
||||
<data name="IncorrectClientConfiguration" xml:space="preserve">
|
||||
<value> is not the correct client configuration file, please check</value>
|
||||
</data>
|
||||
@@ -228,18 +189,11 @@
|
||||
<data name="InitialConfiguration" xml:space="preserve">
|
||||
<value>Initial Configuration</value>
|
||||
</data>
|
||||
<data name="NonvmessOrssProtocol" xml:space="preserve">
|
||||
<value>Non-vmess or ss protocol</value>
|
||||
<data name="IsLatestCore" xml:space="preserve">
|
||||
<value>{0} already up to date.</value>
|
||||
</data>
|
||||
<data name="SuccessfulConfiguration" xml:space="preserve">
|
||||
<value>Successful configuration
|
||||
{0}</value>
|
||||
</data>
|
||||
<data name="NotFoundCore" xml:space="preserve">
|
||||
<value>V2ray-core not found, download address: {0}</value>
|
||||
</data>
|
||||
<data name="StartService" xml:space="preserve">
|
||||
<value>Start service ({0})......</value>
|
||||
<data name="IsLatestN" xml:space="preserve">
|
||||
<value>{0} already up to date.</value>
|
||||
</data>
|
||||
<data name="LvAddress" xml:space="preserve">
|
||||
<value>Address</value>
|
||||
@@ -262,14 +216,29 @@
|
||||
<data name="LvTestResults" xml:space="preserve">
|
||||
<value>Test Results</value>
|
||||
</data>
|
||||
<data name="LvTodayDownloadDataAmount" xml:space="preserve">
|
||||
<value>Today download traffic</value>
|
||||
</data>
|
||||
<data name="LvTodayUploadDataAmount" xml:space="preserve">
|
||||
<value>Today upload traffic</value>
|
||||
</data>
|
||||
<data name="LvTotalDownloadDataAmount" xml:space="preserve">
|
||||
<value>Total download traffic</value>
|
||||
</data>
|
||||
<data name="LvTotalUploadDataAmount" xml:space="preserve">
|
||||
<value>Total upload traffic</value>
|
||||
</data>
|
||||
<data name="LvTransportProtocol" xml:space="preserve">
|
||||
<value>Transport</value>
|
||||
</data>
|
||||
<data name="MediumFresh" xml:space="preserve">
|
||||
<value>MediumFresh</value>
|
||||
</data>
|
||||
<data name="MsgClearSubscription" xml:space="preserve">
|
||||
<value>Clear original subscription content</value>
|
||||
</data>
|
||||
<data name="MsgDownloadV2rayCoreSuccessfully" xml:space="preserve">
|
||||
<value>Download V2rayCore successfully</value>
|
||||
<value>Download V2ray successfully</value>
|
||||
</data>
|
||||
<data name="MsgFailedImportSubscription" xml:space="preserve">
|
||||
<value>Failed to import subscription content</value>
|
||||
@@ -286,8 +255,8 @@
|
||||
<data name="MsgPACUpdateSuccessfully" xml:space="preserve">
|
||||
<value>PAC update succeeded</value>
|
||||
</data>
|
||||
<data name="MsgParsingV2rayCoreSuccessfully" xml:space="preserve">
|
||||
<value>Resolve V2rayCore successfully</value>
|
||||
<data name="MsgParsingSuccessfully" xml:space="preserve">
|
||||
<value>Resolve {0} successfully</value>
|
||||
</data>
|
||||
<data name="MsgSimplifyPAC" xml:space="preserve">
|
||||
<value>Simplify PAC Success</value>
|
||||
@@ -295,12 +264,12 @@
|
||||
<data name="MsgStartGettingSubscriptions" xml:space="preserve">
|
||||
<value>Start getting subscriptions</value>
|
||||
</data>
|
||||
<data name="MsgStartUpdating" xml:space="preserve">
|
||||
<value>Start updating {0}...</value>
|
||||
</data>
|
||||
<data name="MsgStartUpdatingPAC" xml:space="preserve">
|
||||
<value>Start updating PAC...</value>
|
||||
</data>
|
||||
<data name="MsgStartUpdatingV2rayCore" xml:space="preserve">
|
||||
<value>Start updating V2rayCore...</value>
|
||||
</data>
|
||||
<data name="MsgSubscriptionDecodingFailed" xml:space="preserve">
|
||||
<value>Subscription content decoding failed (non-BASE64 code)</value>
|
||||
</data>
|
||||
@@ -319,31 +288,77 @@
|
||||
<data name="MsgUpdateV2rayCoreSuccessfullyMore" xml:space="preserve">
|
||||
<value>Update V2rayCore successfully! Restarting service...</value>
|
||||
</data>
|
||||
<data name="MediumFresh" xml:space="preserve">
|
||||
<value>MediumFresh</value>
|
||||
<data name="NeedHttpGlobalProxy" xml:space="preserve">
|
||||
<value> This feature relies on the Http global proxy, please set it correctly first.</value>
|
||||
</data>
|
||||
<data name="NonvmessOrssProtocol" xml:space="preserve">
|
||||
<value>Non-vmess or ss protocol</value>
|
||||
</data>
|
||||
<data name="NonVmessService" xml:space="preserve">
|
||||
<value> non-Vmess service, this feature is invalid</value>
|
||||
</data>
|
||||
<data name="NotFoundCore" xml:space="preserve">
|
||||
<value>V2ray-core not found, please download: {0}</value>
|
||||
</data>
|
||||
<data name="NoValidQRcodeFound" xml:space="preserve">
|
||||
<value>Scan completed, no valid QR code found</value>
|
||||
</data>
|
||||
<data name="OperationFailed" xml:space="preserve">
|
||||
<value> operation failed, please check retry</value>
|
||||
</data>
|
||||
<data name="PleaseFillRemarks" xml:space="preserve">
|
||||
<value>Please Fill Remarks</value>
|
||||
</data>
|
||||
<data name="PleaseSelectEncryption" xml:space="preserve">
|
||||
<value>Please select the encryption method</value>
|
||||
</data>
|
||||
<data name="PleaseSelectProtocol" xml:space="preserve">
|
||||
<value>Please select an agreement</value>
|
||||
</data>
|
||||
<data name="PleaseSelectServer" xml:space="preserve">
|
||||
<value>Please select the server first</value>
|
||||
</data>
|
||||
<data name="QuickFresh" xml:space="preserve">
|
||||
<value>QuickFresh</value>
|
||||
</data>
|
||||
<data name="RemoveDuplicateServerResult" xml:space="preserve">
|
||||
<value>Servers deduplication completed. Old: {0}, New: {1}.</value>
|
||||
</data>
|
||||
<data name="RemoveServer" xml:space="preserve">
|
||||
<value>Are you sure to remove the server?</value>
|
||||
</data>
|
||||
<data name="SaveClientConfigurationIn" xml:space="preserve">
|
||||
<value>The client configuration file is saved at: {0}</value>
|
||||
</data>
|
||||
<data name="SaveServerConfigurationIn" xml:space="preserve">
|
||||
<value>The server configuration file is saved at: {0}</value>
|
||||
</data>
|
||||
<data name="SlowFresh" xml:space="preserve">
|
||||
<value>SlowFresh</value>
|
||||
</data>
|
||||
<data name="downloadSpeed" xml:space="preserve">
|
||||
<value>DOWN</value>
|
||||
</data>
|
||||
<data name="LvTodayDownloadDataAmount" xml:space="preserve">
|
||||
<value>Today download traffic</value>
|
||||
</data>
|
||||
<data name="LvTodayUploadDataAmount" xml:space="preserve">
|
||||
<value>Today upload traffic</value>
|
||||
</data>
|
||||
<data name="LvTotalDownloadDataAmount" xml:space="preserve">
|
||||
<value>Total download traffic</value>
|
||||
</data>
|
||||
<data name="LvTotalUploadDataAmount" xml:space="preserve">
|
||||
<value>Total upload traffic</value>
|
||||
<data name="SpeedServerTips" xml:space="preserve">
|
||||
<value>Note: After this function relies on the Http global proxy test, please manually adjust the Http global proxy and active node!</value>
|
||||
</data>
|
||||
<data name="StartPacFailed" xml:space="preserve">
|
||||
<value>PAC failed to start. Pls with an administrator.</value>
|
||||
<value>PAC failed to start. Run it with Admin right.</value>
|
||||
</data>
|
||||
<data name="StartService" xml:space="preserve">
|
||||
<value>Start service ({0})...</value>
|
||||
</data>
|
||||
<data name="SuccessfulConfiguration" xml:space="preserve">
|
||||
<value>Successful configuration
|
||||
{0}</value>
|
||||
</data>
|
||||
<data name="SuccessfullyImportedCustomServer" xml:space="preserve">
|
||||
<value>Successfully imported custom configuration server</value>
|
||||
</data>
|
||||
<data name="SuccessfullyImportedServerViaClipboard" xml:space="preserve">
|
||||
<value>{0} servers have been imported from clipboard.</value>
|
||||
</data>
|
||||
<data name="SuccessfullyImportedServerViaScan" xml:space="preserve">
|
||||
<value>Scan import URL successfully</value>
|
||||
</data>
|
||||
<data name="TestMeOutput" xml:space="preserve">
|
||||
<value>The ping of current service: {0}</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -123,9 +123,39 @@
|
||||
<data name="BatchExportURLSuccessfully" xml:space="preserve">
|
||||
<value>批量导出分享URL至剪贴板成功</value>
|
||||
</data>
|
||||
<data name="CheckServerSettings" xml:space="preserve">
|
||||
<value>请先检查服务器设置</value>
|
||||
</data>
|
||||
<data name="ConfigurationFormatIncorrect" xml:space="preserve">
|
||||
<value>配置格式不正确</value>
|
||||
</data>
|
||||
<data name="CustomServerTips" xml:space="preserve">
|
||||
<value>注意,自定义配置完全依赖您自己的配置,不能使用所有设置功能。在自定义配置inbound中有socks port等于设置中的port时,系统代理才可用</value>
|
||||
</data>
|
||||
<data name="Downloading" xml:space="preserve">
|
||||
<value>下载开始...</value>
|
||||
</data>
|
||||
<data name="downloadSpeed" xml:space="preserve">
|
||||
<value>下载</value>
|
||||
</data>
|
||||
<data name="DownloadYesNo" xml:space="preserve">
|
||||
<value>是否下载? {0}</value>
|
||||
</data>
|
||||
<data name="FailedConversionConfiguration" xml:space="preserve">
|
||||
<value>转换配置文件失败</value>
|
||||
</data>
|
||||
<data name="FailedGenDefaultConfiguration" xml:space="preserve">
|
||||
<value>生成默认配置文件失败</value>
|
||||
</data>
|
||||
<data name="FailedGetDefaultConfiguration" xml:space="preserve">
|
||||
<value>取得默认配置失败</value>
|
||||
</data>
|
||||
<data name="FailedImportedCustomServer" xml:space="preserve">
|
||||
<value>导入自定义配置服务器失败</value>
|
||||
</data>
|
||||
<data name="FailedReadConfiguration" xml:space="preserve">
|
||||
<value>读取配置文件失败</value>
|
||||
</data>
|
||||
<data name="FillCorrectAlterId" xml:space="preserve">
|
||||
<value>请填写正确格式额外ID</value>
|
||||
</data>
|
||||
@@ -147,75 +177,6 @@
|
||||
<data name="FillUUID" xml:space="preserve">
|
||||
<value>请填写用户ID</value>
|
||||
</data>
|
||||
<data name="NeedHttpGlobalProxy" xml:space="preserve">
|
||||
<value>此功能依赖Http全局代理,请先设置正确。</value>
|
||||
</data>
|
||||
<data name="NonVmessService" xml:space="preserve">
|
||||
<value>非Vmess服务,此功能无效</value>
|
||||
</data>
|
||||
<data name="NoValidQRcodeFound" xml:space="preserve">
|
||||
<value>扫描完成,未发现有效二维码</value>
|
||||
</data>
|
||||
<data name="OperationFailed" xml:space="preserve">
|
||||
<value>操作失败,请检查重试</value>
|
||||
</data>
|
||||
<data name="PleaseFillRemarks" xml:space="preserve">
|
||||
<value>请填写备注</value>
|
||||
</data>
|
||||
<data name="PleaseSelectEncryption" xml:space="preserve">
|
||||
<value>请选择加密方式</value>
|
||||
</data>
|
||||
<data name="PleaseSelectProtocol" xml:space="preserve">
|
||||
<value>请选择协议</value>
|
||||
</data>
|
||||
<data name="PleaseSelectServer" xml:space="preserve">
|
||||
<value>请先选择服务器</value>
|
||||
</data>
|
||||
<data name="SuccessfullyImportedCustomServer" xml:space="preserve">
|
||||
<value>成功导入自定义配置服务器</value>
|
||||
</data>
|
||||
<data name="SuccessfullyImportedServerViaClipboard" xml:space="preserve">
|
||||
<value>从剪贴板导入批量URL成功</value>
|
||||
</data>
|
||||
<data name="CustomServerTips" xml:space="preserve">
|
||||
<value>注意,自定义配置完全依赖您自己的配置,不能使用所有设置功能。在自定义配置inbound中有socks port等于设置中的port时,系统代理才可用</value>
|
||||
</data>
|
||||
<data name="SaveClientConfigurationIn" xml:space="preserve">
|
||||
<value>客户端配置文件保存在:{0}</value>
|
||||
</data>
|
||||
<data name="SaveServerConfigurationIn" xml:space="preserve">
|
||||
<value>服务端配置文件保存在:{0}</value>
|
||||
</data>
|
||||
<data name="SpeedServerTips" xml:space="preserve">
|
||||
<value>注意:此功能依赖Http全局代理!测试完成后,请手工调整Http全局代理和活动节点。</value>
|
||||
</data>
|
||||
<data name="SuccessfullyImportedServerViaScan" xml:space="preserve">
|
||||
<value>扫描导入URL成功</value>
|
||||
</data>
|
||||
<data name="DownloadYesNo" xml:space="preserve">
|
||||
<value>是否下载? {0}</value>
|
||||
</data>
|
||||
<data name="RemoveServer" xml:space="preserve">
|
||||
<value>是否确定移除服务器?</value>
|
||||
</data>
|
||||
<data name="CheckServerSettings" xml:space="preserve">
|
||||
<value>请先检查服务器设置</value>
|
||||
</data>
|
||||
<data name="ConfigurationFormatIncorrect" xml:space="preserve">
|
||||
<value>配置格式不正确</value>
|
||||
</data>
|
||||
<data name="FailedConversionConfiguration" xml:space="preserve">
|
||||
<value>转换配置文件失败</value>
|
||||
</data>
|
||||
<data name="FailedGenDefaultConfiguration" xml:space="preserve">
|
||||
<value>生成默认配置文件失败</value>
|
||||
</data>
|
||||
<data name="FailedGetDefaultConfiguration" xml:space="preserve">
|
||||
<value>取得默认配置失败</value>
|
||||
</data>
|
||||
<data name="FailedReadConfiguration" xml:space="preserve">
|
||||
<value>读取配置文件失败</value>
|
||||
</data>
|
||||
<data name="IncorrectClientConfiguration" xml:space="preserve">
|
||||
<value>不是正确的客户端配置文件,请检查</value>
|
||||
</data>
|
||||
@@ -228,18 +189,11 @@
|
||||
<data name="InitialConfiguration" xml:space="preserve">
|
||||
<value>初始化配置</value>
|
||||
</data>
|
||||
<data name="NonvmessOrssProtocol" xml:space="preserve">
|
||||
<value>非vmess或ss协议</value>
|
||||
<data name="IsLatestCore" xml:space="preserve">
|
||||
<value>{0} 已是最新版本。</value>
|
||||
</data>
|
||||
<data name="SuccessfulConfiguration" xml:space="preserve">
|
||||
<value>配置成功
|
||||
{0}</value>
|
||||
</data>
|
||||
<data name="NotFoundCore" xml:space="preserve">
|
||||
<value>未找到v2ray-core,下载地址:{0}</value>
|
||||
</data>
|
||||
<data name="StartService" xml:space="preserve">
|
||||
<value>启动服务({0})......</value>
|
||||
<data name="IsLatestN" xml:space="preserve">
|
||||
<value>{0} 已是最新版本。</value>
|
||||
</data>
|
||||
<data name="LvAddress" xml:space="preserve">
|
||||
<value>地址</value>
|
||||
@@ -254,7 +208,7 @@
|
||||
<value>端口</value>
|
||||
</data>
|
||||
<data name="LvServiceType" xml:space="preserve">
|
||||
<value>服务类型</value>
|
||||
<value>类型</value>
|
||||
</data>
|
||||
<data name="LvSubscription" xml:space="preserve">
|
||||
<value>订阅</value>
|
||||
@@ -262,14 +216,29 @@
|
||||
<data name="LvTestResults" xml:space="preserve">
|
||||
<value>测试结果</value>
|
||||
</data>
|
||||
<data name="LvTodayDownloadDataAmount" xml:space="preserve">
|
||||
<value>今日下载</value>
|
||||
</data>
|
||||
<data name="LvTodayUploadDataAmount" xml:space="preserve">
|
||||
<value>今日上传</value>
|
||||
</data>
|
||||
<data name="LvTotalDownloadDataAmount" xml:space="preserve">
|
||||
<value>总下载</value>
|
||||
</data>
|
||||
<data name="LvTotalUploadDataAmount" xml:space="preserve">
|
||||
<value>总上传</value>
|
||||
</data>
|
||||
<data name="LvTransportProtocol" xml:space="preserve">
|
||||
<value>传输协议</value>
|
||||
</data>
|
||||
<data name="MediumFresh" xml:space="preserve">
|
||||
<value>中等</value>
|
||||
</data>
|
||||
<data name="MsgClearSubscription" xml:space="preserve">
|
||||
<value>清除原订阅内容</value>
|
||||
</data>
|
||||
<data name="MsgDownloadV2rayCoreSuccessfully" xml:space="preserve">
|
||||
<value>下载V2rayCore成功</value>
|
||||
<value>下载V2ray成功</value>
|
||||
</data>
|
||||
<data name="MsgFailedImportSubscription" xml:space="preserve">
|
||||
<value>导入订阅内容失败</value>
|
||||
@@ -286,8 +255,8 @@
|
||||
<data name="MsgPACUpdateSuccessfully" xml:space="preserve">
|
||||
<value>PAC更新成功</value>
|
||||
</data>
|
||||
<data name="MsgParsingV2rayCoreSuccessfully" xml:space="preserve">
|
||||
<value>解析V2rayCore成功</value>
|
||||
<data name="MsgParsingSuccessfully" xml:space="preserve">
|
||||
<value>解析{0}成功</value>
|
||||
</data>
|
||||
<data name="MsgSimplifyPAC" xml:space="preserve">
|
||||
<value>简化PAC成功</value>
|
||||
@@ -295,11 +264,11 @@
|
||||
<data name="MsgStartGettingSubscriptions" xml:space="preserve">
|
||||
<value>开始获取订阅内容</value>
|
||||
</data>
|
||||
<data name="MsgStartUpdatingPAC" xml:space="preserve">
|
||||
<value>开始更新PAC...</value>
|
||||
<data name="MsgStartUpdating" xml:space="preserve">
|
||||
<value>开始更新 {0}...</value>
|
||||
</data>
|
||||
<data name="MsgStartUpdatingV2rayCore" xml:space="preserve">
|
||||
<value>开始更新V2rayCore...</value>
|
||||
<data name="MsgStartUpdatingPAC" xml:space="preserve">
|
||||
<value>开始更新 PAC...</value>
|
||||
</data>
|
||||
<data name="MsgSubscriptionDecodingFailed" xml:space="preserve">
|
||||
<value>订阅内容解码失败(非BASE64码)</value>
|
||||
@@ -319,31 +288,77 @@
|
||||
<data name="MsgUpdateV2rayCoreSuccessfullyMore" xml:space="preserve">
|
||||
<value>更新V2rayCore成功!正在重启服务...</value>
|
||||
</data>
|
||||
<data name="MediumFresh" xml:space="preserve">
|
||||
<value>中等</value>
|
||||
<data name="NeedHttpGlobalProxy" xml:space="preserve">
|
||||
<value>此功能依赖Http全局代理,请先设置正确。</value>
|
||||
</data>
|
||||
<data name="NonvmessOrssProtocol" xml:space="preserve">
|
||||
<value>非vmess或ss协议</value>
|
||||
</data>
|
||||
<data name="NonVmessService" xml:space="preserve">
|
||||
<value>非Vmess服务,此功能无效</value>
|
||||
</data>
|
||||
<data name="NotFoundCore" xml:space="preserve">
|
||||
<value>找不到 v2ray-core,下载地址: {0}</value>
|
||||
</data>
|
||||
<data name="NoValidQRcodeFound" xml:space="preserve">
|
||||
<value>扫描完成,未发现有效二维码</value>
|
||||
</data>
|
||||
<data name="OperationFailed" xml:space="preserve">
|
||||
<value>操作失败,请检查重试</value>
|
||||
</data>
|
||||
<data name="PleaseFillRemarks" xml:space="preserve">
|
||||
<value>请填写备注</value>
|
||||
</data>
|
||||
<data name="PleaseSelectEncryption" xml:space="preserve">
|
||||
<value>请选择加密方式</value>
|
||||
</data>
|
||||
<data name="PleaseSelectProtocol" xml:space="preserve">
|
||||
<value>请选择协议</value>
|
||||
</data>
|
||||
<data name="PleaseSelectServer" xml:space="preserve">
|
||||
<value>请先选择服务器</value>
|
||||
</data>
|
||||
<data name="QuickFresh" xml:space="preserve">
|
||||
<value>快</value>
|
||||
</data>
|
||||
<data name="RemoveDuplicateServerResult" xml:space="preserve">
|
||||
<value>服务器去重完成。原数量: {0},现数量: {1}</value>
|
||||
</data>
|
||||
<data name="RemoveServer" xml:space="preserve">
|
||||
<value>是否确定移除服务器?</value>
|
||||
</data>
|
||||
<data name="SaveClientConfigurationIn" xml:space="preserve">
|
||||
<value>客户端配置文件保存在:{0}</value>
|
||||
</data>
|
||||
<data name="SaveServerConfigurationIn" xml:space="preserve">
|
||||
<value>服务端配置文件保存在:{0}</value>
|
||||
</data>
|
||||
<data name="SlowFresh" xml:space="preserve">
|
||||
<value>慢</value>
|
||||
</data>
|
||||
<data name="downloadSpeed" xml:space="preserve">
|
||||
<value>下载</value>
|
||||
</data>
|
||||
<data name="LvTodayDownloadDataAmount" xml:space="preserve">
|
||||
<value>今日下载</value>
|
||||
</data>
|
||||
<data name="LvTodayUploadDataAmount" xml:space="preserve">
|
||||
<value>今日上传</value>
|
||||
</data>
|
||||
<data name="LvTotalDownloadDataAmount" xml:space="preserve">
|
||||
<value>总下载</value>
|
||||
</data>
|
||||
<data name="LvTotalUploadDataAmount" xml:space="preserve">
|
||||
<value>总上传</value>
|
||||
<data name="SpeedServerTips" xml:space="preserve">
|
||||
<value>注意:此功能依赖Http全局代理!测试完成后,请手工调整Http全局代理和活动节点。</value>
|
||||
</data>
|
||||
<data name="StartPacFailed" xml:space="preserve">
|
||||
<value>PAC服务启动失败,请用管理员启动</value>
|
||||
</data>
|
||||
<data name="StartService" xml:space="preserve">
|
||||
<value>启动服务({0})...</value>
|
||||
</data>
|
||||
<data name="SuccessfulConfiguration" xml:space="preserve">
|
||||
<value>配置成功
|
||||
{0}</value>
|
||||
</data>
|
||||
<data name="SuccessfullyImportedCustomServer" xml:space="preserve">
|
||||
<value>成功导入自定义配置服务器</value>
|
||||
</data>
|
||||
<data name="SuccessfullyImportedServerViaClipboard" xml:space="preserve">
|
||||
<value>成功从剪贴板导入 {0} 个服务器</value>
|
||||
</data>
|
||||
<data name="SuccessfullyImportedServerViaScan" xml:space="preserve">
|
||||
<value>扫描导入URL成功</value>
|
||||
</data>
|
||||
<data name="TestMeOutput" xml:space="preserve">
|
||||
<value>当前服务的真连接延迟: {0}</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -11,7 +11,7 @@ namespace v2rayN.Tool
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var fs = new FileStream(fileName, FileMode.Create, FileAccess.Write))
|
||||
using (FileStream fs = new FileStream(fileName, FileMode.Create, FileAccess.Write))
|
||||
fs.Write(content, 0, content.Length);
|
||||
return true;
|
||||
}
|
||||
@@ -24,20 +24,27 @@ namespace v2rayN.Tool
|
||||
|
||||
public static void UncompressFile(string fileName, byte[] content)
|
||||
{
|
||||
// Because the uncompressed size of the file is unknown,
|
||||
// we are using an arbitrary buffer size.
|
||||
byte[] buffer = new byte[4096];
|
||||
int n;
|
||||
|
||||
using (var fs = File.Create(fileName))
|
||||
using (var input = new GZipStream(new MemoryStream(content),
|
||||
CompressionMode.Decompress, false))
|
||||
try
|
||||
{
|
||||
while ((n = input.Read(buffer, 0, buffer.Length)) > 0)
|
||||
// Because the uncompressed size of the file is unknown,
|
||||
// we are using an arbitrary buffer size.
|
||||
byte[] buffer = new byte[4096];
|
||||
int n;
|
||||
|
||||
using (FileStream fs = File.Create(fileName))
|
||||
using (GZipStream input = new GZipStream(new MemoryStream(content),
|
||||
CompressionMode.Decompress, false))
|
||||
{
|
||||
fs.Write(buffer, 0, n);
|
||||
while ((n = input.Read(buffer, 0, buffer.Length)) > 0)
|
||||
{
|
||||
fs.Write(buffer, 0, n);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
|
||||
public static string NonExclusiveReadAllText(string path)
|
||||
@@ -49,8 +56,8 @@ namespace v2rayN.Tool
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
|
||||
using (var sr = new StreamReader(fs, encoding))
|
||||
using (FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
|
||||
using (StreamReader sr = new StreamReader(fs, encoding))
|
||||
{
|
||||
return sr.ReadToEnd();
|
||||
}
|
||||
@@ -61,5 +68,61 @@ namespace v2rayN.Tool
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
public static bool ZipExtractToFile(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (ZipArchive archive = ZipFile.OpenRead(fileName))
|
||||
{
|
||||
foreach (ZipArchiveEntry entry in archive.Entries)
|
||||
{
|
||||
if (entry.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
try
|
||||
{
|
||||
entry.ExtractToFile(Utils.GetPath(entry.Name), true);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool ZipExtractToFullFile(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (ZipArchive archive = ZipFile.OpenRead(fileName))
|
||||
{
|
||||
foreach (ZipArchiveEntry entry in archive.Entries)
|
||||
{
|
||||
if (entry.Length == 0)
|
||||
continue;
|
||||
|
||||
string entryOuputPath = Utils.GetPath(entry.FullName);
|
||||
FileInfo fileInfo = new FileInfo(entryOuputPath);
|
||||
fileInfo.Directory.Create();
|
||||
entry.ExtractToFile(entryOuputPath, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.SaveLog(ex.Message, ex);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,13 +16,13 @@ namespace v2rayN
|
||||
public Job()
|
||||
{
|
||||
handle = CreateJobObject(IntPtr.Zero, null);
|
||||
var extendedInfoPtr = IntPtr.Zero;
|
||||
var info = new JOBOBJECT_BASIC_LIMIT_INFORMATION
|
||||
IntPtr extendedInfoPtr = IntPtr.Zero;
|
||||
JOBOBJECT_BASIC_LIMIT_INFORMATION info = new JOBOBJECT_BASIC_LIMIT_INFORMATION
|
||||
{
|
||||
LimitFlags = 0x2000
|
||||
};
|
||||
|
||||
var extendedInfo = new JOBOBJECT_EXTENDED_LIMIT_INFORMATION
|
||||
JOBOBJECT_EXTENDED_LIMIT_INFORMATION extendedInfo = new JOBOBJECT_EXTENDED_LIMIT_INFORMATION
|
||||
{
|
||||
BasicLimitInformation = info
|
||||
};
|
||||
@@ -43,18 +43,17 @@ namespace v2rayN
|
||||
if (extendedInfoPtr != IntPtr.Zero)
|
||||
{
|
||||
Marshal.FreeHGlobal(extendedInfoPtr);
|
||||
extendedInfoPtr = IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool AddProcess(IntPtr processHandle)
|
||||
{
|
||||
var succ = AssignProcessToJobObject(handle, processHandle);
|
||||
bool succ = AssignProcessToJobObject(handle, processHandle);
|
||||
|
||||
if (!succ)
|
||||
{
|
||||
//Logging.Error("Failed to call AssignProcessToJobObject! GetLastError=" + Marshal.GetLastWin32Error());
|
||||
Utils.SaveLog("Failed to call AssignProcessToJobObject! GetLastError=" + Marshal.GetLastWin32Error());
|
||||
}
|
||||
|
||||
return succ;
|
||||
|
||||
48
v2rayN/v2rayN/Tool/QueryableExtension.cs
Normal file
48
v2rayN/v2rayN/Tool/QueryableExtension.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
|
||||
namespace v2rayN.Tool
|
||||
{
|
||||
public static class QueryableExtension
|
||||
{
|
||||
public static IOrderedQueryable<T> OrderBy<T>(this IQueryable<T> query, string propertyName)
|
||||
{
|
||||
return _OrderBy<T>(query, propertyName, false);
|
||||
}
|
||||
public static IOrderedQueryable<T> OrderByDescending<T>(this IQueryable<T> query, string propertyName)
|
||||
{
|
||||
return _OrderBy<T>(query, propertyName, true);
|
||||
}
|
||||
|
||||
static IOrderedQueryable<T> _OrderBy<T>(IQueryable<T> query, string propertyName, bool isDesc)
|
||||
{
|
||||
string methodname = (isDesc) ? "OrderByDescendingInternal" : "OrderByInternal";
|
||||
|
||||
var memberProp = typeof(T).GetProperty(propertyName);
|
||||
|
||||
var method = typeof(QueryableExtension).GetMethod(methodname)
|
||||
.MakeGenericMethod(typeof(T), memberProp.PropertyType);
|
||||
|
||||
return (IOrderedQueryable<T>)method.Invoke(null, new object[] { query, memberProp });
|
||||
}
|
||||
public static IOrderedQueryable<T> OrderByInternal<T, TProp>(IQueryable<T> query, PropertyInfo memberProperty)
|
||||
{//public
|
||||
return query.OrderBy(_GetLamba<T, TProp>(memberProperty));
|
||||
}
|
||||
public static IOrderedQueryable<T> OrderByDescendingInternal<T, TProp>(IQueryable<T> query, PropertyInfo memberProperty)
|
||||
{//public
|
||||
return query.OrderByDescending(_GetLamba<T, TProp>(memberProperty));
|
||||
}
|
||||
static Expression<Func<T, TProp>> _GetLamba<T, TProp>(PropertyInfo memberProperty)
|
||||
{
|
||||
if (memberProperty.PropertyType != typeof(TProp)) throw new Exception();
|
||||
|
||||
var thisArg = Expression.Parameter(typeof(T));
|
||||
var lamba = Expression.Lambda<Func<T, TProp>>(Expression.Property(thisArg, memberProperty), thisArg);
|
||||
|
||||
return lamba;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Globalization;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace v2rayN
|
||||
{
|
||||
@@ -7,12 +6,20 @@ namespace v2rayN
|
||||
{
|
||||
public static void Show(string msg)
|
||||
{
|
||||
MessageBox.Show(msg);
|
||||
MessageBox.Show(msg, "v2rayN", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
public static void ShowWarning(string msg)
|
||||
{
|
||||
MessageBox.Show(msg, "v2rayN", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
public static void ShowError(string msg)
|
||||
{
|
||||
MessageBox.Show(msg, "v2rayN", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
|
||||
public static DialogResult ShowYesNo(string msg)
|
||||
{
|
||||
return MessageBox.Show(msg, "YesNo", MessageBoxButtons.YesNo);
|
||||
return MessageBox.Show(msg, "v2rayN", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||
}
|
||||
|
||||
//public static string GetResourseString(string key)
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace v2rayN
|
||||
|
||||
static string LoadString(ResourceManager resMgr, string key)
|
||||
{
|
||||
var value = resMgr.GetString(key);
|
||||
string value = resMgr.GetString(key);
|
||||
if (value == null)
|
||||
{
|
||||
throw new KeyNotFoundException($"key: {key}");
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace v2rayN
|
||||
|
||||
try
|
||||
{
|
||||
var assembly = Assembly.GetExecutingAssembly();
|
||||
Assembly assembly = Assembly.GetExecutingAssembly();
|
||||
using (Stream stream = assembly.GetManifestResourceStream(res))
|
||||
using (StreamReader reader = new StreamReader(stream))
|
||||
{
|
||||
@@ -121,10 +121,10 @@ namespace v2rayN
|
||||
/// <returns></returns>
|
||||
public static int ToJsonFile(Object obj, string filePath)
|
||||
{
|
||||
int result = -1;
|
||||
int result;
|
||||
try
|
||||
{
|
||||
using (StreamWriter file = System.IO.File.CreateText(filePath))
|
||||
using (StreamWriter file = File.CreateText(filePath))
|
||||
{
|
||||
//JsonSerializer serializer = new JsonSerializer();
|
||||
JsonSerializer serializer = new JsonSerializer() { Formatting = Formatting.Indented };
|
||||
@@ -155,7 +155,7 @@ namespace v2rayN
|
||||
{
|
||||
if (wrap)
|
||||
{
|
||||
return string.Join(",\r\n", lst.ToArray());
|
||||
return string.Join("," + Environment.NewLine, lst.ToArray());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -176,7 +176,7 @@ namespace v2rayN
|
||||
{
|
||||
try
|
||||
{
|
||||
str = str.Replace("\r\n", "");
|
||||
str = str.Replace(Environment.NewLine, "");
|
||||
return new List<string>(str.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries));
|
||||
}
|
||||
catch
|
||||
@@ -194,7 +194,7 @@ namespace v2rayN
|
||||
{
|
||||
try
|
||||
{
|
||||
var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText);
|
||||
byte[] plainTextBytes = Encoding.UTF8.GetBytes(plainText);
|
||||
return Convert.ToBase64String(plainTextBytes);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -214,8 +214,8 @@ namespace v2rayN
|
||||
try
|
||||
{
|
||||
plainText = plainText.TrimEx()
|
||||
.Replace(Environment.NewLine, "")
|
||||
.Replace("\n", "")
|
||||
.Replace("\r\n", "")
|
||||
.Replace("\r", "")
|
||||
.Replace(" ", "");
|
||||
|
||||
@@ -272,27 +272,27 @@ namespace v2rayN
|
||||
/// <param name="unit">单位</param>
|
||||
public static void ToHumanReadable(ulong amount, out double result, out string unit)
|
||||
{
|
||||
var factor = 1024u;
|
||||
var KBs = amount / factor;
|
||||
uint factor = 1024u;
|
||||
ulong KBs = amount / factor;
|
||||
if (KBs > 0)
|
||||
{
|
||||
// multi KB
|
||||
var MBs = KBs / factor;
|
||||
ulong MBs = KBs / factor;
|
||||
if (MBs > 0)
|
||||
{
|
||||
// multi MB
|
||||
var GBs = MBs / factor;
|
||||
ulong GBs = MBs / factor;
|
||||
if (GBs > 0)
|
||||
{
|
||||
// multi GB
|
||||
var TBs = GBs / factor;
|
||||
/*ulong TBs = GBs / factor;
|
||||
if (TBs > 0)
|
||||
{
|
||||
// 你是魔鬼吗? 用这么多流量
|
||||
result = TBs + GBs % factor / (factor + 0.0);
|
||||
unit = "TB";
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
result = GBs + MBs % factor / (factor + 0.0);
|
||||
unit = "GB";
|
||||
return;
|
||||
@@ -314,23 +314,39 @@ namespace v2rayN
|
||||
|
||||
public static string HumanFy(ulong amount)
|
||||
{
|
||||
double result;
|
||||
string unit;
|
||||
ToHumanReadable(amount, out result, out unit);
|
||||
return $"{string.Format("{0:f1}", result)}{unit}";
|
||||
ToHumanReadable(amount, out double result, out string unit);
|
||||
return $"{string.Format("{0:f1}", result)} {unit}";
|
||||
}
|
||||
|
||||
public static void DedupServerList(List<Mode.VmessItem> source, out List<Mode.VmessItem> result)
|
||||
public static void DedupServerList(List<Mode.VmessItem> source, out List<Mode.VmessItem> result, bool keepOlder)
|
||||
{
|
||||
var list = new List<Mode.VmessItem>();
|
||||
foreach (var item in source)
|
||||
List<Mode.VmessItem> list = new List<Mode.VmessItem>();
|
||||
if (!keepOlder) source.Reverse(); // Remove the early items first
|
||||
|
||||
bool _isAdded(Mode.VmessItem o, Mode.VmessItem n)
|
||||
{
|
||||
if (!list.Exists(i => item.address == i.address && item.port == i.port && item.path == i.path))
|
||||
return o.configVersion == n.configVersion &&
|
||||
o.configType == n.configType &&
|
||||
o.address == n.address &&
|
||||
o.port == n.port &&
|
||||
o.id == n.id &&
|
||||
o.alterId == n.alterId &&
|
||||
o.security == n.security &&
|
||||
o.network == n.network &&
|
||||
o.headerType == n.headerType &&
|
||||
o.requestHost == n.requestHost &&
|
||||
o.path == n.path &&
|
||||
o.streamSecurity == n.streamSecurity;
|
||||
// skip (will remove) different remarks
|
||||
}
|
||||
foreach (Mode.VmessItem item in source)
|
||||
{
|
||||
if (!list.Exists(i => _isAdded(i, item)))
|
||||
{
|
||||
list.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
if (!keepOlder) list.Reverse();
|
||||
result = list;
|
||||
}
|
||||
|
||||
@@ -348,7 +364,7 @@ namespace v2rayN
|
||||
{
|
||||
try
|
||||
{
|
||||
int var1 = Utils.ToInt(oText);
|
||||
int var1 = ToInt(oText);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
@@ -392,7 +408,7 @@ namespace v2rayN
|
||||
//可能是CIDR
|
||||
if (ip.IndexOf(@"/") > 0)
|
||||
{
|
||||
var cidr = ip.Split('/');
|
||||
string[] cidr = ip.Split('/');
|
||||
if (cidr.Length == 2)
|
||||
{
|
||||
if (!IsNumberic(cidr[0]))
|
||||
@@ -469,24 +485,16 @@ namespace v2rayN
|
||||
/// </summary>
|
||||
/// <param name="run"></param>
|
||||
/// <returns></returns>
|
||||
public static int SetAutoRun(bool run)
|
||||
public static void SetAutoRun(bool run)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (run)
|
||||
{
|
||||
string exePath = GetExePath();
|
||||
RegWriteValue(autoRunRegPath, autoRunName, exePath);
|
||||
}
|
||||
else
|
||||
{
|
||||
RegWriteValue(autoRunRegPath, autoRunName, "");
|
||||
}
|
||||
string exePath = GetExePath();
|
||||
RegWriteValue(autoRunRegPath, autoRunName, run ? exePath : "");
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -497,7 +505,7 @@ namespace v2rayN
|
||||
{
|
||||
try
|
||||
{
|
||||
var value = RegReadValue(autoRunRegPath, autoRunName, "");
|
||||
string value = RegReadValue(autoRunRegPath, autoRunName, "");
|
||||
string exePath = GetExePath();
|
||||
if (value?.Equals(exePath) == true)
|
||||
{
|
||||
@@ -517,7 +525,7 @@ namespace v2rayN
|
||||
public static string GetPath(string fileName)
|
||||
{
|
||||
string startupPath = StartupPath();
|
||||
if (Utils.IsNullOrEmpty(fileName))
|
||||
if (IsNullOrEmpty(fileName))
|
||||
{
|
||||
return startupPath;
|
||||
}
|
||||
@@ -535,15 +543,7 @@ namespace v2rayN
|
||||
|
||||
public static string StartupPath()
|
||||
{
|
||||
try
|
||||
{
|
||||
string exePath = GetExePath();
|
||||
return exePath.Substring(0, exePath.LastIndexOf("\\", StringComparison.Ordinal));
|
||||
}
|
||||
catch
|
||||
{
|
||||
return Application.StartupPath;
|
||||
}
|
||||
return Application.StartupPath;
|
||||
}
|
||||
|
||||
public static string RegReadValue(string path, string name, string def)
|
||||
@@ -609,7 +609,7 @@ namespace v2rayN
|
||||
long roundtripTime = -1;
|
||||
try
|
||||
{
|
||||
int timeout = 120;
|
||||
int timeout = 30;
|
||||
int echoNum = 2;
|
||||
Ping pingSender = new Ping();
|
||||
for (int i = 0; i < echoNum; i++)
|
||||
@@ -657,7 +657,14 @@ namespace v2rayN
|
||||
return lstIPAddress;
|
||||
}
|
||||
|
||||
|
||||
public static void SetSecurityProtocol()
|
||||
{
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3
|
||||
| SecurityProtocolType.Tls
|
||||
| SecurityProtocolType.Tls11
|
||||
| SecurityProtocolType.Tls12;
|
||||
ServicePointManager.DefaultConnectionLimit = 256;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 杂项
|
||||
@@ -779,16 +786,13 @@ namespace v2rayN
|
||||
|
||||
#region TempPath
|
||||
|
||||
private static string _tempPath = null;
|
||||
|
||||
// return path to store temporary files
|
||||
public static string GetTempPath()
|
||||
{
|
||||
if (_tempPath == null)
|
||||
string _tempPath = Path.Combine(StartupPath(), "v2ray_win_temp");
|
||||
if (!Directory.Exists(_tempPath))
|
||||
{
|
||||
Directory.CreateDirectory(Path.Combine(StartupPath(), "v2ray_win_temp"));
|
||||
// don't use "/", it will fail when we call explorer /select xxx/ss_win_temp\xxx.log
|
||||
_tempPath = Path.Combine(StartupPath(), "v2ray_win_temp");
|
||||
Directory.CreateDirectory(_tempPath);
|
||||
}
|
||||
return _tempPath;
|
||||
}
|
||||
@@ -796,31 +800,18 @@ namespace v2rayN
|
||||
public static string GetTempPath(string filename)
|
||||
{
|
||||
return Path.Combine(GetTempPath(), filename);
|
||||
}
|
||||
|
||||
public static void ClearTempPath()
|
||||
{
|
||||
//Directory.Delete(GetTempPath(), true);
|
||||
//_tempPath = null;
|
||||
}
|
||||
}
|
||||
|
||||
public static string UnGzip(byte[] buf)
|
||||
{
|
||||
byte[] buffer = new byte[1024];
|
||||
int n;
|
||||
using (MemoryStream sb = new MemoryStream())
|
||||
MemoryStream sb = new MemoryStream();
|
||||
using (GZipStream input = new GZipStream(new MemoryStream(buf),
|
||||
CompressionMode.Decompress,
|
||||
false))
|
||||
{
|
||||
using (GZipStream input = new GZipStream(new MemoryStream(buf),
|
||||
CompressionMode.Decompress,
|
||||
false))
|
||||
{
|
||||
while ((n = input.Read(buffer, 0, buffer.Length)) > 0)
|
||||
{
|
||||
sb.Write(buffer, 0, n);
|
||||
}
|
||||
}
|
||||
return System.Text.Encoding.UTF8.GetString(sb.ToArray());
|
||||
input.CopyTo(sb);
|
||||
}
|
||||
return Encoding.UTF8.GetString(sb.ToArray());
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -854,7 +845,7 @@ namespace v2rayN
|
||||
|
||||
SwWrite.WriteLine(string.Format("{0}{1}[{2}]{3}", "--------------------------------", strTitle, DateTime.Now.ToString("HH:mm:ss"), "--------------------------------"));
|
||||
SwWrite.Write(strContent);
|
||||
SwWrite.WriteLine("\r\n");
|
||||
SwWrite.WriteLine(Environment.NewLine);
|
||||
SwWrite.WriteLine(" ");
|
||||
SwWrite.Flush();
|
||||
SwWrite.Close();
|
||||
@@ -869,7 +860,6 @@ namespace v2rayN
|
||||
|
||||
public static string ScanScreen()
|
||||
{
|
||||
string ret = string.Empty;
|
||||
try
|
||||
{
|
||||
foreach (Screen screen in Screen.AllScreens)
|
||||
@@ -901,13 +891,13 @@ namespace v2rayN
|
||||
GraphicsUnit.Pixel);
|
||||
}
|
||||
|
||||
var source = new BitmapLuminanceSource(target);
|
||||
var bitmap = new BinaryBitmap(new HybridBinarizer(source));
|
||||
BitmapLuminanceSource source = new BitmapLuminanceSource(target);
|
||||
BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
|
||||
QRCodeReader reader = new QRCodeReader();
|
||||
var result = reader.decode(bitmap);
|
||||
Result result = reader.decode(bitmap);
|
||||
if (result != null)
|
||||
{
|
||||
ret = result.Text;
|
||||
string ret = result.Text;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Grpc.Tools" version="2.24.0" targetFramework="net46" developmentDependency="true" />
|
||||
</packages>
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\Grpc.Tools.2.24.0\build\Grpc.Tools.props" Condition="Exists('..\packages\Grpc.Tools.2.24.0\build\Grpc.Tools.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -45,7 +44,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
@@ -74,33 +73,14 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<PropertyGroup>
|
||||
<StartupObject>v2rayN.Program</StartupObject>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Google.Protobuf, Version=3.9.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>LIB\Google.Protobuf.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Grpc.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>LIB\Grpc.Core.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Grpc.Core.Api, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>LIB\Grpc.Core.Api.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>LIB\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>LIB\System.Buffers.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
@@ -109,30 +89,13 @@
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.IO.Compression.FileSystem" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>LIB\System.Memory.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Messaging" />
|
||||
<Reference Include="System.Net" />
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>LIB\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Net.Http.WebRequest" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="zxing, Version=0.16.2.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>LIB\zxing.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="zxing.presentation, Version=0.16.2.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>LIB\zxing.presentation.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Forms\AddServer4Form.cs">
|
||||
@@ -187,15 +150,15 @@
|
||||
<Compile Include="Base\HttpWebServer.cs" />
|
||||
<Compile Include="Base\HttpWebServerB.cs" />
|
||||
<Compile Include="HttpProxyHandler\PrivoxyHandler.cs" />
|
||||
<Compile Include="HttpProxyHandler\PACListHandle.cs" />
|
||||
<Compile Include="HttpProxyHandler\PACServerHandle.cs" />
|
||||
<Compile Include="HttpProxyHandler\ProxySetting.cs" />
|
||||
<Compile Include="HttpProxyHandler\SysProxyHandle.cs" />
|
||||
<Compile Include="HttpProxyHandler\HttpProxyHandle.cs" />
|
||||
<Compile Include="Base\WebClientEx.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HttpProxyHandler\SysProxyHandle.cs" />
|
||||
<Compile Include="Mode\EMove.cs" />
|
||||
<Compile Include="Mode\EServerColName.cs" />
|
||||
<Compile Include="Mode\ServerStatistics.cs" />
|
||||
<Compile Include="Mode\SysproxyConfig.cs" />
|
||||
<Compile Include="Mode\EConfigType.cs" />
|
||||
@@ -231,7 +194,6 @@
|
||||
</Compile>
|
||||
<Compile Include="Global.cs" />
|
||||
<Compile Include="Handler\QRCodeHelper.cs" />
|
||||
<Compile Include="Handler\RoutingRuleHandler.cs" />
|
||||
<Compile Include="Mode\VmessQRCode.cs" />
|
||||
<Compile Include="Mode\V2rayTcpRequest.cs" />
|
||||
<Compile Include="Handler\ConfigHandler.cs" />
|
||||
@@ -248,6 +210,7 @@
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Tool\FileManager.cs" />
|
||||
<Compile Include="Tool\Job.cs" />
|
||||
<Compile Include="Tool\QueryableExtension.cs" />
|
||||
<Compile Include="Tool\UIRes.cs" />
|
||||
<Compile Include="Tool\UI.cs" />
|
||||
<Compile Include="Tool\Utils.cs" />
|
||||
@@ -289,6 +252,7 @@
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\SubSettingControl.resx">
|
||||
<DependentUpon>SubSettingControl.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\SubSettingControl.zh-Hans.resx">
|
||||
<DependentUpon>SubSettingControl.cs</DependentUpon>
|
||||
@@ -331,7 +295,6 @@
|
||||
<EmbeddedResource Include="app.config">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
@@ -344,13 +307,11 @@
|
||||
<EmbeddedResource Include="Sample\custom_routing_block" />
|
||||
<EmbeddedResource Include="Sample\custom_routing_direct" />
|
||||
<EmbeddedResource Include="Sample\custom_routing_proxy" />
|
||||
<Protobuf Include="Protos\Statistics.proto" />
|
||||
<None Include="Resources\abp.js.gz" />
|
||||
<None Include="Resources\grpc_csharp_ext.x64.dll.gz" />
|
||||
<None Include="Resources\grpc_csharp_ext.x86.dll.gz" />
|
||||
<None Include="Resources\pac.txt.gz" />
|
||||
<None Include="Resources\sysproxy.exe.gz" />
|
||||
<None Include="Resources\sysproxy64.exe.gz" />
|
||||
<Protobuf Include="Protos\Statistics.proto" />
|
||||
<None Include="Resources\abp.js.gz" />
|
||||
<None Include="Resources\pac.txt.gz" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resx\ResUI.zh-Hans.resx">
|
||||
@@ -411,39 +372,43 @@
|
||||
<None Include="Resources\minimize.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\share.png" />
|
||||
<None Include="Resources\promotion.png" />
|
||||
<EmbeddedResource Include="Sample\BlankPac.txt" />
|
||||
<None Include="Resources\sub.png" />
|
||||
<None Include="Resources\checkupdate.png" />
|
||||
<None Include="Resources\about.png" />
|
||||
<EmbeddedResource Include="LIB\Google.Protobuf.dll" />
|
||||
<EmbeddedResource Include="LIB\Grpc.Core.Api.dll" />
|
||||
<EmbeddedResource Include="LIB\Grpc.Core.dll" />
|
||||
<EmbeddedResource Include="LIB\Newtonsoft.Json.dll" />
|
||||
<EmbeddedResource Include="LIB\System.Buffers.dll" />
|
||||
<EmbeddedResource Include="LIB\System.Memory.dll" />
|
||||
<EmbeddedResource Include="LIB\System.Runtime.CompilerServices.Unsafe.dll" />
|
||||
<EmbeddedResource Include="LIB\zxing.dll" />
|
||||
<EmbeddedResource Include="LIB\zxing.presentation.dll" />
|
||||
<EmbeddedResource Include="LIB\netstandard.dll" />
|
||||
<Content Include="Resources\help.png" />
|
||||
<None Include="Resources\notify.png" />
|
||||
<Content Include="Resources\privoxy_conf.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Google.Protobuf">
|
||||
<Version>3.11.4</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Grpc.Core">
|
||||
<Version>2.27.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Grpc.Tools">
|
||||
<Version>2.27.0</Version>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Newtonsoft.Json">
|
||||
<Version>12.0.3</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="ZXing.Net">
|
||||
<Version>0.16.5</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
<PostBuildEvent>copy /y $(SolutionDir)v2rayUpgrade\$(OutDir)* $(TargetDir)
|
||||
|
||||
del $(TargetDir)*.xml $(TargetDir)*.so $(TargetDir)*.dylib
|
||||
if not "$(ConfigurationName)" == "Debug" del $(TargetDir)*.pdb</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\packages\Grpc.Core.2.23.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.2.23.0\build\net45\Grpc.Core.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\Grpc.Tools.2.24.0\build\Grpc.Tools.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Tools.2.24.0\build\Grpc.Tools.props'))" />
|
||||
<Error Condition="!Exists('..\packages\Grpc.Tools.2.24.0\build\Grpc.Tools.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Tools.2.24.0\build\Grpc.Tools.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\Grpc.Tools.2.24.0\build\Grpc.Tools.targets" Condition="Exists('..\packages\Grpc.Tools.2.24.0\build\Grpc.Tools.targets')" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
||||
6
v2rayN/v2rayUpgrade/App.config
Normal file
6
v2rayN/v2rayUpgrade/App.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
105
v2rayN/v2rayUpgrade/MainForm.Designer.cs
generated
Normal file
105
v2rayN/v2rayUpgrade/MainForm.Designer.cs
generated
Normal file
@@ -0,0 +1,105 @@
|
||||
namespace v2rayUpgrade
|
||||
{
|
||||
partial class MainForm
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows 窗体设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.btnClose = new System.Windows.Forms.Button();
|
||||
this.btnOK = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnClose.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.btnClose.Location = new System.Drawing.Point(367, 118);
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.Size = new System.Drawing.Size(184, 89);
|
||||
this.btnClose.TabIndex = 1;
|
||||
this.btnClose.Text = "&Exit(退出)";
|
||||
this.btnClose.UseVisualStyleBackColor = true;
|
||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||
//
|
||||
// btnOK
|
||||
//
|
||||
this.btnOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.btnOK.Location = new System.Drawing.Point(81, 118);
|
||||
this.btnOK.Name = "btnOK";
|
||||
this.btnOK.Size = new System.Drawing.Size(184, 89);
|
||||
this.btnOK.TabIndex = 0;
|
||||
this.btnOK.Text = "&Upgrade(升级)";
|
||||
this.btnOK.UseVisualStyleBackColor = true;
|
||||
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("宋体", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label1.Location = new System.Drawing.Point(79, 64);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(205, 15);
|
||||
this.label1.TabIndex = 8;
|
||||
this.label1.Text = "升级成功后将自动重启v2rayN";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Font = new System.Drawing.Font("宋体", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label2.Location = new System.Drawing.Point(79, 37);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(471, 15);
|
||||
this.label2.TabIndex = 9;
|
||||
this.label2.Text = "v2rayN will restart automatically after successful upgrade";
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(616, 284);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.btnClose);
|
||||
this.Controls.Add(this.btnOK);
|
||||
this.Name = "MainForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "v2rayUpgrade";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button btnClose;
|
||||
private System.Windows.Forms.Button btnOK;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
}
|
||||
}
|
||||
|
||||
146
v2rayN/v2rayUpgrade/MainForm.cs
Normal file
146
v2rayN/v2rayUpgrade/MainForm.cs
Normal file
@@ -0,0 +1,146 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace v2rayUpgrade
|
||||
{
|
||||
public partial class MainForm : Form
|
||||
{
|
||||
private readonly string defaultFilename = "v2ray-windows.zip";
|
||||
private string fileName;
|
||||
|
||||
public MainForm(string[] args)
|
||||
{
|
||||
InitializeComponent();
|
||||
if (args.Length > 0)
|
||||
{
|
||||
fileName = args[0];
|
||||
}
|
||||
}
|
||||
private void showWarn(string message)
|
||||
{
|
||||
MessageBox.Show(message, "", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
|
||||
private void btnOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Process[] existing = Process.GetProcessesByName("v2rayN");
|
||||
foreach (Process p in existing)
|
||||
{
|
||||
string path = p.MainModule.FileName;
|
||||
if (path == GetPath("v2rayN.exe"))
|
||||
{
|
||||
p.Kill();
|
||||
p.WaitForExit(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Access may be denied without admin right. The user may not be an administrator.
|
||||
showWarn("Failed to close v2rayN(关闭v2rayN失败).\n" +
|
||||
"Close it manually, or the upgrade may fail.(请手动关闭正在运行的v2rayN,否则可能升级失败。\n\n" + ex.StackTrace);
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
try
|
||||
{
|
||||
if (!File.Exists(fileName))
|
||||
{
|
||||
if (File.Exists(defaultFilename))
|
||||
{
|
||||
fileName = defaultFilename;
|
||||
}
|
||||
else
|
||||
{
|
||||
showWarn("Upgrade Failed, File Not Exist(升级失败,文件不存在).");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
string thisAppOldFile = Application.ExecutablePath + ".tmp";
|
||||
File.Delete(thisAppOldFile);
|
||||
string startKey = "v2rayN/";
|
||||
|
||||
|
||||
using (ZipArchive archive = ZipFile.OpenRead(fileName))
|
||||
{
|
||||
foreach (ZipArchiveEntry entry in archive.Entries)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (entry.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
string fullName = entry.FullName;
|
||||
if (fullName.StartsWith(startKey))
|
||||
{
|
||||
fullName = fullName.Substring(startKey.Length, fullName.Length - startKey.Length);
|
||||
}
|
||||
if (Application.ExecutablePath.ToLower() == GetPath(fullName).ToLower())
|
||||
{
|
||||
File.Move(Application.ExecutablePath, thisAppOldFile);
|
||||
}
|
||||
|
||||
string entryOuputPath = GetPath(fullName);
|
||||
|
||||
FileInfo fileInfo = new FileInfo(entryOuputPath);
|
||||
fileInfo.Directory.Create();
|
||||
entry.ExtractToFile(entryOuputPath, true);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
sb.Append(ex.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
showWarn("Upgrade Failed(升级失败)." + ex.StackTrace);
|
||||
return;
|
||||
}
|
||||
if (sb.Length > 0)
|
||||
{
|
||||
showWarn("Upgrade Failed,Hold ctrl + c to copy to clipboard.\n" +
|
||||
"(升级失败,按住ctrl+c可以复制到剪贴板)." + sb.ToString());
|
||||
return;
|
||||
}
|
||||
|
||||
Process.Start("v2rayN.exe");
|
||||
MessageBox.Show("Upgrade successed(升级成功)", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
|
||||
Close();
|
||||
}
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
public static string GetExePath()
|
||||
{
|
||||
return Application.ExecutablePath;
|
||||
}
|
||||
|
||||
public static string StartupPath()
|
||||
{
|
||||
return Application.StartupPath;
|
||||
}
|
||||
public static string GetPath(string fileName)
|
||||
{
|
||||
string startupPath = StartupPath();
|
||||
if (string.IsNullOrEmpty(fileName))
|
||||
{
|
||||
return startupPath;
|
||||
}
|
||||
return Path.Combine(startupPath, fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
120
v2rayN/v2rayUpgrade/MainForm.resx
Normal file
120
v2rayN/v2rayUpgrade/MainForm.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
19
v2rayN/v2rayUpgrade/Program.cs
Normal file
19
v2rayN/v2rayUpgrade/Program.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace v2rayUpgrade
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// 应用程序的主入口点。
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new MainForm(args));
|
||||
}
|
||||
}
|
||||
}
|
||||
34
v2rayN/v2rayUpgrade/Properties/AssemblyInfo.cs
Normal file
34
v2rayN/v2rayUpgrade/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("v2rayUpgrade")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("v2rayUpgrade")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019-2020 (GPLv3)")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("f82be52a-155c-492c-9e0a-1e917ec62c78")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||
// 方法是按如下所示使用“*”: :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyFileVersion("1.1.0.0")]
|
||||
63
v2rayN/v2rayUpgrade/Properties/Resources.Designer.cs
generated
Normal file
63
v2rayN/v2rayUpgrade/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace v2rayUpgrade.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("v2rayUpgrade.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重写当前线程的 CurrentUICulture 属性
|
||||
/// 重写当前线程的 CurrentUICulture 属性。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
117
v2rayN/v2rayUpgrade/Properties/Resources.resx
Normal file
117
v2rayN/v2rayUpgrade/Properties/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user