19 lines
No EOL
475 B
Python
19 lines
No EOL
475 B
Python
from dataclasses import dataclass
|
|
from dataclasses_json import dataclass_json
|
|
|
|
|
|
@dataclass_json
|
|
@dataclass
|
|
class BaseConnection:
|
|
code: str
|
|
|
|
def needs_wireguard_configuration(self):
|
|
return self.code == 'wireguard'
|
|
|
|
def is_session_connection(self):
|
|
return type(self).__name__ == 'SessionConnection'
|
|
|
|
def is_system_connection(self):
|
|
return type(self).__name__ == 'SystemConnection'
|
|
def needs_operator_proxy(self):
|
|
return False |