--- /dev/null +++ b/docs/configuration/outbound/minecraft.md @@ -0,0 +1,52 @@ +### Structure + +```json +{ + "type": "minecraft", + "tag": "mc-out", + + "server": "mc.example.com", + "server_port": 25565, + "username": "Steve", + "password": "my-secret-password", + + ... // Dialer Fields +} +``` + +### Dialer Fields + +See [Dialer Fields](/configuration/shared/dialer/) for details. + +### Fields + +#### server + +==Required== + +The Minecraft server address. + +#### server_port + +The Minecraft server port. Defaults to `25565`. + +#### username + +The username to authenticate with. Defaults to `Steve`. + +#### password + +The password to authenticate with. + +### Description + +The Minecraft outbound connects to a Minecraft inbound and tunnels traffic through the Minecraft Java Edition protocol. + +The connection flow is: + +1. Outbound connects to the server and sends a Minecraft handshake + login start +2. Server responds with an encryption request (RSA public key + verify token) +3. Outbound derives the shared secret from `SHA-256(password + verify_token)[:16]` and sends an encryption response +4. Both sides switch to AES/CFB8 encryption using the derived shared secret +5. After receiving login success, smux multiplexing is established over the encrypted connection +6. Each smux stream carries a 1-byte command (`0x01` for TCP, `0x03` for UDP) followed by a SOCKS address header