https://github.com/tuankiri/socks5-server
SOCKS5 proxy server
https://github.com/tuankiri/socks5-server
connect go golang proxy socks socks5 tcp-proxy udp-associate udp-proxy
Last synced: 5 months ago
JSON representation
SOCKS5 proxy server
- Host: GitHub
- URL: https://github.com/tuankiri/socks5-server
- Owner: TuanKiri
- License: mit
- Created: 2024-06-13T19:36:22.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-04-11T15:57:16.000Z (about 1 year ago)
- Last Synced: 2025-08-01T12:28:21.873Z (10 months ago)
- Topics: connect, go, golang, proxy, socks, socks5, tcp-proxy, udp-associate, udp-proxy
- Language: Go
- Homepage:
- Size: 37.1 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
SOCKS5 Proxy
[](LICENSE)
[](go.mod)
[](https://hub.docker.com/r/tuankiri/socks5)
[](https://hub.docker.com/r/tuankiri/socks5)
[](https://hub.docker.com/r/tuankiri/socks5)
## Overview
SOCKS5 proxy server based on a package [socks5](https://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:
```sh
# 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=
# Enable logging
# default: FALSE
LOGGING=
# Cleanup period for UDP packets that do not receive a response.
# Valid time units are ns, us (or µs), ms, s, m, h.
# example: NAT_CLEANUP_PERIOD=5s
# default: none
NAT_CLEANUP_PERIOD=
# Lifetime of each udp packet.
# Valid time units are ns, us (or µs), ms, s, m, h.
# example: TTLPacket=5s
# default: none
TTLPacket=
```
## Pull from GitHub Container Registry
`linux/amd64`
```sh
docker pull ghcr.io/tuankiri/socks5:latest
```
## Docker Compose
```sh
docker-compose up -d socks5
```
## Test
```sh
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](.github/CONTRIBUTING.md).
## License
All source code is licensed under the MIT License.