Getting blocked after 50 requests is one of the most frustrating parts of web scraping, and a bad proxy setup in Selenium is almost always the reason. Standard datacenter proxies trigger bot detection within minutes on sites like Google, Amazon, or Allegro. Mobile 4G proxies solve this because they route your traffic through real SIM cards, making your scraper look like an ordinary smartphone user. In this guide, you will learn: how to configure HTTP and SOCKS5 proxies in Selenium, how to rotate IPs automatically using the Proxy Poland API, how to avoid common detection mistakes, and how to test whether your proxy is actually working before you run a full scrape.

Why 4G Proxies Beat Datacenter Proxies for Selenium Scraping
Datacenter proxies share the same ASN as thousands of other bots. Any half-decent anti-bot system, think Cloudflare, DataDome, or PerimeterX, flags them in seconds. A 4G proxy routes your request through a physical modem connected to a real mobile carrier network. In Poland, that means Orange LTE SIMs with CGNAT addresses that are shared among hundreds of legitimate phone users.
What does that mean for your scraper? The target site sees an IP belonging to a real mobile network, not a hosting provider. Detection systems like Akamai and Kasada treat mobile IPs as low-risk by default because banning them would block real customers too.
- CGNAT behavior: multiple real users share the same IP, so your traffic blends in naturally
- 0% detection rate on sites we've tested, including Google SERP scrapers and Nike SNKRS
- Unlimited bandwidth: flat daily rate means you don't pay per GB, just run your jobs
- IP rotation in 2 seconds via a simple API call, no reconnect delays
Key takeaway: If your Selenium scraper keeps hitting CAPTCHAs or 403 errors, switching to a 4G mobile proxy is the fastest fix, not tweaking your user-agent string.
Prerequisites: What You Need Before You Start
Before you write a single line of proxy configuration code, make sure you have the following ready. Skipping any of these causes hours of debugging later.
- Python 3.9+ with
seleniuminstalled:pip install selenium - ChromeDriver or GeckoDriver matching your browser version. Use
webdriver-managerto avoid version mismatch headaches. - A Proxy Poland account with at least one active port. The free 1-hour trial gives you a real modem IP to test with, no credit card required.
- Your proxy credentials: host, port, username, and password. You'll find these in the Proxy Poland control panel after activating a port.
- Basic knowledge of Python and how Selenium's WebDriver options work.
One thing worth noting: Proxy Poland provides both HTTP and SOCKS5 on the same port. Which protocol you pick depends on your use case. HTTP is simpler for most scraping tasks. SOCKS5 is better when you need to handle non-HTTP traffic or want lower-level control. Both sections below are covered separately.
Proxy Setup in Selenium Using ChromeDriver (HTTP)
This is the most common proxy setup for Selenium and works for the majority of scraping projects. ChromeDriver accepts proxy settings through the ChromeOptions object.
Basic HTTP Proxy Configuration
Here's a working example you can drop directly into your project:
- Import the required modules:
from selenium import webdriverandfrom selenium.webdriver.chrome.options import Options - Create an
Optionsinstance and add the proxy argument:
options = Options()
options.add_argument('--proxy-server=http://YOUR_HOST:YOUR_PORT')
- If your proxy requires authentication (Proxy Poland uses username/password auth), you need a Chrome extension or a proxy authentication extension to pass credentials. The simplest approach is using a plugin:
import zipfile, os
Create a manifest and background script inside a zip file that sets "proxy": {"rules": {"singleProxy": {"host": ..., "port": ...}}} and handles "onAuthRequired" events with your credentials.
Alternatively, use selenium-wire, which handles authenticated proxies with two lines:
from seleniumwire import webdriver
options = {"proxy": {"http": "http://user:pass@host:port", "https": "http://user:pass@host:port"}}
driver = webdriver.Chrome(seleniumwire_options=options)
Key takeaway: selenium-wire is the fastest way to add authenticated proxy support to Selenium without writing a Chrome extension from scratch.

