# tcp-gate **Repository Path**: mirrors_jpillora/tcp-gate ## Basic Information - **Project Name**: tcp-gate - **Description**: Configuration-based TCP gateway, proxy, load-balancer with automatic TLS via Lets Encrypt - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-09 - **Last Updated**: 2026-05-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README :warning: This repository has been superceded by https://github.com/yyyar/gobetween --- # tcp-gate Configuration-based TCP gateway * Proxy any TCP listener to any TCP endpoint * Round robin * Caddy for TCP/TLS * Automatic TLS via Lets Encrypt * Management UI * Management API * Zero-downtime reconfigures ### Configuration specification * Data types are defined with angle brackets `<` `foo` `>` * Optional config are surrounded with square brackets `[bar:]bazz` ``` = { : ... } = "[:]|[:]" = "tcp|tls|ws|wss" (default tcp) = { type: <-config> } //enum of endpoint types = "proxy|sni|admin|loadbalance" (default proxy) = { remote: certificates: timeout: { read: (default 0) write: (default 0) } buffer: { read: (default 4096) write: (default 4096) } } = { key: cert: } //server-name-indication multiplexer //missing certificates are fetched from letsencrypt //and inserted into the appropriate = { lets-encrypt { agree: true|false, (default true) email: storage: "config|file" } proxies { : ... } certificates { : ... } } //entrypoint into the administration portal, //an http server providing a web ui and rest api = { auth = ":" stats = api = } = { strategy = "round-robin|random|least-connections" (default round-robin) proxies [ ] } ``` **TODO: Convert to JSON Schema** ### Configuration example ```json { "80": { "type": "proxy", "endpoint": "bar.company.com:9002", "timeout": {"read":5000, "write":5000} }, "443": { "type": "sni", "proxies": { "web.foobar.com": { "type": "proxy", "endpoint": "bazz.company.com:9003" }, "admin.foobar.com": { "type": "admin", "auth": "user:s3cret" } } } } ``` ### Implementation A set of `net.Listener`s will accept a larger set of local `net.Conn`s which forward through to a set of remote `net.Conn`s.