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

@@ -6,7 +6,7 @@ This is a client for [vpngate.net](https://www.vpngate.net/).
This client fetches the list of available relay servers provided by vpngate.net, and allows you to filter and connect to a server of your liking.
You can check out your current IP address and region at https://ipinfo.io, or run the following:
You can check out your current IP address and region at <https://ipinfo.io>, or run the following:
```shell
curl ipinfo.io
@@ -79,6 +79,28 @@ If the country doesn't matter, a random server can be selected:
sudo vpngate connect --random
```
#### Proxy
In some cases, anonymity is necessary to populate the list of available VPN servers.
A proxy is a way to bypass restrictions and in some cases, internet censorship.
##### HTTP/HTTPS
Use the specified HTTP/HTTPS proxy to fetch the server list.
```shell
sudo vpngate connect --proxy "http://localhost:8080"
```
##### SOCKS5
Use the specified SOCKS5 proxy to fetch the server list.
```shell
sudo vpngate connect --socks5 "127.0.0.1:1080"
```
## Notes
- I do not maintain any of the servers on vpngate.net (connect to these servers at your own discretion)