Skip to content

Commit

Permalink
chore: use geosite in fake-ip-filter for china ip bypass
Browse files Browse the repository at this point in the history
  • Loading branch information
vernesong committed Aug 28, 2024
1 parent 83eff00 commit c3844db
Show file tree
Hide file tree
Showing 35 changed files with 124 additions and 65,392 deletions.
1 change: 0 additions & 1 deletion luci-app-openclash/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ define Package/$(PKG_NAME)/postrm
rm -rf ${dnsmasqconfdir}/dnsmasq_openclash_custom_domain.conf >/dev/null 2>&1
rm -rf ${dnsmasqconfdir}/dnsmasq_openclash_chnroute_pass.conf >/dev/null 2>&1
rm -rf ${dnsmasqconfdir}/dnsmasq_openclash_chnroute6_pass.conf >/dev/null 2>&1
rm -rf ${dnsmasqconfdir}/dnsmasq_accelerated-domains.china.conf >/dev/null 2>&1
rm -rf /tmp/dler* >/dev/null 2>&1
rm -rf /tmp/etc/openclash >/dev/null 2>&1
rm -rf /tmp/openclash_edit_file_name >/dev/null 2>&1
Expand Down
40 changes: 6 additions & 34 deletions luci-app-openclash/luasrc/model/cbi/openclash/settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -257,30 +257,12 @@ o:depends("en_mode", "redir-host")
o:depends("en_mode", "redir-host-tun")
o:depends("en_mode", "redir-host-mix")

if op_mode == "redir-host" then
o = s:taboption("traffic_control", ListValue, "china_ip_route", translate("China IP Route"))
o.description = translate("Bypass Specified Regions Network Flows, Improve Performance")
o.default = 0
o:value("0", translate("Disable"))
o:value("1", translate("Bypass Mainland China"))
o:value("2", translate("Bypass Overseas"))
else
o = s:taboption("traffic_control", ListValue, "china_ip_route", translate("China IP Route"))
o.description = translate("Bypass Specified Regions Network Flows, Improve Performance, If Inaccessibility on Bypass Gateway, Try to Enable Bypass Gateway Compatible Option, Depend on Dnsmasq")
o.default = 0
o:value("0", translate("Disable"))
o:value("1", translate("Bypass Mainland China"))
o:value("2", translate("Bypass Overseas"))
o:depends("enable_redirect_dns", "1")
o:depends("enable_redirect_dns", "0")

o = s:taboption("traffic_control", Value, "custom_china_domain_dns_server", translate("Specify CN DNS Server"))
o.description = translate("Specify DNS Server For CN Domain Lists, Only One IP Server Address Support")
o.default = "114.114.114.114"
o.placeholder = translate("114.114.114.114 or 127.0.0.1#5300")
o:depends("china_ip_route", "1")
o:depends("china_ip_route", "2")
end
o = s:taboption("traffic_control", ListValue, "china_ip_route", translate("China IP Route"))
o.description = translate("Bypass Specified Regions Network Flows, Improve Performance, If Inaccessibility on Bypass Gateway, Try to Enable Bypass Gateway Compatible Option")
o.default = 0
o:value("0", translate("Disable"))
o:value("1", translate("Bypass Mainland China"))
o:value("2", translate("Bypass Overseas"))

