Skip to content

ip2unix socket unlinks immediately after creation #28

Open
@leifwalsh

Description

@leifwalsh

I'm trying to use ip2unix to make JetBrains Projector listen on a unix socket instead of an ip socket, as described in https://youtrack.jetbrains.com/issue/PRJ-278. I can put Projector behind an Envoy reverse proxy to terminate SSL and authentication/authorization, but I'm concerned that Projector will still be listening on the loopback address, which means on shared hosts, other users can connect to Projector directly without going through Envoy.

I tried wrapping Projector in ip2unix -r tcp,address=::ffff:127.0.0.1,port=8887,path=/tmp/projector.sock, but it appears that the process creates the socket file but then immediately unlinks it. I think maybe this has something to do with #16, possibly the JVM is binding the socket and then passing it to a child, or creating a child (I guess a thread) that then causes it to close.

As described in #16 (comment), I tried commenting out this line to prevent unlink altogether:

this->unlink_sockpath = newpath;

If I do that, it doesn't get unlinked, but then inbound connections hang forever instead of just failing to connect.

I'm not sure what to do to get more information here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions