Installation
Gophertunnel is distributed as a Go module and can be easily integrated into your Go projects.Prerequisites
Check Go Version
Gophertunnel requires Go 1.24 or higher. Verify your Go version:If you need to upgrade, download the latest version from go.dev.
Installing Gophertunnel
Install Gophertunnel usinggo get:
github.com/sandertv/go-raknet- RakNet protocol implementationgolang.org/x/oauth2- OAuth2 authentication for Xbox Livegithub.com/google/uuid- UUID generation- And other necessary packages
The
go get command will automatically add Gophertunnel to your go.mod file and download all required dependencies.Verify Installation
Create a simple test file to verify the installation:Package Structure
Gophertunnel is organized into several packages:| Package | Description |
|---|---|
minecraft | Core package for client/server connections |
minecraft/auth | Xbox Live and Microsoft authentication |
minecraft/protocol | Protocol definitions and packet structures |
minecraft/protocol/packet | Individual packet implementations |
minecraft/resource | Resource pack handling |
minecraft/text | Text formatting and color codes |
Import Examples
Here are the most common imports you’ll use:Updating Gophertunnel
To update to the latest version:Gophertunnel supports only one Minecraft version at a time (generally the latest official release). When updating, check the release notes for protocol version changes.
Next Steps
Quick Start Guide
Build your first Minecraft client or server with Gophertunnel