getProxy.
Retorna os dados de configuração do Proxy em um array.
@return array
961578
public function getProxy()
    {
        $aProxy['ip'] = $this->proxyIP;
        $aProxy['port'] = $this->proxyPORT;
        $aProxy['username'] = $this->proxyUSER;
        $aProxy['password'] = $this->proxyPASS;

        return $aProxy;
    }
1088734
private function getProxy()
    {
        if (isset($this->proxy) && isset($this->proxyPort)) {
            return $this->proxy.":".$this->proxyPort;
        }
        return null;
    }
1361789
public function cloneProxy(): ProxyInterface
    {
        //Clone states stack
        if (!empty($this->states)) {
            $clonedStatesArray = [];
            foreach ($this->states as $key => $state) {
                //Clone each stated class instance
                $clonedState = clone $state;
                //Update new stack
                $clonedStatesArray[$key] = $clonedState;
            }
            $this->states = $clonedStatesArray;
        }

        //Enabling states
        if (!empty($this->activesStates)) {
            $activesStates = \array_keys($this->activesStates);
            $this->activesStates = [];
            foreach ($activesStates as $stateName) {
                $this->enableState($stateName);
            }
        }

        return $this;
    }
829876
private Proxy getMavenProxy() {
        if (mavenSettings != null) {
            final List<Proxy> proxies = mavenSettings.getProxies();
            if (proxies != null && !proxies.isEmpty()) {
                if (mavenSettingsProxyId != null) {
                    for (Proxy proxy : proxies) {
                        if (mavenSettingsProxyId.equalsIgnoreCase(proxy.getId())) {
                            return proxy;
                        }
                    }
                } else {
                    for (Proxy aProxy : proxies) {
                        if (aProxy.isActive()) {
                            return aProxy;
                        }
                    }
                }
            }
        }
        return null;
    }
1360477
public function getProxyParts()
    {
        if (empty($this->proxyUrl)) {
            return ['', '', '', ''];
        }

        preg_match(self::PROXY_REGEX_PATTERN, $this->proxyUrl, $matches);

        $proxyParts = [];
        $proxyParts[] = $matches['user'];
        $proxyParts[] = $matches['pass'];
        // SOAP client assumes that the protocol is attached to the host.
        $proxyParts[] = $matches['protocol'] . $matches['host'];
        $proxyParts[] = (array_key_exists('port', $matches)) ? $matches['port'] : '';

        return $proxyParts;
    }
1102329
protected function proxy() {
        if (!$this->context) {
            $this->context = new StyleSheetContext($this->version, $this->solution['assistantSid']);
        }

        return $this->context;
    }
363843
protected function createProxy()
    {
        $config = $this->config;

        $interface = Arr::pull($config, 'interface');

        $client = $this->clientFactory->client(Arr::pull($config, 'client'));

        $invoker = new RemoteInvoker($this->context, $client, $interface, $config);

        $invoker = $this->withMiddleware($invoker, $interface, $config);

        return $this->proxyFactory->proxy($invoker);
    }
845633
public function getWebDriverProxyConfig()
    {
        $this->requireOpenConnection();

        $address = new HttpAddress($this->getUrl());

        return array (
            'proxyType' => 'manual',
            'httpProxy' => $address->hostname . ':' . $this->getPort(),
            'sslProxy'  => $address->hostname . ':' . $this->getPort()
        );
    }
752967
public function getProxyUserPassword()
    {
        $proxy_options = $this->getOption(EnumRequestOption::PROXY_OPTIONS, []);
        return isset($proxy_options[EnumProxyOption::USER_PASSWD]) ? $proxy_options[EnumProxyOption::USER_PASSWD] : '';
    }
394984
protected function proxy() {
        if (!$this->context) {
            $this->context = new ApplicationContext(
                $this->version,
                $this->solution['accountSid'],
                $this->solution['sid']
            );
        }

        return $this->context;
    }
