Add support for HTTP and SOCKS5 proxies (#127)

As mentioned in https://github.com/davegallant/vpngate/issues/126, adding support for proxies will help bypass issues when vpngate.net is not accessible directly.

This works by:

```sh
# http proxy
sudo vpngate connect --proxy "http://localhost:8080"

# socks5 proxy
sudo vpngate connect --socks5 "127.0.0.1:1080"
```
This commit is contained in:
Dave Gallant
2024-07-21 14:38:26 -04:00
committed by GitHub
parent 5850876efa
commit 16aa16c66e
7 changed files with 78 additions and 21 deletions

3
go.mod
View File

@@ -12,6 +12,7 @@ require (
github.com/spf13/afero v1.11.0
github.com/spf13/cobra v1.8.1
github.com/stretchr/testify v1.9.0
golang.org/x/net v0.19.0
)
require (
@@ -29,7 +30,7 @@ require (
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect