He seems can config the Nginx to act as port forwarding.
But I can’t make it work.
After the above setting,
When I use “tcp://syncthing.test.com:12345”, for the server address. I will got another device id (an unknown id), which is not the Server real device id.
Yeah I don’t know ngingx but as Audrius says we don’t send SNI, so the “map” and “preread $name” stuff looks suspicious and is probably not going to work. Just a straight TCP proxy on port 12345 should work with your statically configured address.
Note the caveat @calmh mentioned that discovering this node will not work, as there is no way to discover the proxy the instamce is behind, so you will have to configure the device address (point it at the proxy) manually.