Programa de referidos →
InicioGlosarioSOCKS4 vs SOCKS5
Glosario

SOCKS4 vs SOCKS5

SOCKS4 y SOCKS5 son protocolos de proxy; SOCKS5 añade autenticación, soporte de UDP, IPv6 y resolución DNS remota sobre el antiguo SOCKS4.

SOCKS4 y SOCKS5 son versiones del protocolo de proxy SOCKS, que reenvía tráfico TCP en bruto (y, en SOCKS5, también UDP) sin entender la capa de aplicación. Esto hace que los proxies SOCKS sean independientes del protocolo - pueden transportar HTTP, correo, torrents, tráfico de juegos y más, a diferencia de los proxies HTTP que solo manejan solicitudes web.

SOCKS5 es la versión más nueva y capaz. Sus adiciones clave sobre SOCKS4 son: autenticación por usuario/contraseña (SOCKS4 no tiene ninguna), soporte de UDP (SOCKS4 es solo TCP), direccionamiento IPv6 y resolución DNS remota - el proxy resuelve los nombres de host, lo que evita fugas de DNS que de otro modo expondrían tu actividad.

Para los usuarios de proxies, SOCKS5 es prácticamente el estándar; SOCKS4 es heredado y los proveedores comerciales rara vez lo ofrecen. Cuando un servicio anuncia "proxies SOCKS", se refiere a SOCKS5. Solo las funciones de autenticación y DNS remoto ya hacen de SOCKS5 la única opción sensata para trabajo sensible a la privacidad.

Elige SOCKS5 en lugar de un proxy HTTP cuando necesites enrutar tráfico que no sea web o quieras resolución DNS remota. Elige un proxy HTTP/HTTPS para el scraping estándar - tiene soporte universal y es algo más simple. Muchos proveedores ofrecen el mismo pool de IP tanto por puertos HTTP como 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.

Ver esto en práctica

¿Listo para usar socks4 vs socks5?

SotaProxy te da acceso a proxies residenciales rotativos, móviles, de centro de datos e ISP. Sin compromiso mínimo.

Empezar