Skip to content

Proxy Concepts

This guide explains the fundamental concepts you need to understand before working with proxies and the ASocks API.

A proxy server is a computer that acts as an intermediary between your device and the internet. When you use a proxy, your web requests go through the proxy server first, which then forwards them to the target website. The website sees the proxy’s IP address instead of yours.

Why use proxies?

  • Anonymity — hide your real IP address
  • Geo-targeting — access content from different countries
  • Web scraping — avoid IP bans and rate limiting
  • Account management — each account gets a unique IP

In the context of ASocks, a port is your personal proxy connection endpoint. When you create a port, ASocks allocates:

  • A host address (e.g. proxy.asocks.com)
  • A port number (e.g. 10001)
  • Login and password for authentication

Together they form a proxy URL: socks5://login:password@proxy.asocks.com:10001

ASocks offers different types of proxies based on the source of IP addresses:

Residential

IP addresses from real home internet connections (ISPs). Highest trust level — websites see them as regular users. Best for account management and social media.

Mobile

IP addresses from mobile operators (4G/5G). Very high trust — mobile IPs are shared among many users naturally. Great for social media automation.

Corporate

IP addresses from corporate networks. Medium trust level. Suitable for business applications and B2B scenarios.

proxy_type_idNameTrust LevelBest For
1ResidentialHighestSocial media, account farming
2AllMixedGeneral use
3MobileVery HighSocial media, high anonymity
4CorporateMediumBusiness, B2B

The connection type determines how your proxy handles IP rotation:

You get a fixed proxy that maintains the same IP for the entire lifetime of the port. The IP never changes unless you explicitly refresh it.

Use when: You need a stable IP for an account (e.g., one proxy per social media account).

Keep Connection (type_id=2) — High Trust

Section titled “Keep Connection (type_id=2) — High Trust”

The proxy IP may change between connections, but ASocks selects a new IP from the same subnet or ASN — so the target website sees a “similar” IP.

Use when: You need reasonable IP consistency but can tolerate occasional changes.

Rotate Connection (type_id=3) — Maximum Anonymity

Section titled “Rotate Connection (type_id=3) — Maximum Anonymity”

A new IP is assigned for every connection. Maximum anonymity but lowest trust.

Use when: Web scraping, data collection — each request from a different IP.

type_idNameIP BehaviorTrustBest For
1Keep ProxyFixed IPHighestAccount farming
2Keep ConnectionSame subnet/ASNHighBrowsing, general
3Rotate ConnectionNew IP per connectionLowScraping

A free port that shares server resources with other users. No traffic limit configuration needed.

Best for: Testing, low-volume use, getting started.

A paid port with dedicated resources and a configurable traffic limit (in GB). You pay for the traffic you allocate.

Best for: Production use, high-volume traffic, guaranteed performance.

server_port_type_idNameCostTraffic LimitBest For
0SharedFreeN/ATesting
1DedicatedPaidRequired (GB)Production

An ASN identifies a specific internet provider. For example:

  • AS13335 — Cloudflare
  • AS15169 — Google
  • AS32934 — Facebook

When creating a proxy, you can optionally specify an ASN to get an IP from a specific provider. This is useful for:

  • Getting IPs that look like they belong to a particular ISP
  • Ensuring IP consistency for “Keep Connection” mode

When you create a proxy port, you choose:

  1. Country (and optionally state, city) — where the proxy is located
  2. Connection typehow the IP behaves
  3. Proxy typewhat kind of IP (residential, mobile, corporate)
  4. Server port typeshared (free) or dedicated (paid)
  5. Traffic limit — how much traffic (only for dedicated)
  6. TTL — how long the port lives (in days)
from asockslib import ASocksClient, CreatePortRequest
async with ASocksClient(api_key="sk-...") as client:
req = CreatePortRequest(
country_code="US", # United States
city="New York", # New York City
type_id=1, # Keep Proxy (fixed IP)
proxy_type_id=1, # Residential
server_port_type_id=1, # Dedicated
traffic_limit=10, # 10 GB
ttl=30, # 30 days
count=5, # create 5 ports
)
ports = await client.create_ports(req)
for p in ports:
print(p.proxy_url)