VVinaProxy

Fomba fametrahana proxy amin'ny Node.js (Axios sy Native Fetch)

Updated:

Tsy mandeha amin'ny tanjona https:// ny safidy anatiny proxy: { host, port } an'ny Axios satria tsy manokatra tonelina HTTP CONNECT izy. Mba handefasana tsara ny fangatahana Node.js sy TypeScript amin'ny alalan'ny proxy HTTP(S) misy fidirana VinaProxy, ampidiro ny HttpsProxyAgent (https-proxy-agent) amin'ny Axios na mpandefa undici.ProxyAgent amin'ny fetch() natoralin'ny Node.

Node.js (Axios / Undici) · HTTP Proxy Format
new HttpsProxyAgent('http://user:pass@ip:port')
IPv4 manokana (datacenter)
🇺🇸 Etazonia
Misy tahiry
Manomboka amin'ny
₫ 20,000 / IP / volana
≈ US$ 0.74 · aloa amin'ny VND
Fihenam-bidy arakaraka ny isa
  • 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
Vidio Etazonia
IPv4 manokana (datacenter)
🇸🇬 Singapour
Misy tahiry
Manomboka amin'ny
₫ 20,000 / IP / volana
≈ US$ 0.74 · aloa amin'ny VND
Fihenam-bidy arakaraka ny isa
  • 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
Vidio Singapour

Fampifanarahana proxy: Axios sy ny fetch() natoralin'ny Node.js

Samy manaiky URL mahazatra http://user:pass@ip:port avy amin'ny solaitrabe VinaProxy-nao ny tranomboky roa tonta:

Mpanjifa HTTPPackageKaody atolotra
Axiosnpm i https-proxy-agentaxios.get(url, { httpsAgent: new HttpsProxyAgent('http://user:pass@ip:port'), proxy: false })
fetch natoraly (Node 18+)npm i undicifetch(url, { dispatcher: new ProxyAgent('http://user:pass@ip:port') })
Gotnpm i hpagentgot(url, { agent: { https: new HttpsProxyAgent({ proxy: 'http://user:pass@ip:port' }) } })

Fomba fanao tsara indrindra amin'ny fifandraisana sy timeout amin'ny Node.js

  • Ampifandraiso foana ny proxy: false miaraka amin'ny httpsAgent ao amin'ny Axios mba tsy hiraharahan'ny Axios ireo variable tontolo iainana HTTP_PROXY mifanipaka ao amin'ny rafitra
  • Amboary indray mandeha isaky ny IP proxy ivelan'ny loop ny HttpsProxyAgent na ProxyAgent mba hampiasana indray ireo socket keep-alive maharitra
  • Aondrano mivantana ho array JSON ny lisitry ny proxy VinaProxy-nao amin'ny alalan'ny Proxy Format Converter-tsika

Tsikelikely

  1. 1

    Mametraka https-proxy-agent (na undici)

    Alefaso ao amin'ny tetikasa Node.js-nao ny npm install axios https-proxy-agent.

  2. 2

    Mamorona ny instance HttpsProxyAgent

    Atombohy ny const agent = new HttpsProxyAgent('http://user:pass@ip:port'); amin'ny fampiasana ny fidirana VinaProxy-nao.

  3. 3

    Alefaso amin'ny Axios ny httpsAgent sy proxy: false

    Antsoy ny const res = await axios.get('https://vinaproxy.com/api/my-ip', { httpsAgent: agent, proxy: false, timeout: 10000 });.

  4. 4

    Hamarino ny IP fivoahana

    Asehoy amin'ny log ny res.data mba hanamafisana fa nandalo tamin'ny IP proxy natokana ho anao ny valiny.

Fanontaniana matetika apetraka

Nahoana no tsy mandeha amin'ny URL HTTPS ny safidy mahazatra `proxy: { host, port, auth }` an'ny Axios?

