Skip to content

gRPC Protocol Reference

Complete reference for the gRPC protocol used by Passage’s custom adapters. All services are defined in the scrayosnet.passage.adapter package.

For implementation examples, see Custom gRPC Adapters.

passage-adapters/grpc/proto/adapter/
├── adapter.proto # Common types
├── status.proto # Status service
├── authentication.proto # Authentication service
├── discovery.proto # Discovery service
├── discovery_action.proto # Discovery Action service
└── localization.proto # Localization service
ServiceRPCRequestResponseConfig type
StatusGetStatusStatusRequestStatusResponsegrpc (in status)
AuthenticationAuthenticateAuthenticationRequestAuthenticationResponsegrpc (in authentication)
DiscoveryGetTargetsTargetRequestTargetsResponsegrpc_discovery (in discovery)
DiscoveryActionApplyApplyRequestApplyResponsegrpc (in discovery.actions)
LocalizationLocalizeLocalizationRequestLocalizationResponsegrpc (in localization)

These types are shared across all services.

message Address {
string hostname = 1;
uint32 port = 2;
}
FieldTypeDescription
hostnamestringHostname or IP address
portuint32Port number

Represents a backend Minecraft server.

message Target {
string identifier = 1;
Address address = 2;
repeated MetaEntry meta = 3;
uint32 priority = 4;
}
FieldTypeDescription
identifierstringUnique name for the server
addressAddressNetwork address
metarepeated MetaEntryKey-value metadata pairs
priorityuint32Priority for ordering (lower = higher priority)

message MetaEntry {
string key = 1;
string value = 2;
}
FieldTypeDescription
keystringMetadata key (e.g., "type", "players")
valuestringMetadata value (always a string)

Client connection information, passed to Discovery, DiscoveryAction, and Authentication services.

message ClientInfo {
Address client_address = 1;
Address server_address = 2;
uint64 protocol_version = 3;
}
FieldTypeDescription
client_addressAddressThe connecting client’s address
server_addressAddressThe address the client connected to
protocol_versionuint64Minecraft protocol version number

Player identity information.

message PlayerInfo {
string name = 1;
string id = 2;
}
FieldTypeDescription
namestringPlayer’s username
idstringPlayer’s UUID (with hyphens)

Minecraft player profile, used in authentication responses.

message Profile {
string id = 1;
string name = 2;
repeated ProfileProperty properties = 3;
repeated string profile_actions = 4;
}
FieldTypeDescription
idstringPlayer UUID
namestringPlayer username
propertiesrepeated ProfilePropertyProfile properties (e.g., textures)
profile_actionsrepeated stringPending moderation actions

message ProfileProperty {
string name = 1;
string value = 2;
optional string signature = 3;
}
FieldTypeDescription
namestringProperty name (e.g., "textures")
valuestringBase64-encoded property value
signaturestring (optional)Base64-encoded Mojang signature

Provides server list status information for Minecraft client pings.

service Status {
rpc GetStatus(StatusRequest) returns (StatusResponse);
}
message StatusRequest {
Address client_address = 1;
Address server_address = 2;
uint64 protocol = 3;
}
FieldTypeDescription
client_addressAddressThe client’s network address
server_addressAddressThe address the client connected to
protocoluint64Client’s Minecraft protocol version
message StatusResponse {
optional StatusData status = 1;
}

If status is null, the connection is rejected.

message StatusData {
ProtocolVersion version = 1;
optional Players players = 2;
optional string description = 3;
optional bytes favicon = 4;
optional bool enforces_secure_chat = 5;
}
FieldTypeDescription
versionProtocolVersionVersion and protocol info
playersPlayers (optional)Player count and samples
descriptionstring (optional)MOTD as JSON text component
faviconbytes (optional)64x64 PNG image data
enforces_secure_chatbool (optional)Whether secure chat is enforced
message ProtocolVersion {
string name = 1;
int32 protocol = 2;
}
FieldTypeDescription
namestringDisplay name in server list (e.g., "My Network")
protocolint32Protocol version number (e.g., 769 for 1.21.4)
message Players {
uint32 online = 1;
uint32 max = 2;
repeated PlayerEntry samples = 3;
}
message PlayerEntry {
string name = 1;
string id = 2;
}

Example response:

{
"status": {
"version": {"name": "My Network", "protocol": 769},
"players": {
"online": 42, "max": 100,
"samples": [{"name": "Steve", "id": "069a79f4-44e9-4726-a5be-fca90e38aaf5"}]
},
"description": "{\"text\":\"Welcome!\",\"color\":\"gold\"}"
}
}

Authentication Service (authentication.proto)

Section titled “Authentication Service (authentication.proto)”

Verifies player identity using custom logic.

service Authentication {
rpc Authenticate(AuthenticationRequest) returns (AuthenticationResponse);
}
message AuthenticationRequest {
ClientInfo client = 1;
PlayerInfo player = 2;
bytes shared_secret = 3;
bytes encoded_public = 4;
}
FieldTypeDescription
clientClientInfoClient and server addresses, protocol version
playerPlayerInfoPlayer name and UUID
shared_secretbytesThe encrypted shared secret from the client
encoded_publicbytesThe encoded public key
message AuthenticationResponse {
oneof reason {
Profile profile = 1;
string key = 2;
}
}
FieldTypeDescription
profileProfileAccept: the player’s verified profile
keystringReject: a localization key for the disconnect message

Return exactly one of profile or key:

  • profile: Allows the connection with the given identity
  • key: Disconnects the player with the localized message for that key (e.g., "disconnect_unauthenticated")

Discovers available backend servers.

service Discovery {
rpc GetTargets(TargetRequest) returns (TargetsResponse);
}
message TargetRequest {
ClientInfo client = 1;
}
FieldTypeDescription
clientClientInfoClient address, server address, and protocol version
message TargetsResponse {
repeated Target targets = 1;
}

Returns a list of available backend servers with metadata.

Example request/response:

// Request
{"client": {"client_address": {"hostname": "192.168.1.100", "port": 54321}, "server_address": {"hostname": "mc.example.net", "port": 25565}, "protocol_version": 769}}
// Response
{"targets": [{"identifier": "hub-1", "address": {"hostname": "10.0.1.10", "port": 25565}, "meta": [{"key": "players", "value": "15"}]}]}

Discovery Action Service (discovery_action.proto)

Section titled “Discovery Action Service (discovery_action.proto)”

Transforms the target list in the actions pipeline.

service DiscoveryAction {
rpc Apply(ApplyRequest) returns (ApplyResponse);
}
message ApplyRequest {
ClientInfo client = 1;
PlayerInfo player = 2;
repeated Target targets = 3;
}
FieldTypeDescription
clientClientInfoClient connection information
playerPlayerInfoPlayer name and UUID
targetsrepeated TargetCurrent target list to process
message ApplyResponse {
oneof reason {
Targets targets = 1;
string key = 2;
}
}
message Targets {
repeated Target targets = 1;
}
FieldTypeDescription
targetsTargetsAccept: the modified target list
keystringReject: a localization key for the disconnect message

Return exactly one of targets or key:

  • targets: Returns the modified target list (can filter, reorder, or replace targets)
  • key: Rejects the player with a localized disconnect message

Provides translated disconnect messages.

service Localization {
rpc Localize(LocalizationRequest) returns (LocalizationResponse);
}
message LocalizationRequest {
optional string locale = 1;
string key = 2;
map<string, string> params = 3;
}
FieldTypeDescription
localestring (optional)Player’s client locale (e.g., "en", "de")
keystringMessage key to localize (e.g., "disconnect_timeout")
paramsmapSubstitution parameters
message LocalizationResponse {
string message = 1;
}
FieldTypeDescription
messagestringThe localized message as a Minecraft JSON text component

Terminal window
# Status
grpcurl -plaintext -import-path ./proto -proto adapter/status.proto \
-d '{"client_address":{"hostname":"127.0.0.1","port":12345},"server_address":{"hostname":"localhost","port":25565},"protocol":769}' \
localhost:50051 scrayosnet.passage.adapter.Status/GetStatus
# Authentication
grpcurl -plaintext -import-path ./proto -proto adapter/authentication.proto \
-d '{"client":{"client_address":{"hostname":"127.0.0.1","port":12345},"protocol_version":769},"player":{"name":"Steve","id":"069a79f4-44e9-4726-a5be-fca90e38aaf5"}}' \
localhost:50051 scrayosnet.passage.adapter.Authentication/Authenticate
# Discovery
grpcurl -plaintext -import-path ./proto -proto adapter/discovery.proto \
-d '{"client":{"client_address":{"hostname":"127.0.0.1","port":12345},"protocol_version":769}}' \
localhost:50051 scrayosnet.passage.adapter.Discovery/GetTargets
# Discovery Action
grpcurl -plaintext -import-path ./proto -proto adapter/discovery_action.proto \
-d '{"client":{"client_address":{"hostname":"127.0.0.1","port":12345}},"player":{"name":"Steve","id":"069a79f4-44e9-4726-a5be-fca90e38aaf5"},"targets":[{"identifier":"hub-1","address":{"hostname":"10.0.1.10","port":25565}}]}' \
localhost:50051 scrayosnet.passage.adapter.DiscoveryAction/Apply
# Localization
grpcurl -plaintext -import-path ./proto -proto adapter/localization.proto \
-d '{"locale":"en","key":"disconnect_timeout"}' \
localhost:50051 scrayosnet.passage.adapter.Localization/Localize