summaryrefslogtreecommitdiff
path: root/src/http.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http.c')
-rw-r--r--src/http.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/http.c b/src/http.c
index d52aac6..a2eba57 100644
--- a/src/http.c
+++ b/src/http.c
@@ -76,9 +76,16 @@ static struct http_response *trg_http_perform_inner(trg_client * tc,
curl_easy_setopt(handle, CURLOPT_HEADERFUNCTION, &header_callback);
curl_easy_setopt(handle, CURLOPT_WRITEHEADER, (void *) tc);
curl_easy_setopt(handle, CURLOPT_POSTFIELDS, req);
+
if (tc->ssl)
curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0);
+ if (tc->proxy) {
+ curl_easy_setopt(handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
+ curl_easy_setopt(handle, CURLOPT_PROXY, tc->proxy);
+ }
+
+
if (tc->session_id != NULL) {
headers = curl_slist_append(headers, tc->session_id);
curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headers);