Bug 2034845 - Fix broken Access Connector on policy modification#809
Conversation
94a8a20 to
47d71ac
Compare
47d71ac to
8436997
Compare
|
@jporter-dev Now that we have #825 there is no reason not to rebase and add proper testing to ensure this does not regress |
| if (this.autoStart) { | ||
| const state = lazy.IPPProxyManager.state; | ||
| if (state === lazy.IPPProxyStates.ACTIVE) { | ||
| lazy.IPPProxyManager.switch(); | ||
| return; | ||
| } | ||
| if (state === lazy.IPPProxyStates.ERROR) { | ||
| await lazy.IPPProxyManager.reset(); | ||
| lazy.IPPProxyManager.start( | ||
| false, | ||
| PrivateBrowsingUtils.permanentPrivateBrowsing | ||
| ); | ||
| return; | ||
| } | ||
| if (state === lazy.IPPProxyStates.READY) { | ||
| lazy.IPPProxyManager.start( | ||
| false, | ||
| PrivateBrowsingUtils.permanentPrivateBrowsing | ||
| ); | ||
| return; | ||
| } | ||
| } |
There was a problem hiding this comment.
Is this really the right place? Can we get feedback from people working on IPProtection for this?
There was a problem hiding this comment.
The autostart component's job is to "connect once when ready, asap".
So the way i'd read that code is, if autostart is enabled and something changes force-start no matter the current state.
If that always-on is the desired behavior, i'd probably move this into it's own little helper component. And swap out this helper component with the ipp-always-on in IPProtectionActivator.
Otherwise, given the bug-problem text, it sounds like just applying this while active should be sufficient. In that case ProxyManager should observe the serverlist and call switch() while in active.
There was a problem hiding this comment.
@strseb I've extracted the logic into a enterprise/IPPAlwaysOn.sys.mjs component that gets loaded in alongside the other helpers in a similar fashion to your IPPEnterpriseAuthProvider PR.
Let me know what you think! If it's the right approach then I can prepare this for upstream
lissyx
left a comment
There was a problem hiding this comment.
LGTM; please verify with a peer of IPProtection for the #handleListChanged implementation if that is the right place.
0592a3d to
e0c6d9c
Compare
aeae02c to
919b96c
Compare
…ive inclusion.match_patterns pref changes
…s for host and port updates
…rt become invalid and terminate VPN connection
919b96c to
03240f8
Compare
Description
This PR fixes an issue that occurs when the
AccessConnectorpolicy is modified in-place (not added/removed). This results in a broken access connector due to the#inclusionListnot being updated whenMatchPatternschanges, and the connection not being re-initialized with the new server when the serverlist changes (host/port in policy)Bugzilla: Bug-2034845
IPProtectionServerlist.sys.mjs: fixPrefServerListpref observer registration (was referencing instance instead of class), skip in maybeFetchList() when pref value is unchangedIPPChannelFilter.sys.mjs: register/unregister pref observer to refresh#inclusionSetwhen changedIPPProxyManager.sys.mjs: addreconnectmethod for reconnecting to the recommended server from the updated listIPPAutoStart.sys.mjs: add logic to#handleListChangedto reconnect on live changesDependencies / Related Issues
Testing
Steps to verify changes:
MatchPatternsExpected result:
AccessConnector shows active/inactive properly when modifying policy