mirror of
https://github.com/SukkaW/Surge.git
synced 2026-02-03 20:41:52 +08:00
Drop gorhill publicsuffixlist
This commit is contained in:
@@ -3,13 +3,8 @@
|
||||
* because `hostname` is already garanteed to be a valid hostname!
|
||||
*/
|
||||
export function isProbablyIpv4(hostname: string): boolean {
|
||||
// Cannot be shorted than 1.1.1.1
|
||||
if (hostname.length < 7) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Cannot be longer than: 255.255.255.255
|
||||
if (hostname.length > 15) {
|
||||
// Cannot be shorted than 1.1.1.1 or longer than 255.255.255.255
|
||||
if (hostname.length < 7 || hostname.length > 15) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user