add init_paths to handle sys.path setup for importing shared modules like paths.py

This commit is contained in:
Whispering Wind
2025-04-24 20:23:31 +03:30
committed by GitHub
parent ff194d0098
commit 748d0bf2bd
6 changed files with 40 additions and 16 deletions

View File

@ -6,8 +6,9 @@ import sys
import os
from hysteria2_api import Hysteria2Client, Hysteria2Error
CONFIG_FILE = '/etc/hysteria/config.json'
API_BASE_URL = 'http://127.0.0.1:25413'
from init_paths import *
from paths import *
def get_api_secret(config_path: str) -> str:
if not os.path.exists(config_path):