Connect TW VPN easily
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
img
install
lib
vars
vpn
.gitignore
README.md
auth-template.yml
config.yml
install.sh
vpn.sh

README.md

TW VPN for CN

One command line to connect TW VPN easily on Mac OS.

Installation and Setup (Mac OS supported only)

  1. Clone the project: git clone https://github.com/Waterstrong/tw-vpn.git

  2. Execute the install.sh script and follow the instructions to complete the whole process

  3. Pay attention to the second authentication method index(Secret Num) and your password

    Use Cisco AnyConnect Client to check the second authentication method num. It's 4 for me.

    The auth.yml file contains group, username, password, secret.key and secret.num.

    group: Okta
    username: xxx@thoughtworks.com
    password: ******
    secret:
      key: ******
      num: 4
    

Get Started

Usage:  vpn [OPTION]

Connect to VPN easily. Default OPTION is 'xdc'.

Options:
  help        Print usage
  stop        Disconnect and stop VPN
  restart     Stop and start the VPN
  state       Show VPN connection state
  xdc         Connect to Xian DC VPN
  xian         Connect to Xian VPN
  sify         Connect to Sify VPN
  lon         Connect to London VPN
  syd         Connect to Sydney VPN

E.g. Type command vpn to connect the default xdc. Type vpn xian to connect Xian server. The server domains code and description are listed in config.yml file. Connect VPN

The config.yml file contains the list of VPN server domains code and description. You can add more or change the order. The first appeared is the default one for first time. The script will cache your preference.

domains:
  -
    code: xdc
    desc: Xian DC
  -
    code: xian
    desc: Xian
  -
    code: sify
    desc: Sify
  -
    code: lon
    desc: London
  -
    code: syd
    desc: Sydney

How to Upgrade

If there is any updates to the script, it will be upgraded automatically. The upgrade will use your ssh key to pull the latest changes. If you install the script, it represents that you accept the upgrade agreement by default.

If your password is changed because of the security policy, please update it in auth.yml.

sudo vim <your_dir>/tw-vpn/auth.yml

Dependencies

References: