Coder Social home page Coder Social logo

Comments (31)

a89757 avatar a89757 commented on July 22, 2024 40

不建议使用国内机构的数据源

from clash.

alecthw avatar alecthw commented on July 22, 2024 10

搞了个小项目,重新生成了GeoIP mmdb数据库,在MaxMind数据库的基础上,加入了china_ip_list和纯真CN数据库,重新生成了mmdb文件,匹配**IP更为精确。
自己动手,丰衣足食
可以直接替换openclash中的Country.mmdb使用。
https://github.com/alecthw/mmdb_china_ip_list

from clash.

kamingchan avatar kamingchan commented on July 22, 2024 5

@Dreamacro 咨询了一下 IPIP 那边的同事,他们的答复是下载需要注册是希望控制流量成本。如果我们需要使用的话,可以自行维护一个下载源。

from clash.

kamingchan avatar kamingchan commented on July 22, 2024 5

@Dreamacro @antonchen 我觉得可以增加一种规则类型吧。例如是 IP-LIST,/PATH/TO/FILE,Proxy,这样就可以利用上 https://github.com/17mon/china_ip_list 了。

from clash.

JMVoid avatar JMVoid commented on July 22, 2024 3

做了个小程序, 将ipip的china_ip_list.txt转成MaxMind mmdb格式,https://github.com/JMVoid/ipip2mmdb 在release branch 下载Country.mmdb就好

from clash.

ShaoXinSen avatar ShaoXinSen commented on July 22, 2024 2

ipip的库参考下这个
https://github.com/17mon/china_ip_list

from clash.

ShaoXinSen avatar ShaoXinSen commented on July 22, 2024 1

这个不好的话,那考虑下提供额外配置支持ipip的库?

from clash.

ShaoXinSen avatar ShaoXinSen commented on July 22, 2024 1

也可以考虑添加配置IPIP,CN,DIRECT 这种...
这种情况下就去找用户配置目录添加的ipip的数据库(当然这数据库要用户去下载)

from clash.

ysc3839 avatar ysc3839 commented on July 22, 2024 1

不知道是否可以自己生成 mmdb,如果可以的话,把 ipip 的数据转换过去就好了。

Edit: 看上去官方只提供了 Perl 的 writer。
https://blog.maxmind.com/2015/09/29/building-your-own-mmdb-database-for-fun-and-profit/
https://github.com/maxmind/MaxMind-DB-Writer-perl

from clash.

alexlee728 avatar alexlee728 commented on July 22, 2024 1

https://github.com/firehol/blocklist-ipsets/blob/master/ipip_country/ipip_country_cn.netset

http://iplists.firehol.org/?ipset=ipip_country_cn

https://cdn.ipip.net/17mon/country.zip

from clash.

alexlee728 avatar alexlee728 commented on July 22, 2024 1

搞了个小项目,重新生成了GeoIP mmdb数据库,在MaxMind数据库的基础上,加入了china_ip_list和纯真CN数据库,重新生成了mmdb文件,匹配**IP更为精确。
自己动手,丰衣足食
可以直接替换openclash中的Country.mmdb使用。
https://github.com/alecthw/mmdb_china_ip_list

想问下,clash在rules中怎么实现添加你这个?

ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaIp.list

from clash.

Dreamacro avatar Dreamacro commented on July 22, 2024

目前的 mmdb 我可以初始化启动直接下载到本机,但是注册才能下载就做不到这一点了。而且有 ipip.net 和 maxmind 两者详细的对比吗?光凭几个 IP 说明不了什么

from clash.

kamingchan avatar kamingchan commented on July 22, 2024

IPIP 的准确率的确比 Maxmind 要高(至少在处理** IP 上),可以看看 149.129.87.21 这个地址,IPIP 可以识别出是香港阿里云,而 Maxmind 认为是** IP。

image

image

from clash.

Dreamacro avatar Dreamacro commented on July 22, 2024

@kamingchan 所以怎么处理在不内嵌的情况下下载一个 ipip.net 的数据库?

from clash.

antonchen avatar antonchen commented on July 22, 2024

可以人工维护吗?建议在 Github 单独创建一个分支来存储库。

另外:我详细的看了下 ipip.net 的免费版,它只有中文版,可能需要把结果手动转换才能使用

from clash.

kamingchan avatar kamingchan commented on July 22, 2024

@a89757 理由是?

from clash.

kamingchan avatar kamingchan commented on July 22, 2024

@ShaoXinSen 这里只有**的 IP。

from clash.

ShaoXinSen avatar ShaoXinSen commented on July 22, 2024

@kamingchan
大部分人用geoip就是geoip cn direct
ipip提供的这个iplist正好就是,在其中的,那就判断cn好了

from clash.

alexlee728 avatar alexlee728 commented on July 22, 2024

IPIP 的准确率的确比 Maxmind 要高(至少在处理** IP 上),可以看看 149.129.87.21 这个地址,IPIP 可以识别出是香港阿里云,而 Maxmind 认为是** IP。

image

image

149.129.87.21
maxmind 又显示为新加坡了
https://db-ip.com/149.129.87.21 也不对,显示为**北京
ipip还是香港阿里云

from clash.

alexlee728 avatar alexlee728 commented on July 22, 2024

https://github.com/ipipdotnet/ipdb-go

from clash.

Dreamacro avatar Dreamacro commented on July 22, 2024

ipip 一段时间改一次格式,要不起

from clash.

alexlee728 avatar alexlee728 commented on July 22, 2024

ipip 一段时间改一次格式,要不起

看go版本没有变动啊,都一年多了。

from clash.

dzxx36gyy avatar dzxx36gyy commented on July 22, 2024

ipip 一段时间改一次格式,要不起

官方说以后不会改格式了,最终就是IPDB格式了

from clash.

antonchen avatar antonchen commented on July 22, 2024

ipip 一段时间改一次格式,要不起

可以使用 https://github.com/firehol/blocklist-ipsets 自制 IP 库

from clash.

alexlee728 avatar alexlee728 commented on July 22, 2024

surge_ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaIp.list

可以用这个解决,里面看起来就是ipip的数据转化来的。

效率上可能没有db格式好。但是能满足需求!

from clash.

nasbdh9 avatar nasbdh9 commented on July 22, 2024

#615 (comment)
@Dreamacro
既然可供选择的mmdb库很少,那是否可以考虑mmdb库以外的实现方式?

from clash.

Dreamacro avatar Dreamacro commented on July 22, 2024

@nasbdh9 mmdb 的格式相对来说是比较稳定和合理的,DBIP 也提供了 mmdb 的格式,你可以自己换

from clash.

Dreamacro avatar Dreamacro commented on July 22, 2024

由于已有 @alecthw 的替代方案,问题 close

from clash.

git10135405 avatar git10135405 commented on July 22, 2024

搞了个小项目,重新生成了GeoIP mmdb数据库,在MaxMind数据库的基础上,加入了china_ip_list和纯真CN数据库,重新生成了mmdb文件,匹配**IP更为精确。
自己动手,丰衣足食
可以直接替换openclash中的Country.mmdb使用。
https://github.com/alecthw/mmdb_china_ip_list

想问下,clash在rules中怎么实现添加你这个?

from clash.

git10135405 avatar git10135405 commented on July 22, 2024

@alexlee728 感觉用这个比较刷头条比较慢了?

from clash.

alexlee728 avatar alexlee728 commented on July 22, 2024

@alexlee728 感觉用这个比较刷头条比较慢了?

我用的GEOIP,rulesset数据大,不知道是不是用数据库效率更好点(不确定)

from clash.

Related Issues (20)

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.