From d60dea1c44e0cf4e12caa48eb16a9330f25a879b Mon Sep 17 00:00:00 2001 From: retoor Date: Thu, 25 Sep 2025 05:43:10 +0200 Subject: [PATCH] Update. Works perfect in exception of SSL upstream to dr. --- rproxy.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/rproxy.c b/rproxy.c index 5bfbe66..352648c 100644 --- a/rproxy.c +++ b/rproxy.c @@ -758,7 +758,7 @@ static void get_disk_stats(long long *sectors_read, long long *sectors_written) return; } -char line[2048]; + char line[2048]; long long total_read = 0, total_written = 0; while (fgets(line, sizeof(line), f)) { char device[64]; @@ -933,22 +933,22 @@ const char *DASHBOARD_HTML = " Reverse Proxy Monitor\n" " \n" " \n" @@ -1610,9 +1610,7 @@ static void modify_epoll(int fd, uint32_t events) { struct epoll_event event = { .data.fd = fd, .events = events }; if (epoll_ctl(epoll_fd, EPOLL_CTL_MOD, fd, &event) == -1) { // This can happen if fd was closed - if(errno != EBADF && errno != ENOENT) { - log_debug("epoll_ctl_mod failed for fd %d: %s", fd, strerror(errno)); - } + if(errno != EBADF && errno != ENOENT) log_debug("epoll_ctl_mod failed for fd %d: %s", fd, strerror(errno)); } } @@ -1895,6 +1893,8 @@ void connect_to_upstream(connection_t *client, const char *data, size_t data_len SSL_set_fd(up->ssl, up_fd); SSL_set_connect_state(up->ssl); } + + up->state = CLIENT_STATE_FORWARDING; log_debug("Connecting to upstream %s:%d on fd %d (SSL: %s)", route->upstream_host, route->upstream_port, up_fd, route->use_ssl ? "yes" : "no");