Skip to content

0x1bd/BlockGameProxy

Repository files navigation

Block Game Proxy (BGP)

A rather simple Minecraft proxy that keeps a persistent connection to a target server so your account appears online 24/7. BGP runs a proxy client that stays connected to the target (acting as a bot when idle) and a proxy server that accepts a single player connection and forwards gameplay traffic between that player and the target.

Parts of the code were taken and modified from other projects like ZenithProxy and 2based2wait.

Diagram

Normal

flowchart TD
    Player <--> Target["Target Server"]
Loading

BGP

flowchart TD
    Player <--> ProxyServer["Proxy Server"]
    ProxyServer <--> ProxyClient["Proxy Client<br/>(online on target server 24/7)"]
    ProxyClient <--> Target["Target Server"]
Loading

What it does

  • Keeps a live connection to a target server even with one online.
  • Lets one player connect to the proxy; that player’s actions are relayed to the target server and world data is relayed back.
  • If you disconnect, the client stays connected as a bot and restores the world when you reconnect.

Installation

  1. Download the latest release .jar file from the Releases page. (Alternatively, you can build from source using Gradle — see Building from Source below.)

  2. Create a new folder for BGP and place the downloaded JAR inside it.

  3. Run BGP for the first time to generate the config file:

    java -jar BlockGameProxy-<version>.jar

    (Replace <version> with the actual version number of your downloaded JAR.)

  4. After the first run, a file named config.yml will appear in the same directory.

  5. Restart BGP:

    java -jar BlockGameProxy-<version>.jar

    Your proxy instance should now start up and maintain a persistent connection to the target server.


Configuration

The first time you run BGP it will generate a config.yml file. In this file you can configurate BGP. By default, Microsoft (MSA) authentication is disabled, meaning you cannot connect to non-cracked (online-mode) servers until you enable MSA.

To enable MSA authentication, set auth.mode to msa:

bindPort: 25566
targetServer:
  host: "0.0.0.0"
  port: 25565
auth:
  offline: "msa"
  name: "BGP_Test"
reconnectDelaySeconds: 5

When auth.mode is msa, MSA takes priority - the name field in the config will be ignored. BGP will use the Microsoft account profile provided by the MSA authentication flow (or the cached MSA session located in cache/microsoft_session.json) instead of the name value.

Caution

Do not share the cache/microsoft_session.json file! Anyone with this file can log into your account!


Running with debug logs

If you want to see debug information from BGP run it with the -Dlog.level=DEBUG argument:

java -Dlog.level=DEBUG -jar BlockGameProxy-<version>.jar

Building from source (Optional)

If you prefer to build manually:

git clone https://github.com/0x1bd/BlockGameProxy.git
cd BlockGameProxy
./gradlew build

The compiled JAR will be located in:

build/libs/BlockGameProxy-<version>.jar

Development

To begin development, first clone the repository:

git clone https://github.com/0x1bd/BlockGameProxy.git
cd BlockGameProxy

Build the proxy

The main project can be build using:

./gradlew build

Running DataGen

If you want to begin development with the DataGen module, run this command instead:

./gradlew runServer -PincludeDataGen=true

About

A proxy for block game that allows being online 24/7.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •