Skip to content

Commit 9da74c9

Browse files
[VPNLINUX-1128] Update event context so that it passes a forwarded port.
1 parent 5aff9aa commit 9da74c9

File tree

5 files changed

+18
-3
lines changed

5 files changed

+18
-3
lines changed

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ Architecture: all
1313
Depends: ${python3:Depends}, ${misc:Depends},
1414
python3-proton-core,
1515
python3-distro, python3-sentry-sdk, python3-nacl, python3-jinja2
16-
Breaks: proton-vpn-gtk-app (<< 4.8.0~rc2), python3-proton-vpn-network-manager (<< 0.9.9)
16+
Breaks: proton-vpn-gtk-app (<< 4.8.2~rc3), python3-proton-vpn-network-manager (<< 0.10.2)
1717
Replaces: python3-proton-vpn-session, python3-proton-vpn-connection, python3-proton-vpn-killswitch, python3-proton-vpn-logger
1818
Description: Python3 ProtonVPN Core API

proton/vpn/connection/events.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class EventContext:
5252
"""
5353
connection: "VPNConnection"
5454
connection_details: Optional[ConnectionDetails] = None
55+
forwarded_port: Optional[int] = None
5556
reason: Optional[Any] = None
5657
error: Optional[Exception] = None
5758

proton/vpn/connection/states.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ def _on_event(
139139
async def run_tasks(self) -> Optional[events.Event]:
140140
"""Tasks to be run when this state instance becomes the current VPN state."""
141141

142+
@property
143+
def forwarded_port(self) -> Optional[int]:
144+
"""Returns the forwarded port if it exists."""
145+
return self.context.event.context.forwarded_port
146+
142147

143148
class Disconnected(State):
144149
"""

rpmbuild/SPECS/package.spec.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ Requires: python3-sentry-sdk
3030
Requires: python3-pynacl
3131
Requires: python3-jinja2
3232

33-
Conflicts: proton-vpn-gtk-app < 4.8.0~rc2
34-
Conflicts: python3-proton-vpn-network-manager < 0.9.9
33+
Conflicts: proton-vpn-gtk-app < 4.8.2~rc3
34+
Conflicts: python3-proton-vpn-network-manager < 0.10.2
3535

3636
Obsoletes: python3-proton-vpn-session
3737
Obsoletes: python3-proton-vpn-connection

versions.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
version: 0.39.0
2+
time: 2024/12/17 13:00
3+
author: Alexandru Cheltuitor
4+
email: alexandru.cheltuitor@proton.ch
5+
urgency: low
6+
stability: unstable
7+
description:
8+
- Update event context so that it passes a forwarded port.
9+
---
110
version: 0.38.6
211
time: 2024/12/16 10:00
312
author: Alexandru Cheltuitor

0 commit comments

Comments
 (0)