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

View File

@@ -22,7 +22,7 @@ var listCmd = &cobra.Command{
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
vpnServers, err := vpn.GetList()
vpnServers, err := vpn.GetList(flagProxy, flagSocks5Proxy)
if err != nil {
log.Fatal().Msgf(err.Error())
os.Exit(1)