[proxy] add --no-detect-tls flag, and proxy always tries to detect TLS.
This commit is contained in:
1 parent
de802f9d76
commit
f458491d88
2 files changed
+12
-8
No files matched your search
+5
-5
@@ -231,11 +231,11 @@ be able to launch a TLS-enabled proxy with:
|
||||
|
||||
host1$ weave launch-proxy
|
||||
|
||||
You can also manually configure the proxy's TLS. This is accomplished
|
||||
by launching the proxy with the same TLS-related command-line flags as
|
||||
supplied to the docker daemon. For example, if you have generated your
|
||||
certificates and keys into the docker host's `/tls` directory, we can
|
||||
launch the proxy with:
|
||||
To disable auto-detection of TLS configuration, you can either pass
|
||||
the `--no-detect-tls` flag, or manually configure the proxy's TLS with
|
||||
the same TLS-related command-line flags as supplied to the docker
|
||||
daemon. For example, if you have generated your certificates and keys
|
||||
into the docker host's `/tls` directory, we can launch the proxy with:
|
||||
|
||||
host1$ weave launch-proxy --tls-verify --tls-cacert=/tls/ca.pem \
|
||||
--tls-cert=/tls/server-cert.pem --tls-key=/tls/server-key.pem
|
||||
|
||||
@@ -1278,6 +1278,9 @@ proxy_parse_args() {
|
||||
PROXY_HOST="${1#*=}"
|
||||
PROXY_ARGS="$PROXY_ARGS $1"
|
||||
;;
|
||||
-no-detect-tls|--no-detect-tls)
|
||||
PROXY_TLS_DETECTION_DISABLED=1
|
||||
;;
|
||||
-tls|--tls|-tlsverify|--tlsverify)
|
||||
PROXY_TLS_ENABLED=1
|
||||
PROXY_ARGS="$PROXY_ARGS $1"
|
||||
@@ -1315,12 +1318,13 @@ proxy_args() {
|
||||
PROXY_VOLUMES=""
|
||||
PROXY_ARGS=""
|
||||
PROXY_TLS_ENABLED=""
|
||||
PROXY_TLS_DETECTION_DISABLED=""
|
||||
PROXY_HOST=""
|
||||
proxy_parse_args "$@"
|
||||
|
||||
if [ -z "$PROXY_HOST" -a -n "$CLIENT_TLS_ENABLED" -a -z "$PROXY_TLS_ENABLED" ] ; then
|
||||
if ! proxy_parse_args $(docker_tls_args) ; then
|
||||
echo "When launching the proxy via TLS, -H and/or TLS options are required." >&2
|
||||
if [ -z "$PROXY_TLS_ENABLED" ] ; then
|
||||
if [ -z "$PROXY_TLS_DETECTION_DISABLED" ] && ! proxy_parse_args $(docker_tls_args) ; then
|
||||
echo "Unable to auto-detect TLS configuration, --no-detect-tls or TLS options are required." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user