Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing parameter servername in interface Deno.ConnectTlsOptions, which may be used for dns over tls. #14530

Closed
masx200 opened this issue May 8, 2022 · 2 comments
Labels

Comments

@masx200
Copy link

masx200 commented May 8, 2022

Missing parameter servername in interface Deno.ConnectTlsOptions, which may be used for dns over tls.

interface ConnectTlsOptions {
caCerts?: string[];
certFile?: string;
hostname?: string;
port: number;
}
interface ConnectTlsOptions {
alpnProtocols?: string[];
certChain?: string;
privateKey?: string;
}
interface ConnectTlsOptions {

servername?: string;

}
Deno.connectTls({ hostname: "223.5.5.5", port: 853, servername:"dns.alidns.com"});
@stale
Copy link

stale bot commented Jul 8, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 8, 2022
@stale stale bot closed this as completed Jul 21, 2022
@danopia
Copy link
Contributor

danopia commented Feb 9, 2023

This is in fact missing and similar to my issue

A workaround is replacing Deno.connectTls with a combination of Deno.startTls and Deno.connect:

const tcp = await Deno.connect({ hostname: '223.5.5.5', port: 853 }); // the host we want to connect to
const tls = await Deno.startTls(tcp, { hostname: 'dns.alidns.com' }); // the host we want to handshake with

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants