-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using ws+unix with a specific path #236
Comments
Only for further reference, a workaround for this issue is: var url = require('url');
var WebSocket = require('ws');
var address = url.parse('ws+unix:///var/run/docker.sock');
address.path = '/container/71501a8ab0f8/attach/ws';
var ws = new WebSocket(address); This works because WebSocket.js doesn't re-parse the url if it already is in a parsed object. Tks @nuxlli |
request.js handles it like this:
What do you think about a pull request that allows that format? |
WebSocket still seems to try and parse it as a URL even if you |
Refs: #528 |
Fixed by 060b275, closing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How can I use socketPath and simultaneously specifying an endpoint path?
Use case:
socketPath: /var/run/docker.sock
path: /container/71501a8ab0f8/attach/ws
If i do: ws+unix:///var/run/docker.sock/container/71501a8ab0f8/attach/ws it will not work because url.parse in WebSocket.js#L581 will return the full path after ws+unix://
The text was updated successfully, but these errors were encountered: