Skip to content

Commit 089af8d

Browse files
committed
Client versioning in API
* Properly declares the client versioning when contacting the Proton API. * Improves kwalitee. Signed-off-by: Samuele Kaplun <[email protected]>
1 parent 81dfeec commit 089af8d

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Table of Contents
44

5+
- [v2.2.6](#v226)
56
- [v2.2.5](#v225)
67
- [v2.2.4](#v224)
78
- [v2.2.3](#v223)
@@ -14,6 +15,10 @@
1415
- [v2.0.0](#v200)
1516
- [v0.1.0](#v010)
1617

18+
## v2.2.6
19+
20+
- Enhancement: Properly specifies versioning when contacting Proton API
21+
1722
## v2.2.5
1823

1924
- Enhancement: Introduces support for the client to declare itself

protonvpn_cli/connection.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
)
2424
# Constants
2525
from .constants import (
26-
CONFIG_DIR, OVPN_FILE, PASSFILE, CONFIG_FILE, CLIENT_SUFFIX
26+
CONFIG_DIR, OVPN_FILE, PASSFILE, CONFIG_FILE
2727
)
2828

2929

protonvpn_cli/constants.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
SPLIT_TUNNEL_FILE = os.path.join(CONFIG_DIR, "split_tunnel.txt")
1818
OVPN_FILE = os.path.join(CONFIG_DIR, "connect.ovpn")
1919
PASSFILE = os.path.join(CONFIG_DIR, "pvpnpass")
20-
CLIENT_SUFFIX = "plc" # ProtonVPN Linux Community
21-
VERSION = "2.2.5"
20+
CLIENT_SUFFIX = "plc" # ProtonVPN Linux Community
21+
VERSION = "2.2.6"

protonvpn_cli/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def call_api(endpoint, json_format=True, handle_errors=True):
2828
url = api_domain + endpoint
2929

3030
headers = {
31-
"x-pm-appversion": "Other",
31+
"x-pm-appversion": "LinuxVPN_{0}".format(VERSION),
3232
"x-pm-apiversion": "3",
3333
"Accept": "application/vnd.protonmail.v1+json"
3434
}

0 commit comments

Comments
 (0)