xrdp-ng: refactor input protocol