Skip to content

Commit 8a5ee63

Browse files
committed
v1.1.2
1 parent 861434f commit 8a5ee63

File tree

7 files changed

+30
-16
lines changed

7 files changed

+30
-16
lines changed

PortProxyGUI - NET35/About.zh-CN.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@
211211
<value>2</value>
212212
</data>
213213
<data name="label_Star.Text" xml:space="preserve">
214-
<value>为我点星:</value>
214+
<value>点星鼓励:</value>
215215
</data>
216216
<data name="label_Star.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
217217
<value>MiddleCenter</value>

PortProxyGUI - NET35/PortProxyGUI.zh-CN.resx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,15 @@
112112
<value>2.0</value>
113113
</resheader>
114114
<resheader name="reader">
115-
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
115+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116116
</resheader>
117117
<resheader name="writer">
118-
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
118+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120120
<data name="columnHeader1.Text" xml:space="preserve">
121121
<value />
122122
</data>
123-
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
123+
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
124124
<data name="columnHeader1.Width" type="System.Int32, mscorlib">
125125
<value>24</value>
126126
</data>
@@ -154,7 +154,7 @@
154154
<data name="columnHeader6.Width" type="System.Int32, mscorlib">
155155
<value>100</value>
156156
</data>
157-
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
157+
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
158158
<data name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing">
159159
<value>17, 17</value>
160160
</data>
@@ -167,7 +167,7 @@
167167
<data name="&gt;&gt;contextMenuStrip1.Type" xml:space="preserve">
168168
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
169169
</data>
170-
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
170+
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
171171
<data name="listViewProxies.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
172172
<value>Fill</value>
173173
</data>
@@ -185,10 +185,10 @@
185185
</data>
186186
<data name="imageListProxies.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
187187
<value>
188-
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
188+
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
189189
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
190190
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADc
191-
CAAAAk1TRnQBSQFMAgEBAgEAAUABAAFEAQABEAEAARABAAT/AQkBEAj/AUIBTQE2AQQGAAE2AQQCAAEo
191+
CAAAAk1TRnQBSQFMAgEBAgEAAUABAAFIAQABEAEAARABAAT/AQkBEAj/AUIBTQE2AQQGAAE2AQQCAAEo
192192
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
193193
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
194194
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

PortProxyGUI - NET35/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
// You can specify all the values or you can default the Build and Revision Numbers
3232
// by using the '*' as shown below:
3333
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("1.1.1.0")]
35-
[assembly: AssemblyFileVersion("1.1.1.0")]
34+
[assembly: AssemblyVersion("1.1.2.0")]
35+
[assembly: AssemblyFileVersion("1.1.2.0")]

PortProxyGUI - NET45/About.zh-CN.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@
211211
<value>2</value>
212212
</data>
213213
<data name="label_Star.Text" xml:space="preserve">
214-
<value>为我点星:</value>
214+
<value>点星鼓励:</value>
215215
</data>
216216
<data name="label_Star.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
217217
<value>MiddleCenter</value>

PortProxyGUI - NET45/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
// You can specify all the values or you can default the Build and Revision Numbers
3232
// by using the '*' as shown below:
3333
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("1.1.1.0")]
35-
[assembly: AssemblyFileVersion("1.1.1.0")]
34+
[assembly: AssemblyVersion("1.1.2.0")]
35+
[assembly: AssemblyFileVersion("1.1.2.0")]

PortProxyGUI.Shared/CmdUtil.cs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,27 @@
11
using NStandard;
22
using PortProxyGUI.Data;
33
using System;
4+
using System.Collections.Generic;
45
using System.Linq;
56
using System.Text.RegularExpressions;
67

78
namespace PortProxyGUI
89
{
910
public static class CmdUtil
1011
{
12+
private static Regex GetRegex(string fromType, string toType)
13+
{
14+
return new Regex($@"{fromType}[^:]*:[^\n]+?{toType}[^:]*:\r\n\r\n.+?\r\n--------------- ---------- --------------- ----------\r\n(.+?)\r\n\r\n", RegexOptions.Singleline);
15+
}
16+
17+
private static readonly Dictionary<string, Regex> RegexList = new Dictionary<string, Regex>()
18+
{
19+
["ipv4 to ipv4"] = GetRegex("ipv4", "ipv4"),
20+
["ipv4 to ipv6"] = GetRegex("ipv4", "ipv6"),
21+
["ipv6 to ipv4"] = GetRegex("ipv6", "ipv4"),
22+
["ipv6 to ipv6"] = GetRegex("ipv6", "ipv6"),
23+
};
24+
1125
public static Rule[] GetProxies()
1226
{
1327
var output = CmdRunner.Execute("netsh interface portproxy show all");
@@ -21,8 +35,8 @@ public static Rule[] GetProxies()
2135

2236
var proxies = types.SelectMany(type =>
2337
{
24-
var typeProxies = output
25-
.ExtractFirst(new Regex($@"{type.From}:[^\n]+?{type.To}:\r\n\r\n.+?\r\n--------------- ---------- --------------- ----------\r\n(.+?)\r\n\r\n", RegexOptions.Singleline))
38+
var regex = RegexList[$"{type.From} to {type.To}"];
39+
var typeProxies = output.ExtractFirst(regex)
2640
?.Split(new[] { Environment.NewLine }, StringSplitOptions.None)
2741
.Select(line =>
2842
{

PortProxyGUI/PortProxyGUI.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<PackageTags>portproxy TCP/IP redirector</PackageTags>
1515
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
1616
<Copyright>Copyright © nstandard.net 2020</Copyright>
17-
<Version>1.1.1</Version>
17+
<Version>1.1.2</Version>
1818
<ApplicationIcon>icon.ico</ApplicationIcon>
1919
</PropertyGroup>
2020

0 commit comments

Comments
 (0)