rkvm icon indicating copy to clipboard operation
rkvm copied to clipboard

feat(server): Add device allowlist

Open pajlada opened this issue 10 months ago • 2 comments
trafficstars

This PR is meant as a spiritual continuation of #55, implemented by using the evdev attributes instead of file paths. I'm doing the comparison inside Inspector to ensure we stop processing a device as soon as possible (i.e. before we create a writer for the device)

The default behaviour with device-allowlist unset is the same as before: All inputs found will be forwarded If you configure the device-allowlist, only the devices matching at least 1 of the config options will be forwarded

Example configs

# Only forward Logitech devices

[[device-allowlist]]
vendor-id = 1133
# Forward Logitech & UHK V1 devices

[[device-allowlist]]
name = "Ultimate Gadget Laboratories UHK 60 v1"

[[device-allowlist]]
vendor-id = 1133

I currently support name, vendor-id, and product-id for filtering, and they're all either exact matches if they're set, or no check at all if they're unset. Happy to change things as you see fit!

pajlada avatar Dec 28 '24 13:12 pajlada

Cool, thank you for this. I'll review soon.

htrefil avatar Feb 04 '25 08:02 htrefil

nice to see some improvements in this project. I tried your branch/pr and it works just great For my part, this could easily be merged into main

slartibart70 avatar Mar 31 '25 09:03 slartibart70