Skip to content

SOCKS5 proxy server based on a package TuanKiri/socks5.

License

Notifications You must be signed in to change notification settings

TuanKiri/socks5-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SOCKS5 Proxy

license go version docker hub docker version docker size

Overview

SOCKS5 proxy server based on a package github.com/TuanKiri/socks5.

Features

  • SOCKS5 CONNECT command
  • SOCKS5 UDP ASSOCIATE command
  • IPv4, IPv6, FQDN
  • Username/Password Authentication
  • ACL (Access Control List)

Configuration

Set environment variables:

# If authentication on the server is required (RFC 1929).
# default: no authentication required
SOCKS5_USER=
SOCKS5_PASSWORD=
# 1 - Connect, 2 - Bind (not support), 3 - UDP Associate.
# example: ALLOWED_COMMANDS=1,3 
# default: permit all commands
ALLOWED_COMMANDS=
# If you need only certain IP addresses to be able to connect to the server.
# example: 192.168.1.243,185.52.141.19
# default: none
WHITE_LIST_IPS=
# Timeouts for TCP connection. Valid time units are ns, us (or µs), ms, s, m, h.
# example: DIAL_TIMEOUT=5s 
# default: none
DIAL_TIMEOUT=
READ_TIMEOUT=
WRITE_TIMEOUT=
# Timeouts for UDP connection. Valid time units are ns, us (or µs), ms, s, m, h.
# example: PACKET_WRITE_TIMEOUT=5s
# default: none
PACKET_WRITE_TIMEOUT=
# Maximum size in bytes for the datagram to be read from the socket.
# example: MAX_PACKET_SIZE=65507
# default: 1500
MAX_PACKET_SIZE=
# IP address that is visible on the external Internet,
# accessible to users outside the local network and will be sent to clients in
# response to a connection request.
# example: 192.168.1.243
# default: 127.0.0.1
PUBLIC_IP=

Pull from GitHub Container Registry

linux/amd64

docker pull ghcr.io/tuankiri/socks5:latest

Docker Compose

docker-compose up -d socks5

Build

docker build -t socks5 .

Run

docker run --env-file .env --network host socks5

Test

curl -x socks5://127.0.0.1:1080 http://example.com

Contributing

Feel free to open tickets or send pull requests with improvements. Thanks in advance for your help!

Please follow the contribution guidelines.

License

All source code is licensed under the MIT License.