Skip to content

Commit

Permalink
feat: include full IP bases from gtdb
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodCoder666 committed Nov 1, 2024
1 parent ab3a221 commit 70e1817
Show file tree
Hide file tree
Showing 9 changed files with 1,072 additions and 916 deletions.
2 changes: 2 additions & 0 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ python main.py
> [!WARNING]
>
> The following mentioned libraries are designed for use in Mainland China. Consider running a full scan to get available IPs.
>
> This part may be outdated. Please refer to the Chinese README for accurate information.
The [official IPv4 address library](https://github.com/GoodCoder666/gtdb) is built into the program and is periodically updated with new features. You can sync the latest IP library via `Import -> Online service`. Two IP libraries from GoogleTranslateIpCheck are also available (thanks to @Ponderfly). The URLs of the three libraries are as follows:

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ python main.py

## 开发计划

> 目前收到大佬建议,正在研发新的扫描优化,敬请期待 :handshake:
- [x] IP 测速
- [x] IP 扫描
- [x] 自动写入 Hosts
Expand All @@ -125,6 +123,8 @@ python main.py
- 扩展 IPv4:https://raw.githubusercontent.com/Ponderfly/GoogleTranslateIpCheck/master/src/GoogleTranslateIpCheck/GoogleTranslateIpCheck/ip.txt
- 扩展 IPv6:https://raw.githubusercontent.com/Ponderfly/GoogleTranslateIpCheck/master/src/GoogleTranslateIpCheck/GoogleTranslateIpCheck/IPv6.txt

另有新收录的[超级地址库](https://github.com/GoodCoder666/gtdb/tree/main/full),建议在上面的所有 IP 全部失效时尝试。

同时,若 GitHub Raw 无法连接,程序将尝试使用 [ghproxy](https://ghp.ci/) 镜像,请耐心等待。

## 版权说明
Expand Down
8 changes: 8 additions & 0 deletions constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ class DefaultConfig:
(
'https://ghp.ci/https://raw.githubusercontent.com/Ponderfly/GoogleTranslateIpCheck/master/src/GoogleTranslateIpCheck/GoogleTranslateIpCheck/IPv6.txt',
'https://raw.githubusercontent.com/Ponderfly/GoogleTranslateIpCheck/master/src/GoogleTranslateIpCheck/GoogleTranslateIpCheck/IPv6.txt'
),
(
'https://ghp.ci/https://raw.githubusercontent.com/GoodCoder666/gtdb/refs/heads/main/full/v4.txt',
'https://raw.githubusercontent.com/GoodCoder666/gtdb/refs/heads/main/full/v4.txt'
),
(
'https://ghp.ci/https://raw.githubusercontent.com/GoodCoder666/gtdb/refs/heads/main/full/v6.txt',
'https://raw.githubusercontent.com/GoodCoder666/gtdb/refs/heads/main/full/v6.txt'
)
)

Expand Down
41 changes: 35 additions & 6 deletions dlgImport.ui
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<property name="title">
<string>导入来源</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QRadioButton" name="radioLocalFile">
<property name="text">
Expand Down Expand Up @@ -88,12 +88,15 @@
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>30</number>
</property>
<item>
<item row="0" column="0">
<widget class="QCheckBox" name="chkBox_off4">
<property name="toolTip">
<string>官方 IPv4 地址库,约 1000 条 IP。</string>
</property>
<property name="text">
<string>官方 IPv4</string>
</property>
Expand All @@ -102,17 +105,43 @@
</property>
</widget>
</item>
<item>
<item row="1" column="0">
<widget class="QCheckBox" name="chkBox_ext4">
<property name="toolTip">
<string>扩展 IPv4 地址库</string>
</property>
<property name="text">
<string>扩展 IPv4</string>
</property>
</widget>
</item>
<item>
<item row="1" column="1">
<widget class="QCheckBox" name="chkBox_ext6">
<property name="toolTip">
<string>(不推荐) 扩展 IPv6 地址库</string>
</property>
<property name="text">
<string>扩展 IPv6</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="chkBox_full4">
<property name="toolTip">
<string>超级 IPv4 地址库,约 23000 条 IP。</string>
</property>
<property name="text">
<string>超级 IPv4</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="chkBox_full6">
<property name="toolTip">
<string>(不推荐) 超级 IPv6 地址库,约 22000 条 IP。</string>
</property>
<property name="text">
<string>扩展 IPv6(不推荐)</string>
<string>超级 IPv6</string>
</property>
</widget>
</item>
Expand Down
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ def on_btnWait_Import_clicked(self):
else: # radioOnline
new_ips = set()
timeout = 3.5
for checkBox, urls in zip((dlg.ui.chkBox_off4, dlg.ui.chkBox_ext4, dlg.ui.chkBox_ext6),
for checkBox, urls in zip((dlg.ui.chkBox_off4, dlg.ui.chkBox_ext4, dlg.ui.chkBox_ext6,
dlg.ui.chkBox_full4, dlg.ui.chkBox_full6),
ONLINE_SERVICES):
if checkBox.isChecked():
for url in urls:
Expand Down
Loading

0 comments on commit 70e1817

Please sign in to comment.