Update. Works perfect in exception of SSL upstream to dr.
This commit is contained in:
parent
29d8272fc5
commit
d60dea1c44
18
rproxy.c
18
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 =
|
||||
" <title>Reverse Proxy Monitor</title>\n"
|
||||
" <style>\n"
|
||||
" * { margin: 0; padding: 0; box-sizing: border-box; }\n"
|
||||
" body { font-family: -apple-system, system-ui, sans-serif; background: #1a1e2e; color: #fff; padding: 20px; }\n"
|
||||
" body { font-family: -apple-system, system-ui, sans-serif; background: #000; color: #fff; padding: 20px; }\n"
|
||||
" .header { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 30px; gap: 20px; }\n"
|
||||
" .metric { text-align: center; background: #0f1419; border-radius: 8px; padding: 15px; }\n"
|
||||
" .metric { text-align: center; background: #000; border-radius: 8px; padding: 15px; }\n"
|
||||
" .metric-value { font-size: 36px; font-weight: 300; }\n"
|
||||
" .metric-label { font-size: 14px; opacity: 0.7; text-transform: uppercase; margin-top: 5px; }\n"
|
||||
" .chart-container { background: #0f1419; border-radius: 8px; padding: 20px; margin-bottom: 20px; height: 250px; position: relative; }\n"
|
||||
" .chart-container { background: #000; border-radius: 8px; padding: 20px; margin-bottom: 20px; height: 250px; position: relative; }\n"
|
||||
" .chart-title { position: absolute; top: 10px; left: 20px; font-size: 14px; opacity: 0.7; z-index: 10; }\n"
|
||||
" canvas { width: 100% !important; height: 100% !important; }\n"
|
||||
" .process-table { background: #0f1419; border-radius: 8px; padding: 20px; }\n"
|
||||
" .process-table { background: #000; border-radius: 8px; padding: 20px; }\n"
|
||||
" table { width: 100%; border-collapse: collapse; }\n"
|
||||
" th, td { padding: 10px; text-align: left; border-bottom: 1px solid #2a2e3e; }\n"
|
||||
" th { font-weight: 500; opacity: 0.7; }\n"
|
||||
" .legend { position: absolute; top: 10px; right: 20px; display: flex; gap: 20px; font-size: 12px; z-index: 10; }\n"
|
||||
" .legend-item { display: flex; align-items: center; gap: 5px; }\n"
|
||||
" .legend-color { width: 12px; height: 12px; border-radius: 2px; }\n"
|
||||
" .vhost-chart-container { height: 200px; background: #0f1419; border-radius: 8px; position: relative; padding: 20px; margin-bottom: 10px; }\n"
|
||||
" .vhost-chart-container { height: 200px; background: #000; border-radius: 8px; position: relative; padding: 20px; margin-bottom: 10px; }\n"
|
||||
" .load-values { display: flex; gap: 10px; font-size: 12px; opacity: 0.8; }\n"
|
||||
" </style>\n"
|
||||
" <script src=\"https://cdn.jsdelivr.net/npm/chart.js\"></script>\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");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user