|
@@ -45,9 +45,7 @@ namespace Shadowsocks.Model |
|
|
string serverStr;
|
|
|
string serverStr;
|
|
|
// CheckHostName() won't do a real DNS lookup
|
|
|
// CheckHostName() won't do a real DNS lookup
|
|
|
var hostType = Uri.CheckHostName( server );
|
|
|
var hostType = Uri.CheckHostName( server );
|
|
|
if ( hostType == UriHostNameType.Unknown ) {
|
|
|
|
|
|
throw new FormatException("Invalid Server Address.");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
switch ( hostType ) {
|
|
|
switch ( hostType ) {
|
|
|
case UriHostNameType.IPv6:
|
|
|
case UriHostNameType.IPv6:
|
|
|
serverStr = $"[{server}]:{server_port}";
|
|
|
serverStr = $"[{server}]:{server_port}";
|
|
|