<p>Did not manage to get default proxy to work.</p>

<p>I used the same config as I used with my home-brewed version of http_client.</p>

<p>The API calls work, it's just the proxy config that isn't applied.</p>

<p>#</p>

<h1>Config</h1>

<p>#</p>

<p>#!define API_SERVER_A "apiA=>http://name:<a href="mailto:pass@api01.host.com">pass@api01.host.com</a>"<br>
#!define API_SERVER_B "apiB=>http://name:<a href="mailto:pass@api02.host.com">pass@api02.host.com</a>"</p>

<p>loadmodule "http_client.so"<br>
modparam("http_client", "httpcon", API_SERVER_A)<br>
modparam("http_client", "httpcon", API_SERVER_B)<br>
modparam("http_client", "httpproxy", "proxyhost")<br>
modparam("http_client", "httpproxyport", 8181)</p>

<p>/* in functions.c */</p>

<pre><code>if (params->http_proxy  != NULL) {
LM_INFO("****** ##### CURL proxy [%s] \n", params->http_proxy);
res |= curl_easy_setopt(curl, CURLOPT_PROXY, params->http_proxy);
} else {
LM_INFO("****** ##### CURL proxy NOT SET \n");
}

if (params->http_proxy_port > 0) {
LM_INFO("****** ##### CURL proxy port [%d] \n", params->http_proxy_port);
res |= curl_easy_setopt(curl, CURLOPT_PROXYPORT, params->http_proxy_port);
} else {
LM_INFO("****** ##### CURL proxy port NOT SET \n");
}
</code></pre>

<p>#</p>

<h1>Log</h1>

<p>#</p>

<p>Mar 24 15:35:35 32048a54378d /usr/sbin/kamailio[8465]: INFO: http_client [functions.c:189]: curL_query_url(): ****** ##### CURL proxy NOT SET <br>
Mar 24 15:35:35 32048a54378d /usr/sbin/kamailio[8465]: INFO: http_client [functions.c:196]: curL_query_url(): ****** ##### CURL proxy port NOT SET </p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/541#issuecomment-200868545">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZZTMudhmIdtDLKbXMebX8lK2RZopks5pwqPPgaJpZM4HufkW.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/541#issuecomment-200868545"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>