Modify/Create connection plugin

Hi all, i want to modify/create the psrp connection plugin to launch a SSH socks proxy command with a random port before connection and dynamically set the psrp proxy according to that port. How could I integrate this new modified plugin? I already have a custom docker image where i can put the needed commands, but I want to know where to put that file and if I need to modify any file to make Ansible (/AWX) recognise that file.