protected int firstStep(final RouteInfo plan) {

        return (plan.getHopCount() > 1) ?
            CONNECT_PROXY : CONNECT_TARGET;
    }
Determines the first step to establish a route.

@param plan      the planned route

@return  the first step
httpclient5/src/main/java/org/apache/hc/client5/http/impl/routing/BasicRouteDirector.java