How to use a proxy in code
Every client needs the same four facts — host, port, username and password — plus the protocol. Libraries differ in where you put them: a proxies dictionary in Python requests, an agent in Node.js, CURLOPT_PROXY in PHP, a Transport in Go, a launch argument in Puppeteer and Playwright. The generator writes that boilerplate for you and tests it against an IP-echo endpoint so you can confirm the exit IP.
Good to know
- Passwords with special characters are URL-encoded where the library expects a URL.
- For SOCKS5 the generator uses
socks5hin curl so DNS resolves on the proxy side. - Browsers started with a proxy flag cannot take credentials in the flag; Puppeteer and Playwright pass them separately.
Related: proxy formats explained, proxies for web scraping and how to test proxy speed.