[ZBX-10270] Impossible to enable HTTP(s) proxy using environment variable Created: 2016 Jan 15  Updated: 2017 May 30  Resolved: 2016 Jan 19

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 2.2.11, 2.4.7
Fix Version/s: 2.2.12rc1, 2.4.8rc1, 3.0.0beta1

Type: Incident report Priority: Trivial
Reporter: Alexey Pustovalov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: curl, httpproxy, webmonitoring
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

According Zabbix sources CURLOPT_PROXY is always not NULL, empty string or proxy address: http://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html

Setting the proxy string to "" (an empty string) will explicitly disable the use of a proxy, even if there is an environment variable set for it.



 Comments   
Comment by Aleksandrs Saveljevs [ 2016 Jan 15 ]

To clarify, we have the following at https://www.zabbix.com/documentation/2.4/manual/web_monitoring , suggesting the use of http_proxy environment variable:

If HTTP proxy field is left empty, another way for using an HTTP proxy is to set proxy related environment variables.

For HTTP checks - set the http_proxy environment variable for the Zabbix server user. For example, http_proxy=http://proxy_ip:proxy_port.

For HTTPS checks - set the HTTPS_PROXY environment variable. For example, HTTPS_PROXY=http://proxy_ip:proxy_port. More details are available by running a shell command: # man curl.

Comment by Aleksandrs Saveljevs [ 2016 Jan 18 ]

Seems like it was this way ever since it got implemented in ZBXNEXT-308.

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-10270 .

Comment by Sandis Neilands (Inactive) [ 2016 Jan 19 ]

Tested with real and non-existent socks5 and HTTPs proxies defined either in Web scenario or environment variable.

Successfully tested.

Comment by Aleksandrs Saveljevs [ 2016 Jan 19 ]

Fixed in pre-2.2.12rc1 r57827, pre-2.4.8rc1 r57828, pre-3.0.0beta1 (trunk) r57829.

Generated at Thu Mar 28 23:23:18 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.