[MISC] CraftProxy 0.2.0 - Reduce bandwidth use by caching chunk data [1.6]

Discussion in 'Archived: Plugin Releases' started by Raphfrk, May 1, 2011.

  1. Offline


    CraftProxy - Reduce bandwidth use by caching chunk data
    Version: 0.2.0


    This plugin and local client allows chunk data to be cached locally by players. This reduces the bandwidth required for hosting the server. It also helps users who are on slower connections.

    I am not sure what the status of this system is. It doesn't count as a plugin, since it has 2 parts.

    Even when running the plugin, players who don't use the client proxy can still connect. However, they will use the full bandwidth.

    The system can reduce bandwidth by 70-90% (after the 2nd login).



    Add the plugin file to the plugins folder


    Start minecraft client and login
    Double click on the client jar file
    Enter login details
    Enter the server location/port in the GUI
    Press start on the GUI
    Connect to localhost on the minecraft client

    Stable Builds

    None yet

    Dev Builds

    Warning: These may not be stable


    Had it get the compress/decompression gain backwards.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 14, 2016
    Jushy, Martin1704, Nathan C and 24 others like this.
  2. Offline


    That should have files in it, if it is working. Also, the client GUI should give an indication that some bandwidth is being saved.

    Are you connecting to localhost:20001 when you start the minecraft client, or connecting directly to the server?

    Also, the GUI should say that you have connected. You need to press start on the local proxy to enable it.
  3. Offline


    Oh my im dense today. ROFL... ill get back to ya...
  4. Offline


    Very interesting concept - I wish we were able to make Minecraft servers so power hungry
  5. Offline


    Ok, now that I am connecting proper.. I get the backend error...

    "Unable to connect to backend server."

    Seen others with the same issue and am still digging but haven't found what I setup wrong yet... Any 'off the top' ideas?
  6. Check my earlier posts in this thread for the fix.
  7. Offline


    Thanks Joy, I did see your post but it was a bit vague for me...

    What is "that" referring to in the above statement?
  8. Offline


    i'm sorry, but 3-5 what?
  9. Offline


    A factor of 3.

    On login bandwidth drops by 80%. However, chunk packets are only around 75% of the data, so drop to 33% of normal.
  10. Offline


    Can you clarify where you change this? I seem to be having the same issue here and I am having no luck with finding it on my own.

  11. Offline


    I updated again.

    The Bukkit server now handles authentication, so you can set it any way you want.

    Also, I removed the requirement for the server side of the cache to need disk space.

    Note: it should say version 39 (unload will complete in a minute or 2)

    Updated to v40

    This fixes a bug where the client sends all its stored hashes to the server.

    It is supposed to only send hashes that are likely to match the current one.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 14, 2016
  12. Offline


    You should write the changelog in the first post mate, and thanks.. I can see the verify username problem has been solved, so it's rather good
  13. Offline


    Thanks for this !
    It is possible to run the client side on a headless linux ? To use it as local LAN proxy for internet server....
  14. Offline


    it won't work for me :(
    did the following:​
    1. getting angry about the not wget-friendly downloadlink​
    2. downloading to my local computer​
    3. putting into the /plugins folder on the server​
    4. restarting server​
    5. starting CraftProxyLite.jar​
    6. entering the name of the server in the top left box​
    7. clicking start​
    8. starting minecraft​
    9. conecting to localhost:25565​
    10. seeing "logging in, but nothing happens​
    (the proxy says "client connected:")​
    (the server doesn't recognise any connection atempt)​
    what did i do wrong?​
    tip: os: linux *chalenge* :)
    now i know what ... i forgot to enter service shorewall resart ...​
  15. So Is there a new fonction like : Offline mod or can we set it up to off in the settings , if yes tell me please :)
  16. Offline


    It doesn't do off or online mode. It just connects to the server and the server does the authentication (or not).

    I added the answer as the first question on the new FAQ (see OP).

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 14, 2016
  17. Offline


    Feel free to ignore my post if it gets too annoying to explain everything... I Just wanted to know what everything in the configuration file is... I read the all the posts to see if could gather some understanding of any of it before I posted... I understand that it can get tiresome to have to explain everything to everyone, but I also think it might be useful to post this in your original post afterwards. (if you explain all the config files to me anyway)
    I'm still a newbie server host(who also wants to learn how to write plugins) that runs one for my friends (some of which are WoW friends so they're across the country and one is in Japan). I'm trying to learn as much as possible so I can play comfortable with everyone, so please be patient with me.. <3

    so the clientversion is left blank and I'm not sure what this is exactly... would it be 1.5_01 ? But it said somewhere earlier that it doesn't really connect to the server, but the plugin that's loaded in there. Meaning.... it doesn't matter what version of minecraft you're running. Looking at the YML it says version 1 there, so is that the version you would put there? Since it's left blank I assume it's not entirely necessary so I'm thinking... is it there in case your players are running a different version of your CraftProxyLite? Someone also mentioned that it could be the craftbukkit version as well.

    I have no idea what bridge_connection=true might be....
    Same with reconnectfile and monitor

    seed= would be the world seed? Meaning if they have it there and run minecraft... they essentially already have the entire world for newly generated areas. I'm a little sad since my server is older than the seed generator... but does that mean I don't have a seed? or was it sort of an invisible factor just not known to people before? It's blank in my server config file, so I would assume that I don't have one.

    cache_limit= how much space is allowed in the file that's generated by the players. you said it defaults at 10MB but the client (player?) should have it set at a higher amount. How would you go about setting it for the client? I double click on the .jar and it brings up the gui, but I don't see any configuration there or any file that is generated to configure it, only the one in the server file.

    default_server=25565 . Kind of self explanatory... It's the port that's used to host the minecraft server (if it's not changed). It looks like it uses the same port as the server, so I can't run this at the same time as the server... Of course there shouldn't be any need since the server is on my computer... but that means I can't test the settings and configuration that my players might see if anything came up at all. Is there a way I can see what ports my computer has? I'm not entire sure what it is, and a google search on it brings up USB ports, Sata ports (dunno what that is either), Ethernet Ports, and Boat Ports... lol. This doesn't seem to have much to do with your plugin though so I should just try to research more on my own. However, in short, I would like to know if there's any reason it should be changed, and if there's any benefit for it.
    The above confused me... I took it out of the sourcefile provided above... but maybe this is just for plugin developers

    quiet=true & debug=false Don't know what these are...

    listen_hostname_port=20000 I'm not sure what this is exactly, but I think it's what other people use to connect to our port? If I change the server port which is 25565 by default, would this one also need to be changed?

    password= is this usable now? it seems like a feature that hasn't been put in yet since I don't see any password inputs anywhere on the executable.

    auth_off=false If I have this off, that means it will check everyone to see if they have this running, and if they don't... they can't connect? If it's on then everything should be fine right? I'm worried because I don't know how this executable will work with Mac's. At least one of my players run with a Mac and if it blocks them out, then I can't use this great tool! But if it allows people to go on the server without it (if it doesn't work) it should be fine. I think that's how it works anyway... since you said in an earlier post that it works just like offline mode in the server config file.

    log= not sure... debugging log? sees who connected and when? what port they used?
    banned= possible to ban specific people using craftproxy? Unsure what it's for if it just makes people unable to log in... So does it make it so certain people can't use their executable but can still use the server without it?

    dimension= & staticlocalhost=true & disable_flood=false
    I'm not sure what any of these are...

    Sorry for the huge text wall :( I tried to make it easier on the eyes which make the post look bigger.
    I can't wait to test this! I have to wait till the weekend though... :(
  18. Offline


    One of the issues is that the cache is not the reason that I wrote the plugin. The reason that I wrote it was to allow people to change servers without having to log off.

    Many of the parameters are for that purpose.

    If they are blank, it just means "use default".

    This is for minecraft. Every time Notch updates the version number, he increments it by 1.

    Bridge connection means that the authentication occurs directly with the Bukkit server.

    Normally, the login process is 2 stages.

    First, your client connects to the proxy. The proxy checks with the minecraft.net servers to do name verification.

    All of the actual servers are placed in offline mode and the proxy can connect to any of them. In the second step, the proxy connects to one of the back-end servers.

    reconnect file sets a file where the last server a player connected to is stored.

    monitor is for displaying bandwidth info and the value is the period in seconds between each print out.

    Yes, the client uses it to work out rain and biome colouring.

    Since you log into the proxy, you can set a fake seed. With the bridging connection, this does nothing.

    That is what Notch should do. It should send the differences between the generated world and the actual chunk. This would save loads of bandwidth.

    This does nothing on the server, since I removed the need.

    The client cache is now 50MB instead of 10. You can change it by running without the GUI. I will probably have the GUI read in a config file too.

    It actually means the server that new players connect to. All other players are sent to the last server they were on (hence the reconnect file). Again, not needed if you are just doing caching.

    You can change the GUI's port by just changing the number before you hit start. Also, it is better for your players if it is set up that way.

    They can connect to localhost if they want to use the cache and directly to your.hostname.com if they want to connect directly.

    I would definitely just change the GUI's listen port.

    Just pick a random number. I would suggest 25564.

    The ports from 1 to 1024 are kind of reserved. Generally lower ports aren't used. 65536 is the max.

    quiet means don't spam the console with lots of info and debug means don't spam with debug info.

    This is the port the plugin listens on.

    Normally the connection is

    Minecraft client connects to (port 25565) Minecraft server

    With the proxy its

    Minecraft client connects to (port localhost:25564) to local proxy

    local proxy connects to (port 20000 of server) to server plugin

    server plugin connects to (port 25565 of server) to Minecraft server

    You need more ports.

    This allows you to use a password for connecting instead of normal authenticating. Doesn't work in bridging mode.

    This doesn't do anything in bridging mode.

    He could still connect to your server directly. However, it should work on a MAC.

    This is a filename. All text output is sent to the log instead.

    This is a filename. One name per line and it will ban them on connect. May not work in bridge mode (think it does).

    It will kick people instantly when they connect to the proxy.

    Dimension sets the Nether/Normal world, but does nothing in bridging mode.

    staticlocalhost doesn't really do much as Notch made it best to just leave it always on.

    Flood controls flood protection. If a person connects from the same IP twice within 5 seconds, then it kicks them.
  19. Proxy Settings​
    Server properties​
    #Minecraft server properties
    #Tue Apr 26 07:28:54 EDT 2011
    And : Craftproxy : Server name : Localhost Port :23456​
    LocalServerName : Localhost Port:25565​
    And I'm having : OutDated Server error​
  20. Offline


    Edit: Seems someone was faster than me in responding :d
    Edit2: Is it possible that you could make the gui remember the last server ip and port used, for quicker starting of the local proxy server?
  21. Offline


    This means that you are connecting directly to the server.

    The GUI should connect to port 20000 of the server (by default).
  22. Offline


    Report time!

    Ran this on the server last night and the result was wonderful.
    On client and server-side.

    Performance aside I needed to switch off authentication on both the plugin as well as the server as well to run this.

    Otherwise the authentication to minecraft.net is successful but still gives an unverified username error.

    I was ing build 37 of the plugin instead of 36 that was originally posted.

    Will try build 40 tonight!
    Great job 8D
  23. Offline


    I keep getting a class net.minecraft.server.NetServerHandler wasn't prepared to deal with a class net.minecraft.server.Packet2Handshake error...


    Has anyone had this and got around it?
  24. Offline


    Are you connecting the GUI directly to the server? It has to connect to port 20000 (by default).


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 14, 2016
  25. Offline


    I'm connecting the GUI to the plugin port which I have correctly forwarded from my server.

    The output from the console.

    16:22:01 [INFO] [4:22:01 PM] /24964 (codename_B): Closing connection to server
    16:22:01 [INFO] [4:22:01 PM] /24964 (codename_B): Closing connection to client
    16:35:18 [INFO] Connection from /25942
    16:35:18 [INFO] [4:35:18 PM] /25942 (codename_B): Connecting to: 25565
    16:35:20 [INFO] codename_B [/] logged in with entity id 171
    16:35:20 [INFO] local cache enabled
    16:35:20 [WARNING] class net.minecraft.server.NetServerHandler wasn't prepared to deal with a class net.minecraft.server.Packet2Handshake

    I've removed my ip address but other than that that's the output.

    Ok so turns out that I was using an outdated version - my bad.
    As far as the CraftProxyLite client side goes it's now not connecting to the server at all... :S


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 14, 2016
  26. Offline


    Are you using 100% defaults on all settings?
  27. Wait what ? I don't understand anything , according to my ports ( posted 1 hour ago ) What should I put on CraftProxyLite and INGAME ? I'm a noob. THanks
  28. Offline


    Everything at default should work, unless you want to run the server on the same machine as the client.
  29. yes I'm running my server on the same machine as the client :S and localhost:20000 results as a Connection Connect error

    ohh It is working ( I can't see if someone log in with CraftProxy ) I don't know if this is normal , but it works :D Thanks ! So Now my friends will only have to download it and put it in the same folder with Minecraft.exe ( jar file ) ?

    Wait , i don't know lol if it works ... I logged with localhost:20000 ( everything is on default now ) but Error Unable to start server Port 25565 is not free

    if I start the CraftProxy before the server I get a nice FAILED TO BIND PORT on my bukkit

    Default port on CraftProxyLite are : 25565 and 25565 but it is listening to 20000 but my server is already on port 25565 , I know I'm really annoying

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 14, 2016
  30. Offline


    They can place it in any directory and then double click on it to start it.

    The new version of the GUI remembers the last settings.

    Anyway, you should just change the local port to use 25564 instead of 25565. Your players won't have to do that.
  31. Offline


    You forgot to update version number in title of thread and in the top of the main post mate, besides that thanks for the remember settings feature, and this awesome plugin. Has been easy to install and works great

Share This Page