feat: ds
This commit is contained in:
@@ -22,6 +22,9 @@ PROJECT_ROOT = BUILDER_ROOT.parent
|
||||
DEFAULT_SOURCE = BUILDER_ROOT / "source"
|
||||
DEFAULT_DEST = PROJECT_ROOT / "public" / "next-chain"
|
||||
SKIP_SUFFIX = {".png", ".jpg", ".jpeg", ".gif", ".webp", ".ico", ".dylib", ".bin"}
|
||||
# Checked into source/config.js; must be rewritten when --origin is not the lab box.
|
||||
TEMPLATE_HOST = "192.168.31.130"
|
||||
TEMPLATE_PORT = 8000
|
||||
|
||||
|
||||
def replacements(ip: str, port: int, origin: str) -> list[tuple[str, str]]:
|
||||
@@ -35,6 +38,12 @@ def replacements(ip: str, port: int, origin: str) -> list[tuple[str, str]]:
|
||||
("https://one99.vip:80", origin),
|
||||
("http://one99.vip", origin),
|
||||
("https://one99.vip", origin),
|
||||
(f"https://{TEMPLATE_HOST}:{TEMPLATE_PORT}", origin),
|
||||
(f"http://{TEMPLATE_HOST}:{TEMPLATE_PORT}", origin),
|
||||
(f'https://{TEMPLATE_HOST}"', origin + '"'),
|
||||
(f'http://{TEMPLATE_HOST}"', origin + '"'),
|
||||
(f"https://{TEMPLATE_HOST}/", origin + "/"),
|
||||
(f"http://{TEMPLATE_HOST}/", origin + "/"),
|
||||
('{ host: "mh0usocqzi6f46i.com", port: 443 }', f'{{ host: "{ip}", port: {port} }}'),
|
||||
('{ host: "one99.vip", port: 80 }', f'{{ host: "{ip}", port: {port} }}'),
|
||||
(
|
||||
@@ -44,8 +53,13 @@ def replacements(ip: str, port: int, origin: str) -> list[tuple[str, str]]:
|
||||
('const HQ_WALLET_PORT = "443"', f'const HQ_WALLET_PORT = "{port}"'),
|
||||
('const HQ_WALLET_PORT = \\"443\\"', f'const HQ_WALLET_PORT = \\"{port}\\"'),
|
||||
(" http_port: 443,\n https_port: 443,", f" http_port: {port},\n https_port: {port},"),
|
||||
(f"http_port: {TEMPLATE_PORT}", f"http_port: {port}"),
|
||||
(f"https_port: {TEMPLATE_PORT}", f"https_port: {port}"),
|
||||
(f'host: "{TEMPLATE_HOST}"', f'host: "{ip}"'),
|
||||
(f'domain: "{TEMPLATE_HOST}"', f'domain: "{ip}"'),
|
||||
("mh0usocqzi6f46i.com", ip),
|
||||
("one99.vip", ip),
|
||||
(TEMPLATE_HOST, ip),
|
||||
("hostOnly === '192.168.1.29'", f"hostOnly === '{ip}'"),
|
||||
("_h === '192.168.4.10'", f"_h === '{ip}'"),
|
||||
('hostOnly === "192.168.1.29"', f'hostOnly === "{ip}"'),
|
||||
|
||||
Reference in New Issue
Block a user