SOCKS5 Integration

Comprehensive guide for SOCKS5 proxy configuration and usage

Documentation

SOCKS5 Protocol Overview

SOCKS5 is an internet protocol that routes network packets between a client and server through a proxy server. It operates at Layer 5 of the OSI model and supports various authentication methods and address types.

Authentication

Username/password authentication with support for no-auth and GSSAPI

Address Types

Supports IPv4, IPv6, and domain name addressing

Protocol Support

TCP and UDP support with IPv4 and IPv6 compatibility

Basic Configuration

Connection Details

Server Address
proxy.enterpriseproxynetwork.com
Port
1080
Protocol
SOCKS5
Authentication
Username/Password

Username Format

The username follows a specific format that includes country, session type, and customer ID:

country-sessiontype-customerid
Country Code
Two-letter country code (e.g., us, gb, de)
Session Type
socks5, http, https, or websocket
Customer ID
Your customer ID (e.g., cust_123)
Example:
us-socks5-cust_123

Password

Use your API key as the password for SOCKS5 authentication:

sk_live_1234567890abcdef

Replace with your actual API key from the dashboard

Client Configuration Examples

cURL

curl -x socks5h://us-socks5-cust_123:sk_live_123456@proxy.enterpriseproxynetwork.com:1080 \ https://api.ipify.org?format=json

Python (requests)

import requests proxies = { 'http': 'socks5://us-socks5-cust_123:sk_live_123456@proxy.enterpriseproxynetwork.com:1080', 'https': 'socks5://us-socks5-cust_123:sk_live_123456@proxy.enterpriseproxynetwork.com:1080' } response = requests.get('https://example.com', proxies=proxies)

Node.js

const { SocksProxyAgent } = require('socks-proxy-agent'); const proxy = 'socks5://us-socks5-cust_123:sk_live_123456@proxy.enterpriseproxynetwork.com:1080'; const agent = new SocksProxyAgent(proxy); fetch('https://example.com', { agent }) .then(res => res.text()) .then(console.log);

System-Wide Proxy (Linux/macOS)

# Set environment variables export ALL_PROXY="socks5://us-socks5-cust_123:sk_live_123456@proxy.enterpriseproxynetwork.com:1080" export HTTP_PROXY="socks5://us-socks5-cust_123:sk_live_123456@proxy.enterpriseproxynetwork.com:1080" export HTTPS_PROXY="socks5://us-socks5-cust_123:sk_live_123456@proxy.enterpriseproxynetwork.com:1080" # Test connection curl https://api.ipify.org

Advanced Features

Country Selection

Specify the country for your proxy connection by changing the country code in the username:

United States
us-socks5-cust_123
United Kingdom
gb-socks5-cust_123
Germany
de-socks5-cust_123
Japan
jp-socks5-cust_123

Session Persistence

For applications requiring persistent connections, you can enable session stickiness:

# Add session ID for persistence us-socks5-cust_123-session_abc # This ensures subsequent connections use the same proxy node # for consistent IP address and connection characteristics

UDP Support

SOCKS5 supports UDP for applications like VoIP, gaming, and DNS queries:

# UDP is supported on the same port (1080) # Most SOCKS5 clients will automatically handle UDP encapsulation # Check your client documentation for UDP-specific configuration

Troubleshooting

Connection Timeouts

  • • Verify username/password format is correct
  • • Check that your API key is active and not expired
  • • Ensure port 1080 is not blocked by firewall
  • • Try different country codes if specific regions are unavailable

Authentication Failures

  • • Double-check username format: country-sessiontype-customerid
  • • Ensure API key is correctly copied (no extra spaces)
  • • Verify customer ID matches your account
  • • Check account status in dashboard

Performance Issues

  • • Try different country codes for better latency
  • • Use session persistence for consistent performance
  • • Enable compression in your client if supported
  • • Monitor bandwidth usage to avoid quota limits

Testing Your Connection

# Test SOCKS5 connection with cURL curl -x socks5h://us-socks5-cust_123:sk_live_123456@proxy.enterpriseproxynetwork.com:1080 \ https://api.ipify.org?format=json # Should return your proxy IP address {"ip":"192.168.1.100"}

Was this helpful?

Help us improve our documentation