Format Python sources with Black

Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
Loren Eteval
2026-08-12 12:20:14 +08:00
parent ffd1a7297f
commit a3ec887f26
81 changed files with 379 additions and 3 deletions
-1
View File
@@ -17,6 +17,5 @@
from Furious.__main__ import main from Furious.__main__ import main
if __name__ == '__main__': if __name__ == '__main__':
main() main()
+1
View File
@@ -213,6 +213,7 @@ def getUserTUNSettings(*args, **kwargs):
class CoreManager(Mixins.CleanupOnExit): class CoreManager(Mixins.CleanupOnExit):
"""Coordinate proxy cores, TUN setup, DNS changes, and routing cleanup.""" """Coordinate proxy cores, TUN setup, DNS changes, and routing cleanup."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the CoreManager.""" """Initialize the CoreManager."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
+6
View File
@@ -52,6 +52,7 @@ logger = logging.getLogger(__name__)
class CoreProcessState(Enum): class CoreProcessState(Enum):
"""Enumerate core process state.""" """Enumerate core process state."""
Idle = 'idle' Idle = 'idle'
Starting = 'starting' Starting = 'starting'
Running = 'running' Running = 'running'
@@ -63,6 +64,7 @@ class CoreProcessState(Enum):
@dataclass @dataclass
class CoreLaunchSpec: class CoreLaunchSpec:
"""Describe the parameters required by a core launch operation.""" """Describe the parameters required by a core launch operation."""
target: Callable target: Callable
args: Tuple[Any, ...] = field(default_factory=tuple) args: Tuple[Any, ...] = field(default_factory=tuple)
processKwargs: Dict[str, Any] = field(default_factory=dict) processKwargs: Dict[str, Any] = field(default_factory=dict)
@@ -116,6 +118,7 @@ class CoreLaunchSpec:
class MsgQueue(multiprocessing.queues.Queue): class MsgQueue(multiprocessing.queues.Queue):
"""Deliver child-process log messages to Qt callbacks at an adaptive rate.""" """Deliver child-process log messages to Qt callbacks at an adaptive rate."""
MSG_PRODUCE_THRESHOLD = 1024 MSG_PRODUCE_THRESHOLD = 1024
OPTIMIZER_MIN_FREQ = 2 OPTIMIZER_MIN_FREQ = 2
OPTIMIZER_MAX_FREQ = 256 OPTIMIZER_MAX_FREQ = 256
@@ -207,6 +210,7 @@ class MsgQueue(multiprocessing.queues.Queue):
class CoreProcessMonitor(CoreProcessFactory, ABC): class CoreProcessMonitor(CoreProcessFactory, ABC):
"""Track the state and lifetime of a proxy-core child process.""" """Track the state and lifetime of a proxy-core child process."""
StopJoinTimeout = 3 StopJoinTimeout = 3
def __init__(self, **kwargs): def __init__(self, **kwargs):
@@ -292,6 +296,7 @@ class CoreProcessMonitor(CoreProcessFactory, ABC):
class CoreProcessWorker(CoreProcessMonitor, ABC): class CoreProcessWorker(CoreProcessMonitor, ABC):
"""Run and monitor a proxy core in a child process.""" """Run and monitor a proxy core in a child process."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the CoreProcessWorker.""" """Initialize the CoreProcessWorker."""
msgCallback = kwargs.pop('msgCallback', None) msgCallback = kwargs.pop('msgCallback', None)
@@ -415,6 +420,7 @@ class CoreProcessWorker(CoreProcessMonitor, ABC):
class ProcessOutputRedirector: class ProcessOutputRedirector:
"""Redirect child-process output into the application message queue.""" """Redirect child-process output into the application message queue."""
TemporaryDir = QtCore.QTemporaryDir() TemporaryDir = QtCore.QTemporaryDir()
@staticmethod @staticmethod
+2
View File
@@ -58,8 +58,10 @@ def startHysteria1(jsonString, rule, mmdb, msgQueue: multiprocessing.Queue):
class Hysteria1(CoreProcessWorker): class Hysteria1(CoreProcessWorker):
"""Manage the embedded Hysteria 1 core subprocess.""" """Manage the embedded Hysteria 1 core subprocess."""
class ExitCode(Enum): class ExitCode(Enum):
"""Enumerate process exit codes.""" """Enumerate process exit codes."""
ConfigurationError = 23 ConfigurationError = 23
RemoteNetworkError = 3 RemoteNetworkError = 3
# Windows shutting down # Windows shutting down
+2
View File
@@ -58,8 +58,10 @@ def startHysteria2(jsonString: str, msgQueue: multiprocessing.Queue):
class Hysteria2(CoreProcessWorker): class Hysteria2(CoreProcessWorker):
"""Manage the embedded Hysteria 2 core subprocess.""" """Manage the embedded Hysteria 2 core subprocess."""
class ExitCode(Enum): class ExitCode(Enum):
"""Enumerate process exit codes.""" """Enumerate process exit codes."""
ConfigurationError = 23 ConfigurationError = 23
# Windows: 4294967295. Darwin, Linux: 255 (-1) # Windows: 4294967295. Darwin, Linux: 255 (-1)
ServerStartFailure = 4294967295 if PLATFORM == 'Windows' else 255 ServerStartFailure = 4294967295 if PLATFORM == 'Windows' else 255
+1
View File
@@ -52,6 +52,7 @@ def startTun2socks(msgQueue: multiprocessing.Queue, *args):
class Tun2socks(CoreProcessWorker): class Tun2socks(CoreProcessWorker):
"""Manage the tun2socks subprocess used by TUN mode.""" """Manage the tun2socks subprocess used by TUN mode."""
class ExitCode: class ExitCode:
# Windows shutting down # Windows shutting down
"""Enumerate process exit codes.""" """Enumerate process exit codes."""
+2
View File
@@ -121,8 +121,10 @@ def startXrayCore(jsonString: str, msgQueue: multiprocessing.Queue):
class XrayCore(CoreProcessWorker): class XrayCore(CoreProcessWorker):
"""Manage the embedded Xray core subprocess.""" """Manage the embedded Xray core subprocess."""
class ExitCode(Enum): class ExitCode(Enum):
"""Enumerate process exit codes.""" """Enumerate process exit codes."""
ConfigurationError = 23 ConfigurationError = 23
# Windows: 4294967295. Darwin, Linux: 255 (-1) # Windows: 4294967295. Darwin, Linux: 255 (-1)
ServerStartFailure = 4294967295 if PLATFORM == 'Windows' else 255 ServerStartFailure = 4294967295 if PLATFORM == 'Windows' else 255
+2
View File
@@ -34,6 +34,7 @@ logger = logging.getLogger(__name__)
class AppBinarySettings: class AppBinarySettings:
"""Store and validate app binary settings.""" """Store and validate app binary settings."""
OFF = '0' OFF = '0'
ON_ = '1' ON_ = '1'
@@ -42,6 +43,7 @@ class AppBinarySettings:
class AppSettings: class AppSettings:
"""Store and validate app settings.""" """Store and validate app settings."""
SettingsPool: dict[str, AppSettings] = dict() SettingsPool: dict[str, AppSettings] = dict()
def __init__( def __init__(
+3
View File
@@ -30,6 +30,7 @@ __all__ = [
class AppBuiltinCommand(Enum): class AppBuiltinCommand(Enum):
"""Enumerate app builtin command.""" """Enumerate app builtin command."""
Empty = 'empty' Empty = 'empty'
RunAs = 'runas' RunAs = 'runas'
Clear = 'clear' Clear = 'clear'
@@ -37,6 +38,7 @@ class AppBuiltinCommand(Enum):
class AppBuiltinRouting(Enum): class AppBuiltinRouting(Enum):
"""Enumerate app builtin routing.""" """Enumerate app builtin routing."""
BypassMainlandChina = 'Bypass Mainland China' BypassMainlandChina = 'Bypass Mainland China'
Global = 'Global' Global = 'Global'
Custom = 'Custom' Custom = 'Custom'
@@ -44,5 +46,6 @@ class AppBuiltinRouting(Enum):
class AppBuiltinProxyMode(Enum): class AppBuiltinProxyMode(Enum):
"""Enumerate app builtin proxy mode.""" """Enumerate app builtin proxy mode."""
Auto = 'Auto' Auto = 'Auto'
NoChanges = 'NoChanges' NoChanges = 'NoChanges'
+1
View File
@@ -49,6 +49,7 @@ def getAppAttributes(name: str):
class AppLoggerWindow: class AppLoggerWindow:
"""Present the app logger window.""" """Present the app logger window."""
Self = functools.partial(getAppAttributes, 'logViewerWindowSelf') Self = functools.partial(getAppAttributes, 'logViewerWindowSelf')
Core = functools.partial(getAppAttributes, 'logViewerWindowCore') Core = functools.partial(getAppAttributes, 'logViewerWindowCore')
TUN_ = functools.partial(getAppAttributes, 'logViewerWindowTun_') TUN_ = functools.partial(getAppAttributes, 'logViewerWindowTun_')
+8
View File
@@ -34,6 +34,7 @@ __all__ = ['Mixins']
class _WeakObjectsPool: class _WeakObjectsPool:
"""Store objects in registration order without extending their lifetime.""" """Store objects in registration order without extending their lifetime."""
def __init__(self): def __init__(self):
"""Initialize an empty weak object registry.""" """Initialize an empty weak object registry."""
self._references = {} self._references = {}
@@ -108,6 +109,7 @@ class _WeakObjectsPool:
class Mixins: class Mixins:
"""Group reusable lifecycle, translation, theme, and Qt context mixins.""" """Group reusable lifecycle, translation, theme, and Qt context mixins."""
@staticmethod @staticmethod
def qObjectIsValid(qobject) -> bool: def qObjectIsValid(qobject) -> bool:
"""Return the q object is valid value used by the mixins.""" """Return the q object is valid value used by the mixins."""
@@ -121,6 +123,7 @@ class Mixins:
class ConnectionAware: class ConnectionAware:
"""Represent connection aware.""" """Represent connection aware."""
ObjectsPool = _WeakObjectsPool() ObjectsPool = _WeakObjectsPool()
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
@@ -159,6 +162,7 @@ class Mixins:
class ThemeAware: class ThemeAware:
"""Represent theme aware.""" """Represent theme aware."""
ObjectsPool = _WeakObjectsPool() ObjectsPool = _WeakObjectsPool()
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
@@ -203,6 +207,7 @@ class Mixins:
class CleanupOnExit: class CleanupOnExit:
"""Represent cleanup on exit.""" """Represent cleanup on exit."""
ObjectsPool = _WeakObjectsPool() ObjectsPool = _WeakObjectsPool()
VisitedType = dict() VisitedType = dict()
@@ -243,6 +248,7 @@ class Mixins:
class QSetDisabledContext: class QSetDisabledContext:
"""Manage the q set disabled context.""" """Manage the q set disabled context."""
def __init__(self, qobject: QtCore.QObject): def __init__(self, qobject: QtCore.QObject):
"""Initialize the QSetDisabledContext.""" """Initialize the QSetDisabledContext."""
self.qobject = qobject self.qobject = qobject
@@ -263,6 +269,7 @@ class Mixins:
class QBlockSignalContext: class QBlockSignalContext:
"""Manage the q block signal context.""" """Manage the q block signal context."""
def __init__(self, qobject: QtCore.QObject): def __init__(self, qobject: QtCore.QObject):
"""Initialize the QBlockSignalContext.""" """Initialize the QBlockSignalContext."""
self.qobject = qobject self.qobject = qobject
@@ -283,6 +290,7 @@ class Mixins:
class QTranslatable: class QTranslatable:
"""Represent q translatable.""" """Represent q translatable."""
ObjectsPool = _WeakObjectsPool() ObjectsPool = _WeakObjectsPool()
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
+1
View File
@@ -30,6 +30,7 @@ __all__ = ['PySide6Legacy']
class PySide6Legacy: class PySide6Legacy:
"""Represent py side6 legacy.""" """Represent py side6 legacy."""
@staticmethod @staticmethod
def enumValueWrapper(enum) -> int: def enumValueWrapper(enum) -> int:
# Protect PySide6 enum wrapper behavior changes # Protect PySide6 enum wrapper behavior changes
+3
View File
@@ -36,9 +36,11 @@ logger = logging.getLogger(__name__)
class StartupOnBoot: class StartupOnBoot:
"""Represent startup on boot.""" """Represent startup on boot."""
@staticmethod @staticmethod
def on_(): def on_():
"""Enable the startup on boot.""" """Enable the startup on boot."""
def _on_(): def _on_():
"""Return the on value used by the startup on boot.""" """Return the on value used by the startup on boot."""
if SystemRuntime.isScriptMode(): if SystemRuntime.isScriptMode():
@@ -149,6 +151,7 @@ class StartupOnBoot:
@staticmethod @staticmethod
def off(): def off():
"""Disable the startup on boot.""" """Disable the startup on boot."""
def _off(): def _off():
"""Return the off value used by the startup on boot.""" """Return the off value used by the startup on boot."""
if PLATFORM == 'Windows': if PLATFORM == 'Windows':
+7
View File
@@ -72,6 +72,7 @@ def linuxProxyConfig(proxy_args, arg0, arg1):
def darwinProxyConfig(operation, *args): def darwinProxyConfig(operation, *args):
"""Return the darwin proxy config value used by the application.""" """Return the darwin proxy config value used by the application."""
def getNetworkServices(): def getNetworkServices():
"""Return network services.""" """Return network services."""
command = runExternalCommand( command = runExternalCommand(
@@ -99,6 +100,7 @@ def darwinProxyConfig(operation, *args):
class _SystemProxy: class _SystemProxy:
"""Represent system proxy.""" """Represent system proxy."""
def __init__(self): def __init__(self):
"""Initialize the _SystemProxy.""" """Initialize the _SystemProxy."""
self._daemonThread = None self._daemonThread = None
@@ -106,6 +108,7 @@ class _SystemProxy:
@staticmethod @staticmethod
def pac(pac_url): def pac(pac_url):
"""Configure the system proxy with a PAC URL.""" """Configure the system proxy with a PAC URL."""
def _pac(): def _pac():
"""Return the pac value used by the system proxy.""" """Return the pac value used by the system proxy."""
if PLATFORM == 'Windows': if PLATFORM == 'Windows':
@@ -152,6 +155,7 @@ class _SystemProxy:
@staticmethod @staticmethod
def set(server, bypass): def set(server, bypass):
"""Set data managed by the system proxy.""" """Set data managed by the system proxy."""
def _set(): def _set():
"""Return the set value used by the system proxy.""" """Return the set value used by the system proxy."""
if PLATFORM == 'Windows': if PLATFORM == 'Windows':
@@ -211,6 +215,7 @@ class _SystemProxy:
@staticmethod @staticmethod
def off(): def off():
"""Disable the system proxy.""" """Disable the system proxy."""
def _off(): def _off():
"""Return the off value used by the system proxy.""" """Return the off value used by the system proxy."""
if PLATFORM == 'Windows': if PLATFORM == 'Windows':
@@ -257,6 +262,7 @@ class _SystemProxy:
def daemonOn_(self): def daemonOn_(self):
"""Return the daemon on value used by the system proxy.""" """Return the daemon on value used by the system proxy."""
def _daemonOn_(): def _daemonOn_():
"""Return the daemon on value used by the system proxy.""" """Return the daemon on value used by the system proxy."""
if PLATFORM == 'Windows': if PLATFORM == 'Windows':
@@ -290,6 +296,7 @@ class _SystemProxy:
def daemonOff(self): def daemonOff(self):
"""Return the daemon off value used by the system proxy.""" """Return the daemon off value used by the system proxy."""
def _daemonOff(): def _daemonOff():
"""Return the daemon off value used by the system proxy.""" """Return the daemon off value used by the system proxy."""
if PLATFORM == 'Windows': if PLATFORM == 'Windows':
+6
View File
@@ -51,6 +51,7 @@ def dictRepr(returncode, stdout, stderr):
class SystemRoutingTable: class SystemRoutingTable:
"""Represent system routing table.""" """Represent system routing table."""
Relations = list() Relations = list()
DEFAULT_GATEWAY_WIN32 = re.compile( DEFAULT_GATEWAY_WIN32 = re.compile(
@@ -66,6 +67,7 @@ class SystemRoutingTable:
@staticmethod @staticmethod
def add(sourceIP, destinationIP): def add(sourceIP, destinationIP):
"""Add the system routing table.""" """Add the system routing table."""
def _add(): def _add():
"""Return the add value used by the system routing table.""" """Return the add value used by the system routing table."""
if PLATFORM == 'Windows': if PLATFORM == 'Windows':
@@ -256,6 +258,7 @@ class SystemRoutingTable:
@staticmethod @staticmethod
def DarwinGetDNSServers() -> list: def DarwinGetDNSServers() -> list:
"""Return the darwin get DNS servers value.""" """Return the darwin get DNS servers value."""
def getNetworkServices(): def getNetworkServices():
"""Return network services.""" """Return network services."""
_command = runExternalCommand( _command = runExternalCommand(
@@ -496,6 +499,7 @@ class SystemRoutingTable:
@staticmethod @staticmethod
def getDefaultGateway() -> list: def getDefaultGateway() -> list:
"""Return default gateway.""" """Return default gateway."""
def _get(): def _get():
"""Return the get value used by the system routing table.""" """Return the get value used by the system routing table."""
if PLATFORM == 'Windows': if PLATFORM == 'Windows':
@@ -564,6 +568,7 @@ class SystemRoutingTable:
@staticmethod @staticmethod
def setDeviceGateway(deviceName, deviceIP, deviceGateway): def setDeviceGateway(deviceName, deviceIP, deviceGateway):
"""Set device gateway.""" """Set device gateway."""
def _set(): def _set():
"""Return the set value used by the system routing table.""" """Return the set value used by the system routing table."""
if PLATFORM == 'Windows': if PLATFORM == 'Windows':
@@ -625,6 +630,7 @@ class SystemRoutingTable:
@staticmethod @staticmethod
def delete(sourceIP, destinationIP): def delete(sourceIP, destinationIP):
"""Delete the system routing table.""" """Delete the system routing table."""
def _delete(): def _delete():
"""Return the delete value used by the system routing table.""" """Return the delete value used by the system routing table."""
if PLATFORM == 'Windows': if PLATFORM == 'Windows':
+2
View File
@@ -34,6 +34,7 @@ __all__ = ['SystemRuntime']
class SystemRuntime: class SystemRuntime:
"""Represent system runtime.""" """Represent system runtime."""
@staticmethod @staticmethod
@functools.lru_cache(None) @functools.lru_cache(None)
def ubuntuRelease() -> str: def ubuntuRelease() -> str:
@@ -124,6 +125,7 @@ class SystemRuntime:
@functools.lru_cache(None) @functools.lru_cache(None)
def isPythonw() -> bool: def isPythonw() -> bool:
"""Return whether pythonw.""" """Return whether pythonw."""
def isRealFile(file): def isRealFile(file):
"""Return whether real file.""" """Return whether real file."""
if not hasattr(file, 'fileno'): if not hasattr(file, 'fileno'):
+5
View File
@@ -50,6 +50,7 @@ __all__ = [
class Protocol(Enum): class Protocol(Enum):
"""Enumerate proxy protocols recognized by Furious.""" """Enumerate proxy protocols recognized by Furious."""
Unknown = 'Unknown' Unknown = 'Unknown'
VMess = 'VMess' VMess = 'VMess'
VLESS = 'VLESS' VLESS = 'VLESS'
@@ -93,6 +94,7 @@ def callRateLimited(maxCallPerSecond):
def decorator(func): def decorator(func):
"""Decorate a callable with the enclosing behavior.""" """Decorate a callable with the enclosing behavior."""
@functools.wraps(func) @functools.wraps(func)
def wrapper(*args, **kwargs): def wrapper(*args, **kwargs):
# Previously called # Previously called
@@ -117,8 +119,10 @@ def callRateLimited(maxCallPerSecond):
def forceToLocalhostIfPossible(): def forceToLocalhostIfPossible():
"""Return the force to localhost if possible value used by the application.""" """Return the force to localhost if possible value used by the application."""
def decorator(func): def decorator(func):
"""Decorate a callable with the enclosing behavior.""" """Decorate a callable with the enclosing behavior."""
@functools.wraps(func) @functools.wraps(func)
def wrapper(*args, **kwargs): def wrapper(*args, **kwargs):
"""Invoke the wrapped callable with the enclosing behavior.""" """Invoke the wrapped callable with the enclosing behavior."""
@@ -226,6 +230,7 @@ def absolutePath(path) -> pathlib.Path:
@functools.lru_cache(None) @functools.lru_cache(None)
def versionToValue(version: str) -> int: def versionToValue(version: str) -> int:
"""Return the version to value value used by the application.""" """Return the version to value value used by the application."""
def split(): def split():
# x or x.y or x.y.z or x.y.z.u # x or x.y or x.y.z or x.y.z.u
"""Split the application.""" """Split the application."""
+1
View File
@@ -33,6 +33,7 @@ logger = logging.getLogger(__name__)
class _Win32Session: class _Win32Session:
"""Represent win32 session.""" """Represent win32 session."""
def __init__(self): def __init__(self):
"""Initialize the _Win32Session.""" """Initialize the _Win32Session."""
self._daemonThread = None self._daemonThread = None
+2
View File
@@ -26,8 +26,10 @@ __all__ = ['ApplicationFactory']
class ApplicationFactory: class ApplicationFactory:
"""Define the lifecycle contract for the top-level application runner.""" """Define the lifecycle contract for the top-level application runner."""
class ExitCode(Enum): class ExitCode(Enum):
"""Enumerate process exit codes.""" """Enumerate process exit codes."""
ExitSuccess = 0 ExitSuccess = 0
UnknownException = 61 UnknownException = 61
PlatformNotSupported = 62 PlatformNotSupported = 62
+2
View File
@@ -34,8 +34,10 @@ __all__ = ['CoreProcessFactory']
class CoreProcessFactory(ABC): class CoreProcessFactory(ABC):
"""Define the interface and shared behavior for core process objects.""" """Define the interface and shared behavior for core process objects."""
class ExitCode(Enum): class ExitCode(Enum):
"""Enumerate process exit codes.""" """Enumerate process exit codes."""
ConfigurationError = 23 ConfigurationError = 23
# Windows: 4294967295. Darwin, Linux: 255 (-1) # Windows: 4294967295. Darwin, Linux: 255 (-1)
ServerStartFailure = 4294967295 if PLATFORM == 'Windows' else 255 ServerStartFailure = 4294967295 if PLATFORM == 'Windows' else 255
+1
View File
@@ -27,6 +27,7 @@ __all__ = ['EncoderFactory']
class EncoderFactory(ABC): class EncoderFactory(ABC):
"""Define the interface and shared behavior for encoder objects.""" """Define the interface and shared behavior for encoder objects."""
@abstractmethod @abstractmethod
def encode(self, data: Any, **kwargs) -> Any: def encode(self, data: Any, **kwargs) -> Any:
"""Encode data with the encoder factory.""" """Encode data with the encoder factory."""
@@ -26,6 +26,7 @@ __all__ = ['GuiEditorItemFactory', 'GuiEditorItemWidgetContainer']
class GuiEditorItemFactory: class GuiEditorItemFactory:
"""Define the interface and shared behavior for GUI editor item objects.""" """Define the interface and shared behavior for GUI editor item objects."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiEditorItemFactory.""" """Initialize the GuiEditorItemFactory."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -41,6 +42,7 @@ class GuiEditorItemFactory:
class GuiEditorItemWidgetContainer(GuiEditorItemFactory): class GuiEditorItemWidgetContainer(GuiEditorItemFactory):
"""Bind one or more editor widgets to configuration data.""" """Bind one or more editor widgets to configuration data."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiEditorItemWidgetContainer.""" """Initialize the GuiEditorItemWidgetContainer."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
+1
View File
@@ -27,6 +27,7 @@ __all__ = ['StorageFactory']
class StorageFactory(ABC): class StorageFactory(ABC):
"""Define the interface and shared behavior for storage objects.""" """Define the interface and shared behavior for storage objects."""
@abstractmethod @abstractmethod
def sync(self): def sync(self):
"""Persist the current storage factory data.""" """Persist the current storage factory data."""
@@ -24,6 +24,7 @@ __all__ = ['UserServersTableItem']
class UserServersTableItem: class UserServersTableItem:
"""Define the display fields required by a server-table row.""" """Define the display fields required by a server-table row."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the UserServersTableItem.""" """Initialize the UserServersTableItem."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
+7
View File
@@ -61,6 +61,7 @@ __all__ = [
class ConfigXrayProxyOutboundObjectV(dict): class ConfigXrayProxyOutboundObjectV(dict):
"""Represent and transform Xray proxy outbound object v configuration data.""" """Represent and transform Xray proxy outbound object v configuration data."""
def __init__( def __init__(
self, self,
protocol, protocol,
@@ -152,6 +153,7 @@ class ConfigXrayProxyOutboundObjectV(dict):
class ConfigXrayProxyOutboundObjectSS(dict): class ConfigXrayProxyOutboundObjectSS(dict):
"""Represent and transform Xray proxy outbound object ss configuration data.""" """Represent and transform Xray proxy outbound object ss configuration data."""
def __init__(self, method, password, address, port): def __init__(self, method, password, address, port):
"""Initialize the ConfigXrayProxyOutboundObjectSS.""" """Initialize the ConfigXrayProxyOutboundObjectSS."""
super().__init__( super().__init__(
@@ -183,6 +185,7 @@ class ConfigXrayProxyOutboundObjectSS(dict):
class ConfigXrayProxyOutboundObjectSocks(dict): class ConfigXrayProxyOutboundObjectSocks(dict):
"""Represent and transform Xray proxy outbound object SOCKS configuration data.""" """Represent and transform Xray proxy outbound object SOCKS configuration data."""
def __init__(self, address, port, user='', password=''): def __init__(self, address, port, user='', password=''):
"""Initialize the ConfigXrayProxyOutboundObjectSocks.""" """Initialize the ConfigXrayProxyOutboundObjectSocks."""
settings = { settings = {
@@ -212,6 +215,7 @@ class ConfigXrayProxyOutboundObjectSocks(dict):
class ConfigXrayProxyOutboundObjectTrojan(dict): class ConfigXrayProxyOutboundObjectTrojan(dict):
"""Represent and transform Xray proxy outbound object trojan configuration data.""" """Represent and transform Xray proxy outbound object trojan configuration data."""
def __init__(self, password, address, port, type_, security, **kwargs): def __init__(self, password, address, port, type_, security, **kwargs):
"""Initialize the ConfigXrayProxyOutboundObjectTrojan.""" """Initialize the ConfigXrayProxyOutboundObjectTrojan."""
networkObjectArgs, securityArgs, TLSObjectArgs = {}, {}, {} networkObjectArgs, securityArgs, TLSObjectArgs = {}, {}, {}
@@ -349,6 +353,7 @@ BLANK_CONFIG_XRAY = {
class ConfigXray(ConfigFactory): class ConfigXray(ConfigFactory):
"""Represent Xray configuration and supported share-link formats.""" """Represent Xray configuration and supported share-link formats."""
def __init__(self, config: Union[str, dict] = '', **kwargs): def __init__(self, config: Union[str, dict] = '', **kwargs):
"""Initialize the ConfigXray.""" """Initialize the ConfigXray."""
super().__init__(config, **kwargs) super().__init__(config, **kwargs)
@@ -1721,6 +1726,7 @@ BLANK_CONFIG_HYSTERIA1 = {
class ConfigHysteria1(ConfigFactory): class ConfigHysteria1(ConfigFactory):
"""Represent Hysteria 1 client configuration and share links.""" """Represent Hysteria 1 client configuration and share links."""
def __init__(self, config: Union[str, dict] = '', **kwargs): def __init__(self, config: Union[str, dict] = '', **kwargs):
"""Initialize the ConfigHysteria1.""" """Initialize the ConfigHysteria1."""
super().__init__(config, **kwargs) super().__init__(config, **kwargs)
@@ -2006,6 +2012,7 @@ BLANK_CONFIG_HYSTERIA2 = {
class ConfigHysteria2(ConfigFactory): class ConfigHysteria2(ConfigFactory):
"""Represent Hysteria 2 client configuration and share links.""" """Represent Hysteria 2 client configuration and share links."""
def __init__(self, config: Union[str, dict] = '', **kwargs): def __init__(self, config: Union[str, dict] = '', **kwargs):
"""Initialize the ConfigHysteria2.""" """Initialize the ConfigHysteria2."""
super().__init__(config, **kwargs) super().__init__(config, **kwargs)
+4
View File
@@ -38,6 +38,7 @@ __all__ = [
class JSONEncoder(EncoderFactory): class JSONEncoder(EncoderFactory):
"""Encode and decode data using JSON.""" """Encode and decode data using JSON."""
@staticmethod @staticmethod
def encode(data: Any, **kwargs) -> str: def encode(data: Any, **kwargs) -> str:
"""Encode data with the JSON encoder.""" """Encode data with the JSON encoder."""
@@ -53,6 +54,7 @@ class JSONEncoder(EncoderFactory):
class UJSONEncoder(EncoderFactory): class UJSONEncoder(EncoderFactory):
"""Encode and decode data using ujson.""" """Encode and decode data using ujson."""
@staticmethod @staticmethod
def encode(data: Any, **kwargs) -> str: def encode(data: Any, **kwargs) -> str:
"""Encode data with the ujson encoder.""" """Encode data with the ujson encoder."""
@@ -74,6 +76,7 @@ class UJSONEncoder(EncoderFactory):
class Base64Encoder(EncoderFactory): class Base64Encoder(EncoderFactory):
"""Encode and decode data using base64.""" """Encode and decode data using base64."""
@staticmethod @staticmethod
def encode(data: Any, **kwargs) -> bytes: def encode(data: Any, **kwargs) -> bytes:
"""Encode data with the base64 encoder.""" """Encode data with the base64 encoder."""
@@ -89,6 +92,7 @@ class Base64Encoder(EncoderFactory):
class PyBase64Encoder(EncoderFactory): class PyBase64Encoder(EncoderFactory):
"""Encode and decode data using py base64.""" """Encode and decode data using py base64."""
@staticmethod @staticmethod
def encode(data: Any, **kwargs) -> bytes: def encode(data: Any, **kwargs) -> bytes:
"""Encode data with the py base64 encoder.""" """Encode data with the py base64 encoder."""
+2
View File
@@ -35,6 +35,7 @@ __all__ = ['Storage']
class Storage: class Storage:
"""Provide cached access to persisted user configuration collections.""" """Provide cached access to persisted user configuration collections."""
@staticmethod @staticmethod
def UserActivatedItemIndex() -> int: def UserActivatedItemIndex() -> int:
"""Return the user activated item index value.""" """Return the user activated item index value."""
@@ -79,6 +80,7 @@ class Storage:
class Extras: class Extras:
"""Derive display and proxy values from the active server.""" """Derive display and proxy values from the active server."""
@staticmethod @staticmethod
@forceToLocalhostIfPossible() @forceToLocalhostIfPossible()
def UserHttpProxy() -> Union[str, None]: def UserHttpProxy() -> Union[str, None]:
+1
View File
@@ -30,6 +30,7 @@ registerAppSettings('CustomRouting')
class UserRoutings(Mixins.CleanupOnExit, StorageFactory): class UserRoutings(Mixins.CleanupOnExit, StorageFactory):
"""Manage the persisted custom-routing collection.""" """Manage the persisted custom-routing collection."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the UserRoutings.""" """Initialize the UserRoutings."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
+2
View File
@@ -31,6 +31,7 @@ registerAppSettings('Configuration')
class UserServer: class UserServer:
"""Represent user server.""" """Represent user server."""
remark: str remark: str
config: str config: str
subsId: str subsId: str
@@ -39,6 +40,7 @@ class UserServer:
class UserServers(Mixins.CleanupOnExit, StorageFactory): class UserServers(Mixins.CleanupOnExit, StorageFactory):
# remark, config, subsId. (subsId corresponds to unique in user subscription) # remark, config, subsId. (subsId corresponds to unique in user subscription)
"""Manage the persisted list of server configurations.""" """Manage the persisted list of server configurations."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the UserServers.""" """Initialize the UserServers."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
+3
View File
@@ -30,6 +30,7 @@ registerAppSettings('CustomSubscription')
class UserSubEntry: class UserSubEntry:
"""Describe one user sub entry.""" """Describe one user sub entry."""
remark: str remark: str
webURL: str webURL: str
autoupdate: str autoupdate: str
@@ -38,12 +39,14 @@ class UserSubEntry:
class UserSub: class UserSub:
"""Represent user sub.""" """Represent user sub."""
unique: dict[str, dict] unique: dict[str, dict]
class UserSubs(Mixins.CleanupOnExit, StorageFactory): class UserSubs(Mixins.CleanupOnExit, StorageFactory):
# unique: { remark, webURL } # unique: { remark, webURL }
"""Manage the persisted subscription collection.""" """Manage the persisted subscription collection."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the UserSubs.""" """Initialize the UserSubs."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
+1
View File
@@ -30,6 +30,7 @@ registerAppSettings('CustomTUNSettings')
class UserTUNSettings(Mixins.CleanupOnExit, StorageFactory): class UserTUNSettings(Mixins.CleanupOnExit, StorageFactory):
"""Manage persisted TUN customization values.""" """Manage persisted TUN customization values."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the UserTUNSettings.""" """Initialize the UserTUNSettings."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
+1
View File
@@ -26,6 +26,7 @@ __all__ = ['AppStyleSheet']
class AppStyleSheet: class AppStyleSheet:
"""Represent app style sheet.""" """Represent app style sheet."""
Light = 'Light' Light = 'Light'
Dark = 'Dark' Dark = 'Dark'
FontPointSize = 10 FontPointSize = 10
+1
View File
@@ -37,6 +37,7 @@ logger = logging.getLogger(__name__)
class _DNSResolver(WebGETManager): class _DNSResolver(WebGETManager):
"""Represent DNS resolver.""" """Represent DNS resolver."""
def __init__(self, parent=None, **kwargs): def __init__(self, parent=None, **kwargs):
"""Initialize the _DNSResolver.""" """Initialize the _DNSResolver."""
actionMessage = kwargs.pop('actionMessage', 'DNS resolution') actionMessage = kwargs.pop('actionMessage', 'DNS resolution')
+2
View File
@@ -27,8 +27,10 @@ __all__ = ['AppHue']
class AppHue: class AppHue:
"""Represent app hue.""" """Represent app hue."""
class ColorRGB: class ColorRGB:
"""Represent color rgb.""" """Represent color rgb."""
LIGHT_BLUE = '#43ACED' LIGHT_BLUE = '#43ACED'
LIGHT_RED = '#FF7276' LIGHT_RED = '#FF7276'
LIGHT_PURPLE = '#DA70D6' LIGHT_PURPLE = '#DA70D6'
+1
View File
@@ -32,6 +32,7 @@ __all__ = [
class Translator: class Translator:
"""Represent translator.""" """Represent translator."""
def __init__(self): def __init__(self):
"""Initialize the Translator.""" """Initialize the Translator."""
super().__init__() super().__init__()
+11
View File
@@ -47,6 +47,7 @@ __all__ = [
class GuiEditorItemTextInput(GuiEditorItemWidgetContainer): class GuiEditorItemTextInput(GuiEditorItemWidgetContainer):
"""Represent GUI editor item text input.""" """Represent GUI editor item text input."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiEditorItemTextInput.""" """Initialize the GuiEditorItemTextInput."""
title = kwargs.pop('title', '') title = kwargs.pop('title', '')
@@ -76,6 +77,7 @@ class GuiEditorItemTextInput(GuiEditorItemWidgetContainer):
class GuiEditorItemTextSpinBox(GuiEditorItemWidgetContainer): class GuiEditorItemTextSpinBox(GuiEditorItemWidgetContainer):
"""Represent GUI editor item text spin box.""" """Represent GUI editor item text spin box."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiEditorItemTextSpinBox.""" """Initialize the GuiEditorItemTextSpinBox."""
title = kwargs.pop('title', '') title = kwargs.pop('title', '')
@@ -109,6 +111,7 @@ class GuiEditorItemTextSpinBox(GuiEditorItemWidgetContainer):
class GuiEditorItemTextComboBox(GuiEditorItemWidgetContainer): class GuiEditorItemTextComboBox(GuiEditorItemWidgetContainer):
"""Represent GUI editor item text combo box.""" """Represent GUI editor item text combo box."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiEditorItemTextComboBox.""" """Initialize the GuiEditorItemTextComboBox."""
title = kwargs.pop('title', '') title = kwargs.pop('title', '')
@@ -146,6 +149,7 @@ class GuiEditorItemTextComboBox(GuiEditorItemWidgetContainer):
class GuiEditorItemTextCheckBox(GuiEditorItemWidgetContainer): class GuiEditorItemTextCheckBox(GuiEditorItemWidgetContainer):
"""Represent GUI editor item text check box.""" """Represent GUI editor item text check box."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiEditorItemTextCheckBox.""" """Initialize the GuiEditorItemTextCheckBox."""
title = kwargs.pop('title', '') title = kwargs.pop('title', '')
@@ -171,6 +175,7 @@ class GuiEditorItemTextCheckBox(GuiEditorItemWidgetContainer):
class GuiEditorItemBasicRemark(GuiEditorItemTextInput): class GuiEditorItemBasicRemark(GuiEditorItemTextInput):
"""Represent GUI editor item basic remark.""" """Represent GUI editor item basic remark."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiEditorItemBasicRemark.""" """Initialize the GuiEditorItemBasicRemark."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -196,6 +201,7 @@ class GuiEditorItemBasicRemark(GuiEditorItemTextInput):
class GuiEditorItemProxyHttp(GuiEditorItemTextInput): class GuiEditorItemProxyHttp(GuiEditorItemTextInput):
"""Represent GUI editor item proxy HTTP.""" """Represent GUI editor item proxy HTTP."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiEditorItemProxyHttp.""" """Initialize the GuiEditorItemProxyHttp."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -237,6 +243,7 @@ class GuiEditorItemProxyHttp(GuiEditorItemTextInput):
class GuiEditorItemProxySocks(GuiEditorItemTextInput): class GuiEditorItemProxySocks(GuiEditorItemTextInput):
"""Represent GUI editor item proxy SOCKS.""" """Represent GUI editor item proxy SOCKS."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiEditorItemProxySocks.""" """Initialize the GuiEditorItemProxySocks."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -278,6 +285,7 @@ class GuiEditorItemProxySocks(GuiEditorItemTextInput):
class GuiEditorWidget(GuiEditorItemFactory): class GuiEditorWidget(GuiEditorItemFactory):
"""Provide the GUI editor widget.""" """Provide the GUI editor widget."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiEditorWidget.""" """Initialize the GuiEditorWidget."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -315,6 +323,7 @@ class GuiEditorWidget(GuiEditorItemFactory):
class GuiEditorWidgetQWidget(GuiEditorWidget, QWidget): class GuiEditorWidgetQWidget(GuiEditorWidget, QWidget):
"""Provide the GUI editor Qt widget.""" """Provide the GUI editor Qt widget."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiEditorWidgetQWidget.""" """Initialize the GuiEditorWidgetQWidget."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -335,6 +344,7 @@ class GuiEditorWidgetQWidget(GuiEditorWidget, QWidget):
class GuiEditorWidgetQGroupBox(GuiEditorWidget, AppQGroupBox): class GuiEditorWidgetQGroupBox(GuiEditorWidget, AppQGroupBox):
"""Group the GUI editor widget q editor controls.""" """Group the GUI editor widget q editor controls."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiEditorWidgetQGroupBox.""" """Initialize the GuiEditorWidgetQGroupBox."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -365,6 +375,7 @@ class GuiEditorWidgetQGroupBox(GuiEditorWidget, AppQGroupBox):
class GuiEditorWidgetQDialog(GuiEditorItemFactory, AppQDialog): class GuiEditorWidgetQDialog(GuiEditorItemFactory, AppQDialog):
"""Present the GUI editor widget Qt dialog.""" """Present the GUI editor widget Qt dialog."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiEditorWidgetQDialog.""" """Initialize the GuiEditorWidgetQDialog."""
tabText, tabTranslatable, style = ( tabText, tabTranslatable, style = (
+1
View File
@@ -35,6 +35,7 @@ logger = logging.getLogger(__name__)
class NetworkConnectivityManager(Mixins.ConnectionAware, WebGETManager): class NetworkConnectivityManager(Mixins.ConnectionAware, WebGETManager):
"""Coordinate network connectivity operations.""" """Coordinate network connectivity operations."""
MIN_JOB_INTERVAL = 2500 MIN_JOB_INTERVAL = 2500
MAX_JOB_INTERVAL = 2000000000 MAX_JOB_INTERVAL = 2000000000
+5
View File
@@ -44,6 +44,7 @@ __all__ = [
class AppQIcon(QIcon): class AppQIcon(QIcon):
"""Represent app q icon.""" """Represent app q icon."""
def __init__(self, iconFileName: str): def __init__(self, iconFileName: str):
"""Initialize the AppQIcon.""" """Initialize the AppQIcon."""
super().__init__(iconFileName) super().__init__(iconFileName)
@@ -112,6 +113,7 @@ def bootstrapIconWithOpacity(name, opacity, isMask=False):
class AppQAction(Mixins.QTranslatable, Mixins.ThemeAware, QAction): class AppQAction(Mixins.QTranslatable, Mixins.ThemeAware, QAction):
"""Handle the app q action.""" """Handle the app q action."""
def __init__( def __init__(
self, self,
text, text,
@@ -271,6 +273,7 @@ class AppQAction(Mixins.QTranslatable, Mixins.ThemeAware, QAction):
def retranslate(self): def retranslate(self):
"""Refresh translated text for the app q action.""" """Refresh translated text for the app q action."""
def recursiveTranslate(action, memo): def recursiveTranslate(action, memo):
"""Handle recursive translate for the app q action.""" """Handle recursive translate for the app q action."""
if action not in memo and not action.isSeparator() and action.translatable: if action not in memo and not action.isSeparator() and action.translatable:
@@ -296,6 +299,7 @@ class AppQAction(Mixins.QTranslatable, Mixins.ThemeAware, QAction):
class AppQActionGroup(QActionGroup): class AppQActionGroup(QActionGroup):
"""Represent app q action group.""" """Represent app q action group."""
def __init__(self, parent, *actions): def __init__(self, parent, *actions):
"""Initialize the AppQActionGroup.""" """Initialize the AppQActionGroup."""
super().__init__(parent) super().__init__(parent)
@@ -306,6 +310,7 @@ class AppQActionGroup(QActionGroup):
class AppQSeperator(QAction): class AppQSeperator(QAction):
"""Represent app q seperator.""" """Represent app q seperator."""
def __init__(self): def __init__(self):
"""Initialize the AppQSeperator.""" """Initialize the AppQSeperator."""
super().__init__() super().__init__()
+1
View File
@@ -30,6 +30,7 @@ __all__ = ['AppQNetworkAccessManager']
class AppQNetworkAccessManager(QNetworkAccessManager): class AppQNetworkAccessManager(QNetworkAccessManager):
"""Coordinate app q network access operations.""" """Coordinate app q network access operations."""
def __init__(self, parent=None): def __init__(self, parent=None):
"""Initialize the AppQNetworkAccessManager.""" """Initialize the AppQNetworkAccessManager."""
super().__init__(parent) super().__init__(parent)
+27 -1
View File
@@ -80,6 +80,7 @@ def _retainOpenDialog(dialog):
if not getattr(dialog, '_furiousOpenDialogLifetimeConnected', False): if not getattr(dialog, '_furiousOpenDialogLifetimeConnected', False):
release = functools.partial(_releaseOpenDialog, key) release = functools.partial(_releaseOpenDialog, key)
dialog.finished.connect(release) dialog.finished.connect(release)
dialog.destroyed.connect(release) dialog.destroyed.connect(release)
dialog._furiousOpenDialogLifetimeConnected = True dialog._furiousOpenDialogLifetimeConnected = True
@@ -107,6 +108,7 @@ def moveToCenter(widget, parent=None):
class AppQCheckBox(Mixins.QTranslatable, QCheckBox): class AppQCheckBox(Mixins.QTranslatable, QCheckBox):
"""Represent app q check box.""" """Represent app q check box."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the AppQCheckBox.""" """Initialize the AppQCheckBox."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -118,6 +120,7 @@ class AppQCheckBox(Mixins.QTranslatable, QCheckBox):
class AppQComboBox(Mixins.QTranslatable, QComboBox): class AppQComboBox(Mixins.QTranslatable, QComboBox):
"""Represent app q combo box.""" """Represent app q combo box."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the AppQComboBox.""" """Initialize the AppQComboBox."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -130,6 +133,7 @@ class AppQComboBox(Mixins.QTranslatable, QComboBox):
class AppQDialog(Mixins.QTranslatable, Mixins.ConnectionAware, QDialog): class AppQDialog(Mixins.QTranslatable, Mixins.ConnectionAware, QDialog):
"""Present the app Qt dialog.""" """Present the app Qt dialog."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the AppQDialog.""" """Initialize the AppQDialog."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -191,6 +195,7 @@ class AppQDialog(Mixins.QTranslatable, Mixins.ConnectionAware, QDialog):
class AppQDialogButtonBox(Mixins.QTranslatable, QDialogButtonBox): class AppQDialogButtonBox(Mixins.QTranslatable, QDialogButtonBox):
"""Represent app Qt dialog button box.""" """Represent app Qt dialog button box."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the AppQDialogButtonBox.""" """Initialize the AppQDialogButtonBox."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -203,6 +208,7 @@ class AppQDialogButtonBox(Mixins.QTranslatable, QDialogButtonBox):
class AppQGroupBox(Mixins.QTranslatable, QGroupBox): class AppQGroupBox(Mixins.QTranslatable, QGroupBox):
"""Group the app q editor controls.""" """Group the app q editor controls."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the AppQGroupBox.""" """Initialize the AppQGroupBox."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -214,6 +220,7 @@ class AppQGroupBox(Mixins.QTranslatable, QGroupBox):
class AppQHeaderView(Mixins.CleanupOnExit, Mixins.ConnectionAware, QHeaderView): class AppQHeaderView(Mixins.CleanupOnExit, Mixins.ConnectionAware, QHeaderView):
"""Represent app q header view.""" """Represent app q header view."""
def sectionSizeSettingsEmpty(self): def sectionSizeSettingsEmpty(self):
"""Return the section size settings empty value used by the app q header view.""" """Return the section size settings empty value used by the app q header view."""
return ( return (
@@ -342,6 +349,7 @@ class AppQHeaderView(Mixins.CleanupOnExit, Mixins.ConnectionAware, QHeaderView):
class AppQLabel(Mixins.QTranslatable, QLabel): class AppQLabel(Mixins.QTranslatable, QLabel):
"""Represent app q label.""" """Represent app q label."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the AppQLabel.""" """Initialize the AppQLabel."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -353,6 +361,7 @@ class AppQLabel(Mixins.QTranslatable, QLabel):
class AppQLineEdit(Mixins.QTranslatable, QLineEdit): class AppQLineEdit(Mixins.QTranslatable, QLineEdit):
"""Represent app q line edit.""" """Represent app q line edit."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the AppQLineEdit.""" """Initialize the AppQLineEdit."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -364,6 +373,7 @@ class AppQLineEdit(Mixins.QTranslatable, QLineEdit):
class AppQListWidget(Mixins.ConnectionAware, QListWidget): class AppQListWidget(Mixins.ConnectionAware, QListWidget):
"""Provide the app Qt list widget.""" """Provide the app Qt list widget."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the AppQListWidget.""" """Initialize the AppQListWidget."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -407,6 +417,7 @@ class AppQMainWindow(
QMainWindow, QMainWindow,
): ):
"""Present the app q main window.""" """Present the app q main window."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the AppQMainWindow.""" """Initialize the AppQMainWindow."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -462,6 +473,7 @@ class AppQMainWindow(
class AppQMenu(Mixins.QTranslatable, QMenu): class AppQMenu(Mixins.QTranslatable, QMenu):
"""Represent app q menu.""" """Represent app q menu."""
def __init__(self, *actions, **kwargs): def __init__(self, *actions, **kwargs):
"""Initialize the AppQMenu.""" """Initialize the AppQMenu."""
super().__init__(**kwargs) super().__init__(**kwargs)
@@ -489,6 +501,7 @@ class AppQMenu(Mixins.QTranslatable, QMenu):
class AppQMenuBar(QMenuBar): class AppQMenuBar(QMenuBar):
"""Represent app q menu bar.""" """Represent app q menu bar."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the AppQMenuBar.""" """Initialize the AppQMenuBar."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -496,6 +509,7 @@ class AppQMenuBar(QMenuBar):
class AppQMessageBox(Mixins.QTranslatable, Mixins.ConnectionAware, QMessageBox): class AppQMessageBox(Mixins.QTranslatable, Mixins.ConnectionAware, QMessageBox):
"""Represent app q message box.""" """Represent app q message box."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the AppQMessageBox.""" """Initialize the AppQMessageBox."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -564,6 +578,7 @@ class AppQMessageBox(Mixins.QTranslatable, Mixins.ConnectionAware, QMessageBox):
class AppQPushButton(Mixins.QTranslatable, Mixins.ThemeAware, QPushButton): class AppQPushButton(Mixins.QTranslatable, Mixins.ThemeAware, QPushButton):
"""Represent app q push button.""" """Represent app q push button."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the AppQPushButton.""" """Initialize the AppQPushButton."""
icon = kwargs.pop('icon', None) icon = kwargs.pop('icon', None)
@@ -633,6 +648,7 @@ class AppQPushButton(Mixins.QTranslatable, Mixins.ThemeAware, QPushButton):
class AppQSpinBox(QSpinBox): class AppQSpinBox(QSpinBox):
"""Represent app q spin box.""" """Represent app q spin box."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the AppQSpinBox.""" """Initialize the AppQSpinBox."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -655,6 +671,7 @@ class AppQSpinBox(QSpinBox):
class AppQTableView(Mixins.ConnectionAware, QTableView): class AppQTableView(Mixins.ConnectionAware, QTableView):
"""Represent app Qt table view.""" """Represent app Qt table view."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the AppQTableView.""" """Initialize the AppQTableView."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -689,6 +706,7 @@ class AppQTableView(Mixins.ConnectionAware, QTableView):
class AppQTableWidget(Mixins.ConnectionAware, QTableWidget): class AppQTableWidget(Mixins.ConnectionAware, QTableWidget):
"""Provide the app Qt table widget.""" """Provide the app Qt table widget."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the AppQTableWidget.""" """Initialize the AppQTableWidget."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -769,6 +787,7 @@ class AppQTableWidget(Mixins.ConnectionAware, QTableWidget):
class AppQTabWidget(Mixins.QTranslatable, QTabWidget): class AppQTabWidget(Mixins.QTranslatable, QTabWidget):
"""Provide the app q tab widget.""" """Provide the app q tab widget."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the AppQTabWidget.""" """Initialize the AppQTabWidget."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -781,6 +800,7 @@ class AppQTabWidget(Mixins.QTranslatable, QTabWidget):
class AppQToolBar(Mixins.QTranslatable, QToolBar): class AppQToolBar(Mixins.QTranslatable, QToolBar):
"""Represent app q tool bar.""" """Represent app q tool bar."""
def __init__(self, *actions, **kwargs): def __init__(self, *actions, **kwargs):
"""Initialize the AppQToolBar.""" """Initialize the AppQToolBar."""
super().__init__(**kwargs) super().__init__(**kwargs)
@@ -805,6 +825,7 @@ class AppQToolBar(Mixins.QTranslatable, QToolBar):
@QtCore.Slot(AppQAction) @QtCore.Slot(AppQAction)
def showMenuBelow(self, action: AppQAction): def showMenuBelow(self, action: AppQAction):
"""Show menu below.""" """Show menu below."""
def toolBarWidgetForAction() -> Union[QWidget | None]: def toolBarWidgetForAction() -> Union[QWidget | None]:
# Walk through the toolbar to find the widget for the action # Walk through the toolbar to find the widget for the action
"""Return the tool bar widget for action value used by the app q tool bar.""" """Return the tool bar widget for action value used by the app q tool bar."""
@@ -838,6 +859,7 @@ class AppQToolBar(Mixins.QTranslatable, QToolBar):
class MBoxQuestionDelete(AppQMessageBox): class MBoxQuestionDelete(AppQMessageBox):
"""Represent m box question delete.""" """Represent m box question delete."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the MBoxQuestionDelete.""" """Initialize the MBoxQuestionDelete."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -869,6 +891,7 @@ class MBoxQuestionDelete(AppQMessageBox):
class MBoxNewChangesNextTime(AppQMessageBox): class MBoxNewChangesNextTime(AppQMessageBox):
"""Represent m box new changes next time.""" """Represent m box new changes next time."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the MBoxNewChangesNextTime.""" """Initialize the MBoxNewChangesNextTime."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -898,8 +921,8 @@ class MBoxNewChangesNextTime(AppQMessageBox):
def showMBoxNewChangesNextTime(**kwargs): def showMBoxNewChangesNextTime(**kwargs):
"""Show m box new changes next time.""" """Show m box new changes next time."""
@QtCore.Slot(int) @QtCore.Slot(int)
def handleResultCode(code): def handleResultCode(code):
"""Handle result code.""" """Handle result code."""
@@ -935,6 +958,7 @@ def showMBoxNewChangesNextTime(**kwargs):
class MBoxDirectRulesNotAllowed(AppQMessageBox): class MBoxDirectRulesNotAllowed(AppQMessageBox):
"""Represent m box direct rules not allowed.""" """Represent m box direct rules not allowed."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the MBoxDirectRulesNotAllowed.""" """Initialize the MBoxDirectRulesNotAllowed."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -967,6 +991,7 @@ class MBoxDirectRulesNotAllowed(AppQMessageBox):
def showMBoxDirectRulesNotAllowed(**kwargs): def showMBoxDirectRulesNotAllowed(**kwargs):
"""Show m box direct rules not allowed.""" """Show m box direct rules not allowed."""
@QtCore.Slot(int) @QtCore.Slot(int)
def handleResultCode(code): def handleResultCode(code):
"""Handle result code.""" """Handle result code."""
@@ -991,6 +1016,7 @@ def showMBoxDirectRulesNotAllowed(**kwargs):
class MBoxUnrecognizedConfig(AppQMessageBox): class MBoxUnrecognizedConfig(AppQMessageBox):
"""Represent m box unrecognized config.""" """Represent m box unrecognized config."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the MBoxUnrecognizedConfig.""" """Initialize the MBoxUnrecognizedConfig."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
+6
View File
@@ -41,6 +41,7 @@ __all__ = [
class SupportPointSizeSettings(Mixins.CleanupOnExit): class SupportPointSizeSettings(Mixins.CleanupOnExit):
"""Store and validate support point size settings.""" """Store and validate support point size settings."""
def pointSizeSettingsEmpty(self): def pointSizeSettingsEmpty(self):
"""Return the point size settings empty value used by the support point size settings.""" """Return the point size settings empty value used by the support point size settings."""
return self.pointSizeSettingsName == '' return self.pointSizeSettingsName == ''
@@ -66,6 +67,7 @@ class SupportPointSizeSettings(Mixins.CleanupOnExit):
class AppQPlainTextEdit(SupportPointSizeSettings, QPlainTextEdit): class AppQPlainTextEdit(SupportPointSizeSettings, QPlainTextEdit):
"""Represent app q plain text edit.""" """Represent app q plain text edit."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the AppQPlainTextEdit.""" """Initialize the AppQPlainTextEdit."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -231,6 +233,7 @@ class AppQPlainTextEdit(SupportPointSizeSettings, QPlainTextEdit):
class AppQTextBrowser(SupportPointSizeSettings, QTextBrowser): class AppQTextBrowser(SupportPointSizeSettings, QTextBrowser):
"""Represent app q text browser.""" """Represent app q text browser."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the AppQTextBrowser.""" """Initialize the AppQTextBrowser."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -286,6 +289,7 @@ class AppQTextBrowser(SupportPointSizeSettings, QTextBrowser):
class DraculaTextEditor(AppQPlainTextEdit): class DraculaTextEditor(AppQPlainTextEdit):
"""Represent dracula text editor.""" """Represent dracula text editor."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the DraculaTextEditor.""" """Initialize the DraculaTextEditor."""
fontFamily = kwargs.pop('fontFamily', '') fontFamily = kwargs.pop('fontFamily', '')
@@ -331,6 +335,7 @@ class DraculaTextEditor(AppQPlainTextEdit):
class DraculaJSONTextEditor(DraculaTextEditor): class DraculaJSONTextEditor(DraculaTextEditor):
"""Represent dracula JSON text editor.""" """Represent dracula JSON text editor."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the DraculaJSONTextEditor.""" """Initialize the DraculaJSONTextEditor."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -340,6 +345,7 @@ class DraculaJSONTextEditor(DraculaTextEditor):
class DraculaTextBrowser(AppQTextBrowser): class DraculaTextBrowser(AppQTextBrowser):
"""Represent dracula text browser.""" """Represent dracula text browser."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the DraculaTextBrowser.""" """Initialize the DraculaTextBrowser."""
fontFamily = kwargs.pop('fontFamily', '') fontFamily = kwargs.pop('fontFamily', '')
+5
View File
@@ -33,6 +33,7 @@ __all__ = [
class EditorHighlightRules: class EditorHighlightRules:
"""Represent editor highlight rules.""" """Represent editor highlight rules."""
def __init__(self, regex, color, isBold=False, isItalic=False, isJSONKey=False): def __init__(self, regex, color, isBold=False, isItalic=False, isJSONKey=False):
"""Initialize the EditorHighlightRules.""" """Initialize the EditorHighlightRules."""
self.regex = QtCore.QRegularExpression(regex) self.regex = QtCore.QRegularExpression(regex)
@@ -52,6 +53,7 @@ class EditorHighlightRules:
class EditorTheme: class EditorTheme:
"""Represent editor theme.""" """Represent editor theme."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the EditorTheme.""" """Initialize the EditorTheme."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -64,6 +66,7 @@ class EditorTheme:
class DraculaEditorTheme(EditorTheme): class DraculaEditorTheme(EditorTheme):
"""Represent dracula editor theme.""" """Represent dracula editor theme."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the DraculaEditorTheme.""" """Initialize the DraculaEditorTheme."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -82,6 +85,7 @@ class DraculaEditorTheme(EditorTheme):
class AppQSyntaxHighlighter(QSyntaxHighlighter): class AppQSyntaxHighlighter(QSyntaxHighlighter):
"""Apply syntax highlighting for app q syntax text.""" """Apply syntax highlighting for app q syntax text."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the AppQSyntaxHighlighter.""" """Initialize the AppQSyntaxHighlighter."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -124,6 +128,7 @@ class AppQSyntaxHighlighter(QSyntaxHighlighter):
class DraculaJSONSyntaxHighlighter(AppQSyntaxHighlighter): class DraculaJSONSyntaxHighlighter(AppQSyntaxHighlighter):
"""Apply syntax highlighting for dracula JSON syntax text.""" """Apply syntax highlighting for dracula JSON syntax text."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the DraculaJSONSyntaxHighlighter.""" """Initialize the DraculaJSONSyntaxHighlighter."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
+2
View File
@@ -40,6 +40,7 @@ logger = logging.getLogger(__name__)
class MBoxQuestionUpdate(AppQMessageBox): class MBoxQuestionUpdate(AppQMessageBox):
"""Represent m box question update.""" """Represent m box question update."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the MBoxQuestionUpdate.""" """Initialize the MBoxQuestionUpdate."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -67,6 +68,7 @@ class MBoxQuestionUpdate(AppQMessageBox):
class UpdatesManager(WebGETManager): class UpdatesManager(WebGETManager):
"""Coordinate updates operations.""" """Coordinate updates operations."""
API_URL = ( API_URL = (
f'https://api.github.com/repos/' f'https://api.github.com/repos/'
f'{APPLICATION_REPO_OWNER_NAME}/{APPLICATION_REPO_NAME}/releases/latest' f'{APPLICATION_REPO_OWNER_NAME}/{APPLICATION_REPO_NAME}/releases/latest'
+2
View File
@@ -37,6 +37,7 @@ logger = logging.getLogger(__name__)
class WebGETManager(AppQNetworkAccessManager): class WebGETManager(AppQNetworkAccessManager):
"""Coordinate web get operations.""" """Coordinate web get operations."""
def __init__(self, parent=None, actionMessage='web GET', **kwargs): def __init__(self, parent=None, actionMessage='web GET', **kwargs):
"""Initialize the WebGETManager.""" """Initialize the WebGETManager."""
super().__init__(parent) super().__init__(parent)
@@ -64,6 +65,7 @@ class WebGETManager(AppQNetworkAccessManager):
def must(self, **kwargs): def must(self, **kwargs):
"""Run the required completion hook according to its call policy.""" """Run the required completion hook according to its call policy."""
def call(): def call():
"""Invoke the registered completion callback.""" """Invoke the registered completion callback."""
try: try:
+5
View File
@@ -38,6 +38,7 @@ logger = logging.getLogger(__name__)
class SHA256Worker(QtCore.QObject, QtCore.QRunnable): class SHA256Worker(QtCore.QObject, QtCore.QRunnable):
"""Run SHA-256 work in the background.""" """Run SHA-256 work in the background."""
finished = QtCore.Signal(str) finished = QtCore.Signal(str)
def __init__(self, string=b''): def __init__(self, string=b''):
@@ -55,6 +56,7 @@ class SHA256Worker(QtCore.QObject, QtCore.QRunnable):
class XrayAssetSHA256DownloadManager(WebGETManager): class XrayAssetSHA256DownloadManager(WebGETManager):
"""Coordinate Xray asset SHA-256 download operations.""" """Coordinate Xray asset SHA-256 download operations."""
def __init__(self, parent=None, **kwargs): def __init__(self, parent=None, **kwargs):
"""Initialize the XrayAssetSHA256DownloadManager.""" """Initialize the XrayAssetSHA256DownloadManager."""
actionMessage = kwargs.pop('actionMessage', 'download sha256') actionMessage = kwargs.pop('actionMessage', 'download sha256')
@@ -124,6 +126,7 @@ class XrayAssetSHA256DownloadManager(WebGETManager):
class XrayAssetAssetsDownloadManager(WebGETManager): class XrayAssetAssetsDownloadManager(WebGETManager):
"""Coordinate Xray asset assets download operations.""" """Coordinate Xray asset assets download operations."""
def __init__(self, parent=None, **kwargs): def __init__(self, parent=None, **kwargs):
"""Initialize the XrayAssetAssetsDownloadManager.""" """Initialize the XrayAssetAssetsDownloadManager."""
actionMessage = kwargs.pop('actionMessage', 'download assets') actionMessage = kwargs.pop('actionMessage', 'download assets')
@@ -159,6 +162,7 @@ class XrayAssetAssetsDownloadManager(WebGETManager):
class XrayAssetPairDownloadHelper: class XrayAssetPairDownloadHelper:
"""Represent Xray asset pair download helper.""" """Represent Xray asset pair download helper."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the XrayAssetPairDownloadHelper.""" """Initialize the XrayAssetPairDownloadHelper."""
sha256ActionMessage = kwargs.pop('sha256ActionMessage', 'download sha256') sha256ActionMessage = kwargs.pop('sha256ActionMessage', 'download sha256')
@@ -195,6 +199,7 @@ class XrayAssetPairDownloadHelper:
class XrayAssetDownloadManager: class XrayAssetDownloadManager:
"""Coordinate Xray asset download operations.""" """Coordinate Xray asset download operations."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the XrayAssetDownloadManager.""" """Initialize the XrayAssetDownloadManager."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
+3
View File
@@ -57,6 +57,7 @@ def validateProxyServer(server) -> bool:
class ConnectAction(AppQAction): class ConnectAction(AppQAction):
"""Handle the connect action.""" """Handle the connect action."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the ConnectAction.""" """Initialize the ConnectAction."""
super().__init__( super().__init__(
@@ -323,6 +324,7 @@ class ConnectAction(AppQAction):
@callOnceOnly @callOnceOnly
def doConnectedCallOnceOnly(self): def doConnectedCallOnceOnly(self):
"""Handle do connected call once only for the connect action.""" """Handle do connected call once only for the connect action."""
def newVersionCallback(newVersion): def newVersionCallback(newVersion):
"""Handle the new version callback.""" """Handle the new version callback."""
APP().systemTray.showMessage( APP().systemTray.showMessage(
@@ -370,6 +372,7 @@ class ConnectAction(AppQAction):
def coreExitCallback(self, core: CoreProcessFactory, exitcode: int): def coreExitCallback(self, core: CoreProcessFactory, exitcode: int):
"""Handle the core exit callback.""" """Handle the core exit callback."""
def putItem(item): def putItem(item):
"""Handle put item for the connect action.""" """Handle put item for the connect action."""
try: try:
+1
View File
@@ -28,6 +28,7 @@ __all__ = ['EditConfigurationAction']
class EditConfigurationAction(AppQAction): class EditConfigurationAction(AppQAction):
"""Handle the edit configuration action.""" """Handle the edit configuration action."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the EditConfigurationAction.""" """Initialize the EditConfigurationAction."""
super().__init__( super().__init__(
+1
View File
@@ -28,6 +28,7 @@ __all__ = ['ExitAction']
class ExitAction(AppQAction): class ExitAction(AppQAction):
"""Handle the exit action.""" """Handle the exit action."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the ExitAction.""" """Initialize the ExitAction."""
super().__init__( super().__init__(
+9
View File
@@ -130,6 +130,7 @@ def importURIs(*uris, failureCallback: Union[Callable[[], None], None] = None):
class ImportURIsProgressDialog(AppQDialog): class ImportURIsProgressDialog(AppQDialog):
"""Present progress and cancellation controls for import ur is.""" """Present progress and cancellation controls for import ur is."""
ActiveDialogs = list() ActiveDialogs = list()
def __init__( def __init__(
@@ -304,6 +305,7 @@ class ImportURIsProgressDialog(AppQDialog):
class MBoxImportError(AppQMessageBox): class MBoxImportError(AppQMessageBox):
"""Represent m box import error.""" """Represent m box import error."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the MBoxImportError.""" """Initialize the MBoxImportError."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -322,6 +324,7 @@ class MBoxImportError(AppQMessageBox):
class MBoxImportMultiSuccess(AppQMessageBox): class MBoxImportMultiSuccess(AppQMessageBox):
"""Represent m box import multi success.""" """Represent m box import multi success."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the MBoxImportMultiSuccess.""" """Initialize the MBoxImportMultiSuccess."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -365,6 +368,7 @@ class MBoxImportMultiSuccess(AppQMessageBox):
class MBoxImportSuccess(AppQMessageBox): class MBoxImportSuccess(AppQMessageBox):
"""Represent m box import success.""" """Represent m box import success."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the MBoxImportSuccess.""" """Initialize the MBoxImportSuccess."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -391,6 +395,7 @@ class MBoxImportSuccess(AppQMessageBox):
class ImportFromFileAction(AppQAction): class ImportFromFileAction(AppQAction):
"""Handle the import from file action.""" """Handle the import from file action."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the ImportFromFileAction.""" """Initialize the ImportFromFileAction."""
super().__init__( super().__init__(
@@ -446,6 +451,7 @@ class ImportFromFileAction(AppQAction):
class ImportURIFromClipboardAction(AppQAction): class ImportURIFromClipboardAction(AppQAction):
"""Handle the import URI from clipboard action.""" """Handle the import URI from clipboard action."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the ImportURIFromClipboardAction.""" """Initialize the ImportURIFromClipboardAction."""
super().__init__(_('Import Share Link From Clipboard'), **kwargs) super().__init__(_('Import Share Link From Clipboard'), **kwargs)
@@ -469,6 +475,7 @@ class ImportURIFromClipboardAction(AppQAction):
class ImportJSONFromClipboardAction(AppQAction): class ImportJSONFromClipboardAction(AppQAction):
"""Handle the import JSON from clipboard action.""" """Handle the import JSON from clipboard action."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the ImportJSONFromClipboardAction.""" """Initialize the ImportJSONFromClipboardAction."""
super().__init__(_('Import JSON Configuration From Clipboard'), **kwargs) super().__init__(_('Import JSON Configuration From Clipboard'), **kwargs)
@@ -482,6 +489,7 @@ class ImportJSONFromClipboardAction(AppQAction):
class ImportQRCodeOnTheScreenAction(Mixins.CleanupOnExit, AppQAction): class ImportQRCodeOnTheScreenAction(Mixins.CleanupOnExit, AppQAction):
"""Handle the import QR code on the screen action.""" """Handle the import QR code on the screen action."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the ImportQRCodeOnTheScreenAction.""" """Initialize the ImportQRCodeOnTheScreenAction."""
super().__init__( super().__init__(
@@ -547,6 +555,7 @@ class ImportQRCodeOnTheScreenAction(Mixins.CleanupOnExit, AppQAction):
class ImportAction(AppQAction): class ImportAction(AppQAction):
"""Handle the import action.""" """Handle the import action."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the ImportAction.""" """Initialize the ImportAction."""
super().__init__( super().__init__(
+2
View File
@@ -41,6 +41,7 @@ registerAppSettings(
class LanguageChildAction(AppQAction): class LanguageChildAction(AppQAction):
"""Handle the language child action.""" """Handle the language child action."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the LanguageChildAction.""" """Initialize the LanguageChildAction."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -64,6 +65,7 @@ class LanguageChildAction(AppQAction):
class LanguageAction(AppQAction): class LanguageAction(AppQAction):
"""Handle the language action.""" """Handle the language action."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the LanguageAction.""" """Initialize the LanguageAction."""
super().__init__( super().__init__(
+2
View File
@@ -38,6 +38,7 @@ _TRANSLATABLE_BUILTIN_ROUTING = [
class RoutingChildAction(AppQAction): class RoutingChildAction(AppQAction):
"""Handle the routing child action.""" """Handle the routing child action."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the RoutingChildAction.""" """Initialize the RoutingChildAction."""
self.routingValue = kwargs.pop('routingValue', None) self.routingValue = kwargs.pop('routingValue', None)
@@ -57,6 +58,7 @@ class RoutingChildAction(AppQAction):
class RoutingAction(AppQAction): class RoutingAction(AppQAction):
"""Handle the routing action.""" """Handle the routing action."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the RoutingAction.""" """Initialize the RoutingAction."""
if AppSettings.get('Routing') == 'Bypass': if AppSettings.get('Routing') == 'Bypass':
+3
View File
@@ -56,6 +56,7 @@ _TRANSLATABLE_TUN_MODE = [
class TUNModeAction(AppQAction): class TUNModeAction(AppQAction):
"""Handle the TUN mode action.""" """Handle the TUN mode action."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the TUNModeAction.""" """Initialize the TUNModeAction."""
if PLATFORM == 'Linux': if PLATFORM == 'Linux':
@@ -85,6 +86,7 @@ class TUNModeAction(AppQAction):
class SettingsChildAction(AppQAction): class SettingsChildAction(AppQAction):
"""Handle the settings child action.""" """Handle the settings child action."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the SettingsChildAction.""" """Initialize the SettingsChildAction."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -179,6 +181,7 @@ class SettingsChildAction(AppQAction):
class SettingsAction(AppQAction): class SettingsAction(AppQAction):
"""Handle the settings action.""" """Handle the settings action."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the SettingsAction.""" """Initialize the SettingsAction."""
if SystemRuntime.flatpakID(): if SystemRuntime.flatpakID():
+2
View File
@@ -32,6 +32,7 @@ registerAppSettings(
class SystemProxyChildAction(AppQAction): class SystemProxyChildAction(AppQAction):
"""Handle the system proxy child action.""" """Handle the system proxy child action."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the SystemProxyChildAction.""" """Initialize the SystemProxyChildAction."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -46,6 +47,7 @@ class SystemProxyChildAction(AppQAction):
class SystemProxyAction(AppQAction): class SystemProxyAction(AppQAction):
"""Handle the system proxy action.""" """Handle the system proxy action."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the SystemProxyAction.""" """Initialize the SystemProxyAction."""
super().__init__( super().__init__(
+1
View File
@@ -46,6 +46,7 @@ else:
class AppMainProcess(ProcessContext.Process): class AppMainProcess(ProcessContext.Process):
"""Represent app main process.""" """Represent app main process."""
def __init__(self, func: Callable[[], ApplicationFactory], **kwargs): def __init__(self, func: Callable[[], ApplicationFactory], **kwargs):
"""Initialize the AppMainProcess.""" """Initialize the AppMainProcess."""
super().__init__(**kwargs) super().__init__(**kwargs)
+6
View File
@@ -51,11 +51,13 @@ registerAppSettings('LogViewerWidgetPointSizeTun_')
class SystemTrayUnavailable(Exception): class SystemTrayUnavailable(Exception):
"""Represent system tray unavailable.""" """Represent system tray unavailable."""
pass pass
class AppLogHandler(logging.Handler): class AppLogHandler(logging.Handler):
"""Represent app log handler.""" """Represent app log handler."""
def __init__(self, emitCallback): def __init__(self, emitCallback):
"""Initialize the AppLogHandler.""" """Initialize the AppLogHandler."""
super().__init__() super().__init__()
@@ -70,6 +72,7 @@ class AppLogHandler(logging.Handler):
class ApplicationExitHelper(QApplication): class ApplicationExitHelper(QApplication):
"""Represent application exit helper.""" """Represent application exit helper."""
def __init__(self, argv): def __init__(self, argv):
"""Initialize the ApplicationExitHelper.""" """Initialize the ApplicationExitHelper."""
super().__init__(argv) super().__init__(argv)
@@ -88,6 +91,7 @@ class ApplicationExitHelper(QApplication):
class SingletonApplication(ApplicationExitHelper): class SingletonApplication(ApplicationExitHelper):
"""Represent singleton application.""" """Represent singleton application."""
def __init__(self, argv): def __init__(self, argv):
"""Initialize the SingletonApplication.""" """Initialize the SingletonApplication."""
super().__init__(argv) super().__init__(argv)
@@ -153,6 +157,7 @@ class SingletonApplication(ApplicationExitHelper):
class ApplicationThemeDetector(QtCore.QObject): class ApplicationThemeDetector(QtCore.QObject):
"""Represent application theme detector.""" """Represent application theme detector."""
themeChanged = QtCore.Signal(str) themeChanged = QtCore.Signal(str)
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
@@ -162,6 +167,7 @@ class ApplicationThemeDetector(QtCore.QObject):
class Application(ApplicationFactory, SingletonApplication): class Application(ApplicationFactory, SingletonApplication):
"""Represent application.""" """Represent application."""
def __init__(self, argv): def __init__(self, argv):
"""Initialize the Application.""" """Initialize the Application."""
super().__init__(argv) super().__init__(argv)
+2
View File
@@ -31,6 +31,7 @@ __all__ = ['ConnectProgressBar']
class AutoUpdateProgressBar(Mixins.ConnectionAware, QProgressBar): class AutoUpdateProgressBar(Mixins.ConnectionAware, QProgressBar):
"""Represent auto update progress bar.""" """Represent auto update progress bar."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the AutoUpdateProgressBar.""" """Initialize the AutoUpdateProgressBar."""
super().__init__(**kwargs) super().__init__(**kwargs)
@@ -91,6 +92,7 @@ class AutoUpdateProgressBar(Mixins.ConnectionAware, QProgressBar):
class ConnectProgressBar(Mixins.QTranslatable, Mixins.ConnectionAware, QWidget): class ConnectProgressBar(Mixins.QTranslatable, Mixins.ConnectionAware, QWidget):
"""Provide the connect progress bar widget.""" """Provide the connect progress bar widget."""
def __init__(self, parent=None): def __init__(self, parent=None):
"""Initialize the ConnectProgressBar.""" """Initialize the ConnectProgressBar."""
super().__init__(parent) super().__init__(parent)
@@ -39,6 +39,7 @@ registerAppSettings('CustomNetworkConnectivityTestURL')
class GuiCustomizeNetworkTestDialog(AppQDialog): class GuiCustomizeNetworkTestDialog(AppQDialog):
"""Present the GUI customize network test dialog.""" """Present the GUI customize network test dialog."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiCustomizeNetworkTestDialog.""" """Initialize the GuiCustomizeNetworkTestDialog."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -38,6 +38,7 @@ registerAppSettings('CustomProxyBypass')
class GuiCustomizeProxyBypassDialog(AppQDialog): class GuiCustomizeProxyBypassDialog(AppQDialog):
"""Present the GUI customize proxy bypass dialog.""" """Present the GUI customize proxy bypass dialog."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiCustomizeProxyBypassDialog.""" """Initialize the GuiCustomizeProxyBypassDialog."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
+12
View File
@@ -38,6 +38,7 @@ logger = logging.getLogger(__name__)
class GuiHy1ItemTextInput(GuiEditorItemTextInput): class GuiHy1ItemTextInput(GuiEditorItemTextInput):
"""Represent GUI hy1 item text input.""" """Represent GUI hy1 item text input."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiHy1ItemTextInput.""" """Initialize the GuiHy1ItemTextInput."""
key = kwargs.pop('key', '') key = kwargs.pop('key', '')
@@ -79,6 +80,7 @@ class GuiHy1ItemTextInput(GuiEditorItemTextInput):
class GuiHy1ItemBasicProtocol(GuiEditorItemTextComboBox): class GuiHy1ItemBasicProtocol(GuiEditorItemTextComboBox):
"""Represent GUI hy1 item basic protocol.""" """Represent GUI hy1 item basic protocol."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiHy1ItemBasicProtocol.""" """Initialize the GuiHy1ItemBasicProtocol."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -114,6 +116,7 @@ class GuiHy1ItemBasicProtocol(GuiEditorItemTextComboBox):
class GuiHy1ItemSpeedUpMbps(GuiEditorItemTextSpinBox): class GuiHy1ItemSpeedUpMbps(GuiEditorItemTextSpinBox):
"""Represent GUI hy1 item speed up mbps.""" """Represent GUI hy1 item speed up mbps."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiHy1ItemSpeedUpMbps.""" """Initialize the GuiHy1ItemSpeedUpMbps."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -150,6 +153,7 @@ class GuiHy1ItemSpeedUpMbps(GuiEditorItemTextSpinBox):
class GuiHy1ItemSpeedDownMbps(GuiEditorItemTextSpinBox): class GuiHy1ItemSpeedDownMbps(GuiEditorItemTextSpinBox):
"""Represent GUI hy1 item speed down mbps.""" """Represent GUI hy1 item speed down mbps."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiHy1ItemSpeedDownMbps.""" """Initialize the GuiHy1ItemSpeedDownMbps."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -186,6 +190,7 @@ class GuiHy1ItemSpeedDownMbps(GuiEditorItemTextSpinBox):
class GuiHy1ItemTLSInsecure(GuiEditorItemTextCheckBox): class GuiHy1ItemTLSInsecure(GuiEditorItemTextCheckBox):
"""Represent GUI hy1 item TLS insecure.""" """Represent GUI hy1 item TLS insecure."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiHy1ItemTLSInsecure.""" """Initialize the GuiHy1ItemTLSInsecure."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -239,6 +244,7 @@ class GuiHy1ItemTLSInsecure(GuiEditorItemTextCheckBox):
class GuiHy1ProjectWebsiteURL(AppQLabel): class GuiHy1ProjectWebsiteURL(AppQLabel):
"""Represent GUI hy1 project website URL.""" """Represent GUI hy1 project website URL."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiHy1ProjectWebsiteURL.""" """Initialize the GuiHy1ProjectWebsiteURL."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -271,6 +277,7 @@ class GuiHy1ProjectWebsiteURL(AppQLabel):
class GuiHy1GroupBoxBasic(GuiEditorWidgetQGroupBox): class GuiHy1GroupBoxBasic(GuiEditorWidgetQGroupBox):
"""Represent GUI hy1 group box basic.""" """Represent GUI hy1 group box basic."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiHy1GroupBoxBasic.""" """Initialize the GuiHy1GroupBoxBasic."""
super().__init__(_('Basic Configuration'), **kwargs) super().__init__(_('Basic Configuration'), **kwargs)
@@ -288,6 +295,7 @@ class GuiHy1GroupBoxBasic(GuiEditorWidgetQGroupBox):
class GuiHy1GroupBoxProxy(GuiEditorWidgetQGroupBox): class GuiHy1GroupBoxProxy(GuiEditorWidgetQGroupBox):
"""Represent GUI hy1 group box proxy.""" """Represent GUI hy1 group box proxy."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiHy1GroupBoxProxy.""" """Initialize the GuiHy1GroupBoxProxy."""
super().__init__(_('Proxy'), **kwargs) super().__init__(_('Proxy'), **kwargs)
@@ -302,6 +310,7 @@ class GuiHy1GroupBoxProxy(GuiEditorWidgetQGroupBox):
class GuiHy1GroupBoxSpeed(GuiEditorWidgetQGroupBox): class GuiHy1GroupBoxSpeed(GuiEditorWidgetQGroupBox):
"""Represent GUI hy1 group box speed.""" """Represent GUI hy1 group box speed."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiHy1GroupBoxSpeed.""" """Initialize the GuiHy1GroupBoxSpeed."""
super().__init__(_('Speed'), **kwargs) super().__init__(_('Speed'), **kwargs)
@@ -316,6 +325,7 @@ class GuiHy1GroupBoxSpeed(GuiEditorWidgetQGroupBox):
class GuiHy1GroupBoxTLS(GuiEditorWidgetQGroupBox): class GuiHy1GroupBoxTLS(GuiEditorWidgetQGroupBox):
"""Represent GUI hy1 group box TLS.""" """Represent GUI hy1 group box TLS."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiHy1GroupBoxTLS.""" """Initialize the GuiHy1GroupBoxTLS."""
super().__init__('TLS', **kwargs) super().__init__('TLS', **kwargs)
@@ -334,6 +344,7 @@ class GuiHy1GroupBoxTLS(GuiEditorWidgetQGroupBox):
class GuiHy1GroupBoxOther(GuiEditorItemFactory, AppQGroupBox): class GuiHy1GroupBoxOther(GuiEditorItemFactory, AppQGroupBox):
"""Represent GUI hy1 group box other.""" """Represent GUI hy1 group box other."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiHy1GroupBoxOther.""" """Initialize the GuiHy1GroupBoxOther."""
super().__init__(_('Other'), **kwargs) super().__init__(_('Other'), **kwargs)
@@ -356,6 +367,7 @@ class GuiHy1GroupBoxOther(GuiEditorItemFactory, AppQGroupBox):
class GuiHysteria1(GuiEditorWidgetQDialog): class GuiHysteria1(GuiEditorWidgetQDialog):
"""Represent GUI hysteria1.""" """Represent GUI hysteria1."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiHysteria1.""" """Initialize the GuiHysteria1."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
+20
View File
@@ -40,6 +40,7 @@ HY2_OBFS_TYPES = ['', 'salamander', 'gecko']
class GuiHy2ItemBasicServer(GuiEditorItemTextInput): class GuiHy2ItemBasicServer(GuiEditorItemTextInput):
"""Represent GUI hy2 item basic server.""" """Represent GUI hy2 item basic server."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiHy2ItemBasicServer.""" """Initialize the GuiHy2ItemBasicServer."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -73,6 +74,7 @@ class GuiHy2ItemBasicServer(GuiEditorItemTextInput):
class GuiHy2ItemBasicAuth(GuiEditorItemTextInput): class GuiHy2ItemBasicAuth(GuiEditorItemTextInput):
"""Represent GUI hy2 item basic auth.""" """Represent GUI hy2 item basic auth."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiHy2ItemBasicAuth.""" """Initialize the GuiHy2ItemBasicAuth."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -114,6 +116,7 @@ class GuiHy2ItemBasicAuth(GuiEditorItemTextInput):
class GuiHy2ItemBasicCongestionComboBox(GuiEditorItemTextComboBox): class GuiHy2ItemBasicCongestionComboBox(GuiEditorItemTextComboBox):
"""Represent GUI hy2 item basic congestion combo box.""" """Represent GUI hy2 item basic congestion combo box."""
CONGESTION_KEYS = ['type', 'bbrProfile'] CONGESTION_KEYS = ['type', 'bbrProfile']
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
@@ -205,6 +208,7 @@ class GuiHy2ItemBasicCongestionComboBox(GuiEditorItemTextComboBox):
class GuiHy2ItemObfsType(GuiEditorItemTextComboBox): class GuiHy2ItemObfsType(GuiEditorItemTextComboBox):
"""Represent GUI hy2 item obfs type.""" """Represent GUI hy2 item obfs type."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiHy2ItemObfsType.""" """Initialize the GuiHy2ItemObfsType."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -262,6 +266,7 @@ class GuiHy2ItemObfsType(GuiEditorItemTextComboBox):
class GuiHy2ItemObfsPassword(GuiEditorItemTextInput): class GuiHy2ItemObfsPassword(GuiEditorItemTextInput):
"""Represent GUI hy2 item obfs password.""" """Represent GUI hy2 item obfs password."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiHy2ItemObfsPassword.""" """Initialize the GuiHy2ItemObfsPassword."""
self.obfsType = kwargs.pop('obfsType', 'salamander') self.obfsType = kwargs.pop('obfsType', 'salamander')
@@ -334,6 +339,7 @@ class GuiHy2ItemObfsPassword(GuiEditorItemTextInput):
class GuiHy2ItemObfsPacketSize(GuiEditorItemTextSpinBox): class GuiHy2ItemObfsPacketSize(GuiEditorItemTextSpinBox):
"""Represent GUI hy2 item obfs packet size.""" """Represent GUI hy2 item obfs packet size."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiHy2ItemObfsPacketSize.""" """Initialize the GuiHy2ItemObfsPacketSize."""
self.obfsType, self.key, self.default = ( self.obfsType, self.key, self.default = (
@@ -404,6 +410,7 @@ class GuiHy2ItemObfsPacketSize(GuiEditorItemTextSpinBox):
class GuiHy2PageObfsXXX(GuiEditorWidgetQWidget): class GuiHy2PageObfsXXX(GuiEditorWidgetQWidget):
"""Represent GUI hy2 page obfs xxx.""" """Represent GUI hy2 page obfs xxx."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiHy2PageObfsXXX.""" """Initialize the GuiHy2PageObfsXXX."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -425,6 +432,7 @@ class GuiHy2PageObfsXXX(GuiEditorWidgetQWidget):
class GuiHy2PageObfsEmpty(GuiHy2PageObfsXXX): class GuiHy2PageObfsEmpty(GuiHy2PageObfsXXX):
"""Represent GUI hy2 page obfs empty.""" """Represent GUI hy2 page obfs empty."""
def containerSequence(self): def containerSequence(self):
"""Return the editor item containers in display order.""" """Return the editor item containers in display order."""
return [ return [
@@ -434,6 +442,7 @@ class GuiHy2PageObfsEmpty(GuiHy2PageObfsXXX):
class GuiHy2PageObfsSalamander(GuiHy2PageObfsXXX): class GuiHy2PageObfsSalamander(GuiHy2PageObfsXXX):
"""Represent GUI hy2 page obfs salamander.""" """Represent GUI hy2 page obfs salamander."""
def containerSequence(self): def containerSequence(self):
"""Return the editor item containers in display order.""" """Return the editor item containers in display order."""
return [ return [
@@ -448,6 +457,7 @@ class GuiHy2PageObfsSalamander(GuiHy2PageObfsXXX):
class GuiHy2PageObfsGecko(GuiHy2PageObfsXXX): class GuiHy2PageObfsGecko(GuiHy2PageObfsXXX):
"""Represent GUI hy2 page obfs gecko.""" """Represent GUI hy2 page obfs gecko."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiHy2PageObfsGecko.""" """Initialize the GuiHy2PageObfsGecko."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -493,6 +503,7 @@ class GuiHy2PageObfsGecko(GuiHy2PageObfsXXX):
class GuiHy2ObfsPageStackedWidget(QStackedWidget): class GuiHy2ObfsPageStackedWidget(QStackedWidget):
"""Provide the GUI hy2 obfs page stacked widget.""" """Provide the GUI hy2 obfs page stacked widget."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiHy2ObfsPageStackedWidget.""" """Initialize the GuiHy2ObfsPageStackedWidget."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -518,6 +529,7 @@ class GuiHy2ObfsPageStackedWidget(QStackedWidget):
class GuiHy2ItemTLSTextInput(GuiEditorItemTextInput): class GuiHy2ItemTLSTextInput(GuiEditorItemTextInput):
"""Represent GUI hy2 item TLS text input.""" """Represent GUI hy2 item TLS text input."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiHy2ItemTLSTextInput.""" """Initialize the GuiHy2ItemTLSTextInput."""
key = kwargs.pop('key', '') key = kwargs.pop('key', '')
@@ -597,6 +609,7 @@ class GuiHy2ItemTLSTextInput(GuiEditorItemTextInput):
class GuiHy2ItemTLSInsecure(GuiEditorItemTextCheckBox): class GuiHy2ItemTLSInsecure(GuiEditorItemTextCheckBox):
"""Represent GUI hy2 item TLS insecure.""" """Represent GUI hy2 item TLS insecure."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiHy2ItemTLSInsecure.""" """Initialize the GuiHy2ItemTLSInsecure."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -650,6 +663,7 @@ class GuiHy2ItemTLSInsecure(GuiEditorItemTextCheckBox):
class GuiHy2GroupBoxBasic(GuiEditorWidgetQGroupBox): class GuiHy2GroupBoxBasic(GuiEditorWidgetQGroupBox):
"""Represent GUI hy2 group box basic.""" """Represent GUI hy2 group box basic."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiHy2GroupBoxBasic.""" """Initialize the GuiHy2GroupBoxBasic."""
super().__init__(_('Basic Configuration'), **kwargs) super().__init__(_('Basic Configuration'), **kwargs)
@@ -671,6 +685,7 @@ class GuiHy2GroupBoxBasic(GuiEditorWidgetQGroupBox):
class GuiHy2GroupBoxProxy(GuiEditorWidgetQGroupBox): class GuiHy2GroupBoxProxy(GuiEditorWidgetQGroupBox):
"""Represent GUI hy2 group box proxy.""" """Represent GUI hy2 group box proxy."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiHy2GroupBoxProxy.""" """Initialize the GuiHy2GroupBoxProxy."""
super().__init__(_('Proxy'), **kwargs) super().__init__(_('Proxy'), **kwargs)
@@ -685,6 +700,7 @@ class GuiHy2GroupBoxProxy(GuiEditorWidgetQGroupBox):
class GuiHy2GroupBoxObfs(GuiEditorItemFactory, AppQGroupBox): class GuiHy2GroupBoxObfs(GuiEditorItemFactory, AppQGroupBox):
"""Represent GUI hy2 group box obfs.""" """Represent GUI hy2 group box obfs."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiHy2GroupBoxObfs.""" """Initialize the GuiHy2GroupBoxObfs."""
translatable = kwargs.pop('translatable', False) translatable = kwargs.pop('translatable', False)
@@ -779,6 +795,7 @@ class GuiHy2GroupBoxObfs(GuiEditorItemFactory, AppQGroupBox):
class GuiHy2GroupBoxTLS(GuiEditorWidgetQGroupBox): class GuiHy2GroupBoxTLS(GuiEditorWidgetQGroupBox):
"""Represent GUI hy2 group box TLS.""" """Represent GUI hy2 group box TLS."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiHy2GroupBoxTLS.""" """Initialize the GuiHy2GroupBoxTLS."""
super().__init__('TLS', **kwargs) super().__init__('TLS', **kwargs)
@@ -799,6 +816,7 @@ class GuiHy2GroupBoxTLS(GuiEditorWidgetQGroupBox):
class GuiHy2ProjectWebsiteURL(AppQLabel): class GuiHy2ProjectWebsiteURL(AppQLabel):
"""Represent GUI hy2 project website URL.""" """Represent GUI hy2 project website URL."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiHy2ProjectWebsiteURL.""" """Initialize the GuiHy2ProjectWebsiteURL."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -831,6 +849,7 @@ class GuiHy2ProjectWebsiteURL(AppQLabel):
class GuiHy2GroupBoxOther(GuiEditorItemFactory, AppQGroupBox): class GuiHy2GroupBoxOther(GuiEditorItemFactory, AppQGroupBox):
"""Represent GUI hy2 group box other.""" """Represent GUI hy2 group box other."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiHy2GroupBoxOther.""" """Initialize the GuiHy2GroupBoxOther."""
super().__init__(_('Other'), **kwargs) super().__init__(_('Other'), **kwargs)
@@ -853,6 +872,7 @@ class GuiHy2GroupBoxOther(GuiEditorItemFactory, AppQGroupBox):
class GuiHysteria2(GuiEditorWidgetQDialog): class GuiHysteria2(GuiEditorWidgetQDialog):
"""Represent GUI hysteria2.""" """Represent GUI hysteria2."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiHysteria2.""" """Initialize the GuiHysteria2."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
+6
View File
@@ -40,6 +40,7 @@ getProxyOutboundServer = functools.partial(
class GuiSSItemTextInput(GuiEditorItemTextInput): class GuiSSItemTextInput(GuiEditorItemTextInput):
"""Represent GUI ss item text input.""" """Represent GUI ss item text input."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiSSItemTextInput.""" """Initialize the GuiSSItemTextInput."""
key = kwargs.pop('key', '') key = kwargs.pop('key', '')
@@ -85,6 +86,7 @@ class GuiSSItemTextInput(GuiEditorItemTextInput):
class GuiSSItemBasicPort(GuiEditorItemTextSpinBox): class GuiSSItemBasicPort(GuiEditorItemTextSpinBox):
"""Represent GUI ss item basic port.""" """Represent GUI ss item basic port."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiSSItemBasicPort.""" """Initialize the GuiSSItemBasicPort."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -125,6 +127,7 @@ class GuiSSItemBasicPort(GuiEditorItemTextSpinBox):
class GuiSSItemBasicMethod(GuiEditorItemTextComboBox): class GuiSSItemBasicMethod(GuiEditorItemTextComboBox):
"""Represent GUI ss item basic method.""" """Represent GUI ss item basic method."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiSSItemBasicMethod.""" """Initialize the GuiSSItemBasicMethod."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -179,6 +182,7 @@ class GuiSSItemBasicMethod(GuiEditorItemTextComboBox):
class GuiSSGroupBoxBasic(GuiEditorWidgetQGroupBox): class GuiSSGroupBoxBasic(GuiEditorWidgetQGroupBox):
"""Represent GUI ss group box basic.""" """Represent GUI ss group box basic."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiSSGroupBoxBasic.""" """Initialize the GuiSSGroupBoxBasic."""
super().__init__(_('Basic Configuration'), **kwargs) super().__init__(_('Basic Configuration'), **kwargs)
@@ -196,6 +200,7 @@ class GuiSSGroupBoxBasic(GuiEditorWidgetQGroupBox):
class GuiSSGroupBoxProxy(GuiEditorWidgetQGroupBox): class GuiSSGroupBoxProxy(GuiEditorWidgetQGroupBox):
"""Represent GUI ss group box proxy.""" """Represent GUI ss group box proxy."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiSSGroupBoxProxy.""" """Initialize the GuiSSGroupBoxProxy."""
super().__init__(_('Proxy'), **kwargs) super().__init__(_('Proxy'), **kwargs)
@@ -210,6 +215,7 @@ class GuiSSGroupBoxProxy(GuiEditorWidgetQGroupBox):
class GuiShadowsocks(GuiEditorWidgetQDialog): class GuiShadowsocks(GuiEditorWidgetQDialog):
"""Represent GUI shadowsocks.""" """Represent GUI shadowsocks."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiShadowsocks.""" """Initialize the GuiShadowsocks."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
+5
View File
@@ -40,6 +40,7 @@ getProxyOutboundServer = functools.partial(
class GuiSocksItemTextInput(GuiEditorItemTextInput): class GuiSocksItemTextInput(GuiEditorItemTextInput):
"""Represent GUI SOCKS item text input.""" """Represent GUI SOCKS item text input."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiSocksItemTextInput.""" """Initialize the GuiSocksItemTextInput."""
key = kwargs.pop('key', '') key = kwargs.pop('key', '')
@@ -84,6 +85,7 @@ class GuiSocksItemTextInput(GuiEditorItemTextInput):
class GuiSocksItemBasicPort(GuiEditorItemTextSpinBox): class GuiSocksItemBasicPort(GuiEditorItemTextSpinBox):
"""Represent GUI SOCKS item basic port.""" """Represent GUI SOCKS item basic port."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiSocksItemBasicPort.""" """Initialize the GuiSocksItemBasicPort."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -123,6 +125,7 @@ class GuiSocksItemBasicPort(GuiEditorItemTextSpinBox):
class GuiSocksGroupBoxBasic(GuiEditorWidgetQGroupBox): class GuiSocksGroupBoxBasic(GuiEditorWidgetQGroupBox):
"""Represent GUI SOCKS group box basic.""" """Represent GUI SOCKS group box basic."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiSocksGroupBoxBasic.""" """Initialize the GuiSocksGroupBoxBasic."""
super().__init__(_('Basic Configuration'), **kwargs) super().__init__(_('Basic Configuration'), **kwargs)
@@ -140,6 +143,7 @@ class GuiSocksGroupBoxBasic(GuiEditorWidgetQGroupBox):
class GuiSocksGroupBoxProxy(GuiEditorWidgetQGroupBox): class GuiSocksGroupBoxProxy(GuiEditorWidgetQGroupBox):
"""Represent GUI SOCKS group box proxy.""" """Represent GUI SOCKS group box proxy."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiSocksGroupBoxProxy.""" """Initialize the GuiSocksGroupBoxProxy."""
super().__init__(_('Proxy'), **kwargs) super().__init__(_('Proxy'), **kwargs)
@@ -154,6 +158,7 @@ class GuiSocksGroupBoxProxy(GuiEditorWidgetQGroupBox):
class GuiSocks(GuiEditorWidgetQDialog): class GuiSocks(GuiEditorWidgetQDialog):
"""Represent GUI SOCKS.""" """Represent GUI SOCKS."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiSocks.""" """Initialize the GuiSocks."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
+8
View File
@@ -38,6 +38,7 @@ logger = logging.getLogger(__name__)
class GuiTUNSettingsItemXXX(GuiEditorItemTextInput): class GuiTUNSettingsItemXXX(GuiEditorItemTextInput):
"""Represent GUI TUN settings item xxx.""" """Represent GUI TUN settings item xxx."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiTUNSettingsItemXXX.""" """Initialize the GuiTUNSettingsItemXXX."""
self.key = kwargs.pop('key', '') self.key = kwargs.pop('key', '')
@@ -65,6 +66,7 @@ class GuiTUNSettingsItemXXX(GuiEditorItemTextInput):
class GuiTUNSettingsItemSpinBoxBufferSizeXXX(GuiEditorItemTextSpinBox): class GuiTUNSettingsItemSpinBoxBufferSizeXXX(GuiEditorItemTextSpinBox):
"""Represent GUI TUN settings item spin box buffer size xxx.""" """Represent GUI TUN settings item spin box buffer size xxx."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiTUNSettingsItemSpinBoxBufferSizeXXX.""" """Initialize the GuiTUNSettingsItemSpinBoxBufferSizeXXX."""
self.key = kwargs.pop('key', '') self.key = kwargs.pop('key', '')
@@ -106,6 +108,7 @@ class GuiTUNSettingsItemSpinBoxBufferSizeXXX(GuiEditorItemTextSpinBox):
class GuiTUNSettingsItemCheckBoxXXX(GuiEditorItemTextCheckBox): class GuiTUNSettingsItemCheckBoxXXX(GuiEditorItemTextCheckBox):
"""Represent GUI TUN settings item check box xxx.""" """Represent GUI TUN settings item check box xxx."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiTUNSettingsItemCheckBoxXXX.""" """Initialize the GuiTUNSettingsItemCheckBoxXXX."""
self.key = kwargs.pop('key', '') self.key = kwargs.pop('key', '')
@@ -138,6 +141,7 @@ class GuiTUNSettingsItemCheckBoxXXX(GuiEditorItemTextCheckBox):
class AppQLabelHelpPage(AppQLabel): class AppQLabelHelpPage(AppQLabel):
"""Represent app q label help page.""" """Represent app q label help page."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the AppQLabelHelpPage.""" """Initialize the AppQLabelHelpPage."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -170,6 +174,7 @@ class AppQLabelHelpPage(AppQLabel):
class GuiTUNSettingsItemHelpPage(GuiEditorItemWidgetContainer): class GuiTUNSettingsItemHelpPage(GuiEditorItemWidgetContainer):
"""Provide the TUN settings item help configuration editor page.""" """Provide the TUN settings item help configuration editor page."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiTUNSettingsItemHelpPage.""" """Initialize the GuiTUNSettingsItemHelpPage."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -183,6 +188,7 @@ class GuiTUNSettingsItemHelpPage(GuiEditorItemWidgetContainer):
class GuiTUNSettingsGroupBoxBasic(GuiEditorWidgetQGroupBox): class GuiTUNSettingsGroupBoxBasic(GuiEditorWidgetQGroupBox):
"""Represent GUI TUN settings group box basic.""" """Represent GUI TUN settings group box basic."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiTUNSettingsGroupBoxBasic.""" """Initialize the GuiTUNSettingsGroupBoxBasic."""
super().__init__(_('Basic Configuration'), **kwargs) super().__init__(_('Basic Configuration'), **kwargs)
@@ -252,6 +258,7 @@ class GuiTUNSettingsGroupBoxBasic(GuiEditorWidgetQGroupBox):
class GuiTUNSettingsGroupBoxMemory(GuiEditorWidgetQGroupBox): class GuiTUNSettingsGroupBoxMemory(GuiEditorWidgetQGroupBox):
"""Represent GUI TUN settings group box memory.""" """Represent GUI TUN settings group box memory."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiTUNSettingsGroupBoxMemory.""" """Initialize the GuiTUNSettingsGroupBoxMemory."""
super().__init__(_('Memory Optimization'), **kwargs) super().__init__(_('Memory Optimization'), **kwargs)
@@ -283,6 +290,7 @@ class GuiTUNSettingsGroupBoxMemory(GuiEditorWidgetQGroupBox):
class GuiTUNSettings(GuiEditorWidgetQDialog): class GuiTUNSettings(GuiEditorWidgetQDialog):
"""Store and validate GUI TUN settings.""" """Store and validate GUI TUN settings."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiTUNSettings.""" """Initialize the GuiTUNSettings."""
tabTranslatable = kwargs.pop('tabTranslatable', True) tabTranslatable = kwargs.pop('tabTranslatable', True)
+5
View File
@@ -40,6 +40,7 @@ getProxyOutboundServer = functools.partial(
class GuiTrojanItemTextInput(GuiEditorItemTextInput): class GuiTrojanItemTextInput(GuiEditorItemTextInput):
"""Represent GUI trojan item text input.""" """Represent GUI trojan item text input."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiTrojanItemTextInput.""" """Initialize the GuiTrojanItemTextInput."""
key = kwargs.pop('key', '') key = kwargs.pop('key', '')
@@ -85,6 +86,7 @@ class GuiTrojanItemTextInput(GuiEditorItemTextInput):
class GuiTrojanItemBasicPort(GuiEditorItemTextSpinBox): class GuiTrojanItemBasicPort(GuiEditorItemTextSpinBox):
"""Represent GUI trojan item basic port.""" """Represent GUI trojan item basic port."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiTrojanItemBasicPort.""" """Initialize the GuiTrojanItemBasicPort."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -125,6 +127,7 @@ class GuiTrojanItemBasicPort(GuiEditorItemTextSpinBox):
class GuiTrojanGroupBoxBasic(GuiEditorWidgetQGroupBox): class GuiTrojanGroupBoxBasic(GuiEditorWidgetQGroupBox):
"""Represent GUI trojan group box basic.""" """Represent GUI trojan group box basic."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiTrojanGroupBoxBasic.""" """Initialize the GuiTrojanGroupBoxBasic."""
super().__init__(_('Basic Configuration'), **kwargs) super().__init__(_('Basic Configuration'), **kwargs)
@@ -141,6 +144,7 @@ class GuiTrojanGroupBoxBasic(GuiEditorWidgetQGroupBox):
class GuiTrojanGroupBoxProxy(GuiEditorWidgetQGroupBox): class GuiTrojanGroupBoxProxy(GuiEditorWidgetQGroupBox):
"""Represent GUI trojan group box proxy.""" """Represent GUI trojan group box proxy."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiTrojanGroupBoxProxy.""" """Initialize the GuiTrojanGroupBoxProxy."""
super().__init__(_('Proxy'), **kwargs) super().__init__(_('Proxy'), **kwargs)
@@ -155,6 +159,7 @@ class GuiTrojanGroupBoxProxy(GuiEditorWidgetQGroupBox):
class GuiTrojan(GuiEditorWidgetQDialog): class GuiTrojan(GuiEditorWidgetQDialog):
"""Represent GUI trojan.""" """Represent GUI trojan."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiTrojan.""" """Initialize the GuiTrojan."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
+8
View File
@@ -49,6 +49,7 @@ getProxyOutboundUser = functools.partial(
class GuiVLESSItemBasicAddress(GuiEditorItemTextInput): class GuiVLESSItemBasicAddress(GuiEditorItemTextInput):
"""Represent GUI VLESS item basic address.""" """Represent GUI VLESS item basic address."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVLESSItemBasicAddress.""" """Initialize the GuiVLESSItemBasicAddress."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -90,6 +91,7 @@ class GuiVLESSItemBasicAddress(GuiEditorItemTextInput):
class GuiVLESSItemBasicPort(GuiEditorItemTextSpinBox): class GuiVLESSItemBasicPort(GuiEditorItemTextSpinBox):
"""Represent GUI VLESS item basic port.""" """Represent GUI VLESS item basic port."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVLESSItemBasicPort.""" """Initialize the GuiVLESSItemBasicPort."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -130,6 +132,7 @@ class GuiVLESSItemBasicPort(GuiEditorItemTextSpinBox):
class GuiVLESSItemBasicId(GuiEditorItemTextInput): class GuiVLESSItemBasicId(GuiEditorItemTextInput):
"""Represent GUI VLESS item basic id.""" """Represent GUI VLESS item basic id."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVLESSItemBasicId.""" """Initialize the GuiVLESSItemBasicId."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -189,6 +192,7 @@ class GuiVLESSItemBasicId(GuiEditorItemTextInput):
class GuiVLESSItemBasicEncryption(GuiEditorItemTextInput): class GuiVLESSItemBasicEncryption(GuiEditorItemTextInput):
"""Represent GUI VLESS item basic encryption.""" """Represent GUI VLESS item basic encryption."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVLESSItemBasicEncryption.""" """Initialize the GuiVLESSItemBasicEncryption."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -230,6 +234,7 @@ class GuiVLESSItemBasicEncryption(GuiEditorItemTextInput):
class GuiVLESSItemBasicFlow(GuiEditorItemTextComboBox): class GuiVLESSItemBasicFlow(GuiEditorItemTextComboBox):
"""Represent GUI VLESS item basic flow.""" """Represent GUI VLESS item basic flow."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVLESSItemBasicFlow.""" """Initialize the GuiVLESSItemBasicFlow."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -276,6 +281,7 @@ class GuiVLESSItemBasicFlow(GuiEditorItemTextComboBox):
class GuiVLESSGroupBoxBasic(GuiEditorWidgetQGroupBox): class GuiVLESSGroupBoxBasic(GuiEditorWidgetQGroupBox):
"""Represent GUI VLESS group box basic.""" """Represent GUI VLESS group box basic."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiVLESSGroupBoxBasic.""" """Initialize the GuiVLESSGroupBoxBasic."""
super().__init__(_('Basic Configuration'), **kwargs) super().__init__(_('Basic Configuration'), **kwargs)
@@ -337,6 +343,7 @@ class GuiVLESSGroupBoxBasic(GuiEditorWidgetQGroupBox):
class GuiVLESSGroupBoxProxy(GuiEditorWidgetQGroupBox): class GuiVLESSGroupBoxProxy(GuiEditorWidgetQGroupBox):
"""Represent GUI VLESS group box proxy.""" """Represent GUI VLESS group box proxy."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiVLESSGroupBoxProxy.""" """Initialize the GuiVLESSGroupBoxProxy."""
super().__init__(_('Proxy'), **kwargs) super().__init__(_('Proxy'), **kwargs)
@@ -351,6 +358,7 @@ class GuiVLESSGroupBoxProxy(GuiEditorWidgetQGroupBox):
class GuiVLESS(GuiEditorWidgetQDialog): class GuiVLESS(GuiEditorWidgetQDialog):
"""Represent GUI VLESS.""" """Represent GUI VLESS."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVLESS.""" """Initialize the GuiVLESS."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
+8
View File
@@ -49,6 +49,7 @@ getProxyOutboundUser = functools.partial(
class GuiVMessItemBasicAddress(GuiEditorItemTextInput): class GuiVMessItemBasicAddress(GuiEditorItemTextInput):
"""Represent GUI v mess item basic address.""" """Represent GUI v mess item basic address."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVMessItemBasicAddress.""" """Initialize the GuiVMessItemBasicAddress."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -90,6 +91,7 @@ class GuiVMessItemBasicAddress(GuiEditorItemTextInput):
class GuiVMessItemBasicPort(GuiEditorItemTextSpinBox): class GuiVMessItemBasicPort(GuiEditorItemTextSpinBox):
"""Represent GUI v mess item basic port.""" """Represent GUI v mess item basic port."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVMessItemBasicPort.""" """Initialize the GuiVMessItemBasicPort."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -130,6 +132,7 @@ class GuiVMessItemBasicPort(GuiEditorItemTextSpinBox):
class GuiVMessItemBasicId(GuiEditorItemTextInput): class GuiVMessItemBasicId(GuiEditorItemTextInput):
"""Represent GUI v mess item basic id.""" """Represent GUI v mess item basic id."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVMessItemBasicId.""" """Initialize the GuiVMessItemBasicId."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -189,6 +192,7 @@ class GuiVMessItemBasicId(GuiEditorItemTextInput):
class GuiVMessItemBasicAlterId(GuiEditorItemTextSpinBox): class GuiVMessItemBasicAlterId(GuiEditorItemTextSpinBox):
"""Represent GUI v mess item basic alter id.""" """Represent GUI v mess item basic alter id."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVMessItemBasicAlterId.""" """Initialize the GuiVMessItemBasicAlterId."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -229,6 +233,7 @@ class GuiVMessItemBasicAlterId(GuiEditorItemTextSpinBox):
class GuiVMessItemBasicSecurity(GuiEditorItemTextComboBox): class GuiVMessItemBasicSecurity(GuiEditorItemTextComboBox):
"""Represent GUI v mess item basic security.""" """Represent GUI v mess item basic security."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVMessItemBasicSecurity.""" """Initialize the GuiVMessItemBasicSecurity."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -277,6 +282,7 @@ class GuiVMessItemBasicSecurity(GuiEditorItemTextComboBox):
class GuiVMessGroupBoxBasic(GuiEditorWidgetQGroupBox): class GuiVMessGroupBoxBasic(GuiEditorWidgetQGroupBox):
"""Represent GUI v mess group box basic.""" """Represent GUI v mess group box basic."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiVMessGroupBoxBasic.""" """Initialize the GuiVMessGroupBoxBasic."""
super().__init__(_('Basic Configuration'), **kwargs) super().__init__(_('Basic Configuration'), **kwargs)
@@ -346,6 +352,7 @@ class GuiVMessGroupBoxBasic(GuiEditorWidgetQGroupBox):
class GuiVMessGroupBoxProxy(GuiEditorWidgetQGroupBox): class GuiVMessGroupBoxProxy(GuiEditorWidgetQGroupBox):
"""Represent GUI v mess group box proxy.""" """Represent GUI v mess group box proxy."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiVMessGroupBoxProxy.""" """Initialize the GuiVMessGroupBoxProxy."""
super().__init__(_('Proxy'), **kwargs) super().__init__(_('Proxy'), **kwargs)
@@ -360,6 +367,7 @@ class GuiVMessGroupBoxProxy(GuiEditorWidgetQGroupBox):
class GuiVMess(GuiEditorWidgetQDialog): class GuiVMess(GuiEditorWidgetQDialog):
"""Represent GUI v mess.""" """Represent GUI v mess."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVMess.""" """Initialize the GuiVMess."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
+22
View File
@@ -40,6 +40,7 @@ STREAM_SECURITY = [
class GuiVTLSItemSecurity(GuiEditorItemTextComboBox): class GuiVTLSItemSecurity(GuiEditorItemTextComboBox):
"""Represent GUI vtls item security.""" """Represent GUI vtls item security."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTLSItemSecurity.""" """Initialize the GuiVTLSItemSecurity."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -101,6 +102,7 @@ class GuiVTLSItemSecurity(GuiEditorItemTextComboBox):
class GuiVTLSItemXXXServerName(GuiEditorItemTextInput): class GuiVTLSItemXXXServerName(GuiEditorItemTextInput):
"""Represent GUI vtls item xxx server name.""" """Represent GUI vtls item xxx server name."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
# Mandatory # Mandatory
"""Initialize the GuiVTLSItemXXXServerName.""" """Initialize the GuiVTLSItemXXXServerName."""
@@ -161,6 +163,7 @@ class GuiVTLSItemXXXServerName(GuiEditorItemTextInput):
class GuiVTLSItemTLSServerName(GuiVTLSItemXXXServerName): class GuiVTLSItemTLSServerName(GuiVTLSItemXXXServerName):
"""Represent GUI vtls item TLS server name.""" """Represent GUI vtls item TLS server name."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTLSItemTLSServerName.""" """Initialize the GuiVTLSItemTLSServerName."""
securityKey = kwargs.pop('securityKey', 'tlsSettings') securityKey = kwargs.pop('securityKey', 'tlsSettings')
@@ -170,6 +173,7 @@ class GuiVTLSItemTLSServerName(GuiVTLSItemXXXServerName):
class GuiVTLSItemRealityServerName(GuiVTLSItemXXXServerName): class GuiVTLSItemRealityServerName(GuiVTLSItemXXXServerName):
"""Represent GUI vtls item reality server name.""" """Represent GUI vtls item reality server name."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTLSItemRealityServerName.""" """Initialize the GuiVTLSItemRealityServerName."""
securityKey = kwargs.pop('securityKey', 'realitySettings') securityKey = kwargs.pop('securityKey', 'realitySettings')
@@ -179,6 +183,7 @@ class GuiVTLSItemRealityServerName(GuiVTLSItemXXXServerName):
class GuiVTLSItemXXXFingerprint(GuiEditorItemTextInput): class GuiVTLSItemXXXFingerprint(GuiEditorItemTextInput):
"""Represent GUI vtls item xxx fingerprint.""" """Represent GUI vtls item xxx fingerprint."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
# Mandatory # Mandatory
"""Initialize the GuiVTLSItemXXXFingerprint.""" """Initialize the GuiVTLSItemXXXFingerprint."""
@@ -239,6 +244,7 @@ class GuiVTLSItemXXXFingerprint(GuiEditorItemTextInput):
class GuiVTLSItemTLSFingerprint(GuiVTLSItemXXXFingerprint): class GuiVTLSItemTLSFingerprint(GuiVTLSItemXXXFingerprint):
"""Represent GUI vtls item TLS fingerprint.""" """Represent GUI vtls item TLS fingerprint."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTLSItemTLSFingerprint.""" """Initialize the GuiVTLSItemTLSFingerprint."""
securityKey = kwargs.pop('securityKey', 'tlsSettings') securityKey = kwargs.pop('securityKey', 'tlsSettings')
@@ -248,6 +254,7 @@ class GuiVTLSItemTLSFingerprint(GuiVTLSItemXXXFingerprint):
class GuiVTLSItemRealityFingerprint(GuiVTLSItemXXXFingerprint): class GuiVTLSItemRealityFingerprint(GuiVTLSItemXXXFingerprint):
"""Represent GUI vtls item reality fingerprint.""" """Represent GUI vtls item reality fingerprint."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTLSItemRealityFingerprint.""" """Initialize the GuiVTLSItemRealityFingerprint."""
securityKey = kwargs.pop('securityKey', 'realitySettings') securityKey = kwargs.pop('securityKey', 'realitySettings')
@@ -257,6 +264,7 @@ class GuiVTLSItemRealityFingerprint(GuiVTLSItemXXXFingerprint):
class GuiVTLSItemTLSAlpn(GuiEditorItemTextInput): class GuiVTLSItemTLSAlpn(GuiEditorItemTextInput):
"""Represent GUI vtls item TLS alpn.""" """Represent GUI vtls item TLS alpn."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTLSItemTLSAlpn.""" """Initialize the GuiVTLSItemTLSAlpn."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -312,6 +320,7 @@ class GuiVTLSItemTLSAlpn(GuiEditorItemTextInput):
class GuiVTLSItemTLSXXXTextInput(GuiEditorItemTextInput): class GuiVTLSItemTLSXXXTextInput(GuiEditorItemTextInput):
"""Represent GUI vtls item tlsxxx text input.""" """Represent GUI vtls item tlsxxx text input."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
# Mandatory # Mandatory
"""Initialize the GuiVTLSItemTLSXXXTextInput.""" """Initialize the GuiVTLSItemTLSXXXTextInput."""
@@ -366,6 +375,7 @@ class GuiVTLSItemTLSXXXTextInput(GuiEditorItemTextInput):
class GuiVTLSItemTLSAllowInsecure(GuiEditorItemTextCheckBox): class GuiVTLSItemTLSAllowInsecure(GuiEditorItemTextCheckBox):
"""Represent GUI vtls item TLS allow insecure.""" """Represent GUI vtls item TLS allow insecure."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTLSItemTLSAllowInsecure.""" """Initialize the GuiVTLSItemTLSAllowInsecure."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -417,6 +427,7 @@ class GuiVTLSItemTLSAllowInsecure(GuiEditorItemTextCheckBox):
class GuiVTLSItemRealityXXX(GuiEditorItemTextInput): class GuiVTLSItemRealityXXX(GuiEditorItemTextInput):
"""Represent GUI vtls item reality xxx.""" """Represent GUI vtls item reality xxx."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
# Mandatory # Mandatory
"""Initialize the GuiVTLSItemRealityXXX.""" """Initialize the GuiVTLSItemRealityXXX."""
@@ -477,6 +488,7 @@ class GuiVTLSItemRealityXXX(GuiEditorItemTextInput):
class GuiVTLSItemRealityPublicKey(GuiVTLSItemRealityXXX): class GuiVTLSItemRealityPublicKey(GuiVTLSItemRealityXXX):
"""Represent GUI vtls item reality public key.""" """Represent GUI vtls item reality public key."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTLSItemRealityPublicKey.""" """Initialize the GuiVTLSItemRealityPublicKey."""
realityKey = kwargs.pop('realityKey', 'publicKey') realityKey = kwargs.pop('realityKey', 'publicKey')
@@ -486,6 +498,7 @@ class GuiVTLSItemRealityPublicKey(GuiVTLSItemRealityXXX):
class GuiVTLSItemRealityShortId(GuiVTLSItemRealityXXX): class GuiVTLSItemRealityShortId(GuiVTLSItemRealityXXX):
"""Represent GUI vtls item reality short id.""" """Represent GUI vtls item reality short id."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTLSItemRealityShortId.""" """Initialize the GuiVTLSItemRealityShortId."""
realityKey = kwargs.pop('realityKey', 'shortId') realityKey = kwargs.pop('realityKey', 'shortId')
@@ -495,6 +508,7 @@ class GuiVTLSItemRealityShortId(GuiVTLSItemRealityXXX):
class GuiVTLSItemRealityMldsa65Verify(GuiVTLSItemRealityXXX): class GuiVTLSItemRealityMldsa65Verify(GuiVTLSItemRealityXXX):
"""Represent GUI vtls item reality mldsa65 verify.""" """Represent GUI vtls item reality mldsa65 verify."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTLSItemRealityMldsa65Verify.""" """Initialize the GuiVTLSItemRealityMldsa65Verify."""
realityKey = kwargs.pop('realityKey', 'mldsa65Verify') realityKey = kwargs.pop('realityKey', 'mldsa65Verify')
@@ -504,6 +518,7 @@ class GuiVTLSItemRealityMldsa65Verify(GuiVTLSItemRealityXXX):
class GuiVTLSItemRealitySpiderX(GuiVTLSItemRealityXXX): class GuiVTLSItemRealitySpiderX(GuiVTLSItemRealityXXX):
"""Represent GUI vtls item reality spider x.""" """Represent GUI vtls item reality spider x."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTLSItemRealitySpiderX.""" """Initialize the GuiVTLSItemRealitySpiderX."""
realityKey = kwargs.pop('realityKey', 'spiderX') realityKey = kwargs.pop('realityKey', 'spiderX')
@@ -513,6 +528,7 @@ class GuiVTLSItemRealitySpiderX(GuiVTLSItemRealityXXX):
class GuiVTLSPageXXX(GuiEditorWidgetQWidget): class GuiVTLSPageXXX(GuiEditorWidgetQWidget):
"""Represent GUI vtls page xxx.""" """Represent GUI vtls page xxx."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTLSPageXXX.""" """Initialize the GuiVTLSPageXXX."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -534,6 +550,7 @@ class GuiVTLSPageXXX(GuiEditorWidgetQWidget):
class GuiVTLSPageEmpty(GuiVTLSPageXXX): class GuiVTLSPageEmpty(GuiVTLSPageXXX):
"""Represent GUI vtls page empty.""" """Represent GUI vtls page empty."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTLSPageEmpty.""" """Initialize the GuiVTLSPageEmpty."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -547,6 +564,7 @@ class GuiVTLSPageEmpty(GuiVTLSPageXXX):
class GuiVTLSPageNone(GuiVTLSPageXXX): class GuiVTLSPageNone(GuiVTLSPageXXX):
"""Represent GUI vtls page none.""" """Represent GUI vtls page none."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTLSPageNone.""" """Initialize the GuiVTLSPageNone."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -560,6 +578,7 @@ class GuiVTLSPageNone(GuiVTLSPageXXX):
class GuiVTLSPageTLS(GuiVTLSPageXXX): class GuiVTLSPageTLS(GuiVTLSPageXXX):
"""Represent GUI vtls page TLS.""" """Represent GUI vtls page TLS."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTLSPageTLS.""" """Initialize the GuiVTLSPageTLS."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -641,6 +660,7 @@ class GuiVTLSPageTLS(GuiVTLSPageXXX):
class GuiVTLSPageReality(GuiVTLSPageXXX): class GuiVTLSPageReality(GuiVTLSPageXXX):
"""Represent GUI vtls page reality.""" """Represent GUI vtls page reality."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTLSPageReality.""" """Initialize the GuiVTLSPageReality."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -691,6 +711,7 @@ class GuiVTLSPageReality(GuiVTLSPageXXX):
class GuiVTLSPageStackedWidget(QStackedWidget): class GuiVTLSPageStackedWidget(QStackedWidget):
"""Provide the GUI vtls page stacked widget.""" """Provide the GUI vtls page stacked widget."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTLSPageStackedWidget.""" """Initialize the GuiVTLSPageStackedWidget."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -718,6 +739,7 @@ class GuiVTLSPageStackedWidget(QStackedWidget):
class GuiVTLSQGroupBox(GuiEditorItemFactory, AppQGroupBox): class GuiVTLSQGroupBox(GuiEditorItemFactory, AppQGroupBox):
"""Group the GUI vtlsq editor controls.""" """Group the GUI vtlsq editor controls."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiVTLSQGroupBox.""" """Initialize the GuiVTLSQGroupBox."""
translatable = kwargs.pop('translatable', False) translatable = kwargs.pop('translatable', False)
+43
View File
@@ -47,6 +47,7 @@ STREAM_NETWORK = [
class GuiVTransportItemNetwork(GuiEditorItemTextComboBox): class GuiVTransportItemNetwork(GuiEditorItemTextComboBox):
"""Represent GUI v transport item network.""" """Represent GUI v transport item network."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemNetwork.""" """Initialize the GuiVTransportItemNetwork."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -108,6 +109,7 @@ class GuiVTransportItemNetwork(GuiEditorItemTextComboBox):
class GuiVTransportItemFinalMask(GuiEditorItemTextInput): class GuiVTransportItemFinalMask(GuiEditorItemTextInput):
"""Represent GUI v transport item final mask.""" """Represent GUI v transport item final mask."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemFinalMask.""" """Initialize the GuiVTransportItemFinalMask."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -160,6 +162,7 @@ class GuiVTransportItemFinalMask(GuiEditorItemTextInput):
class GuiVTransportItemTypeXXX(GuiEditorItemTextComboBox): class GuiVTransportItemTypeXXX(GuiEditorItemTextComboBox):
"""Represent GUI v transport item type xxx.""" """Represent GUI v transport item type xxx."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemTypeXXX.""" """Initialize the GuiVTransportItemTypeXXX."""
networkKey = kwargs.pop('networkKey', '') networkKey = kwargs.pop('networkKey', '')
@@ -222,6 +225,7 @@ class GuiVTransportItemTypeXXX(GuiEditorItemTextComboBox):
class GuiVTransportItemTypeTcpOrRaw(GuiVTransportItemTypeXXX): class GuiVTransportItemTypeTcpOrRaw(GuiVTransportItemTypeXXX):
"""Represent GUI v transport item type TCP or raw.""" """Represent GUI v transport item type TCP or raw."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemTypeTcpOrRaw.""" """Initialize the GuiVTransportItemTypeTcpOrRaw."""
networkKey = kwargs.pop('networkKey', 'tcpSettings') networkKey = kwargs.pop('networkKey', 'tcpSettings')
@@ -239,6 +243,7 @@ class GuiVTransportItemTypeTcpOrRaw(GuiVTransportItemTypeXXX):
class GuiVTransportItemHostTcpOrRaw(GuiEditorItemTextInput): class GuiVTransportItemHostTcpOrRaw(GuiEditorItemTextInput):
"""Represent GUI v transport item host TCP or raw.""" """Represent GUI v transport item host TCP or raw."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemHostTcpOrRaw.""" """Initialize the GuiVTransportItemHostTcpOrRaw."""
networkKey = kwargs.pop('networkKey', 'tcpSettings') networkKey = kwargs.pop('networkKey', 'tcpSettings')
@@ -307,6 +312,7 @@ class GuiVTransportItemHostTcpOrRaw(GuiEditorItemTextInput):
class GuiVTransportItemPathTcpOrRaw(GuiEditorItemTextInput): class GuiVTransportItemPathTcpOrRaw(GuiEditorItemTextInput):
"""Represent GUI v transport item path TCP or raw.""" """Represent GUI v transport item path TCP or raw."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemPathTcpOrRaw.""" """Initialize the GuiVTransportItemPathTcpOrRaw."""
networkKey = kwargs.pop('networkKey', 'tcpSettings') networkKey = kwargs.pop('networkKey', 'tcpSettings')
@@ -372,6 +378,7 @@ class GuiVTransportItemPathTcpOrRaw(GuiEditorItemTextInput):
class GuiVTransportItemTypeKcp(GuiVTransportItemTypeXXX): class GuiVTransportItemTypeKcp(GuiVTransportItemTypeXXX):
"""Represent GUI v transport item type kcp.""" """Represent GUI v transport item type kcp."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemTypeKcp.""" """Initialize the GuiVTransportItemTypeKcp."""
networkKey = kwargs.pop('networkKey', 'kcpSettings') networkKey = kwargs.pop('networkKey', 'kcpSettings')
@@ -394,6 +401,7 @@ class GuiVTransportItemTypeKcp(GuiVTransportItemTypeXXX):
class GuiVTransportItemSeedKcp(GuiEditorItemTextInput): class GuiVTransportItemSeedKcp(GuiEditorItemTextInput):
"""Represent GUI v transport item seed kcp.""" """Represent GUI v transport item seed kcp."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemSeedKcp.""" """Initialize the GuiVTransportItemSeedKcp."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -449,6 +457,7 @@ class GuiVTransportItemSeedKcp(GuiEditorItemTextInput):
class GuiVTransportItemHostWs(GuiEditorItemTextInput): class GuiVTransportItemHostWs(GuiEditorItemTextInput):
"""Represent GUI v transport item host ws.""" """Represent GUI v transport item host ws."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemHostWs.""" """Initialize the GuiVTransportItemHostWs."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -507,6 +516,7 @@ class GuiVTransportItemHostWs(GuiEditorItemTextInput):
class GuiVTransportItemPathWs(GuiEditorItemTextInput): class GuiVTransportItemPathWs(GuiEditorItemTextInput):
"""Represent GUI v transport item path ws.""" """Represent GUI v transport item path ws."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemPathWs.""" """Initialize the GuiVTransportItemPathWs."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -562,6 +572,7 @@ class GuiVTransportItemPathWs(GuiEditorItemTextInput):
class GuiVTransportItemHostHttpUpgrade(GuiEditorItemTextInput): class GuiVTransportItemHostHttpUpgrade(GuiEditorItemTextInput):
"""Represent GUI v transport item host HTTP upgrade.""" """Represent GUI v transport item host HTTP upgrade."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemHostHttpUpgrade.""" """Initialize the GuiVTransportItemHostHttpUpgrade."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -619,6 +630,7 @@ class GuiVTransportItemHostHttpUpgrade(GuiEditorItemTextInput):
class GuiVTransportItemPathHttpUpgrade(GuiEditorItemTextInput): class GuiVTransportItemPathHttpUpgrade(GuiEditorItemTextInput):
"""Represent GUI v transport item path HTTP upgrade.""" """Represent GUI v transport item path HTTP upgrade."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemPathHttpUpgrade.""" """Initialize the GuiVTransportItemPathHttpUpgrade."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -676,6 +688,7 @@ class GuiVTransportItemPathHttpUpgrade(GuiEditorItemTextInput):
class GuiVTransportItemHostSplitHttp(GuiEditorItemTextInput): class GuiVTransportItemHostSplitHttp(GuiEditorItemTextInput):
"""Represent GUI v transport item host split HTTP.""" """Represent GUI v transport item host split HTTP."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemHostSplitHttp.""" """Initialize the GuiVTransportItemHostSplitHttp."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -733,6 +746,7 @@ class GuiVTransportItemHostSplitHttp(GuiEditorItemTextInput):
class GuiVTransportItemPathSplitHttp(GuiEditorItemTextInput): class GuiVTransportItemPathSplitHttp(GuiEditorItemTextInput):
"""Represent GUI v transport item path split HTTP.""" """Represent GUI v transport item path split HTTP."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemPathSplitHttp.""" """Initialize the GuiVTransportItemPathSplitHttp."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -790,6 +804,7 @@ class GuiVTransportItemPathSplitHttp(GuiEditorItemTextInput):
class GuiVTransportItemHostXHttp(GuiEditorItemTextInput): class GuiVTransportItemHostXHttp(GuiEditorItemTextInput):
"""Represent GUI v transport item host x HTTP.""" """Represent GUI v transport item host x HTTP."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemHostXHttp.""" """Initialize the GuiVTransportItemHostXHttp."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -845,6 +860,7 @@ class GuiVTransportItemHostXHttp(GuiEditorItemTextInput):
class GuiVTransportItemPathXHttp(GuiEditorItemTextInput): class GuiVTransportItemPathXHttp(GuiEditorItemTextInput):
"""Represent GUI v transport item path x HTTP.""" """Represent GUI v transport item path x HTTP."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemPathXHttp.""" """Initialize the GuiVTransportItemPathXHttp."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -900,6 +916,7 @@ class GuiVTransportItemPathXHttp(GuiEditorItemTextInput):
class GuiVTransportItemModeXHttp(GuiEditorItemTextComboBox): class GuiVTransportItemModeXHttp(GuiEditorItemTextComboBox):
"""Represent GUI v transport item mode x HTTP.""" """Represent GUI v transport item mode x HTTP."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemModeXHttp.""" """Initialize the GuiVTransportItemModeXHttp."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -964,6 +981,7 @@ class GuiVTransportItemModeXHttp(GuiEditorItemTextComboBox):
class GuiVTransportItemExtraXHttp(GuiEditorItemTextInput): class GuiVTransportItemExtraXHttp(GuiEditorItemTextInput):
"""Represent GUI v transport item extra x HTTP.""" """Represent GUI v transport item extra x HTTP."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemExtraXHttp.""" """Initialize the GuiVTransportItemExtraXHttp."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1030,6 +1048,7 @@ class GuiVTransportItemExtraXHttp(GuiEditorItemTextInput):
class GuiVTransportItemHostH2(GuiEditorItemTextInput): class GuiVTransportItemHostH2(GuiEditorItemTextInput):
"""Represent GUI v transport item host h2.""" """Represent GUI v transport item host h2."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemHostH2.""" """Initialize the GuiVTransportItemHostH2."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1085,6 +1104,7 @@ class GuiVTransportItemHostH2(GuiEditorItemTextInput):
class GuiVTransportItemPathH2(GuiEditorItemTextInput): class GuiVTransportItemPathH2(GuiEditorItemTextInput):
"""Represent GUI v transport item path h2.""" """Represent GUI v transport item path h2."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemPathH2.""" """Initialize the GuiVTransportItemPathH2."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1140,6 +1160,7 @@ class GuiVTransportItemPathH2(GuiEditorItemTextInput):
class GuiVTransportItemTypeQuic(GuiVTransportItemTypeXXX): class GuiVTransportItemTypeQuic(GuiVTransportItemTypeXXX):
"""Represent GUI v transport item type quic.""" """Represent GUI v transport item type quic."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemTypeQuic.""" """Initialize the GuiVTransportItemTypeQuic."""
networkKey = kwargs.pop('networkKey', 'quicSettings') networkKey = kwargs.pop('networkKey', 'quicSettings')
@@ -1161,6 +1182,7 @@ class GuiVTransportItemTypeQuic(GuiVTransportItemTypeXXX):
class GuiVTransportItemSecurityQuic(GuiEditorItemTextComboBox): class GuiVTransportItemSecurityQuic(GuiEditorItemTextComboBox):
"""Represent GUI v transport item security quic.""" """Represent GUI v transport item security quic."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemSecurityQuic.""" """Initialize the GuiVTransportItemSecurityQuic."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1222,6 +1244,7 @@ class GuiVTransportItemSecurityQuic(GuiEditorItemTextComboBox):
class GuiVTransportItemKeyQuic(GuiEditorItemTextInput): class GuiVTransportItemKeyQuic(GuiEditorItemTextInput):
"""Represent GUI v transport item key quic.""" """Represent GUI v transport item key quic."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemKeyQuic.""" """Initialize the GuiVTransportItemKeyQuic."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1277,6 +1300,7 @@ class GuiVTransportItemKeyQuic(GuiEditorItemTextInput):
class GuiVTransportItemModeGRPC(GuiEditorItemTextComboBox): class GuiVTransportItemModeGRPC(GuiEditorItemTextComboBox):
"""Represent GUI v transport item mode grpc.""" """Represent GUI v transport item mode grpc."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemModeGRPC.""" """Initialize the GuiVTransportItemModeGRPC."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1352,6 +1376,7 @@ class GuiVTransportItemModeGRPC(GuiEditorItemTextComboBox):
class GuiVTransportItemAuthorityGRPC(GuiEditorItemTextInput): class GuiVTransportItemAuthorityGRPC(GuiEditorItemTextInput):
"""Represent GUI v transport item authority grpc.""" """Represent GUI v transport item authority grpc."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemAuthorityGRPC.""" """Initialize the GuiVTransportItemAuthorityGRPC."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1407,6 +1432,7 @@ class GuiVTransportItemAuthorityGRPC(GuiEditorItemTextInput):
class GuiVTransportItemServiceNameGRPC(GuiEditorItemTextInput): class GuiVTransportItemServiceNameGRPC(GuiEditorItemTextInput):
"""Represent GUI v transport item service name grpc.""" """Represent GUI v transport item service name grpc."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemServiceNameGRPC.""" """Initialize the GuiVTransportItemServiceNameGRPC."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1462,6 +1488,7 @@ class GuiVTransportItemServiceNameGRPC(GuiEditorItemTextInput):
class GuiVTransportItemVersionHysteria(GuiEditorItemTextSpinBox): class GuiVTransportItemVersionHysteria(GuiEditorItemTextSpinBox):
"""Represent GUI v transport item version hysteria.""" """Represent GUI v transport item version hysteria."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemVersionHysteria.""" """Initialize the GuiVTransportItemVersionHysteria."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1509,6 +1536,7 @@ class GuiVTransportItemVersionHysteria(GuiEditorItemTextSpinBox):
class GuiVTransportItemAuthHysteria(GuiEditorItemTextInput): class GuiVTransportItemAuthHysteria(GuiEditorItemTextInput):
"""Represent GUI v transport item auth hysteria.""" """Represent GUI v transport item auth hysteria."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemAuthHysteria.""" """Initialize the GuiVTransportItemAuthHysteria."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1566,6 +1594,7 @@ class GuiVTransportItemAuthHysteria(GuiEditorItemTextInput):
class GuiVTransportItemPasswordHysteria(GuiEditorItemTextInput): class GuiVTransportItemPasswordHysteria(GuiEditorItemTextInput):
"""Represent GUI v transport item password hysteria.""" """Represent GUI v transport item password hysteria."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportItemPasswordHysteria.""" """Initialize the GuiVTransportItemPasswordHysteria."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1628,6 +1657,7 @@ class GuiVTransportItemPasswordHysteria(GuiEditorItemTextInput):
class GuiVTransportPageXXX(GuiEditorWidgetQWidget): class GuiVTransportPageXXX(GuiEditorWidgetQWidget):
"""Represent GUI v transport page xxx.""" """Represent GUI v transport page xxx."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportPageXXX.""" """Initialize the GuiVTransportPageXXX."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1649,6 +1679,7 @@ class GuiVTransportPageXXX(GuiEditorWidgetQWidget):
class GuiVTransportPageTcp(GuiVTransportPageXXX): class GuiVTransportPageTcp(GuiVTransportPageXXX):
"""Represent GUI v transport page TCP.""" """Represent GUI v transport page TCP."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportPageTcp.""" """Initialize the GuiVTransportPageTcp."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1672,6 +1703,7 @@ class GuiVTransportPageTcp(GuiVTransportPageXXX):
class GuiVTransportPageRaw(GuiVTransportPageXXX): class GuiVTransportPageRaw(GuiVTransportPageXXX):
"""Represent GUI v transport page raw.""" """Represent GUI v transport page raw."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportPageRaw.""" """Initialize the GuiVTransportPageRaw."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1695,6 +1727,7 @@ class GuiVTransportPageRaw(GuiVTransportPageXXX):
class GuiVTransportPageKcp(GuiVTransportPageXXX): class GuiVTransportPageKcp(GuiVTransportPageXXX):
"""Represent GUI v transport page kcp.""" """Represent GUI v transport page kcp."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportPageKcp.""" """Initialize the GuiVTransportPageKcp."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1711,6 +1744,7 @@ class GuiVTransportPageKcp(GuiVTransportPageXXX):
class GuiVTransportPageWs(GuiVTransportPageXXX): class GuiVTransportPageWs(GuiVTransportPageXXX):
"""Represent GUI v transport page ws.""" """Represent GUI v transport page ws."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportPageWs.""" """Initialize the GuiVTransportPageWs."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1727,6 +1761,7 @@ class GuiVTransportPageWs(GuiVTransportPageXXX):
class GuiVTransportPageHttpUpgrade(GuiVTransportPageXXX): class GuiVTransportPageHttpUpgrade(GuiVTransportPageXXX):
"""Represent GUI v transport page HTTP upgrade.""" """Represent GUI v transport page HTTP upgrade."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportPageHttpUpgrade.""" """Initialize the GuiVTransportPageHttpUpgrade."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1743,6 +1778,7 @@ class GuiVTransportPageHttpUpgrade(GuiVTransportPageXXX):
class GuiVTransportPageSplitHttp(GuiVTransportPageXXX): class GuiVTransportPageSplitHttp(GuiVTransportPageXXX):
"""Represent GUI v transport page split HTTP.""" """Represent GUI v transport page split HTTP."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportPageSplitHttp.""" """Initialize the GuiVTransportPageSplitHttp."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1759,6 +1795,7 @@ class GuiVTransportPageSplitHttp(GuiVTransportPageXXX):
class GuiVTransportPageXHttp(GuiVTransportPageXXX): class GuiVTransportPageXHttp(GuiVTransportPageXXX):
"""Represent GUI v transport page x HTTP.""" """Represent GUI v transport page x HTTP."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportPageXHttp.""" """Initialize the GuiVTransportPageXHttp."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1777,6 +1814,7 @@ class GuiVTransportPageXHttp(GuiVTransportPageXXX):
class GuiVTransportPageH2(GuiVTransportPageXXX): class GuiVTransportPageH2(GuiVTransportPageXXX):
"""Represent GUI v transport page h2.""" """Represent GUI v transport page h2."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportPageH2.""" """Initialize the GuiVTransportPageH2."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1793,6 +1831,7 @@ class GuiVTransportPageH2(GuiVTransportPageXXX):
class GuiVTransportPageQuic(GuiVTransportPageXXX): class GuiVTransportPageQuic(GuiVTransportPageXXX):
"""Represent GUI v transport page quic.""" """Represent GUI v transport page quic."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportPageQuic.""" """Initialize the GuiVTransportPageQuic."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1810,6 +1849,7 @@ class GuiVTransportPageQuic(GuiVTransportPageXXX):
class GuiVTransportPageGRPC(GuiVTransportPageXXX): class GuiVTransportPageGRPC(GuiVTransportPageXXX):
"""Represent GUI v transport page grpc.""" """Represent GUI v transport page grpc."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportPageGRPC.""" """Initialize the GuiVTransportPageGRPC."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1829,6 +1869,7 @@ class GuiVTransportPageGRPC(GuiVTransportPageXXX):
class GuiVTransportPageHysteria(GuiVTransportPageXXX): class GuiVTransportPageHysteria(GuiVTransportPageXXX):
"""Represent GUI v transport page hysteria.""" """Represent GUI v transport page hysteria."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportPageHysteria.""" """Initialize the GuiVTransportPageHysteria."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1846,6 +1887,7 @@ class GuiVTransportPageHysteria(GuiVTransportPageXXX):
class GuiVTransportPageStackedWidget(QStackedWidget): class GuiVTransportPageStackedWidget(QStackedWidget):
"""Provide the GUI v transport page stacked widget.""" """Provide the GUI v transport page stacked widget."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the GuiVTransportPageStackedWidget.""" """Initialize the GuiVTransportPageStackedWidget."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -1882,6 +1924,7 @@ class GuiVTransportPageStackedWidget(QStackedWidget):
class GuiVTransportQGroupBox(GuiEditorItemFactory, AppQGroupBox): class GuiVTransportQGroupBox(GuiEditorItemFactory, AppQGroupBox):
"""Group the GUI v transport q editor controls.""" """Group the GUI v transport q editor controls."""
def __init__(self, **kwargs): def __init__(self, **kwargs):
"""Initialize the GuiVTransportQGroupBox.""" """Initialize the GuiVTransportQGroupBox."""
super().__init__(_('Transport'), **kwargs) super().__init__(_('Transport'), **kwargs)
+1
View File
@@ -30,6 +30,7 @@ __all__ = ['IndentSpinBox']
class IndentSpinBox(AppQDialog): class IndentSpinBox(AppQDialog):
"""Represent indent spin box.""" """Represent indent spin box."""
def __init__(self, parent=None): def __init__(self, parent=None):
"""Initialize the IndentSpinBox.""" """Initialize the IndentSpinBox."""
super().__init__(parent) super().__init__(parent)
+2
View File
@@ -48,6 +48,7 @@ class SystemTrayIcon(
QSystemTrayIcon, QSystemTrayIcon,
): ):
"""Represent system tray icon.""" """Represent system tray icon."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the SystemTrayIcon.""" """Initialize the SystemTrayIcon."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -146,6 +147,7 @@ class SystemTrayIcon(
def setMonochromeIconByTheme(self, theme): def setMonochromeIconByTheme(self, theme):
"""Set monochrome icon by theme.""" """Set monochrome icon by theme."""
def switchMonochrome(): def switchMonochrome():
"""Handle switch monochrome for the system tray icon.""" """Handle switch monochrome for the system tray icon."""
if theme == 'Dark': if theme == 'Dark':
+15
View File
@@ -77,6 +77,7 @@ def appIsExiting() -> bool:
class MBoxUpdateSubsInfo(AppQMessageBox): class MBoxUpdateSubsInfo(AppQMessageBox):
"""Represent m box update subs info.""" """Represent m box update subs info."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the MBoxUpdateSubsInfo.""" """Initialize the MBoxUpdateSubsInfo."""
self.successArgs = kwargs.pop('successArgs', list()) self.successArgs = kwargs.pop('successArgs', list())
@@ -147,6 +148,7 @@ class MBoxUpdateSubsInfo(AppQMessageBox):
class SubscriptionManager(WebGETManager): class SubscriptionManager(WebGETManager):
"""Coordinate subscription operations.""" """Coordinate subscription operations."""
def __init__(self, parent, **kwargs): def __init__(self, parent, **kwargs):
"""Initialize the SubscriptionManager.""" """Initialize the SubscriptionManager."""
actionMessage = kwargs.pop('actionMessage', 'update subs') actionMessage = kwargs.pop('actionMessage', 'update subs')
@@ -353,6 +355,7 @@ class SubscriptionManager(WebGETManager):
class TestPingLatencyWorker(QtCore.QObject, QtCore.QRunnable): class TestPingLatencyWorker(QtCore.QObject, QtCore.QRunnable):
"""Run test ping latency work in the background.""" """Run test ping latency work in the background."""
finished = QtCore.Signal() finished = QtCore.Signal()
def __init__(self, factory: ConfigFactory): def __init__(self, factory: ConfigFactory):
@@ -401,6 +404,7 @@ class TestPingLatencyWorker(QtCore.QObject, QtCore.QRunnable):
class TestTcpingLatencyWorker(QtCore.QObject, QtCore.QRunnable): class TestTcpingLatencyWorker(QtCore.QObject, QtCore.QRunnable):
"""Run test tcping latency work in the background.""" """Run test tcping latency work in the background."""
finished = QtCore.Signal() finished = QtCore.Signal()
def __init__(self, factory: ConfigFactory): def __init__(self, factory: ConfigFactory):
@@ -446,6 +450,7 @@ class TestTcpingLatencyWorker(QtCore.QObject, QtCore.QRunnable):
class TestDownloadSpeedWorker(WebGETManager): class TestDownloadSpeedWorker(WebGETManager):
"""Run test download speed work in the background.""" """Run test download speed work in the background."""
progressed = QtCore.Signal() progressed = QtCore.Signal()
finished = QtCore.Signal(object) finished = QtCore.Signal(object)
@@ -739,6 +744,7 @@ class TestDownloadSpeedWorker(WebGETManager):
class DownloadSpeedTestJob: class DownloadSpeedTestJob:
"""Represent download speed test job.""" """Represent download speed test job."""
def __init__( def __init__(
self, self,
index: int, index: int,
@@ -757,6 +763,7 @@ class DownloadSpeedTestJob:
class DownloadSpeedTestScheduler(QtCore.QObject): class DownloadSpeedTestScheduler(QtCore.QObject):
"""Schedule and coordinate download speed test jobs.""" """Schedule and coordinate download speed test jobs."""
SinglePort = 20809 SinglePort = 20809
MultiPortStart = 30000 MultiPortStart = 30000
MultiPortStop = 40000 MultiPortStop = 40000
@@ -908,6 +915,7 @@ class DownloadSpeedTestScheduler(QtCore.QObject):
class DeleteServersProgressDialog(AppQDialog): class DeleteServersProgressDialog(AppQDialog):
"""Present progress and cancellation controls for delete servers.""" """Present progress and cancellation controls for delete servers."""
def __init__(self, table, indexes, showTrayMessage=True, parent=None): def __init__(self, table, indexes, showTrayMessage=True, parent=None):
"""Initialize the DeleteServersProgressDialog.""" """Initialize the DeleteServersProgressDialog."""
super().__init__(parent) super().__init__(parent)
@@ -1082,6 +1090,7 @@ class DeleteServersProgressDialog(AppQDialog):
class UserServersQTableViewHorizontalHeader(AppQHeaderView): class UserServersQTableViewHorizontalHeader(AppQHeaderView):
"""Provide the user servers Qt table view horizontal table header.""" """Provide the user servers Qt table view horizontal table header."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the UserServersQTableViewHorizontalHeader.""" """Initialize the UserServersQTableViewHorizontalHeader."""
super().__init__(QtCore.Qt.Orientation.Horizontal, *args, **kwargs) super().__init__(QtCore.Qt.Orientation.Horizontal, *args, **kwargs)
@@ -1089,6 +1098,7 @@ class UserServersQTableViewHorizontalHeader(AppQHeaderView):
class UserServersQTableViewVerticalHeader(AppQHeaderView): class UserServersQTableViewVerticalHeader(AppQHeaderView):
"""Provide the user servers Qt table view vertical table header.""" """Provide the user servers Qt table view vertical table header."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the UserServersQTableViewVerticalHeader.""" """Initialize the UserServersQTableViewVerticalHeader."""
super().__init__(QtCore.Qt.Orientation.Vertical, *args, **kwargs) super().__init__(QtCore.Qt.Orientation.Vertical, *args, **kwargs)
@@ -1096,6 +1106,7 @@ class UserServersQTableViewVerticalHeader(AppQHeaderView):
class UserServersQTableViewHeaders: class UserServersQTableViewHeaders:
"""Describe and render user servers Qt table view table columns.""" """Describe and render user servers Qt table view table columns."""
def __init__(self, name: str, func: Callable[[ConfigFactory], str] = None): def __init__(self, name: str, func: Callable[[ConfigFactory], str] = None):
"""Initialize the UserServersQTableViewHeaders.""" """Initialize the UserServersQTableViewHeaders."""
self.name = name self.name = name
@@ -1119,6 +1130,7 @@ class UserServersQTableViewHeaders:
class UserServersTableModel(QtCore.QAbstractTableModel): class UserServersTableModel(QtCore.QAbstractTableModel):
"""Expose user servers table data through a Qt item model.""" """Expose user servers table data through a Qt item model."""
SortRole = QtCore.Qt.ItemDataRole.UserRole + 1 SortRole = QtCore.Qt.ItemDataRole.UserRole + 1
def __init__(self, headers: list[UserServersQTableViewHeaders], parent=None): def __init__(self, headers: list[UserServersQTableViewHeaders], parent=None):
@@ -1318,6 +1330,7 @@ class UserServersTableModel(QtCore.QAbstractTableModel):
class UserServersSortFilterProxyModel(QtCore.QSortFilterProxyModel): class UserServersSortFilterProxyModel(QtCore.QSortFilterProxyModel):
"""Filter and sort user servers sort filter data.""" """Filter and sort user servers sort filter data."""
def __init__(self, parent=None): def __init__(self, parent=None):
"""Initialize the UserServersSortFilterProxyModel.""" """Initialize the UserServersSortFilterProxyModel."""
super().__init__(parent) super().__init__(parent)
@@ -1443,6 +1456,7 @@ class UserServersQTableView(
AppQTableView, AppQTableView,
): ):
"""Represent user servers Qt table view.""" """Represent user servers Qt table view."""
RowHeight = 42 RowHeight = 42
Headers = [ Headers = [
@@ -2140,6 +2154,7 @@ class UserServersQTableView(
def swapItem(self, index0: int, index1: int): def swapItem(self, index0: int, index1: int):
"""Handle swap item for the user servers Qt table view.""" """Handle swap item for the user servers Qt table view."""
def swapSequenceItem(sequence: MutableSequence, param0: int, param1: int): def swapSequenceItem(sequence: MutableSequence, param0: int, param1: int):
"""Handle swap sequence item for the user servers Qt table view.""" """Handle swap sequence item for the user servers Qt table view."""
swap = sequence[param0] swap = sequence[param0]
+6
View File
@@ -44,6 +44,7 @@ registerAppSettings('UserSubsHeaderViewState')
class UserSubsQTableViewHorizontalHeader(AppQHeaderView): class UserSubsQTableViewHorizontalHeader(AppQHeaderView):
"""Provide the user subs Qt table view horizontal table header.""" """Provide the user subs Qt table view horizontal table header."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the UserSubsQTableViewHorizontalHeader.""" """Initialize the UserSubsQTableViewHorizontalHeader."""
super().__init__(QtCore.Qt.Orientation.Horizontal, *args, **kwargs) super().__init__(QtCore.Qt.Orientation.Horizontal, *args, **kwargs)
@@ -51,6 +52,7 @@ class UserSubsQTableViewHorizontalHeader(AppQHeaderView):
class UserSubsQTableViewVerticalHeader(AppQHeaderView): class UserSubsQTableViewVerticalHeader(AppQHeaderView):
"""Provide the user subs Qt table view vertical table header.""" """Provide the user subs Qt table view vertical table header."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the UserSubsQTableViewVerticalHeader.""" """Initialize the UserSubsQTableViewVerticalHeader."""
super().__init__(QtCore.Qt.Orientation.Vertical, *args, **kwargs) super().__init__(QtCore.Qt.Orientation.Vertical, *args, **kwargs)
@@ -58,6 +60,7 @@ class UserSubsQTableViewVerticalHeader(AppQHeaderView):
class UserSubsQTableViewHeaders: class UserSubsQTableViewHeaders:
"""Describe and render user subs Qt table view table columns.""" """Describe and render user subs Qt table view table columns."""
def __init__(self, name: str, func: Callable[[dict], str] = None): def __init__(self, name: str, func: Callable[[dict], str] = None):
"""Initialize the UserSubsQTableViewHeaders.""" """Initialize the UserSubsQTableViewHeaders."""
self.name = name self.name = name
@@ -81,6 +84,7 @@ class UserSubsQTableViewHeaders:
class UserSubsAppQComboBox(AppQComboBox): class UserSubsAppQComboBox(AppQComboBox):
"""Represent user subs app q combo box.""" """Represent user subs app q combo box."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the UserSubsAppQComboBox.""" """Initialize the UserSubsAppQComboBox."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -94,6 +98,7 @@ class UserSubsAppQComboBox(AppQComboBox):
class UserSubsTableModel(QtCore.QAbstractTableModel): class UserSubsTableModel(QtCore.QAbstractTableModel):
"""Expose user subs table data through a Qt item model.""" """Expose user subs table data through a Qt item model."""
def __init__( def __init__(
self, self,
headers: list[UserSubsQTableViewHeaders], headers: list[UserSubsQTableViewHeaders],
@@ -268,6 +273,7 @@ _TRANSLATABLE_HEADERS = [
class UserSubsQTableView(Mixins.QTranslatable, AppQTableView): class UserSubsQTableView(Mixins.QTranslatable, AppQTableView):
"""Represent user subs Qt table view.""" """Represent user subs Qt table view."""
RowHeight = 42 RowHeight = 42
AutoUpdateOptions = { AutoUpdateOptions = {
@@ -40,6 +40,7 @@ logger = logging.getLogger(__name__)
class MBoxAssetExists(AppQMessageBox): class MBoxAssetExists(AppQMessageBox):
"""Represent m box asset exists.""" """Represent m box asset exists."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the MBoxAssetExists.""" """Initialize the MBoxAssetExists."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -60,6 +61,7 @@ class MBoxAssetExists(AppQMessageBox):
class XrayAssetViewerQListWidget(Mixins.ThemeAware, AppQListWidget): class XrayAssetViewerQListWidget(Mixins.ThemeAware, AppQListWidget):
"""Provide the Xray asset viewer Qt list widget.""" """Provide the Xray asset viewer Qt list widget."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the XrayAssetViewerQListWidget.""" """Initialize the XrayAssetViewerQListWidget."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -161,6 +163,7 @@ class XrayAssetViewerQListWidget(Mixins.ThemeAware, AppQListWidget):
def appendNewItem(self, filename: str): def appendNewItem(self, filename: str):
"""Append new item.""" """Append new item."""
def append(_filename): def append(_filename):
"""Append the Xray asset viewer Qt list widget.""" """Append the Xray asset viewer Qt list widget."""
try: try:
+5
View File
@@ -54,6 +54,7 @@ registerAppSettings('AppMainWindowState')
class AppNetworkConnectivityManager(NetworkConnectivityManager): class AppNetworkConnectivityManager(NetworkConnectivityManager):
"""Coordinate app network connectivity operations.""" """Coordinate app network connectivity operations."""
def __init__(self, parent=None): def __init__(self, parent=None):
"""Initialize the AppNetworkConnectivityManager.""" """Initialize the AppNetworkConnectivityManager."""
super().__init__(parent) super().__init__(parent)
@@ -110,6 +111,7 @@ class AppNetworkConnectivityManager(NetworkConnectivityManager):
class NetworkStateBadge(Mixins.QTranslatable, Mixins.ThemeAware, QWidget): class NetworkStateBadge(Mixins.QTranslatable, Mixins.ThemeAware, QWidget):
"""Provide the network state badge widget.""" """Provide the network state badge widget."""
DefaultIconFileName = 'reception-4.svg' DefaultIconFileName = 'reception-4.svg'
StateIconFileName = { StateIconFileName = {
'success': 'reception-4.svg', 'success': 'reception-4.svg',
@@ -229,6 +231,7 @@ class NetworkStateBadge(Mixins.QTranslatable, Mixins.ThemeAware, QWidget):
class SearchButton(AppQPushButton): class SearchButton(AppQPushButton):
"""Represent search button.""" """Represent search button."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the SearchButton.""" """Initialize the SearchButton."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -248,6 +251,7 @@ class SearchButton(AppQPushButton):
class AppMainWindow(AppQMainWindow): class AppMainWindow(AppQMainWindow):
"""Present the app main window.""" """Present the app main window."""
DEFAULT_WINDOW_SIZE_DARWIN = QtCore.QSize(1500, 780) DEFAULT_WINDOW_SIZE_DARWIN = QtCore.QSize(1500, 780)
DEFAULT_WINDOW_SIZE = ( DEFAULT_WINDOW_SIZE = (
QtCore.QSize(1800, 960) if PLATFORM != 'Darwin' else DEFAULT_WINDOW_SIZE_DARWIN QtCore.QSize(1800, 960) if PLATFORM != 'Darwin' else DEFAULT_WINDOW_SIZE_DARWIN
@@ -661,6 +665,7 @@ class AppMainWindow(AppQMainWindow):
def getGuiTUNSettings(self, **kwargs): def getGuiTUNSettings(self, **kwargs):
"""Return GUI TUN settings.""" """Return GUI TUN settings."""
@functools.lru_cache(None) @functools.lru_cache(None)
def cachedGuiTUNSettings(): def cachedGuiTUNSettings():
"""Return the cached GUI TUN settings value used by the app main window.""" """Return the cached GUI TUN settings value used by the app main window."""
+2
View File
@@ -30,6 +30,7 @@ __all__ = ['LogViewerWindow']
class MBoxSaveError(AppQMessageBox): class MBoxSaveError(AppQMessageBox):
"""Represent m box save error.""" """Represent m box save error."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the MBoxSaveError.""" """Initialize the MBoxSaveError."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -77,6 +78,7 @@ def saveAsFile(content: str):
class LogViewerWindow(AppQMainWindow): class LogViewerWindow(AppQMainWindow):
"""Present the log viewer window.""" """Present the log viewer window."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the LogViewerWindow.""" """Initialize the LogViewerWindow."""
tabTitle = kwargs.pop('tabTitle', '') tabTitle = kwargs.pop('tabTitle', '')
+1
View File
@@ -36,6 +36,7 @@ __all__ = ['QRCodeWindow']
class QRCodeWindow(AppQMainWindow): class QRCodeWindow(AppQMainWindow):
"""Present the QR code window.""" """Present the QR code window."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the QRCodeWindow.""" """Initialize the QRCodeWindow."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
+4
View File
@@ -38,6 +38,7 @@ registerAppSettings('ServerWidgetPointSize')
class MBoxQuestionSave(AppQMessageBox): class MBoxQuestionSave(AppQMessageBox):
"""Represent m box question save.""" """Represent m box question save."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the MBoxQuestionSave.""" """Initialize the MBoxQuestionSave."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -56,6 +57,7 @@ class MBoxQuestionSave(AppQMessageBox):
class MBoxJSONDecodeError(AppQMessageBox): class MBoxJSONDecodeError(AppQMessageBox):
"""Represent m box JSON decode error.""" """Represent m box JSON decode error."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the MBoxJSONDecodeError.""" """Initialize the MBoxJSONDecodeError."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -81,6 +83,7 @@ class MBoxJSONDecodeError(AppQMessageBox):
class TextEditorWindow(AppQMainWindow): class TextEditorWindow(AppQMainWindow):
"""Present the text editor window.""" """Present the text editor window."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the TextEditorWindow.""" """Initialize the TextEditorWindow."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -335,6 +338,7 @@ class TextEditorWindow(AppQMainWindow):
def setIndent(self): def setIndent(self):
"""Set indent.""" """Set indent."""
def handleResultCode(_indentSpinBox, code): def handleResultCode(_indentSpinBox, code):
"""Handle result code.""" """Handle result code."""
if code == PySide6Legacy.enumValueWrapper(AppQDialog.DialogCode.Accepted): if code == PySide6Legacy.enumValueWrapper(AppQDialog.DialogCode.Accepted):
+13
View File
@@ -125,6 +125,7 @@ def routingObjectFromProfile(routingProfile: dict):
class RoutingPreviewDialog(AppQDialog): class RoutingPreviewDialog(AppQDialog):
"""Present the routing preview dialog.""" """Present the routing preview dialog."""
def __init__(self, routingProfile: dict, parent=None): def __init__(self, routingProfile: dict, parent=None):
"""Initialize the RoutingPreviewDialog.""" """Initialize the RoutingPreviewDialog."""
super().__init__(parent) super().__init__(parent)
@@ -167,6 +168,7 @@ class RoutingPreviewDialog(AppQDialog):
class RoutingTextEditDialog(AppQDialog): class RoutingTextEditDialog(AppQDialog):
"""Present the routing text edit dialog.""" """Present the routing text edit dialog."""
def __init__(self, text='', parent=None): def __init__(self, text='', parent=None):
"""Initialize the RoutingTextEditDialog.""" """Initialize the RoutingTextEditDialog."""
super().__init__(parent) super().__init__(parent)
@@ -202,6 +204,7 @@ class RoutingTextEditDialog(AppQDialog):
class RoutingTextEdit(Mixins.QTranslatable, QTextEdit): class RoutingTextEdit(Mixins.QTranslatable, QTextEdit):
"""Represent routing text edit.""" """Represent routing text edit."""
def __init__(self, text='', parent=None): def __init__(self, text='', parent=None):
"""Initialize the RoutingTextEdit.""" """Initialize the RoutingTextEdit."""
super().__init__(text, parent) super().__init__(text, parent)
@@ -229,6 +232,7 @@ class RoutingTextEdit(Mixins.QTranslatable, QTextEdit):
class RoutingDocumentationURL(AppQLabel): class RoutingDocumentationURL(AppQLabel):
"""Represent routing documentation URL.""" """Represent routing documentation URL."""
URL = 'https://xtls.github.io/config/routing.html' URL = 'https://xtls.github.io/config/routing.html'
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
@@ -263,6 +267,7 @@ class RoutingDocumentationURL(AppQLabel):
class RoutingProfilesModel(QtCore.QAbstractTableModel): class RoutingProfilesModel(QtCore.QAbstractTableModel):
"""Expose routing profiles data through a Qt item model.""" """Expose routing profiles data through a Qt item model."""
Headers = ['Remark', 'Domain Strategy', 'State'] Headers = ['Remark', 'Domain Strategy', 'State']
def rowCount(self, parent=QtCore.QModelIndex()) -> int: def rowCount(self, parent=QtCore.QModelIndex()) -> int:
@@ -353,6 +358,7 @@ class RoutingProfilesModel(QtCore.QAbstractTableModel):
class RoutingRuleEditDialog(AppQDialog): class RoutingRuleEditDialog(AppQDialog):
"""Present the routing rule edit dialog.""" """Present the routing rule edit dialog."""
MatchInputHeight = 72 MatchInputHeight = 72
ShortInputWidth = 240 ShortInputWidth = 240
@@ -581,6 +587,7 @@ class RoutingRuleEditDialog(AppQDialog):
class RoutingRemarkEditDialog(AppQDialog): class RoutingRemarkEditDialog(AppQDialog):
"""Present the routing remark edit dialog.""" """Present the routing remark edit dialog."""
def __init__(self, remark: str, parent=None): def __init__(self, remark: str, parent=None):
"""Initialize the RoutingRemarkEditDialog.""" """Initialize the RoutingRemarkEditDialog."""
super().__init__(parent) super().__init__(parent)
@@ -616,6 +623,7 @@ class RoutingRemarkEditDialog(AppQDialog):
class RoutingProfileEditDialog(AppQDialog): class RoutingProfileEditDialog(AppQDialog):
"""Present the routing profile edit dialog.""" """Present the routing profile edit dialog."""
def __init__(self, parent=None): def __init__(self, parent=None):
"""Initialize the RoutingProfileEditDialog.""" """Initialize the RoutingProfileEditDialog."""
super().__init__(parent) super().__init__(parent)
@@ -669,6 +677,7 @@ class RoutingProfileEditDialog(AppQDialog):
class RoutingRulesQListWidget(AppQListWidget): class RoutingRulesQListWidget(AppQListWidget):
"""Provide the routing rules Qt list widget.""" """Provide the routing rules Qt list widget."""
editRequested, deleteRequested = ( editRequested, deleteRequested = (
QtCore.Signal(), QtCore.Signal(),
QtCore.Signal(), QtCore.Signal(),
@@ -761,6 +770,7 @@ class RoutingRulesQListWidget(AppQListWidget):
class RoutingRulesDialog(AppQDialog): class RoutingRulesDialog(AppQDialog):
"""Present the routing rules dialog.""" """Present the routing rules dialog."""
def __init__(self, routing: dict, parent=None): def __init__(self, routing: dict, parent=None):
"""Initialize the RoutingRulesDialog.""" """Initialize the RoutingRulesDialog."""
super().__init__(parent) super().__init__(parent)
@@ -879,6 +889,7 @@ class RoutingRulesDialog(AppQDialog):
class UserRoutingQTableViewHorizontalHeader(AppQHeaderView): class UserRoutingQTableViewHorizontalHeader(AppQHeaderView):
"""Provide the user routing Qt table view horizontal table header.""" """Provide the user routing Qt table view horizontal table header."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the UserRoutingQTableViewHorizontalHeader.""" """Initialize the UserRoutingQTableViewHorizontalHeader."""
super().__init__(QtCore.Qt.Orientation.Horizontal, *args, **kwargs) super().__init__(QtCore.Qt.Orientation.Horizontal, *args, **kwargs)
@@ -886,6 +897,7 @@ class UserRoutingQTableViewHorizontalHeader(AppQHeaderView):
class UserRoutingTableView(Mixins.QTranslatable, AppQTableView): class UserRoutingTableView(Mixins.QTranslatable, AppQTableView):
"""Represent user routing table view.""" """Represent user routing table view."""
RowHeight = 42 RowHeight = 42
def __init__(self, parent=None): def __init__(self, parent=None):
@@ -1176,6 +1188,7 @@ class UserRoutingTableView(Mixins.QTranslatable, AppQTableView):
class UserRoutingWindow(AppQMainWindow): class UserRoutingWindow(AppQMainWindow):
"""Present the user routing window.""" """Present the user routing window."""
DEFAULT_WINDOW_SIZE = QtCore.QSize(980, 560) DEFAULT_WINDOW_SIZE = QtCore.QSize(980, 560)
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
+3
View File
@@ -40,6 +40,7 @@ registerAppSettings('UserSubsWindowState')
class AddSubsDialog(AppQDialog): class AddSubsDialog(AppQDialog):
"""Present the add subs dialog.""" """Present the add subs dialog."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the AddSubsDialog.""" """Initialize the AddSubsDialog."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -85,6 +86,7 @@ class AddSubsDialog(AppQDialog):
class UserSubsWindow(AppQMainWindow): class UserSubsWindow(AppQMainWindow):
"""Present the user subs window.""" """Present the user subs window."""
DEFAULT_WINDOW_SIZE = QtCore.QSize(1120, 600) DEFAULT_WINDOW_SIZE = QtCore.QSize(1120, 600)
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
@@ -126,6 +128,7 @@ class UserSubsWindow(AppQMainWindow):
def addSubs(self): def addSubs(self):
"""Add subs.""" """Add subs."""
def handleResultCode(_addSubsDialog, code): def handleResultCode(_addSubsDialog, code):
"""Handle result code.""" """Handle result code."""
if code == PySide6Legacy.enumValueWrapper(AppQDialog.DialogCode.Accepted): if code == PySide6Legacy.enumValueWrapper(AppQDialog.DialogCode.Accepted):
+1
View File
@@ -36,6 +36,7 @@ logger = logging.getLogger(__name__)
class XrayAssetViewerWindow(AppQMainWindow): class XrayAssetViewerWindow(AppQMainWindow):
"""Present the Xray asset viewer window.""" """Present the Xray asset viewer window."""
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Initialize the XrayAssetViewerWindow.""" """Initialize the XrayAssetViewerWindow."""
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
-1
View File
@@ -17,6 +17,5 @@
from Furious.__main__ import main from Furious.__main__ import main
if __name__ == '__main__': if __name__ == '__main__':
main() main()