Merge pull request #155 from samply/fix/dnpm-no-proxy

Add DNPM_NO_PROXY configuration option
This commit is contained in:
Tobias Kussel 2024-02-23 11:37:47 +01:00 committed by GitHub
commit c58096aa27
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 2 deletions

View File

@ -16,7 +16,7 @@ services:
LOCAL_TARGETS_FILE: "./conf/connect_targets.json" LOCAL_TARGETS_FILE: "./conf/connect_targets.json"
HTTP_PROXY: "http://forward_proxy:3128" HTTP_PROXY: "http://forward_proxy:3128"
HTTPS_PROXY: "http://forward_proxy:3128" HTTPS_PROXY: "http://forward_proxy:3128"
NO_PROXY: beam-proxy,dnpm-backend,host.docker.internal NO_PROXY: beam-proxy,dnpm-backend,host.docker.internal${DNPM_ADDITIONAL_NO_PROXY}
RUST_LOG: ${RUST_LOG:-info} RUST_LOG: ${RUST_LOG:-info}
NO_AUTH: "true" NO_AUTH: "true"
TLS_CA_CERTIFICATES_DIR: ./conf/trusted-ca-certs TLS_CA_CERTIFICATES_DIR: ./conf/trusted-ca-certs

View File

@ -6,4 +6,10 @@ if [ -n "${ENABLE_DNPM}" ]; then
# Set variables required for Beam-Connect # Set variables required for Beam-Connect
DNPM_BEAM_SECRET_SHORT="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)" DNPM_BEAM_SECRET_SHORT="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)"
# If the DNPM_NO_PROXY variable is set, prefix it with a comma (as it gets added to a comma separated list)
if [ -n "${DNPM_NO_PROXY}" ]; then
DNPM_ADDITIONAL_NO_PROXY=",${DNPM_NO_PROXY}"
else
DNPM_ADDITIONAL_NO_PROXY=""
fi
fi fi

View File

@ -32,7 +32,7 @@ services:
LOCAL_TARGETS_FILE: "./conf/connect_targets.json" LOCAL_TARGETS_FILE: "./conf/connect_targets.json"
HTTP_PROXY: http://forward_proxy:3128 HTTP_PROXY: http://forward_proxy:3128
HTTPS_PROXY: http://forward_proxy:3128 HTTPS_PROXY: http://forward_proxy:3128
NO_PROXY: dnpm-beam-proxy,dnpm-backend, host.docker.internal NO_PROXY: dnpm-beam-proxy,dnpm-backend, host.docker.internal${DNPM_ADDITIONAL_NO_PROXY}
RUST_LOG: ${RUST_LOG:-info} RUST_LOG: ${RUST_LOG:-info}
NO_AUTH: "true" NO_AUTH: "true"
TLS_CA_CERTIFICATES_DIR: ./conf/trusted-ca-certs TLS_CA_CERTIFICATES_DIR: ./conf/trusted-ca-certs

View File

@ -13,4 +13,10 @@ if [ -n "${ENABLE_DNPM}" ]; then
log DEBUG "No Broker for clock check set; using $DNPM_BROKER_URL" log DEBUG "No Broker for clock check set; using $DNPM_BROKER_URL"
fi fi
DNPM_PROXY_ID="${SITE_ID}.${DNPM_BROKER_ID}" DNPM_PROXY_ID="${SITE_ID}.${DNPM_BROKER_ID}"
# If the DNPM_NO_PROXY variable is set, prefix it with a comma (as it gets added to a comma separated list)
if [ -n "${DNPM_NO_PROXY}" ]; then
DNPM_ADDITIONAL_NO_PROXY=",${DNPM_NO_PROXY}"
else
DNPM_ADDITIONAL_NO_PROXY=""
fi
fi fi