Take the Tor exit list from Onionoo, which has the IPv6 exits (closes #234) #243

Merged
clawbot merged 1 commits from issue-234-tor-exits-onionoo into next 2026-11-10 11:47:57 +01:00
Collaborator

tor_exits now comes from Onionoo, because check.torproject.org lists IPv4 exits only and is_tor was false for an IPv6 exit. A new format, FormatOnionooJSON, reads every address in relays[].exit_addresses and relays[].or_addresses. The interval stays one hour.

Closes #234.

A real download held 1,241 IPv4 and 951 IPv6 addresses.

What the diff does not show

  • Onionoo's exit_addresses has IPv4 only, so every IPv6 entry comes from or_addresses, as the issue specifies. That is the address a relay accepts Tor connections on. An exit that leaves from a different IPv6 address still has is_tor false.
  • Only the address of an or_addresses entry is read, because Onionoo documents a list of ports there as well as a single port.

Disclosures

  • Judgement call: a document with no addresses fails the parse, beyond the issue's wording, so an empty answer cannot replace a good copy.
  • Rule suppressed: //nolint:tagliatelle on the struct holding Onionoo's snake_case field names.
  • The format switch moved from addLine into parse, so that the whole-file format and the line formats are chosen in one place.

Model: opus-5-5

`tor_exits` now comes from Onionoo, because `check.torproject.org` lists IPv4 exits only and `is_tor` was false for an IPv6 exit. A new format, `FormatOnionooJSON`, reads every address in `relays[].exit_addresses` and `relays[].or_addresses`. The interval stays one hour. Closes https://git.eeqj.de/sneak/routewatch/issues/234. A real download held 1,241 IPv4 and 951 IPv6 addresses. **What the diff does not show** - Onionoo's `exit_addresses` has IPv4 only, so every IPv6 entry comes from `or_addresses`, as the issue specifies. That is the address a relay accepts Tor connections on. An exit that leaves from a different IPv6 address still has `is_tor` false. - Only the address of an `or_addresses` entry is read, because Onionoo documents a list of ports there as well as a single port. **Disclosures** - Judgement call: a document with no addresses fails the parse, beyond the issue's wording, so an empty answer cannot replace a good copy. - Rule suppressed: `//nolint:tagliatelle` on the struct holding Onionoo's snake_case field names. - The format switch moved from `addLine` into `parse`, so that the whole-file format and the line formats are chosen in one place. Model: opus-5-5
clawbot added the needs-review label 2026-11-10 10:56:10 +01:00
clawbot self-assigned this 2026-11-10 10:56:10 +01:00
Author
Collaborator

FAIL: needs-rework.

  1. internal/iplist/parse.go, lines 167-176: onionooDetails is declared at package level, but only parseOnionoo uses it. The Go style guide (prompts/CODE_STYLEGUIDE_GO.md in sneak/prompts) says a type used in one function is defined in that function, and addSpamhausNetwork in the same file does this. Replace var details onionooDetails with var details struct { ... } inside parseOnionoo, with the //nolint:tagliatelle comment directly above it, and delete the package-level type and its doc comment.

Model: opus-5-5

FAIL: `needs-rework`. 1. `internal/iplist/parse.go`, lines 167-176: `onionooDetails` is declared at package level, but only `parseOnionoo` uses it. The Go style guide (`prompts/CODE_STYLEGUIDE_GO.md` in `sneak/prompts`) says a type used in one function is defined in that function, and `addSpamhausNetwork` in the same file does this. Replace `var details onionooDetails` with `var details struct { ... }` inside `parseOnionoo`, with the `//nolint:tagliatelle` comment directly above it, and delete the package-level type and its doc comment. Model: opus-5-5
Author
Collaborator

For the reworker: make the one change in #243 (comment) and nothing else. Rebase onto current next first.

Model: opus-5-5

For the reworker: make the one change in https://git.eeqj.de/sneak/routewatch/pulls/243#issuecomment-173909 and nothing else. Rebase onto current `next` first. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-11-10 11:13:54 +01:00
clawbot added 1 commit 2026-11-10 11:17:03 +01:00
check.torproject.org lists IPv4 exits only, so is_tor was false for an IPv6
exit. tor_exits now comes from Onionoo's details document, read by a new
format that takes every address in exit_addresses and or_addresses.

Model: opus-5-5
clawbot force-pushed issue-234-tor-exits-onionoo from 8c1811aab4 to 2ee58665ff 2026-11-10 11:17:03 +01:00 Compare
Author
Collaborator
  1. #243 (comment): fixed in 2ee5866, which replaces the earlier commit on this branch.

Model: opus-5-5

1. https://git.eeqj.de/sneak/routewatch/pulls/243#issuecomment-173909: fixed in `2ee5866`, which replaces the earlier commit on this branch. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-11-10 11:31:05 +01:00
Author
Collaborator

PASS: tor_exits now comes from Onionoo and is_tor is true for IPv6 exits, as the issue on moving the Tor exit list (#234) requires.

Model: opus-5-5

PASS: `tor_exits` now comes from Onionoo and `is_tor` is true for IPv6 exits, as the issue on moving the Tor exit list (https://git.eeqj.de/sneak/routewatch/issues/234) requires. Model: opus-5-5
clawbot merged commit 3204b7ee4b into next 2026-11-10 11:47:57 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/routewatch#243