GSN Traffic Meter is a high-performance UDP and TCP proxy designed for the DeMoD Cloud Fabric (DCF)
687
GSN Traffic Meter is a high-performance UDP and TCP proxy designed for the DeMoD Cloud Fabric (DCF) ecosystem. It provides real-time traffic metering and session-based billing for game server environments.
The service acts as a lightweight data plane that:
Routes game traffic through DCF infrastructure.
Meters bytes in and out per user session using atomic counters.
Reports usage to the DCF-ID accounting system for credit deduction.
Automatically cleans up idle sessions after a configurable timeout.
Static Binary Architecture: Compiled against musl-libc to run in a scratch container for minimal security surface area.
High-Throughput Forwarding: Efficiently handles UDP packet forwarding between clients and backend game containers.
Usage Reporting: Configurable intervals for flushing usage data to ensure accurate billing.
Rustls Integration: Uses a pure Rust TLS implementation to eliminate external C-library dependencies like OpenSSL.
The traffic meter is optimized to run as a standalone container. It requires the DCF_ID_URL and a secret internal key to authenticate usage reports.
docker run -d \
--name gsn-meter \
-p 9000:9000/udp \
-p 9001:9001/tcp \
-e DCF_ID_URL=http://dcf-id-api:4000 \
-e DCF_ID_INTERNAL_KEY=your_secret_key \
-e REPORT_INTERVAL_SECS=60 \
alh477/gsn-meter:latest
| Variable | Description | Default |
|---|---|---|
UDP_PORT | Port used for game traffic forwarding. |
| 9000 |
| HTTP_PORT | Port for the management and metrics API.
| 9001 |
| REPORT_INTERVAL_SECS | Frequency of usage reports sent to DCF-ID.
| 60 |
| DCF_ID_URL | The endpoint for the DCF-ID authentication service.
GET /health: Returns the current service status and global metrics.
POST /sessions/register: Used by the selector to authorize a new user session.
POST /servers/register: Maps a server ID to a specific backend container address.
GET /metrics: Provides detailed byte counts and packet forwarding statistics.
Copyright (c) 2025-2026, DeMoD LLC. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Content type
Image
Digest
sha256:c7dd043d6…
Size
2.9 MB
Last updated
9 months ago
docker pull alh477/gsn-meter