Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolgaIgor <43250768+VolgaIgor@users.noreply.github.com>2026-01-12 04:53:43 +0300
committerGitHub <noreply@github.com>2026-01-12 04:53:43 +0300
commita691eaea8dc2b08bba3f24ef4d97fb798204ad45 (patch)
tree8265170022ea29f1d0d6272434190ea563044f6c
parentda447e5669c3adaef688e8c361ed2c85426fcdeb (diff)
Fixed incorrect filtering for IDN top-level domains (#3666)
-rw-r--r--install.sh2
-rwxr-xr-xupdate.sh2
-rw-r--r--x-ui.sh2
3 files changed, 3 insertions, 3 deletions
diff --git a/install.sh b/install.sh
index 59be30ce..d8e95e22 100644
--- a/install.sh
+++ b/install.sh
@@ -53,7 +53,7 @@ is_ip() {
is_ipv4 "$1" || is_ipv6 "$1"
}
is_domain() {
- [[ "$1" =~ ^([A-Za-z0-9](-*[A-Za-z0-9])*)\.([A-Za-z]{2,})$ ]] && return 0 || return 1
+ [[ "$1" =~ ^([A-Za-z0-9](-*[A-Za-z0-9])*\.)+(xn--[a-z0-9]{2,}|[A-Za-z]{2,})$ ]] && return 0 || return 1
}
# Port helpers
diff --git a/update.sh b/update.sh
index 800841f5..91c37c37 100755
--- a/update.sh
+++ b/update.sh
@@ -78,7 +78,7 @@ is_ip() {
is_ipv4 "$1" || is_ipv6 "$1"
}
is_domain() {
- [[ "$1" =~ ^([A-Za-z0-9](-*[A-Za-z0-9])*\.)+[A-Za-z]{2,}$ ]] && return 0 || return 1
+ [[ "$1" =~ ^([A-Za-z0-9](-*[A-Za-z0-9])*\.)+(xn--[a-z0-9]{2,}|[A-Za-z]{2,})$ ]] && return 0 || return 1
}
# Port helpers
diff --git a/x-ui.sh b/x-ui.sh
index 4dda45a0..07aaddc6 100644
--- a/x-ui.sh
+++ b/x-ui.sh
@@ -47,7 +47,7 @@ is_ip() {
is_ipv4 "$1" || is_ipv6 "$1"
}
is_domain() {
- [[ "$1" =~ ^([A-Za-z0-9](-*[A-Za-z0-9])*\.)+[A-Za-z]{2,}$ ]] && return 0 || return 1
+ [[ "$1" =~ ^([A-Za-z0-9](-*[A-Za-z0-9])*\.)+(xn--[a-z0-9]{2,}|[A-Za-z]{2,})$ ]] && return 0 || return 1
}
# check root