A proxy server written in Go, currently supporting SOCKS5.
Copy the example configuration file:
cp config.example.yaml config.yamlEdit config.yaml to customize your server settings.
Example configuration:
servers:
- name: socks5-main
port: 1080
type: socks5
auth:
status: true
users:
- username: admin
password: "123456"| Option | Description |
|---|---|
name |
Server instance name |
port |
Port to listen on |
type |
Proxy protocol (socks5) |
auth.status |
Enable or disable password authentication |
auth.users |
List of usernames and passwords |
Multiple server instances can be configured under servers.
go build -o proxy cmd/main.goRun using the default configuration file (config.yaml):
./proxySpecify a configuration file:
./proxy -c config.example.yamlDisplay available options:
./proxy -hYou can also run the project without building:
go run cmd/main.go -c config.example.yamlTest the SOCKS5 proxy with curl:
curl --proxy socks5h://127.0.0.1:1080 https://example.comWith username/password authentication:
curl --proxy socks5h://127.0.0.1:1080 \
--proxy-user admin:123456 \
https://example.com