However, we could also dynamically edit the device descriptor exposed to the host to remove interface altsettings that cannot be supported by the UDC. This will sever the proxied device functionality available to the host, but this might good enough for certain use cases.
As encountered in https://github.com/AristoChen/usb-proxy/pull/23#issuecomment-2182790558, the UDC might not provide enough capabilities (e.g. max packet size) to emulate the proxied device. Failing to proxy the device would be the expected behavior in this case.
However, we could also dynamically edit the device descriptor exposed to the host to remove interface altsettings that cannot be supported by the UDC. This will sever the proxied device functionality available to the host, but this might good enough for certain use cases.