Coder Social home page Coder Social logo

loyalsoldier / geoip Goto Github PK

View Code? Open in Web Editor NEW
3.1K 30.0 559.0 16.55 MB

🌚 🌍 🌝 GeoIP 规则文件加强版,同时支持定制 V2Ray dat 格式路由规则文件 geoip.dat 和 MaxMind mmdb 格式文件 Country.mmdb。Enhanced edition of GeoIP files for V2Ray, Xray-core, Clash, Trojan-Go, Leaf and Hysteria, with replaced CN IPv4 CIDR available from ipip.net, appended CIDR lists and more.

License: Creative Commons Attribution Share Alike 4.0 International

Go 98.45% Shell 1.55%
v2ray geoip ipipnet chinalist routing maxmind-geoip ipv4 ipv6 ipv4-address ipv6-address trojan-go proxy anticensorship gfw xray ipip clash leaf

geoip's Introduction

简介

本项目每周四自动生成 GeoIP 文件,同时提供命令行界面(CLI)供用户自行定制 GeoIP 文件,包括但不限于 V2Ray dat 格式路由规则文件 geoip.dat 和 MaxMind mmdb 格式文件 Country.mmdb

This project releases GeoIP files automatically every Thursday. It also provides a command line interface(CLI) for users to customize their own GeoIP files, included but not limited to V2Ray dat format file geoip.dat and MaxMind mmdb format file Country.mmdb.

与官方版 GeoIP 的区别

  • **大陆 IPv4 地址数据融合了 IPIP.net@gaoyifan/china-operator-ip
  • **大陆 IPv6 地址数据融合了 MaxMind GeoLite2 和 @gaoyifan/china-operator-ip
  • 新增类别(方便有特殊需求的用户使用):
    • geoip:cloudflareGEOIP,CLOUDFLARE
    • geoip:cloudfrontGEOIP,CLOUDFRONT
    • geoip:facebookGEOIP,FACEBOOK
    • geoip:fastlyGEOIP,FASTLY
    • geoip:googleGEOIP,GOOGLE
    • geoip:netflixGEOIP,NETFLIX
    • geoip:telegramGEOIP,TELEGRAM
    • geoip:twitterGEOIP,TWITTER

参考配置

V2Ray 中使用本项目 .dat 格式文件的参考配置:

"routing": {
  "rules": [
    {
      "type": "field",
      "outboundTag": "Direct",
      "ip": [
        "geoip:cn",
        "geoip:private",
        "ext:cn.dat:cn",
        "ext:private.dat:private",
        "ext:geoip-only-cn-private.dat:cn",
        "ext:geoip-only-cn-private.dat:private"
      ]
    },
    {
      "type": "field",
      "outboundTag": "Proxy",
      "ip": [
        "geoip:us",
        "geoip:jp",
        "geoip:facebook",
        "geoip:telegram",
        "ext:geoip-asn.dat:facebook",
        "ext:geoip-asn.dat:telegram"
      ]
    }
  ]
}

Clash 中使用本项目 .mmdb 格式文件的参考配置:

rules:
  - GEOIP,PRIVATE,policy,no-resolve
  - GEOIP,FACEBOOK,policy
  - GEOIP,CN,policy,no-resolve

Leaf 中使用本项目 .mmdb 格式文件的参考配置,查看官方 README

下载地址

如果无法访问域名 raw.githubusercontent.com,可以使用第二个地址 cdn.jsdelivr.net。 *.sha256sum 为校验文件。

V2Ray dat 格式路由规则文件

适用于 V2RayXray-coreTrojan-Go

MaxMind mmdb 格式文件

适用于 ClashLeaf

定制 GeoIP 文件

可通过以下几种方式定制 GeoIP 文件:

  • 在线生成Fork 本仓库后,修改自己仓库内的配置文件 config.json 和 GitHub Workflow .github/workflows/build.yml
  • 本地生成
    • 安装 GolangGit
    • 拉取项目代码: git clone https://github.com/Loyalsoldier/geoip.git
    • 进入项目根目录:cd geoip
    • 修改配置文件 config.json
    • 运行代码:go run ./

