Man ir šī proxy adrese: 125.119.175.48:8909
Kā es varu veikt HTTP pieprasījumu, izmantojot cURL, piemēram, curl http://www.example.com
, bet norādot sava tīkla proxy adresi?
No man curl
:
-x, --proxy <[protocol://][user:password@]proxyhost[:port]>
Use the specified HTTP proxy.
If the port number is not specified, it is assumed at port 1080.
Vispārīgs veids:
export http_proxy=http://your.proxy.server:port/
Tad varat izveidot savienojumu, izmantojot proxy no (daudzām) lietojumprogrammām.
Un, kā norādīts komentārā zemāk, https:
export https_proxy=https://your.proxy.server:port/
Iepriekš minētie risinājumi var nedarboties ar dažām curl versijām, es tos izmēģināju pats(curl 7.22.0). Bet tas, kas man palīdzēja, bija:
curl -x http://proxy_server:proxy_port --proxy-user username:password -L http://url
Ceru, ka tas atrisina problēmu labāk!