savinmax 705b6a8e6a
Some checks failed
CI / test (push) Successful in 8s
CI / lint (push) Successful in 10s
Release / release (push) Failing after 22s
another uses
2025-08-02 19:19:13 +02:00
2025-08-02 19:19:13 +02:00
2025-08-02 18:33:50 +02:00
2025-08-02 18:33:50 +02:00
2025-08-02 18:33:50 +02:00
2025-08-02 18:33:50 +02:00
2025-08-02 18:33:50 +02:00
2025-08-02 18:33:50 +02:00
2025-08-02 18:33:50 +02:00
2025-08-02 18:33:50 +02:00
2025-08-02 18:33:50 +02:00

WebSocket Relay Server

A minimal Go WebSocket relay server with SSL support for P2P connections.

Setup

go mod tidy
# Configure via config.yaml (see config.yaml for options)
go run main.go

Configuration

Edit config.yaml to configure:

  • Server port and TLS settings
  • SSL certificate paths

Usage

  • WebSocket endpoint: /ws
  • All WebSocket messages are relayed to all connected clients

Testing

// For TLS enabled (default config)
const ws = new WebSocket('wss://localhost:8443/ws');
// For HTTP only
// const ws = new WebSocket('ws://localhost:8443/ws');
ws.onmessage = (event) => console.log('Received:', event.data);
ws.send('Hello from client!');
Description
A minimal Go WebSocket relay server with SSL support for P2P connections.
Readme 43 KiB
2025-08-02 21:31:35 +02:00
Languages
Go 66.8%
HTML 27.3%
Makefile 5.9%