Rebrand upstream: переименовать forkop в tachyon

This commit is contained in:
Dushnilin
2026-07-14 07:48:33 +03:00
parent 2a1c97b592
commit 14df12a18d
353 changed files with 116869 additions and 1522 deletions
+52 -52
View File
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#!/usr/bin/env bash
set -eo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
SERVER_RUNTIME="$ROOT_DIR/forkop/files/usr/lib/server/service.uc"
UCODE_LIB="$ROOT_DIR/forkop/files/usr/lib"
SERVER_RUNTIME="$ROOT_DIR/tachyon/files/usr/lib/server/service.uc"
UCODE_LIB="$ROOT_DIR/tachyon/files/usr/lib"
WORK_DIR="$(mktemp -d)"
STATE="$WORK_DIR/uci.state"
LOG="$WORK_DIR/uci.log"
@@ -59,39 +59,39 @@ LOGGER
chmod 0755 "$WORK_DIR/bin/logger"
export PATH="$WORK_DIR/bin:$PATH"
export FORKOP_UCI_STATE_FILE="$STATE"
export FORKOP_UCI_LOG_FILE="$LOG"
export FORKOP_CONFIG_NAME="forkop"
export FORKOP_SERVER_RUNTIME_UC="$SERVER_RUNTIME"
export TACHYON_UCI_STATE_FILE="$STATE"
export TACHYON_UCI_LOG_FILE="$LOG"
export TACHYON_CONFIG_NAME="tachyon"
export TACHYON_SERVER_RUNTIME_UC="$SERVER_RUNTIME"
if grep -E 'uci -q|command -v uci' "$SERVER_RUNTIME" >/dev/null; then
fail "server/service.uc must use ucode UCI access instead of shelling out to uci"
fi
if grep -F 'output("ucode "' "$SERVER_RUNTIME" >/dev/null; then
fail "server defaults must not spawn service.uc without the Forkop module path"
fail "server defaults must not spawn service.uc without the Tachyon module path"
fi
cat >"$STATE" <<'EOF_STATE'
forkop.vless=server
forkop.vless.protocol=vless
forkop.vless.server_users=client|22222222-2222-4222-8222-222222222222|xtls-rprx-vision
forkop.socks=server
forkop.socks.protocol=socks
forkop.socks.label=desk
forkop.socks_open=server
forkop.socks_open.protocol=socks
forkop.socks_open.label=guest
forkop.socks_open.socks_auth_enabled=0
forkop.tailscale=server
forkop.tailscale.protocol=tailscale
forkop.json=server
forkop.json.protocol=json_inbound
forkop.mtproto=server
forkop.mtproto.protocol=mtproto
forkop.mtproto.mtproto_secret=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
forkop.mtproto_legacy=server
forkop.mtproto_legacy.protocol=mtproto
forkop.mtproto_legacy.server_users=client|eebbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb676f6f676c652e636f6d
tachyon.vless=server
tachyon.vless.protocol=vless
tachyon.vless.server_users=client|22222222-2222-4222-8222-222222222222|xtls-rprx-vision
tachyon.socks=server
tachyon.socks.protocol=socks
tachyon.socks.label=desk
tachyon.socks_open=server
tachyon.socks_open.protocol=socks
tachyon.socks_open.label=guest
tachyon.socks_open.socks_auth_enabled=0
tachyon.tailscale=server
tachyon.tailscale.protocol=tailscale
tachyon.json=server
tachyon.json.protocol=json_inbound
tachyon.mtproto=server
tachyon.mtproto.protocol=mtproto
tachyon.mtproto.mtproto_secret=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
tachyon.mtproto_legacy=server
tachyon.mtproto_legacy.protocol=mtproto
tachyon.mtproto_legacy.server_users=client|eebbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb676f6f676c652e636f6d
EOF_STATE
ucode -L "$UCODE_LIB" "$SERVER_RUNTIME" prepare-all-defaults
@@ -106,30 +106,30 @@ assert_value() {
[ "$actual" = "$expected" ] || fail "$path: expected '$expected', got '$actual'"
}
assert_value forkop.vless.security reality
assert_value forkop.vless.listen 0.0.0.0
assert_value forkop.vless.listen_port 443
assert_value forkop.vless.server_uuid 22222222-2222-4222-8222-222222222222
assert_value forkop.vless.vless_flow xtls-rprx-vision
assert_value forkop.vless.reality_short_id abcd1234
assert_value forkop.vless.reality_private_key private-key
assert_value forkop.vless.reality_public_key public-key
assert_value forkop.socks.security none
assert_value forkop.socks.socks_auth_enabled 1
assert_value forkop.socks.server_username desk
assert_value forkop.socks.server_password generated-password
assert_value forkop.socks_open.socks_auth_enabled 0
assert_value forkop.socks_open.server_username guest
assert_value forkop.socks_open.server_password generated-password
assert_value forkop.tailscale.security none
assert_value forkop.tailscale.tailscale_control_url https://controlplane.tailscale.com
assert_value forkop.tailscale.tailscale_hostname forkop-tailscale
assert_value forkop.tailscale.tailscale_advertise_exit_node 1
assert_value forkop.json.security none
assert_value forkop.mtproto.mtproto_secret aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
assert_value forkop.mtproto_legacy.mtproto_secret bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
assert_value forkop.mtproto_legacy.mtproto_faketls google.com
grep -Fxq 'commit forkop' "$LOG" || fail 'expected config commit'
assert_value tachyon.vless.security reality
assert_value tachyon.vless.listen 0.0.0.0
assert_value tachyon.vless.listen_port 443
assert_value tachyon.vless.server_uuid 22222222-2222-4222-8222-222222222222
assert_value tachyon.vless.vless_flow xtls-rprx-vision
assert_value tachyon.vless.reality_short_id abcd1234
assert_value tachyon.vless.reality_private_key private-key
assert_value tachyon.vless.reality_public_key public-key
assert_value tachyon.socks.security none
assert_value tachyon.socks.socks_auth_enabled 1
assert_value tachyon.socks.server_username desk
assert_value tachyon.socks.server_password generated-password
assert_value tachyon.socks_open.socks_auth_enabled 0
assert_value tachyon.socks_open.server_username guest
assert_value tachyon.socks_open.server_password generated-password
assert_value tachyon.tailscale.security none
assert_value tachyon.tailscale.tailscale_control_url https://controlplane.tailscale.com
assert_value tachyon.tailscale.tailscale_hostname tachyon-tailscale
assert_value tachyon.tailscale.tailscale_advertise_exit_node 1
assert_value tachyon.json.security none
assert_value tachyon.mtproto.mtproto_secret aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
assert_value tachyon.mtproto_legacy.mtproto_secret bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
assert_value tachyon.mtproto_legacy.mtproto_faketls google.com
grep -Fxq 'commit tachyon' "$LOG" || fail 'expected config commit'
: >"$LOG"
ucode -L "$UCODE_LIB" "$SERVER_RUNTIME" prepare-all-defaults