From ec06dc6ad6bd82e1329be9c96fa3bf6a757e5873 Mon Sep 17 00:00:00 2001 From: Leonid Evdokimov Date: Wed, 13 Apr 2016 01:50:34 +0300 Subject: [PATCH] Log dropped clients when http-proxy reply is too long --- http-connect.c | 1 + http-relay.c | 1 + 2 files changed, 2 insertions(+) diff --git a/http-connect.c b/http-connect.c index 5dc14ec..1d6a366 100644 --- a/http-connect.c +++ b/http-connect.c @@ -150,6 +150,7 @@ static void httpc_read_cb(struct bufferevent *buffev, void *_arg) free(line); } else if (len >= HTTP_HEAD_WM_HIGH) { + redsocks_log_error(client, LOG_NOTICE, "HTTP Proxy reply is too long, %zu bytes", len); redsocks_drop_client(client); dropped = 1; } diff --git a/http-relay.c b/http-relay.c index 830d708..d7e71b0 100644 --- a/http-relay.c +++ b/http-relay.c @@ -229,6 +229,7 @@ static void httpr_relay_read_cb(struct bufferevent *buffev, void *_arg) free(line); } else if (len >= HTTP_HEAD_WM_HIGH) { + redsocks_log_error(client, LOG_NOTICE, "HTTP Proxy reply is too long, %zu bytes", len); redsocks_drop_client(client); dropped = 1; }