Currently the http server created by ssb-ws binds to all available IP
addresses, because no host is specified to listen(). This is not
desireable, because users expect the host they configured to be used.
(either via config.connections.incoming.ws.host, config.ws.host or
config.host)
This also support auto-selecting a host by specifying a scope and no
host. If none of incoming.ws.host, incoming.ws.scope, condig.ws.host or config.host
is specified, host defaults to 'localhost'.
Binding to localhost by default instead of to all available IPs breaks backward
compatibility. However, this can be fixed in ssb-config and secret-stack
by creating a default ws incoming with host: '::', or better, by defaulting config.host to '::'
This also adds support for multiple http/websocket servers. Users can
configure multiple ws incomings with different scopes and transforms,
for example, ws/noauth for localhost only and ws/shs in the LAN.
I've read the code and it seems reasonable (though it is late here).
I'd like to escalate this to someone else who knows this domain better. @dominictarr can you review or delegate please?
Currently the http server created by ssb-ws binds to all available IP addresses, because no host is specified to
listen()
. This is not desireable, because users expect the host they configured to be used. (either via config.connections.incoming.ws.host, config.ws.host or config.host)This also support auto-selecting a host by specifying a scope and no host. If none of incoming.ws.host, incoming.ws.scope, condig.ws.host or config.host is specified, host defaults to 'localhost'.
Binding to localhost by default instead of to all available IPs breaks backward compatibility. However, this can be fixed in ssb-config and secret-stack by creating a default ws incoming with
host: '::'
, or better, by defaulting config.host to '::'This also adds support for multiple http/websocket servers. Users can configure multiple ws incomings with different scopes and transforms, for example, ws/noauth for localhost only and ws/shs in the LAN.