@UnstableApi
    public Endpoint withHost(String host) {
        requireNonNull(host, "host");
        if (host.equals(this.host)) {
            return this;
        }

        final String normalizedIpAddr = IpAddrUtil.normalize(host);
        if (normalizedIpAddr != null) {
            return new Endpoint(Type.IP_ONLY, normalizedIpAddr, normalizedIpAddr, port,
                                weight, attributes);
        } else if (isDomainSocketAuthority(host)) {
            return new Endpoint(Type.DOMAIN_SOCKET, host, DOMAIN_SOCKET_IP, DOMAIN_SOCKET_PORT,
                                weight, attributes);
        } else {
            host = normalizeHost(host);
            return new Endpoint(ipAddr != null ? Type.HOSTNAME_AND_IP : Type.HOSTNAME_ONLY,
                                host, ipAddr, port, weight, attributes);
        }
    }
Returns a new endpoint with the specified host.
core/src/main/java/com/linecorp/armeria/client/Endpoint.java