Uko wakoresha proxy hamwe na cURL (imyandikire y'amategeko & ikosoramakosa)
Updated:
Igikoresho cy'umurongo w'amategeko cya curl nicyo cyihuta cyane mu kwemeza uburenganzira bwa proxy, gusuzuma imitwe y'igisubizo cya HTTP, no gupima ubukererwe bwo kugenda no kugaruka kuri terminal za Linux, macOS, cyangwa Windows ukoresheje imyirondoro yawe ya VinaProxy ip:port:user:pass.
curl -x http://user:pass@ip:port https://vinaproxy.com/api/my-ip- IP 1₫ 40.000
- IP 5+₫ 35.000
- IP 10+₫ 25.000
- IP 20+₫ 25.000
- IP 50+₫ 25.000
- IP 100+₫ 25.000
- IP 200+₫ 25.000
- IP 500+₫ 25.000
- IP 1000+₫ 22.000
- IP 2000+₫ 20.000
- IP 1₫ 40.000
- IP 5+₫ 35.000
- IP 10+₫ 25.000
- IP 20+₫ 25.000
- IP 50+₫ 25.000
- IP 100+₫ 25.000
- IP 200+₫ 25.000
- IP 500+₫ 25.000
- IP 1000+₫ 22.000
- IP 2000+₫ 20.000
Amabendera n'amategeko y'ingenzi y'umurongo umwe ya cURL proxy
Tanga proxy yawe unyuze kuri -x (--proxy) na -U (--proxy-user), cyangwa ubifatanye muri URL imwe ya http://user:pass@ip:port:
| Igikorwa | Itegeko rya cURL | Icyo Ryerekana |
|---|---|---|
| Kugenzura IP isohoka | curl -x http://user:pass@ip:port https://vinaproxy.com/api/my-ip | Igarura JSON irimo IPv4 rusange ya proxy |
| Gutandukanya imyirondoro | curl -x http://ip:port -U "user:pass" https://vinaproxy.com/api/my-ip | Uburyo bwizewe cyane igihe ijambobanga ririmo inyuguti zidasanzwe |
| Gusuzuma imitwe gusa | curl -I -x http://user:pass@ip:port https://example.com | Izana kode y'imiterere n'imitwe y'igisubizo cya HTTP |
| Gupima ubukererwe bwa TTFB | curl -s -o /dev/null -w "Connect:%{time_connect}s TTFB:%{time_starttransfer}s\n" -x http://user:pass@ip:port https://example.com | Ipima igihe cya TCP handshake n'inyuguti ya mbere (first-byte) |
Inama z'inzobere kuri Windows PowerShell na script za shell
- Muri Windows PowerShell, bisanzwe ko
curlifatwa nkaInvoke-WebRequest—buri gihe koreshacurl.exe -x ...kugira ngo ukoreshe dosiye nyakuri ya cURL - Ongeraho
-v(verbose) kugira ngo usuzumeCONNECThandshake kandi wemezeHTTP/1.1 200 Connection established - Shyiramo
--connect-timeout 5 --max-time 15muri cronjobs na script za shell kugira ngo ibyerekezo bitinda bidahagarika umuyoboro wawe - Bika
proxy = "http://user:pass@ip:port"muri~/.curlrcniba wifuza proxy ihoraho ku mikoreshereze yose yacurl
Intambwe ku yindi
- 1
Fungura terminal yawe (cyangwa cmd / PowerShell kuri Windows)
Wibuke kwandika
curl.exeniba uri muri Windows PowerShell. - 2
Kora igerageza ryo kohereza ubusabe unyuze kuri proxy yawe
Koresha
curl.exe -x http://user:pass@ip:port https://vinaproxy.com/api/my-ipukoresheje imyirondoro yawe ya VinaProxy. - 3
Kosora amakosa y'imitwe ya handshake ukoresheje -v niba bikenewe
Ongeraho
-vkugira ngo usuzume umutwe waProxy-Authorizationna TLS handshake. - 4
Ongeraho igipimo cy'igihe ntarengwa muri script zikoreshwa mu kazi
Tanga
--connect-timeout 5 --max-time 15muri script za shell zikora mu buryo bwikora.
Ibibazo bikunze kubazwa
Kuki `curl -x` inanirwa ikazana ikosa rya parameter muri Windows PowerShell?
PowerShell ifata curl nka Invoke-WebRequest. Koresha curl.exe -x http://user:pass@ip:port ... hamwe n'umugereka wa .exe kugira ngo ukoreshe cURL y'umwimerere.
Ese `HTTP/1.1 407 Proxy Authentication Required` bivuze iki muri `curl -v`?
Bishatse kuvuga ko cURL yageze kuri IP n'icyambu bya seriveri ya proxy, ariko izina ry'ukoresha cyangwa ijambobanga byatanzwe kuri -x cyangwa -U byari bitari byo.
Ese nshobora gupima proxy nyinshi ntagombye gukoresha cURL muri loop?
Yego—koporora proxy zigera ku 100 uzishyire muri Proxy Checker cyangwa Proxy Speed Test zacu zo ku rubuga.
Bona proxy za HTTP(S) zifite ubukererwe bwo hasi zigenewe cURL n'ibikoresho bya CLI
Imyirondoro y'ako kanya ya Dedicated IPv4 na Static ISP mu bihugu 7.
Gura Proxy za cURL