user_agent.php
protected function createRoute($url)
    {
        if ($this->proxy) {
            return new SimpleProxyRoute(
                    $url,
                    $this->proxy,
                    $this->proxy_username,
                    $this->proxy_password);
        }

        return new SimpleRoute($url);
    }
protected function createRoute($url)
    {
        if ($this->proxy) {
            return new SimpleProxyRoute(
                    $url,
                    $this->proxy,
                    $this->proxy_username,
                    $this->proxy_password);
        }

        return new SimpleRoute($url);
    }
Sets up either a direct route or via a proxy.

@param SimpleUrl $url   Target to fetch as url object.

@return SimpleRoute     Route to take to fetch URL.