wsdd icon indicating copy to clipboard operation
wsdd copied to clipboard

feat: Add socket-activated systemd service for discovery

Open aleasto opened this issue 1 year ago • 3 comments

Introduce a system-wide daemon listening on /run/wsdd.socket, which is managed by systemd. When a client first connects to the socket the daemon is started. Multiple clients can connect and safely use the API simultaneously.

The service runs in discovery-only mode.

Uses multicast source-port 37020.

aleasto avatar Oct 09 '24 14:10 aleasto

  • Increases the security of services like gvfs which rely discovery mode by integrating with all the security confinement features
  • Allows us to standardize one --source-port
  • Only one daemon per system
  • systemd-specific but non-intrusive

aleasto avatar Oct 09 '24 15:10 aleasto

TODO: systemctl stop wsdd-discovery hangs if there are processes (gvfsd) listening on /run/wsdd.socket. We should probably close the connection.

aleasto avatar Oct 11 '24 10:10 aleasto

TODO: systemctl stop wsdd-discovery hangs if there are processes (gvfsd) listening on /run/wsdd.socket. We should probably close the connection.

That's #219

aleasto avatar Oct 11 '24 13:10 aleasto

@aleasto I split the UFW rules because I think enabling discovering other devices on the network should not open ports for the host itself to be discoverable. AFAIK, Windows actually has two services as well (fdPHost and FDResPub on Win11).

WDYT?

christgau avatar Dec 28 '24 16:12 christgau

Yeah I think I agree.

Shouldn't you do the same for firewalld?

aleasto avatar Dec 28 '24 17:12 aleasto

Shouldn't you do the same for firewalld?

Good point. Done

christgau avatar Jan 04 '25 21:01 christgau

Would it be time to make a tagged release?

aleasto avatar Apr 30 '25 07:04 aleasto