Isn't https://github.com/neonkore/waypipe supposed to cover that?
The correct repository for Waypipe is https://gitlab.freedesktop.org/mstoeckl/waypipe, but yes it does what you said and works well.