Template
Remove 3x-ui integration from the panel.
Drop API sync, multi-panel registry, and UI/protocol paths; keep DB columns only for compatibility with existing installs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+1
-1
@@ -81,7 +81,7 @@ CREATE TABLE IF NOT EXISTS invite_links (
|
||||
max_uses INTEGER NOT NULL DEFAULT 1,
|
||||
used_count INTEGER NOT NULL DEFAULT 0,
|
||||
user_id UUID,
|
||||
protocol TEXT NOT NULL DEFAULT 'xui',
|
||||
protocol TEXT NOT NULL DEFAULT 'awg',
|
||||
server_id INTEGER NOT NULL DEFAULT 0,
|
||||
xui_inbound_id INTEGER NOT NULL DEFAULT 0,
|
||||
xui_panel_id TEXT NOT NULL DEFAULT '',
|
||||
|
||||
+3
-23
@@ -35,29 +35,15 @@ DEFAULT_SETTINGS = {
|
||||
'remnawave_create_conns': False,
|
||||
'remnawave_server_id': 0,
|
||||
'remnawave_protocol': 'awg',
|
||||
'xui_sync': False,
|
||||
'xui_url': '',
|
||||
'xui_username': '',
|
||||
'xui_password': '',
|
||||
'xui_api_token': '',
|
||||
'xui_sync_users': False,
|
||||
'xui_create_conns': False,
|
||||
'xui_server_id': 0,
|
||||
'xui_protocol': 'xray',
|
||||
'xui_inbound_id': 0,
|
||||
'xui_sub_url': '',
|
||||
},
|
||||
'xui_servers': [],
|
||||
'guest': {
|
||||
'enabled': False,
|
||||
'token': '',
|
||||
'password_hash': None,
|
||||
'user_id': '',
|
||||
'allow_create': False,
|
||||
'create_protocol': 'xui',
|
||||
'create_protocol': 'awg',
|
||||
'create_server_id': 0,
|
||||
'create_inbound_id': 0,
|
||||
'create_xui_panel_id': '',
|
||||
},
|
||||
}
|
||||
|
||||
@@ -105,12 +91,6 @@ def _merge_settings(raw: Optional[dict]) -> dict:
|
||||
for key, value in raw.items():
|
||||
if key not in settings:
|
||||
settings[key] = value
|
||||
# Multi 3x-ui panels: migrate legacy sync.xui_* if needed
|
||||
try:
|
||||
from managers.xui_servers import ensure_xui_servers
|
||||
ensure_xui_servers(settings)
|
||||
except Exception:
|
||||
settings.setdefault('xui_servers', [])
|
||||
return settings
|
||||
|
||||
|
||||
@@ -214,7 +194,7 @@ def _row_to_invite(row) -> dict:
|
||||
'max_uses': int(row['max_uses'] or 0),
|
||||
'used_count': int(row['used_count'] or 0),
|
||||
'user_id': str(row['user_id']) if row['user_id'] else '',
|
||||
'protocol': row['protocol'] or 'xui',
|
||||
'protocol': row['protocol'] or 'awg',
|
||||
'server_id': int(row['server_id'] or 0),
|
||||
'xui_inbound_id': int(row['xui_inbound_id'] or 0),
|
||||
'xui_panel_id': (row.get('xui_panel_id') or '') if hasattr(row, 'get') else '',
|
||||
@@ -415,7 +395,7 @@ def save_data(data: dict) -> None:
|
||||
int(link.get('max_uses') or 0),
|
||||
int(link.get('used_count') or 0),
|
||||
_as_uuid(uid) if uid else None,
|
||||
link.get('protocol') or 'xui',
|
||||
link.get('protocol') or 'awg',
|
||||
int(link.get('server_id') or 0),
|
||||
int(link.get('xui_inbound_id') or 0),
|
||||
link.get('xui_panel_id') or '',
|
||||
|
||||
Reference in New Issue
Block a user