Skip to content
debug-ingPublic

About

proxy sever socks5/socks4/http

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

29 Commits

Folders and files

Repository files navigation

Proxy Server

A proxy server written in Go, currently supporting SOCKS5,SOCKS4.

Configuration

Copy the example configuration file:

cp config.example.yaml config.yaml

Edit config.yaml to customize your server settings.

Example configuration:

servers:
  - name: socks4
    port: 1079
    type: socks4
    auth:
      status: false
      users: []
  - name: socks5-main
    port: 1080
    type: socks5 
    auth:
      status: true
      users:
        - username: admin
          password: "123456"

Configuration Options

Option Description
name Server instance name
port Port to listen on
type Proxy protocol (socks5,socks4)
auth.status Enable or disable password authentication
auth.users List of usernames and passwords

Multiple server instances can be configured under servers.

Build

go build -o proxy cmd/main.go

Run

Run using the default configuration file (config.yaml):

./proxy

Specify a configuration file:

./proxy -c config.example.yaml

Display available options:

./proxy -h

You can also run the project without building:

go run cmd/main.go -c config.example.yaml

Testing

Test the SOCKS5 proxy with curl:

curl --proxy socks5h://127.0.0.1:1080 https://example.com

With username/password authentication:

curl --proxy socks5h://127.0.0.1:1080 \
     --proxy-user admin:123456 \
     https://example.com

Test the SOCKS4 proxy with curl:

curl --socks4 127.0.0.1:1080 https://example.com

About

proxy sever socks5/socks4/http

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages