SocksURL constructor
SocksURL({
- required String url,
Implementation
SocksURL({required super.url}) {
if (!url.startsWith('socks://')) {
throw ArgumentError('url is invalid');
}
final temp = Uri.tryParse(url);
if (temp == null) {
throw ArgumentError('url is invalid');
}
uri = temp;
_address = uri.host;
_port = uri.hasPort ? uri.port : null;
if (uri.userInfo.isNotEmpty) {
_parseUserPassword(_decodeUserInfo(uri.userInfo));
} else {
_parseLegacyFullBase64();
}
}