From ce7cd9f9a169089fda4369ab3d4bd4f949974414 Mon Sep 17 00:00:00 2001 From: Dave Gallant Date: Sat, 2 Jan 2021 20:09:04 -0500 Subject: [PATCH] Add CGO_ENABLED=0 to README.md (#13) --- README.md | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 83099b1..7dda854 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This client fetches the list of available relay servers provided by vpngate.net. You can check out your current IP address and region at https://nordvpn.com/what-is-my-ip/, or simply run the following command in a terminal: -```sh +```console $ curl ipinfo.io ``` @@ -17,19 +17,26 @@ $ curl ipinfo.io - [openvpn](https://github.com/OpenVPN/openvpn) - macOS or Linux -## Install +## Install from source Ensure that [go](https://golang.org/doc/install) is installed. -```sh -$ go get github.com/davegallant/vpngate +```console +$ CGO_ENABLED=0 go get github.com/davegallant/vpngate +``` + +Ensure that the go bin path is discoverable: + +```console +$ echo 'export PATH=$PATH:$HOME/go/bin' >> ~/.profile +$ source ~/.profile ``` ### MacOS OpenVPN can be installed with [homebrew](https://brew.sh/). -```sh +```console $ brew install openvpn ``` @@ -37,7 +44,7 @@ $ brew install openvpn ### List available servers -```sh +```console $ vpngate list ``` @@ -45,7 +52,7 @@ $ vpngate list On macOS, `openvpn` may not be within your PATH. To fix this, run: -```sh +```console $ export PATH=$(brew --prefix openvpn)/sbin:$PATH ``` @@ -53,7 +60,7 @@ The above command can also be added to a bash/zsh profile for future use. Because openvpn creates a network interface, run the connect command with `sudo` or a user with escalated privileges. -```sh +```console $ sudo vpngate connect ``` @@ -61,7 +68,7 @@ $ sudo vpngate connect If the country doesn't matter, a random server can be selected: -```sh +```console $ sudo vpngate connect --random ```