diff --git a/src/http.c b/src/http.c index c3818b0..f3ef84a 100644 --- a/src/http.c +++ b/src/http.c @@ -1361,6 +1361,7 @@ process_request(http_connection_t *hc, htsbuf_queue_t *spill) http_error(hc, HTTP_STATUS_BAD_REQUEST); return -1; } + hc->hc_is_proxied = 1; } tcp_get_str_from_ip(hc->hc_peer, authbuf, sizeof(authbuf)); @@ -1851,6 +1852,7 @@ http_serve_requests(http_connection_t *hc) atomic_set(&hc->hc_extra_insend, 0); atomic_set(&hc->hc_extra_chunks, 0); + hc->hc_is_proxied = 0; do { hc->hc_no_output = 0; diff --git a/src/http.h b/src/http.h index 6c66a86..10d8584 100644 --- a/src/http.h +++ b/src/http.h @@ -175,6 +175,7 @@ typedef struct http_connection { uint8_t hc_no_output; uint8_t hc_shutdown; uint8_t hc_is_local_ip; /*< a connection from the local network */ + uint8_t hc_is_proxied; /* Support for HTTP POST */ diff --git a/src/satip/rtsp.c b/src/satip/rtsp.c index 06fbe87..630549e 100644 --- a/src/satip/rtsp.c +++ b/src/satip/rtsp.c @@ -1655,7 +1655,7 @@ static void rtsp_stream_status ( void *opaque, htsmsg_t *m ) { http_connection_t *hc = opaque; - htsmsg_add_str(m, "type", "SAT>IP"); + htsmsg_add_str(m, "type", (hc->hc_is_proxied)? "SAT>IP/proxy" : "SAT>IP"); if (hc->hc_username) htsmsg_add_str(m, "user", hc->hc_username); } diff --git a/src/webui/webui.c b/src/webui/webui.c index bd013ec..93f1dbc 100644 --- a/src/webui/webui.c +++ b/src/webui/webui.c @@ -362,7 +362,7 @@ static void http_stream_status ( void *opaque, htsmsg_t *m ) { http_connection_t *hc = opaque; - htsmsg_add_str(m, "type", "HTTP"); + htsmsg_add_str(m, "type", (hc->hc_is_proxied)? "HTTP/proxy" : "HTTP"); if (hc->hc_username) htsmsg_add_str(m, "user", hc->hc_username); }