https://github.com/realzhangliu/socks5-go
PURE GOLANG SOCKS5 SERVER ,FULL PROTOCOL FEATURES!
https://github.com/realzhangliu/socks5-go
golang socks5 udp-associate
Last synced: 4 months ago
JSON representation
PURE GOLANG SOCKS5 SERVER ,FULL PROTOCOL FEATURES!
- Host: GitHub
- URL: https://github.com/realzhangliu/socks5-go
- Owner: realzhangliu
- License: mit
- Created: 2021-02-05T12:42:50.000Z (over 5 years ago)
- Default Branch: dev
- Last Pushed: 2025-06-10T15:01:31.000Z (about 1 year ago)
- Last Synced: 2025-06-10T16:36:19.361Z (about 1 year ago)
- Topics: golang, socks5, udp-associate
- Language: Go
- Homepage:
- Size: 103 KB
- Stars: 79
- Watchers: 2
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# socks5-go 🎉

[](https://goreportcard.com/report/github.com/realzhangliu/socks5-go)
Inspired by go-socks5,This package provides full functionality of [socks5 protocol](https://www.rfc-editor.org/rfc/pdfrfc/rfc1928.txt.pdf).
>The protocol described here is designed to provide a framework for client-server applications in both the TCP and UDP domains to conveniently and securely use the services of a network firewall.
Advantages👍
=======
- A painless host service
- Support UDP ASSOCIATE (game network accelerator)

Feature 🎯
=======
The package has the following features:
- [x] "No Auth" mode
- [x] User/Password authentication mode
- [x] Support for the **CONNECT** command
- [x] Support for the **BIND** command(require the client to accept connections from the server,like FTP etc.)
- [x] Support for the **UDP ASSOCIATE** command
- [x] TCP connection optimize and copy buffer
- [ ] UDP sessions management
- [ ] UDP sessions timeout clearing mechanism missing
- [ ] UDP session memory pool
- [ ] Monitoring index (active connection count,traffic statistics,Delay statistics)
- [ ] Unit tests
Download📶
=======
Get the latest version on [**Release**](https://github.com/realzhangliu/socks5-go/releases)
Start with terminal😀
=======
you may need to add run permission first
```shell
chmod +x socks5g-linux-amd64
```
Port only(No Auth)
```shell
./socks5g-linux-amd64 1080
```
Port and Username/Password
```shell
./socks5g-linux-amd64 1080 admin 123
```
Start with Docker 😘
=======
modify the docker-compose.yml file, changing environment variables SOCKS5_PORT,SOCKS5_USER,SOCKS5_PASSWORD to the values you want.
```shell
git pull https://github.com/realzhangliu/socks5-go.git
cd socks5-go
docker-compose up -d
```
Example 👌
=======
```shell
go get github.com/realzhangliu/socks5-go
```
```go
package main
import (
"github.com/realzhangliu/socks5-go"
"log"
)
func main() {
//var config socks5.Config
//Implement yourself Config , default is provided.
S5Server := socks5.NewSocks5Server(nil)
log.Println(S5Server.Listen())
}
```