feat: add autonomous YouTube resource recovery and adaptive GGC
Co-authored-by: GPT-6 <gpt-6@openai.com>
This commit is contained in:
1 parent
8826c591dc
commit
b4e1e1e9ca
43 files changed
+5163
-93
No files matched your search
@@ -12,6 +12,8 @@ case "$ss_password" in
|
||||
echo 'error: target secret must contain only hexadecimal characters' >&2; exit 64 ;;
|
||||
esac
|
||||
[ "${#ss_password}" -ge 32 ] || { echo 'error: target secret must be at least 32 hex characters' >&2; exit 64; }
|
||||
# Validate before creating configs or launching any service. Errors never echo input.
|
||||
/usr/local/bin/zapret-autotune target-config-check || exit 64
|
||||
config_dir=/run/zapret-autotune-ss
|
||||
awk '$2 == "/run/zapret-autotune-ss" && $3 == "tmpfs" { found=1 } END { exit !found }' /proc/mounts || {
|
||||
echo 'error: target Shadowsocks config directory must be a dedicated tmpfs' >&2; exit 78;
|
||||
@@ -163,7 +165,10 @@ trap 'exit 0' INT TERM
|
||||
|
||||
# Never invoke /opt/entrypoint.sh: zapret must start AFTER reconciliation.
|
||||
run_cycle() {
|
||||
ss-server -c "$config_dir/server.json" &
|
||||
set -- ss-server -c "$config_dir/server.json"
|
||||
# DNS is not a secret. Native -d avoids assuming support for a JSON DNS key.
|
||||
[ -z "${SS_DNS_SERVER-}" ] || set -- "$@" -d "$SS_DNS_SERVER"
|
||||
"$@" &
|
||||
server_pid=$!
|
||||
ss-local -c "$config_dir/local.json" &
|
||||
local_pid=$!
|
||||
|
||||
Reference in new issue
Block a user