How to use the getdns.TRANSPORT_TLS_ONLY_KEEP_CONNECTIONS_OPEN function in getdns

To help you get started, we’ve selected a few getdns examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github getdnsapi / getdns-node / samples / getdns-resolver-check-tls / app.js View on Github external
const up1 = [];
    up1.push(upstreamresolvers);

    // Create the contexts we need to test with the above options.
    const context = getdns.createContext(options);
    context.upstream_recursive_servers = up1;
    context.timeout = 10000;
    context.tls_authentication = getdns.AUTHENTICATION_HOSTNAME;
    //g context.upstream_recursive_servers = resolver;
    context.dns_transport = getdns.TRANSPORT_TLS_ONLY_KEEP_CONNECTIONS_OPEN;

    const context1 = getdns.createContext(options);
    context1.upstream_recursive_servers = up1;
    context1.timeout = 10000;
    context1.tls_authentication = getdns.AUTHENTICATION_NONE;
    context1.dns_transport = getdns.TRANSPORT_TLS_ONLY_KEEP_CONNECTIONS_OPEN;

    const porttcp = 53;
    const upstreamresolvertcp = [];
    upstreamresolvertcp.push(resolver);
    upstreamresolvertcp.push(porttcp);
    const up2 = [];
    up2.push(upstreamresolvertcp);
    const context2 = getdns.createContext(options);
    context2.upstream_recursive_servers = up2;
    context2.timeout = 10000;
    context2.tls_authentication = getdns.AUTHENTICATION_NONE;
    context2.dns_transport = getdns.TRANSPORT_TLS_FIRST_AND_FALL_BACK_TO_TCP_KEEP_CONNECTIONS_OPEN;

    res1 += "<h1>Check TLS at Recursive</h1>";

    res1 += "<p>This webpage is created with <a href="\&quot;https://github.com/getdnsapi/getdns-node\&quot;">node.js bindings of getdns</a>, in the expressjs framework.</p>";
github getdnsapi / getdns-node / samples / getdns-resolver-check-tls / app.js View on Github external
const porttls = 853;
    const upstreamresolvers = [];
    upstreamresolvers.push(req.query.resolver);
    upstreamresolvers.push(porttls);
    upstreamresolvers.push(req.query.hostname);
    const up1 = [];
    up1.push(upstreamresolvers);

    // Create the contexts we need to test with the above options.
    const context = getdns.createContext(options);
    context.upstream_recursive_servers = up1;
    context.timeout = 10000;
    context.tls_authentication = getdns.AUTHENTICATION_HOSTNAME;
    //g context.upstream_recursive_servers = resolver;
    context.dns_transport = getdns.TRANSPORT_TLS_ONLY_KEEP_CONNECTIONS_OPEN;

    const context1 = getdns.createContext(options);
    context1.upstream_recursive_servers = up1;
    context1.timeout = 10000;
    context1.tls_authentication = getdns.AUTHENTICATION_NONE;
    context1.dns_transport = getdns.TRANSPORT_TLS_ONLY_KEEP_CONNECTIONS_OPEN;

    const porttcp = 53;
    const upstreamresolvertcp = [];
    upstreamresolvertcp.push(resolver);
    upstreamresolvertcp.push(porttcp);
    const up2 = [];
    up2.push(upstreamresolvertcp);
    const context2 = getdns.createContext(options);
    context2.upstream_recursive_servers = up2;
    context2.timeout = 10000;

getdns

getdns bindings for Node.js. getdns is a modern asynchronous DNS API. It implements DNS entry points from a design developed and vetted by application developers, in an API specification.

BSD-3-Clause
Latest version published 3 years ago

Package Health Score

49 / 100
Full package analysis