Available Examples
Client Example
Connect to a Minecraft server and interact with packets
Server Example
Create a custom Minecraft server that accepts connections
Proxy Example
Build a proxy that forwards players between servers
Getting Started
All examples use the maingithub.com/sandertv/gophertunnel/minecraft package. Make sure you have it installed:
These examples are extracted from the actual Gophertunnel source code and represent real, working implementations.
Common Patterns
Across all examples, you’ll notice some common patterns:- Packet Handling: All connections use
ReadPacket()andWritePacket()for communication - Error Handling: Network operations return errors that should be handled appropriately
- Authentication: Clients use
auth.TokenSourcefor Microsoft authentication - Concurrency: Servers and proxies use goroutines to handle multiple connections