mirror of
https://github.com/netchx/netch.git
synced 2026-05-11 23:45:06 +08:00
refactor: change port type to ushort
This commit is contained in:
@@ -140,7 +140,7 @@ namespace Netch.Servers.Shadowsocks
|
||||
if (!match.Success) throw new FormatException();
|
||||
|
||||
data.Hostname = match.Groups["server"].Value;
|
||||
data.Port = int.Parse(match.Groups["port"].Value);
|
||||
data.Port = ushort.Parse(match.Groups["port"].Value);
|
||||
|
||||
var base64 = ShareLink.URLSafeBase64Decode(match.Groups["base64"].Value);
|
||||
match = parser.Match(base64);
|
||||
@@ -156,7 +156,7 @@ namespace Netch.Servers.Shadowsocks
|
||||
if (!match.Success) throw new FormatException();
|
||||
|
||||
data.Hostname = match.Groups["server"].Value;
|
||||
data.Port = int.Parse(match.Groups["port"].Value);
|
||||
data.Port = ushort.Parse(match.Groups["port"].Value);
|
||||
data.EncryptMethod = match.Groups["method"].Value;
|
||||
data.Password = match.Groups["password"].Value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user