static ClickHouseNode probe(String host, int port, int timeout) {
        ClickHouseDnsResolver resolver = ClickHouseDnsResolver.getInstance();
        InetSocketAddress address = resolver != null
                ? resolver.resolve(ClickHouseProtocol.ANY, host, port)
                : new InetSocketAddress(host, port);

        ClickHouseProtocol p = ClickHouseProtocol.HTTP;
        // TODO needs a better way so that we can detect PostgreSQL port as well
        try (Socket client = new Socket()) {
            client.setKeepAlive(false);
            client.connect(address, timeout);
            client.setSoTimeout(timeout);
            try (OutputStream out = client.getOutputStream(); InputStream in = client.getInputStream()) {
                out.write("GET /ping HTTP/1.1\r\n\r\n".getBytes(StandardCharsets.US_ASCII));
                out.flush();
                byte[] buf = new byte[12]; // HTTP/1.x xxx
                int read = in.read(buf);
                if (read == buf.length && buf[0] == 0) {
                    p = ClickHouseProtocol.GRPC;
                } else if (buf[0] != 0 && buf[3] == 0) {
                    p = ClickHouseProtocol.MYSQL;
                } else if (buf[0] == 72 && buf[9] == 52) {
                    p = ClickHouseProtocol.TCP;
                }
            }
        } catch (IOException e) {
            // PostgreSQL will end up with SocketTimeoutException
            log.debug("Failed to probe %s:%d", host, port, e);
        }

        return new ClickHouseNode(host, p, port, null, null, null);
    }
Creates a new node.

@return new node
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java