Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/transparent-proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ do_transparent_proxy (struct conn_s *connptr, pseudomap *hashofheaders,
size_t ulen = strlen (*url);
size_t i;

if (strncmp(*url, "https://", 7) == 0) {
log_message (LOG_ERR,
"process_request: unexpected https as destination "
"protocol for %d",
connptr->client_fd);
indicate_http_error (connptr, 400, "Bad Request",
"detail", "You tried to connect to a "
"HTTPS destination. Use CONNECT instead.",
"url", *url, NULL);
return 0;
}

data = pseudomap_find (hashofheaders, "host");
if (!data) {
union sockaddr_union dest_addr;
Expand Down