Skip to content

Commit

Permalink
feat(entrypoint): Add USERAGENT env
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Dec 21, 2023
1 parent ee4d03d commit df7f766
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ docker.io/aw1cks/openconnect'
| `PASS` | Password to authenticate with | `mypassword` |
| `OTP` | OTP/2FA code (optional) | `123456` |
| `SEARCH_DOMAINS` | Search domains to use. DNS for these domains will be routed via the VPN's DNS servers (optional). Separate with a space for multiple domains | `my.corporate-domain.com subdomain.my.corporate-domain.com` |
| `USERAGENT` | User-Agent to pass to OpenConnect. | `AnyConnect` |
| `EXTRA_ARGS` | Any additional arguments to be passed to the OpenConnect client (optional). Only use this if you need something specific | `--verbose` |

## Helper scripts
Expand Down
2 changes: 2 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ then
OPENCONNECT_ARGS="${OPENCONNECT_ARGS} ${EXTRA_ARGS}"
fi

OPENCONNECT_ARGS="${OPENCONNECT_ARGS} --useragent=${USERAGENT:-AnyConnect}"

# URL needs to be the last argument
printf "\e[32mSetting URL...\e[0m\n"
OPENCONNECT_ARGS="${OPENCONNECT_ARGS} ${URL}"
Expand Down

0 comments on commit df7f766

Please sign in to comment.