o = s:taboption("traffic_control", Flag, "intranet_allowed", translate("Only intranet allowed"))
o.description = translate("When Enabled, The Control Panel And The Connection Broker Port Will Not Be Accessible From The Public Network")
Expand Down Expand Up @@ -1064,16 +1046,6 @@ o.description = translate("Custom Chnroute6 Lists URL, Click Button Below To Ref
o:value("https://ispip.clang.cn/all_cn_ipv6.txt", translate("Clang-CN-IPV6")..translate("(Default)"))
o.default = "https://ispip.clang.cn/all_cn_ipv6.txt"

o = s:taboption("chnr_update", Value, "cndomain_custom_url")
o.title = translate("Custom CN Doamin Lists URL")
o.rmempty = false
o.description = translate("Custom CN Doamin Dnsmasq Conf URL, Click Button Below To Refresh After Edit")
o:value("https://testingcf.jsdelivr.net/gh/felixonmars/dnsmasq-china-list@master/accelerated-domains.china.conf", translate("dnsmasq-china-list-testingcf-jsdelivr")..translate("(Default)"))
o:value("https://fastly.jsdelivr.net/gh/felixonmars/dnsmasq-china-list@master/accelerated-domains.china.conf", translate("dnsmasq-china-list-fastly-jsdelivr"))
o:value("https://raw.fastgit.org/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf", translate("dnsmasq-china-list-fastgit"))
o:value("https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf", translate("dnsmasq-china-list-github"))
o.default = "https://testingcf.jsdelivr.net/gh/felixonmars/dnsmasq-china-list@master/accelerated-domains.china.conf"

o = s:taboption("chnr_update", Button, translate("Chnroute Lists Update"))
o.title = translate("Update Chnroute Lists")
o.inputtitle = translate("Check And Update")
Expand Down
2 changes: 1 addition & 1 deletion luci-app-openclash/luasrc/view/openclash/status.htm
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
</td></tr>
<tr><td width="25%"><%:Node Select Backup%></td><td width="25%" align="left" id="_historychecktime"><%:Collecting data...%></td><td width="25%"><%:lhie1 Rule Update%></td><td width="25%" align="left" id="_lhie1"><%:Collecting data...%></td></tr>
<tr><td width="25%"><%:Mainland IP Update%></td><td width="25%" align="left" id="_chnroute"><%:Collecting data...%></td><td width="25%"><%: Mainland IPv6 Update%></td><td width="25%" align="left" id="_chnroutev6"><%:Collecting data...%></td></tr>
<tr><td width="25%"><%:GEOIP Data Update%></td><td width="25%" align="left" id="_ipdb"><%:Collecting data...%></td><td width="25%"><%:GeoSite Data Update%></td><td width="25%" align="left" id="_geosite"><%:Collecting data...%></td></tr>
<tr><td width="25%"><%:GeoIP Data Update%></td><td width="25%" align="left" id="_ipdb"><%:Collecting data...%></td><td width="25%"><%:GeoSite Data Update%></td><td width="25%" align="left" id="_geosite"><%:Collecting data...%></td></tr>
</table>
</fieldset>
<script type="text/javascript">//<![CDATA[
Expand Down
49 changes: 5 additions & 44 deletions luci-app-openclash/po/zh-cn/openclash.zh-cn.po
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,8 @@ msgstr "绕过中国大陆"
msgid "Bypass Overseas"
msgstr "海外用户回国模式"

msgid "Bypass Specified Regions Network Flows, Improve Performance"
msgstr "启用后指定区域流量将不再经过内核,提升系统性能"

msgid "Bypass Specified Regions Network Flows, Improve Performance, If Inaccessibility on Bypass Gateway, Try to Enable Bypass Gateway Compatible Option, Depend on Dnsmasq"
msgstr "启用后指定区域流量将不再经过内核,提升系统性能,如旁路由遇到无法访问,请尝试启用旁路由兼容模式,此功能依赖于 Dnsmasq"
msgid "Bypass Specified Regions Network Flows, Improve Performance, If Inaccessibility on Bypass Gateway, Try to Enable Bypass Gateway Compatible Option"
msgstr "启用后指定区域流量将不再经过内核,提升系统性能,如旁路由遇到无法访问,请尝试启用旁路由兼容模式"

msgid "Log Level"
msgstr "日志等级"
Expand Down Expand Up @@ -1227,8 +1224,8 @@ msgstr "大陆 IPv6 白名单 更新日期"
msgid "lhie1 Rule Update"
msgstr "lhie1 规则更新日期"

msgid "GEOIP Data Update"
msgstr "GEOIP 数据库日期"
msgid "GeoIP Data Update"
msgstr "GeoIP 数据库日期"

msgid "GeoSite Data Update"
msgstr "GeoSite 数据库日期"
Expand Down Expand Up @@ -1488,9 +1485,6 @@ msgstr "大陆IPv6段更新 URL"
msgid "Custom Chnroute Lists URL"
msgstr "大陆IP段更新 URL"

msgid "Custom CN Doamin Lists URL"
msgstr "大陆域名列表文件更新 URL"

msgid "Custom GeoIP MMDB URL, Click Button Below To Refresh After Edit"
msgstr "自定义 GeoIP MMDB 数据库的更新来源,编辑后点击下方按钮生效"

Expand All @@ -1503,9 +1497,6 @@ msgstr "自定义大陆 IP 段的更新来源,编辑后点击下方按钮生
msgid "Custom Chnroute6 Lists URL, Click Button Below To Refresh After Edit"
msgstr "自定义大陆 IPv6 段的更新来源,编辑后点击下方按钮生效"

msgid "Custom CN Doamin Dnsmasq Conf URL, Click Button Below To Refresh After Edit"
msgstr "自定义大陆域名列表配置文件(Dnsmasq Conf)的更新来源,编辑后点击下方按钮生效"

msgid "(Default)"
msgstr "(默认)"

Expand Down Expand Up @@ -1764,54 +1755,36 @@ msgstr "开始下载大陆 IP 白名单..."
msgid "Start Downloading The Chnroute6 Cidr List..."
msgstr "开始下载大陆 IPv6 白名单..."

msgid "Start Downloading The CN Domains List..."
msgstr "开始下载大陆域名白名单..."

msgid "Chnroute Cidr List Download Success, Check Updated..."
msgstr "大陆 IP 白名单下载成功,检查版本是否更新..."

msgid "Chnroute6 Cidr List Download Success, Check Updated..."
msgstr "大陆 IPv6 白名单下载成功,检查版本是否更新..."

msgid "CN Domains List Download Success, Check Updated..."
msgstr "大陆域名白名单下载成功,检查版本是否更新..."

msgid "Chnroute Cidr List Has Been Updated, Starting To Replace The Old Version..."
msgstr "大陆 IP 白名单有更新,开始替换旧版本..."

msgid "Chnroute6 Cidr List Has Been Updated, Starting To Replace The Old Version..."
msgstr "大陆 IPv6 白名单有更新,开始替换旧版本..."

msgid "CN Domains List Has Been Updated, Starting To Replace The Old Version..."
msgstr "大陆域名白名单有更新,开始替换旧版本..."

msgid "Chnroute Cidr List Update Successful!"
msgstr "大陆 IP 白名单更新成功!"

msgid "Chnroute6 Cidr List Update Successful!"
msgstr "大陆 IPv6 白名单更新成功!"

msgid "CN Domains List Update Successful!"
msgstr "大陆域名白名单更新成功!"

msgid "Updated Chnroute Cidr List No Change, Do Nothing..."
msgstr "大陆 IP 白名单没有更新,停止继续操作..."

msgid "Updated Chnroute6 Cidr List No Change, Do Nothing..."
msgstr "大陆 IPv6 白名单没有更新,停止继续操作..."

msgid "Updated CN Domains List No Change, Do Nothing..."
msgstr "大陆域名白名单没有更新,停止继续操作..."

msgid "Chnroute Cidr List Update Error, Please Try Again Later..."
msgstr "大陆 IP 白名单下载失败,请检查网络或稍后再试..."

msgid "Chnroute6 Cidr List Update Error, Please Try Again Later..."
msgstr "大陆 IPv6 白名单下载失败,请检查网络或稍后再试..."

msgid "CN Domains List Update Error, Please Try Again Later..."
msgstr "大陆域名白名单下载失败,请检查网络或稍后再试..."

msgid "Start Downloading GeoSite Database..."
msgstr "开始下载 GeoSite 数据库..."

Expand Down Expand Up @@ -1977,7 +1950,7 @@ msgstr "提示:检测到 GEOIP Dat 数据库文件不存在,准备开始下
msgid "Tip: Detected that the Core is not Installed, Ready to Download..."
msgstr "提示:检测到内核文件不存在,准备开始下载..."

msgid "Tip: Detected that the Chnroute Cidr or CN Domains List is not Installed, Ready to Download..."
msgid "Tip: Detected that the Chnroute Cidr is not Installed, Ready to Download..."
msgstr "提示:检测到大陆白名单列表不存在,准备开始下载..."

msgid "Tip: Detected that the Chnroute Cidr List Format is wrong, Ready to Reformat..."
Expand Down Expand Up @@ -3171,18 +3144,6 @@ msgstr "提示:检测到 Firewall4,使用 NFTABLE 规则..."
msgid "Specify CN DNS Server"
msgstr "大陆域名 DNS 服务器"

msgid "Specify DNS Server For CN Domain Lists, Only One IP Server Address Support"
msgstr "指定大陆域名的 DNS 服务器,只支持填写一个IP地址"

msgid "Warning: Dnsmasq Work is Unnormal, Setting The Firewall DNS Hijacking Rules..."
msgstr "警告:检测到 Dnsmasq 工作异常,设置防火墙 DNS 劫持规则..."

msgid "Tip: Dnsmasq Work is Normal, Restore The Firewall DNS Hijacking Rules..."
msgstr "提示:检测到 Dnsmasq 正常工作,还原防火墙 DNS 劫持规则..."

msgid "Tip: Bypass Specified Regions IP May Cause the Dnsmasq Load For a Long Time After Restart in FAKE-IP Mode, Hijack the DNS to Core Untill the Dnsmasq Works Well..."
msgstr "提示:在 FAKE-IP 模式下绕过指定区域 IP 可能会导致 Dnsmasq 加载时间过长,暂时劫持 DNS 至内核直到 Dnsmasq 正常工作..."

msgid "Seconds..."
msgstr "秒后开始启动..."

Expand Down
1 change: 0 additions & 1 deletion luci-app-openclash/root/etc/config/openclash
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ config openclash 'config'
option geoip_custom_url 'https://testingcf.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geoip.dat'
option chnr_custom_url 'https://ispip.clang.cn/all_cn.txt'
option chnr6_custom_url 'https://ispip.clang.cn/all_cn_ipv6.txt'
option cndomain_custom_url 'https://testingcf.jsdelivr.net/gh/felixonmars/dnsmasq-china-list@master/accelerated-domains.china.conf'

config dns_servers
option type 'udp'
Expand Down
Loading

0 comments on commit c3844db

Please sign in to comment.