SOCKS5 Proxy: The Complete Guide

SOCKS5 carries arbitrary TCP and UDP traffic, supports username and password authentication, and can resolve DNS at the exit node. This guide covers how it works, where it fits, and how to buy and use authenticated access without a dashboard.

What SOCKS5 does

SOCKS5 operates at the session layer. Your client opens a connection to the proxy, names the destination, and the proxy forwards bytes. Unlike an HTTP proxy, it does not parse or rewrite HTTP headers, and it does not terminate TLS. That is why it works for anything that speaks TCP or UDP, from browsers to trading bots.

The protocol supports username and password authentication. Paid proxy networks use those credentials to scope access to a session, a country, or a traffic allowance. SOCKS5 does not encrypt the payload; use HTTPS or TLS inside the tunnel when the data needs encryption.

SOCKS5 vs HTTP proxies and VPNs

SOCKS5HTTP proxyVPN
TrafficTCP and UDPHTTP and HTTPSIP tunnel
AuthenticationUsername and passwordHTTP authVaries by provider
DNSLocal, or at the exit with socks5hUsually localInside the tunnel
Header rewritingNoneCan add or modify headersNone
Best forScrapers, bots, arbitrary TCPSimple HTTP requestsWhole-device privacy
Browser supportUnauthenticated only in ChromiumBroadNative

socks5 or socks5h?

The prefix changes where DNS resolution happens. With socks5://, your client resolves the hostname locally and sends the resulting IP to the proxy. With socks5h://, the proxy resolves the hostname at the exit node.

Use socks5h for scraping and trading. With plain socks5, your local resolver still sees every lookup, and the resolver location can contradict the connection origin. Detection systems look for that mismatch.

Authenticated SOCKS5 in browsers

Chromium does not implement SOCKS5 username and password authentication. If you put an authenticated SOCKS5 URL into Chrome, Playwright, or Puppeteer, the browser will not send the credentials. Run a local HTTP-to-SOCKS5 bridge that holds the upstream credentials, then point the browser at the local HTTP proxy. The Playwright proxy guide covers the bridge and the per-context rotation pattern.

Sticky sessions and rotation

Use a sticky session for anything authenticated: a trading bot, a logged-in scraper, a checkout flow. Choose rotation for unauthenticated collection where each request can come from a new IP. Changing the IP between a price fetch and an order submission looks like account takeover. The rotating proxy guide covers the mechanics.

Country is a session parameter. Open a session for the country the target expects; do not encode the country into the SOCKS5 username.

Buy SOCKS5 access by the GB

ProxyBase sells access across 45 countries by the gigabyte. Pricing is per GB, KYC is not required, and credentials are provisioned through the API, CLI, or MCP server. Payment is in crypto.

NetworkCatalog rangeUse it for
Residential$2-$4 / GBSites with bot management; the default for scraping
Mobile$3.30-$6.70 / GBEndpoints that reject residential ranges
ISP$1.30-$2.70 / GBSpeed with moderate trust
Datacenter$0.70-$1.30 / GBPublic APIs and low-protection pages

Ranges as of November 2026. Prices vary by country and supply. The markets page shows the live catalog.

Open a session and connect

Open a country-matched session first, then use the returned session id and your token in the SOCKS5 URL. The v2 buyer gateway is api.proxybase.xyz:1082.

# 1. Open a sticky session
POST https://api.proxybase.xyz/v2/sessions
{ "country": "US", "network_type": "residential", "session_type": "sticky" }

# 2. Connect with socks5h so DNS resolves at the exit
socks5h://SESSION_ID:TOKEN@api.proxybase.xyz:1082

Python with requests:

import requests SESSION_ID = "your_session_id" TOKEN = "sk_your_session_token" PROXY = f"socks5h://{SESSION_ID}:{TOKEN}@api.proxybase.xyz:1082" proxies = {"http": PROXY, "https": PROXY} r = requests.get( "https://api.ipify.org?format=json", proxies=proxies, timeout=20, ) print(r.json())

curl:

curl --socks5-hostname api.proxybase.xyz:1082 \ -U "$SESSION_ID:$TOKEN" \ https://api.ipify.org?format=json

Both examples use socks5h (curl calls it --socks5-hostname). If the exit country is wrong, close the session and open a new one before sending production traffic.

Where SOCKS5 fits

  • Web scraping: residential exits for sites that reject datacenter IPs. See the scraping proxy guide.
  • AI agents: an API-first identity layer that an agent can provision without a dashboard. See the AI agent proxy docs.
  • Prediction markets: country-matched sessions for Kalshi and Polymarket bots. See the prediction market setup.
  • Country access: per-country pricing and use cases, such as the Japan proxy page.

Common errors

A SOCKS5 connection refused usually means the wrong port or bad credentials. A timeout points to a session that is down or out of bandwidth. HTTP 407 is an HTTP proxy error, not SOCKS5. The proxy error guide has the full checklist.

Frequently asked questions

Is SOCKS5 encrypted?

No. SOCKS5 moves bytes between your client and the exit node; it does not encrypt them. Use HTTPS or TLS for the payload. The proxy changes the network origin, not the transport security.

SOCKS5 or HTTP: which is better for scraping?

SOCKS5 handles arbitrary TCP and UDP traffic and long-lived connections without rewriting headers. HTTP proxies are useful when you need HTTP-level caching or header control. Most paid scraping setups use SOCKS5 with application-level routing.

What is socks5h?

The h means the proxy resolves the hostname at the exit node. With plain socks5, your client resolves the hostname locally and sends the IP to the proxy. Use socks5h so DNS resolution and connection origin stay consistent.

Can Chrome use an authenticated SOCKS5 proxy?

Chromium does not send SOCKS5 username and password credentials. Run a local HTTP-to-SOCKS5 bridge that holds the upstream credentials, then point Chrome or Playwright at the bridge. The Playwright proxy guide covers the setup.

How much does a SOCKS5 proxy cost?

ProxyBase catalog ranges are $0.70-$1.30/GB for datacenter, $1.30-$2.70/GB for ISP, $2-$4/GB for residential, and $3.30-$6.70/GB for mobile. Prices vary by country and supply.

Do SOCKS5 proxies rotate IPs?

Yes. Open a rotating session for unauthenticated collection, or a sticky session for authenticated flows such as trading bots and logged-in scrapers. Rotating an authenticated session mid-flow looks like account takeover.

Do I need KYC to buy a SOCKS5 proxy?

No. ProxyBase is wallet-based and KYC-free. You pay per GB in crypto and receive credentials through the API, CLI, or MCP server.

Is using a SOCKS5 proxy legal?

Using a proxy is legal in most jurisdictions. What matters is what you do with it and the target site's terms. Use it for legitimate access, respect rate limits and contracts, and do not use it for fraud or to evade lawful restrictions.

SOCKS5 access in 45 countries

Residential, mobile, ISP, and datacenter exits by the GB. No KYC, crypto accepted, credentials through the API.

Browse SOCKS5 PricingNo KYC Details