From d9922d93af64c30a40d855f0eed142f49e8b583a Mon Sep 17 00:00:00 2001 From: Jay <130910450+jalalsaberi@users.noreply.github.com> Date: Tue, 10 Jun 2025 19:17:31 +0330 Subject: [PATCH 01/11] chore: update the installation command (#3069) * install command had an extra $ at the first of the line * install command had an extra $ at the first of the line * install command had an extra $ at the first of the line * install command had an extra $ at the first of the line * install command had an extra $ at the first of the line * install command had an extra $ at the first of the line --- README.ar_EG.md | 4 ++-- README.es_ES.md | 4 ++-- README.fa_IR.md | 4 ++-- README.md | 4 ++-- README.ru_RU.md | 4 ++-- README.zh_CN.md | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.ar_EG.md b/README.ar_EG.md index 99354e55..d2f6dcc3 100644 --- a/README.ar_EG.md +++ b/README.ar_EG.md @@ -23,7 +23,7 @@ ## البدء السريع ``` -$ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh) +bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh) ``` للحصول على الوثائق الكاملة، يرجى زيارة [ويكي المشروع](https://github.com/MHSanaei/3x-ui/wiki). @@ -53,4 +53,4 @@ $ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/instal ## النجوم عبر الزمن -[![Stargazers over time](https://starchart.cc/MHSanaei/3x-ui.svg?variant=adaptive)](https://starchart.cc/MHSanaei/3x-ui) \ No newline at end of file +[![Stargazers over time](https://starchart.cc/MHSanaei/3x-ui.svg?variant=adaptive)](https://starchart.cc/MHSanaei/3x-ui) diff --git a/README.es_ES.md b/README.es_ES.md index 915cc4c4..52625664 100644 --- a/README.es_ES.md +++ b/README.es_ES.md @@ -23,7 +23,7 @@ Como una versión mejorada del proyecto X-UI original, 3X-UI proporciona mayor e ## Inicio Rápido ``` -$ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh) +bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh) ``` Para documentación completa, visita la [Wiki del proyecto](https://github.com/MHSanaei/3x-ui/wiki). @@ -53,4 +53,4 @@ Para documentación completa, visita la [Wiki del proyecto](https://github.com/M ## Estrellas a lo Largo del Tiempo -[![Stargazers over time](https://starchart.cc/MHSanaei/3x-ui.svg?variant=adaptive)](https://starchart.cc/MHSanaei/3x-ui) \ No newline at end of file +[![Stargazers over time](https://starchart.cc/MHSanaei/3x-ui.svg?variant=adaptive)](https://starchart.cc/MHSanaei/3x-ui) diff --git a/README.fa_IR.md b/README.fa_IR.md index e194b663..2b2dc5ec 100644 --- a/README.fa_IR.md +++ b/README.fa_IR.md @@ -23,7 +23,7 @@ ## شروع سریع ``` -$ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh) +bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh) ``` برای مستندات کامل، لطفاً به [ویکی پروژه](https://github.com/MHSanaei/3x-ui/wiki) مراجعه کنید. @@ -53,4 +53,4 @@ $ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/instal ## ستاره‌ها در طول زمان -[![Stargazers over time](https://starchart.cc/MHSanaei/3x-ui.svg?variant=adaptive)](https://starchart.cc/MHSanaei/3x-ui) \ No newline at end of file +[![Stargazers over time](https://starchart.cc/MHSanaei/3x-ui.svg?variant=adaptive)](https://starchart.cc/MHSanaei/3x-ui) diff --git a/README.md b/README.md index a63a0fb3..7cda8370 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ As an enhanced fork of the original X-UI project, 3X-UI provides improved stabil ## Quick Start ```bash -$ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh) +bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh) ``` For full documentation, please visit the [project Wiki](https://github.com/MHSanaei/3x-ui/wiki). @@ -53,4 +53,4 @@ For full documentation, please visit the [project Wiki](https://github.com/MHSan ## Stargazers over Time -[![Stargazers over time](https://starchart.cc/MHSanaei/3x-ui.svg?variant=adaptive)](https://starchart.cc/MHSanaei/3x-ui) \ No newline at end of file +[![Stargazers over time](https://starchart.cc/MHSanaei/3x-ui.svg?variant=adaptive)](https://starchart.cc/MHSanaei/3x-ui) diff --git a/README.ru_RU.md b/README.ru_RU.md index 1bb8d611..d971f403 100644 --- a/README.ru_RU.md +++ b/README.ru_RU.md @@ -23,7 +23,7 @@ ## Быстрый старт ``` -$ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh) +bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh) ``` Полную документацию смотрите в [вики проекта](https://github.com/MHSanaei/3x-ui/wiki). @@ -53,4 +53,4 @@ $ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/instal ## Звезды с течением времени -[![Stargazers over time](https://starchart.cc/MHSanaei/3x-ui.svg?variant=adaptive)](https://starchart.cc/MHSanaei/3x-ui) \ No newline at end of file +[![Stargazers over time](https://starchart.cc/MHSanaei/3x-ui.svg?variant=adaptive)](https://starchart.cc/MHSanaei/3x-ui) diff --git a/README.zh_CN.md b/README.zh_CN.md index 133ffe0c..75e75603 100644 --- a/README.zh_CN.md +++ b/README.zh_CN.md @@ -23,7 +23,7 @@ ## 快速开始 ``` -$ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh) +bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh) ``` 完整文档请参阅 [项目Wiki](https://github.com/MHSanaei/3x-ui/wiki)。 @@ -53,4 +53,4 @@ $ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/instal ## 随时间变化的星标数 -[![Stargazers over time](https://starchart.cc/MHSanaei/3x-ui.svg?variant=adaptive)](https://starchart.cc/MHSanaei/3x-ui) \ No newline at end of file +[![Stargazers over time](https://starchart.cc/MHSanaei/3x-ui.svg?variant=adaptive)](https://starchart.cc/MHSanaei/3x-ui) From d1e07954c51229c2d74756685c33cd70c67fa2ef Mon Sep 17 00:00:00 2001 From: rammiah Date: Wed, 11 Jun 2025 18:42:41 +0800 Subject: [PATCH 02/11] feat: support metrics config --- web/service/config.json | 8 ++++++-- xray/config.go | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/web/service/config.json b/web/service/config.json index e7425ac0..764d2b2e 100644 --- a/web/service/config.json +++ b/web/service/config.json @@ -81,5 +81,9 @@ } ] }, - "stats": {} -} \ No newline at end of file + "stats": {}, + "metrics": { + "tag": "metrics_out", + "listen": "127.0.0.1:11111" + } +} diff --git a/xray/config.go b/xray/config.go index 67ff7d95..a246b845 100644 --- a/xray/config.go +++ b/xray/config.go @@ -20,6 +20,7 @@ type Config struct { FakeDNS json_util.RawMessage `json:"fakedns"` Observatory json_util.RawMessage `json:"observatory"` BurstObservatory json_util.RawMessage `json:"burstObservatory"` + Metrics json_util.RawMessage `json:"metrics"` } func (c *Config) Equals(other *Config) bool { @@ -61,5 +62,8 @@ func (c *Config) Equals(other *Config) bool { if !bytes.Equal(c.FakeDNS, other.FakeDNS) { return false } + if !bytes.Equal(c.Metrics, other.Metrics) { + return false + } return true } From 13baf778931929fdf1bc1f7d5606c7d73d5d917e Mon Sep 17 00:00:00 2001 From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:25:13 +0700 Subject: [PATCH 03/11] chore: build image in docker compose this makes it possible to run development build using Docker. --- docker-compose.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e27a735e..198df198 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,10 @@ services: - 3x-ui: - image: ghcr.io/mhsanaei/3x-ui:latest - container_name: 3x-ui - hostname: yourhostname + 3xui: + build: + context: . + dockerfile: ./Dockerfile + container_name: 3xui_app + # hostname: yourhostname <- optional volumes: - $PWD/db/:/etc/x-ui/ - $PWD/cert/:/root/cert/ From dff4ad31ff7b4a743173841ea80ec849bb4bd51e Mon Sep 17 00:00:00 2001 From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com> Date: Mon, 16 Jun 2025 12:22:56 +0700 Subject: [PATCH 04/11] chore: up minimal xray-core version to v25.6.8 --- .github/workflows/release.yml | 2 +- DockerInit.sh | 2 +- web/service/server.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1f019498..b249622d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -97,7 +97,7 @@ jobs: cd x-ui/bin # Download dependencies - Xray_URL="https://github.com/XTLS/Xray-core/releases/download/v25.5.16/" + Xray_URL="https://github.com/XTLS/Xray-core/releases/download/v25.6.8/" if [ "${{ matrix.platform }}" == "amd64" ]; then wget -q ${Xray_URL}Xray-linux-64.zip unzip Xray-linux-64.zip diff --git a/DockerInit.sh b/DockerInit.sh index c55cea94..ecbe756a 100755 --- a/DockerInit.sh +++ b/DockerInit.sh @@ -27,7 +27,7 @@ case $1 in esac mkdir -p build/bin cd build/bin -wget -q "https://github.com/XTLS/Xray-core/releases/download/v25.5.16/Xray-linux-${ARCH}.zip" +wget -q "https://github.com/XTLS/Xray-core/releases/download/v25.6.8/Xray-linux-${ARCH}.zip" unzip "Xray-linux-${ARCH}.zip" rm -f "Xray-linux-${ARCH}.zip" geoip.dat geosite.dat mv xray "xray-linux-${FNAME}" diff --git a/web/service/server.go b/web/service/server.go index bbdc8989..1e29990f 100644 --- a/web/service/server.go +++ b/web/service/server.go @@ -295,7 +295,7 @@ func (s *ServerService) GetXrayVersions() ([]string, error) { continue } - if major > 25 || (major == 25 && minor > 3) || (major == 25 && minor == 3 && patch >= 3) { + if major > 25 || (major == 25 && minor > 6) || (major == 25 && minor == 6 && patch >= 8) { versions = append(versions, release.TagName) } } From 00b61de646e9b480ed16279fe2915ce195f0d7df Mon Sep 17 00:00:00 2001 From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com> Date: Mon, 16 Jun 2025 12:26:49 +0700 Subject: [PATCH 05/11] chore: add translations for routing table --- web/html/xray.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/web/html/xray.html b/web/html/xray.html index fc94c31a..e051ce15 100644 --- a/web/html/xray.html +++ b/web/html/xray.html @@ -135,18 +135,18 @@ { title: "#", align: 'center', width: 15, scopedSlots: { customRender: 'action' } }, { title: '{{ i18n "pages.xray.rules.source"}}', children: [ { title: 'IP', dataIndex: "source", align: 'center', width: 20, ellipsis: true }, - { title: 'Port', dataIndex: 'sourcePort', align: 'center', width: 10, ellipsis: true } ]}, + { title: '{{ i18n "pages.inbounds.port" }}', dataIndex: 'sourcePort', align: 'center', width: 10, ellipsis: true } ]}, { title: '{{ i18n "pages.inbounds.network"}}', children: [ { title: 'L4', dataIndex: 'network', align: 'center', width: 10 }, - { title: 'Protocol', dataIndex: 'protocol', align: 'center', width: 15, ellipsis: true }, + { title: '{{ i18n "protocol" }}', dataIndex: 'protocol', align: 'center', width: 15, ellipsis: true }, { title: 'Attrs', dataIndex: 'attrs', align: 'center', width: 10, ellipsis: true } ]}, { title: '{{ i18n "pages.xray.rules.dest"}}', children: [ { title: 'IP', dataIndex: 'ip', align: 'center', width: 20, ellipsis: true }, - { title: 'Domain', dataIndex: 'domain', align: 'center', width: 20, ellipsis: true }, - { title: 'Port', dataIndex: 'port', align: 'center', width: 10, ellipsis: true }]}, + { title: '{{ i18n "pages.xray.outbound.domain" }}', dataIndex: 'domain', align: 'center', width: 20, ellipsis: true }, + { title: '{{ i18n "pages.inbounds.port" }}', dataIndex: 'port', align: 'center', width: 10, ellipsis: true }]}, { title: '{{ i18n "pages.xray.rules.inbound"}}', children: [ - { title: 'Tag', dataIndex: 'inboundTag', align: 'center', width: 15, ellipsis: true }, - { title: 'Client Email', dataIndex: 'user', align: 'center', width: 20, ellipsis: true }]}, + { title: '{{ i18n "pages.xray.outbound.tag" }}', dataIndex: 'inboundTag', align: 'center', width: 15, ellipsis: true }, + { title: '{{ i18n "pages.inbounds.client" }}', dataIndex: 'user', align: 'center', width: 20, ellipsis: true }]}, { title: '{{ i18n "pages.xray.rules.outbound"}}', dataIndex: 'outboundTag', align: 'center', width: 17 }, { title: '{{ i18n "pages.xray.rules.balancer"}}', dataIndex: 'balancerTag', align: 'center', width: 15 }, ]; From ba50c99c101e2164bc4daa7617b5b0096145a6f3 Mon Sep 17 00:00:00 2001 From: xujie86 <167618598+xujie86@users.noreply.github.com> Date: Mon, 16 Jun 2025 19:11:23 +0800 Subject: [PATCH 06/11] chore: add `RHEL` system to install.sh fixed #3097 --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 0398285d..8fb23f3b 100644 --- a/install.sh +++ b/install.sh @@ -57,7 +57,7 @@ install_base() { ubuntu | debian | armbian) apt-get update && apt-get install -y -q wget curl tar tzdata ;; - centos | almalinux | rocky | ol) + centos | rhel | almalinux | rocky | ol) yum -y update && yum install -y -q wget curl tar tzdata ;; fedora | amzn | virtuozzo) From e272c160b12ff8ae8d0d3812756e986ace72a924 Mon Sep 17 00:00:00 2001 From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com> Date: Tue, 17 Jun 2025 22:25:24 +0700 Subject: [PATCH 07/11] chore: add download config button for wireguard --- web/html/modals/inbound_info_modal.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/html/modals/inbound_info_modal.html b/web/html/modals/inbound_info_modal.html index 9da3fc86..c9c36398 100644 --- a/web/html/modals/inbound_info_modal.html +++ b/web/html/modals/inbound_info_modal.html @@ -433,6 +433,9 @@ + + +
From f86219f4de750c2ee2654c7e09435a608c894443 Mon Sep 17 00:00:00 2001 From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com> Date: Tue, 17 Jun 2025 22:45:03 +0700 Subject: [PATCH 08/11] refactor: use `math.MaxUint16` when checking port --- web/entity/entity.go | 5 +++-- xray/api.go | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/web/entity/entity.go b/web/entity/entity.go index 543b80e0..889c9024 100644 --- a/web/entity/entity.go +++ b/web/entity/entity.go @@ -5,6 +5,7 @@ import ( "net" "strings" "time" + "math" "x-ui/util/common" ) @@ -78,11 +79,11 @@ func (s *AllSetting) CheckValid() error { } } - if s.WebPort <= 0 || s.WebPort > 65535 { + if s.WebPort <= 0 || s.WebPort > math.MaxUint16 { return common.NewError("web port is not a valid port:", s.WebPort) } - if s.SubPort <= 0 || s.SubPort > 65535 { + if s.SubPort <= 0 || s.SubPort > math.MaxUint16 { return common.NewError("Sub port is not a valid port:", s.SubPort) } diff --git a/xray/api.go b/xray/api.go index 3a2dddd6..d68b1f96 100644 --- a/xray/api.go +++ b/xray/api.go @@ -6,6 +6,7 @@ import ( "fmt" "regexp" "time" + "math" "x-ui/logger" "x-ui/util/common" @@ -32,7 +33,7 @@ type XrayAPI struct { } func (x *XrayAPI) Init(apiPort int) error { - if apiPort <= 0 { + if apiPort <= 0 || apiPort > math.MaxUint16 { return fmt.Errorf("invalid Xray API port: %d", apiPort) } From 6a2e0071cfb27d290f3e3aca9eda184f2ac7d15e Mon Sep 17 00:00:00 2001 From: spatiumstas <79056064+spatiumstas@users.noreply.github.com> Date: Wed, 18 Jun 2025 18:31:10 +0300 Subject: [PATCH 09/11] fix: reduced login title font-size for mobile (#3105) --- web/html/login.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web/html/login.html b/web/html/login.html index 515ea2b3..68e849f5 100644 --- a/web/html/login.html +++ b/web/html/login.html @@ -299,6 +299,12 @@ min-height: 40px; } } + + @media (max-width: 1024px) { + .title { + font-size: 1.4rem; + } + } .words-wrapper { width: 100%; @@ -617,4 +623,4 @@ }); - \ No newline at end of file + From cb22b4ad47816742e7eaa9b9f46f11530b0aae8e Mon Sep 17 00:00:00 2001 From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com> Date: Wed, 18 Jun 2025 23:24:18 +0700 Subject: [PATCH 10/11] chore: add new dns features from v25.6.8 * chore: add new dns params * chore: add `DNS Presets` modal * chore: edit file names --- web/html/modals/dns_presets_modal.html | 110 +++++++++++++++++ web/html/modals/fakedns_modal.html | 57 --------- .../{dns_modal.html => xray_dns_modal.html} | 111 ++++++++++-------- web/html/modals/xray_fakedns_modal.html | 56 +++++++++ web/html/settings/xray/basics.html | 14 +-- web/html/settings/xray/dns.html | 19 ++- web/html/xray.html | 51 ++++---- web/translation/translate.ar_EG.toml | 10 +- web/translation/translate.en_US.toml | 10 +- web/translation/translate.es_ES.toml | 10 +- web/translation/translate.fa_IR.toml | 10 +- web/translation/translate.id_ID.toml | 9 +- web/translation/translate.ja_JP.toml | 10 +- web/translation/translate.pt_BR.toml | 10 +- web/translation/translate.ru_RU.toml | 20 ++-- web/translation/translate.tr_TR.toml | 10 +- web/translation/translate.uk_UA.toml | 10 +- web/translation/translate.vi_VN.toml | 10 +- web/translation/translate.zh_CN.toml | 10 +- web/translation/translate.zh_TW.toml | 10 +- 20 files changed, 354 insertions(+), 203 deletions(-) create mode 100644 web/html/modals/dns_presets_modal.html delete mode 100644 web/html/modals/fakedns_modal.html rename web/html/modals/{dns_modal.html => xray_dns_modal.html} (55%) create mode 100644 web/html/modals/xray_fakedns_modal.html diff --git a/web/html/modals/dns_presets_modal.html b/web/html/modals/dns_presets_modal.html new file mode 100644 index 00000000..010b973a --- /dev/null +++ b/web/html/modals/dns_presets_modal.html @@ -0,0 +1,110 @@ +{{define "modals/dnsPresetsModal"}} + + + + + + + [[ dns.name ]] + [[ dns.family ? '{{ i18n "pages.xray.dns.dnsPresetFamily" }}' : 'DNS' ]] + + + + {{ i18n "install" }} + + + + + + + + + +{{end}} \ No newline at end of file diff --git a/web/html/modals/fakedns_modal.html b/web/html/modals/fakedns_modal.html deleted file mode 100644 index 8e554ac0..00000000 --- a/web/html/modals/fakedns_modal.html +++ /dev/null @@ -1,57 +0,0 @@ -{{define "modals/fakednsModal"}} - - - - - - - - - - - -{{end}} diff --git a/web/html/modals/dns_modal.html b/web/html/modals/xray_dns_modal.html similarity index 55% rename from web/html/modals/dns_modal.html rename to web/html/modals/xray_dns_modal.html index e6266c06..484bd2f8 100644 --- a/web/html/modals/dns_modal.html +++ b/web/html/modals/xray_dns_modal.html @@ -6,6 +6,16 @@ + + + + + + [[ l ]] + + + - - - [[ l ]] - - - - - + + + + + + + + + + + + + + diff --git a/web/html/modals/xray_fakedns_modal.html b/web/html/modals/xray_fakedns_modal.html new file mode 100644 index 00000000..f1f4429c --- /dev/null +++ b/web/html/modals/xray_fakedns_modal.html @@ -0,0 +1,56 @@ +{{define "modals/fakednsModal"}} + + + + + + + + + + + +{{end}} \ No newline at end of file diff --git a/web/html/settings/xray/basics.html b/web/html/settings/xray/basics.html index 374cb7dd..71aa0d7c 100644 --- a/web/html/settings/xray/basics.html +++ b/web/html/settings/xray/basics.html @@ -135,7 +135,7 @@ - + - + - - - - - - - - diff --git a/web/html/xray.html b/web/html/xray.html index e051ce15..eb99b794 100644 --- a/web/html/xray.html +++ b/web/html/xray.html @@ -128,6 +128,7 @@ {{template "modals/reverseModal"}} {{template "modals/balancerModal"}} {{template "modals/dnsModal"}} +{{template "modals/dnsPresetsModal"}} {{template "modals/fakednsModal"}} {{template "modals/warpModal"}}