Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update to nex-go v2 #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ItzSwirlz
Copy link

@ItzSwirlz ItzSwirlz commented Jul 15, 2024

Resolves #3

Changes:

  • Update to nex-go v2.0

  • Now uses the nex-protocols-common-go implementations of the Match Making, Match Making Ext and Match Make Extension protocol (along with the servers own handler methods)

  • Requires the new environment variable PN_WIIU_CHAT_KERBEROS_PASSWORD

  • Uses GRPC for account authentication. This comes with its respective environment variables

  • I have read and agreed to the Code of Conduct.

  • I have read and complied with the contributing guidelines.

  • What I'm implementing was an approved issue.

  • I have tested all of my changes.

Testing this locally will require some rigging to wiiu-chat-authentication (switching it to the ticket-granting protocol) for it to work. I don't have more than one Wii U, but I was able to get into the main Wii U Chat menu.

@ItzSwirlz ItzSwirlz marked this pull request as draft July 15, 2024 18:25
@ItzSwirlz ItzSwirlz changed the title [WIP] chore: update to nex-go v2 chore: update to nex-go v2 Jul 18, 2024
@ItzSwirlz ItzSwirlz marked this pull request as ready for review July 18, 2024 15:42
@@ -27,7 +27,7 @@ func connectMongo() {
mongoContext, _ = context.WithTimeout(context.Background(), 10*time.Second)
_ = mongoClient.Connect(mongoContext)

accountDatabase = mongoClient.Database("pretendo")
accountDatabase = mongoClient.Database("pretendo_account")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what the self-hosted pretendo server was using for its DB name, so I just set it to this. I'm assuming that's what it actually is called. Do we need an environment variable for this?

@@ -8,7 +8,7 @@ import (
"go.mongodb.org/mongo-driver/mongo/options"
)

func GetCallInfoByTarget(target uint32) (uint32, uint32, bool) { // caller pid, target pid, ringing
func GetCallInfoByTarget(target uint64) (uint64, uint64, bool) { // caller pid, target pid, ringing
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved to this because PIDs use uint64

}

// The user must be kicked, otherwise the app hangs forever.
globals.NEXServer.TimeoutKick(client)
// globals.NEXServer.TimeoutKick(client)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only area of concern about this PR. How to handle the timeout kick.

fmt.Println("======================")
})

// * Register the common handlers first so that they can be overridden if needed
registerCommonProtocols()
registerNEXProtocols()

globals.NEXServer.Listen(":60005")
globals.SecureServer.Listen(60005)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would env variable this but I'd rather wait until we merge the authentication repo in here since it also uses the port

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: Update to nex-go v2.0
1 participant