1
0
mirror of https://github.com/kenzok8/small-package synced 2025-09-18 18:51:16 +08:00

update 2025-07-24 20:51:01

This commit is contained in:
kenzok8
2025-07-24 20:51:01 +08:00
parent ca93f3e91f
commit eae13ec7ae
3 changed files with 12 additions and 1 deletions

View File

@ -15,6 +15,7 @@ o.rmempty = false
o = s:option(Value, "music_source", translate("音源接口"))
o:value("default", translate("默认"))
o:value("bilibili", translate("Bilibili音乐"))
o:value("bilivideo", translate("Bilibili音乐bilivideo"))
o:value("joox", translate("JOOX音乐"))
o:value("kugou", translate("酷狗音乐"))
o:value("kuwo", translate("酷我音乐"))

View File

@ -53,6 +53,7 @@ Some features are deprecated / unstable so they are placed in preview app. To en
* 2025-05-13 feat: geodata reader
* 2025-07-20 feat: geoip in manual transparent proxy
* 2025-07-24 fix: geosite browser search
## Changelog since 3.5.0

View File

@ -252,6 +252,15 @@ function decodeGeoIPList(buffer) {
return geoIPList;
}
function matchesDomain(subdomain, domain) {
const lowerDomain = domain.toLowerCase();
const lowerSubdomain = subdomain.toLowerCase();
if (lowerSubdomain === lowerDomain) {
return true;
}
return lowerSubdomain.endsWith('.' + lowerDomain);
}
function matchesCIDR(cidrIp, prefix, queryIp) {
// Check if input IP matches CIDR IP version
if ((cidrIp.length === 4 && queryIp.length !== 4) || (cidrIp.length === 16 && queryIp.length !== 16)) {
@ -434,7 +443,7 @@ return view.extend({
const results = geosite_result.entry.map(entry => ({
...entry,
domain: entry.domain.filter(domain => {
return query && (selectedCode === '' || entry.countryCode === selectedCode) && domain.value.toLowerCase().includes(query);
return query && (selectedCode === '' || entry.countryCode === selectedCode) && matchesDomain(query, domain.value);
})
})).filter(entry => entry.domain.length > 0);
renderGeoSiteResults(results);