Skip to content

Commit

Permalink
un-hardcode port
Browse files Browse the repository at this point in the history
  • Loading branch information
shutterbug2000 committed Oct 18, 2023
1 parent d6e1701 commit 0501905
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nex/register_common_authentication_server_protocols.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
Expand Down

0 comments on commit 0501905

Please sign in to comment.