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

Add the matcher sample back to the repo #196

Merged
merged 3 commits into from
Jan 20, 2024

Conversation

kbirk
Copy link
Contributor

@kbirk kbirk commented Jan 20, 2024

Hey there, while updating my project to the latest yojimbo changes I noticed that the matcher code was removed.

Years ago when I began using yojimbo in my projects I found the code in the matcher example extremely valuable for implementing the connection token logic. I am certain it is valuable to others as well.

If you are open to re-adding it, or putting it in its own repo, I've fixed up the Dockerfile and updated the code a little bit. The changes include:

  • Removed the cgo dependency requiring libsodium, the golang.org/x/crypto package now provides a native go implementation of the crypto_aead_xchacha20poly1305_ietf_encrypt function.
  • Switch from the gorilla/mux router to chi. chi is a very lightweight http router that uses the go standard lib interfaces rather than custom ones.
  • Minor code convention changes to fit more into the idiomatic style of go. go vet no longer complains about things.

Thanks again for all the work you've done on these libraries and your articles on network programming!

@gafferongames
Copy link
Contributor

Thank you. I was planning on adding it back in an integrated example form, but I didn't have time over the holidays to finish that work. This will be a good stop gap -- thank you

@gafferongames gafferongames merged commit 407bb33 into mas-bandwidth:main Jan 20, 2024
6 checks passed
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.

2 participants