fix(legacy): use main branch install.sh for downgrade to preserve fork URLs

Old version tags still contained install.sh referencing MHSanaei/3x-ui.
Now always use the up-to-date install.sh from main, passing version as arg.

https://claude.ai/code/session_01M6d5atbWjuLTj6UwRHoK5m
This commit is contained in:
Claude 2026-05-18 22:00:27 +00:00
parent bb1571f87d
commit bc3eab465b
No known key found for this signature in database

View file

@ -166,8 +166,8 @@ legacy_version() {
echo "Panel version cannot be empty. Exiting."
exit 1
fi
# Use the entered panel version in the download link
install_command="bash <(curl -Ls "https://raw.githubusercontent.com/saeederamy/3x-ui/v$tag_version/install.sh") v$tag_version"
# Always use main branch install.sh so it pulls from the correct fork
install_command="bash <(curl -Ls \"https://raw.githubusercontent.com/saeederamy/3x-ui/main/install.sh\") v$tag_version"
echo "Downloading and installing panel version $tag_version..."
eval $install_command