Update. Works perfect in exception of SSL upstream to dr.
This commit is contained in:
parent
29d8272fc5
commit
d60dea1c44
16
rproxy.c
16
rproxy.c
@ -933,22 +933,22 @@ const char *DASHBOARD_HTML =
|
|||||||
" <title>Reverse Proxy Monitor</title>\n"
|
" <title>Reverse Proxy Monitor</title>\n"
|
||||||
" <style>\n"
|
" <style>\n"
|
||||||
" * { margin: 0; padding: 0; box-sizing: border-box; }\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"
|
" .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-value { font-size: 36px; font-weight: 300; }\n"
|
||||||
" .metric-label { font-size: 14px; opacity: 0.7; text-transform: uppercase; margin-top: 5px; }\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"
|
" .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"
|
" 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"
|
" table { width: 100%; border-collapse: collapse; }\n"
|
||||||
" th, td { padding: 10px; text-align: left; border-bottom: 1px solid #2a2e3e; }\n"
|
" th, td { padding: 10px; text-align: left; border-bottom: 1px solid #2a2e3e; }\n"
|
||||||
" th { font-weight: 500; opacity: 0.7; }\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 { 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-item { display: flex; align-items: center; gap: 5px; }\n"
|
||||||
" .legend-color { width: 12px; height: 12px; border-radius: 2px; }\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"
|
" .load-values { display: flex; gap: 10px; font-size: 12px; opacity: 0.8; }\n"
|
||||||
" </style>\n"
|
" </style>\n"
|
||||||
" <script src=\"https://cdn.jsdelivr.net/npm/chart.js\"></script>\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 };
|
struct epoll_event event = { .data.fd = fd, .events = events };
|
||||||
if (epoll_ctl(epoll_fd, EPOLL_CTL_MOD, fd, &event) == -1) {
|
if (epoll_ctl(epoll_fd, EPOLL_CTL_MOD, fd, &event) == -1) {
|
||||||
// This can happen if fd was closed
|
// This can happen if fd was closed
|
||||||
if(errno != EBADF && errno != ENOENT) {
|
if(errno != EBADF && errno != ENOENT) log_debug("epoll_ctl_mod failed for fd %d: %s", fd, strerror(errno));
|
||||||
log_debug("epoll_ctl_mod failed for fd %d: %s", fd, strerror(errno));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1896,6 +1894,8 @@ void connect_to_upstream(connection_t *client, const char *data, size_t data_len
|
|||||||
SSL_set_connect_state(up->ssl);
|
SSL_set_connect_state(up->ssl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
up->state = CLIENT_STATE_FORWARDING;
|
||||||
|
|
||||||
log_debug("Connecting to upstream %s:%d on fd %d (SSL: %s)",
|
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");
|
route->upstream_host, route->upstream_port, up_fd, route->use_ssl ? "yes" : "no");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user