特别说明:

  • 在线生成Fork 本项目后,如果需要使用 MaxMind GeoLite2 Country CSV 数据文件,需要在自己仓库的 [Settings] 选项卡的 [Secrets] 页面中添加一个名为 MAXMIND_GEOLITE2_LICENSE 的 secret,否则 GitHub Actions 会运行失败。这个 secret 的值为 MAXMIND 账号的 LICENSE KEY,需要注册 MAXMIND 账号后,在个人账号管理页面左侧边栏的 [Services] 项下的 [My License Key] 里生成。
  • 本地生成:如果需要使用 MaxMind GeoLite2 Country CSV 数据文件(GeoLite2-Country-CSV.zip),需要提前从 MaxMind 下载,或从本项目 release 分支下载,并解压缩到名为 geolite2 的目录。

概念解析

本项目有两个概念:inputoutputinput 指数据源(data source)及其输入格式,output 指数据的去向(data destination)及其输出格式。CLI 的作用就是通过读取配置文件中的选项,聚合用户提供的所有数据源,去重,将其转换为目标格式,并输出到文件。

These two concepts are notable: input and output. The input is the data source and its input format, whereas the output is the destination of the converted data and its output format. What the CLI does is to aggregate all input format data, then convert them to output format and write them to GeoIP files by using the options in the config file.

支持的格式

关于每种格式所支持的配置选项,查看本项目 config-example.json 文件。

支持的 input 输入格式:

  • text:纯文本 IP 和 CIDR(例如:1.1.1.11.0.0.0/24
  • private:局域网和私有网络 CIDR(例如:192.168.0.0/16127.0.0.0/8
  • cutter:用于裁剪前置步骤中的数据
  • v2rayGeoIPDat:V2Ray GeoIP dat 格式(geoip.dat
  • maxmindMMDB:MaxMind mmdb 数据格式(GeoLite2-Country.mmdb
  • maxmindGeoLite2CountryCSV:MaxMind GeoLite2 country CSV 数据(GeoLite2-Country-CSV.zip
  • clashRuleSetClassicalclassical 类型的 Clash RuleSet
  • clashRuleSetipcidr 类型的 Clash RuleSet
  • surgeRuleSetSurge RuleSet

支持的 output 输出格式:

注意事项

由于 MaxMind mmdb 文件格式的限制,当不同列表的 IP 或 CIDR 数据有交集或重复项时,后写入的列表的 IP 或 CIDR 数据会覆盖(overwrite)之前已写入的列表的数据。譬如,IP 1.1.1.1 同属于列表 AU 和列表 Cloudflare。如果 CloudflareAU 之后写入,则 IP 1.1.1.1 归属于列表 Cloudflare

为了确保某些指定的列表、被修改的列表一定囊括属于它的所有 IP 或 CIDR 数据,可在 output 输出格式为 maxmindMMDB 的配置中增加选项 overwriteList,该选项中指定的列表会在最后逐一写入,列表中最后一项优先级最高。若已设置选项 wantedList,则无需设置 overwriteListwantedList 中指定的列表会在最后逐一写入,列表中最后一项优先级最高。

CLI 功能展示

可通过 go install -v github.com/Loyalsoldier/geoip@latest 直接安装 CLI。

$ ./geoip -h
Usage of ./geoip:
  -c string
    	URI of the JSON format config file, support both local file path and remote HTTP(S) URL (default "config.json")
  -l	List all available input and output formats

$ ./geoip -c config.json
2021/08/29 12:11:35 ✅ [v2rayGeoIPDat] geoip.dat --> output/dat
2021/08/29 12:11:35 ✅ [v2rayGeoIPDat] geoip-only-cn-private.dat --> output/dat
2021/08/29 12:11:35 ✅ [v2rayGeoIPDat] geoip-asn.dat --> output/dat
2021/08/29 12:11:35 ✅ [v2rayGeoIPDat] cn.dat --> output/dat
2021/08/29 12:11:35 ✅ [v2rayGeoIPDat] private.dat --> output/dat
2021/08/29 12:11:39 ✅ [maxmindMMDB] Country.mmdb --> output/maxmind
2021/08/29 12:11:39 ✅ [maxmindMMDB] Country-only-cn-private.mmdb --> output/maxmind
2021/08/29 12:11:39 ✅ [text] netflix.txt --> output/text
2021/08/29 12:11:39 ✅ [text] telegram.txt --> output/text
2021/08/29 12:11:39 ✅ [text] cn.txt --> output/text
2021/08/29 12:11:39 ✅ [text] cloudflare.txt --> output/text
2021/08/29 12:11:39 ✅ [text] cloudfront.txt --> output/text
2021/08/29 12:11:39 ✅ [text] facebook.txt --> output/text
2021/08/29 12:11:39 ✅ [text] fastly.txt --> output/text

$ ./geoip -l
All available input formats:
  - v2rayGeoIPDat (Convert V2Ray GeoIP dat to other formats)
  - maxmindMMDB (Convert MaxMind mmdb database to other formats)
  - maxmindGeoLite2CountryCSV (Convert MaxMind GeoLite2 country CSV data to other formats)
  - private (Convert LAN and private network CIDR to other formats)
  - text (Convert plaintext IP & CIDR to other formats)
  - clashRuleSetClassical (Convert classical type of Clash RuleSet to other formats (just processing IP & CIDR lines))
  - clashRuleSet (Convert ipcidr type of Clash RuleSet to other formats)
  - surgeRuleSet (Convert Surge RuleSet to other formats (just processing IP & CIDR lines))
  - cutter (Remove data from previous steps)
  - test (Convert specific CIDR to other formats (for test only))
All available output formats:
  - v2rayGeoIPDat (Convert data to V2Ray GeoIP dat format)
  - maxmindMMDB (Convert data to MaxMind mmdb database format)
  - clashRuleSetClassical (Convert data to classical type of Clash RuleSet)
  - clashRuleSet (Convert data to ipcidr type of Clash RuleSet)
  - surgeRuleSet (Convert data to Surge RuleSet)
  - text (Convert data to plaintext CIDR format)

License

CC-BY-SA-4.0

This product includes GeoLite2 data created by MaxMind, available from MaxMind.

项目 Star 数增长趋势

Stargazers over time

geoip's People

Contributors

darienraymond avatar dependabot[bot] avatar github-actions[bot] avatar icecodenew avatar kslr avatar kunish avatar loyalsoldier avatar toutyrater avatar umlka avatar victoriaraymond avatar wangling12 avatar yin1999 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

geoip's Issues

定制`Country.mmdb`增加自己IP到HK,本地生成,结果仍归属于CN

生成流程

config.json(我将自定义的放在了input列表最后):

{
  "input": [
    {
      "type": "maxmindGeoLite2CountryCSV",
      "action": "add",
      "args": {
        "country": "./geolite2/GeoLite2-Country-Locations-en.csv",
        "ipv4": "./geolite2/GeoLite2-Country-Blocks-IPv4.csv",
        "ipv6": "./geolite2/GeoLite2-Country-Blocks-IPv6.csv"
      }
    },
    {
      "type": "cutter",
      "action": "remove",
      "args": {
        "wantedList": ["cn"],
        "onlyIPType": "ipv4"
      }
    },
    {
      "type": "text",
      "action": "add",
      "args": {
        "name": "cn",
        "uri": "https://raw.githubusercontent.com/17mon/china_ip_list/master/china_ip_list.txt",
        "onlyIPType": "ipv4"
      }
    },
    {
      "type": "text",
      "action": "add",
      "args": {
        "name": "cn",
        "uri": "https://raw.githubusercontent.com/gaoyifan/china-operator-ip/ip-lists/china.txt",
        "onlyIPType": "ipv4"
      }
    },
    {
      "type": "text",
      "action": "add",
      "args": {
        "name": "cn",
        "uri": "https://raw.githubusercontent.com/gaoyifan/china-operator-ip/ip-lists/china6.txt",
        "onlyIPType": "ipv6"
      }
    },
    {
      "type": "text",
      "action": "add",
      "args": {
        "name": "cloudflare",
        "uri": "https://www.cloudflare.com/ips-v4"
      }
    },
    {
      "type": "text",
      "action": "add",
      "args": {
        "name": "cloudflare",
        "uri": "https://www.cloudflare.com/ips-v6"
      }
    },
    {
      "type": "text",
      "action": "add",
      "args": {
        "name": "telegram",
        "uri": "https://core.telegram.org/resources/cidr.txt"
      }
    },
    {
      "type": "private",
      "action": "add"
    },
    {
      "type": "text",
      "action": "add",
      "args": {
        "name": "hk",
        "uri": "geo/hk.txt"
      }
    }
  ],
  "output": [
    {
      "type": "maxmindMMDB",
      "action": "output",
      "args": {
        "outputName": "Country.mmdb",
        "overwriteList": [
          "hk"
        ]
      }
    },
    {
      "type": "text",
      "action": "output"
    }
  ]
}

geo/hk.txt:

43.198.178.151/32

生成log:

2023/08/14 02:03:00 ✅ [maxmindMMDB] Country.mmdb --> output\maxmind
2023/08/14 02:03:00 ✅ [text] hm.txt --> output\text
2023/08/14 02:03:00 ✅ [text] bj.txt --> output\text
……

测试流程

复制 output/maxmind/Country.mmdbC:\%userprofile%\.config\clash\

重启CFW。

使用 CFW Script Test 功能(基于 Clash Premium Script),对添加的IP进行测试。

代码:

def main(ctx, metadata):
  region = ctx.geoip(metadata["host"])
  return region

仍然返回CN:

image

在 config.json 文件中配置 IP 源,但源中不能有以“::”开头的 IP 段

比如在 config.json 里添加含有 IP 段的源:

::ffff:198.18.5.138/128
::ffff:198.18.6.81/128
::ffff:198.18.6.83/128

在运行 GitHub Actions 时会报错,报错信息如下:

2023/08/12 04:00:10 AddPrefix(1[9](https://github.com/DustinWin/clash-geoip/actions/runs/5839247439/job/15837200252#step:11:10)8.18.5.138/-1) @ /home/runner/work/clash-geoip/clash-geoip/lib/lib.go:214 /home/runner/work/clash-geoip/clash-geoip/lib/lib.go:252 /home/runner/work/clash-geoip/clash-geoip/plugin/plaintext/common_in.go:47 /home/runner/work/clash-geoip/clash-geoip/plugin/plaintext/common_in.go:26 /home/runner/work/clash-geoip/clash-geoip/plugin/plaintext/text_in.go:194 /home/runner/work/clash-geoip/clash-geoip/plugin/plaintext/text_in.go:88 /home/runner/work/clash-geoip/clash-geoip/lib/instance.go:60 /home/runner/work/clash-geoip/clash-geoip/main.go:38 /opt/hostedtoolcache/go/1.19.12/x64/src/runtime/proc.go:250; AddPrefix(198.18.6.81/-1) @ /home/runner/work/clash-geoip/clash-geoip/lib/lib.go:214 /home/runner/work/clash-geoip/clash-geoip/lib/lib.go:252 /home/runner/work/clash-geoip/clash-geoip/plugin/plaintext/common_in.go:47 /home/runner/work/clash-geoip/clash-geoip/plugin/plaintext/common_in.go:26 /home/runner/work/clash-geoip/clash-geoip/plugin/plaintext/text_in.go:194 /home/runner/work/clash-geoip/clash-geoip/plugin/plaintext/text_in.go:88 /home/runner/work/clash-geoip/clash-geoip/lib/instance.go:60 /home/runner/work/clash-geoip/clash-geoip/main.go:38 /opt/hostedtoolcache/go/1.19.12/x64/src/runtime/proc.go:250; AddPrefix(198.18.6.83/-1) @ /home/runner/work/clash-geoip/clash-geoip/lib/lib.go:214 /home/runner/work/clash-geoip/clash-geoip/lib/lib.go:252 /home/runner/work/clash-geoip/clash-geoip/plugin/plaintext/common_in.go:47 /home/runner/work/clash-geoip/clash-geoip/plugin/plaintext/common_in.go:26 /home/runner/work/clash-geoip/clash-geoip/plugin/plaintext/text_in.go:194 /home/runner/work/clash-geoip/clash-geoip/plugin/plaintext/text_in.go:88 /home/runner/work/clash-geoip/clash-geoip/lib/instance.go:60 /home/runner/work/clash-geoip/clash-geoip/main.go:38 /opt/hostedtoolcache/go/1.19.12/x64/src/runtime/proc.go:250
exit status 1
Error: Process completed with exit code 1.

为什么已有mmdb但用不了

[root@localhost ~]# ./clash-linux-amd64-v1.10.0 -f Country.mmdb
INFO[0000] Can't find MMDB, start download
[root@localhost ~]# ls
公共 视频 文档 音乐 clash-linux-amd64-v1.10.0 index.html PixivBiu prometheus.yml
模板 图片 下载 桌面 Country.mmdb node_exporter-1.3.1.linux-amd64 prometheus-2.34.0.linux-amd64

IPv6也存在HK被放到CN分类下的问题

这个列表 https://github.com/Loyalsoldier/geoip/blob/release/text/cn.txt

包含了 2405:f3c0::/48 然而这个段是HK的。对比下maxmind的geolite2,应该是maxmind库不准的问题。
HK只包含了 2405:f3c0:1:55b0::/64 2405:f3c0:1:7a9d::/64
虽然可以fork自己改,不过为了方便一般用户能否官方生成v6时候不使用 GeoLite2 这个库呢?

(少开一个issue,geosite也有把tiktok相关域名全算到CN的问题。但是tiktok不是抖音,不应该算到CN下吧。

geolocation

i config v2ray server in hetzner. after 2week, google find my real location and i get 403 forbidden in all service like docker and other google. how can i prevent exposed my real geo location.

i dont have dns leak.

CloudFront有IPv6地址,但release/text里没有

根据 CloudFront 邊緣伺服器的位置和 IP 地址範圍 提到的网址 ip-ranges.json 我搜到包含"service": "CLOUDFRONT"的IPv6地址

    {
      "ipv6_prefix": "2600:9000:3000::/36",
      "region": "GLOBAL",
      "service": "CLOUDFRONT",
      "network_border_group": "GLOBAL"
    },
    {
      "ipv6_prefix": "2600:9000:ddd::/48",
      "region": "GLOBAL",
      "service": "CLOUDFRONT",
      "network_border_group": "GLOBAL"
    },
    {
      "ipv6_prefix": "2600:9000:5300::/40",
      "region": "GLOBAL",
      "service": "CLOUDFRONT",
      "network_border_group": "GLOBAL"
    },
    {
      "ipv6_prefix": "2600:9000:1000::/36",
      "region": "GLOBAL",
      "service": "CLOUDFRONT",
      "network_border_group": "GLOBAL"
    },
    {
      "ipv6_prefix": "2600:9000:2000::/36",
      "region": "GLOBAL",
      "service": "CLOUDFRONT",
      "network_border_group": "GLOBAL"
    },
    {
      "ipv6_prefix": "2400:7fc0:500::/40",
      "region": "GLOBAL",
      "service": "CLOUDFRONT",
      "network_border_group": "GLOBAL"
    },
    {
      "ipv6_prefix": "2600:9000:4000::/36",
      "region": "GLOBAL",
      "service": "CLOUDFRONT",
      "network_border_group": "GLOBAL"
    },
    {
      "ipv6_prefix": "2600:9000:fff::/48",
      "region": "GLOBAL",
      "service": "CLOUDFRONT",
      "network_border_group": "GLOBAL"
    },
    {
      "ipv6_prefix": "2404:c2c0:500::/40",
      "region": "GLOBAL",
      "service": "CLOUDFRONT",
      "network_border_group": "GLOBAL"
    },
    {
      "ipv6_prefix": "2600:9000:f000::/36",
      "region": "GLOBAL",
      "service": "CLOUDFRONT",
      "network_border_group": "GLOBAL"
    },
    {
      "ipv6_prefix": "2600:9000:eee::/48",
      "region": "GLOBAL",
      "service": "CLOUDFRONT",
      "network_border_group": "GLOBAL"
    },

关于Geo资源文件

Geo资源文件(包括geoip.dat和geosite.dat)是否支持V2rayNG,并在其中添加成订阅源一样方便更新?

ipip.net 使用新的tag

背景

现在的数据,CN 的 IP 数据被直接替换为 ipip.net, 但是这个也不是100%准确的

比如 202.111.33.236 这个 IP 地址查到是江苏电信的,在 maxmind 数据库中属于 CN, 但是不在 ipip.net

数据对比

https://www.diffchecker.com/sfir57f0
image

需求

所以是否可以把 ipip.net 做一个单独打 tag,如 cn-ipip,原始数据保留,这样可以让用户自己选择使用哪个数据库,甚至可以使用2个数据库,取并集

geoip:yahoo

Hi. Is it possible to add a geoip category for Yahoo, say geoip:yahoo? Thanks.

size of geoip too big

Hey, I am forking your repo and running the built in workflow but until yesterday the geoip file was around 5 mb but now its 46 mb. I tried deleting the repo and starting from scratch but still the size of generated file is 46mb.

https://github.com/t-e-s-tweb/geoip/releases/tag/202107280149

And its apparently happening to every body. I searched on other repos and this is what I found

https://github.com/URARUA/geoip/releases/tag/202107271336

https://github.com/IceCodeNew/geoip/releases/tag/202107270351

getting HTTP 500 status code while fetching assets on the ripe.net

[user@xxx ~]# asn=AS55095 && curl -vIL "https://stat.ripe.net/data/ris-prefixes/data.json?list_prefixes=true&types=o&resource=${asn}"
*   Trying 193.0.6.150:443...
*   Trying 2001:67c:2e8:22::c100:696:443...
* Immediate connect fail for 2001:67c:2e8:22::c100:696: Network is unreachable
* Connected to stat.ripe.net (193.0.6.150) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
*  CAfile: /etc/pki/tls/certs/ca-bundle.crt
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS header, Finished (20):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS header, Finished (20):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=stat.ripe.net
*  start date: Dec  9 05:09:16 2022 GMT
*  expire date: Mar  9 05:09:15 2023 GMT
*  subjectAltName: host "stat.ripe.net" matched cert's "stat.ripe.net"
*  issuer: C=US; O=Let's Encrypt; CN=R3
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* TLSv1.2 (OUT), TLS header, Unknown (23):
* TLSv1.2 (OUT), TLS header, Unknown (23):
* TLSv1.2 (OUT), TLS header, Unknown (23):
* Using Stream ID: 1 (easy handle 0x588e70e45560)
* TLSv1.2 (OUT), TLS header, Unknown (23):
> HEAD /data/ris-prefixes/data.json?list_prefixes=true&types=o&resource=AS55095 HTTP/2
> Host: stat.ripe.net
> user-agent: curl/7.76.1
> accept: */*
>
* TLSv1.2 (IN), TLS header, Unknown (23):
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
* TLSv1.2 (OUT), TLS header, Unknown (23):
* TLSv1.2 (IN), TLS header, Unknown (23):
* TLSv1.2 (IN), TLS header, Unknown (23):
< HTTP/2 500
HTTP/2 500
< server: nginx
server: nginx
< date: Sat, 31 Dec 2022 06:11:25 GMT
date: Sat, 31 Dec 2022 06:11:25 GMT
< content-type: application/json; charset=utf-8
content-type: application/json; charset=utf-8
< content-length: 652
content-length: 652
< vary: Cookie, Accept-Encoding
vary: Cookie, Accept-Encoding
< access-control-allow-origin: *
access-control-allow-origin: *

<
* Connection #0 to host stat.ripe.net left intact

Remove 51IDC IP CIDR from geoip:cn

Some of the IPs they use, such as 118.184.78.78, are being used as polluted IPs by the public DNS in China.

Besttrace thinks it's a HK IP, some projects believe it is in line with geoip:cn.

Meanwhile, using HE's BGP tool, you can see that it is in both AS137443(HK) and AS58879(CN).

Although the probability of being polluted to this service provider's IP is low, it is not zero, so I would like to temporarily exclude the HK IP segment of this service provider

✨ 激赏 | Donation ✨

通过比特币激励我创作|Buy me a coffee by BTC:

  • 比特币(BTC)bech32 地址:bc1qfe4nxcanet4w4ph8pf6qqyf263y68vw26nv9j9
  • 比特币(BTC)地址:3PRyneb1D7jFFBakAaJiCRSsxsXAtMr7LN

请问如何增加自定义IP段的相关操作?

我想增加关于SpeedTest的代理IP段,但是在Config.json看不懂是如何定义一个IP段的,除了cn的那个url。
最终我在asn.csv文件里找到了关于您添加的AS字段,例如Twitter的“twitter,AS8945|AS54888|AS35995|AS13414”
请问我要如何添加和寻找Speedtest相关的测速节点IP段呢?

ipip国内数据

在本地怎么打 包含ipip.net的数据 release分支里面没有源文件

202208180147 country not found in geoip.dat: facebook

最新 202208180147 有以下error

infra/conf/rule: invalid field rule > infra/conf/rule: failed to load geoip: facebook > infra/conf/geodata/standard: country not found in geoip.dat: facebook

前一个 202208110813 也运作正常, 没这个error

安卓TV Netflix 被检测到代理

设备时 amazon 的 火棒,用的 v2fly 中转 Netflix 请求,正常观看一会儿,就会弹出检测到VPN。

// 中转机 routing 配置
"routing": {
    "domainStrategy": "IPIfNonMatch",
    "rules": [
      {
        "type": "field",
        "outboundTag": "vless_netflix_transport",
        "domains": ["geosite:netflix", "geosite:disney", "geosite:twitch", "domain:ip.gs"]
      },
      {
        "type": "field",
        "outboundTag": "vless_netflix_transport",
        // 想要使用 geoip:netflix 需要更换第三方 geoip
        // https://github.com/Loyalsoldier/geoip
        "ip": ["geoip:netflix"]
      },
      {
        "type": "field",
        "network": "tcp,udp",
        "outboundTag": "freedom" // 默认直连
      }
    ]
  }

明明已经配置好了 geosite 和 geoip, 但看上一两集非自制剧,就会提示检测到VPN。
强制结束Netflix,再重新打开就又能看几集。
感觉像是IP段没有覆盖完全。

另外我搜了网友说的,比如会发送DNS请求给 netflix ,而dns请求没有经过中转机中转,所以会被检测到。
或者说 NETFLIX有使用AWS的服务器,所以 amazonaws.com 也需要加入中转规则,
大佬您怎么看?可能是哪里的问题?
客户端使用的 ClashForAndroid 最新版。

请问CLI是否支持手动查询匹配site或者ip是否在库

您好,我的xray项目使用了您的geosite和geoip库,但是我按照规范设置了一些rule之后,我发现有一些网站不是我想屏蔽的,但是我不知道如何查询目标网站是匹配中了geosite或者gepip的哪一个库,请问是否有方法可以手动进行查询并给出匹配中的库或者规则,我想象中它的功能可能像这个样子:

root:~$ ./geoip -f www.netflix.com
`www.netflix.com` >> geosite: Netflix
root:~$ ./geoip -f 223.5.5.5
`223.5.5.5` >> geoip: CN

如有冒犯,敬请海涵。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.