update: fixed datacenter proxy and changed systemwide screen

This commit is contained in:
Your Name 2026-01-07 19:40:25 +01:00
parent 8dc8056705
commit 60b75b5f1a
2 changed files with 42 additions and 7 deletions

View file

@ -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,6 +3149,7 @@ 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)))
@ -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,6 +9750,12 @@ class FastRegistrationPage(Page):
label.setCursor(QtCore.Qt.CursorShape.PointingHandCursor)
label.clicked.connect(
lambda checked, loc=self.selected_values['location']: self.show_location_verification(loc))
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)
@ -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)

View file

@ -1,6 +1,6 @@
[project]
name = "sp-hydra-veil-gui"
version = "2.0.2"
version = "2.1.0"
authors = [
{ name = "Simplified Privacy" },
]