Install easyconnect on Linux

In order to visit some websites only in LAN, we need to use VPN. For Nanjing University, its VPN is provided at https://vpn.nju.edu.cn, easyconnect software. Its Linux version is too old to use in Ubuntu 22.04, and I use a docker contain to get through.

Resources

Here are some tutorials:

  1. Video by Sakiyary
  2. The repo of docker-easyconnect
  3. Configure SwitchyOmega and Clash.

Steps

My environment is Ubuntu 22.04 LTS.

Firstly, install docker desktop.

Then, install VNC Viewer for GUI version. (NJU VPN needs vertification code).

Next, view the note of the repo. My configuration is as follows:

  1. run in terminal
1
$ docker pull hagb/docker-easyconnect:7.6.7

to install image 7.6.7.

  1. run
1
$ docker run -d --name NJUEC --device /dev/net/tun --cap-add NET_ADMIN -ti -e PASSWORD=xxxx -v $HOME/.ecdata:/root -p 127.0.0.1:5901:5901 -p 127.0.0.1:6897:1080 hagb/docker-easyconnect:7.6.7

Here we created a contain named NJUEC, with:

  • 127.0.0.1:5901, ip & port for remote desktop, i.e. VNC Viewer.
  • 127.0.0.1:6897, ip & port for socks5.
  1. open VNC Viewer, and enter 127.0.0.1:5901, log in.
  2. use SwitchyOmega to get rule configuration. See Video by Sakiyary for steps, and replace the socks5 port by 6897 here.
  3. configure SwitchyOmega to work with Clash, see Configure SwitchyOmega and Clash.