Codync
무료 오픈소스 1:1 대안, Grok Bot과 Muse 대신
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기originet: map IP addresses to origin ASNs with CAIDA's RouteViews prefix-to-AS snapshots. Rust CLI + Python bindings, longest-prefix match, any date since 2005. Formerly map-ip-to-asn.
저장소 README에서 가져옴
README 전체를 불러오는 중입니다.
README 전문 보기 ↗Map IP addresses to the Autonomous System that originates them, using CAIDA's daily
RouteViews prefix-to-AS snapshots. (Formerly map-ip-to-asn, a Python tool on pyipmeta.) One binary, no C library: it picks the snapshot for the day
you ask for, downloads it once, builds a longest-prefix-match trie and answers a million
addresses in about two seconds. A Python package exposes the same table for bulk lookups.
llms.txt is the documentation index for AI agents.
--date resolves the newest snapshot on or before that day through CAIDA's index and monthly listings; the default is the newest snapshot--color never for plain), JSON, JSON Lines, CSV, TSV or Parquet out--fetch warms it, --cache lists and prunes it, --offline never touches the network; --pfx2as uses your own fileTable.from_caida() / Table.from_files() and lookup_many() with the GIL releasedunsafe_code = "forbid"From crates.io, with a Rust toolchain (1.88 or newer):
cargo install originet --locked
originet 8.8.8.8 2001:4860::8888
The same from the repository's main instead of the latest release:
cargo install --git https://github.com/estcarisimo/originet --locked
Or from source:
git clone https://github.com/estcarisimo/originet.git && cd originet
cargo build --release --locked # target/release/originet
Prebuilt binaries for Linux (x86_64, aarch64, static musl), macOS (Intel, Apple Silicon) and Windows are attached to every tagged release, with SHA-256 checksums.
From PyPI, with prebuilt wheels for Linux (x86_64, aarch64; glibc and musl), macOS (Intel, Apple Silicon) and Windows on Python 3.10 or newer:
uv pip install originet # or: pip install originet
Or the repository's main (builds the extension, so it needs Rust 1.88+):
uv pip install "originet @ git+https://github.com/estcarisimo/originet#subdirectory=python"
docker build -t originet .
docker run --rm -v originet-cache:/cache originet 8.8.8.8
# One or more addresses: a table on the terminal (the JSON report when piped), summary on stderr
originet 8.8.8.8 1.1.1.1 2606:4700::1111
originet --format json 8.8.8.8
# A file (one address per line, # comments allowed) to CSV
originet --file ips.txt --format csv --output results.csv
# Standard input, JSON Lines out: the shape for pipelines
cat ips.txt | originet -f - -F jsonl > results.jsonl
# The routing table of a given day (newest snapshot on or before it)
originet --date 2015-01-01 --file ips.txt -F parquet -o ips-2015.parquet
# Your own snapshot files (plain or gzip), no download
originet --pfx2as routeviews-rv2-20261021-0800.pfx2as.gz --pfx2as6 routeviews-rv6-20261021-1200.pfx2as.gz -f ips.txt
# Never touch the network; fail unless everything needed is cached
originet --offline --date 2024-02-29 8.8.8.8
# Fail (exit 1) if any input is not an IP address; show what is fetched
originet --strict -v -f ips.txt
Every output format has the same six columns: ip, prefix, asn, origins,
snapshot, error. asn is the first ASN of origins; origins is 15169,
149511_138421 (several ASes announce the prefix) or 64496,64497 (an AS set). An
address no prefix covers gets null prefix and asn; an input that is not an address
gets an error. The JSON report also lists the snapshot files used, their source and
how many prefixes each had. Details: output formats,
the data.
from originet import Table
table = Table.from_caida("2024-01-01") # newest snapshot on or before that day, cached
table = Table.from_files(ipv4="routeviews-rv2-20261021-0800.pfx2as.gz") # or your own file
table.lookup("8.8.8.8")
# Match(ip='8.8.8.8', prefix='8.8.8.0/24', asn=15169, origins='15169')
table.lookup_many(["1.1.1.1", "10.0.0.1", "2001:4860::8888"]) # GIL released
# [Match(ip='1.1.1.1', prefix='1.1.1.0/24', asn=13335, origins='13335'), None, Match(...)]
table.lookup_asns(["1.1.1.1", "bogus"], strict=False) # just the ASNs
# [13335, None]
table.snapshots # [{'family': 'ipv4', 'source': 'caida', 'date': '2024-01-01', ...}]
| Setting | Effect |
|---|---|
--cache-dir DIR / ORIGINET_CACHE_DIR | Where indexes, listings and snapshots are kept. Default: the platform cache directory (~/.cache/originet on Linux, ~/Library/Caches/originet on macOS, /cache in the image) |
--offline | Never download; error if the index, listing or snapshot is not cached |
--refresh | Fetch the snapshot index again even if the cached copy is less than six hours old |
--cache list|size|prune | Show what the cache holds and its size, or prune it: --keep-days N, --keep-last N, --dry-run |
-v, -vv, RUST_LOG | Log what is fetched or read from the cache |
The index and the current month's listing are refreshed after six hours; snapshot files and past months never change and are cached forever.
src/
├── main.rs # CLI (clap): arguments, orchestration, stderr summary, exit codes
├── pfx2as.rs # Parser of CAIDA's pfx2as format; Origins (A, A_B, A,B); gzip by magic bytes
├── table.rs # Longest-prefix-match table (one prefix-trie per family)
├── caida.rs # Dataset layout, rolling index and monthly listings, date selection
├── fetch.rs # Cached, atomic downloads; index freshness; offline mode
├── cache.rs # Inventory of the cache; pruning by age or count
├── load.rs # Local file or CAIDA snapshot into a table, with provenance
├── input.rs # Address parsing (/32, /128, IPv4-mapped IPv6, comments)
└── output.rs # Records, summary, report; JSON, JSON Lines, CSV, TSV, Parquet
python/
├── src/lib.rs # PyO3 module originet._native: Table, Match
├── originet/ # Package, typed stub, py.typed
└── tests/ # pytest suite
The crate is also a library (originet); see
Rust library.
cargo build && cargo test --workspace --all-features
cargo fmt --all && cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo deny check # cargo install cargo-deny
cd python && uv sync --locked && uv run pytest -q && uv run ruff check . && uv run mypy
uvx --with-requirements docs/requirements.txt mkdocs build --strict
Tests never touch the network: they run against tests/fixtures/ and a seeded cache.
CONTRIBUTING.md has the full checklist and the release procedure.
$ originet -F csv 8.8.8.8 1.1.1.1 1.1.8.9 10.0.0.1
ip,prefix,asn,origins,snapshot,error
8.8.8.8,8.8.8.0/24,15169,15169,2026-10-21,
1.1.1.1,1.1.1.0/24,13335,13335,2026-10-21,
1.1.8.9,1.1.8.0/24,149511,149511_138421,2026-10-21,
10.0.0.1,,,,2026-10-21,
4 addresses: 3 found, 1 not found, 0 invalid (ipv4 2026-10-21; 407.8ms)
$ originet --date 2005-06-01 -F csv 8.8.8.8
ip,prefix,asn,origins,snapshot,error
8.8.8.8,8.0.0.0/8,3356,3356,2005-06-01,
1 addresses: 1 found, 0 not found, 0 invalid (ipv4 2005-06-01; 2.0s)
$ originet -f ips-1M.txt -F jsonl -o out.jsonl
1000000 addresses: 836003 found, 163997 not found, 0 invalid (ipv4 2026-10-21; 1.7s)
The first run for a day downloads the snapshot (about 4 MB for IPv4, 1 MB for IPv6); after that the time is loading 1.1 M prefixes into the trie plus the lookups. The 1 M figure is one million random IPv4 addresses on a 2023 laptop, snapshot already cached.
Contributions are welcome. Read CONTRIBUTING.md first, then:
git checkout -b feat/my-change)CHANGELOG.md entry.github/REVIEW.md)MIT, see LICENSE. The data is CAIDA's and keeps its own terms.
This tool reads The CAIDA UCSD Routeviews Prefix to AS mappings Dataset (pfx2as) for
IPv4 and IPv6, https://www.caida.org/catalog/datasets/routeviews-prefix2as/, derived
from RouteViews BGP data. Please cite the dataset in work that uses this tool;
CITATION.cff has the entries for both.