Overview
SOCKS5 proxy mode allows paqet to act as a local SOCKS5 proxy server that dynamically forwards connections from your applications to any destination through the encrypted raw packet tunnel. This is the most flexible mode, as it doesn’t require pre-configuring specific target addresses.How SOCKS5 Mode Works
When running in SOCKS5 mode, paqet creates a local proxy server that applications can connect to:- Your application connects to the local SOCKS5 proxy (e.g.,
127.0.0.1:1080) - The application sends the target destination to the proxy
- paqet client encrypts and forwards the traffic over raw packets to the server
- paqet server establishes the connection to the actual destination
- All traffic flows through the encrypted tunnel
Configuration
Basic SOCKS5 Setup
Add thesocks5 section to your client configuration:
With Authentication
You can optionally enable username/password authentication to restrict access to your local SOCKS5 proxy:SOCKS5 authentication only protects access to your local proxy. It does not affect the encryption or authentication of the tunnel between client and server (which uses the KCP key).
Multiple SOCKS5 Listeners
You can configure multiple SOCKS5 proxy listeners on different ports:Complete Client Configuration Example
Using SOCKS5 with Applications
Command-Line Tools
Most command-line tools support SOCKS5 proxies:curl
Use
socks5h:// instead of socks5:// to ensure DNS queries are also sent through the proxy. This prevents DNS leaks.wget
git
Browsers
Most browsers allow configuring SOCKS5 proxies in their network settings:- Firefox: Settings → Network Settings → Manual proxy configuration
- Chrome/Edge: Use system proxy settings or launch with
--proxy-server=socks5://127.0.0.1:1080
System-Wide Proxy
You can configure your entire system to use the SOCKS5 proxy: macOS: System Settings → Network → Advanced → Proxies → SOCKS Proxy Linux: Depends on desktop environment (GNOME/KDE network settings) Windows: Settings → Network & Internet → Proxy → Manual proxy setupDynamic Forwarding
SOCKS5 provides dynamic forwarding, meaning:- No need to specify target addresses in advance
- Each application connection can go to a different destination
- The destination is determined at connection time by the application
- Ideal for browsing, general-purpose proxying, or when targets change frequently
Combining SOCKS5 with Port Forwarding
You can run both SOCKS5 and port forwarding simultaneously:- SOCKS5 for dynamic application proxying
- Port forwarding for specific services that need dedicated ports