Skip to content

Remove the boolean address checks - #184

Merged
splitbrain merged 1 commit into
splitbrain:mainfrom
splitbrain-bot:remove-blocked-address
Nov 9, 2026
Merged

splitbrain merged 1 commit into
splitbrain:mainfrom
splitbrain-bot:remove-blocked-address

Conversation

@splitbrain-bot

Copy link
Copy Markdown

isBlockedAddress() and allAddressesAllowed() in shared/cidr.ts had no callers anymore. Since #176 the egress policy sorts addresses with addressKind() and answerKind(). Only proxy/src/cidr.test.ts still used the two functions.

Changes

  • shared/cidr.ts: removed the two functions.
  • proxy/src/cidr.test.ts: the tests use addressKind() and answerKind() and assert the exact kind of each address. The boundary cases, the IPv6 forms that embed an IPv4 address and the unparseable inputs stay covered. The address lists that Let explicit hosts reach private addresses #176 added for the same ranges are merged into these tests.

Tests

All proxy tests pass. tsc and biome find no errors.

isBlockedAddress() and allAddressesAllowed() in shared/cidr.ts had no
callers anymore, because the egress policy sorts addresses with
addressKind() and answerKind() since splitbrain#176. The tests of the address
ranges now assert the exact kind of each address.
@splitbrain
splitbrain merged commit e3a3215 into splitbrain:main Nov 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants