Hi all!

After I start a reactor connecting to a specific hostname and port, I do my thing and then call transport.write() to send the data to the peer.

From what I can tell, though, the hostname is resolved, and the data is written back to the ip address itself, instead of the hostname I started the reactor with.

This is a problem in my case because we are using nginx's ssl_preread server_name directive to route several different streams all coming in on the same ip address.

So the write() method needs to explicitly use the hostname to route the packet properly.

So... Is there any way to have transport.write() use the hostname given instead of it's resolved IP address? Or am I missing something?

Crossposted on StackOverflow:  https://stackoverflow.com/questions/51886720/is-there-a-way-to-force-twisted-internet-interfaces-itransport-to-write-to-a-g

Thank you for any insight you may have!