# Terminal 1: Start gost SOCKS-over-WebSocket server
just start-proxy
# Terminal 2: Build and serve the demo
just serve
# Open your browser to
# http://localhost:8000
Without Just (Manual)
# Terminal 1: Start gost SOCKS-over-WebSocket server
gost -L socks5+ws://localhost:1080
# Terminal 2: Build WASM module
GOOS=js GOARCH=wasm go build -o main.wasm main.go
cp "$(go env GOROOT)/lib/wasm/wasm_exec.js" .
# Terminal 2 (continued): Start HTTP server
python3 -m http.server 8000
# Open your browser to
# http://localhost:8000
Browser Compatibility
This demo requires a browser that supports:
WebAssembly (all modern browsers)
WebSocket API (all modern browsers)
ES6+ JavaScript (all modern browsers)
How It Works
WASM Module: The main.go file compiles to WebAssembly and contains:
socksgo client configured for WebSocket transport
HTTP client that routes requests through the SOCKS proxy
JavaScript bridge functions for DOM interaction
WebSocket Connection: The client connects to the gost SOCKS5-over-WebSocket server
HTTP Request: HTTP requests are made through the SOCKS connection, appearing to originate from the gost server