mirror of
https://github.com/moghtech/komodo.git
synced 2026-03-09 07:13:36 -05:00
[PR #666] [MERGED] Allow CIDR ranges in Allowed IPs #759
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/moghtech/komodo/pull/666
Author: @bpbradley
Created: 7/15/2025
Status: ✅ Merged
Merged: 7/28/2025
Merged by: @mbecker20
Base:
1.18.5← Head:support_cidr📝 Commits (2)
3444d8cAllow CIDR ranges in Allowed IPsfdd2982Catch mixed IPv4/IPv6 mappings that are probably intended to match📊 Changes
5 files changed (+28 additions, -14 deletions)
View changed files
📝
Cargo.toml(+1 -0)📝
bin/periphery/Cargo.toml(+1 -0)📝
bin/periphery/src/api/router.rs(+19 -8)📝
client/core/rs/Cargo.toml(+2 -1)📝
client/core/rs/src/entities/config/periphery.rs(+5 -5)📄 Description
Attempt to implement #631
Changes
allowed_ipsfromIpAddrtoIpNetwork. The default serde will accept IP addresses and convert them to a /32 or /128 prefix if needed (depending on if the IP is v4 or v6).For example
Turns into
I also added a check to the matching function in
guard_request_by_ipthat will check the ip network type, and when the network is IPv4, it will convert the address to its canonical form. This way, you can use a standard IPv4 address without IPv6 mapping, even if your bind IP is[::]Will test some more tonight with more corner cases, but working for me with basic tests.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.