Skip to content

bind to unix domain socket #144

Closed
@leifwalsh

Description

@leifwalsh

Some people in other issues and discussions have asked for better security and it's been suggested to run openvscode-server behind a reverse proxy like NGINX. That works well if you can bind only to localhost or use firewall rules to prevent outsiders from bypassing the proxy, but doesn't help if you're on a shared machine that many people can SSH to.

For this case, it would help if there were an option (e.g. ./server.sh --socket /tmp/leif-openvscode-server.sock) to listen on a UNIX domain socket instead of a TCP port. This way, we could use file permissions to make sure no other users on the machine can connect to that socket, and I could run openvscode-server and my proxy as the same user, ensuring that the only way in is through the proxy.

I believe this change is simple: just add an option to the server and call this variant of http.Server.listen() that accepts a path: https://nodejs.org/api/net.html#net_server_listen_path_backlog_callback

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions