diff --git a/nex/register_common_authentication_server_protocols.go b/nex/register_common_authentication_server_protocols.go index ec13447..ca7ff01 100644 --- a/nex/register_common_authentication_server_protocols.go +++ b/nex/register_common_authentication_server_protocols.go @@ -2,6 +2,7 @@ package nex import ( "os" + "strconv" nex "github.com/PretendoNetwork/nex-go" ticket_granting "github.com/PretendoNetwork/nex-protocols-common-go/ticket-granting" @@ -11,10 +12,12 @@ import ( func registerCommonAuthenticationServerProtocols() { ticketGrantingProtocol := ticket_granting.NewCommonTicketGrantingProtocol(globals.AuthenticationServer) + port, _ := strconv.Atoi(os.Getenv("PN_MINECRAFT_SECURE_SERVER_PORT")) + secureStationURL := nex.NewStationURL("") secureStationURL.SetScheme("prudps") secureStationURL.SetAddress(os.Getenv("PN_MINECRAFT_SECURE_SERVER_HOST")) - secureStationURL.SetPort(61001) + secureStationURL.SetPort(uint32(port)) secureStationURL.SetCID(1) secureStationURL.SetPID(2) secureStationURL.SetSID(1)