尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
Read-only mirror of gitlab.com/bart-turczynski/raddr
翻譯準備中
正在載入完整 README。
檢視完整 README ↗Report what an IP address literal means under each of the standards and implementations that disagree about it, and classify parsed values against the IANA special-purpose address registries.
The string "0177.0.0.1" is rejected by the RFC dotted-quad grammar,
read as 127.0.0.1 by browsers and BSD inet_aton, and read as
177.0.0.1 by some inet_pton implementations, Apple’s among them.
Most libraries pick one reading and discard the rest. raddr returns
every reading, with the reason codes that explain each one, so code that
validates, logs or compares addresses can see where the readings split.
It reports facts, never an allow/deny verdict or a risk score. The full
case, with the measured divergence tables, is the Why
raddr
article.
Install the released version from CRAN:
install.packages("raddr")
Or the development version from r-universe:
install.packages(
"raddr",
repos = c("https://bart-turczynski.r-universe.dev", "https://cloud.r-project.org")
)
raddr is pure R with no compiled code, so a source install needs no
compiler and no system libraries. It performs no network access and
depends only on vctrs and rlang.
library(raddr)
addr_parse("0177.0.0.1")
#> <raddr_parse[1]>
#> [1] 127.0.0.1
#> Status: divergent 1
#>
#> [1] "0177.0.0.1"
#> strict <rejected: leading_zero>
#> whatwg 127.0.0.1
#> pton 177.0.0.1
#> aton 127.0.0.1
# The browser reading reaches loopback; the inet_pton reading reaches a
# routable address.
addr_classify(addr_whatwg("0177.0.0.1"))
#> <raddr_class[1]>
#> [1] loopback 127.0.0.0/8
#> Registry: special-purpose 2025-10-09
addr_classify(addr_pton("0177.0.0.1"))
#> <raddr_class[1]>
#> [1] global 177.0.0.0/8
#> Registry: address space 2025-10-10
The documentation site is https://bart-turczynski.gitlab.io/raddr/, with the articles listed under Articles: