cURL සමඟ proxy එකක් භාවිතා කරන්නේ කෙසේද (command-line syntax සහ debugging)
Updated:
curl command-line මෙවලම යනු ඔබේ VinaProxy ip:port:user:pass අක්තපත්ර භාවිතයෙන් Linux, macOS, හෝ Windows terminals මඟින් proxy සත්යාපනය තහවුරු කිරීමට, HTTP response headers පරීක්ෂා කිරීමට, සහ round-trip latency මැනීමට ඇති වේගවත්ම ක්රමයයි.
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
අත්යවශ්ය cURL proxy flags සහ one-liners
ඔබේ proxy එක -x (--proxy) සහ -U (--proxy-user) හරහා ඇතුළත් කරන්න, නැතහොත් ඒවා තනි http://user:pass@ip:port URL එකක් ලෙස ඒකාබද්ධ කරන්න:
| කාර්යය | cURL Command | පෙන්වන තොරතුරු |
|---|---|---|
| පිටවීමේ IP පරීක්ෂා කිරීම | curl -x http://user:pass@ip:port https://vinaproxy.com/api/my-ip | proxy හි public IPv4 සහිත JSON ලබා දෙයි |
| වෙන්වූ අක්තපත්ර | curl -x http://ip:port -U "user:pass" https://vinaproxy.com/api/my-ip | මුරපදවල විශේෂ අක්ෂර අඩංගු වන විට වඩාත්ම ආරක්ෂිත වේ |
| headers පමණක් පරීක්ෂා කිරීම | curl -I -x http://user:pass@ip:port https://example.com | HTTP status code සහ response headers ලබා ගනී |
| TTFB latency මැනීම | curl -s -o /dev/null -w "Connect:%{time_connect}s TTFB:%{time_starttransfer}s\n" -x http://user:pass@ip:port https://example.com | TCP handshake සහ first-byte කාලය මනියි |
Windows PowerShell සහ shell scripts සඳහා වැදගත් උපදෙස්
- Windows PowerShell හි, පෙරනිමියෙන්ම
curlයන්නInvoke-WebRequestවෙත alias කර ඇත—නියම cURL binary එක භාවිතා කිරීමට සෑම විටමcurl.exe -x ...ධාවනය කරන්න CONNECThandshake පරීක්ෂා කිරීමට සහHTTP/1.1 200 Connection establishedතහවුරු කිරීමට-v(verbose) එක් කරන්න- මන්දගාමී ඉලක්ක නිසා ඔබේ pipeline එක කිසිවිටෙකත් ඇණහිටීම වැළැක්වීමට cronjobs සහ shell scripts තුළ
--connect-timeout 5 --max-time 15ඇතුළත් කරන්න - සියලුම
curlධාවනයන් සඳහා පෙරනිමි proxy එකක් අවශ්ය නම්~/.curlrcහිproxy = "http://user:pass@ip:port"ගබඩා කරන්න
පියවරෙන් පියවර
- 1
ඔබේ terminal (හෝ Windows හි cmd / PowerShell) විවෘත කරන්න
ඔබ Windows PowerShell තුළ සිටී නම්
curl.exeලෙස ටයිප් කිරීමට මතක තබා ගන්න. - 2
ඔබේ proxy හරහා පරීක්ෂණ ඉල්ලීමක් ධාවනය කරන්න
ඔබේ VinaProxy අක්තපත්ර භාවිතයෙන්
curl.exe -x http://user:pass@ip:port https://vinaproxy.com/api/my-ipධාවනය කරන්න. - 3
අවශ්ය නම් -v මඟින් handshake headers debug කරන්න
Proxy-Authorizationheader සහ TLS handshake පරීක්ෂා කිරීමට-vඑක් කරන්න. - 4
production scripts සඳහා timeout guards එක් කරන්න
ස්වයංක්රීය shell scripts තුළ
--connect-timeout 5 --max-time 15ලබා දෙන්න.
නිතර අසන ප්රශ්න
Windows PowerShell හි `curl -x` parameter error එකක් සමඟ අසාර්ථක වන්නේ ඇයි?
PowerShell විසින් curl යන්න Invoke-WebRequest වෙත alias කර ඇත. නිවැරදි cURL ධාවනය කිරීමට .exe දිගුව සමඟ curl.exe -x http://user:pass@ip:port ... ධාවනය කරන්න.
`curl -v` හි `HTTP/1.1 407 Proxy Authentication Required` මඟින් අදහස් වන්නේ කුමක්ද?
එයින් අදහස් වන්නේ cURL මඟින් proxy server IP සහ port වෙත සම්බන්ධ වූ නමුත්, -x හෝ -U වෙත ලබා දුන් පරිශීලක නාමය හෝ මුරපදය වැරදි බවයි.
cURL loop එකක් ලෙස ධාවනය නොකර මට proxies කිහිපයක් පරීක්ෂා කළ හැකිද?
ඔව්—අපගේ වෙබ් පාදක Proxy Checker හෝ Proxy Speed Test වෙත proxies 100 ක් දක්වා ඇතුළත් කරන්න.
cURL සහ CLI මෙවලම් සඳහා low-latency HTTP(S) proxies ලබා ගන්න
රටවල් 7 ක් පුරා ක්ෂණික Dedicated IPv4 සහ Static ISP අක්තපත්ර.
cURL Proxies මිලදී ගන්න