Gamma – a Minecraft bedrock Proxy

adaptation from haveachin/bedprox

Added/changed Features

  • TODO


  • Implement prometheus exporter
  • Implement proxy protocol (receive and send)
  • Implement API
  • Implement L7 protection

Command-Line Flags

-config-path specifies the path to all your server configs [default: "./configs/"]

Example Usage

./gamma -config-path="."

Global config.json


  "receiveProxyProtocol": false,
  "prometheusEnabled": false,
  "prometheusBind": ":9100",
  "apiEnabled": false,
  "apiBind": ":5000",
  "genericJoinResponse": "There is no proxy associated with this domain. Please check your configuration.",
  "listenerBind": ":19132",
  "pingEdition": "MCPE",
  "pingVersionName": "Gamma",
  "pingDescription": "Gamma proxy",
  "pingVersionProtocol": 527,
  "pingPlayerCount": 0,
  "pingMaxPlayerCount": 10,
  "pingGamemode": "SURVIVAL",
  "pingGamemodeNumeric": 1,
  "debug": false

Values can be left out if they don’t deviate from the default, a config.json with just {} is still required for startup.


  • TODO

Proxy Config


Minimal Config

  "domainNames": ["", ""],
  "proxyTo": ":8080"

Full Config

  "domainNames": ["", ""],
  "listenTo": ":19132",
  "proxyTo": ":8080",
  "proxyProtocol": false,
  "dialTimeout": 1000,
  "dialTimeoutMessage": "Server is currently offline",
  "sendProxyProtocol": false

Prometheus exporter

The built-in prometheus exporter can be used to view metrics about gamma’ operation. This can be used through "prometheusEnabled": true and "prometheusBind": ":9070" in config.yml It is recommended to firewall the prometheus exporter with an application like ufw or iptables to make it only accessible by your own Prometheus instance.

Prometheus configuration:

Example prometheus.yml configuration:

  - job_name: gamma
    - targets: ['gamma-exporter-hostname:port']


  • gamma_connected: show the amount of connected players per instance and proxy:
    • Example response: gamma_connected{host="",instance="",job="gamma"} 10
    • host: listenTo domain as specified in the gamma configuration.
    • instance: what gamma instance the amount of players are connected to.
    • job: what job was specified in the prometheus configuration.
  • gamma_handshakes: counter of the number of handshake packets received per instance, type and target:
    • Example response: gamma_handshakes{instance="",type="status",host="",country="DE"} 5
    • instance: what gamma instance handshakes were received on.
    • type: the type of handshake received; “status” or “login”.
    • host: the target host specified by the client (login only).


Route examples

GET /proxies will return


GET /proxies/{name} will return

"domainNames": [""],
"proxyTo": ""

POST /proxies/{name} with body

"domainNames": [""],
"proxyTo": ""

will return

{"success": true, "message": "the proxy has been succesfully added"}

DELETE /proxies/{name} will return 200(OK)

GET / will return 200(OK)

Used sources


View Github