server

command
v0.2.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2026 License: CC0-1.0 Imports: 22 Imported by: 0

README

SOCKS Proxy Server Example

A comprehensive SOCKS5 proxy server example demonstrating TCP, TLS, and WebSocket transports with logging.

Run with defaults:

go run .

This starts:

  • TCP listener on 127.0.0.1:1080
  • TLS listener on 127.0.0.1:1081 (self signed certificates)
  • WebSocket listener on 127.0.0.1:1082 at /ws

Curl

# No auth
curl -4 --proxy socks5://localhost:1080 http://example.com

# Pass auth
curl -4 --proxy socks5://myuser:mypass@localhost:1080 http://example.com

Gost

# Run chain socks -> socks+tls
gost -L socks5://:1090 -F socks5+tls://localhost:1081

# Run chain socks -> socks+ws
gost -L socks5://:1090 -F socks5+ws://localhost:1082

Then use curl as usual

curl -4 --proxy socks5://localhost:1090 http://example.com

Documentation

Overview

nolint

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL