-
Notifications
You must be signed in to change notification settings - Fork 203
Decode feature flags for protonvpn s
#368
base: master
Are you sure you want to change the base?
Conversation
6da664e to
d5b8465
Compare
|
@Rafficer ping for attention |
zPhoeniqz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the ProtonVPN API code:
SECURE_CORE = 1 << 0 # 1
TOR = 1 << 1 # 2
P2P = 1 << 2 # 4
STREAMING = 1 << 3 # 8
IPV6 = 1 << 4 # 16IPv6 needs to be added as well.
Add IPv6 to server features
|
Thanks @zPhoeniqz, I have added your commit to this MR |
| # Sort server IDs by Tier | ||
| return [server for server in servers if server["Tier"] <= user_tier and server["Status"] == 1] # noqa | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcel-engelke Are these extra linefeeds necessary?
| for bit_flag in features: | ||
| if (feat & bit_flag) != 0: | ||
| servers_features.append(features[bit_flag]) | ||
| server_features = get_server_features(servername, servers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcel-engelke Is this variable rename necessary? It forces 3 other changes that are not code fixes per se. (maybe these little 'extras' are blocking a good review and merge?)
|
@marcel-engelke if you wish to resolve my comments made in-line then I think that this patch LGTM. @Rafficer do you agree? It is about time this was fixed and merged. |
This fixes the problem described in #367 while also refactoring the change of #337 into a common decoding function.
Closes #367