Add the iCloud Private Relay list to the IP lookup, with is_relay (closes #237) #250

Merged
clawbot merged 1 commits from issue-237-icloud-private-relay into next 2026-11-10 15:13:56 +01:00
Collaborator

Closes #237, part of #203.

Adds the icloud_private_relay list (Apple's https://mask-api.icloud.com/egress-ip-ranges.csv, once a day) and flags.is_relay, true when the address is on it.

"flags": {"is_tor": false, "is_vpn": false, "is_relay": true, "is_bogon": false}

A real download through download gave 285,174 networks, merged into 6,896 address ranges.

Memory (figure in the README's Memory section): loaded, the list adds about 0.3 MiB to the Go heap and under 6 MiB of resident memory. Parsing allocates about 94 MiB in about 0.2 seconds, and the next garbage collection frees all of it but that 0.3 MiB. The 94 MiB is the review's measurement with a 1 GiB heap (#250 (comment)), not repeated here. The other figures were measured in a test binary with only this list, against the same binary with no lists; the test is not committed.

Judgement call: a line with no comma fails the parse, so a plain network list served at Apple's URL cannot replace a good copy.

parseProtonVPN became parseLinesNotEmpty, shared with the new parser, because both only add the check that a file holds addresses. The Tor list test now shares a helper with the new list's test. The maxDownloadSize comment now names the new largest list.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/routewatch/issues/237, part of https://git.eeqj.de/sneak/routewatch/issues/203. Adds the `icloud_private_relay` list (Apple's https://mask-api.icloud.com/egress-ip-ranges.csv, once a day) and `flags.is_relay`, true when the address is on it. ```json "flags": {"is_tor": false, "is_vpn": false, "is_relay": true, "is_bogon": false} ``` A real download through `download` gave 285,174 networks, merged into 6,896 address ranges. Memory (figure in the README's Memory section): loaded, the list adds about 0.3 MiB to the Go heap and under 6 MiB of resident memory. Parsing allocates about 94 MiB in about 0.2 seconds, and the next garbage collection frees all of it but that 0.3 MiB. The 94 MiB is the review's measurement with a 1 GiB heap (https://git.eeqj.de/sneak/routewatch/pulls/250#issuecomment-174253), not repeated here. The other figures were measured in a test binary with only this list, against the same binary with no lists; the test is not committed. Judgement call: a line with no comma fails the parse, so a plain network list served at Apple's URL cannot replace a good copy. `parseProtonVPN` became `parseLinesNotEmpty`, shared with the new parser, because both only add the check that a file holds addresses. The Tor list test now shares a helper with the new list's test. The `maxDownloadSize` comment now names the new largest list. Model: opus-5-5
clawbot self-assigned this 2026-11-10 14:19:21 +01:00
clawbot added the needs-review label 2026-11-10 14:19:21 +01:00
Author
Collaborator

FAIL: needs rework.

  1. README.md, Memory section: "Parsing the file raises the process's peak by up to about 55 MiB for about 0.2 seconds." is false for a daemon holding a full routing table, which is what this section describes. The 55 MiB comes from a test binary with an almost empty heap, where the garbage collector runs during the parse. With a 1 GiB heap, the size this section gives for a full table, no collection happens during the parse. The heap grows by the parse's whole allocation of about 94 MiB, resident memory rises by about 81 MiB, and that memory stays until the next collection, not for 0.2 seconds. Replace the sentence with a short correct one, for example: "Parsing the file allocates about 94 MiB in about 0.2 seconds. The next garbage collection frees all of it but the 0.3 MiB above." Correct the same figure in the pull request body.

Model: opus-5-5

FAIL: needs rework. 1. `README.md`, Memory section: "Parsing the file raises the process's peak by up to about 55 MiB for about 0.2 seconds." is false for a daemon holding a full routing table, which is what this section describes. The 55 MiB comes from a test binary with an almost empty heap, where the garbage collector runs during the parse. With a 1 GiB heap, the size this section gives for a full table, no collection happens during the parse. The heap grows by the parse's whole allocation of about 94 MiB, resident memory rises by about 81 MiB, and that memory stays until the next collection, not for 0.2 seconds. Replace the sentence with a short correct one, for example: "Parsing the file allocates about 94 MiB in about 0.2 seconds. The next garbage collection frees all of it but the 0.3 MiB above." Correct the same figure in the pull request body. Model: opus-5-5
Author
Collaborator

For the reworker: make the one change in #250 (comment), in the README and the PR body, and nothing else. Rebase onto current next if it has moved.

Model: opus-5-5

For the reworker: make the one change in https://git.eeqj.de/sneak/routewatch/pulls/250#issuecomment-174253, in the README and the PR body, and nothing else. Rebase onto current `next` if it has moved. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-11-10 14:47:51 +01:00
clawbot added 1 commit 2026-11-10 14:52:49 +01:00
`icloud_private_relay` is Apple's list of Private Relay networks, downloaded once a day. Every result gains `flags.is_relay`.

`parseProtonVPN` becomes `parseLinesNotEmpty`, shared with the new parser, which reads only each line's first column.

Judgement call: a line with no comma fails the parse, so a plain list of networks at Apple's URL cannot replace a good copy.

Model: opus-5-5
clawbot force-pushed issue-237-icloud-private-relay from 841262a6bf to 9aaf877e2f 2026-11-10 14:52:49 +01:00 Compare
Author
Collaborator

Parse memory figure (#250 (comment)): corrected in README.md and the PR body; the PR stays one commit.

Judgement call: the following README.md sentence now starts Parsing happens instead of That happens, because That would otherwise have meant the garbage collection.

Unverified: I did not repeat the review's 94 MiB measurement.

Model: opus-5-5

Parse memory figure (https://git.eeqj.de/sneak/routewatch/pulls/250#issuecomment-174253): corrected in `README.md` and the PR body; the PR stays one commit. Judgement call: the following `README.md` sentence now starts `Parsing happens` instead of `That happens`, because `That` would otherwise have meant the garbage collection. Unverified: I did not repeat the review's 94 MiB measurement. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-11-10 15:01:45 +01:00
Author
Collaborator

PASS: the icloud_private_relay list and flags.is_relay meet the definition of done of #237 and the repo's policies.

Model: opus-5-5

PASS: the `icloud_private_relay` list and `flags.is_relay` meet the definition of done of https://git.eeqj.de/sneak/routewatch/issues/237 and the repo's policies. Model: opus-5-5
clawbot merged commit 2c3f6f71dc into next 2026-11-10 15:13:56 +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#250