authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-12 04:18:29 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-12 04:18:29 -07:00
logcdd48e0841894593b1daf2986ab5333c19bff1af
tree31f90c21a3986faadaff110dc83aa173ff0ed5fe
parent730c604553d7b8d47111061221b9fc826b4823ec
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

URL.isHostLocal: add ipv4


1 files changed, 6 insertions(+), 2 deletions(-)

url.zig+6-2
......@@ -993,10 +993,14 @@ pub const URL = struct {
993993 if (std.mem.endsWith(u8, nm, ".local")) return true;
994994 return false;
995995 },
996 .ipv4 => {
996 .ipv4 => |ip| {
997 const parts: [4]u8 = @bitCast(ip);
998 if (parts[0] == 127) return true; // 127.0.0.0/8
997999 return false; // TODO
9981000 },
999 .ipv6 => {
1001 .ipv6 => |ip| {
1002 const parts: [8]u16 = @bitCast(ip);
1003 _ = parts;
10001004 return false; // TODO
10011005 },
10021006 }