[1.6.2] CraftProxy: A Minecraft Reverse Proxy

Discussion in 'Bukkit Tools' started by tman0, Jul 31, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    tman0

    Introducing
    CraftProxy
    by tman0
    ...
    What is CraftProxy?
    CraftProxy is a reverse proxy, much like BungeeCord. It accepts connections from Minecraft clients and redirects them to the proper servers based on a number of different rules, so you can give your players a nice, pretty url like play.mydomain.com instead of s1.myserverhost.com:9092. At present, CraftProxy redirects Minecraft connections based on the domain you connect to, however in the future it will be possible to redirect based on other conditions, listen on different ports, and other features. So, you can have something like this:
    ...
    [Client] >>----play.mydomain.com----> [CraftProxy] >>----s1.myserverhost.com:9092----> [Server]
    ...
    CraftProxy can do this because of the way the Minecraft protocol is structured. The first packet sent to the server contains all the information CraftProxy needs to know: the hostname that was entered (play.mydomain.com) and the port that was entered (25565). With this information CraftProxy selects from a configured list of servers to send the connection to.
    ...
    What isn't CraftProxy?
    A way to play Minecraft behind a firewall. You still need access to Minecraft.net to log in to most servers.
    A domain name creator. You'll need to have your own domain name to use this. (Though, you can also redirect based on IPs, too! Just change the first URL to an IP address, and people who connect to that will be sent to one server. But, this kind of defeats the purpose of CraftProxy.)
    A DNS server. You'll need to set that up by yourself. A wildcard CNAME record is all you need.
    Code:
    *.example.com CNAME example.com
    ...
    Where can I get CraftProxy?
    CraftProxy is not officially released yet. However, you can get an early pre-alpha here. Please be aware that this is an extremely early pre-alpha. It has not been thoroughly tested. There will be bugs. If you do come across bugs please post them here so I can fix them.
    Requires the .NET Framework 4.5
    Download (Windows/Mac/Linux Mono) (Coming Soon)
    Disclaimer: This source code is quite literally the ugliest thing you'll ever read in your life. I will be cleaning this up, however for now it's the ugliest thing you'll see in your life. That link is not for the faint of heart.
    Also, if I am in violation of one of the libraries' licenses, please get in touch with me and I'd be happy to help resolve the issue.
    ...
    Specific Versions
    ...
    [​IMG] Implemented | [​IMG] In Progress | [​IMG] Planned | [​IMG] Not going to happen.
    [​IMG] - Reverse Proxy system
    [​IMG] - Routing system based on hostnames
    [​IMG] - Server List ping support
    [​IMG] - Bug fixes
    [​IMG]- Source code cleanup/refactoring
    [​IMG] - Version control system
    [​IMG] - Performance improvements
    [​IMG]- Mono support
    [​IMG] - GUI
    ...
    Known Issues
    Default routes don't work
    Server list pings don't work
    ...
    Credit where credit is due...
     
  2. Offline

    Dread9Nought

    .net way of doing this, glad to see it.
     
  3. Offline

    bhallowitz

    If Im understanding this right, this is not anywhere near being the same as bungeecord. Bungeecord allows you to switch between servers without disconnecting from the proxy. This only lets you connect without a port from a different domain name, which is easily done with SRV records.
     
  4. Offline

    Hoolean

    bhallowitz

    You're not understanding it right! :p

    It allows you to direct a player to any server (depending on perhaps, their location, login counts of servers, etc) dynamicaly. SRV records are not dynamic! :)
     
  5. Offline

    Dread9Nought

    Do you plan to take this a little further than just being a straight up 'proxy'?

    Like, have the ability to if you wanted to, send the client a chat packet from your proxy? I figured looking at your code and the use of craft.net, packet creation/manipulation would be something you would make possible and with any luck, not force the server into offline mode.
     
Thread Status:
Not open for further replies.

Share This Page