Skip to content

Commit e49a168

Browse files
committed
entrypoint: Add PROXY_ALLOW_* settings for setting outgoing proxy rules.
1 parent d3aee4a commit e49a168

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,14 @@ proxies][other-proxy].
216216
[haproxy-proxy]: https://zulip.readthedocs.io/en/latest/production/reverse-proxies.html#haproxy-configuration
217217
[other-proxy]: https://zulip.readthedocs.io/en/latest/production/reverse-proxies.html#other-proxies
218218

219+
**Outgoing proxy**: Zulip uses [Smokescreen][smokescreen] to proxy all
220+
outgoing HTTP connections and prevent SSRF attacks. If you have
221+
private IPs (e.g., outgoing webhook hosts on private IPs), you can set
222+
`PROXY_ALLOW_ADDRESSES` or `PROXY_ALLOW_RANGES` to comma-separated
223+
lists of IP addresses or CIDR ranges.
224+
225+
[smokescreen]: https://zulip.readthedocs.io/en/latest/production/deployment.html#customizing-the-outgoing-http-proxy
226+
219227
### Manual configuration
220228

221229
The way the environment variables configuration process described in

entrypoint.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,15 @@ puppetConfiguration() {
146146
crudini --set /etc/zulip/zulip.conf loadbalancer ips "${LOADBALANCER_IPS}"
147147
fi
148148

149+
if [ -n "$PROXY_ALLOW_ADDRESSES" ]; then
150+
echo "Setting outgoing proxy allowed private IPs"
151+
crudini --set /etc/zulip/zulip.conf http_proxy allow_addresses "${PROXY_ALLOW_ADDRESSES}"
152+
fi
153+
if [ -n "$PROXY_ALLOW_RANGES" ]; then
154+
echo "Setting outgoing proxy allowed private IP ranges"
155+
crudini --set /etc/zulip/zulip.conf http_proxy allow_ranges "${PROXY_ALLOW_RANGES}"
156+
fi
157+
149158
/home/zulip/deployments/current/scripts/zulip-puppet-apply -f
150159
}
151160
configureCerts() {

0 commit comments

Comments
 (0)