Skip to content

Commit

Permalink
Refactor README.md to be more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
shuguet committed Mar 17, 2024
1 parent 6645bb0 commit 292037e
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,27 @@
OpenConnect VPN Client for the UniFi Dream Machine Pro (Unofficial)

## Notes:
Require the use of the excellent On Boot script from: https://github.com/unifi-utilities/unifios-utilities/blob/main/on-boot-script-2.x/README.md
Require the use of the excellent On Boot script from:
https://github.com/unifi-utilities/unifios-utilities/blob/main/on-boot-script-2.x/README.md

Because of the way OpenConnect works with the particular Global Protect VPN endpoint I'm using (requires a 2FA auth based on an Okta prompt) I actually didn't put the connection script in the container image itself.
Because of the way OpenConnect works with the particular Global Protect VPN
endpoint I'm using (requires a 2FA auth based on an Okta prompt) I actually
didn't put the connection script in the container image itself.

Instead I just put a generic entrypoint shell script in there that does nothing.
I pre-loaded the binaries for TOTP creation and the openconnect client in the image.
I pre-loaded the binaries for TOTP creation and the openconnect client in the
image.

Then I bind-mount a shell script from a /mnt/data dir.
And finally I overload the command at runtime to execute that script instead of the built-in info-message/generic entrypoint script.

And finally I overload the command at runtime to execute that script instead
of the built-in info-message/generic entrypoint script.


## Usage:

Edit connect-example.sh to match your needs (or create a different connection script, and adapt the command below), then run:
Edit `connect-example.sh` to match your needs (or create a different
connection script, and adapt the command below), then run:
```
docker run -it -d --rm --net=host --name openconnect --privileged \
-v /mnt/data/openconnect/connect-example.sh:/usr/local/bin/connect-example.sh \
Expand Down

0 comments on commit 292037e

Please sign in to comment.