GithubHelp home page GithubHelp logo

bundabrg / geyserlink Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 2.21 MB

TCP/IP for Plugin Messages - Secure and Trusted two way messaging for Minecraft

License: GNU General Public License v3.0

Java 100.00%

geyserlink's Introduction

MIT license GitHub release GitHub commits Github all releases HitCount

Workflow Maintenance GitHub contributors GitHub issues Average time to resolve an issue GitHub pull-requests


Documentation

Source Code


GeyserLink is only of use to developers or plugins that rely on GeyserLink to be available. It does not itself provide any additional feature.

What is GeyserLink

GeyserLink aims to provide an easy method of sending messages between any server involved in a Minecraft connection and to do so in such a way as to allow both a trusted setup and an untrusted setup. This could also potentially be a useful way for client side mods to implement better communication. It is the TCP/IP of PluginMessages.

An example configuration could be a Geyser proxy connected to a Bungeecord proxy connecting to a Spigot server. If all three servers are under the control of the same user then they can be configured to trust each other. Ff the Geyser server is instead run by another user (for example someone connecting to a server using their own Proxy) then it will be untrusted but still be able to participate in communication where no trust is needed.

One example is that a trusted proxy could be queried about a players real IP whereas an untrusted one cannot be trusted to provide this and thus a plugin relying on this behaviour can gracefully fallback to using the proxy IP.

The following configurations should be supported:

  • Owner who has multiple proxies connecting to them for load balancing reasons. These are trusted.
  • Owner who doesn't run their own proxy but still wants to provide support for users to run their own. These are untrusted.
  • Mix of the above.
  • A Client Side mod connected to any of the above. In this case the client side mod would be untrusted but the servers could be trusted.

Presently GeyserLink can be used as a plugin for the following servers:

  • GeyserMC
  • Spigot
  • Bungeecord

Features

  • Provide a secure messaging system utilizing the built-in minecraft plugin messages. All messages are signed with a private key and all messages can be verified by other participants as being valid.
  • Automatically discovers participant keys and will record them.
  • Easily convert an untrusted member into trusted by copying its public key in dynamic.yml config file.
  • Messages are linked to their responses using a unique sequence ID.
  • Provides a lambda style callback function so that message responses can be provided close in code to where messages are generated.
  • Supports multiple responses as some messages may require more than one participant to respond
  • Easily create custom messages

Examples

Send a ping message out and write out to the log any responses received.

// Will get a response from every participant
GeyserLink.getInstance().sendMessage(player, new PingMessage("Hello world!"))
    .onResponse(PingResponse.class, (result, signed, response) -> {
        getLogger().info("Got a ping response: " + response);
    });

Send a custom message and retrieve a custom complex response

// Will get a response from every participant
GeyserLink.getInstance().sendMessage(player, new GetPlayerProfileMessage("bundie"))
    .onResponse(GetPlayerProfileResponse.class, (result, signed, response) -> {
        // Only accept trusted responses
        if (signed.isTrusted()) {
            getLogger().info(String.format("name:%s, location:%s world:%s",
                    response.getName(), response.getLocation().toString(), response.getWorld()));
        }
    });

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.