Add Bedrock protocol 944 support ( 1.26.1 )#114
Open
MEMOxiiii wants to merge 11 commits intoParoxity:masterfrom
Open
Add Bedrock protocol 944 support ( 1.26.1 )#114MEMOxiiii wants to merge 11 commits intoParoxity:masterfrom
MEMOxiiii wants to merge 11 commits intoParoxity:masterfrom
Conversation
There was a problem hiding this comment.
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.
| module github.com/paroxity/portal | ||
|
|
||
| go 1.22 | ||
| go 1.24.0 |
| @@ -15,9 +15,9 @@ jobs: | |||
| - name: Checkout Repo | |||
| uses: actions/checkout@v2 | |||
| } | ||
|
|
||
| func (t *translator) translateRuntimeID32(id uint32) uint32 { | ||
| return uint32(t.translateRuntimeID(uint64(id))) |
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 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
…set transferring flag
…th screen during transfer
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.