Mandefa fangatahana HTTP tsotra ny fikirakirana proxy anatiny an'ny Axios fa tsy manokatra tonelina TLS HTTP CONNECT. Manitsy izany ny fampiasana ny httpsAgent: new HttpsProxyAgent('http://user:pass@ip:port') miaraka amin'ny proxy: false.

Ahoana ny fampiasana proxy amin'ny `fetch()` natoraly ao amin'ny Node.js 18/20/22?

Ampidiro ny ProxyAgent avy amin'ny undici ary apetraho ao amin'ny safidin'ny fetch() ny { dispatcher: new ProxyAgent('http://user:pass@ip:port') }.

Azoko avadika ho JSON ho an'ny Node.js ve ny lisitry ny proxy-ko?

Eny—apetaho ao amin'ny Proxy Format Converter maimaim-poana anay ny andalana ip:port:user:pass-nao ary safidio ny endrika JSON.

Hamafiso amin'ny IP tsy miovaova ny backend sy scrapers Node.js-nao

Proxy IPv4 Natokana sy ISP Tsy Miovaova avy hatrany, tsy misy fetra, manerana firenena 7.

Mividiana Proxy Node.js

Related articles

Proxy isaky ny sehatra
Proxy ho an'ny Web Scraping: IPv4 natokana & vovonana ISP tsy voafetra ho an'ny crawler 24/7
Proxy HTTP(S) IPv4 natokana sy ISP statika haingana ho an'ny Python, Playwright, Selenium ary Scrapy, misy bandwidth tsy voafetra. Ampitahao sy manomboka.
Fametrahana proxy
Ahoana ny fametrahana proxy misy fanamarinana ao amin'ny Puppeteer (Node.js)
Amboary ny proxy HTTP(S) misy fanamarinana ao amin'ny Puppeteer Node.js amin'ny alalan'ny --proxy-server sy await page.authenticate(). Adikao ny ohatra miasa.
Fametrahana proxy
Ahoana ny fomba fametrahana proxy amin'ny Playwright (Auth an'ny Browser sy isaky ny Context)
Amboary ny proxy HTTP(S) misy auth amin'ny Playwright ho an'ny Node.js sy Python, ary mampiasà IP static mitokana maro anaty BrowserContexts. Adikao ny ohatra.
Fitaovana maimaim-poana
Mpanova Endrika Proxy Marobe (100% amin'ny Navigateur)
Mpanova lisitra proxy 100% amin'ny navigateur. Manova eo anelanelan'ny ip:port:user:pass, user:pass@ip:port, URL http://, URI SOCKS5, array JSON, sy FoxyProxy.
Proxy isaky ny sehatra
Proxy ho an'ny SEO & SERP Tracking: laharan'ny teny fototra marina amin'ny firenena 7
Araho ny laharan'ny teny fototra, diniho ny geo-redirect, manaova crawl Screaming Frog amin'ny IPv4 dedicated sy ISP static tsy misy fetra amin'ny firenena 7.
Proxy isaky ny sehatra
Proxy ho an'ny Discord: saraho amin'ny IP mipetraka manokana ny kaonty sy ny token
Arovy amin'ny fanidiana an-tariby sy sakana Cloudflare ny kaonty Discord maro. Proxy mipetraka manokana avy any Etazonia, Singapour ary Vietnam.
IPV4 · united states
Proxy IPv4 Manokana Etazonia: IP Datacenter Amerikana Haingana sady Natokana
Proxy IPv4 manokana any Etazonia ho an'ny fakana angona, fanarahana laharana, doka sy Amazon. IP static, olona 1 isaky ny IP, data tsy voafetra, velona malaky.
IPV4 · singapore
Proxy IPv4 Manokana Singapore: IP SG Haingana sy Natokana ho an'ny Varotra sy Doka Isam-paritra
Proxy IPv4 manokana Singapore natokana ho an'ny fivarotana Lazada sy Shopee SG, kaonty doka isam-paritra, fanamarinana doka ary aotomaotisma. Data tsy voafetra.