Skip to content

edg-l/teeworlds-master-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTTPS Teeworlds Master Server Go

Work in progress

The masterserver uses memcached to cache the server entries it receives, thus multiple master servers can be used.

Each master server has a configuration config.yml where you define a identifier, and also define which other master server entries to use by listing their identifiers.

Each master server uses it's identifier as cache key where it saves his managed list of servers.

When a master server must provide the server list, it will then use the server identifiers as the cache keys to get the full server list.

Each master server manages his own registered server list, in the cache only relevant info for the client should be saved and not for example, when the server will timeout in the list.

Build

go build

Generate certificate

Generate a self-signed key:

./teeworlds-master-server generate

Note: this cert will only last 1 year.

Dependencies

You need to install https://memcached.org/

You should limit the connection to the memcached server on a firewall level.

Start

./teeworlds-master-server start

TODO

Colorize a bit? https://github.com/logrusorgru/aurora

  • Servers should be able to register both ipv4 and ipv6 and be identified as the same server.
  • Clients should be able to know a ipv4 and ipv6 belongs to the same server.
  • Master server should ping server entries to know that port is forwarded and clients can connect aka "fwcheck".
  • Prevent multiple entries across masters
  • Add a maximum amount of registered servers per ip
  • Admin endpoints or maybe use a websocket server
  • Add better logging

Util

curl -k https://localhost:8283/

http --verify=no https://localhost:8283/

About

HTTPS Teeworlds master server implemented in Go

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages