Selenium
Selenium is the most widely used browser automation framework. It supports multiple programming languages and browsers. Here's how to configure HypeProxy.io proxies with Selenium.
Python Setup
HTTP/HTTPS Proxy
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_argument('--proxy-server=http://fr.hypeproxy.host:port')
driver = webdriver.Chrome(options=chrome_options)
driver.get('https://api.ipify.org')
print(f'Proxy IP: {driver.find_element("tag name", "body").text}')
driver.quit()
SOCKS5 Proxy
chrome_options = Options()
chrome_options.add_argument('--proxy-server=socks5://fr.hypeproxy.host:port')
driver = webdriver.Chrome(options=chrome_options)
With Authentication (using selenium-wire)
Standard Selenium doesn't support proxy authentication natively. Use selenium-wire instead:
pip install selenium-wire
from seleniumwire import webdriver
options = {
'proxy': {
'http': 'http://username:password@fr.hypeproxy.host:port',
'https': 'http://username:password@fr.hypeproxy.host:port',
}
}
driver = webdriver.Chrome(seleniumwire_options=options)
driver.get('https://api.ipify.org')
print(driver.page_source)
driver.quit()
JavaScript Setup
const { Builder } = require('selenium-webdriver');
const chrome = require('selenium-webdriver/chrome');
const options = new chrome.Options();
options.addArguments('--proxy-server=http://fr.hypeproxy.host:port');
const driver = await new Builder()
.forBrowser('chrome')
.setChromeOptions(options)
.build();
await driver.get('https://api.ipify.org');
console.log(await driver.findElement({ tagName: 'body' }).getText());
await driver.quit();
Tips
- For proxy authentication,
selenium-wire(Python) is the easiest solution. Alternatively, use IP whitelisting in the HypeProxy.io dashboard. - Combine Selenium with HypeProxy.io API to rotate IPs between test sessions or scraping batches.
- Use mobile proxies for testing websites that block automation — mobile IPs have the highest trust level.
- Consider using Playwright or Puppeteer as alternatives that handle proxy authentication more natively.
