开发者

How to setup a local xampp behind my company's proxy

开发者 https://www.devze.com 2023-01-21 04:17 出处:网络
I am trying to do curl requests through my local xampp setup bu开发者_StackOverflowt my company has a firewall proxy that needs to authenticate on port 8080. Can I have apache login to this proxy auth

I am trying to do curl requests through my local xampp setup bu开发者_StackOverflowt my company has a firewall proxy that needs to authenticate on port 8080. Can I have apache login to this proxy authenticate and complete the curl requests?


You can do it in your curl request

if for example you are coding in php

curl_setopt($this->ch, CURLOPT_PROXY, "http://proxy");
curl_setopt($this->ch, CURLOPT_PROXYPORT, 8080);

You will probably need to use CURLOPT_PROXYAUTH as well

or you may want to try setting HTTP_PROXY ENV variable


To set HTTP_PROXY

export http_proxy=http://proxy:8080/

0

精彩评论

暂无评论...
验证码 换一张
取 消