mirror of
https://github.com/p1neappleXpress/OpenFlux.git
synced 2026-10-02 05:04:39 +08:00
Fix isExit computed before .conf's Role is applied
isExit (client vs. exit for Session/encryption directionality) was
computed from *role right after flag.Parse(), before the .conf file's
"Role = exit" line gets applied a few lines later. Every node-wizard
deployment runs the core as `--config node.conf` with no --role on the
command line, so isExit stayed false for every exit node: the Session
came up side=CLIENT, the direct transport refused to start ("DialAddr
is empty", it had a Listen= not a Dial=), vyandex hit the client-only
auth flow instead of the passive exit one, and the whole thing died
with "session: handshake failed: handshake timed out" after the
client-side handshake timeout - then systemd (Restart=always) looped
it forever, roughly every 26s.
Recompute isExit right after the config's Role is applied, before it's
used to build the .conf's [Transport] specs and the Session itself.
Bumps deploy/node-install.sh to node-v1.0.1 with this fix so new and
upgraded node deployments stop hitting it; the binaries were built
with the Node release workflow's exact recipe (see its SHA-256 check).
Confirmed live: deployed the fixed binary to an existing broken node
(root@191.44.112.34, channel of-kqszey) in place of the crash-looping
one; both channels came up clean (0 restarts, listeners bound) and a
real client completed the handshake and pushed encrypted traffic
through it.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
committed by
p1neappleXpress
co-authored by
Claude Sonnet 5
parent
cde597c9a2
commit
e8f735a98c
@@ -36,11 +36,11 @@
|
||||
set -u
|
||||
umask 077
|
||||
|
||||
CORE_VERSION="node-v1.0.0"
|
||||
CORE_VERSION="node-v1.0.1"
|
||||
CORE_BASE="https://github.com/p1neappleXpress/OpenFlux/releases/download/$CORE_VERSION"
|
||||
SHA_amd64="37a503bc0ca549314e475cb2900b659b611a628fdf01c9478fe6637951c3793a"
|
||||
SHA_arm64="9d1f674f439fa9229e7e5046b33877602449fedaaf26187cb67979c7eb2ac426"
|
||||
SHA_arm="de0a10644ad05811ba3896565428b90c5c09c234e790a96342ccb2770aea893a"
|
||||
SHA_amd64="9fa157550d2c20c0bc03c12823b4ad0140ba070199b5548eacf98c5a2cca6cb8"
|
||||
SHA_arm64="325335fa416d2f87cba84c5a85d865c596169cd79c7f4cfc916cd67a88612886"
|
||||
SHA_arm="7f280b01a53bee33e84a7525e035f1e09f51e9070b612b903e492c45c6edf300"
|
||||
|
||||
BIN_DIR="/opt/openflux-node/bin"
|
||||
CONF_ROOT="/etc/openflux-node"
|
||||
|
||||
@@ -406,6 +406,11 @@ DEPRECATED (removed in v2)
|
||||
flag.Visit(func(f *flag.Flag) { setFlags[f.Name] = true })
|
||||
|
||||
applyConfString(conf.Interface, "Role", "role", role, setFlags)
|
||||
// Role may have just changed: isExit above was computed from the
|
||||
// pre-.conf value, so a config-only "Role = exit" (no --role on the
|
||||
// command line, as every node-wizard deployment runs) left isExit
|
||||
// stuck at false. Recompute before it's used below.
|
||||
isExit = *role == roleExit || *role == roleBenchSink
|
||||
applyConfString(conf.Interface, "Inbound", "inbound", inbound, setFlags)
|
||||
applyConfString(conf.Interface, "Transport", "transport", transportType, setFlags)
|
||||
applyConfString(conf.Interface, "Mode", "mode", mode, setFlags)
|
||||
|
||||
Reference in New Issue
Block a user