A lightweight and secure SOCKS5/SOCKS5h proxy server implementation in Go with multiple user authentication support.
- SOCKS5 and SOCKS5h proxy protocols support
- Multiple user authentication
- Docker support
- Simple configuration
- Lightweight and fast
- Secure authentication
- Docker and Docker Compose (for containerized deployment)
- A valid
users.conf
file with user credentials
Create a users.conf
file in your project directory with the following format:
username1:password1
username2:password2
Example:
myuser:mypass
myuser2:myotherpass
Each line should contain one user's credentials in the format username:password
.
docker run -p 1081:1080 -v ./users.conf:/app/users.conf ghcr.io/ariadata/go-socks5-proxy
- Create a
docker-compose.yaml
file:
version: "3.8"
services:
socks5-proxy:
image: 'ghcr.io/ariadata/go-socks5-proxy:latest'
container_name: go-socks5-proxy
restart: unless-stopped
ports:
- '1081:1080'
volumes:
- ./users.conf:/app/users.conf
- Start the service:
docker-compose up -d
You can test your proxy connection using curl:
curl -x socks5://username:[email protected]:1081 https://myip4.ir
curl -x socks5h://username:[email protected]:1081 https://myip4.ir
- Default internal port: 1080
- Default exposed port: 1081 (configurable)
- Always use strong passwords in your
users.conf
file - Regularly rotate credentials
- Monitor proxy access logs
- Keep the container and base image updated
-
If connection fails, verify:
- The proxy server is running (
docker ps
) - Correct credentials are being used
- Ports are correctly mapped
users.conf
file is properly mounted
- The proxy server is running (
-
Check logs:
docker logs go-socks5-proxy
[Add your license information here]
[Add contribution guidelines if applicable]
For issues and feature requests, please open an issue.