Fix Path
This commit is contained in:
@ -6,16 +6,8 @@ import argparse
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import re
|
import re
|
||||||
from ipaddress import ip_address
|
from ipaddress import ip_address
|
||||||
|
from init_paths import *
|
||||||
core_scripts_dir = Path(__file__).resolve().parents[1]
|
|
||||||
if str(core_scripts_dir) not in sys.path:
|
|
||||||
sys.path.append(str(core_scripts_dir))
|
|
||||||
|
|
||||||
try:
|
|
||||||
from paths import NODES_JSON_PATH
|
from paths import NODES_JSON_PATH
|
||||||
except ImportError:
|
|
||||||
NODES_JSON_PATH = Path("/etc/hysteria/nodes.json")
|
|
||||||
|
|
||||||
|
|
||||||
def is_valid_ip_or_domain(value: str) -> bool:
|
def is_valid_ip_or_domain(value: str) -> bool:
|
||||||
"""Check if the value is a valid IP address or domain name."""
|
"""Check if the value is a valid IP address or domain name."""
|
||||||
|
|||||||
Reference in New Issue
Block a user