proxies
Oxylabs proxy networks: Residential, Mobile, shared Datacenter/ISP, and Dedicated Datacenter/ISP proxies with geo-targeting, IP rotation, session persistence, and port-based sticky IPs. Use when routing traffic through proxies, building scrapers with proxy auth, rotating or stick
Install
npx skills add https://github.com/oxylabs/agent-skills/tree/main/skills/proxies
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install oxylabs-agent-skills@llmmart
git clone https://github.com/oxylabs/agent-skills.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole oxylabs/agent-skills collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
Oxylabs Proxies
Proxy Types Overview
| Type | Host | Port | Best For |
|---|---|---|---|
| Residential | pr.oxylabs.io |
7777 |
High anonymity, geo-targeting |
| Mobile | pr.oxylabs.io |
7777 |
Mobile-specific content, highest trust |
| Datacenter (shared) | dc.oxylabs.io |
8000 rotation / 8001+ assigned/static |
Speed, high volume |
| ISP (shared) | isp.oxylabs.io |
8000 rotation / 8001+ assigned/static |
Speed + anonymity balance |
| Dedicated Datacenter | ddc.oxylabs.io |
8000 rotation / 8001+ assigned/static |
Owned IPs, port-based access |
| Dedicated ISP | disp.oxylabs.io |
8000 rotation / 8001+ assigned/static |
Owned ISP IPs, ASN locked |
Residential/Mobile use pr.oxylabs.io:7777 with username session parameters. Datacenter/ISP and Dedicated self-service products use proxy-list ports starting at 8001 for assigned/static IPs and 8000 for automatic rotation.
Environment Variables
Use credentials for the specific proxy product family:
| Product family | Variables | Username prefix |
|---|---|---|
| Residential, Mobile | OXY_RES_USERNAME, OXY_RES_PASSWORD |
customer- |
| Datacenter, ISP, Dedicated Datacenter, Dedicated ISP | OXY_DC_USERNAME, OXY_DC_PASSWORD |
user- for self-service/shared |
Authentication Format
customer-USERNAME:PASSWORD # Residential, Mobile
user-USERNAME:PASSWORD # Shared Datacenter, Shared ISP
Dedicated proxy auth (Self-Service vs Enterprise) is in dedicated-datacenter.md and dedicated-isp.md.
Use separate credentials for Residential/Mobile (OXY_RES_USERNAME, OXY_RES_PASSWORD) and Datacenter/ISP (OXY_DC_USERNAME, OXY_DC_PASSWORD).
With parameters:
customer-USERNAME-cc-US-city-new_york-sessid-abc123:PASSWORD
Quick Start
Residential/Mobile proxy:
curl -x "pr.oxylabs.io:7777" \
-U "customer-$OXY_RES_USERNAME:$OXY_RES_PASSWORD" \
"https://ip.oxylabs.io/location"
Datacenter proxy:
curl -x "dc.oxylabs.io:8000" \
-U "user-$OXY_DC_USERNAME:$OXY_DC_PASSWORD" \
"https://ip.oxylabs.io/location"
ISP proxy:
curl -x "isp.oxylabs.io:8001" \
-U "user-$OXY_DC_USERNAME:$OXY_DC_PASSWORD" \
"https://ip.oxylabs.io/location"
For Datacenter, ISP, Dedicated Datacenter, and Dedicated ISP proxies, use dashboard proxy-list ports starting at 8001 for assigned/static IPs; the first listed IP uses 8001. Switch to port 8000 only when the task calls for automatic rotation.
Protocols (Residential)
| Protocol | Transport | Entry point | Use when |
|---|---|---|---|
| HTTP | TCP | pr.oxylabs.io:7777 | Default. Supported by common libraries and third-party software |
| HTTPS | TCP | https://pr.oxylabs.io:7777| Fully encrypted connection to the proxy | |
| SOCKS5 | TCP and UDP | socks5h://pr.oxylabs.io:7777 | Client requires SOCKS5 |
| HTTP/3 | (MASQUE) UDP (QUIC) | masque.oxylabs.io:50000 | Native HTTP/3, UDP, DNS over UDP, WebRTC/SIP/gaming traffic |
If the task only needs standard HTTP or HTTPS (TCP) requests, use the main endpoint pr.oxylabs.io:7777. MASQUE adds QUIC connection setup overhead and is only worth it when UDP or native HTTP/3 transport is required.
Google is a restricted target over UDP connections (applies to MASQUE and SOCKS5 UDP).
Geo-Targeting Parameters
For Residential/Mobile, append username parameters with hyphens unless noted:
| Parameter | Format | Example |
|---|---|---|
cc |
ISO 3166-1 alpha-2 | -cc-US, -cc-DE, -cc-GB |
city |
English, underscores for spaces | -city-new_york, -city-los_angeles |
st |
US states with us_ prefix |
-st-us_california, -st-us_texas |
postalcode |
5-digit US ZIP, pair with cc-US |
-cc-US-postalcode-90210 |
ASN |
Residential/Mobile carrier ASN | -ASN-21928 |
X-Oxylabs-Geolocation |
Proxy header lat:lon;radius_miles |
49.9235:-97.0811;10 |
ZIP targeting is US-only. Coordinate radius cannot be lower than 10 miles. If both country and ASN are used, country applies.
Example with geo-targeting:
curl -x "pr.oxylabs.io:7777" \
-U "customer-$OXY_RES_USERNAME-cc-US-city-new_york:$OXY_RES_PASSWORD" \
"https://ip.oxylabs.io/location"
For Shared Datacenter/ISP country rotation, use -country-US with user- credentials on the rotation port.
Session Control
| Parameter | Description | Notes |
|---|---|---|
sessid |
Keep the same IP across requests | Standard session is 10 minutes or up to 60s of inactivity |
sessid_oneip |
Bind the session to one exact exit node | Returns 502 if that IP becomes unavailable |
sesstime |
Set session duration in minutes with sessid or sessid_oneip |
Residential backconnect supports up to 1440 minutes; some entry modes cap lower |
Sticky session example:
curl -x "pr.oxylabs.io:7777" \
-U "customer-$OXY_RES_USERNAME-cc-US-sessid-mysession123:$OXY_RES_PASSWORD" \
"https://example.com"
Timed session (5 minutes):
curl -x "pr.oxylabs.io:7777" \
-U "customer-$OXY_RES_USERNAME-sessid-abc123-sesstime-5:$OXY_RES_PASSWORD" \
"https://example.com"
Choosing the Right Proxy Type
| Need | Recommended |
|---|---|
| Highest anonymity | Residential |
| Mobile app content | Mobile |
| Speed & volume | Datacenter |
| Speed + anonymity | ISP |
| Owned dedicated IPs | Dedicated Datacenter or Dedicated ISP |
| Geo-restricted content | Residential/Mobile with cc/city/postalcode, or DC/ISP by country/assigned port where suitable |
Default Behavior
- Without parameters: random IP for each request
- Residential/Mobile share the same endpoint but different IP pools
- Sessions auto-expire and get new IPs
Additional Resources
- Shared proxy details (Residential, Mobile, Datacenter, ISP): proxy-types.md
- Dedicated Datacenter (Self-Service + Enterprise): dedicated-datacenter.md
- Dedicated ISP (Self-Service + Enterprise): dedicated-isp.md
- Code examples (all languages): examples.md
Files (agent-skills)
-
dedicated-datacenter.md 5.8 KB
# Dedicated Datacenter Proxies Dedicated IPs assigned to your account. Access via gateway `ddc.oxylabs.io` (Self-Service) or direct IPs (Enterprise). Distinct from shared rotating pool at `dc.oxylabs.io:8000`. ## Self-Service Purchased via [dashboard](https://dashboard.oxylabs.io/en/). Proxy list: **My Products → Dedicated Datacenter Proxies → Proxy list** (export JSON/CSV). | Field | Value | |-------|-------| | Entry point | `ddc.oxylabs.io` (fixed) | | Auth prefix | `user-` (required, case-sensitive) | | Sticky IP port | `8001` and up — one IP per port | | Rotation port | `8000` — random IP from your list per request | **Port = access method, not the IP itself.** IPs are mapped to ports automatically; port numbers stay stable across IP replacements. ### Sticky IP (specific proxy) ```bash curl -x ddc.oxylabs.io:8001 -U "user-USERNAME:PASSWORD" https://ip.oxylabs.io/location ``` Use port from proxy list for other IPs (8002, 8003, …). ### Rotation (random IP from your pool) ```bash curl -x ddc.oxylabs.io:8000 -U "user-USERNAME:PASSWORD" https://ip.oxylabs.io/location ``` ### Country-filtered rotation Append `-country-XX` to username (ISO 3166-1 alpha-2): ```bash curl -x ddc.oxylabs.io:8000 -U "user-USERNAME-country-US:PASSWORD" https://ip.oxylabs.io/location ``` ### Location targeting No username params needed — use the port assigned to the desired location's IP in your proxy list. ### Protocols | Protocol | Example | |----------|---------| | HTTP | `http://ddc.oxylabs.io:8001` | | HTTPS | `https://ddc.oxylabs.io:8001` | | SOCKS5 (TCP+UDP) | `socks5h://user-USER:PASS@ddc.oxylabs.io:8001` | SOCKS5 may be detected by some sites — prefer HTTP/HTTPS if blocked. ### Python pattern ```python import os, requests user = os.environ["OXY_DC_USERNAME"] pwd = os.environ["OXY_DC_PASSWORD"] port = 8000 # 8001+ for sticky proxies = { "http": f"http://user-{user}:{pwd}@ddc.oxylabs.io:{port}", "https": f"http://user-{user}:{pwd}@ddc.oxylabs.io:{port}", } resp = requests.get("https://ip.oxylabs.io/location", proxies=proxies) ``` ### Whitelisting (dashboard) **Dedicated Datacenter Proxies → Whitelist** — up to 10 IPv4 addresses. Prefer username/password auth on cloud VMs (AWS, etc.). ### Fair usage (concurrent sessions) Per proxy IP per billing cycle: - Under 100 GB usage: 100 concurrent sessions per proxy - Over 100 GB usage: 10 concurrent sessions per proxy (until cycle ends) Exceeding limit → `429 Too Many Requests`. --- ## Enterprise Credentials and proxy list URLs provided by Account Manager. Two access modes: ### Direct IP access | Auth method | Port | Credentials | |-------------|------|-------------| | Username/password | `60000` | Required | | Whitelisted IP | `65432` | None | ```bash # Username/password curl -x 1.2.3.4:60000 -U "USERNAME:PASSWORD" https://ip.oxylabs.io/location # Whitelisted IP curl -x 1.2.3.4:65432 https://ip.oxylabs.io/location ``` ### Proxy list retrieval ```bash # Browser or API — HTTP Basic Auth curl -u "USERNAME:PASSWORD" https://proxy.oxylabs.io/all # With location metadata curl -u "USERNAME:PASSWORD" "https://proxy.oxylabs.io/all?showCountry" curl -u "USERNAME:PASSWORD" "https://proxy.oxylabs.io/all?showCity" ``` **REST API** (same credentials): | Endpoint | Purpose | |----------|---------| | `GET https://api.oxylabs.io/v1/proxies/lists` | List all proxy lists | | `GET https://api.oxylabs.io/v1/proxies/lists/{uuid}` | Get specific list (IP, port, country, city) | ### Proxy Rotator (optional) Single rotating endpoint instead of per-IP connections. Contact Account Manager for domain (e.g. `vm.oxylabs.io`). **Always port `60000`.** ```bash curl -x vm.oxylabs.io:60000 -U "USERNAME:PASSWORD" https://ip.oxylabs.io/location ``` **Sticky session** — add `Proxy-Server: s{N}` header (`s10`, `s2541`, etc.): ```bash curl -x vm.oxylabs.io:60000 -U "USER:PASS" https://ip.oxylabs.io/location \ --proxy-header "Proxy-Server: s10" ``` Python sticky session with rotator: ```python import requests class ProxyAdapter(requests.adapters.HTTPAdapter): def proxy_headers(self, proxy): headers = super().proxy_headers(proxy) headers["Proxy-Server"] = "s10" return headers s = requests.Session() s.proxies = {"https": "http://USER:PASS@vm.oxylabs.io:60000"} s.mount("https://", ProxyAdapter()) s.get("https://ip.oxylabs.io/location") ``` ### Whitelist REST API | Method | Endpoint | Notes | |--------|----------|-------| | `GET` | `https://api.oxylabs.io/v1/whitelisted_ips` | List IPs + ids (`200`) | | `POST` | `https://api.oxylabs.io/v1/whitelisted_ips` | Add one — body `{"address": "x.x.x.x"}` (`201`, `422` invalid) | | `DELETE` | `https://api.oxylabs.io/v1/whitelisted_ips/{id}` | Remove by id (`204`) | | `POST` | `https://api.oxylabs.io/v1/whitelisted_ips/upload_to_servers` | Apply changes to servers (`202`; 5-min cooldown → `429`) | Add/delete changes only take effect after calling `upload_to_servers`. ### Proxy management API OpenAPI spec: https://dc-api-spec.oxylabs.io/ — add/replace subnets, check offline IPs via Subnets endpoint. ### Protocols (Enterprise) Default: HTTP (port 80), HTTPS (port 443). SOCKS5 requires support activation — use `socks5h://IP:1180`. --- ## Response Codes | Code | Meaning | |------|---------| | `400` | Bad request — malformed request | | `403` | Forbidden — restricted target | | `404` | Domain not found / resource unavailable | | `407` | Missing/wrong credentials or IP not whitelisted | | `429` | Concurrent session limit reached | | `500` | Internal server error | | `502` | Invalid upstream response | | `503` | DNS failure to target | | `504` | Gateway timeout (~60s) | ## Restricted Targets Blocked by default (contact support@oxylabs.io to verify before purchase): streaming (Netflix, Spotify), banking (PayPal, Binance), government sites, gaming (Steam), ticketing (Ticketmaster), mail (Outlook, Yahoo). -
dedicated-isp.md 5.7 KB
# Dedicated ISP Proxies ISP-registered dedicated IPs assigned to your account. Access via gateway `disp.oxylabs.io` (Self-Service) or direct IPs (Enterprise). Distinct from ISP Proxies at `isp.oxylabs.io`. Higher trust than datacenter; ASN/ISP chosen at purchase and locked for rotation. ## Self-Service Purchased via [dashboard](https://dashboard.oxylabs.io/en/) — select locations and premium ASNs at checkout. Proxy list: **My Products → Dedicated ISP Proxies → Proxy list** (export JSON/CSV). | Field | Value | |-------|-------| | Entry point | `disp.oxylabs.io` (fixed) | | Auth prefix | `user-` (required, case-sensitive) | | Sticky IP port | `8001` and up — one IP per port | | Rotation port | `8000` — random IP from your list per request | Proxy list fields: entry point, port, country, ISP (ASN), assigned IP. **Port = access method.** IPs map to ports automatically; ports stay stable across IP replacements. ### Sticky IP (specific proxy) ```bash curl -x disp.oxylabs.io:8001 -U "user-USERNAME:PASSWORD" https://ip.oxylabs.io/location ``` Use port from proxy list for other IPs (8002, 8003, …). ### Rotation (random IP from your pool) ```bash curl -x disp.oxylabs.io:8000 -U "user-USERNAME:PASSWORD" https://ip.oxylabs.io/location ``` Rotation only selects IPs within the ASN chosen at setup — it will not switch ISP/ASN. ### Country-filtered rotation ```bash curl -x disp.oxylabs.io:8000 -U "user-USERNAME-country-US:PASSWORD" https://ip.oxylabs.io/location ``` ### Location targeting No username params needed — use the port assigned to the desired location's IP in your proxy list. ### ASN verification GeoIP databases may show original IP owner, not current ISP. For accurate ASN data, check [RIPEstat](https://stat.ripe.net/). ### Protocols | Protocol | Example | |----------|---------| | HTTP | `http://disp.oxylabs.io:8001` | | HTTPS | `https://disp.oxylabs.io:8001` | | SOCKS5 (TCP+UDP) | `socks5h://user-USER:PASS@disp.oxylabs.io:8001` | SOCKS5 may be detected by some sites — prefer HTTP/HTTPS if blocked. ### Python pattern ```python import os, requests user = os.environ["OXY_DC_USERNAME"] pwd = os.environ["OXY_DC_PASSWORD"] port = 8001 # 8000 for rotation proxies = { "http": f"http://user-{user}:{pwd}@disp.oxylabs.io:{port}", "https": f"http://user-{user}:{pwd}@disp.oxylabs.io:{port}", } resp = requests.get("https://ip.oxylabs.io/location", proxies=proxies) ``` ### Whitelisting (dashboard) **Dedicated ISP Proxies → Whitelist** — up to 10 IPv4 addresses. Prefer username/password auth on cloud VMs. ### Fair usage (concurrent sessions) Per proxy IP per billing cycle: - Under 100 GB usage: 100 concurrent sessions per proxy - Over 100 GB usage: 10 concurrent sessions per proxy (until cycle ends) Exceeding limit → `429 Too Many Requests`. --- ## Enterprise Same architecture as Dedicated Datacenter Enterprise. Credentials and proxy list URLs from Account Manager. ### Direct IP access | Auth method | Port | Credentials | |-------------|------|-------------| | Username/password | `60000` | Required | | Whitelisted IP | `65432` | None | ```bash curl -x 1.2.3.4:60000 -U "USERNAME:PASSWORD" https://ip.oxylabs.io/location curl -x 1.2.3.4:65432 https://ip.oxylabs.io/location # whitelisted ``` ### Proxy list retrieval ```bash curl -u "USERNAME:PASSWORD" https://proxy.oxylabs.io/all ``` **REST API:** | Endpoint | Purpose | |----------|---------| | `GET https://api.oxylabs.io/v1/proxies/lists` | List all proxy lists | | `GET https://api.oxylabs.io/v1/proxies/lists/{uuid}` | Get specific list | ### Proxy Rotator (optional) Contact Account Manager for domain. **Always port `60000`.** Rotation stays within selected ASNs. ```bash curl -x vm.oxylabs.io:60000 -U "USERNAME:PASSWORD" https://ip.oxylabs.io/location ``` **Sticky session** — `Proxy-Server: s{N}` header: ```bash curl -x vm.oxylabs.io:60000 -U "USER:PASS" https://ip.oxylabs.io/location \ --proxy-header "Proxy-Server: s10" ``` ### Whitelist REST API | Method | Endpoint | Notes | |--------|----------|-------| | `GET` | `https://api.oxylabs.io/v1/whitelisted_ips` | List IPs + ids (`200`) | | `POST` | `https://api.oxylabs.io/v1/whitelisted_ips` | Add one — body `{"address": "x.x.x.x"}` (`201`, `422` invalid) | | `DELETE` | `https://api.oxylabs.io/v1/whitelisted_ips/{id}` | Remove by id (`204`) | | `POST` | `https://api.oxylabs.io/v1/whitelisted_ips/upload_to_servers` | Apply changes to servers (`202`; 5-min cooldown → `429`) | Add/delete changes only take effect after calling `upload_to_servers`. ### Proxy management API OpenAPI spec: https://dc-api-spec.oxylabs.io/ — add/replace subnets, check offline IPs. ### Protocols (Enterprise) Default: HTTP (80), HTTPS (443). SOCKS5 requires support activation. --- ## Response Codes | Code | Meaning | |------|---------| | `400` | Bad request — malformed request | | `403` | Forbidden — restricted target | | `404` | Domain not found / resource unavailable | | `407` | Missing/wrong credentials or IP not whitelisted | | `429` | Concurrent session limit reached | | `500` | Internal server error | | `502` | Invalid upstream response | | `503` | DNS failure to target | | `504` | Gateway timeout (~60s) | ## Restricted Targets Blocked by default (contact support@oxylabs.io): streaming, banking, government, gaming, ticketing, mail. Same categories as Dedicated Datacenter. ## Dedicated ISP vs Dedicated Datacenter | | Dedicated Datacenter | Dedicated ISP | |--|---------------------|---------------| | Entry point | `ddc.oxylabs.io` | `disp.oxylabs.io` | | IP type | Datacenter | ISP-registered | | Trust/anonymity | Lower | Higher | | ASN control | N/A | Chosen at purchase, locked | | Best for | High-volume, speed | E-commerce, account mgmt, brand protection | -
examples.md 8.3 KB
# Proxy Code Examples Residential/Mobile examples use `OXY_RES_USERNAME`, `OXY_RES_PASSWORD`. Datacenter, ISP, and dedicated examples use `OXY_DC_USERNAME`, `OXY_DC_PASSWORD`. ## Dedicated Datacenter (Self-Service) **Sticky IP (port 8001):** ```bash curl -x ddc.oxylabs.io:8001 -U "user-$OXY_DC_USERNAME:$OXY_DC_PASSWORD" \ https://ip.oxylabs.io/location ``` **Rotation (port 8000) with country filter:** ```bash curl -x ddc.oxylabs.io:8000 \ -U "user-$OXY_DC_USERNAME-country-US:$OXY_DC_PASSWORD" \ https://ip.oxylabs.io/location ``` ```python import os, requests user, pwd = os.environ["OXY_DC_USERNAME"], os.environ["OXY_DC_PASSWORD"] port = 8000 # 8001+ for sticky IP from proxy list proxies = { "http": f"http://user-{user}:{pwd}@ddc.oxylabs.io:{port}", "https": f"http://user-{user}:{pwd}@ddc.oxylabs.io:{port}", } print(requests.get("https://ip.oxylabs.io/location", proxies=proxies).json()) ``` ## Dedicated ISP (Self-Service) **Sticky IP (port 8001):** ```bash curl -x disp.oxylabs.io:8001 -U "user-$OXY_DC_USERNAME:$OXY_DC_PASSWORD" \ https://ip.oxylabs.io/location ``` **Rotation (port 8000):** ```bash curl -x disp.oxylabs.io:8000 -U "user-$OXY_DC_USERNAME:$OXY_DC_PASSWORD" \ https://ip.oxylabs.io/location ``` ```python import os, requests user, pwd = os.environ["OXY_DC_USERNAME"], os.environ["OXY_DC_PASSWORD"] proxies = { "http": f"http://user-{user}:{pwd}@disp.oxylabs.io:8001", "https": f"http://user-{user}:{pwd}@disp.oxylabs.io:8001", } print(requests.get("https://ip.oxylabs.io/location", proxies=proxies).json()) ``` ## Dedicated Enterprise (Direct IP) ```bash # Username/password on port 60000 curl -x 1.2.3.4:60000 -U "$OXY_DC_USERNAME:$OXY_DC_PASSWORD" \ https://ip.oxylabs.io/location # Whitelisted IP on port 65432 (no credentials) curl -x 1.2.3.4:65432 https://ip.oxylabs.io/location ``` **Proxy Rotator with sticky session:** ```python import os, requests user = os.environ["OXY_DC_USERNAME"] pwd = os.environ["OXY_DC_PASSWORD"] class ProxyAdapter(requests.adapters.HTTPAdapter): def proxy_headers(self, proxy): headers = super().proxy_headers(proxy) headers["Proxy-Server"] = "s10" # sticky to proxy #10 return headers s = requests.Session() s.proxies = {"https": f"http://{user}:{pwd}@vm.oxylabs.io:60000"} s.mount("https://", ProxyAdapter()) print(s.get("https://ip.oxylabs.io/location").text) ``` ## cURL **Residential proxy:** ```bash curl -x "pr.oxylabs.io:7777" \ -U "customer-$OXY_RES_USERNAME:$OXY_RES_PASSWORD" \ "https://ip.oxylabs.io/location" ``` **With geo-targeting:** ```bash curl -x "pr.oxylabs.io:7777" \ -U "customer-$OXY_RES_USERNAME-cc-US-city-los_angeles:$OXY_RES_PASSWORD" \ "https://ip.oxylabs.io/location" ``` **With sticky session:** ```bash curl -x "pr.oxylabs.io:7777" \ -U "customer-$OXY_RES_USERNAME-cc-DE-sessid-session123:$OXY_RES_PASSWORD" \ "https://example.com" ``` **Datacenter proxy:** ```bash curl -x "dc.oxylabs.io:8000" \ -U "user-$OXY_DC_USERNAME:$OXY_DC_PASSWORD" \ "https://ip.oxylabs.io/location" ``` **ISP proxy:** ```bash curl -x "isp.oxylabs.io:8001" \ -U "user-$OXY_DC_USERNAME:$OXY_DC_PASSWORD" \ "https://ip.oxylabs.io/location" ``` ## Python **Residential proxy:** ```python import requests import os username = os.environ["OXY_RES_USERNAME"] password = os.environ["OXY_RES_PASSWORD"] proxies = { "http": f"http://customer-{username}:{password}@pr.oxylabs.io:7777", "https": f"http://customer-{username}:{password}@pr.oxylabs.io:7777", } response = requests.get("https://ip.oxylabs.io/location", proxies=proxies) print(response.json()) ``` **With geo-targeting and session:** ```python import requests import os username = os.environ["OXY_RES_USERNAME"] password = os.environ["OXY_RES_PASSWORD"] # US, New York, sticky session proxy_user = f"customer-{username}-cc-US-city-new_york-sessid-abc123" proxies = { "http": f"http://{proxy_user}:{password}@pr.oxylabs.io:7777", "https": f"http://{proxy_user}:{password}@pr.oxylabs.io:7777" } response = requests.get("https://example.com", proxies=proxies) print(response.text) ``` **Datacenter proxy:** ```python import requests import os username = os.environ["OXY_DC_USERNAME"] password = os.environ["OXY_DC_PASSWORD"] proxies = { "http": f"http://user-{username}:{password}@dc.oxylabs.io:8000", "https": f"http://user-{username}:{password}@dc.oxylabs.io:8000" } response = requests.get("https://ip.oxylabs.io/location", proxies=proxies) print(response.json()) ``` ## Node.js **Residential proxy:** ```javascript const axios = require("axios"); const username = process.env.OXY_RES_USERNAME; const password = process.env.OXY_RES_PASSWORD; const proxy = { host: "pr.oxylabs.io", port: 7777, auth: { username: `customer-${username}`, password: password } }; axios.get("https://ip.oxylabs.io/location", { proxy }) .then(response => console.log(response.data)) .catch(error => console.error(error)); ``` **With geo-targeting:** ```javascript const axios = require("axios"); const username = process.env.OXY_RES_USERNAME; const password = process.env.OXY_RES_PASSWORD; const proxy = { host: "pr.oxylabs.io", port: 7777, auth: { username: `customer-${username}-cc-GB-city-london`, password: password } }; axios.get("https://example.com", { proxy }) .then(response => console.log(response.data)); ``` ## PHP **Residential proxy:** ```php <?php $username = getenv('OXY_RES_USERNAME'); $password = getenv('OXY_RES_PASSWORD'); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://ip.oxylabs.io/location"); curl_setopt($ch, CURLOPT_PROXY, "http://pr.oxylabs.io:7777"); curl_setopt($ch, CURLOPT_PROXYUSERPWD, "customer-$username:$password"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); echo $response; ?> ``` **With geo-targeting:** ```php <?php $username = getenv('OXY_RES_USERNAME'); $password = getenv('OXY_RES_PASSWORD'); $proxyUser = "customer-$username-cc-US-city-chicago-sessid-mysession"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://example.com"); curl_setopt($ch, CURLOPT_PROXY, "http://pr.oxylabs.io:7777"); curl_setopt($ch, CURLOPT_PROXYUSERPWD, "$proxyUser:$password"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); echo $response; ?> ``` ## Go ```go package main import ( "fmt" "io" "net/http" "net/url" "os" ) func main() { username := os.Getenv("OXY_RES_USERNAME") password := os.Getenv("OXY_RES_PASSWORD") proxyURL, _ := url.Parse(fmt.Sprintf( "http://customer-%s:%s@pr.oxylabs.io:7777", username, password, )) client := &http.Client{ Transport: &http.Transport{Proxy: http.ProxyURL(proxyURL)}, } resp, _ := client.Get("https://ip.oxylabs.io/location") defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) fmt.Println(string(body)) } ``` ## Java ```java import java.net.*; import java.io.*; public class OxylabsProxy { public static void main(String[] args) throws Exception { String username = System.getenv("OXY_RES_USERNAME"); String password = System.getenv("OXY_RES_PASSWORD"); Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("pr.oxylabs.io", 7777)); Authenticator.setDefault(new Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication( "customer-" + username, password.toCharArray() ); } }); URL url = new URL("https://ip.oxylabs.io/location"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(proxy); BufferedReader reader = new BufferedReader( new InputStreamReader(conn.getInputStream())); String line; while ((line = reader.readLine()) != null) { System.out.println(line); } reader.close(); } } ``` ## Ruby ```ruby require 'net/http' require 'uri' username = ENV['OXY_RES_USERNAME'] password = ENV['OXY_RES_PASSWORD'] proxy_host = 'pr.oxylabs.io' proxy_port = 7777 proxy_user = "customer-#{username}" uri = URI.parse('https://ip.oxylabs.io/location') Net::HTTP.start(uri.host, uri.port, proxy_host, proxy_port, proxy_user, password, use_ssl: true) do |http| request = Net::HTTP::Get.new(uri) response = http.request(request) puts response.body end ``` -
proxy-types.md 5.4 KB
# Proxy Types Reference Each section lists endpoint, auth prefix, supported parameters, and best-fit use cases. Parameters append to username with hyphens: `customer-USER-cc-US-sessid-abc123:PASS`. --- ## Residential Proxies Real IPs from ISPs attached to physical locations worldwide. | Property | Value | |----------|-------| | Host | `pr.oxylabs.io` | | Port | `7777` | | Auth prefix | `customer-` | | Locations | 140+ countries | **Best for:** geo-restricted content, anti-bot evasion, social media automation, ad verification. ### Location parameters | Param | Format | Example | |-------|--------|---------| | `cc` | ISO 3166-1 alpha-2 country | `-cc-US`, `-cc-DE` | | `cn` | Continent code: `AF`, `AN`, `AS`, `EU`, `NA`, `OC`, `SA` | `-cn-EU` | | `city` | Lowercase English, `_` for spaces | `-city-new_york`, `-city-los_angeles` | | `st` | US state with `us_` prefix | `-st-us_california` | | `postalcode` | US only, 5 digits, pair with `cc-US` | `-cc-US-postalcode-90210` | | `ASN` | AS number, pair with `sessid`, KYC-gated, mutex with `cc` | `-ASN-21928-sessid-abc123` | **Coordinates** use a request header instead of username: ``` X-Oxylabs-Geolocation: LAT:LON;RADIUS_MI ``` Minimum radius 10 mi. 502 if no IP in range. **Country entry nodes:** `{cc}-pr.oxylabs.io:{port}` (e.g. `tr-pr.oxylabs.io:30000`). EU: `eu-pr.oxylabs.io:10000`. SOCKS5 has no country entry nodes — use `-cc-XX` in username. ### Session control | Param | Behavior | Duration | |-------|----------|----------| | `sessid` | Sticky IP via random alphanumeric. Rotates if node drops. | 10 min default, ends after 60s inactivity | | `sesstime` | Extends `sessid` window. | 5–1440 min (24 h) | | `sessid_oneip` | Strict IP-bound. No rotation: 502 if node drops. Combinable with `sesstime`. | Until node unavailable | ### Advanced filters (KYC / AM-gated) | Param | Values | Example | |-------|--------|---------| | `ipversion` | `4`, `6` | `-ipversion-6` | | `platform` | `windows`, `macos`, `linux`, `android`, `ios` | `-platform-windows` | ### Protocols | Protocol | Host | Port | Notes | |----------|------|------|-------| | HTTP | `pr.oxylabs.io` | 80 | Standard | | HTTPS | `pr.oxylabs.io` | 443 | Encrypted | | SOCKS5 | `pr.oxylabs.io` | 7777 | TCP. `socks5h://`. Firefox only (Chrome unsupported). | | HTTP/3 (SOCKS5+UDP) | `socks.pr.oxylabs.io` | 7777 | Beta. AM must enable. UDP firewall required. | Non-listed ports require compliance verification. ### Restricted targets Blocked categories (some unblockable via KYC + AM). Non-exhaustive — confirm with support before purchase: - Entertainment/streaming (Netflix, Spotify, Twitch, Disney) - Banking/finance (PayPal, BofA, Binance) - Government (usa.gov, canada.ca) - Gaming (Playstation, Steam) - Ticketing (Ticketmaster, Eventbrite) - Mail (Outlook, Yahoo Mail) - Ad platforms (Google Tag Manager, Doubleclick) - IP-check sites (ipinfo.info, iplocation.net) --- ## Mobile Proxies Real IPs from mobile carriers (3G/4G/5G). | Property | Value | |----------|-------| | Host | `pr.oxylabs.io` | | Port | `7777` | | Auth prefix | `customer-` | | Networks | 3G, 4G, 5G | **Best for:** mobile app testing, mobile-only content, highest trust requirements, social platforms. Shares the residential endpoint but a separate IP pool. Carrier/ASN targeting available (KYC). Natural mobile fingerprint. --- ## Datacenter Proxies High-speed datacenter proxies with rotating and proxy-list access. | Property | Value | |----------|-------| | Host | `dc.oxylabs.io` | | Rotation port | `8000` | | Assigned/static ports | `8001` and up | | Auth prefix | `user-` | **Best for:** high-volume scraping, cost-sensitive jobs, non-protected targets. --- ## Dedicated Datacenter Proxies Dedicated datacenter IPs assigned to your account. Not the same as shared `dc.oxylabs.io`. | Property | Self-Service | Enterprise | |----------|-------------|------------| | Gateway | `ddc.oxylabs.io` | Direct IP or Proxy Rotator | | Auth prefix | `user-` | Username/password (no prefix) | | Sticky port | `8001+` (per proxy list) | `60000` (per IP) | | Rotation port | `8000` | Proxy Rotator on `60000` | | Whitelist port | Dashboard only | `65432` | Full reference: [dedicated-datacenter.md](dedicated-datacenter.md) --- ## ISP Proxies ISP-registered proxies with rotating and proxy-list access. | Property | Value | |----------|-------| | Host | `isp.oxylabs.io` | | Rotation port | `8000` | | Assigned/static ports | `8001` and up | | Auth prefix | `user-` | **Best for:** e-commerce, SEO monitoring, brand protection where shared rotation is acceptable. --- ## Dedicated ISP Proxies Dedicated ISP-registered IPs with ASN chosen at purchase. | Property | Self-Service | Enterprise | |----------|-------------|------------| | Gateway | `disp.oxylabs.io` | Direct IP or Proxy Rotator | | Auth prefix | `user-` | Username/password (no prefix) | | Sticky port | `8001+` (per proxy list) | `60000` (per IP) | | Rotation port | `8000` (locked to chosen ASN) | Proxy Rotator on `60000` | | Whitelist port | Dashboard only | `65432` | Full reference: [dedicated-isp.md](dedicated-isp.md) --- ## Comparison Matrix | Feature | Residential | Mobile | Datacenter | ISP | |---------|-------------|--------|------------|-----| | Speed | Medium | Medium | Fastest | Fast | | Anonymity | Highest | Highest | Low | High | | Trust Score | High | Highest | Low | High | | Cost | Higher | Highest | Lowest | Medium | | Best Volume | Medium | Low | Highest | High | | Geo-targeting | Extensive | Country/ASN | Limited | Limited | -
SKILL.md 6.4 KB
--- name: proxies description: >- Oxylabs proxy networks: Residential, Mobile, shared Datacenter/ISP, and Dedicated Datacenter/ISP proxies with geo-targeting, IP rotation, session persistence, and port-based sticky IPs. Use when routing traffic through proxies, building scrapers with proxy auth, rotating or sticky sessions, whitelisting IPs, or accessing geo-restricted content. --- # Oxylabs Proxies ## Proxy Types Overview | Type | Host | Port | Best For | |------|------|------|----------| | Residential | `pr.oxylabs.io` | `7777` | High anonymity, geo-targeting | | Mobile | `pr.oxylabs.io` | `7777` | Mobile-specific content, highest trust | | Datacenter (shared) | `dc.oxylabs.io` | `8000` rotation / `8001+` assigned/static | Speed, high volume | | ISP (shared) | `isp.oxylabs.io` | `8000` rotation / `8001+` assigned/static | Speed + anonymity balance | | Dedicated Datacenter | `ddc.oxylabs.io` | `8000` rotation / `8001+` assigned/static | Owned IPs, port-based access | | Dedicated ISP | `disp.oxylabs.io` | `8000` rotation / `8001+` assigned/static | Owned ISP IPs, ASN locked | Residential/Mobile use `pr.oxylabs.io:7777` with username session parameters. Datacenter/ISP and Dedicated self-service products use proxy-list ports starting at `8001` for assigned/static IPs and `8000` for automatic rotation. ## Environment Variables Use credentials for the specific proxy product family: | Product family | Variables | Username prefix | |----------------|-----------|-----------------| | Residential, Mobile | `OXY_RES_USERNAME`, `OXY_RES_PASSWORD` | `customer-` | | Datacenter, ISP, Dedicated Datacenter, Dedicated ISP | `OXY_DC_USERNAME`, `OXY_DC_PASSWORD` | `user-` for self-service/shared | ## Authentication Format ``` customer-USERNAME:PASSWORD # Residential, Mobile user-USERNAME:PASSWORD # Shared Datacenter, Shared ISP ``` Dedicated proxy auth (Self-Service vs Enterprise) is in [dedicated-datacenter.md](dedicated-datacenter.md) and [dedicated-isp.md](dedicated-isp.md). Use separate credentials for Residential/Mobile (`OXY_RES_USERNAME`, `OXY_RES_PASSWORD`) and Datacenter/ISP (`OXY_DC_USERNAME`, `OXY_DC_PASSWORD`). With parameters: ``` customer-USERNAME-cc-US-city-new_york-sessid-abc123:PASSWORD ``` ## Quick Start **Residential/Mobile proxy:** ```bash curl -x "pr.oxylabs.io:7777" \ -U "customer-$OXY_RES_USERNAME:$OXY_RES_PASSWORD" \ "https://ip.oxylabs.io/location" ``` **Datacenter proxy:** ```bash curl -x "dc.oxylabs.io:8000" \ -U "user-$OXY_DC_USERNAME:$OXY_DC_PASSWORD" \ "https://ip.oxylabs.io/location" ``` **ISP proxy:** ```bash curl -x "isp.oxylabs.io:8001" \ -U "user-$OXY_DC_USERNAME:$OXY_DC_PASSWORD" \ "https://ip.oxylabs.io/location" ``` For Datacenter, ISP, Dedicated Datacenter, and Dedicated ISP proxies, use dashboard proxy-list ports starting at `8001` for assigned/static IPs; the first listed IP uses `8001`. Switch to port `8000` only when the task calls for automatic rotation. ## Protocols (Residential) | Protocol| Transport| Entry point| Use when| |---------|----------|-----------|----------| |HTTP| TCP| pr.oxylabs.io:7777| Default. Supported by common libraries and third-party software| |HTTPS| TCP| https://pr.oxylabs.io:7777| Fully encrypted connection to the proxy| |SOCKS5| TCP and UDP| socks5h://pr.oxylabs.io:7777| Client requires SOCKS5| |HTTP/3| (MASQUE) UDP (QUIC)| masque.oxylabs.io:50000| Native HTTP/3, UDP, DNS over UDP, WebRTC/SIP/gaming traffic| If the task only needs standard HTTP or HTTPS (TCP) requests, use the main endpoint pr.oxylabs.io:7777. MASQUE adds QUIC connection setup overhead and is only worth it when UDP or native HTTP/3 transport is required. Google is a restricted target over UDP connections (applies to MASQUE and SOCKS5 UDP). ## Geo-Targeting Parameters For Residential/Mobile, append username parameters with hyphens unless noted: | Parameter | Format | Example | |-----------|--------|---------| | `cc` | ISO 3166-1 alpha-2 | `-cc-US`, `-cc-DE`, `-cc-GB` | | `city` | English, underscores for spaces | `-city-new_york`, `-city-los_angeles` | | `st` | US states with `us_` prefix | `-st-us_california`, `-st-us_texas` | | `postalcode` | 5-digit US ZIP, pair with `cc-US` | `-cc-US-postalcode-90210` | | `ASN` | Residential/Mobile carrier ASN | `-ASN-21928` | | `X-Oxylabs-Geolocation` | Proxy header `lat:lon;radius_miles` | `49.9235:-97.0811;10` | ZIP targeting is US-only. Coordinate radius cannot be lower than 10 miles. If both country and ASN are used, country applies. **Example with geo-targeting:** ```bash curl -x "pr.oxylabs.io:7777" \ -U "customer-$OXY_RES_USERNAME-cc-US-city-new_york:$OXY_RES_PASSWORD" \ "https://ip.oxylabs.io/location" ``` For Shared Datacenter/ISP country rotation, use `-country-US` with `user-` credentials on the rotation port. ## Session Control | Parameter | Description | Notes | |-----------|-------------|-------| | `sessid` | Keep the same IP across requests | Standard session is 10 minutes or up to 60s of inactivity | | `sessid_oneip` | Bind the session to one exact exit node | Returns `502` if that IP becomes unavailable | | `sesstime` | Set session duration in minutes with `sessid` or `sessid_oneip` | Residential backconnect supports up to 1440 minutes; some entry modes cap lower | **Sticky session example:** ```bash curl -x "pr.oxylabs.io:7777" \ -U "customer-$OXY_RES_USERNAME-cc-US-sessid-mysession123:$OXY_RES_PASSWORD" \ "https://example.com" ``` **Timed session (5 minutes):** ```bash curl -x "pr.oxylabs.io:7777" \ -U "customer-$OXY_RES_USERNAME-sessid-abc123-sesstime-5:$OXY_RES_PASSWORD" \ "https://example.com" ``` ## Choosing the Right Proxy Type | Need | Recommended | |------|-------------| | Highest anonymity | Residential | | Mobile app content | Mobile | | Speed & volume | Datacenter | | Speed + anonymity | ISP | | Owned dedicated IPs | Dedicated Datacenter or Dedicated ISP | | Geo-restricted content | Residential/Mobile with `cc`/`city`/`postalcode`, or DC/ISP by country/assigned port where suitable | ## Default Behavior - Without parameters: random IP for each request - Residential/Mobile share the same endpoint but different IP pools - Sessions auto-expire and get new IPs ## Additional Resources - Shared proxy details (Residential, Mobile, Datacenter, ISP): [proxy-types.md](proxy-types.md) - Dedicated Datacenter (Self-Service + Enterprise): [dedicated-datacenter.md](dedicated-datacenter.md) - Dedicated ISP (Self-Service + Enterprise): [dedicated-isp.md](dedicated-isp.md) - Code examples (all languages): [examples.md](examples.md)
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.