Install prerequisites. This will include:
-sudo apt install python3-gi gir1.2-gtk-3.0 gir1.2-webkit2-4.0 openconnect ocproxy
+ sudo apt install python3-gi gir1.2-gtk-3.0 gir1.2-webkit2-4.0 openconnect ocproxy
+
+Also, note that you'll need at least version 8 of openconnect. If you're not sure what you've got, run:
+
+ openconnect --version
2.
YEAR=$(date +'%Y')
# This value may need to be extracted from the official HIP report, if a made-up value is not accepted.
-HOSTID="deadbeef-dead-beef-dead-beefdeadbeef"
+HOSTID="D52047CC-33AF-11B2-A85C-89044BD0C4D8"
cat <<EOF
--- /dev/null
+#!/bin/bash
+
+LOG_FILE=/tmp/nu-globalprotect-saml.log
+PID_FILE=/tmp/nu-vpn-openconnect_http.pid
+
+exec > $LOG_FILE
+
+# change to the vpn file directory
+cd ~/bin/nu-vpn-proxy
+
+## do the authentication
+eval $( ./gp-saml-gui.py -v --clientos=Linux vpn-connect2.northwestern.edu )
+
+
+echo "$COOKIE" | /usr/sbin/openconnect --verbose --useragent="PAN GlobalConnect" --version-string='5.1.0-101' --protocol=gp -u "$USER" --os="$OS" --passwd-on-stdin "$HOST" --csd-wrapper="hipreport-modified.sh" --reconnect-timeout 60 --script-tun --script "ocproxy -D 8181 --keepalive 5 --verbose" -b --pid-file "${PID_FILE}"
+
+
## do the authentication
eval $( ./gp-saml-gui.py -v --clientos=Linux vpn-connect2.northwestern.edu )
-echo "$COOKIE" | openconnect --useragent="PAN GlobalConnect" --version-string='5.1.0-101' --protocol=gp -u "$USER" --os="$OS" --passwd-on-stdin "$HOST" --csd-wrapper="hipreport-modified.sh" --reconnect-timeout 60 --script-tun --script "ocproxy -D 9052" -b --pid-file "${PID_FILE}"
+echo "$COOKIE" | /usr/sbin/openconnect --useragent="PAN GlobalConnect" --version-string='5.1.0-101' --protocol=gp -u "$USER" --os="$OS" --passwd-on-stdin "$HOST" --csd-wrapper="hipreport-modified.sh" --reconnect-timeout 60 --script-tun --script "ocproxy -D 9052" -b --pid-file "${PID_FILE}"
--- /dev/null
+#!/bin/bash
+
+/sbin/start-stop-daemon --pidfile /tmp/nu-vpn-openconnect_http.pid -S --startas "$HOME/bin/nu-vpn-proxy/openconnect_command-http.sh"
+
+
--- /dev/null
+#!/bin/bash
+
+/sbin/start-stop-daemon --stop --pidfile /tmp/nu-vpn-openconnect_http.pid