I have an app running on port 32400 (Plex server), and the port number cannot be changed (but if possible that's welcomed, but still, in the question assume I have an app that's impossible to change). I want to access to the app from the internet, through HTTPS connection. There is an tool "ssl-proxy-linux" that does basically forward port 443 to an other port (e.g. 1443) with LetsEncrypt SSL enabled, but in order to apply this tool to an app, the app need to be running on port 443.
So, basically the flow should be like: app running on 32400 -> ** some software that does port forward? clone? the port 32400 to 443 ** -> the identical app running on 443 -> LetsEncrypt SSL app -> 1443 (now I'm accessing the app from a url like https://myplexapp.com:1443
)
I tried socat socat TCP-LISTEN:32400,fork TCP:127.0.0.1:443
but I get E bind(5, {AF=2 0.0.0.0:32400}, 16): Address already in use
error. Apparently this tool is for like port forwarding, but not for, let's say, port cloning, I guess?
So, is this kind of stuff possible, and how?