From 60b75b5f1a3949c00094f7b5299b2f171956ef41 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 7 Jan 2026 19:40:25 +0100 Subject: [PATCH] update: fixed datacenter proxy and changed systemwide screen --- gui/__main__.py | 47 +++++++++++++++++++++++++++++++++++++++++------ pyproject.toml | 2 +- 2 files changed, 42 insertions(+), 7 deletions(-) diff --git a/gui/__main__.py b/gui/__main__.py index 111dcb2..e57616a 100755 --- a/gui/__main__.py +++ b/gui/__main__.py @@ -955,7 +955,7 @@ class CustomWindow(QMainWindow): ResidentialPage(self.page_stack, self), InstallSystemPackage(self.page_stack, self), WelcomePage(self.page_stack, self), - SystemwidePromptPage(self.page_stack, self), + # SystemwidePromptPage(self.page_stack, self), PolicySuggestionPage( self.page_stack, self, None, 'capability'), PolicySuggestionPage( @@ -3139,6 +3139,7 @@ class InstallSystemPackage(Page): self.status_label.setStyleSheet("color: red;") def go_next(self): + ''' if not self.update_status.has_shown_systemwide_prompt(): system_page = self.page_stack.findChild(SystemwidePromptPage) if system_page is None: @@ -3148,8 +3149,9 @@ class InstallSystemPackage(Page): self.page_stack.setCurrentIndex( self.page_stack.indexOf(system_page)) else: - self.page_stack.setCurrentIndex( - self.page_stack.indexOf(self.page_stack.findChild(MenuPage))) + ''' + self.page_stack.setCurrentIndex( + self.page_stack.indexOf(self.page_stack.findChild(MenuPage))) class ProtocolPage(Page): @@ -5909,7 +5911,7 @@ class Settings(Page): ("Subscriptions", self.show_subscription_page), ("Create/Edit", self.show_registrations_page), ("Verification", self.show_verification_page), - ("Systemwide", self.show_systemwide_page), + ("Legacy-Version", self.show_systemwide_page), ("Bwrap Permission", self.show_bwrap_page), ("Delete Profile", self.show_delete_page), ("Error Logs", self.show_logs_page), @@ -7583,7 +7585,7 @@ class Settings(Page): layout.addWidget(title) description = QLabel( - "Control whether HydraVeil configures a sudo policy so system-wide WireGuard profiles can be started without entering your sudo password.") + "This is for the old version of the app! The new version prior to 2.1.0 does not need it. This allows you to enable or disable a legacy systemwide policy for sudo.") description.setWordWrap(True) description.setStyleSheet( f"color: white; font-size: 14px; {self.font_style}") @@ -8777,6 +8779,7 @@ class WelcomePage(Page): self.page_stack.setCurrentIndex(self.page_stack.indexOf(install_page)) +''' class SystemwidePromptPage(Page): def __init__(self, page_stack, main_window=None, parent=None): super().__init__("Systemwide", page_stack, main_window, parent) @@ -8883,6 +8886,8 @@ class SystemwidePromptPage(Page): self.page_stack.setCurrentIndex( self.page_stack.indexOf(install_page)) +''' + class PolicySuggestionPage(Page): def __init__(self, page_stack, main_window=None, parent=None, policy_type='capability'): @@ -9745,7 +9750,13 @@ class FastRegistrationPage(Page): label.setCursor(QtCore.Qt.CursorShape.PointingHandCursor) label.clicked.connect( lambda checked, loc=self.selected_values['location']: self.show_location_verification(loc)) - label.show() + + locations = self.connection_manager.get_location_info( + self.selected_values['location']) + if self.selected_values['protocol'] == 'hidetor' and locations and not (hasattr(locations, 'is_proxy_capable') and locations.is_proxy_capable): + label.hide() + else: + label.show() self.labels.append(label) prev_button = QPushButton(self) @@ -9871,6 +9882,14 @@ class FastRegistrationPage(Page): self.selected_values['connection'] = 'browser-only' else: self.selected_values['connection'] = 'tor' + loc_info = self.connection_manager.get_location_info( + self.selected_values['location']) + if not (loc_info and hasattr(loc_info, 'is_proxy_capable') and loc_info.is_proxy_capable): + locations = self.connection_manager.get_location_list() + proxy_locations = [loc for loc in locations if (l := self.connection_manager.get_location_info( + loc)) and hasattr(l, 'is_proxy_capable') and l.is_proxy_capable] + if proxy_locations: + self.selected_values['location'] = proxy_locations[0] elif key == 'connection': if self.selected_values['protocol'] == 'wireguard': connections = ['browser-only', 'system-wide'] @@ -9882,6 +9901,10 @@ class FastRegistrationPage(Page): self.update_ui_state_for_connection() elif key == 'location': locations = self.connection_manager.get_location_list() + if self.selected_values['protocol'] == 'hidetor': + locations = [loc for loc in locations if (l := self.connection_manager.get_location_info( + loc)) and hasattr(l, 'is_proxy_capable') and l.is_proxy_capable] + if locations and self.selected_values[key] in locations: current_index = locations.index(self.selected_values[key]) previous_index = (current_index - 1) % len(locations) @@ -9915,6 +9938,14 @@ class FastRegistrationPage(Page): self.selected_values['connection'] = 'browser-only' else: self.selected_values['connection'] = 'tor' + loc_info = self.connection_manager.get_location_info( + self.selected_values['location']) + if not (loc_info and hasattr(loc_info, 'is_proxy_capable') and loc_info.is_proxy_capable): + locations = self.connection_manager.get_location_list() + proxy_locations = [loc for loc in locations if (l := self.connection_manager.get_location_info( + loc)) and hasattr(l, 'is_proxy_capable') and l.is_proxy_capable] + if proxy_locations: + self.selected_values['location'] = proxy_locations[0] elif key == 'connection': if self.selected_values['protocol'] == 'wireguard': connections = ['browser-only', 'system-wide'] @@ -9926,6 +9957,10 @@ class FastRegistrationPage(Page): self.update_ui_state_for_connection() elif key == 'location': locations = self.connection_manager.get_location_list() + if self.selected_values['protocol'] == 'hidetor': + locations = [loc for loc in locations if (l := self.connection_manager.get_location_info( + loc)) and hasattr(l, 'is_proxy_capable') and l.is_proxy_capable] + if locations and self.selected_values[key] in locations: current_index = locations.index(self.selected_values[key]) next_index = (current_index + 1) % len(locations) diff --git a/pyproject.toml b/pyproject.toml index d7e7078..f729ea8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "sp-hydra-veil-gui" -version = "2.0.2" +version = "2.1.0" authors = [ { name = "Simplified Privacy" }, ]