m1k1o / neko-rooms

Selfhosted collaborative browser - room management for n.eko
Apache License 2.0
416 stars 58 forks source link

Way to pass a vpn container as a network service. Ie gluetun #129

Open sveken opened 1 month ago

sveken commented 1 month ago

Hello. Wondering if it would be possible to add support for the dockers network modes ie "service:containername" or --network=container:containername to be passed to each rooms container. More info here on gluetun https://github.com/qdm12/gluetun-wiki/blob/main/setup/connect-a-container-to-gluetun.md

Doing it this way would force the entire containers networking to go via the vpn container and not allow local access to the network at a container level. I can still publish the ports required via gluetuns port mapping feature here https://github.com/qdm12/gluetun-wiki/blob/main/setup/port-mapping.md so normal functionally would not be impacted. To note however no ports need to be published on the room container as its prepublished on the gluetun container.

I have tried passing NEKO_ROOMS_INSTANCE_NETWORK=container:gluetun however rooms reports that it cannot find the network.

Is there a way i can pass gluetun to these spawned room containers with the mentioned docker feature?

Thanks.

m1k1o commented 1 month ago

Hi, currently it's not possible to set via neko-rooms because neko rooms was initially only working with traefik and even until today relies on docker nektowrking. The alternative solution is to use proxy, see https://github.com/m1k1o/neko-vpn/

There would need to be implemented other way of proxying using e.g. unix sockets or as well port allocation for frontend ports (same as webrtc ports) if they all would share the same network.