core.c: add HOST header to each CONNECT request

fixes #92
closes #93
This commit is contained in:
forkbomber 2015-10-31 19:49:18 -04:00 committed by rofl0r
parent c883cd4940
commit cf9a16de06

View File

@ -237,7 +237,7 @@ static int tunnel_to(int sock, ip_type ip, unsigned short port, proxy_type pt, c
} else dst[0] = 0;
len = snprintf((char *) buff, sizeof(buff),
"CONNECT %s:%d HTTP/1.0\r\n%s%s%s\r\n",
"CONNECT %1$s:%2$d HTTP/1.0\r\nHost: %1$s:%2$d\r\n%3$s%4$s%5$s\r\n",
dns_name, ntohs(port),
ulen ? "Proxy-Authorization: Basic " : dst,
dst, ulen ? "\r\n" : dst);