I have a jenkins master and worker setup in AWS. I want the worker to auto-connect to the master. I can define a new node with an API request. However because of the network in cannot use TCP on port 50000 as Jenkins likes to. So the java -jar agent.jar... command fails on the handshake. I cannot easily get around this network problem quickly for organization reasons.
There is however an option to use a websocket for jnlp. If I go into the Jenkins UI and the created node and turn this option on, I can then successfully connect via websocket.
My question, is how do I set a jnlp node to websocket with the API before I execute the agent.jar?