My task is to address different servers via secure socket connections at the destination.
But the problem is that you can not specify different target servers over normal socket connections. Also, there is no way, as with HTTP(S) via header, to provide additional information.
I thought of a SOCKS5 server at the destination, which can then address the destination servers. The proxy server could be NGINX, if it supports SOCKS5.
Usually such a proxy lies with the client. Theoretically, it should also work if the SOCKS5 proxy is located at the receiver in the target network.
Can this work or are there other solutions? If possible without programming. Only with configuration.