PROXY: Restrict to specified addresses/hostnames

This commit is contained in:
Daniel Oaks
2016-04-21 16:39:31 +10:00
parent 77bf7173ff
commit 8885f14f19
4 changed files with 54 additions and 36 deletions
+1 -2
View File
@@ -63,8 +63,7 @@ func (client *Client) run() {
// Set the hostname for this client. The client may later send a PROXY
// command from stunnel that sets the hostname to something more accurate.
client.send(NewProxyCommand(AddrLookupHostname(
client.socket.conn.RemoteAddr())))
client.hostname = AddrLookupHostname(client.socket.conn.RemoteAddr())
for err == nil {
//TODO(dan): does this read sockets correctly and split lines properly? (think that ZNC bug that kept happening with mammon)