You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In someplace, the dns server is not work well, so we need use doh (DNS OVER HTTP)to resolve first.
but when I repace the hsot to ip and call like that, server recieved error host
Uri wsUri = Uri.parse(webSocketUrl);
if (useDOH) {
final domain = wsUri.host;
if (domain.isNotEmpty && !CliNetUtils.isIpV4Address(domain) && !CliNetUtils.isIPv6(domain)) {
final ip = await CliNetDns().adjustIp(domain);
if (ip?.isNotEmpty ?? false) {
webSocketUrl = '${wsUri.scheme}://$ip:${wsUri.port}${wsUri.path}';
headers = {'Host': domain};
}
}
}
HttpClient client = HttpClient();
client.badCertificateCallback = (X509Certificate cr, String host, int port) {
return true;
};
WebSocket channel = await WebSocket.connect(webSocketUrl, customClient: client, headers: headers);
the headers params not gived to tls,so when tls check it return
In someplace, the dns server is not work well, so we need use doh (DNS OVER HTTP)to resolve first.
but when I repace the hsot to ip and call like that, server recieved error host
the headers params not gived to tls,so when tls check it return
The text was updated successfully, but these errors were encountered: