From 0501905ad4435c4643bf28b78e4d40030bfa5df6 Mon Sep 17 00:00:00 2001 From: shutterbug2000 Date: Wed, 18 Oct 2023 03:37:35 -0500 Subject: [PATCH] un-hardcode port --- nex/register_common_authentication_server_protocols.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)