The problem is based on a simple restriction:
The server which holds the business logic is not connected with the printer in the same network. The printer is located in another network which does not have the possibility to expose a public IP.
The architecture I've designed so far is this can be seen here.
The two LANS are represented in orange and blue, and there's a VPN in red which connects the two. Due to the blue LAN not being possible to expose a public IP, the only way is to serve the VPN from the server.
With this setup, is it possible that the Node.js app running inside the server detects the printers that CUPS publishes in the blue/red network?
I understand that CUPS advertises the available printers through mDNS, but only on the specific network it is connected to. So, there's the possibility that the packages may not travel from a client VPN to the actual server (due to standard VPN behaviour).
Is it possible what I'm trying to achieve? Which other options do I have?
Update
I've found some approaches that are worth investigating:
- Use a VXLAN to connect the two nets as one and multicast over the network
- Enable multicast over OpenVPN or Wireguard
- Repeat packages sent by mDNS on another interface
- Create a proxy service record using DNS-SD
Here's some useful information:
- https://www.reddit.com/r/WireGuard/comments/g80bxf/cant_get_zeroconfavahimdns_reflection_to_work/
- https://gist.github.com/pamolloy/f464c2b54af03c436491f42abf0bbff9
- https://superuser.com/questions/949140/repeating-mdns-bonjour-requests-from-eth0-through-a-tunnel-tun0
- https://github.com/monstrenyatko/docker-mdns-repeater
I think the answer lies in one or the combination of some of them.