Feature: add HTTP proxy support to webhook integrations #795
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Base information
Symptom (bug) / Objective (enhancement)
In many enterprise environments, iTop servers do not have direct access to the Internet and must route all outbound HTTP/HTTPS traffic through a corporate proxy.
Currently, the webhook integration module does not provide any way to configure a proxy for outbound requests.
As a result, webhook calls fail in restricted networks, usually with DNS resolution or connection errors, making integrations with external services (Telegram, Slack, APIs, etc.) unusable.
The objective of this enhancement is to allow webhook HTTP requests to be routed through a configurable proxy, making the webhook integration usable in secured and restricted infrastructures.
Reproduction procedure (bug)
(Not applicable, this is an enhancement and not a bug.)
Cause (bug)
(Not applicable, this is an enhancement and not a bug.)
Proposed solution (bug and enhancement)
The solution adds optional HTTP proxy support to the webhook request sender:
The proxy configuration is read from the module settings:
host(mandatory)user(optional)password(optional)When a proxy is defined, the corresponding CURL options are injected into the request:
CURLOPT_PROXYCURLOPT_PROXYTYPECURLOPT_PROXYUSERPWD(if authentication is configured)When no proxy is defined, the behavior remains unchanged, ensuring full backward compatibility.
This allows webhook integrations to work transparently in environments where Internet access is only available through a proxy.
The change is limited to the webhook integration module and does not impact any other part of iTop.