diff --git a/README.md b/README.md index 9fdbc73..05ca185 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # xui.one +MIRROR +https://github.com/amidevous/xui.one diff --git a/build-php.sh b/build-php.sh new file mode 100644 index 0000000..45ff069 --- /dev/null +++ b/build-php.sh @@ -0,0 +1,63 @@ +#!/bin/bash +echo -e "\nChecking that minimal requirements are ok" + +# Ensure the OS is compatible with the launcher +if [ -f /etc/centos-release ]; then + inst() { + rpm -q "$1" &> /dev/null + } + if (inst "centos-stream-repos"); then + OS="CentOS-Stream" + else + OS="CentOs" + fi + VERFULL=$(sed 's/^.*release //;s/ (Fin.*$//' /etc/centos-release) + VER=${VERFULL:0:1} # return 6, 7 or 8 +elif [ -f /etc/fedora-release ]; then + inst() { + rpm -q "$1" &> /dev/null + } + OS="Fedora" + VERFULL=$(sed 's/^.*release //;s/ (Fin.*$//' /etc/fedora-release) + VER=${VERFULL:0:2} # return 34, 35 or 36 +elif [ -f /etc/lsb-release ]; then + OS=$(grep DISTRIB_ID /etc/lsb-release | sed 's/^.*=//') + VER=$(grep DISTRIB_RELEASE /etc/lsb-release | sed 's/^.*=//') +elif [ -f /etc/os-release ]; then + OS=$(grep -w ID /etc/os-release | sed 's/^.*=//') + VER=$(grep -w VERSION_ID /etc/os-release | sed 's/^.*=//') + else + OS=$(uname -s) + VER=$(uname -r) +fi +ARCH=$(uname -m) +mkdir -p /root/phpbuild/ +cd /root/phpbuild/ +wget --no-check-certificate https://www.php.net/distributions/php-7.4.33.tar.gz -O /root/phpbuild/php-7.4.33.tar.gz +rm -rf /root/phpbuild/php-7.4.33 +tar -xvf /root/phpbuild/php-7.4.33.tar.gz +if [[ "$VER" = "18.04" || "$VER" = "20.04" || "$VER" = "22.04" || "$VER" = "24.04" || "$VER" = "11" || "$OS" = "Fedora" ]]; then +wget --no-check-certificate "https://launchpad.net/~ondrej/+archive/ubuntu/php/+sourcefiles/php7.3/7.3.33-2+ubuntu22.04.1+deb.sury.org+1/php7.3_7.3.33-2+ubuntu22.04.1+deb.sury.org+1.debian.tar.xz" -O /root/phpbuild/debian.tar.xz +tar -xf /root/phpbuild/debian.tar.xz +rm -f /root/phpbuild/debian.tar.xz +cd /root/phpbuild/php-7.4.33 +patch -p1 < ../debian/patches/0060-Add-minimal-OpenSSL-3.0-patch.patch +else +cd /root/phpbuild/php-7.4.33 +fi +'./configure' '--prefix=/home/xui/bin/php' '--with-fpm-user=xui' '--with-fpm-group=xui' '--enable-gd' '--with-jpeg' '--with-freetype' '--enable-static' '--disable-shared' '--enable-opcache' '--enable-fpm' '--without-sqlite3' '--without-pdo-sqlite' '--enable-mysqlnd' '--with-mysqli' '--with-curl' '--disable-cgi' '--with-zlib' '--enable-sockets' '--with-openssl' '--enable-shmop' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-calendar' '--disable-rpath' '--enable-inline-optimization' '--enable-pcntl' '--enable-mbregex' '--enable-exif' '--enable-bcmath' '--with-mhash' '--with-gettext' '--with-xmlrpc' '--with-xsl' '--with-libxml' '--with-pdo-mysql' '--disable-mbregex' +#'./configure' '--prefix=/home/xui/bin/php' '--with-zlib-dir' '--with-freetype-dir' '--enable-mbstring' '--enable-calendar' '--with-curl' '--with-gd' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-zlib' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-pcntl' '--enable-mbregex' '--enable-exif' '--enable-bcmath' '--with-mhash' '--enable-zip' '--with-pcre-regex' '--with-pdo-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-openssl' '--with-fpm-user=xtreamcodes' '--with-fpm-group=xtreamcodes' '--with-libdir=/lib/x86_64-linux-gnu' '--with-gettext' '--with-xmlrpc' '--with-xsl' '--enable-opcache' '--enable-fpm' '--enable-libxml' '--enable-static' '--disable-shared' '--with-jpeg-dir' '--enable-gd-jis-conv' '--with-webp-dir' '--with-xpm-dir' +make -j$(nproc --all) +killall php +killall php-fpm +killall php +killall php-fpm +killall php +killall php-fpm +chattr -i /home/xui/bin/php/sbin/php-fpm +chattr -i /home/xui/bin/php/bin/php +make install +cd /root +rm -rf /root/phpbuild/ +chattr +i /home/xui/bin/php/sbin/php-fpm +chattr +i /home/xui/bin/php/bin/php diff --git a/install-crack.sh b/install-crack.sh new file mode 100644 index 0000000..fa648f2 --- /dev/null +++ b/install-crack.sh @@ -0,0 +1,24 @@ +#!/bin/bash +[ ! -f "/etc/systemd/system/xuione.service" ] && echo "XUI.one isn't installed!" && exit +[ ! -d "/home/xui/config" ] && echo "XUI.one isn't installed!" && exit +echo "XUI.one Crack" +echo "-------------" +echo "All Versions" +echo "By sysnull84" +echo "------------- +" +echo "Stopping XUI.one +" +sudo systemctl stop xuione +echo "Installing cracked license +" +cp -r license /home/xui/config/license +cp -r xui.so /home/xui/bin/php/lib/php/extensions/no-debug-non-zts-20190902/xui.so +echo "Update configuration file +" +sed -i "s/^license.*/license = \"cracked\"/g" /home/xui/config/config.ini +echo "Starting XUI.one +" +sudo systemctl start xuione +echo "Cracked! ;) +" diff --git a/install-dep.sh b/install-dep.sh new file mode 100644 index 0000000..cc24803 --- /dev/null +++ b/install-dep.sh @@ -0,0 +1,1070 @@ +#!/bin/bash +echo -e "\nChecking that minimal requirements are ok" +# Ensure the OS is compatible with the launcher +if [ -f /etc/centos-release ]; then + inst() { + rpm -q "$1" &> /dev/null + } + if (inst "centos-stream-repos"); then + OS="CentOs-Stream" + else + OS="CentOs" + fi + VERFULL=$(sed 's/^.*release //;s/ (Fin.*$//' /etc/centos-release) + VER=${VERFULL:0:1} # return 6, 7 or 8 +elif [ -f /etc/fedora-release ]; then + inst() { + rpm -q "$1" &> /dev/null + } + OS="Fedora" + VERFULL=$(sed 's/^.*release //;s/ (Fin.*$//' /etc/fedora-release) + VER=${VERFULL:0:2} # return 34, 35 or 36 +elif [ -f /etc/lsb-release ]; then + OS=$(grep DISTRIB_ID /etc/lsb-release | sed 's/^.*=//') + VER=$(grep DISTRIB_RELEASE /etc/lsb-release | sed 's/^.*=//') +elif [ -f /etc/os-release ]; then + OS=$(grep -w ID /etc/os-release | sed 's/^.*=//') + VER=$(grep VERSION_ID /etc/os-release | sed 's/^.*"\(.*\)"/\1/' | head -n 1 | tail -n 1) + else + OS=$(uname -s) + VER=$(uname -r) +fi +ARCH=$(uname -m) +if [[ "$VER" = "8" && "$OS" = "CentOs" ]]; then + echo "Centos 8 obsolete udate to CentOS-Stream 8" + echo "this operation may take some time" + sleep 60 + # change repository to use vault.centos.org CentOS 8 found online to vault.centos.org + find /etc/yum.repos.d -name '*.repo' -exec sed -i 's|mirrorlist=http://mirrorlist.centos.org|#mirrorlist=http://mirrorlist.centos.org|' {} \; + find /etc/yum.repos.d -name '*.repo' -exec sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|' {} \; + #update package list + dnf update -y + #upgrade all packages to latest CentOS 8 + dnf upgrade -y + #install CentOS-Stream 8 repository + dnf -y install centos-release-stream --allowerasing + #install rpmconf + dnf -y install rpmconf + #set config file with rpmconf + rpmconf -a + # remove Centos 8 repository and set CentOS-Stream 8 repository by default + dnf -y swap centos-linux-repos centos-stream-repos + # system upgrade + dnf -y distro-sync + # ceanup old rpmconf file create + find / -name '*.rpmnew' -exec rm -f {} \; + find / -name '*.rpmsave' -exec rm -f {} \; + OS="CentOs-Stream" + fi + mkdir -p /etc/yum.repos.d/ + + +echo "Detected : $OS $VER $ARCH" +if [[ "$OS" = "CentOs" && "$VER" = "6" && "$ARCH" == "x86_64" || +"$OS" = "CentOs" && "$VER" = "7" && "$ARCH" == "x86_64" || +"$OS" = "CentOs-Stream" && "$VER" = "8" && "$ARCH" == "x86_64" || +"$OS" = "CentOs-Stream" && "$VER" = "9" && "$ARCH" == "x86_64" || +"$OS" = "Fedora" && "$ARCH" == "x86_64" || +"$OS" = "Ubuntu" && ( "$VER" = "18.04" || "$VER" = "20.04" || "$VER" = "22.04" || "$VER" = "24.04" ) && "$ARCH" == "x86_64" || +"$OS" = "debian" && ("$VER" = "10" || "$VER" = "11" ) && "$ARCH" == "x86_64" ]] ; then +echo "Ok." +else + echo "Sorry, this OS is not supported by Xtream UI." + exit 1 +fi +echo -e "\n-- Updating repositories and packages sources" +if [[ "$OS" = "CentOs" ]] ; then + PACKAGE_INSTALLER="yum -y install" + PACKAGE_REMOVER="yum -y remove" + PACKAGE_UPDATER="yum -y update" + PACKAGE_UTILS="yum-utils" + PACKAGE_GROUPINSTALL="yum -y groupinstall" + PACKAGE_SOURCEDOWNLOAD="yumdownloader --source" + BUILDDEP="yum-builddep -y" + MYSQLCNF=/etc/my.cnf +elif [[ "$OS" = "Fedora" || "$OS" = "CentOs-Stream" ]]; then + PACKAGE_INSTALLER="dnf -y install" + PACKAGE_REMOVER="dnf -y remove" + PACKAGE_UPDATER="dnf -y update" + PACKAGE_UTILS="dnf-utils" + PACKAGE_GROUPINSTALL="dnf -y groupinstall" + PACKAGE_SOURCEDOWNLOAD="dnf download --source" + BUILDDEP="dnf build-dep -y" + MYSQLCNF=/etc/my.cnf +elif [[ "$OS" = "Ubuntu" || "$OS" = "debian" ]]; then + PACKAGE_INSTALLER="apt-get -y install" + PACKAGE_REMOVER="apt-get -y purge" + MYSQLCNF=/etc/mysql/mariadb.cnf + inst() { + dpkg -l "$1" 2> /dev/null | grep '^ii' &> /dev/null + } +fi +if [[ "$OS" = "CentOs" || "$OS" = "CentOs-Stream" || "$OS" = "Fedora" ]]; then + if [[ "$OS" = "CentOs" || "$OS" = "CentOs-Stream" ]]; then + #To fix some problems of compatibility use of mirror centos.org to all users + #Replace all mirrors by base repos to avoid any problems. + find /etc/yum.repos.d -name '*.repo' -exec sed -i 's|mirrorlist=http://mirrorlist.centos.org|#mirrorlist=http://mirrorlist.centos.org|' {} \; + find /etc/yum.repos.d -name '*.repo' -exec sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://mirror.centos.org|' {} \; + #check if the machine and on openvz + if [ -f "/etc/yum.repos.d/vz.repo" ]; then + sed -i "s|mirrorlist=http://vzdownload.swsoft.com/download/mirrors/centos-$VER|baseurl=http://vzdownload.swsoft.com/ez/packages/centos/$VER/$ARCH/os/|" "/etc/yum.repos.d/vz.repo" + sed -i "s|mirrorlist=http://vzdownload.swsoft.com/download/mirrors/updates-released-ce$VER|baseurl=http://vzdownload.swsoft.com/ez/packages/centos/$VER/$ARCH/updates/|" "/etc/yum.repos.d/vz.repo" + fi + #EPEL Repo Install + $PACKAGE_INSTALLER epel-release + fi + $PACKAGE_INSTALLER $PACKAGE_UTILS + #disable deposits that could result in installation errors + # disable all repository + if [[ "$OS" = "Fedora" ]]; then + dnf -y install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm + dnf -y install https://rpms.remirepo.net/fedora/remi-release-$(rpm -E %fedora).rpm + fi + if [[ "$OS" = "CentOs" || "$OS" = "CentOs-Stream" ]]; then +if [[ "$OS" = "CentOs" && "$VER" = "6" ]] ; then +cat > /etc/yum.repos.d/mariadb.repo < CentOS-Base.repo < epel.repo < /etc/yum.repos.d/mariadb.repo < /etc/yum.repos.d/mariadb.repo </dev/tty + mkdir -p "/etc/apt/sources.list.d.save" + cp -R "/etc/apt/sources.list.d/*" "/etc/apt/sources.list.d.save" &> /dev/null + rm -rf "/etc/apt/sources.list/*" + cp "/etc/apt/sources.list" "/etc/apt/sources.list.save" + cat > /etc/apt/sources.list < /dev/null + apt-get update +wget -qO- "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF1656F24C74CD1D8" | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/mariadb.gpg > /dev/null + add-apt-repository -y "deb [arch=amd64,arm64,ppc64el] https://mirrors.nxthost.com/mariadb/repo/10.6/ubuntu/ $(lsb_release -cs) main" + apt-get update +elif [[ "$OS" = "debian" ]]; then + DEBIAN_FRONTEND=noninteractive + export DEBIAN_FRONTEND=noninteractive + # Update the enabled Aptitude repositories + echo -ne "\nUpdating Aptitude Repos: " >/dev/tty + apt-get update + apt install curl wget apt-transport-https gnupg2 dirmngr -y + mkdir -p "/etc/apt/sources.list.d.save" + cp -R "/etc/apt/sources.list.d/*" "/etc/apt/sources.list.d.save" &> /dev/null + rm -rf "/etc/apt/sources.list/*" + cp "/etc/apt/sources.list" "/etc/apt/sources.list.save" + cat > /etc/apt/sources.list < /dev/null + add-apt-repository -y "deb [arch=amd64,arm64,ppc64el] https://mirrors.nxthost.com/mariadb/repo/10.6/debian/ $(lsb_release -cs) main" + apt-get update + apt-get -y install debhelper cdbs lintian build-essential fakeroot devscripts dh-make ca-certificates gpg reprepro +cat > /etc/apt/sources.list.d/php.list < /etc/apt/sources.list.d/apache2.list < /etc/apt/sources.list.d/podman.list < /dev/null + } + if (inst "centos-stream-repos"); then + OS="CentOS-Stream" + else + OS="CentOs" + fi + VERFULL="$(sed 's/^.*release //;s/ (Fin.*$//' /etc/centos-release)" + VER="${VERFULL:0:1}" # return 6, 7 or 8 +elif [ -f /etc/fedora-release ]; then + inst() { + rpm -q "$1" &> /dev/null + } + OS="Fedora" + VERFULL="$(sed 's/^.*release //;s/ (Fin.*$//' /etc/fedora-release)" + VER="${VERFULL:0:2}" # return 34, 35 or 36 +elif [ -f /etc/lsb-release ]; then + OS="$(grep DISTRIB_ID /etc/lsb-release | sed 's/^.*=//')" + VER="$(grep DISTRIB_RELEASE /etc/lsb-release | sed 's/^.*=//')" +elif [ -f /etc/os-release ]; then + OS="$(grep -w ID /etc/os-release | sed 's/^.*=//')" + VER="$(grep -w VERSION_ID /etc/os-release | sed 's/^.*=//')" + else + OS="$(uname -s)" + VER="$(uname -r)" +fi +ARCH=$(uname -m) +echo "Detected : $OS $VER $ARCH" +wget https://github.com/amidevous/xui.one/raw/refs/heads/master/install-dep.sh -qO /tmp/install-dep.sh >/dev/null 2>&1 +bash /tmp/install-dep.sh +cd /root +wget https://github.com/amidevous/xui.one/releases/download/test/XUI_1.5.13.zip -qO XUI_1.5.13.zip >/dev/null 2>&1 +unzip XUI_1.5.13.zip >/dev/null 2>&1 +wget https://raw.githubusercontent.com/amidevous/xui.one/master/install.python3 -qO /root/install.python3 >/dev/null 2>&1 +python3 /root/install.python3