You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a full DuckDNS subdomain (such as xray-il.duckdns.org) with the x‑UI‑PRO installation script, the domain splitting logic incorrectly interprets the input. Instead of treating the entire string as the domain, the script splits it into a subdomain and main domain by assuming a format of sub.domain.tld. This results in:
SubDomain:xray-il
MainDomain:duckdns.org
Consequently, the SSL certificate is generated (via Certbot) with the cert-name duckdns.org and the Nginx configuration sets server_name to duckdns.org *.duckdns.org, which does not reflect the intended usage since I only registered xray-il.duckdns.org.
Steps to Reproduce:
Register a subdomain with DuckDNS (e.g., xray-il.duckdns.org).
Run the installation script and, when prompted, enter xray-il.duckdns.org as the available subdomain.
Observe that the script splits the domain into xray-il and duckdns.org—leading Certbot to create certificates under /etc/letsencrypt/live/duckdns.org/ and Nginx’s server block is configured for duckdns.org *.duckdns.org.
Expected Behavior:
For a registered full subdomain like xray-il.duckdns.org, the script should treat the entire input as the main domain. This would ensure that:
The SSL certificate is issued for xray-il.duckdns.org (with cert-name set to the full domain).
The Nginx configuration uses server_name xray-il.duckdns.org; (or similarly appropriate directives).
Actual Behavior:
The script’s current logic splits the input into two parts, which:
Causes the certificate to be issued under duckdns.org (instead of xray-il.duckdns.org).
Configures Nginx for duckdns.org *.duckdns.org, which may lead to SSL validation issues and misconfiguration when accessing the panel.
Possible Solutions:
Modify the Domain Parsing Logic:
Adjust the domain extraction section in the script so that if the provided domain ends with duckdns.org (or any known third-party provider domain), the entire input is used as the main domain. For example, replacing the domain-splitting block with:
while [[ -z$(echo "$domain"| tr -d '[:space:]') ]];doread -rp $'\e[1;32;40m Enter available subdomain (sub.domain.tld): \e[0m' domain
done
domain=$(echo "$domain"| tr -d '[:space:]')# If the domain ends with duckdns.org, use the whole string as MainDomain.if [[ "$domain"=~ duckdns\.org$ ]];then
MainDomain="${domain}"else
SubDomain=$(echo "$domain"| sed 's/^[^ ]* \|\..*//g')
MainDomain=$(echo "$domain"| sed 's/.*\.\([^.]*\..*\)$/\1/')if [[ "${SubDomain}.${MainDomain}"!="${domain}" ]];then
MainDomain="${domain}"fifi
Provide a Flag to Bypass Domain Splitting: Offer an installation argument that allows users to bypass the automatic domain splitting for cases where they register a full subdomain (e.g., DuckDNS).
Environment:
x‑UI‑PRO version: v11.8.2 (or latest, as applicable)
Domain Provider: DuckDNS (using a full subdomain like xray-il.duckdns.org)
Additional Context: Users who utilize third-party subdomain providers (such as DuckDNS) should be able to have the script generate SSL certificates and server configurations for the exact domain they registered. The current logic assumes a standard two-level domain structure (e.g., example.com with a subdomain like panel.example.com), which does not align with full subdomains provided by services like DuckDNS.
The text was updated successfully, but these errors were encountered:
When using a full DuckDNS subdomain (such as
xray-il.duckdns.org
) with the x‑UI‑PRO installation script, the domain splitting logic incorrectly interprets the input. Instead of treating the entire string as the domain, the script splits it into a subdomain and main domain by assuming a format ofsub.domain.tld
. This results in:xray-il
duckdns.org
Consequently, the SSL certificate is generated (via Certbot) with the cert-name
duckdns.org
and the Nginx configuration setsserver_name
toduckdns.org *.duckdns.org
, which does not reflect the intended usage since I only registeredxray-il.duckdns.org
.Steps to Reproduce:
xray-il.duckdns.org
).xray-il.duckdns.org
as the available subdomain.xray-il
andduckdns.org
—leading Certbot to create certificates under/etc/letsencrypt/live/duckdns.org/
and Nginx’s server block is configured forduckdns.org *.duckdns.org
.Expected Behavior:
For a registered full subdomain like
xray-il.duckdns.org
, the script should treat the entire input as the main domain. This would ensure that:xray-il.duckdns.org
(with cert-name set to the full domain).server_name xray-il.duckdns.org;
(or similarly appropriate directives).Actual Behavior:
The script’s current logic splits the input into two parts, which:
duckdns.org
(instead ofxray-il.duckdns.org
).duckdns.org *.duckdns.org
, which may lead to SSL validation issues and misconfiguration when accessing the panel.Possible Solutions:
Adjust the domain extraction section in the script so that if the provided domain ends with
duckdns.org
(or any known third-party provider domain), the entire input is used as the main domain. For example, replacing the domain-splitting block with:Environment:
Additional Context: Users who utilize third-party subdomain providers (such as DuckDNS) should be able to have the script generate SSL certificates and server configurations for the exact domain they registered. The current logic assumes a standard two-level domain structure (e.g., example.com with a subdomain like panel.example.com), which does not align with full subdomains provided by services like DuckDNS.
The text was updated successfully, but these errors were encountered: