Реферальна програма →
ГоловнаГлосарійSOCKS4 проти SOCKS5
Глосарій

SOCKS4 проти SOCKS5

SOCKS4 і SOCKS5 - проксі-протоколи; SOCKS5 додає автентифікацію, підтримку UDP, IPv6 і віддалене розв’язання DNS поверх застарілого SOCKS4.

SOCKS4 і SOCKS5 - версії проксі-протоколу SOCKS, який передає сирий TCP- (а для SOCKS5 і UDP-) трафік, не розбираючись у прикладному рівні. Це робить SOCKS-проксі протоколо-незалежними - вони можуть нести HTTP, пошту, торенти, ігровий трафік та інше, на відміну від HTTP-проксі, що обробляють лише вебзапити.

SOCKS5 - новіша й функціональніша версія. Ключові додавання порівняно з SOCKS4: автентифікація за логіном/паролем (у SOCKS4 її немає), підтримка UDP (SOCKS4 лише TCP), адресація IPv6 і віддалене розв’язання DNS - проксі сам резолвить імена хостів, що запобігає витокам DNS, які інакше видали б вашу активність.

Для користувачів проксі SOCKS5 фактично стандарт; SOCKS4 - легасі й комерційні провайдери його майже не пропонують. Коли сервіс рекламує «SOCKS-проксі», мається на увазі SOCKS5. Самих лише функцій автентифікації й віддаленого DNS достатньо, щоб зробити SOCKS5 єдиним розумним вибором для приватної роботи.

Обирайте SOCKS5 замість HTTP-проксі, коли потрібно проксувати не-веб трафік або потрібне віддалене розв’язання DNS. Обирайте HTTP/HTTPS-проксі для стандартного скрапінгу - він підтримується повсюдно й трохи простіший. Багато провайдерів віддають той самий пул IP і по HTTP-, і по SOCKS5-портах.

One is a museum piece

SOCKS4 dates from the early nineties and does three things: it opens outbound TCP connections, it supports a rudimentary user identifier, and it works only with IPv4 addresses. It cannot resolve hostnames, cannot carry UDP and has no real authentication.

SOCKS4a added remote hostname resolution as a patch. SOCKS5, standardised in 1996, added proper authentication methods, IPv6 support, UDP forwarding and hostname resolution as a first-class feature.

There is no scenario in current practice where SOCKS4 is the right choice. If a provider offers it, the interesting question is what else in their stack is that old.

What we speak

SOCKS5 on every product, with authentication as part of the handshake:

SOCKS5 endpoints

Residential   socks5h://login_c_US:password@proxy.sotaproxy.com:10000
Static        socks5h://login:password@your-ip:50101

# The h matters: it means we resolve the hostname, not your machine.
  • Use socks5h rather than socks5 so DNS lookups happen on our side. This is the most common leak in scraping stacks.
  • SOCKS5 authentication happens during the handshake, which is why clients ask for a username and password separately from the URL.
  • Targeting suffixes work identically under SOCKS5 and HTTP. Only the scheme changes.
  • Python needs the socks extra, Node needs socks-proxy-agent, and some tools need a SOCKS-capable downloader.

Where the comparison matters

SOCKS4 is not simpler in a useful way

It lacks authentication, IPv6 and remote DNS. Simplicity here means missing features.

SOCKS5 is not more anonymous than HTTP

Both send no forwarding headers when the provider is elite. The exit address is what counts.

SOCKS5 is not automatically faster

It skips header parsing, which is negligible next to the exit device's latency.

UDP support is rarely the reason

Most proxy work is TCP. UDP matters for specific protocols and almost nothing in scraping.

Дивись на практиці

Готовий використовувати socks4 проти socks5?

SotaProxy надає доступ до ротуючих резидентських, мобільних, дата-центр та ISP проксі. Без мінімальних платежів.

Почати