A fast, no‑frills CLI for unpacking Xray‑core / V2Ray data packs – the geoip.dat and geosite.dat – into plain‑text files.
- Unpack
geoip.dat&geosite.datin one command. - Stream mode – reads only the entries you ask for; huge speed‑ups when filtering.
-t,--tagsflag prints every tag present in the file and exits.-p,--printdumps straight to stdout.- Consistent output naming:
<dat_filename>_<tag>.txt. - Pre‑built binaries for Linux, macOS, Windows.
v2dat unpack geoip [-o output_dir] [-p] [-f tag]... geoip_file
v2dat unpack geosite [-o output_dir] [-p] [-f tag[@attr]...]... geosite.dat- If
-owas omitted, the current working dir.will be used. - If no filter
-fwas given. All tags will be unpacked. - If multiple
@attrwere given. Entries that don't contain any of given attrs will be ignored. - Unpacked text files will be named as
<geo_filename>_<filter>.txt. - Use
-pinstead of-ofor stdout.
# unpack every CIDR list inside geoip.dat into ./out
v2dat unpack geoip -o out /path/to/geoip.dat
# print Danish (dansk) CIDRs to stdout
v2dat unpack geoip -p -f dk /path/to/geoip.dat
# list available tags inside geosite
v2dat unpack geosite -t /path/to/geosite.dat
# unpack only the "google" domain rules under the "cn" tag
# a) list availble attirbutes
v2dat unpack geosite -t /path/to/geosite.dat
# b) unpack google category and stdout
v2dat unpack geosite -o out -f google /path/to/geosite.dat