Learn about Bright Data’s proxies integration options and some tips for best use.
Bright Data Super Proxy and Selenium Integration
- Begin by going to your Bright Data Dashboard and clicking ‘create a Zone’.
- Choose ‘Network type’ and click save.
- Within Selenium fill in the ‘Proxy IP:Port’ in the ‘setProxy’ function for example
brd.superproxy.io:22225
of both http and https. - Under ‘sendKeys’ input your Bright Data account ID and proxy Zone name:
brd-customer-CUSTOMER-zone-YOURZONE
and your Zone password found in the Zone settings. - JavaScript example:
const {Builder, By, Key, until} = require('selenium-webdriver');
const proxy = require('selenium-webdriver/proxy');
(async function example(){
let driver = await new Builder().forBrowser('firefox').setProxy(proxy.manual({
http: 'brd.superproxy.io:22225',
https: 'brd.superproxy.io:22225'
})).build()
try {
await driver.get('http://lumtest.com/myip.json');
driver.switchTo().alert()
.sendKeys('brd-customer-USERNAME-zone-YOURZONE'+Key.TAB+'PASSWORD');
driver.switchTo().alert().accept();
} finally {
await driver.quit();
}
})();
- Python example (deprecated, recommend using with Proxy Manager, next section):
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.chrome.options import Options
from seleniumwire import webdriver
import time
PATH = "/path/to/chromedriver.exe" #Path to chromedriver (Adjust as needed)
options = {
'proxy': {'http': 'http://brd-customer-CUST_ID-zone-ZONE_NAME:PASSWORD@brd.superproxy.io:22225',
'https': 'http://brd-customer-CUST_ID-zone-ZONE_NAME:PASSWORD@brd.superproxy.io:22225'},
}
chrome = webdriver.Chrome(PATH, seleniumwire_options=options)
If need to add headers to request
chrome.header_overrides = {
}
chrome.get("https://lumtest.com/myip.json")
print(chrome.execute_script('return document.body.innerHTML;')) #print page html
time.sleep(5) #close after 5 seconds
chrome.quit()
Proxy Manager and Selenium Integration
- Create a Zone with the network, IP type, and number of IPs you wish to use.
- Install the Bright Data Proxy Manager.
- Click ‘add new proxy’ and choose the Zone and settings you require, and click ‘save’.
- In Selenium under the setProxy input your local IP and proxy manager port (i.e. 127.0.0.1:24000)
- The local host IP is 127.0.0.1
- The port created in the Proxy Manager is 24XXX, for example, 24000
- Leave the username and password field empty, as the Bright Data Proxy Manager has already been authenticated with the Super Proxy.
- JavaScript example:
const {Builder, By, Key, until} = require('selenium-webdriver');
const proxy = require('selenium-webdriver/proxy');
(async function example(){
let driver = await new Builder().forBrowser('firefox').setProxy(proxy.manual({
http: '127.0.0.1:24000',
https: '127.0.0.1:24000'
})).build()
try {
await driver.get('http://lumtest.com/myip.json');
driver.switchTo().alert().accept();
} finally {
await driver.quit();
}
})();
- Python example:
import random
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time
PROXY = "127.0.0.1:24000"
PATH = "/path/to/chromedriver.exe" #Path to chromedriver (Adjust as needed)
print(PROXY)
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--proxy-server=%s' % PROXY)
chrome = webdriver.Chrome(PATH, options=chrome_options)
If need to add headers to request
chrome.header_overrides = {
}
chrome.get("https://lumtest.com/myip.json")
print(chrome.execute_script('return document.body.innerHTML;')) #print page html
time.sleep(5) #close after 5 seconds
NOTE: The latest Firefox version that supports the above code is 66.0.5. Newer versions support IP:PORT format, so using newer Firefox versions can be done through Proxy Manager configuration.
Bright Data Super Proxy and Puppeteer Integration
const puppeteer = require('puppeteer'); (async () => { const browser = await puppeteer.launch({ headless: false, args: ['--proxy-server=brd.superproxy.io:22225'] }); const page = await browser.newPage(); await page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36'); await page.authenticate({ username: 'brd-customer-USERNAME', password: 'PASSWORD' }); await page.goto('http://lumtest.com/myip.json'); await page.screenshot({path: 'example.png'}); await browser.close(); })();
Watch the video: connecting Puppeteer with Bright Data super proxy
Note: Chromium user-agent includes "HeadlessChrome" which needs to be replaced as shown in the example above using setUserAgent
.
Windows 10 integration
- If you're using our Proxy manager tool:
- Get your proxy address
brd.superproxy.io:22225
for direct access127.0.0.1:24000
for Proxy Manager - Open the start menu (press WIN)
- Type 'Internet Options'
- Choose the 'Connections' tab
- Open 'LAN Settings'
- Un-select 'Automatically detect settings'
- Select 'Use a proxy server for your LAN'
- Select 'Bypass proxy server for local addresses'
- Type port and address (
brd.superproxy.io
or127.0.0.1
) in appropriate fields - Click OK
- Some applications will interfere with setting up the proxy settings - if that happens, look for a proxy/VPN-related application and deactivate them.
If you're using Bright Data proxies directly (without the Proxy Manager), you should also do the following:
- Open the start menu (press WIN)
- Type 'Manage Windows Credentials'
- Click 'add generic credential'
- Type address without port or protocol (brd.superproxy.io)
- Construct user-name as explained earlier and type it in. Also, type in the password
- Click OK
Not all applications will honor the credentials, some applications (like Chrome) will ask for credentials themselves
Android integration
- Open your device Settings app
- Tap 'Wi-Fi'
- Connect to one of your Wi-Fi networks
- Click on the cog button next to it
- Under 'Proxy', change the default 'None' to 'Manual'
- The proxy hostname is
brd.superproxy.io
and the port is 22225 - Tap 'Save'
NOTE: This method is for general Android integration and might not work for all browsers and apps, you'll be required to enter your proxy zone's username and password upon connection.
iPhone integration
- Open your device Settings app and go to Wi-Fi
- Tap the name of the Wi-Fi network you are connected to
- Scroll to the bottom and you will find a section for 'HTTP Proxy'. This is set to 'Off' by default. Set it to 'Manual'
- Toggle the Authentication to 'On'
- Enter username and password as can be found at https://brightdata.com/cp/zones, click on the Zone name, then click on the 'Settings' tab.
Note: if you need to change the proxy credentials you may encounter a bug in iOS proxy settings. Proxy username and password are cached by hostname and can't easily be changed. To overcome this bug either use Proxy Manager to control proxy credentials or use a different host every time you need to change credentials. You can use session-RANDOM_ID.brd.superproxy.io to create a new host domain every time.
Proxifier
- Download and install Proxifier
- Run Proxifier
Follow the next steps to create all necessary settings:
- Go to Profile → Name Resolution
- Uncheck Detect DNS settings automatically under the Proxifier DNS settings
- Check Resolve hostnames through proxy under the Proxifier DNS settings
- Go to Profile → Proxy Servers
- Click Add and define Bright Data’s proxy server with the following credentials:
– Address:127.0.0.1
– Port:24000
– Protocol:SOCKS Version 5
- Click Add and define Bright Data’s proxy server with the following credentials:
- Once added it should look like this:
- Go to Profile → Proxification Rules
- Add the following rules:
– Name:Proxy Manager
– Applications:"proxy manager.exe"
, directory where you find this app:C:\Users\*your_username*\AppData\Local\Programs\@luminati-ioluminati-proxy\
– Action:Direct
– Name:Proxy
– Target ports:80; 443;
– Action:Proxy SOCKS5 127.0.0.1
- Proxification Rules should look like the following (the order is important).
Please make sure that there are predefined Localhost, and Default rules and that they are set to Direct
Keep Proxifier running and use your Internet applications without any built-in proxy settings. All connections to ports 80 and 443 will go through the Bright Data network as defined in Proxy Manager
In case of any problems please set Log → Screen_Log → Verbose in Proxifier, reproduce the problem, and examine the Proxifier output
VMLogin
- Download and install VMLogin here(3 Days Free Trial)
- Start by launching VMLogin and creating a new browser profile:
- Click “Get random profile”
- Select the settings that best suit you, such as operating system, screen resolution, language, WebGL vendor, time zone, media device fingerprint, etc.
Browser
Using Bright Data proxies is available when using a browser, allowing you to browse the Internet with an IP and location of your choice. In order to see the different browser integration options, go to our API examples page.
Mobile
Using Bright Data proxies is available to use through your mobile phone, allowing you to browse the Internet with an IP and location of your choice. In order to integrate Bright Data's proxies with your Android/iOS device, please review our API examples page.
Browser extension
Using Bright Data proxies is available with our browser extension. Our browser extension allows you to use Bright Data from your browser with minimum setup.
Bright Data's proxy manager
Using Bright Data's proxy manager allows users to control all proxies within a single interface. It is an advanced open-source tool (See the project on GitHub) built by developers, for developers. It allows unique customization, rules implementation to optimize usage, and even integration of external proxies.
Third-Party And Browser Automation
Using Bright Data proxies is available with a variety of 3rd-party programs.
- Browser automation tools
- Third-Party Integrations
Advanced Integration Options
- Web Unlocker advanced integrations
- Datacenter advanced integrations
- ISP advanced integrations
- Residential proxy advanced integrations
- Mobile proxy advanced integrations
- Proxy manager advanced integrations