ランキングに戻る

yyyar/gobetween

Gogobetween.io

:cloud: Modern & minimalistic load balancer for the Сloud era

proxy-serverload-balancerdiscoverydockerconsulsrvcloudtcptlsudptcp-proxyudp-proxy
スター成長
スター
2k
フォーク
219
週間成長
Issue
90
5001k1.5k
2023年1月2024年3月2025年5月2026年7月
成果物Go Modulesgo get github.com/yyyar/gobetween
README

Stand With Ukraine

gobetween

Tag Build Status Go Report Card Docs Docker Telegram License

gobetween - modern & minimalistic load balancer and reverse-proxy for the :cloud: Cloud era.

Current status: Maintenance mode, accepting PRs. Currently in use in several highly loaded production environments.

Features

  • Fast L4 Load Balancing

  • Clear & Flexible Configuration with TOML or JSON

    • File - read configuration from the file
    • URL - query URL by HTTP and get configuration from the response body
    • Consul - query Consul key-value storage API for configuration
  • Management REST API

    • System Information - general server info
    • Configuration - dump current config
    • Servers - list, create & delete
    • Stats & Metrics - for servers and backends including rx/tx, status, active connections & etc.
  • Discovery

    • Static - hardcode backends list in the config file
    • Docker - query backends from Docker / Swarm API filtered by label
    • Exec - execute an arbitrary program and get backends from its stdout
    • JSON - query arbitrary http url and pick backends from response json (of any structure)
    • Plaintext - query arbitrary http and parse backends from response text with customized regexp
    • SRV - query DNS server and get backends from SRV records
    • Consul - query Consul Services API for backends
    • LXD - query backends from LXD
  • Healthchecks

    • Ping - simple TCP ping healthcheck
    • Exec - execute arbitrary program passing host & port as options, and read healthcheck status from the stdout
    • Probe - send specific bytes to backend (udp, tcp or tls) and expect a correct answer (bytes or regexp)
  • Balancing Strategies (with SNI and MaxConnections support)

    • Weight - select backend from pool based relative weights of backends
    • Roundrobin - simple elect backend from pool in circular order
    • Iphash - route client to the same backend based on client ip hash
    • Iphash1 - same as iphash but backend removal consistent (clients remain connecting to the same backend, even if some other backends down)
    • Leastconn - select backend with least active connections
    • Leastbandwidth - backends with least bandwidth
  • Integrates seamlessly with Docker and with any custom system (thanks to Exec discovery and healthchecks)

  • Single binary distribution

Architecture

architecture

Usage

Hacking

  • Install Go 1.24+ https://golang.org/
  • $ git clone git@github.com:yyyar/gobetween.git
  • $ make
  • $ make run

Debug and Test

Run several web servers for tests in different terminals:

  • $ python -m SimpleHTTPServer 8000
  • $ python -m SimpleHTTPServer 8001

Instead of Python's internal HTTP module, you can also use a single binary (Go based) webserver like: https://github.com/udhos/gowebhello

gowebhello has support for SSL sertificates as well (HTTPS mode), in case you want to do quick demos of the TLS+SNI capabilities of gobetween.

Put localhost:8000 and localhost:8001 to static_list of static discovery in config file, then try it:

  • $ gobetween -c gobetween.toml

  • $ curl http://localhost:3000

Enable profiler and debug issues you encounter

[profiler]
enabled = true     # false | true
bind    = ":6060"  # "host:port"

Performance

It's Fast! See Performance Testing

The Name

It's a play on words: gobetween ("go between").

Also, it's written in Go, and it's a proxy so it's something that stays between 2 parties :smile:

License

MIT. See LICENSE file for more details.

Authors & Maintainers

All Contributors

Community

  • Join gobetween Telegram group here.

Logo by Max Demchenko

関連リポジトリ
nondanee/UnblockNeteaseMusic

Revive unavailable songs for Netease Cloud Music

JavaScriptnpmMIT Licensenetease-cloud-musicunblocker
17.4k2.5k
ProxymanApp/Proxyman

The best-in-class HTTP Debugger for macOS. Capture HTTP/HTTPS from macOS, iOS, Android with a few clicks ✅

proxyproxy-server
proxyman.com
6.9k237
katanemo/plano

Plano is an AI-native proxy server and data plane for agentic apps. Smart LLM routing, observability, agent orchestration, and guardrails so you stay focused on your agents core logic.

Rustcrates.ioApache License 2.0gatewaygenerative-ai
planoai.dev
6.9k469
OutlineFoundation/outline-server

Outline Server, developed by Jigsaw. The Outline Server is a proxy server that runs a Shadowsocks instance and provides a REST API for access key management.

TypeScriptnpmApache License 2.0shadowsocksdocker
getoutline.org
6.2k879
Jigsaw-Code/outline-server

Outline Server, developed by Jigsaw. The Outline Server is a proxy server that runs a Shadowsocks instance and provides a REST API for access key management.

TypeScriptnpmApache License 2.0shadowsocksdocker
getoutline.org
5.9k795
easegress-io/easegress

A Cloud Native traffic orchestration system

GoGo ModulesApache License 2.0gohttp
megaease.com/easegress/
5.9k496
3proxy/3proxy

3proxy - tiny free proxy server

COtherproxyproxy-server
3proxy.org
5.3k917
xvzc/spoofdpi

Simple and fast anti-censorship tool written in Go

GoGo ModulesApache License 2.0dpigolang
spoofdpi.dev
4.9k330
gomods/athens

A Go module datastore and proxy

GoGo ModulesMIT Licensegolangdependencies
docs.gomods.io
4.8k542
CJackHwang/ds2api

DeepSeek-Compatible Middleware Interface: A technical exploration project in Go, focusing on high-concurrency protocol adaptation. It serves as a reference implementation for converting diverse web protocols into standardized formats.

GoGo ModulesGNU Affero General Public License v3.0deepseekfreeapi
linux.do/u/cjackhwang
4.8k1.6k
algorithmicsuperintelligence/optillm

Optimizing inference proxy for LLMs

PythonPyPIApache License 2.0agentagentic-ai
4.2k372
constverum/ProxyBroker

Proxy [Finder | Checker | Server]. HTTP(S) & SOCKS :performing_arts:

PythonPyPIApache License 2.0proxyanonymity
proxybroker.readthedocs.io
4.2k1.2k