gitmyhub

gost

Go ★ 7.0k updated 1d ago

GO Simple Tunnel - a simple tunnel written in golang

A Go-based network tunneling tool that works as a forward proxy, port forwarder, or reverse proxy, supporting chained servers and many protocols to route traffic through firewalls or expose private services to the internet.

GoDockerPrometheussetup: moderatecomplexity 3/5

GOST, which stands for GO Simple Tunnel, is a network tunneling tool written in the Go programming language. A tunnel in this context is software that takes network traffic from one place and routes it through one or more intermediate servers, often to bypass network restrictions or to expose a private service to the public internet. The README is written in Chinese, but the feature list and project structure are clear enough to describe.

The tool supports three main modes of operation. In forward proxy mode, it acts as a proxy server that other programs can route traffic through, and multiple proxy servers can be chained together in sequence. In port forwarding mode, it maps a port on one machine to a port on another, also with optional chaining through multiple hops. In reverse proxy mode, it creates a tunnel that lets a server running on a private network (like a home computer behind a router) be reachable from the public internet without opening router ports manually.

Beyond these three core patterns, GOST supports a long list of additional capabilities: handling both TCP and UDP traffic, transparent proxying (routing traffic without the connecting program knowing), DNS resolution and DNS proxying, virtual network interfaces (TUN and TAP devices for VPN-style setups), load balancing across multiple upstream servers, rate limiting, routing rules that decide which traffic to bypass or forward, and an admission control system for filtering connections.

Configuration can be changed at runtime through a web API, so you do not need to restart the process to update settings. A plugin system allows extending the tool's behavior. Prometheus monitoring metrics are supported for tracking performance. A desktop GUI application and a web-based UI are available as separate companion projects.

Installation options include downloading a prebuilt binary, running an install script, building from source with the Go toolchain, or running via Docker. Documentation and tutorials are on the project website at gost.run.

Where it fits