Skip to content

Commit

Permalink
docs: document metadata API supports lookup by IP address (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
tprasadtp authored Mar 1, 2024
1 parent b0b6b02 commit 2f492e0
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 37 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
[![actions-build](https://github.com/tprasadtp/protonvpn-docker/actions/workflows/build.yml/badge.svg)](https://github.com/tprasadtp/protonvpn-docker/actions/workflows/build.yml)
[![actions-docs](https://github.com/tprasadtp/protonvpn-docker/actions/workflows/docs.yml/badge.svg)](https://github.com/tprasadtp/protonvpn-docker/actions/workflows/docs.yml)
[![actions-release](https://github.com/tprasadtp/protonvpn-docker/actions/workflows/release.yml/badge.svg)](https://github.com/tprasadtp/protonvpn-docker/actions/workflows/release.yml)

[![version](https://img.shields.io/github/v/tag/tprasadtp/protonvpn-docker?label=version&sort=semver&logo=semver&labelColor=3a3a3a&include_prereleases)](https://github.com/tprasadtp/protonvpn-docker/releases)
[![license](https://img.shields.io/github/license/tprasadtp/protonvpn-docker?logo=github&labelColor=3A3A3A)](https://github.com/tprasadtp/protonvpn-docker/blob/master/LICENSE)
[![stars](https://img.shields.io/github/stars/tprasadtp/protonvpn-docker?logo=github&labelColor=3a3a3a&style=flat)](https://github.com/tprasadtp/protonvpn-docker/stargazers/)

[![actions-metadata](https://github.com/tprasadtp/protonvpn-docker/actions/workflows/metadata.yml/badge.svg)](https://github.com/tprasadtp/protonvpn-docker/actions/workflows/metadata.yml)
[![metadata-refresh](https://img.shields.io/badge/dynamic/json?label=metadata&query=timestamp&url=https%3A%2F%2Fprotonwire-api.vercel.app&logo=protonvpn&labelColor=3a3a3a&logoColor=white&color=7f50a6)](https://protonwire-api.vercel.app/)
[![metadata-servers](https://img.shields.io/badge/dynamic/json?label=servers&query=server_count&url=https%3A%2F%2Fprotonwire-api.vercel.app&logo=protonvpn&labelColor=3a3a3a&logoColor=white&color=7f50a6)](https://protonwire-api.vercel.app/)
Expand Down Expand Up @@ -93,8 +91,8 @@ in following locations.

## PROTONVPN_SERVER

This should be server DNS name like, `node-nl-01.protonvpn.net`.
Though server name like `NL#1`(or `NL-1`) is supported it is not recommended.
This should be server DNS name like, `node-nl-01.protonvpn.net` or IP address like
`91.229.23.180`. Though server name like `NL#1`(or `NL-1`) is supported it is not recommended.

> [!IMPORTANT]
>
Expand Down
82 changes: 49 additions & 33 deletions docs/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,56 @@ async function handleRequest(request) {

## Failed to refresh ProtonVPN server metadata (server name is invalid or not found)

Please verify that server name is valid and is online. Proton sometimes changes server names
and thus it may be unavailable. It is recommended to use DNS name like `node-nl-03.protonvpn.net`
instead of server name like `NL-FREE#343013`.
Please verify that server name is valid and is online.

- Log in to ProtonVPN and go to **Downloads****WireGuard configuration**.
- Verify that server you are trying to connect is listed, available and is online.
- Use little down arrow to copy server's DNS name to be used as `PROTONVPN_SERVER`.
Proton sometimes changes server names and thus it may be unavailable.
It is recommended to use DNS name like `node-nl-03.protonvpn.net` or
IP addresses instead of server name like `NL-FREE#343013`.

IP address of server can be obtained from `[Peer]` section of the generated
WireGuard configuration.

```ini
[Interface]
# Key for <name>
# VPN Accelerator = on
PrivateKey = KLjfIMiuxPskM4+DaSUDmL2uSIYKJ9Wap+CHvs0Lfkw=
Address = 10.2.0.2/32
DNS = 10.2.0.1

[Peer]
# NL-FREE#343013
PublicKey = MTNPR632U9GOxI+B8dMP+KgMJVEO2xQPrem2SuDfTkM=
AllowedIPs = 0.0.0.0/0
Endpoint = 89.39.107.188:51820
```

In the above example, server's IP address is `89.39.107.188`. Use it as value for `PROTONVPN_SERVER`.
If using docker-compose or kubernetes _do not forget to quote it_ to avoid any weird YAML issues.

Alternatively, you can use `server-info` sub command to get all server metadata and attributes.

> [!IMPORTANT]
>
> This Requires protonwire version `7.3.0-beta3` or later.
> This may not work for IPv6 servers and should be considered experimental.
```bash
protonwire server-info {SERVER_NAME_OR_IP}
```

```console
[•] Refresing server metadata (for node-nl-03.protonvpn.net)
[•] Successfully refreshed server metadata
[•] Server Status : ONLINE
[•] Server Name : NL-FREE#343013
[•] Server DNS Name : node-nl-03.protonvpn.net
[•] Feature (Streaming) : false
[•] Feature (P2P) : false
[•] Feature (SecureCore) : false
[•] Exit IPs : 89.39.107.188 89.39.107.202 89.39.107.203 89.39.107.204 89.39.107.205
[•] 89.39.107.188 : MTNPR632U9GOxI+B8dMP+KgMJVEO2xQPrem2SuDfTkM= (Public Key)
```

## tmpfs or `/tmp` issues with containers

Expand All @@ -70,33 +113,6 @@ This typically happens on a older machine or NAS/embedded devices
as Wireguard support might not be present in the kernel.
Please visit https://www.wireguard.com/install/ or contact device manufacturer.

## Server DNS name is not available or unknown

If for some reason you are not able to get server DNS name, and server name does not work
for you, Try using IP address as `PROTONVPN_SERVER` or as CLI argument. IP address of server
can be obtained from `[Peer]` section of the generated WireGuard configuration.

```ini
[Interface]
# Key for <name>
# VPN Accelerator = on
PrivateKey = KLjfIMiuxPskM4+DaSUDmL2uSIYKJ9Wap+CHvs0Lfkw=
Address = 10.2.0.2/32
DNS = 10.2.0.1

[Peer]
# NL-FREE#128
PublicKey = jbTC1lYeHxiz1LNSJHQMKDTq6sHgcWxkBwXvt7GWo1E=
AllowedIPs = 0.0.0.0/0
Endpoint = 91.229.23.180:51820
```

In the above example, server's IP address is `91.229.23.180`. Use it as value for `PROTONVPN_SERVER`.
If using docker-compose or kubernetes _do not forget to quote it_ to avoid any weird YAML issues.

> This may not work for IPv6 servers and should be considered experimental.

## DNS leak protection and Kubernetes

On Kubernetes using ProtonVPN DNS **WILL** break resolving `.cluster` domains. You can use [external-dns](https://github.com/kubernetes-sigs/external-dns) and use public DNS zones for your hosted services or use DoH or DoT on kubernetes **nodes** and use `SKIP_DNS_CONFIG` or `--skip-dns-config`.
Expand Down
Binary file removed docs/images/server-dns-name.png
Binary file not shown.

0 comments on commit 2f492e0

Please sign in to comment.