public HttpRoute toRoute() {
        if (!this.connected) {
            return null;
        } else if (this.unixDomainSocket != null) {
            return new HttpRoute(this.targetHost, this.unixDomainSocket);
        } else {
            return new HttpRoute(this.targetHost, this.localAddress,
                this.proxyChain, this.secure,
                this.tunnelled, this.layered);
        }
    }
Obtains the tracked route.
If a route has been tracked, it is {@link #isConnected connected}.
If not connected, nothing has been tracked so far.

@return  the tracked route, or
         {@code null} if nothing has been tracked so far
httpclient5/src/main/java/org/apache/hc/client5/http/RouteTracker.java