Configuring a SOCKS5 Proxy in Selenium
SOCKS5 is slightly different but equally straightforward with ChromeDriver. The main advantage of SOCKS5 is that it tunnels all traffic, not just HTTP/HTTPS, and it doesn't modify request headers the way some HTTP proxies do. For scrapers that need to stay stealthy, this matters.
SOCKS5 with ChromeDriver
Pass the --proxy-server argument with the socks5 scheme:
options.add_argument('--proxy-server=socks5://YOUR_HOST:YOUR_PORT')
ChromeDriver does not natively pass SOCKS5 credentials through the command-line argument. The cleanest solution is to pair this with a local SOCKS5 tunnel (like microsocks or a small SSH tunnel) that forwards authenticated requests, or again use selenium-wire:
proxy_options = {"proxy": {"http": "socks5://user:pass@host:port", "https": "socks5://user:pass@host:port", "no_proxy": "localhost,127.0.0.1"}}
Firefox GeckoDriver and SOCKS5
Firefox handles SOCKS5 more gracefully through its profile preferences:
profile.set_preference("network.proxy.type", 1)profile.set_preference("network.proxy.socks", "YOUR_HOST")profile.set_preference("network.proxy.socks_port", YOUR_PORT)profile.set_preference("network.proxy.socks_version", 5)
Firefox will prompt for SOCKS5 credentials separately. Handle this with a custom proxy authentication dialog handler in your Selenium script, or route through a local authenticated tunnel as described above.
Rotating Your 4G IP During a Scraping Session
Static proxies still get banned if you hammer a single IP for hours. The real power of a 4G proxy comes from IP rotation. With Proxy Poland, you can trigger a new IP in under 2 seconds via an HTTP API call, without restarting your browser or losing your session cookies.
Here's how to integrate IP rotation into your Selenium scraper:
- After every N requests (we suggest 50 to 200, depending on the target site), send a GET request to the Proxy Poland rotation endpoint:
https://panel.proxypoland.com/api/rotate?port=YOUR_PORT&token=YOUR_API_TOKEN - Wait for a 200 response confirming the new IP is active. The switch takes about 2 seconds.
- Optionally verify the new IP by visiting the IP check tool programmatically before continuing your scrape.
- Resume scraping from where you left off. Your Selenium session, cookies, and local storage remain intact.
In our testing across Allegro product pages and Google SERP scraping, rotating every 100 requests reduced block rates to near zero compared to a static IP that started getting CAPTCHAs after roughly 300 requests on the same session.
Key takeaway: Build rotation into your scraping loop from the start. Retrofitting it later is painful, and waiting until you get blocked costs you time and clean data.
Avoiding Detection: Headers, Fingerprints, and Timing
A 4G proxy is a strong foundation, but a proper Selenium proxy setup also means not screaming "I am a bot" through your browser fingerprint. Anti-bot systems check dozens of signals beyond your IP address.
User-Agent and Accept-Language Headers
Set a realistic user-agent that matches a real mobile or desktop browser. Don't mix a mobile user-agent with a desktop window size. If you're using a Polish 4G IP, set Accept-Language: pl-PL,pl;q=0.9,en;q=0.8 to match expectations. You can inspect what headers your scraper sends using the HTTP headers analyzer.
Webdriver Detection Flags
- Remove the
navigator.webdriverflag:options.add_argument('--disable-blink-features=AutomationControlled') - Use
undetected-chromedriver(theucpackage) for sites that actively probe Chrome's automation APIs - Avoid loading all extensions and plugins that a real Chrome install would have stripped out
Timing and Behavior
Add random delays between actions. A real user doesn't click a link 12 milliseconds after a page loads. Use time.sleep(random.uniform(1.5, 4.0)) between page loads. Scroll the page before clicking elements. Move the mouse in non-linear paths if the site uses mouse-tracking heuristics.
And check for DNS leaks. If your system DNS bypasses the proxy tunnel, your real location leaks. Run a quick DNS leak test after setting up your proxy to confirm everything routes correctly.
Testing Your Proxy Setup in Selenium
Don't assume your proxy is working just because Selenium launched without errors. A misconfigured proxy often fails silently, and your scraper ends up running on your real IP without you knowing.
Here's a quick test routine to run before any production scrape:
- Navigate to the IP detection tool with your Selenium driver and read the displayed IP. It should match your Proxy Poland port's IP, not your home or server IP.
- Check that the IP is flagged as a mobile network (ASN should show Orange Polska or a similar mobile carrier), not a datacenter.
- Run a proxy speed test to confirm latency is acceptable for your use case. Typical 4G LTE latency through our modems is around 30 to 80ms for requests within Poland.
- Make a test request to your actual target URL and check the response code. A 200 with content means you're through. A 403 or CAPTCHA page means the site has additional fingerprinting you need to address.
If the IP check shows your real IP, your proxy credentials are wrong or the extension/tunnel isn't active. Double-check the host, port, username, and password from the Proxy Poland control panel. Credentials are case-sensitive.

Frequently Asked Questions
Can Selenium use a proxy with authentication?
Yes. Native ChromeDriver doesn't support username/password proxy auth through command-line arguments alone. The cleanest solutions are: using selenium-wire which supports authenticated proxies natively, creating a Chrome extension that handles the auth header, or routing through a local proxy tunnel that adds credentials before forwarding.
Does using a 4G proxy slow down Selenium significantly?
There's a small latency increase compared to a direct connection, typically 30 to 80ms for Polish 4G LTE modems. For most scraping tasks this is irrelevant. You'll spend far more time in random delays to mimic human behavior than you'll lose to proxy latency. And avoiding blocks saves hours of retry logic.
How often should I rotate my IP in a Selenium scraping session?
It depends on the target site. For aggressive anti-bot systems like those on Google or major e-commerce platforms, rotate every 50 to 100 page requests. For lighter targets, every 200 to 500 requests is fine. Proxy Poland's 2-second rotation via API means you can rotate frequently without meaningful downtime in your scraper loop.
What's the difference between using a proxy in Selenium vs. a headless browser like Playwright?
Proxy configuration in Playwright is actually simpler since it supports authenticated proxies natively in the browser launch options. The underlying principle is identical: you're routing ChromiumDriver traffic through your 4G modem IP. Proxy Poland works equally well with Playwright, Puppeteer, or any Chromium-based automation tool.
Conclusion
A solid proxy setup in Selenium comes down to three things: using a real 4G mobile IP instead of datacenter addresses, handling authentication correctly in your WebDriver config, and building IP rotation into your scraping loop from day one. Pair those with basic fingerprint hygiene, realistic timing, and a quick IP verification step before each run, and you'll avoid the vast majority of blocks.
Proxy Poland's infrastructure runs on physical Orange LTE modems in Poland with unlimited bandwidth and 2-second IP rotation. Whether you're scraping Google SERPs, monitoring Allegro prices, or running social media automation, real mobile IPs give you a layer of legitimacy that no datacenter proxy can replicate. Start with the free 1-hour trial and see your block rate drop to zero.
Ready to stop fighting CAPTCHAs and start collecting clean data? View Proxy Poland plans and start your free trial today.
