Skip to content
/ v2dat Public
forked from urlesistiana/v2dat

A cli tool that can unpack v2ray data packages. (Note: This project is for fun ONLY. You should build your own data dirctly from upstreams instead of unpacking a v2ray data pack.)

License

Notifications You must be signed in to change notification settings

dalamudx/v2dat

This branch is 1 commit ahead of urlesistiana/v2dat:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

839ad39 · Jan 3, 2025

History

3 Commits
Jan 3, 2025
Dec 15, 2022
Dec 15, 2022
Dec 15, 2022
Dec 15, 2022
Dec 15, 2022
Dec 15, 2022
Dec 15, 2022
Dec 15, 2022
Dec 15, 2022
Dec 15, 2022

Repository files navigation

v2dat

A cli tool that can unpack v2ray data packages (also known as geoip.dat and geosite.dat) to text files.

Usage

v2dat unpack geoip [-d output_dir] [-f tag]... geoip_file
v2dat unpack geosite [-d output_dir] [-f tag[@attr]...]... geosite_file
  • If -d was omitted, the current working dir . will be used.
  • If no filter -f was given. All tags will be unpacked.
  • If multiple @attr were 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 Data

Unpacked IP text files contain a list of CIDRs.

2.16.33.76/32
2.19.128.0/20
2.20.32.0/22

Unpacked Domain Data

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

About

A cli tool that can unpack v2ray data packages. (Note: This project is for fun ONLY. You should build your own data dirctly from upstreams instead of unpacking a v2ray data pack.)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%