{"id":22836546,"url":"https://github.com/lovegitgit/ip-check","last_synced_at":"2025-08-25T05:15:40.008Z","repository":{"id":262954386,"uuid":"888876597","full_name":"lovegitgit/ip-check","owner":"lovegitgit","description":"优选ip 工具，适用于CF CDN 测速，支持地区/ASN筛选，支持IPV6/CIDR，支持自定义端口，适用于各大网站加速，测速。","archived":false,"fork":false,"pushed_at":"2025-06-27T08:28:02.000Z","size":87,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-27T08:52:34.682Z","etag":null,"topics":["cdn","cloudflare","cloudfront","docker","python3","speedtest"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lovegitgit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-15T07:14:01.000Z","updated_at":"2025-06-27T08:28:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"669278a3-75b4-413b-b347-4b55856485d2","html_url":"https://github.com/lovegitgit/ip-check","commit_stats":null,"previous_names":["lovegitgit/ip-check"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lovegitgit/ip-check","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovegitgit%2Fip-check","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovegitgit%2Fip-check/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovegitgit%2Fip-check/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovegitgit%2Fip-check/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lovegitgit","download_url":"https://codeload.github.com/lovegitgit/ip-check/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovegitgit%2Fip-check/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272008780,"owners_count":24857658,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cdn","cloudflare","cloudfront","docker","python3","speedtest"],"created_at":"2024-12-12T23:11:17.421Z","updated_at":"2025-08-25T05:15:39.967Z","avatar_url":"https://github.com/lovegitgit.png","language":"Python","funding_links":[],"categories":["Geschwindigkeitstest"],"sub_categories":[],"readme":"# ip-check\n\n高效的cdn 测速工具，用于ip 优选。\n\n## Home Page\n\n[Github](https://github.com/lovegitgit/ip-check)\n\n## 安装与部署\n\n```shell\npip install -U ip-check\n# 按需修改ip-check 程序配置文件\nip-check-cfg\n# 按需修改igeo-cfg GEO 数据库配置文件\nigeo-cfg\n# 下载mmdb 数据库\nigeo-dl\n```\n\nnote: 下载mmdb 数据库可能会失败，可以手动下载mmdb 数据库到`ip-check --version` 所输出的路径\n\n## 使用方法\n\n```shell\nip-check -h\nusage: ip-check [-h] [-w WHITE_LIST [WHITE_LIST ...]] [-b BLOCK_LIST [BLOCK_LIST ...]] [-pl PREFER_LOCS [PREFER_LOCS ...]]\n                [-po PREFER_ORGS [PREFER_ORGS ...]] [-bo BLOCK_ORGS [BLOCK_ORGS ...]] [-pp PREFER_PORTS [PREFER_PORTS ...]] [-lv MAX_VT_IP_COUNT]\n                [-lr MAX_RT_IP_COUNT] [-ls MAX_ST_IP_COUNT] [-lb MAX_BT_IP_COUNT] [-p PORT] [-H HOST] [-dr] [-dv] [-ds] [-o OUTPUT] [-f] [-s SPEED]\n                [-as AVG_SPEED] [-r RTT] [-l LOSS] [-c CONFIG] [-v] [-ns] [--dry_run] [--version]\n                source [source ...]\n\nip-check 参数\n\npositional arguments:\n  source                测试源文件\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -w WHITE_LIST [WHITE_LIST ...], --white_list WHITE_LIST [WHITE_LIST ...]\n                        偏好ip参数, 格式为: expr1 expr2, 如8 9 会筛选8和9开头的ip\n  -b BLOCK_LIST [BLOCK_LIST ...], --block_list BLOCK_LIST [BLOCK_LIST ...]\n                        屏蔽ip参数, 格式为: expr1 expr2, 如8 9 会过滤8和9开头的ip\n  -pl PREFER_LOCS [PREFER_LOCS ...], --prefer_locs PREFER_LOCS [PREFER_LOCS ...]\n                        偏好国家地区选择, 格式为: expr1 expr2, 如hongkong japan 会筛选HongKong 和Japan 地区的ip\n  -po PREFER_ORGS [PREFER_ORGS ...], --prefer_orgs PREFER_ORGS [PREFER_ORGS ...]\n                        偏好org 选择, 格式为: expr1 expr2, 如org1 org2 会筛选org1, org2 的服务商ip\n  -bo BLOCK_ORGS [BLOCK_ORGS ...], --block_orgs BLOCK_ORGS [BLOCK_ORGS ...]\n                        屏蔽org 选择, 格式为: expr1 expr2, 如org1 org2 会过滤org1, org2 的服务商ip\n  -pp PREFER_PORTS [PREFER_PORTS ...], --prefer_ports PREFER_PORTS [PREFER_PORTS ...]\n                        针对ip:port 格式的测试源筛选端口, 格式为: expr1 expr2, 如443 8443 会筛选出443 和8443 端口的ip\n  -lv MAX_VT_IP_COUNT, --max_vt_ip_count MAX_VT_IP_COUNT\n                        最大用来检测有效(valid) ip数量限制\n  -lr MAX_RT_IP_COUNT, --max_rt_ip_count MAX_RT_IP_COUNT\n                        最大用来检测rtt ip数量限制\n  -ls MAX_ST_IP_COUNT, --max_st_ip_count MAX_ST_IP_COUNT\n                        最大用来检测下载(speed) 速度的ip数量限制\n  -lb MAX_BT_IP_COUNT, --max_bt_ip_count MAX_BT_IP_COUNT\n                        最大better ip的ip数量限制\n  -p PORT, --port PORT  用来检测的端口\n  -H HOST, --host HOST  可用性域名\n  -dr, --disable_rt     是否禁用RTT 测试\n  -dv, --disable_vt     是否禁用可用性测试\n  -ds, --disable_st     是否禁用速度测试\n  -o OUTPUT, --output OUTPUT\n                        输出文件\n  -f, --fast_check      是否执行快速测试\n  -s SPEED, --speed SPEED\n                        期望ip的最低网速 (kB/s)\n  -as AVG_SPEED, --avg_speed AVG_SPEED\n                        期望ip的最低平均网速 (kB/s)\n  -r RTT, --rtt RTT     期望的最大rtt (ms)\n  -l LOSS, --loss LOSS  期望的最大丢包率\n  -c CONFIG, --config CONFIG\n                        配置文件\n  -u URL, --url URL     测速地址\n  -v, --verbose         显示调试信息\n  -ns, --no_save        是否忽略保存测速结果文件\n  --dry_run             是否跳过所有测试\n  -4, --only_v4         仅测试ipv4\n  -6, --only_v6         仅测试ipv6\n  -cs CR_SIZE, --cr_size CR_SIZE\n                        cidr 随机ip 数量限制\n  --version             show program's version number and exit\n```\n\n## 配置文件\n\n执行`ip-check-cfg` 会生成`config.ini`,  按照备注修改即可。\n\n## 使用示例\n\n```shell\n# 文本参数，文本中内容支持ip、ip cidr、支持ipv6、支持ip:port 表达式\nip-check test.txt\n\n# ip 参数，支持ip、ip cidr、支持ipv6、支持ip:port 表达式\nip-check 192.168.1.1/32\nip-check fe80::/ 10\nip-check 1.1.1.1:443\n\n# 禁用可用性测试，某些情况可用性测试失效，可临时禁用。\nip-check test.txt -dv\n# 禁用rtt 测试，某些情况rtt 测试失效，可临时禁用。\nip-check test.txt -dr\n\n# ip 偏好，假设你偏好8和9 开头的ip\nip-check test.txt -w \"8\" \"9\"\n# ip 偏好，假设你喜欢8.222和8.223 开头的ip\nip-check test.txt -w \"8.222\" \"8.223\"\n# ip 厌恶，假设你不喜欢13和14 开头的ip\nip-check test.txt -b \"13\" \"14\"\n# ip 厌恶，假设你不喜欢131.13和131.14 开头的ip\nip-check test.txt -b \"131.13\" \"131.14\"\n# 按地区筛选ip\nip-check test.txt -pl \"japan\" \"hongkong\"\n# ip:port 格式的测试源只测试端口为8443 的测试源\nip-check 7.8.9.10:443 7.8.9.10:8443 -pp 8443\n\n# 指定测试端口，缺省为443\nip-check test.txt -p 8443\n\n# 指定输出文件，默认为result 与源文件的拼接\nip-check test.txt -o better-ips.txt\n\n\n# 限制参与可用性测试ip 的数量\nip-check test.txt -lv 100\n# 限制参与rtt 测试ip 的数量\nip-check test.txt -lr 100\n# 限制参与下载速度测试的ip 的数量\nip-check test.txt -ls 100\n\n# 快速测试， 开启此选项后，当到达测试时长一半下载时间后，最高网速仍未达到期网网速的一半则退出此ip 下载测速\nip-check test.txt -f\n\n# 指定期网网速，单位 kB/s\nip-check test.txt -s 20000\n\n# 指定期望的最大rtt， 单位 ms\nip-check test.txt -r 500\n```\n\n以上所有可选选项可联合使用达到最终效果。\n\n## Others\n\n使用geo 信息需要自我下载`GeoLite2-City.mmdb` 和 `GeoLite2-ASN.mmdb`，可通过`igeo-dl` 输入url 下载。\nurl 可用来源：\n\nhttps://github.com/P3TERX/GeoLite.mmdb\n\n### igeo-info\n\n查看ip 归属地信息的工具\n\n```shell\nigeo-info -h\nusage: igeo-info [-h] sources [sources ...]\n\ngeo-info 获取ip(s) 的归属地信息\n\npositional arguments:\n  sources     待获取归属地信息的ip(s)\n\noptional arguments:\n  -h, --help  show this help message and exit\n```\n\n### igeo-dl\n\n下载mmdb 数据库的工具\n\n```shell\nigeo-dl --help\nusage: igeo-dl [-h] [-u URL] [-p PROXY]\n\nigeo-dl 升级/下载geo 数据库\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -u URL, --url URL     geo 数据库下载地址, 要求结尾包含GeoLite2-City.mmdb 或GeoLite2-ASN.mmdb\n  -p PROXY, --proxy PROXY\n                        下载时使用的代理\n```\n\n### igeo-cfg\n\n`igeo-dl` 的配置文件，用于下载mmdb 数据库，建议去github 找寻。\n\n```shell\nigeo-cfg -h\nusage: igeo-cfg [-h]\n\nigeo-cfg 编辑geo config\n\noptional arguments:\n  -h, --help  show this help message and exit\n```\n\n### ip-filter\n\nip 筛选工具\n\n```shell\nusage: ip-filter [-h] [-w WHITE_LIST [WHITE_LIST ...]] [-b BLOCK_LIST [BLOCK_LIST ...]] [-pl PREFER_LOCS [PREFER_LOCS ...]]\n                 [-po PREFER_ORGS [PREFER_ORGS ...]] [-bo BLOCK_ORGS [BLOCK_ORGS ...]] -o OUTPUT\n                 sources [sources ...]\n\nip-filter: ip 筛选工具\n\npositional arguments:\n  sources               待筛选的ip(s)\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -w WHITE_LIST [WHITE_LIST ...], --white_list WHITE_LIST [WHITE_LIST ...]\n                        偏好ip参数, 格式为: expr1 expr2, 如8 9 会筛选8和9开头的ip\n  -b BLOCK_LIST [BLOCK_LIST ...], --block_list BLOCK_LIST [BLOCK_LIST ...]\n                        屏蔽ip参数, 格式为: expr1 expr2, 如8 9 会过滤8和9开头的ip\n  -pl PREFER_LOCS [PREFER_LOCS ...], --prefer_locs PREFER_LOCS [PREFER_LOCS ...]\n                        偏好国家地区选择, 格式为: expr1 expr2, 如hongkong japan 会筛选HongKong 和Japan 地区的ip\n  -po PREFER_ORGS [PREFER_ORGS ...], --prefer_orgs PREFER_ORGS [PREFER_ORGS ...]\n                        偏好org 选择, 格式为: expr1 expr2, 如org1 org2 会筛选org1, org2 的服务商ip\n  -bo BLOCK_ORGS [BLOCK_ORGS ...], --block_orgs BLOCK_ORGS [BLOCK_ORGS ...]\n                        屏蔽org 选择, 格式为: expr1 expr2, 如org1 org2 会过滤org1, org2 的服务商ip\n  -4, --only_v4         仅筛选ipv4\n  -6, --only_v6         仅筛选ipv6\n  -cs CR_SIZE, --cr_size CR_SIZE\n                        cidr 随机抽样ip 数量限制\n  -o OUTPUT, --output OUTPUT\n                        输出文件\n```\n\n## License\n\n[GNU General Public License, version 3](https://www.gnu.org/licenses/gpl-3.0.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovegitgit%2Fip-check","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flovegitgit%2Fip-check","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovegitgit%2Fip-check/lists"}