Sign inSign up

devontm/wg-gateway

By devontm

Updated 5 months ago

Lightweight Rust UDP proxy with configurable target (defaults to Cloudflare WARP WireGuard).

Image
Networking
0

1.5K

devontm/wg-gateway repository overview

wg-gateway is a lightweight UDP proxy written in Rust. By default, it forwards traffic to the Cloudflare WARP WireGuard endpoint (162.159.193.1:2408), but it can be configured to proxy any UDP service using environment variables.

The image is built as a fully static binary and runs on a scratch base, making it extremely small and suitable for minimal or containerized environments.

Features

  • Simple UDP proxy
  • Configurable target and listen address
  • Fully static musl build
  • Minimal scratch-based container
  • Designed for low overhead and high performance

Default behavior

  • Listens on: 0.0.0.0:2408
  • Proxies to: 162.159.193.1:2408 (Cloudflare WARP WireGuard)

Configuration (environment variables)

VariableDescriptionExample
WG_TARGETTarget UDP address1.2.3.4:51820
WG_LISTENListen address0.0.0.0:51820
WG_LISTEN_PORTListen port (if WG_LISTEN not set)51820
WG_BUFFERReceive buffer size (bytes)4096
WG_SOCKET_BUFSocket buffer size (bytes)2097152
WG_TIMEOUT_SECSClient idle timeout120
WG_CLEANUP_SECSCleanup interval60
WG_MULTI_THREADEnable multi-thread runtimetrue
WG_WORKER_THREADSNumber of worker threads4

Tag summary

Content type

Image

Digest

sha256:8296ee6d2

Size

525 kB

Last updated

5 months ago

docker pull devontm/wg-gateway