linux – Is there a way to forward a virtual usbip port to a physical usb port (usb gadget)?

I successfully have made an USB connection over the internet with usbip.
That leaves me with a virtual USB device on the client computer.

On the same computer (Beaglebone black) I would like to create an usb gadget
that mimics the virtual device.

Do I have to use libusb on one side and the gadget api on the other side and write code
for every specific USB device that I connect or is there some other possibility to
forward all data form the virtual port to the physical and vice versa?

Hope someone can point me in the right direction.