Giter VIP home page Giter VIP logo

naamloos / mangotango Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 525 KB

A simple web panel for Minecraft servers using Geyser+Floodgate to handle whitelist requests for both Java and Bedrock players.

License: GNU General Public License v3.0

Dockerfile 1.31% C# 54.02% Shell 0.38% HTML 3.24% CSS 1.69% JavaScript 39.35%
asp-net-core floodgate geyser geysermc hacktoberfest minecraft react whitelist

mangotango's Introduction

๐Ÿ˜ธ MangoTango

A simple web panel for Minecraft servers using Geyser+Floodgate to handle whitelist requests for both Java and Bedrock players.

This application was initially written in about half a day.

This application is called after my Minecraft server that is as well called MangoTango. That server is named after one of my cats though ๐Ÿ™‚

Support Discord #mangotango

๐Ÿ› ๏ธ Setup

MangoTango requires some setup to get working properly. As of right now, I only officially support docker-compose setups. The application should work outside of docker as well.

  1. Clone this repository with git clone https://github.com/Naamloos/MangoTango.
  2. cd MangoTango
  3. Edit docker-compose.yml. All values you'll most likely want to modify have a comment reading CHANGEME
  4. Open the Frontend directory (cd Frontend) and modify all values in .env
  5. Go back up one directory (cd ../)
  6. Run docker compose docker compose up --detach
  7. Your web services should now be up and running. We still need to do a bit more though.
  8. Give internet access to the API. docker network connect bridge mangotango-mangotango-api
  9. Done! You should be up and running. You can for example use NGINX to reverse proxy to mangotango-api for the api and mangotango-web for the web panel.

MangoTango does not provide any prebuilt images, due to react injecting environment variables in the build step. Providing prebuilt images would remove the customizability of the front end.

โ— Bedrock XUID resolver fallback

The API provided by GeyserMC for resolving XUIDs does not always provide an answer for every xuid. To ensure MangoTango keeps working, an alternative API is provided to resolve XUIDs. If your bedrock players can't send requests, try setting the following environment variable in your docker-compose.json.

- OPENXBL_KEY=your_key_here

This key can be obtained at the following website: OpenXBL

โ“ Example NGINX configuration

Do take note that it is generally not a good idea to host your services behind port 80! Make sure to either serve your site over HTTPS or have cloudflare as a proxy.

server
{
    listen 80;
    server_name whitelist.example.org;
    location /
    {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $http_host;
        proxy_pass http://mangotango-web:3000;
    }
}

server
{
    listen 80;
    server_name whitelist-api.example.org;
    location /
    {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $http_host;
        proxy_pass http://mangotango-api;
    }

	underscores_in_headers on;
}

โ“ Example NGINX configuration using subpaths

Do make sure to correctly set the PUBLIC_URL env variable for the front end, and the BASE_URI environment variable for the back end and again, it is probably a good idea to serve your pages over HTTPS ๐Ÿ™‚

server
{
    listen 80;
    server_name whitelist.example.org;
    location /whitelist/api/
    {
        rewrite ^/whitelist/api/(.*)$ /$1 break;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $http_host;
        proxy_pass http://mangotango-api;
    }

    location /whitelist/
    {
        rewrite ^/whitelist/(.*)$ /$1 break;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $http_host;
        proxy_pass http://mangotango-web:3000;
    }
}

โš ๏ธ NGINX note!

MangoTango uses a header named rcon_password to authenticate! NGINX does not allow underscores in headers by default, so you will have to add underscores_in_headers on; to your NGINX server declaration. Example can be seen in the example NGINX config above.

๐Ÿ“ธ Screenshots (as of the 20th of October, 2022)

Unauthenticated view

afbeelding

Client-side form validation

image

After Authentication, requests appear under the form

afbeelding

In-game notifications

image

mangotango's People

Contributors

aaron2550 avatar naamloos avatar oolunar avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

mangotango's Issues

Add support for modified paths

As of right now, the API requires the root path to be /. This should be configurable for when people want to host the API on a subpath on their server.

Rewrites through nginx are still a possibility, but this would make it infinitely easier.

Add encryption for rcon password

When the client enters the password, it will be encrypted with the servers public key (RSA), and THAT gets stored.

Now, only the server can check whether the key is correct.

This is both to protect the password on the transport layer (which should not be a big issue since it's over HTTPS anyway in most valid configurations) but also to protect the password while it's in local storage.

Keys should be generated by the API when first launching.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.