Loyalsoldier / v2ray-rules-dat

🦄 🎃 👻 V2Ray 路由规则文件加强版,可代替 V2Ray 官方 geoip.dat 和 geosite.dat,适用于 V2Ray、Xray-core、mihomo(Clash-Meta)、hysteria、Trojan-Go 和 leaf。Enhanced edition of V2Ray rules dat files, applicable to V2Ray, Xray-core, mihomo(Clash-Meta), hysteria, Trojan-Go and leaf.
GNU General Public License v3.0
15.27k stars 1.86k forks source link

how to custom it? #342

Closed DgithubA closed 11 months ago

DgithubA commented 11 months ago

i use bellow rules to bypass proxy(direct), but i have some problem. At the moment, geosite.dat size is 5MB and geoip.dat is 10.2MB . in mobile V2rayNG app when we i use this custom rules, It takes a long time to start xray service and when we dont use any ruls of geosite: or geoip: , This time is greatly reduced. Now i want to custom this rules and put all of them in one file to Reduce file size and execution time, and use it with ext:cutom.bat:direct and ext:custom.bat:block . Obviously, the size of the file is reduced because there are no additional data and lists that are not necessary(like other geo domain and ips), so as a result, we have better speed. now i have question. how can i do this? how can make my custom .dat file with tags(direct,block,etc)

my rules:

Loyalsoldier commented 11 months ago

You can not combine geoip file with geosite file.

To generate your own geoip file, you can use my project here: https://github.com/Loyalsoldier/geoip . The steps have been written in README.

To generate your own geosite file, you can use my project here: https://github.com/Loyalsoldier/domain-list-custom

The steps are:

  1. Install Golang and git
  2. Use git to clone that project
  3. Create your own domain list with list name as filename, like direct or block
  4. Run command in the project root directory: go run ./ --datapath=/path/to/your/own/lists/directory
  5. For more information, see the workflow file