occ stands for openconnect-connector and is a cli vpn tool (currently only supporting openconnect) which helps in several ways
-
- Saving username and password so you don't have to enter them every time you try to connect to a vpn server
- Separating urls into two parts, so you'll never type the common part of vpnservers' urls which is the same among all of them (server_postfix) and just type the first part (server_prefix) which is usually shorter
-
- Wrap openconnect cert check so you won't get troubled with a non-trusted cert-signature
- Short commandline arguments
- Save all vpn servers available (vpnlist) and let occ choose one of them randomly when you're not sure which one to connect
-
- Possibility to run a ping test on all available vpn servers and choose the best one to connect
- let me know your ideas about how else could occ detect the best vpn server
- Possibility to run a ping test on all available vpn servers and choose the best one to connect
-
- First method(automatic):
- using curl:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/mrtaalebi/occ/master/install.sh)"
- using wget:
bash -c "$(wget -O- https://raw.githubusercontent.com/mrtaalebi/occ/master/install.sh)"
- using curl:
- Second method(manual):
- clone this repository by
git clone https://github.com/mrtaalebi/occ
- cd into occ directory (
cd occ
) then runchmod +x install.sh && ./install.sh
- clone this repository by
- First method(automatic):
-
- Don't worry. occ has a detailed and interactive cli. Outputs make everything clear for you.
- Just try one of the following to get started with occ:
occ vpndata
- You could connect to a specific server using first format
occ <server-prefix>
next.
- You could connect to a specific server using first format
occ vpnlist
- It'll open a file where you should put vpn servers' urls to use
occ best
andocc rand
afterwards.
- It'll open a file where you should put vpn servers' urls to use
- You may disconnect any time running
occ d
.
occ uses openconnect to connect and disconnect in a more suitable way :)
make sure you have following pacakages installed (e.g. using apt install on ubuntu):
openconnect
usage:
occ <server-prefix> connects to vpn server at server_prefix.vpn_server_postfix
occ best connects to best vpn server (lowest ping) from vpnlist
occ rand connects to a random vpn server from vpnlist
occ d disconnects!
occ vpndata updates vpn data (vpn_server_postfix, username, password)
occ vpnlist updates a file of all vpn servers available for current registered user
occ -h|--help shows this help