Closed Rush closed 10 years ago
You could use different NPNProtocols
for each different SNI context in node, give it a try! ;)
Okay, so you're giving priority to this setting but what should I set it to?
NPNProtocols: An array or Buffer of possible NPN protocols. (Protocols should be ordered by their priority).
I want to either allow spdy
for a particular host or not. I am using spdy.createServer
.
Aaaah, I think I see what you mean.
So basically, you could pass the SNICallback
option as in http://nodejs.org/api/tls.html#tls_tls_createserver_options_secureconnectionlistener, and make it return contexts with various NPNProtocols
values as described in the same doc too.
I do not see the exact values I should set to make this work. So, would this work?
context.NPNProtocols = ['https']
context.NPNProtocols = ['spdy', 'https']
Aaah, sorry! Didn't get it. You could put here ['spdy/3.1', 'spdy/3', 'spdy/2', 'http/1.1']
.
I know node provides only
NPNProtocols
without dynamic capabilities but perhaps it could be improved. What do you think?