dlundquist / sniproxy

Proxies incoming HTTP and TLS connections based on the hostname contained in the initial request of the TCP session.
BSD 2-Clause "Simplified" License
2.56k stars 397 forks source link

Don't use transparent proxying for clients on the listener itself #374

Open nomis opened 3 years ago

nomis commented 3 years ago

It's not possible to bind to the same address and port when the client is the same as the listener because it will already be in use by the incoming connection. Detect this and use a new port on the same address instead.