Feature Request: Websocket Sub-Protocol support

I would like to implement Websocket Sub-Protocol (RFC 6455, Section 1.9) support in the Websocket Node. I need this as a system I’m connecting to uses sub-protocols as a means of authentication (putting the api key in as a sub-protocol).

Work for this has already started as PR #1938 but the original author seems to have abandoned the idea years ago. It seems like a rather simple change and i’d be happy to provide the code and effort to get this into Node-Red.

I’ve done OSS dev before but never for Node-Red, so I’m curious what’s next, and what kind of questions remain.

Hi @tobiasoort,

That's great - all contributions are welcome.

If you read through the comments from me and @dceejay on that PR there are a number of questions that need thinking about.

In terms of implementation, as I say in the pr, it should target the dev branch. If we can get something merged in the next two weeks, it'll make the cut for 2.2 at the end of this month.

Nick

@knolleary are you aware the CLA signature flow (as linked in node-red/CONTRIBUTING.md at master · node-red/node-red · GitHub) is broken? It errors out:

Error

There is no CLA to sign for node-red/node-red

({"message":"Must specify access token via Authorization header. https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param","documentation_url":"https://docs.github.com/v3/#oauth2-token-sent-in-a-header"})

Ah yes. We (not so recently) had to change the cla tooling. Will get the links fixed.

When you raise the pr you'll get promoted to sign by the tool - you can do so then.

Great! The PR is done; with a great PR number. Implemented support for Websocket Subprotocols in WS Client Node. by tobiasoort · Pull Request #3333 · node-red/node-red · GitHub. I'll proceed with the CLA process directly when I receive it.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.