mitch0s / gamma

Gamma. A multi-client, multi-server Minecraft proxy implemented in Python
14 stars 1 forks source link
minecraft multi-client multi-server proxy proxy-protocol tcp tcp-client tcp-server

Gamma

A Minecraft proxy implemented in Python

Gamma is a reverse-TCP proxy for Minecraft networks implemented in Python using the Socket package. Gamma supports multiple client connections to multiple servers. Players are proxied to the respective server depending on the hostname included in the first connection packet.

Join our Discord Server!!

Features

Similar Projects

I would have to say that the biggest inspiration for this project would have to be infrared by haveachin

Notes

Getting Started

  1. Clone the repo in whatever environment you wish
  2. Install the following requirements: requests, json
  3. In the same directory as the main.py file, run python3 main.py and watch the magic happen!
  4. Give yourself a pat on the back :)

The Connection Object

Variable Type Description
self.upstream_conn Socket Object The Socket object that contains the connection between the server and the proxy
self.downstream_conn Socket Object The Socket object that contains the connection between the player and the proxy
self.downstream_address Tuple A tuple that contains the players ip and port in the format (ip: str, port: int)
self.conn_alive Boolean Determines whether the connection is active or disconnected, True = Connected, False = Disconnected
self.upstream_packet_count Integer The total number of packets transferred, from Server to Gamma
self.downstream_packet_count Integer The total number of packets transferred from Player to Gamma
self.downstream_bandwidth Integer The total amount of bytes proxied from the downstream connection
self.upstream_bandwidth Integer The total amount of bytes proxied from the upstream connection
self.conn_hostname String The hostname that the player has connected to from their server list
self.player_username String The username of the proxied player, can be None if a username isn't detected