Websocket Fixes & New Config Examples

This commit is contained in:
Caileb 2025-05-27 21:30:54 -05:00
parent 84225a66f9
commit 9bcdc532bb
10 changed files with 389 additions and 96 deletions

55
config/proxy.toml.example Normal file
View file

@ -0,0 +1,55 @@
# =============================================================================
# PROXY CONFIGURATION
# =============================================================================
# This configuration controls the reverse proxy middleware that forwards
# requests to backend services based on hostname mappings.
# =============================================================================
# -----------------------------------------------------------------------------
# CORE SETTINGS
# -----------------------------------------------------------------------------
[Core]
# Enable or disable the proxy middleware
Enabled = true
# -----------------------------------------------------------------------------
# TIMEOUT SETTINGS
# -----------------------------------------------------------------------------
[Timeouts]
# WebSocket connection timeout in milliseconds
WebSocketTimeoutMs = 5000
# Upstream HTTP request timeout in milliseconds
UpstreamTimeoutMs = 30000
# -----------------------------------------------------------------------------
# PROXY MAPPINGS
# -----------------------------------------------------------------------------
# Map hostnames to backend service URLs
# Format: "hostname" = "backend_url"
# -----------------------------------------------------------------------------
[[Mapping]]
# Media server
Host = "media.example.com"
Target = "http://192.168.1.100:8096"
[[Mapping]]
# Music streaming service
Host = "music.example.com"
Target = "http://192.168.1.100:4533"
[[Mapping]]
# Git repository
Host = "git.example.com"
Target = "http://192.168.1.100:3000"
# [[Mapping]]
# API service
# Host = "api.example.com"
# Target = "http://localhost:3001"
# [[Mapping]]
# Admin panel
# Host = "admin.example.com"
# Target = "http://localhost:3002"