Add CGO_ENABLED=0 to README.md (#13)

This commit is contained in:
Dave Gallant
2021-01-02 20:09:04 -05:00
committed by GitHub
parent 953a66d906
commit ce7cd9f9a1

View File

@@ -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
```