Skip to content

Add Bedrock protocol 944 support ( 1.26.1 )#114

Open
MEMOxiiii wants to merge 11 commits intoParoxity:masterfrom
MEMOxiiii:master
Open

Add Bedrock protocol 944 support ( 1.26.1 )#114
MEMOxiiii wants to merge 11 commits intoParoxity:masterfrom
MEMOxiiii:master

Conversation

@MEMOxiiii
Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings April 11, 2026 22:24
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the proxy to support Minecraft: Bedrock protocol v944 (1.26.1) by aligning packet translation logic and connection metadata handling with newer gophertunnel structures and types.

Changes:

  • Update runtime/unique ID translation to handle new packet field types (e.g., uint32, int64) and more flexible metadata numeric types.
  • Upgrade Go + networking dependencies (gophertunnel, go-raknet, and related indirect deps) and update CI to use a newer Go toolchain.
  • Expand README with updated project documentation and add targeted translator unit tests.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
session/translator.go Adjusts packet ID translation for protocol v944 type changes; adds helper translators and more robust metadata translation.
session/translator_test.go Adds unit tests covering mixed numeric metadata translation and updated packet translation behavior.
session/session.go Tweaks outbound dial client/identity fields (clears platform IDs; sets ThirdPartyName).
examples/main.go Fixes resource-pack encryption key lookup to use UUID strings; avoids nil deref on accept errors.
go.mod Raises Go version and upgrades gophertunnel + indirect dependencies.
go.sum Updates dependency checksums for the upgraded module set.
README.md Replaces the README with an expanded, more detailed project overview and configuration docs.
.github/workflows/build.yml Updates CI to use actions/setup-go@v5 and Go 1.24.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread go.mod
module github.com/paroxity/portal

go 1.22
go 1.24.0
@@ -15,9 +15,9 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v2
Comment thread session/translator.go
}

func (t *translator) translateRuntimeID32(id uint32) uint32 {
return uint32(t.translateRuntimeID(uint64(id)))
Comment thread session/translator.go
Comment on lines +291 to +296
case uint64:
return uint64(t.translateUniqueID(int64(value)))
case uint32:
return uint32(t.translateUniqueID(int64(value)))
case uint:
return uint(t.translateUniqueID(int64(value)))
Comment thread README.md
Comment on lines +2 to +12
<img src="https://raw.githubusercontent.com/MEMOxiiii/portal/master/banner.png" alt="Portal Banner" width="100%"/>
</p>

<p align="center">
<strong>Portal</strong> — A lightweight transfer proxy for Minecraft: Bedrock Edition
</p>

<p align="center">
<a href="https://github.com/MEMOxiiii/portal/releases"><img src="https://img.shields.io/github/v/release/MEMOxiiii/portal?style=flat-square&color=%2300b894" alt="Release"></a>
<a href="https://github.com/MEMOxiiii/portal/blob/master/LICENCE"><img src="https://img.shields.io/badge/License-Apache%202.0-0984e3?style=flat-square" alt="License"></a>
<img src="https://img.shields.io/badge/Go-1.24+-00cec9?style=flat-square&logo=go&logoColor=white" alt="Go 1.24+">
- Add LegacyAuth bool to RegisterServer packet (marshal/unmarshal)
- Add legacyAuth field to server.Server with getter
- Update RegisterServerHandler to pass LegacyAuth to server.New()
- Update session.dial() to use srv.LegacyAuth() for EnableLegacyAuth
- Allows PocketMine (legacy=true) and GeyserMC (legacy=false) simultaneously
- Track player death state via Respawn packets (dead atomic.Bool)
- Force-respawn dead players before initiating transfer dimension trick
- Send Respawn{ReadyToSpawn} after transfer if player was dead
- Send NetworkChunkPublisherUpdate after transfer for faster chunk loading
- Increase empty chunk grid from 3x3 to 5x5 during dimension trick
- Fixes: dead players getting stuck when transferred to GeyserMC
…ansfer

- New DisconnectPlayer packet (0x0C) sent from proxy to server before dial
- PreTransfer hook on Store notifies target server to clean stale sessions
- Retry logic: if dial fails with 'already logged in', wait 2s and retry once
- 500ms delay after DisconnectPlayer to allow session cleanup
…ransfer

Prevents stale sessions on GeyserMC/Spigot by sending a proper Minecraft
Disconnect packet instead of relying solely on Raknet connection close.
…sion

GeyserMC uses XUID to detect duplicate sessions. When proxy cleared XUID
for all connections, every player had XUID='' causing the second player to
collide with the first. Now:
- Legacy auth (PocketMine): clear XUID (embedded in Xbox JWT chain)
- Non-legacy auth (GeyserMC): keep real XUID + KeepXBLIdentityData=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants