feat: initialize panel access before linking Minecraft accounts
Configure connection and storage before creating or resuming the one-time Owner login. Remove Minecraft prerequisites from setup and preserve established login credentials. Let staff preview and confirm roles from configured authentication sources using the existing account-link storage and game UUID mapping. Retain in-game code proof for players, add client-version and lobby guidance, and support NodePort passkey origins.
This commit is contained in:
59 files changed
+1702
-1564
No files matched your search
@@ -33,9 +33,6 @@ func setupPanelNodePort() int {
|
||||
}
|
||||
|
||||
func localPanelURL(rootDomain, adminHostname string) string {
|
||||
if ip := rootDomainEmbeddedIP(rootDomain); ip != "" {
|
||||
return fmt.Sprintf("https://%s:%d", ip, setupPanelNodePort())
|
||||
}
|
||||
host := defaultAdminHostname(rootDomain, adminHostname)
|
||||
if host == "" {
|
||||
return ""
|
||||
@@ -57,7 +54,7 @@ func rootDomainEmbeddedIP(rootDomain string) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// setupGameAddress is where the operator joins in Minecraft to bind the Owner: the
|
||||
// setupGameAddress is where players join Minecraft: the
|
||||
// IP a nip.io or sslip.io root domain spells out (nothing to resolve), otherwise the
|
||||
// root domain, with the port when it is not Minecraft's default. The proxy lands
|
||||
// every fresh connection on the login server whatever name it was dialled by.
|
||||
@@ -75,15 +72,6 @@ func setupGameAddress(rootDomain string, gamePort int) string {
|
||||
return net.JoinHostPort(host, strconv.Itoa(gamePort))
|
||||
}
|
||||
|
||||
// gameAddrIsIP reports whether addr, a host or host:port, names its host by IP.
|
||||
func gameAddrIsIP(addr string) bool {
|
||||
host := addr
|
||||
if h, _, err := net.SplitHostPort(addr); err == nil {
|
||||
host = h
|
||||
}
|
||||
return net.ParseIP(host) != nil
|
||||
}
|
||||
|
||||
func localPanelOrigin() string {
|
||||
return fmt.Sprintf("https://127.0.0.1:%d", setupPanelNodePort())
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user