diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 7a14214d..5844cca3 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -27,7 +27,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v5.3.0 + uses: docker/metadata-action@v5.4.0 with: images: ghcr.io/${{ github.repository }} @@ -36,6 +36,6 @@ jobs: with: context: . push: ${{ github.event_name != 'pull_request' }} - platforms: linux/amd64, linux/arm64/v8 + platforms: linux/amd64, linux/arm64/v8, linux/arm/v7 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1b2c2298..865efcda 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ jobs: build: strategy: matrix: - platform: [amd64, arm64] + platform: [amd64, arm64, arm] runs-on: ubuntu-20.04 steps: - name: Checkout repository @@ -21,11 +21,14 @@ jobs: with: go-version: '1.21' - - name: Install dependencies for arm64 - if: matrix.platform == 'arm64' + - name: Install dependencies for arm64 and arm + if: matrix.platform == 'arm64' || matrix.platform == 'arm' run: | sudo apt-get update sudo apt install gcc-aarch64-linux-gnu + if [ "${{ matrix.platform }}" == "arm" ]; then + sudo apt install gcc-arm-linux-gnueabihf + fi - name: Build x-ui run: | @@ -34,6 +37,8 @@ jobs: export GOARCH=${{ matrix.platform }} if [ "${{ matrix.platform }}" == "arm64" ]; then export CC=aarch64-linux-gnu-gcc + elif [ "${{ matrix.platform }}" == "arm" ]; then + export CC=arm-linux-gnueabihf-gcc fi go build -o xui-release -v main.go @@ -50,16 +55,22 @@ jobs: wget https://github.com/XTLS/Xray-core/releases/download/v1.8.6/Xray-linux-64.zip unzip Xray-linux-64.zip rm -f Xray-linux-64.zip - else + elif [ "${{ matrix.platform }}" == "arm64" ]; then wget https://github.com/XTLS/Xray-core/releases/download/v1.8.6/Xray-linux-arm64-v8a.zip unzip Xray-linux-arm64-v8a.zip rm -f Xray-linux-arm64-v8a.zip + else + wget https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-arm32-v7a.zip + unzip Xray-linux-arm32-v7a.zip + rm -f Xray-linux-arm32-v7a.zip fi - rm -f geoip.dat geosite.dat geoip_IR.dat geosite_IR.dat + rm -f geoip.dat geosite.dat geoip_IR.dat geosite_IR.dat geoip_VN.dat geosite_VN.dat wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat wget -O geoip_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geoip.dat wget -O geosite_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geosite.dat + wget -O geoip_VN.dat https://github.com/vuong2023/vn-v2ray-rules/releases/latest/download/geoip.dat + wget -O geosite_VN.dat https://github.com/vuong2023/vn-v2ray-rules/releases/latest/download/geosite.dat mv xray xray-linux-${{ matrix.platform }} cd ../.. diff --git a/DockerInit.sh b/DockerInit.sh index 0949c640..a3c23278 100755 --- a/DockerInit.sh +++ b/DockerInit.sh @@ -9,6 +9,10 @@ case $1 in ARCH="arm64-v8a" FNAME="arm64" ;; + armv7 | arm | arm32) + ARCH="arm32-v7a" + FNAME="arm32" + ;; *) ARCH="64" FNAME="amd64" @@ -20,10 +24,12 @@ cd build/bin wget "https://github.com/XTLS/Xray-core/releases/download/v1.8.6/Xray-linux-${ARCH}.zip" unzip "Xray-linux-${ARCH}.zip" -rm -f "Xray-linux-${ARCH}.zip" geoip.dat geosite.dat geoip_IR.dat geosite_IR.dat +rm -f "Xray-linux-${ARCH}.zip" geoip.dat geosite.dat geoip_IR.dat geosite_IR.dat geoip_VN.dat geosite_VN.dat mv xray "xray-linux-${FNAME}" wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat wget -O geoip_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geoip.dat wget -O geosite_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geosite.dat +wget -O geoip_VN.dat https://github.com/vuong2023/vn-v2ray-rules/releases/latest/download/geoip.dat +wget -O geosite_VN.dat https://github.com/vuong2023/vn-v2ray-rules/releases/latest/download/geosite.dat diff --git a/README.md b/README.md index 224e7e64..5f1abfad 100644 --- a/README.md +++ b/README.md @@ -362,6 +362,8 @@ XUI_BIN_FOLDER="bin" XUI_DB_FOLDER="/etc/x-ui" go build main.go - CentOS 8+ - Fedora 36+ - Arch Linux +- Manjaro +- Armbian (for ARM devices) # Pictures diff --git a/go.mod b/go.mod index 04b922dd..90d02765 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/xtls/xray-core v1.8.6 go.uber.org/atomic v1.11.0 golang.org/x/text v0.14.0 - google.golang.org/grpc v1.60.0 + google.golang.org/grpc v1.60.1 gorm.io/driver/sqlite v1.5.4 gorm.io/gorm v1.25.5 ) @@ -83,7 +83,7 @@ require ( go.uber.org/mock v0.3.0 // indirect go4.org/netipx v0.0.0-20230824141953-6213f710f925 // indirect golang.org/x/arch v0.6.0 // indirect - golang.org/x/crypto v0.15.0 // indirect + golang.org/x/crypto v0.17.0 // indirect golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.18.0 // indirect diff --git a/go.sum b/go.sum index 379aa6fc..0f4596f2 100644 --- a/go.sum +++ b/go.sum @@ -319,8 +319,8 @@ golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= @@ -412,8 +412,8 @@ google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmE google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.60.0 h1:6FQAR0kM31P6MRdeluor2w2gPaS4SVNrD/DNTxrQ15k= -google.golang.org/grpc v1.60.0/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= +google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= +google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= diff --git a/install.sh b/install.sh index 3338b64f..1dc61e23 100644 --- a/install.sh +++ b/install.sh @@ -26,7 +26,8 @@ echo "The OS release is: $release" arch3xui() { case "$(uname -m)" in x86_64 | x64 | amd64) echo 'amd64' ;; - armv8 | arm64 | aarch64) echo 'arm64' ;; + armv8* | armv8 | arm64 | aarch64) echo 'arm64' ;; + armv7* | armv7 | arm | arm32 ) echo 'arm32' ;; *) echo -e "${green}Unsupported CPU architecture! ${plain}" && rm -f install.sh && exit 1 ;; esac } @@ -54,7 +55,11 @@ elif [[ "${release}" == "debian" ]]; then echo -e "${red} Please use Debian 10 or higher ${plain}\n" && exit 1 fi elif [[ "${release}" == "arch" ]]; then - echo "OS is ArchLinux" + echo "Your OS is ArchLinux" +elif [[ "${release}" == "manjaro" ]]; then + echo "Your OS is Manjaro" +elif [[ "${release}" == "armbian" ]]; then + echo "Your OS is Armbian" else echo -e "${red}Failed to check the OS version, please contact the author!${plain}" && exit 1 @@ -63,13 +68,13 @@ fi install_base() { case "${release}" in centos|fedora) - yum install -y -q wget curl tar + yum -y update && yum install -y -q wget curl tar ;; - arch) - pacman -Syu --noconfirm wget curl tar + arch|manjaro) + pacman -Syu && pacman -Syu --noconfirm wget curl tar ;; *) - apt install -y -q wget curl tar + apt-get update && apt-get upgrade -y && apt install -y -q wget curl tar ;; esac } @@ -78,7 +83,7 @@ install_base() { # This function will be called when user installed x-ui out of security config_after_install() { echo -e "${yellow}Install/update finished! For security it's recommended to modify panel settings ${plain}" - read -p "Do you want to continue with the modification [y/n]? ": config_confirm + read -p "Do you want to continue with the modification [y/n]?": config_confirm if [[ "${config_confirm}" == "y" || "${config_confirm}" == "Y" ]]; then read -p "Please set up your username:" config_account echo -e "${yellow}Your username will be:${config_account}${plain}" diff --git a/web/assets/css/custom.css b/web/assets/css/custom.css index 65a5181d..4ef4b436 100644 --- a/web/assets/css/custom.css +++ b/web/assets/css/custom.css @@ -18,6 +18,7 @@ body { html { --antd-wave-shadow-color: #008771; line-height: 1.15; + text-size-adjust: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; -ms-overflow-style: scrollbar; @@ -850,13 +851,17 @@ style attribute { .ant-menu, .ant-radio-button-wrapper { user-select: none; + -webkit-user-select: none; } .ant-calendar-date, .ant-calendar-year-panel-year, .ant-calendar-decade-panel-decade, -.ant-calendar-month-panel-month { - border-radius: 5px; +.ant-calendar-month-panel-month, +.ant-checkbox-inner, +.ant-checkbox-checked:after, +.ant-table-row-expand-icon { + border-radius: 6px; } .ant-calendar-date:hover { @@ -1095,15 +1100,15 @@ li.ant-select-dropdown-menu-item:empty:after { background-color: #313f5a; } +.ant-select-dropdown, +.ant-popover-inner { + overflow-x: hidden; +} .ant-popover-inner-content { max-height: 400px; overflow-y: auto; } -.ant-table-row-expand-icon { - border-radius: 6px; -} - .qr-bg { background-color: #fff; display: flex; diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js index e0c8a912..e4d0f658 100644 --- a/web/assets/js/model/xray.js +++ b/web/assets/js/model/xray.js @@ -474,7 +474,7 @@ class TlsStreamSettings extends XrayCommonClass { cipherSuites = '', rejectUnknownSni = false, certificates=[new TlsStreamSettings.Cert()], - alpn=[ALPN_OPTION.HTTP1,ALPN_OPTION.H2], + alpn=[ALPN_OPTION.H2,ALPN_OPTION.HTTP1], settings=new TlsStreamSettings.Settings()) { super(); this.sni = serverName; diff --git a/web/html/xui/form/outbound.html b/web/html/xui/form/outbound.html index 28ef2285..7b1caa91 100644 --- a/web/html/xui/form/outbound.html +++ b/web/html/xui/form/outbound.html @@ -160,25 +160,25 @@ - + - + - + - + - + - + - + @@ -217,22 +217,22 @@ - none (not camouflage) - srtp (video call) - utp (BT download) - wechat-video (WeChat video) - dtls (DTLS 1.2 packages) - wireguard (wireguard packages) + none (No Obfuscation) + SRTP (Video Call) + uTP (Bittorrent) + WeChat Video + DTLS (DTLS 1.2 packages) + WireGuard (WireGuard Packages) - + - + @@ -267,7 +267,7 @@ [[ alpn ]] - + @@ -283,7 +283,7 @@ [[ key ]] - + @@ -304,4 +304,4 @@ -{{end}} \ No newline at end of file +{{end}} diff --git a/web/html/xui/form/protocol/dokodemo.html b/web/html/xui/form/protocol/dokodemo.html index 14891652..a5309597 100644 --- a/web/html/xui/form/protocol/dokodemo.html +++ b/web/html/xui/form/protocol/dokodemo.html @@ -8,13 +8,13 @@ - TCP+UDP + TCP,UDP TCP UDP - + -{{end}} \ No newline at end of file +{{end}} diff --git a/web/html/xui/form/protocol/shadowsocks.html b/web/html/xui/form/protocol/shadowsocks.html index 16e353e5..79281614 100644 --- a/web/html/xui/form/protocol/shadowsocks.html +++ b/web/html/xui/form/protocol/shadowsocks.html @@ -20,38 +20,28 @@ - - - {{ i18n "encryption" }} - - - - [[ method ]] - - - - - - {{ i18n "password" }} - - - - - - - - - - {{ i18n "pages.inbounds.network" }} - - - - tcp+udp - tcp - udp - - - - - -{{end}} \ No newline at end of file + + + + [[ method ]] + + + + + + + {{ i18n "password" }} + Password + + + + + + + TCP,UDP + TCP + UDP + + + +{{end}} diff --git a/web/html/xui/form/protocol/socks.html b/web/html/xui/form/protocol/socks.html index fafef46f..e9a937e2 100644 --- a/web/html/xui/form/protocol/socks.html +++ b/web/html/xui/form/protocol/socks.html @@ -1,6 +1,6 @@ {{define "form/socks"}} - + @@ -30,4 +30,4 @@ -{{end}} \ No newline at end of file +{{end}} diff --git a/web/html/xui/form/protocol/trojan.html b/web/html/xui/form/protocol/trojan.html index 77a4c27d..5a7ba3c4 100644 --- a/web/html/xui/form/protocol/trojan.html +++ b/web/html/xui/form/protocol/trojan.html @@ -33,14 +33,14 @@ - Fallback[[ index + 1 ]] + Fallback [[ index + 1 ]] inbound.settings.delFallback(index)" style="color: rgb(255, 77, 79);cursor: pointer;"/> - + @@ -55,4 +55,4 @@ -{{end}} \ No newline at end of file +{{end}} diff --git a/web/html/xui/form/protocol/vless.html b/web/html/xui/form/protocol/vless.html index eb442612..7c18c048 100644 --- a/web/html/xui/form/protocol/vless.html +++ b/web/html/xui/form/protocol/vless.html @@ -35,14 +35,14 @@ - Fallback[[ index + 1 ]] + Fallback [[ index + 1 ]] inbound.settings.delFallback(index)" style="color: rgb(255, 77, 79);cursor: pointer;"/> - + @@ -55,6 +55,6 @@ - + {{end}} diff --git a/web/html/xui/form/sniffing.html b/web/html/xui/form/sniffing.html index 6f3a636c..a088dee7 100644 --- a/web/html/xui/form/sniffing.html +++ b/web/html/xui/form/sniffing.html @@ -1,5 +1,5 @@ {{define "form/sniffing"}} - + @@ -19,4 +19,4 @@ -{{end}} \ No newline at end of file +{{end}} diff --git a/web/html/xui/form/stream/external_proxy.html b/web/html/xui/form/stream/external_proxy.html index ab1437ca..2a072df9 100644 --- a/web/html/xui/form/stream/external_proxy.html +++ b/web/html/xui/form/stream/external_proxy.html @@ -1,11 +1,11 @@ {{define "form/externalProxy"}} - + + - + diff --git a/web/html/xui/form/stream/stream_grpc.html b/web/html/xui/form/stream/stream_grpc.html index 27effccc..11c1ec5d 100644 --- a/web/html/xui/form/stream/stream_grpc.html +++ b/web/html/xui/form/stream/stream_grpc.html @@ -3,7 +3,7 @@ - + diff --git a/web/html/xui/form/stream/stream_kcp.html b/web/html/xui/form/stream/stream_kcp.html index c63fd987..b792e1cd 100644 --- a/web/html/xui/form/stream/stream_kcp.html +++ b/web/html/xui/form/stream/stream_kcp.html @@ -2,10 +2,10 @@ - none (not camouflage) - SRTP (video call) - UTP (BT DownloaD) - wechat-video (WeChat video) + none (No Obfuscation) + SRTP (Video Call) + uTP (Bittorrent) + WeChat Video DTLS (DTLS 1.2 packages) WireGuard (WireGuard packages) @@ -16,23 +16,23 @@ - + - + - + - + - + -{{end}} \ No newline at end of file +{{end}} diff --git a/web/html/xui/form/stream/stream_quic.html b/web/html/xui/form/stream/stream_quic.html index 5cf6f7a3..8a2167c4 100644 --- a/web/html/xui/form/stream/stream_quic.html +++ b/web/html/xui/form/stream/stream_quic.html @@ -12,13 +12,13 @@ - none (not camouflage) - SRTP (video call) - UTP (BT Download) - wechat-video (WeChat video) + none (No Obfuscation) + SRTP (Video Call) + uTP (Bittorrent) + WeChat Video DTLS (DTLS 1.2 packages) WireGuard (WireGuard Packages) -{{end}} \ No newline at end of file +{{end}} diff --git a/web/html/xui/form/stream/stream_sockopt.html b/web/html/xui/form/stream/stream_sockopt.html index aa0f1d3e..7291b740 100644 --- a/web/html/xui/form/stream/stream_sockopt.html +++ b/web/html/xui/form/stream/stream_sockopt.html @@ -1,5 +1,5 @@ {{define "form/streamSockopt"}} - + @@ -23,4 +23,4 @@ -{{end}} \ No newline at end of file +{{end}} diff --git a/web/html/xui/form/stream/stream_ws.html b/web/html/xui/form/stream/stream_ws.html index b5f2593e..14d09999 100644 --- a/web/html/xui/form/stream/stream_ws.html +++ b/web/html/xui/form/stream/stream_ws.html @@ -1,6 +1,6 @@ {{define "form/streamWS"}} - + @@ -20,4 +20,4 @@ -{{end}} \ No newline at end of file +{{end}} diff --git a/web/html/xui/form/tls_settings.html b/web/html/xui/form/tls_settings.html index 07527e7f..f265cb43 100644 --- a/web/html/xui/form/tls_settings.html +++ b/web/html/xui/form/tls_settings.html @@ -1,7 +1,7 @@ {{define "form/tlsSettings"}} - + {{ i18n "none" }} @@ -55,7 +55,7 @@ [[ alpn ]] - + @@ -109,7 +109,7 @@ [[ alpn ]] - + @@ -171,7 +171,7 @@ {{ i18n "pages.client.renew" }} - Short Ids + Short IDs diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index 8203a577..2be031e5 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -161,9 +161,9 @@ - + diff --git a/web/html/xui/index.html b/web/html/xui/index.html index 9920dd90..50c46b03 100644 --- a/web/html/xui/index.html +++ b/web/html/xui/index.html @@ -132,7 +132,7 @@ {{ i18n "usage"}}: - Memory [[ sizeFormat(status.appStats.mem) ]] - + RAM [[ sizeFormat(status.appStats.mem) ]] - Threads [[ status.appStats.threads ]] @@ -190,7 +190,7 @@ - [[ sizeFormat(status.netIO.up) ]]/S + [[ sizeFormat(status.netIO.up) ]]/s {{ i18n "pages.index.upSpeed" }} @@ -200,7 +200,7 @@ - [[ sizeFormat(status.netIO.down) ]]/S + [[ sizeFormat(status.netIO.down) ]]/s {{ i18n "pages.index.downSpeed" }} @@ -650,4 +650,4 @@