From: Felix Fietkau Date: Sat, 16 Jan 2016 22:08:46 +0000 (+0100) Subject: http: add proxy support X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=149f5dc44b699d8ed15ef076ea17306e09988d4c;p=oweals%2Fuclient.git http: add proxy support Signed-off-by: Felix Fietkau --- diff --git a/uclient-http.c b/uclient-http.c index e456564..3ffb88c 100644 --- a/uclient-http.c +++ b/uclient-http.c @@ -540,6 +540,9 @@ uclient_http_send_headers(struct uclient_http *uh) if (uh->state >= HTTP_STATE_HEADERS_SENT) return; + if (uh->uc.proxy_url) + url = uh->uc.proxy_url; + ustream_printf(uh->us, "%s %s HTTP/1.1\r\n" "Host: %s\r\n", @@ -1116,6 +1119,7 @@ const struct uclient_backend uclient_backend_http = { .connect = uclient_http_connect, .disconnect = uclient_http_request_disconnect, .update_url = uclient_http_free_url_state, + .update_proxy_url = uclient_http_free_url_state, .read = uclient_http_read, .write = uclient_http_send_data,