Skip to content

Commit

Permalink
CLEANUP: No longer a need to document --method=<method>
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikBengtsson committed May 18, 2024
1 parent 8feba43 commit 44ec53b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 24 deletions.
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ Options:
--server=<host> VPN server (default is 'remote.ucsf.edu')
--realm=<realm> VPN realm (default is 'Dual-Factor Pulse Clients')
--url=<url> VPN URL (default is https://{{server}}/pulse)
--method=<mth> Either 'openconnect' (default) or 'pulse' (deprecated)
--protocol=<ptl> VPN protocol, e.g. 'nc' (default) and 'pulse'
--validate=<how> One or more of 'ipinfo', 'iproute', and 'pid', e.g.
'pid,iproute,ipinfo' (default)
Expand All @@ -151,7 +150,6 @@ Examples:
Environment variables:
UCSF_VPN_METHOD Default value for --method
UCSF_VPN_PROTOCOL Default value for --protocol
UCSF_VPN_SERVER Default value for --server
UCSF_VPN_TOKEN Default value for --token
Expand All @@ -175,9 +173,8 @@ the user / owner of the file. If not, then 'ucsf-vpn start' will
set its permission accordingly (by calling chmod go-rwx ~/.netrc).
Requirements:
* Requirements when using OpenConnect (CLI):
- OpenConnect (>= 7.08) (installed: 8.20-1)
- sudo
* OpenConnect (>= 7.08) (installed: 8.20-1)
* sudo
VPN Protocol:
Different versions of OpenConnect support different VPN protocols.
Expand All @@ -204,7 +201,7 @@ Useful resources:
* UCSF Managing Your Passwords:
- https://it.ucsf.edu/services/managing-your-passwords
Version: 5.8.0-9001
Version: 5.8.0-9002
Copyright: Henrik Bengtsson (2016-2024)
License: GPL (>= 2.1) [https://www.gnu.org/licenses/gpl.html]
Source: https://github.com/HenrikBengtsson/ucsf-vpn
Expand All @@ -214,8 +211,6 @@ Source: https://github.com/HenrikBengtsson/ucsf-vpn

## Required software

### OpenConnect (default)

The `uscf-vpn` tool requires:

1. OpenConnect (>= 7.08)
Expand All @@ -238,7 +233,7 @@ whether a VPN connection is established or not, and to provide public IP
information on your current internet connection. To disable this check, use
`--validate=pid`, or environment variable `UCSF_VPN_VALIDATE=pid`, which
uses the PID file of OpenConnect to decide whether a VPN connection is
established or not. This only works for `--method=openconnect`.
established or not.

The `ucsf-vpn` software _neither_ collects nor stores your local or UCSF
credentials.
Expand Down
4 changes: 1 addition & 3 deletions README.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ $ chmod ugo+x ucsf-vpn

## Required software

### OpenConnect (default)

The `uscf-vpn` tool requires:

1. OpenConnect (>= 7.08)
Expand All @@ -127,7 +125,7 @@ whether a VPN connection is established or not, and to provide public IP
information on your current internet connection. To disable this check, use
`--validate=pid`, or environment variable `UCSF_VPN_VALIDATE=pid`, which
uses the PID file of OpenConnect to decide whether a VPN connection is
established or not. This only works for `--method=openconnect`.
established or not.

The `ucsf-vpn` software _neither_ collects nor stores your local or UCSF
credentials.
Expand Down
10 changes: 4 additions & 6 deletions bin/ucsf-vpn
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
### --server=<host> VPN server (default is 'remote.ucsf.edu')
### --realm=<realm> VPN realm (default is 'Dual-Factor Pulse Clients')
### --url=<url> VPN URL (default is https://{{server}}/pulse)
### --method=<mth> Either 'openconnect' (default) or 'pulse' (deprecated)
### --protocol=<ptl> VPN protocol, e.g. 'nc' (default) and 'pulse'
### --validate=<how> One or more of 'ipinfo', 'iproute', and 'pid', e.g.
### 'pid,iproute,ipinfo' (default)
Expand All @@ -58,7 +57,6 @@
### ---
###
### Environment variables:
### UCSF_VPN_METHOD Default value for --method
### UCSF_VPN_PROTOCOL Default value for --protocol
### UCSF_VPN_SERVER Default value for --server
### UCSF_VPN_TOKEN Default value for --token
Expand All @@ -82,9 +80,8 @@
### set its permission accordingly (by calling chmod go-rwx ~/.netrc).
###
### Requirements:
### * Requirements when using OpenConnect (CLI):
### - OpenConnect (>= 7.08) (installed: {{openconnect_version}})
### - sudo
### * OpenConnect (>= 7.08) (installed: {{openconnect_version}})
### * sudo
###
### VPN Protocol:
### Different versions of OpenConnect support different VPN protocols.
Expand All @@ -111,7 +108,7 @@
### * UCSF Managing Your Passwords:
### - https://it.ucsf.edu/services/managing-your-passwords
###
### Version: 5.8.0-9001
### Version: 5.8.0-9002
### Copyright: Henrik Bengtsson (2016-2024)
### License: GPL (>= 2.1) [https://www.gnu.org/licenses/gpl.html]
### Source: https://github.com/HenrikBengtsson/ucsf-vpn
Expand Down Expand Up @@ -1383,6 +1380,7 @@ while [[ $# -gt 0 ]]; do
merror "Option '--$key' must not be empty"
fi
if [[ "$key" == "method" ]]; then
mwarn "There is no longer a need to specify method, because the default --method=openconnect is the only support one"
method=$value
elif [[ "$key" == "url" ]]; then
url=$value
Expand Down
10 changes: 4 additions & 6 deletions src/ucsf-vpn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
### --server=<host> VPN server (default is 'remote.ucsf.edu')
### --realm=<realm> VPN realm (default is 'Dual-Factor Pulse Clients')
### --url=<url> VPN URL (default is https://{{server}}/pulse)
### --method=<mth> Either 'openconnect' (default) or 'pulse' (deprecated)
### --protocol=<ptl> VPN protocol, e.g. 'nc' (default) and 'pulse'
### --validate=<how> One or more of 'ipinfo', 'iproute', and 'pid', e.g.
### 'pid,iproute,ipinfo' (default)
Expand All @@ -55,7 +54,6 @@
### ---
###
### Environment variables:
### UCSF_VPN_METHOD Default value for --method
### UCSF_VPN_PROTOCOL Default value for --protocol
### UCSF_VPN_SERVER Default value for --server
### UCSF_VPN_TOKEN Default value for --token
Expand All @@ -79,9 +77,8 @@
### set its permission accordingly (by calling chmod go-rwx ~/.netrc).
###
### Requirements:
### * Requirements when using OpenConnect (CLI):
### - OpenConnect (>= 7.08) (installed: {{openconnect_version}})
### - sudo
### * OpenConnect (>= 7.08) (installed: {{openconnect_version}})
### * sudo
###
### VPN Protocol:
### Different versions of OpenConnect support different VPN protocols.
Expand All @@ -108,7 +105,7 @@
### * UCSF Managing Your Passwords:
### - https://it.ucsf.edu/services/managing-your-passwords
###
### Version: 5.8.0-9001
### Version: 5.8.0-9002
### Copyright: Henrik Bengtsson (2016-2024)
### License: GPL (>= 2.1) [https://www.gnu.org/licenses/gpl.html]
### Source: https://github.com/HenrikBengtsson/ucsf-vpn
Expand Down Expand Up @@ -491,6 +488,7 @@ while [[ $# -gt 0 ]]; do
merror "Option '--$key' must not be empty"
fi
if [[ "$key" == "method" ]]; then
mwarn "There is no longer a need to specify method, because the default --method=openconnect is the only support one"
method=$value
elif [[ "$key" == "url" ]]; then
url=$value
Expand Down

0 comments on commit 44ec53b

Please sign in to comment.