Skip to content

Proxy Protocol

Yaroslav Pogrebnyak edited this page Sep 28, 2017 · 1 revision

(since 0.5.0)

The PROXY Protocol provides a convenient way to safely transport connection information such as a client's address across multiple layers of TCP proxies. It's originally created in HAProxy. For more details, see https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt

For now gobetween supports only PROXY protocol v1 with text-based format.

To instruct gobetween sending PROXY protocol header to backends, you should enable it:

[servers.sample]
  protocol = "tcp"
  bind = "0.0.0.0:3000"

  [servers.default.proxy_protocol]  # (optional)
  version = "1"                     # (required) proxy protocol version. only "1" for now.

  [servers.sample.discovery]
  kind = "static"
  static_list = [
      "localhost:8000",
      "localhost:8001"
  ]

Caution: Make sure your backends servers supports PROXY protocol before enabling it.