[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

    Raphfrk

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

    Description

    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).

    Setup

    Server

    Add the plugin file to the plugins folder

    Client

    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

    Client
    Plugin

    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

    ShadowDrakken

    even on LAN play I find the caching helps, the client doesn't have to wait on chunks so you can use longer viewing distances with fewer issues
     
  3. Offline

    sulvaat

    Is modloader mp support going to be added at some time? My friends and I used a server with the modloader mp patched version of craftproxy that was done by someone in the thread here but we would like to update to 1.2.3. It doesnt seem like they are keeping that patched version up anymore, can anyone help?
     
  4. Have you ever thought about making a reverse proxy? Running separate worlds on either different physical machines, or to utilize different cores on the same machine.
     
  5. Offline

    Raphfrk

    ServerPort allows players to teleport between servers if that is what you mean.
     
  6. Yes, but you need to run CraftProxy client-side. I mean running CraftProxy server-side instead when you have a few servers all on the same internet connection, so there's no lag/etc issues.
     
  7. Offline

    Miamore

    I can connect to my server with 99.66.9.2:20000 perfectly, and it confirms that I used the proxy in the console window.

    BUT, I don't believe the client side is actually downloading anything to the cache....

    This is what my setup looks like:

    [​IMG]

    What do I need to change?
     
  8. Offline

    ShadowDrakken

    remote server = localhost:20000
    local server = localhost:20000

    meaning, the proxy isn't running because the port is already taken

    If the server and proxy are on the same machine, the proxy needs to use a different port
     
  9. Offline

    Raphfrk

    As @ShadowDraken said, you need to use different ports. The remote port is the port for the proxy/plugin on your server.

    The local port is the port for your local proxy. This is the port you connect to with your client.
     
  10. Offline

    JacobiCarter

    If I have a server limited by upload speed, can I use this to add a second server that vanilla minecraft clients (without the proxy) can connect to to lower the strain on the first server's upload?

    Something like:

    Clients -> Server A <- Server B <- Clients

    Where Server A is bukkit + craftproxy and Server B is just craftproxy?

    Also, does this work with 1.2.5 yet?
     
  11. Offline

    Pr4w

    Hey,

    Running 1.2.4, with Cpl 161, I can't seem to get it to work properly.
    Anytime anyone tries to go through the proxy, he briefly accesses it, and gets disconnected straight away, with a "Protocol stream closed" error.
    Server says :
    Code:
    23:00:56 [INFO] Pr4w [/127.0.10.11:54490] logged in with entity id 112997 at ([Lorencia2] 226.5, 100.0, 91.5)
    23:00:56 [SEVERE] java.io.IOException: Bad packet id 80
    23:00:56 [SEVERE]      at net.minecraft.server.Packet.a(Packet.java:75)
    23:00:56 [SEVERE]      at net.minecraft.server.NetworkManager.h(NetworkManager.java:149)
    23:00:56 [SEVERE]      at net.minecraft.server.NetworkManager.c(NetworkManager.java:268)
    23:00:56 [SEVERE]      at net.minecraft.server.NetworkReaderThread.run(SourceFile:76)
    23:00:56 [INFO] Pr4w lost connection: disconnect.genericReason
    
    Proxy says :
    Code:
    Connection from 83.114.86.227/49802
    [23:01:56] 83.114.86.227/49802 (Pr4w): Connecting to : localhost 998
    [23:01:56] 83.114.86.227/49802 (Pr4w): Attempting to connect to: localhost:998
    [23:01:56] 83.114.86.227/49802 (Pr4w): Connecting to: localhost:998 from 127.0.10.10
    [23:01:56] 83.114.86.227/49802 (Pr4w): Connection successful
    [23:01:56] 83.114.86.227/49802 (Pr4w): Connecting using proxy to server connection format
    [23:01:57] 83.114.86.227/49802 (Pr4w): Server login successful
    IO ERROR
    [23:01:57] 83.114.86.227/49802 (Pr4w): Unable to flush output stream
    [23:01:57] 83.114.86.227/49802 (Pr4w): Closed connection to server
    [23:01:57] 83.114.86.227/49802 (Pr4w): Closed connection to client
    
    Running with this command :
    Code:
    java -jar CraftProxyLiter.jar 1000 localhost:998 local_cache auth_off
    What am I doing wrong ?


    Edit : Removing "local_cache" seems to fix this for me !
     
  12. Offline

    miekaskh

    Not working for 1.2.5...

    edit: NVM. Working for 1.2.5. I didn't configure the "default_server=" correctly! My mistake
     
  13. Offline

    Raphfrk

    That flag was telling the proxy to cache the chunks locally. That is supposed to happen at the client.
     
  14. Offline

    IdealIdeas

    I dont get a GUI interface when try to open the jar file.
    In fact, nothing happens when i attempt to open it.
     
  15. Offline

    Raphfrk

    You have to have the java runtime installed. If you do that in windows, it should associate java with .jar files.
     
  16. Offline

    IdealIdeas

    But I have that, still nothing.
    Maybe yours is differnt, can you give me a direct link to the java download please?
     
  17. Offline

    PSmith67

    Can someone link me the download for the player side download? I'm looking and i can't find the .jar download for players to connect to my server.

    Also after i have it downloaded where do i put this at for clientmode no GUI
    java -jar CraftProxyLiter.jar 25565 <target-server-hostname>:20000 local_cache auth_off

    EDIT: Ok i have figured all that out however i cannot get this to work properly. I know its bad to run the server and the client on the same machine but mine can handle it.

    How do i get the GUI to load up? Problem solved. When i double clicked on the .jar all that would happen was it would open it with winrar. I didn't realize i could execute it with java. [Derp]
    Where would i find the Remote Server Name?
    How do i set up the player side craftproxy without GUI so i can connect to the server using it?
    What changes do i have to make to my port settings on my server and on my router?

    I had this same problem however i figured out that if u right click the .jar and "open with" , u then select "java..." It will execute it

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

    IdealIdeas

    Didnt work. I right clicked and opened with Java(TM) Platform SE Binary and nothing happened.
     
  19. Offline

    PSmith67

    Very odd. It worked perfect for me. I don't have the solution as to why it won't work for u but that is how i was able to execute it. Maybe someone else will speak up with a solution.
     
  20. Offline

    IdealIdeas

    Do you think it could be that im using 64-bit java?
    Or maybe my computer is just retarded?
     
  21. Offline

    PSmith67

    Do u have both 32 and 64 bit java installed? I have both myself. U could try manually selecting the java to open it with by clicking "choose default program" in the drop down menu when u try to open it.
     
  22. Offline

    IdealIdeas

    You can have both 32 and 64 bit versions installed? didnt know that.

    Well I wish I could but for some reason whenever I try to open javas website to download the 32 bit version, mozilla crashes the second its loaded.
     
  23. Offline

    Simanova

    You could have installed 10 times java - the application (e.g firefox) determines what suits best.
     
  24. Offline

    Hwo

    what are the differences between the plugin and standalone?

    whether it makes sense to use a proxy server with 200 online (i7-2600, 32GB, 100Mbit/s)?


    Finally, there are a few clients.
    run proxy from the directory same them (general/client1/, general/client2/,general/CPL_cache/)
    need to store data in the directory below (/client1/CPL_cache/ , /client2/CPL_cache/)
    I changed the directory in two classes: ProxyListener and Main
    I forgot something?

    What happens if a player uses two windows at once with a client proxy and with the same directory?
     
  25. Offline

    IdealIdeas

    But that doesnt explain why I cant open the java website nor why I cant open the jar.
    I also only have 1 copy of java and its the 64-bit version.

    I have uninstalled java once before and reinstalled it as well
     
  26. Offline

    ChrysWhyte

    I am getting this error:

    Code:
    02:25 AM [INFO] Connection from 192.168.1.101/61123
    02:25 AM [INFO] 192.168.1.101/61123 (ChrysWhyte): Improper username from client no hostname provided
    02:25 AM [INFO] 192.168.1.101/61123 (ChrysWhyte): Connecting to : dewittenon.dyndns.org 25565
    02:25 AM [INFO] 192.168.1.101/61123 (ChrysWhyte): Attempting to connect to: dewittenon.dyndns.org:25565
    02:25 AM [INFO] 192.168.1.101/61123 (ChrysWhyte): Connection successful
    02:25 AM [INFO] 192.168.1.101/61123 (ChrysWhyte): Connecting using proxy to server connection format
    02:26 AM [INFO] Disconnecting /192.168.1.101:61124: Took too long to log in
    02:26 AM [INFO] 192.168.1.101/61123 (ChrysWhyte): Server login successful
    02:26 AM [INFO] 192.168.1.101/61123 (ChrysWhyte): Client requested caching mode
    02:26 AM [INFO] Read timed out
    02:26 AM [INFO] 192.168.1.101/61123 (ChrysWhyte): DownsteamBridge - EOF reached
    02:26 AM [INFO] 192.168.1.101/61123 (ChrysWhyte): Closed connection to server
    02:26 AM [INFO] 192.168.1.101/61123 (ChrysWhyte): Closed connection to client 
    testing on the server pc: running as plugin with default settings, client gui is set to localhost 20000 / localhost 25566
    I then connect to localhost 25566
     
  27. Offline

    Mr Washington

    Please update for 1.2.5! I require the use of this with Transporter but it doesn't allow users to connect!
     
  28. Offline

    Raphfrk

    There was a fair amount of changes for 1.2.5 ... esp encryption, it might take a while.

    I am doing (another) re-write so that there will be a combined solution for Spout and those who want to use the proxy, but free time is limited.
     
  29. Offline

    Reno

    [8:08:28 PM] 67.33.161.20/29341 (buckshot2825): Redirect detected: 173.236.105.216
    [8:08:29 PM] 67.33.161.20/29341 (buckshot2825): Closed connection to server
    [8:08:29 PM] 67.33.161.20/29341 (buckshot2825): Connecting to : 173.236.105.216 25565
    [8:08:29 PM] 67.33.161.20/29341 (buckshot2825): Attempting to connect to: 173.236.105.216:25565
    [8:08:29 PM] 67.33.161.20/29341 (buckshot2825): Connection successful
    [8:08:29 PM] 67.33.161.20/29341 (buckshot2825): Connecting using proxy to server connection format
    [8:08:29 PM] 67.33.161.20/29341 (buckshot2825): Login failed: Server closed connection before sending handshake

    I get the above bold message whenever 2 or more people try to connect to the proxy or go through a portal that leads to another server at the same time. When only 1 person tries to connect, it works like a charm. What can I do to fix this?
     
  30. Offline

    Raphfrk

    That could be a timeout thing, you need to set it to rotate local ips.
     
  31. Offline

    Reno

    How would I go about doing that?
     

Share This Page