AlgoDiscoDev Software Development

Expressvpn CLI Client Package Upgrader

Expressvpn is a pretty popular VPN provider. I've been using their service for a few years now. Not bad at all.

Reading around it seems that at time of writing, expressvpn doesn't yet deposit packages into a ppa. Instead, the recommended process for acquiring their latest packages involves GUI browser opening and mouse clicking.

Anyway, being a Linux user I prefer using their CLI program as my VPN client. Also, being a Linux user it's never long before I start trying to write scripts to automate stuff. This project is about automating the quite frequent process of updating to the latest client version.

This program has so far been tested only on 64-bit Ubuntu (20.04) Linux and with its' default, built-in BASH interpreter.

This program is only meant for hobby and testing environments, as it depends on things that expressvpn may change at any time.

< pada

"In VPN Provider, We Trust."

Technical Documentation

The Technical Documentation for the expressvpn version upgrader program is basically the README file within the project repository, on GitHub.

Running the Program

damola@host0:~$ expressvpn-version-upgrader.sh dev Select your OS Platform to check online for VPN client updates (or choose None): 1) Ubuntu_64_bit 3) Fedora_64_bit 5) Arch_64_bit 7) None 2) Ubuntu_32_bit 4) Fedora_32_bit 6) Raspberry_Pi_OS > 1 You Selected the "Ubuntu_64_bit" OS platform. Currently Installed Version: 3.29.0.10-1 Available Version URL: https://www.expressvpn.works/clients/linux/expressvpn_3.29.0.10-1_amd64.deb Download and Verify this package? Choose an option : 1) Yes, Download and Verify 2) No, Quit the Program > 1 You Selected : Yes, Download and Verify Downloading and Verifying... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 18.5M 100 18.5M 0 0 4121k 0 0:00:04 0:00:04 --:--:-- 4507k Found a Package Installation file: /home/damola/Downloads/expressvpn_3.29.0.10-1_amd64.deb Found a Package Signature file: /home/damola/Downloads/expressvpn_3.29.0.10-1_amd64.deb.asc Now checking package file against expressvpn public key... pub rsa4096 2016-01-22 [SC] 1D0B 09AD 6C93 FEE9 3FDD BD9D AFF2 A141 5F6A 3A38 uid [ unknown] ExpressVPN Release sub rsa4096 2016-01-22 [E] gpg: Signature made Fri 29 Jul 2022 01:49:39 BST gpg: using RSA key 1D0B09AD6C93FEE93FDDBD9DAFF2A1415F6A3A38 gpg: Good signature from "ExpressVPN Release " [unknown] gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 1D0B 09AD 6C93 FEE9 3FDD BD9D AFF2 A141 5F6A 3A38 GPG VERIFICATION SUCCESSFUL. CONFIRM VISUALLY ANYWAY... Confirm? Do you see "Good signature"? Choose an option : 1) Yes, Confirmed 2) No, Quit the Program > 1 You Selected : Yes, Confirmed Continuing... Proceed with Package Installation? (requires sudo). Choose and option : 1) Yes, Install 2) No, Quit the Program > 2 You Selected : No, Quit the Program damola@host0:~$

Further Work

Here, I'll list some of what would need to happen if this program were to be useful to say, 3 people other than just myself.

In no particular order:

  1. Integrate a Test Driven Development process. Implementation of either BachUnit or ShUnit and a better understanding of BATS Unit Testing.

  2. Extend to the Raspberry Pi Linux platform, and assume server, rather than desktop. Perhaps spin up containers of other Linux platforms, for even more development practice.

  3. Improved use of the built-in Linux nmcli network management utility.

  4. Improved gpg verification of package file, but still fall back on visual verification of hashes. Also, improved handling of detached signature file.

  5. Containerise it. Build this utility into a Linux Docker image, along with the expressvpn client. I noticed another project that has also taken that one up.

"Designing software systems is very nice."

Let's discuss this...