Overview
This template provides a production‑ready Gost instance as a Monk runnable. You can:- Run it directly to get a managed tunnel/proxy server with sensible defaults
- Inherit it in your own runnable to seamlessly add secure tunneling and forwarding to your stack
What this template manages
- Gost container (
ginuerzh/gostimage, configurable tag) - Network service on configured port (default 8080 or 1080)
- Persistent volumes for configuration
- Optional authentication and encryption
- Support for proxy chaining and multiple protocols
Quick start (run directly)
- Load templates
- Run Gost with defaults
- Customize credentials (recommended via inheritance)
variables. Secrets added with monk secrets add will not affect this runnable unless you inherit it and reference those secrets.
- Preferred: inherit and replace variables with
secret("...")as shown below. - Alternative: fork/clone and edit the
variablesingost/gost.yaml, thenmonk load MANIFESTand run.
localhost:8080 (or the runnable hostname inside Monk networks) using the configured protocol and credentials.
Configuration
Key variables you can customize in this template:${monk-volume-path}/gost on the host. Custom Gost config files are mounted from ${monk-volume-path}/gost/config:/etc/gost.
Use by inheritance (recommended for apps)
Inherit the Gost runnable in your application for secure tunneling. Example:Ports and connectivity
- Service:
goston TCP port as configured (default8080for HTTP,1080for SOCKS5) - From other runnables in the same process group, use
connection-hostname("\<connection-name>")to resolve the proxy host.
Persistence and configuration
- Config path:
${monk-volume-path}/gost/config:/etc/gost - You can drop additional JSON config files into the config path to configure Gost.
Features
- Multiple Protocols: SOCKS4/5, HTTP/HTTPS, SS, SSR, SNI, TLS, KCP, Quic
- Port Forwarding: Local and remote port forwarding
- Proxy Chain: Chain multiple proxies together
- Authentication: Username/password auth
- Encryption: TLS/SSL, Shadowsocks encryption
- Load Balancing: Round-robin, random, least-connections
- Traffic Routing: Rule-based routing
- UDP Support: UDP over TCP tunneling
Proxy Modes
HTTP Proxy:Configuration File
Example JSON config (config.json):
Proxy Chaining
Chain multiple proxies for enhanced security or routing:Client Configuration
Configure clients to use Gost: Browser (SOCKS5):- Proxy:
localhost - Port:
1080 - SOCKS v5
Use cases
Gost excels at:- Secure HTTP/SOCKS proxy for applications
- Port forwarding and tunneling
- Bypassing network restrictions
- Secure remote access
- Load balancing across multiple proxies
- Traffic routing and redirection
- Development and testing proxies
Related templates
- High-availability proxy cluster: see other templates in this repository for clustered setups.
- Combine with monitoring tools for observability.
Troubleshooting
- Test proxy connection:
- Check logs:
- Enable debug mode in config for verbose logging.
- For connection issues:
- Verify firewall allows the proxy port
- Check authentication credentials match
- Test without proxy chain first
- Ensure the container is running and listening
- For performance issues, try different protocols (KCP for UDP, Quic for modern encryption).
- Monitor bandwidth usage for proxy traffic to detect issues.