Loyalsoldier / geoip

🌚 🌍 🌝 GeoIP 规则文件加强版,支持自行定制 V2Ray dat 格式文件 geoip.dat、MaxMind mmdb 格式文件、sing-box SRS 格式文件、mihomo MRS 格式文件、Clash ruleset、Surge ruleset 等。Enhanced edition of GeoIP files for V2Ray, Xray-core, sing-box, Clash, mihomo, Shadowrocket, Quantumult X, Surge, hysteria, Trojan-Go, Leaf, Nginx, etc.
Creative Commons Attribution Share Alike 4.0 International
3.98k stars 664 forks source link

x3-ui geoip for whatsapp #199

Closed devopg closed 2 weeks ago

devopg commented 2 weeks ago

Hello. WhatsApp generally works for me, but video calls are lagging. Could you add rules for geoip:whatsapp? I actually saw them here, but for some reason, you don't have them. As I understand, you are a provider for x3-ui, and I would really like to see geoip:whatsapp in x3-ui as one of the most popular applications in the world. I think it would be in demand."

https://gitlab.com/rule-cycc/geoip image

Loyalsoldier commented 2 weeks ago

I suggest you build your own geoip files based on the output geoip.dat of this project. Refer to the following configuration example:

{
  "input": [
    {
      "type": "v2rayGeoIPDat",
      "action": "add",
      "args": {
        "uri": "https://raw.githubusercontent.com/Loyalsoldier/geoip/release/geoip.dat"
      }
    },
    // Use ASN if you can find the correct ones
    {
      "type": "maxmindGeoLite2ASNCSV",
      "action": "add",
      "args": {
        "ipv4": "./geolite2/GeoLite2-ASN-Blocks-IPv4.csv",
        "ipv6": "./geolite2/GeoLite2-ASN-Blocks-IPv6.csv",
        "wantedList": {
          "whatsapp": ["AS12345", "AS54321"] // ASN(s) here
        }
      }
    }
    // Or use plain text IP(s) or CIDR(s) like the following:
    {
      "type": "text",
      "action": "add",
      "args": {
        "name": "whatsapp",
        "uri": "https://example.com/whatsapp/ip/or/cidr/url.txt"
      }
    }
  ],
  "output": [
    {
      "type": "v2rayGeoIPDat",
      "action": "output",
      "args": {
        "outputDir": "./output",
        "outputName": "geoip.dat"
      }
    },
    {
      "type": "text",
      "action": "output"
    }
  ]
}
devopg commented 2 weeks ago

image I meant for ease of use. So that I wouldn't have to write configurations, but could just add geoip:whatsapp.