Compare commits

...

3 Commits

Author SHA1 Message Date
James Coglan 1120828003 Bump version to 0.8.1. 2014-11-12 19:35:37 +00:00
James Coglan 59911312ac Merge pull request #33 from meteor/specify-servername
Fix proxy connections to non-localhost SSL origins
2014-11-12 19:27:41 +00:00
David Glasser 98298acb36 Fix proxy connections to non-localhost SSL origins
The socket form of tls.connect needs to be told the server name it is
connecting to in order to validate the server certificate (and to
perform SNI). Without this change, just about any attempt to proxy to an
SSL origin will fail.

This name defaults to 'localhost':
  https://github.com/joyent/node/blob/v0.10/lib/tls.js#L1349
so an attempt to proxy to an SSL origin named 'localhost' would have
succeeded, which is why tests passed.
2014-11-10 16:47:56 -08:00
3 changed files with 7 additions and 2 deletions
+5
View File
@@ -1,3 +1,8 @@
### 0.8.1 / 2014-11-12
* Send the correct hostname when upgrading a connection to TLS
### 0.8.0 / 2014-11-08
* Support connections via HTTP proxies
+1 -1
View File
@@ -66,7 +66,7 @@ Client.prototype._configureProxy = function(proxy, originTLS) {
this._proxy.on('connect', function() {
if (secure) {
var options = {socket: self._stream};
var options = {socket: self._stream, servername: uri.hostname};
for (name in originTLS) options[name] = originTLS[name];
self._stream = tls.connect(options);
self._configureStream();
+1 -1
View File
@@ -5,7 +5,7 @@
, "keywords" : ["websocket", "eventsource"]
, "license" : "MIT"
, "version" : "0.8.0"
, "version" : "0.8.1"
, "engines" : {"node": ">=0.4.0"}
, "main" : "./lib/faye/websocket"
, "dependencies" : {"websocket-driver": ">=0.4.0"}