diff options
-rwxr-xr-x | utils/novnc_proxy | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/utils/novnc_proxy b/utils/novnc_proxy index 0900f7e..0365c1e 100755 --- a/utils/novnc_proxy +++ b/utils/novnc_proxy @@ -32,6 +32,11 @@ usage() { echo " --heartbeat SEC send a ping to the client every SEC seconds" echo " --timeout SEC after SEC seconds exit when not connected" echo " --idle-timeout SEC server exits after SEC seconds if there are no" + echo " " + echo " --web-auth enable authentication" + echo " --auth-plugin CLASS authentication plugin to use" + echo " --auth-source ARG plugin configuration" + echo " " echo " active connections" echo " " exit 2 @@ -52,6 +57,11 @@ SYSLOG_ARG="" HEARTBEAT_ARG="" IDLETIMEOUT_ARG="" TIMEOUT_ARG="" +WEBAUTH_ARG="" +AUTHPLUGIN_ARG="" +AUTHSOURCE_ARG="" + + die() { echo "$*" @@ -85,6 +95,9 @@ while [ "$*" ]; do --heartbeat) HEARTBEAT_ARG="--heartbeat ${OPTARG}"; shift ;; --idle-timeout) IDLETIMEOUT_ARG="--idle-timeout ${OPTARG}"; shift ;; --timeout) TIMEOUT_ARG="--timeout ${OPTARG}"; shift ;; + --web-auth) WEBAUTH_ARG="--web-auth" ;; + --auth-plugin) AUTHPLUGIN_ARG="--auth-plugin ${OPTARG}"; shift ;; + --auth-source) AUTHSOURCE_ARG="--auth-source ${OPTARG}"; shift ;; -h|--help) usage ;; -*) usage "Unknown chrooter option: ${param}" ;; *) break ;; @@ -177,7 +190,7 @@ fi echo "Starting webserver and WebSockets proxy on port ${PORT}" #${HERE}/websockify --web ${WEB} ${CERT:+--cert ${CERT}} ${PORT} ${VNC_DEST} & -${WEBSOCKIFY} ${SYSLOG_ARG} ${SSLONLY} --web ${WEB} ${CERT:+--cert ${CERT}} ${KEY:+--key ${KEY}} ${PORT} ${VNC_DEST} ${HEARTBEAT_ARG} ${IDLETIMEOUT_ARG} ${RECORD_ARG} ${TIMEOUT_ARG} & +${WEBSOCKIFY} ${SYSLOG_ARG} ${SSLONLY} --web ${WEB} ${CERT:+--cert ${CERT}} ${KEY:+--key ${KEY}} ${PORT} ${VNC_DEST} ${HEARTBEAT_ARG} ${IDLETIMEOUT_ARG} ${RECORD_ARG} ${TIMEOUT_ARG} ${WEBAUTH_ARG} ${AUTHPLUGIN_ARG} ${AUTHSOURCE_ARG} & proxy_pid="$!" sleep 1 if ! ps -p ${proxy_pid} >/dev/null; then |