A cli tool that can unpack v2ray data packages (also known as geoip.dat and geosite.dat) to text files.
- Go 1.27 or newer
Each release should use the same note structure:
- Changed: behavior changes, dependency updates, version bumps, refactors that affect runtime or build requirements
- Fixed: bug fixes, regressions, compatibility fixes
- Docs: README or usage documentation updates
- CI: workflow or automation changes that affect release/build pipeline
- Verification: commands used to validate the release, such as
go test ./...andgo build ./...
Suggested release note template:
## Changed
- ...
## Fixed
- ...
## Docs
- ...
## CI
- ...
## Verification
- go test ./...
- go build ./...v2dat unpack geoip [-o output_dir] [-f tag]... geoip_file
v2dat unpack geosite [-o output_dir] [-f tag[@attr]...]... geosite_file- 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.
Unpacked IP text files contain a list of CIDRs.
2.16.33.76/32
2.19.128.0/20
2.20.32.0/22
geosite contains four types of domain rule expression: domain, keyword, regexp, full. Each expression can have several attributes @attr. More info about geosite can be found in here.
v2dat will split type and expression with a :. But omits the domain prefix and attributes.
google.com
keyword:google
regexp:www\.google\.com$
full:www.google.com