Better HN
topnewbestaskshowjobs
Log inSign up

hach-que

13 karma · joined Feb 27, 2017 (9y ago) · 3 submissions

Submissions

1.

Introducing pkgsign: package signing and verification for npm(medium.com ↗)

3 points · by hach-que · 8y ago · discuss

comment 9y ago · link · parent

The symmetric key / connection token is generated with netcode_generate_connect_token. This is normally done on your authentication server, which runs over normal HTTPS. Thus the workflow is basically like this:

- Web browser connects to like https://auth.myapp.com. This can either be part of the login process or server discovery, it's totally up to you and specific to your app. This service calls netcode_generate_connect_token and returns the symmetric key / connection token in the response. - The client then uses this symmetric key / connection token when calling netcode_client_connect. - And you're done, you can now use the rest of the netcode APIs.

The second thing that you mentioned isn't required. The token is unique to the client already, so a server can confirm that it's a specific client connecting.

comment 9y ago · link · parent

I'm an external contributor who did the C# bindings for netcode.io available here: https://github.com/RedpointGames/netcode.io

As someone who wrote her own (non-encrypted) networking protocol for desktop games, netcode.io certainly seems easier (especially with the built-in security), so in the near future I intend to move my projects over to using netcode.io instead of what I have currently.