1255877
public function getStreamContext()
    {
        // set basic stream context configuration
        $config = [
            'tcp' => [
                'method'          => 'GET',
                'user_agent'      => $this->loader->getUserAgent(),
                // ignore errors, handle them manually
                'ignore_errors'   => true,
                'request_fulluri' => true,
                'timeout'         => $this->loader->getTimeout(),
            ],
        ];

        // check and set proxy settings
        $proxy_host = $this->loader->getOption('ProxyHost');
        if (null !== $proxy_host) {
            // check for supported protocol
            $proxy_protocol = $this->loader->getOption('ProxyProtocol');
            if (null !== $proxy_protocol) {
                if (!in_array($proxy_protocol, [self::PROXY_PROTOCOL_HTTP, self::PROXY_PROTOCOL_HTTPS])) {
                    throw new Exception(
                        'Invalid/unsupported value "' . $proxy_protocol . '" for option "ProxyProtocol".',
                        Exception::INVALID_OPTION
                    );
                }
            } else {
                $proxy_protocol = self::PROXY_PROTOCOL_HTTP;
            }

            // prepare port for the proxy server address
            $proxy_port = $this->loader->getOption('ProxyPort');
            if (null !== $proxy_port) {
                $proxy_port = ':' . $proxy_port;
            } else {
                $proxy_port = '';
            }

            // check auth settings
            $proxy_auth = $this->loader->getOption('ProxyAuth');
            if (null !== $proxy_auth) {
                if (!in_array($proxy_auth, [self::PROXY_AUTH_BASIC])) {
                    throw new Exception(
                        'Invalid/unsupported value "' . $proxy_auth . '" for option "ProxyAuth".',
                        Exception::INVALID_OPTION
                    );
                }
            } else {
                $proxy_auth = self::PROXY_AUTH_BASIC;
            }

            // set proxy server address
            $config['http']['proxy'] = 'tcp://' . $proxy_host . $proxy_port;
            // full uri required by some proxy servers
            $config['http']['request_fulluri'] = true;

            // add authorization header if required
            $proxy_user = $this->loader->getOption('ProxyUser');
            if (null !== $proxy_user) {
                $proxy_password = $this->loader->getOption('ProxyPassword');
                if (null === $proxy_password) {
                    $proxy_password = '';
                }
                $auth                     = base64_encode($proxy_user . ':' . $proxy_password);
                $config['http']['header'] = 'Proxy-Authorization: Basic ' . $auth;
            }
        }

        return stream_context_create($config);
    }
720828
private function parseProxy()
    {
        if($this->request->getAttribute('useProxy', false))
        {
            $type = $this->request->getAttribute('proxy.type');
            switch($type)
            {
                case 'http':
                    $this->settings['http_proxy_host'] = $this->request->getAttribute('proxy.server');
                    $this->settings['http_proxy_port'] = $this->request->getAttribute('proxy.port');
                    $this->settings['http_proxy_user'] = $this->request->getAttribute('proxy.username', '');
                    $this->settings['http_proxy_password'] = $this->request->getAttribute('proxy.password', '');
                    break;
                case 'socks5':
                    $this->settings['socks5_host'] = $this->request->getAttribute('proxy.server');
                    $this->settings['socks5_port'] = $this->request->getAttribute('proxy.port');
                    $this->settings['socks5_username'] = $this->request->getAttribute('proxy.username', '');
                    $this->settings['socks5_password'] = $this->request->getAttribute('proxy.password', '');
                    break;
            }
        }
    }
1048609
protected function proxy() {
        if (!$this->context) {
            $this->context = new ExecutionContext(
                $this->version,
                $this->solution['flowSid'],
                $this->solution['sid']
            );
        }

        return $this->context;
    }
226409
public function serialize()
    {
        $output = [];
        foreach ($this as $element) {
            $proxy = $element->getProxy();
            $output[] = $proxy->getContenttype() . '/' . $proxy->getSlug();
        }

        return $output;
    }
1124391
protected function proxy() {
        if (!$this->context) {
            $this->context = new UserBindingContext(
                $this->version,
                $this->solution['serviceSid'],
                $this->solution['userSid'],
                $this->solution['sid']
            );
        }

        return $this->context;
    }
1339071
private static function getProxyString(): ?string
    {
        $proxyString = null;
        if (\getenv('HTTP_CLIENT_IP')) {
            $proxyString = \getenv('HTTP_CLIENT_IP');
        } elseif (\getenv('HTTP_X_FORWARDED_FOR')) {
            $proxyString = \getenv('HTTP_X_FORWARDED_FOR');
        } elseif (\getenv('HTTP_X_FORWARDED')) {
            $proxyString = \getenv('HTTP_X_FORWARDED');
        } elseif (\getenv('HTTP_X_COMING_FROM')) {
            $proxyString = \getenv('HTTP_X_COMING_FROM');
        } elseif (\getenv('HTTP_FORWARDED_FOR')) {
            $proxyString = \getenv('HTTP_FORWARDED_FOR');
        } elseif (\getenv('HTTP_FORWARDED')) {
            $proxyString = \getenv('HTTP_FORWARDED');
        } elseif (\getenv('HTTP_COMING_FROM')) {
            $proxyString = \getenv('HTTP_COMING_FROM');
        }
        return $proxyString;
    }
366762
public function getCurlOptions()
    {
        $mandatoryOptions = array(
            CURLOPT_POST => true,
            CURLOPT_HEADER => true
        );

        $defaultOptions = array(
            CURLOPT_VERBOSE => false,
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_SSL_VERIFYPEER => false
        );

        $curlOptions = ($mandatoryOptions + $this->curlOptions + $defaultOptions);

        if ($this->hasProxyConfigured()) {
            $curlOptions[CURLOPT_PROXYTYPE] = $this->getProxyType();
            $curlOptions[CURLOPT_PROXY] = $this->getProxyHost();
            $curlOptions[CURLOPT_PROXYPORT] = $this->getProxyPort();
            $curlOptions[CURLOPT_PROXYUSERPWD] = $this->getProxyUserPwd();
        }

        return $curlOptions;
    }