Repository navigation
fix: advertise what StartOS exposes, report relay reachability; 0.4.9.12:3 → 0.4.9.12:4 - #33
Merged
Merged
Conversation
….12:3 → 0.4.9.12:4 The relay advertised whatever address the directory authorities saw on its outbound connections and the configured OR port, neither of which has to match the gateway and external port StartOS actually forwards. A bare ORPort is also an IPv6 ORPort, so Tor logged "Unable to find IPv6 address for ORPort" hourly on every relay, since it cannot see the server's addresses from its container. - init/advertiseRelay derives from the or-multi binding: Address when the Public IPv4 is enabled on exactly one gateway, an ORPort NoListen/NoAdvertise pair when the assigned external port differs, and IPv4Only while no public IPv6 address is enabled. - A Relay Reachability health check reports Tor's self-test, requires an accepted descriptor as well, and fails at once when no public address is enabled, because Tor never revisits a test it has passed. - Configure Relay restarts Tor when the OR port of an enabled relay changes. Reloaded onto a new port, Tor keeps the old port's verdict and publishes a port nothing has tested. - No IPv6 address is ever pinned: Tor refuses to publish any descriptor while a configured IPv6 fails its self-test. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Helix-Harness: pi Helix-Model: openai-codex/gpt-5.6-sol
helix-a
approved these changes
Sep 19, 2026
helix-a
left a comment
Member
There was a problem hiding this comment.
Reviewed the relay advertisement derivation, torrc round-trip, init reactivity, reachability health check, action lifecycle, and docs. I pushed 304db95 to cover one edge case: clearing the optional OR Port field restores 9001, so an enabled relay must restart just as it does for an explicitly entered port change.
Verified with npm ci, npm run check, npm run build, Prettier, tsc --noEmit --noUnusedLocals, and x86_64/aarch64/riscv64 package builds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The relay advertised whatever address the directory authorities saw on its outbound connections, and the configured OR port. Neither has to match the gateway and external port StartOS actually forwards. Separately, a bare
ORPortis also an IPv6 ORPort, and Tor can't see the server's addresses from inside its container, so every relay loggedUnable to find IPv6 address for ORPortonce an hour (reported on 0.4.9.12:3 behind StartTunnel).Changes
init/advertiseRelayderives from theor-multibinding:Address, when the Public IPv4 address is enabled on exactly one gateway;ORPort … NoListen/… NoAdvertisepair, when the assigned external port differs from the configured one;IPv4Only, while no public IPv6 address is enabled.All of this is stored in torrc and dropped when the OR port changes.
New Relay Reachability health check:
Configure Relay restarts Tor when the OR port of an enabled relay changes. Reloaded onto a new port, Tor opens the new listener but keeps the old port's verdict and publishes a port nothing has tested. Only a start as a relay or an address change makes it test. The OR Port field says so. Turning the relay on or off still only reloads.
No IPv6 address is pinned, on purpose. Tor omits an auto-discovered IPv6 address that fails the self-test, but refuses to publish any descriptor while a configured one fails (
relay_periodic.c,reachability_warnings_callback).README and instructions updated. The README's claim that the listener is IPv4-only was wrong and is removed.
Verified on a StartOS box (x86_64, home router)
ORPort 9001 IPv4OnlyplusAddress <public IP>;0.0.0.0:9001only, where the old version also opened[::]:9001;Addresswas withdrawn;NoListen/NoAdvertisepair;IPv4Onlyremoved nothing: a comparable package port forward is equally unreachable over the box's link-local IPv6, while the OS's own ports answer.Also verified offline on this package's image (Tor 0.4.9.12)
IPv4Onlydoes neither.--verify-config.toFile/fromFile, including the:3parser reading a:4file after a downgrade.Not verified
Known, not addressed
FileHelper.mergeis an unlocked read-merge-write, and this adds a tenth torrc writer. It writes only when the advertised state actually changes.