Optionalen HTTP(S)-Proxy ueber .env unterstuetzen

- .env: HTTP_PROXY, HTTPS_PROXY, NO_PROXY (leer = kein Proxy)
- Image-Build: Proxy als Build-Argumente (dnf, apt, pip)
- Laufzeit: Manager und Dashboard bekommen den Proxy (Wazuh-Feeds, Update-Check);
  interne Dienstnamen stehen immer in NO_PROXY
- setup.sh: exportiert den Proxy (Podman-Pulls/-Builds), reicht ihn ans
  Zertifikat-Tool weiter, warnt bei Docker-Daemon ohne Proxy, uebernimmt beim
  ersten Lauf einen Proxy aus der Shell und ergaenzt neue Schluessel in bestehenden .env
- README: Abschnitt Proxy

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
duffyduck
2026-10-07 12:57:55 +02:00
co-authored by Claude Opus 5.5
parent 61232af61c
commit e6aad53fb5
4 changed files with 115 additions and 3 deletions
+26
View File
@@ -15,6 +15,12 @@ services:
dockerfile: manager/Dockerfile
args:
WAZUH_VERSION: ${WAZUH_VERSION}
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
NO_PROXY: ${NO_PROXY}
http_proxy: ${HTTP_PROXY}
https_proxy: ${HTTPS_PROXY}
no_proxy: ${NO_PROXY}
image: localhost/sshpull/wazuh-manager:${WAZUH_VERSION}
hostname: wazuh.manager
restart: always
@@ -41,6 +47,13 @@ services:
- SSL_KEY=/etc/ssl/filebeat.key
- API_USERNAME=wazuh-wui
- API_PASSWORD=${API_PASSWORD}
# optionaler Proxy (.env); interne Namen nie ueber den Proxy
- HTTP_PROXY=${HTTP_PROXY}
- HTTPS_PROXY=${HTTPS_PROXY}
- NO_PROXY=wazuh.manager,wazuh.indexer,wazuh.dashboard,sshpull.collector,localhost,127.0.0.1,${NO_PROXY}
- http_proxy=${HTTP_PROXY}
- https_proxy=${HTTPS_PROXY}
- no_proxy=wazuh.manager,wazuh.indexer,wazuh.dashboard,sshpull.collector,localhost,127.0.0.1,${NO_PROXY}
volumes:
- wazuh_api_configuration:/var/ossec/api/configuration
- wazuh_etc:/var/ossec/etc
@@ -99,6 +112,12 @@ services:
- DASHBOARD_PASSWORD=${DASHBOARD_PASSWORD}
- API_USERNAME=wazuh-wui
- API_PASSWORD=${API_PASSWORD}
- HTTP_PROXY=${HTTP_PROXY}
- HTTPS_PROXY=${HTTPS_PROXY}
- NO_PROXY=wazuh.manager,wazuh.indexer,wazuh.dashboard,sshpull.collector,localhost,127.0.0.1,${NO_PROXY}
- http_proxy=${HTTP_PROXY}
- https_proxy=${HTTPS_PROXY}
- no_proxy=wazuh.manager,wazuh.indexer,wazuh.dashboard,sshpull.collector,localhost,127.0.0.1,${NO_PROXY}
volumes:
- ./config/wazuh_indexer_ssl_certs/wazuh.dashboard.pem:/usr/share/wazuh-dashboard/certs/wazuh-dashboard.pem:ro,z
- ./config/wazuh_indexer_ssl_certs/wazuh.dashboard-key.pem:/usr/share/wazuh-dashboard/certs/wazuh-dashboard-key.pem:ro,z
@@ -114,6 +133,13 @@ services:
build:
context: .
dockerfile: collector/Dockerfile
args:
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
NO_PROXY: ${NO_PROXY}
http_proxy: ${HTTP_PROXY}
https_proxy: ${HTTPS_PROXY}
no_proxy: ${NO_PROXY}
image: localhost/sshpull/collector:latest
hostname: sshpull.collector
restart: always