interledgerjs / ilp-plugin-btp

This has been moved to the monorepo https://github.com/interledgerjs/interledgerjs
8 stars 7 forks source link

adding host to the listener options #25

Open N3TC4T opened 6 years ago

N3TC4T commented 6 years ago

Hey

can we have host option on ws server listener ?

https://github.com/interledgerjs/ilp-plugin-btp/blob/master/src/index.ts#L96

can be added easily on WebSocketServer params

https://github.com/interledgerjs/ilp-plugin-btp/blob/master/src/index.ts#L196

https://github.com/websockets/ws/blob/master/doc/ws.md#new-websocketserveroptions-callback

as we don't have the SSL/TLS option on WebSocket and listener yet and we need to use an load balancer like nginx for this purpose so I think that's would be good if we have the host option and could choose the localhost and proxy to SSL with load balancer .

Regards

sharafian commented 6 years ago

Doesn't the current configuration work with an nginx reverse proxy or load balancer? I'm not sure I understand what the desired effect of changing the host would be

N3TC4T commented 6 years ago

It's work but in the end we have two port that bind in public IP , one is opened by WebSocketServer (ws non TLS ) and one with load balancer (wss with TLS)