Feat: update urls, GenXrayInboundConfig logic(Generate correct configurations using a proxy on port 443)

This commit is contained in:
kirden 2026-02-22 20:24:52 +03:00
parent 37f0880f8f
commit 65ab01260f
61 changed files with 299 additions and 254 deletions

4
.github/FUNDING.yml vendored
View file

@ -1,6 +1,6 @@
# These are supported funding model platforms
github: MHSanaei
github: kirden31
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
@ -10,5 +10,5 @@ liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: mhsanaei
buy_me_a_coffee: kirden31
custom: https://nowpayments.io/donation/hsanaei

View file

@ -25,7 +25,7 @@ jobs:
with:
images: |
hsanaeii/3x-ui
ghcr.io/mhsanaei/3x-ui
ghcr.io/kirden31/3x-ui
tags: |
type=ref,event=branch
type=ref,event=tag

View file

@ -7,13 +7,13 @@
</picture>
</p>
[![Release](https://img.shields.io/github/v/release/mhsanaei/3x-ui.svg)](https://github.com/MHSanaei/3x-ui/releases)
[![Build](https://img.shields.io/github/actions/workflow/status/mhsanaei/3x-ui/release.yml.svg)](https://github.com/MHSanaei/3x-ui/actions)
[![GO Version](https://img.shields.io/github/go-mod/go-version/mhsanaei/3x-ui.svg)](#)
[![Downloads](https://img.shields.io/github/downloads/mhsanaei/3x-ui/total.svg)](https://github.com/MHSanaei/3x-ui/releases/latest)
[![Release](https://img.shields.io/github/v/release/kirden31/3x-ui.svg)](https://github.com/kirden31/3x-ui/releases)
[![Build](https://img.shields.io/github/actions/workflow/status/kirden31/3x-ui/release.yml.svg)](https://github.com/kirden31/3x-ui/actions)
[![GO Version](https://img.shields.io/github/go-mod/go-version/kirden31/3x-ui.svg)](#)
[![Downloads](https://img.shields.io/github/downloads/kirden31/3x-ui/total.svg)](https://github.com/kirden31/3x-ui/releases/latest)
[![License](https://img.shields.io/badge/license-GPL%20V3-blue.svg?longCache=true)](https://www.gnu.org/licenses/gpl-3.0.en.html)
[![Go Reference](https://pkg.go.dev/badge/github.com/mhsanaei/3x-ui/v2.svg)](https://pkg.go.dev/github.com/mhsanaei/3x-ui/v2)
[![Go Report Card](https://goreportcard.com/badge/github.com/mhsanaei/3x-ui/v2)](https://goreportcard.com/report/github.com/mhsanaei/3x-ui/v2)
[![Go Reference](https://pkg.go.dev/badge/github.com/kirden31/3x-ui/v2.svg)](https://pkg.go.dev/github.com/kirden31/3x-ui/v2)
[![Go Report Card](https://goreportcard.com/badge/github.com/kirden31/3x-ui/v2)](https://goreportcard.com/report/github.com/kirden31/3x-ui/v2)
**3X-UI** — لوحة تحكم متقدمة مفتوحة المصدر تعتمد على الويب مصممة لإدارة خادم Xray-core. توفر واجهة سهلة الاستخدام لتكوين ومراقبة بروتوكولات VPN والوكيل المختلفة.
@ -25,10 +25,10 @@
## البدء السريع
```
bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)
bash <(curl -Ls https://raw.githubusercontent.com/kirden31/3x-ui/master/install.sh)
```
للحصول على الوثائق الكاملة، يرجى زيارة [ويكي المشروع](https://github.com/MHSanaei/3x-ui/wiki).
للحصول على الوثائق الكاملة، يرجى زيارة [ويكي المشروع](https://github.com/kirden31/3x-ui/wiki).
## شكر خاص إلى
@ -43,7 +43,7 @@ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.
**إذا كان هذا المشروع مفيدًا لك، فقد ترغب في إعطائه**:star2:
<a href="https://www.buymeacoffee.com/MHSanaei" target="_blank">
<a href="https://www.buymeacoffee.com/kirden31" target="_blank">
<img src="./media/default-yellow.png" alt="Buy Me A Coffee" style="height: 70px !important;width: 277px !important;" >
</a>
</br>
@ -53,4 +53,4 @@ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.
## النجوم عبر الزمن
[![Stargazers over time](https://starchart.cc/MHSanaei/3x-ui.svg?variant=adaptive)](https://starchart.cc/MHSanaei/3x-ui)
[![Stargazers over time](https://starchart.cc/kirden31/3x-ui.svg?variant=adaptive)](https://starchart.cc/kirden31/3x-ui)

View file

@ -7,13 +7,13 @@
</picture>
</p>
[![Release](https://img.shields.io/github/v/release/mhsanaei/3x-ui.svg)](https://github.com/MHSanaei/3x-ui/releases)
[![Build](https://img.shields.io/github/actions/workflow/status/mhsanaei/3x-ui/release.yml.svg)](https://github.com/MHSanaei/3x-ui/actions)
[![GO Version](https://img.shields.io/github/go-mod/go-version/mhsanaei/3x-ui.svg)](#)
[![Downloads](https://img.shields.io/github/downloads/mhsanaei/3x-ui/total.svg)](https://github.com/MHSanaei/3x-ui/releases/latest)
[![Release](https://img.shields.io/github/v/release/kirden31/3x-ui.svg)](https://github.com/kirden31/3x-ui/releases)
[![Build](https://img.shields.io/github/actions/workflow/status/kirden31/3x-ui/release.yml.svg)](https://github.com/kirden31/3x-ui/actions)
[![GO Version](https://img.shields.io/github/go-mod/go-version/kirden31/3x-ui.svg)](#)
[![Downloads](https://img.shields.io/github/downloads/kirden31/3x-ui/total.svg)](https://github.com/kirden31/3x-ui/releases/latest)
[![License](https://img.shields.io/badge/license-GPL%20V3-blue.svg?longCache=true)](https://www.gnu.org/licenses/gpl-3.0.en.html)
[![Go Reference](https://pkg.go.dev/badge/github.com/mhsanaei/3x-ui/v2.svg)](https://pkg.go.dev/github.com/mhsanaei/3x-ui/v2)
[![Go Report Card](https://goreportcard.com/badge/github.com/mhsanaei/3x-ui/v2)](https://goreportcard.com/report/github.com/mhsanaei/3x-ui/v2)
[![Go Reference](https://pkg.go.dev/badge/github.com/kirden31/3x-ui/v2.svg)](https://pkg.go.dev/github.com/kirden31/3x-ui/v2)
[![Go Report Card](https://goreportcard.com/badge/github.com/kirden31/3x-ui/v2)](https://goreportcard.com/report/github.com/kirden31/3x-ui/v2)
**3X-UI** — panel de control avanzado basado en web de código abierto diseñado para gestionar el servidor Xray-core. Ofrece una interfaz fácil de usar para configurar y monitorear varios protocolos VPN y proxy.
@ -25,10 +25,10 @@ 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/kirden31/3x-ui/master/install.sh)
```
Para documentación completa, visita la [Wiki del proyecto](https://github.com/MHSanaei/3x-ui/wiki).
Para documentación completa, visita la [Wiki del proyecto](https://github.com/kirden31/3x-ui/wiki).
## Un Agradecimiento Especial a
@ -43,7 +43,7 @@ Para documentación completa, visita la [Wiki del proyecto](https://github.com/M
**Si este proyecto te es útil, puedes darle una**:star2:
<a href="https://www.buymeacoffee.com/MHSanaei" target="_blank">
<a href="https://www.buymeacoffee.com/kirden31" target="_blank">
<img src="./media/default-yellow.png" alt="Buy Me A Coffee" style="height: 70px !important;width: 277px !important;" >
</a>
@ -54,4 +54,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)
[![Stargazers over time](https://starchart.cc/kirden31/3x-ui.svg?variant=adaptive)](https://starchart.cc/kirden31/3x-ui)

View file

@ -7,13 +7,13 @@
</picture>
</p>
[![Release](https://img.shields.io/github/v/release/mhsanaei/3x-ui.svg)](https://github.com/MHSanaei/3x-ui/releases)
[![Build](https://img.shields.io/github/actions/workflow/status/mhsanaei/3x-ui/release.yml.svg)](https://github.com/MHSanaei/3x-ui/actions)
[![GO Version](https://img.shields.io/github/go-mod/go-version/mhsanaei/3x-ui.svg)](#)
[![Downloads](https://img.shields.io/github/downloads/mhsanaei/3x-ui/total.svg)](https://github.com/MHSanaei/3x-ui/releases/latest)
[![Release](https://img.shields.io/github/v/release/kirden31/3x-ui.svg)](https://github.com/kirden31/3x-ui/releases)
[![Build](https://img.shields.io/github/actions/workflow/status/kirden31/3x-ui/release.yml.svg)](https://github.com/kirden31/3x-ui/actions)
[![GO Version](https://img.shields.io/github/go-mod/go-version/kirden31/3x-ui.svg)](#)
[![Downloads](https://img.shields.io/github/downloads/kirden31/3x-ui/total.svg)](https://github.com/kirden31/3x-ui/releases/latest)
[![License](https://img.shields.io/badge/license-GPL%20V3-blue.svg?longCache=true)](https://www.gnu.org/licenses/gpl-3.0.en.html)
[![Go Reference](https://pkg.go.dev/badge/github.com/mhsanaei/3x-ui/v2.svg)](https://pkg.go.dev/github.com/mhsanaei/3x-ui/v2)
[![Go Report Card](https://goreportcard.com/badge/github.com/mhsanaei/3x-ui/v2)](https://goreportcard.com/report/github.com/mhsanaei/3x-ui/v2)
[![Go Reference](https://pkg.go.dev/badge/github.com/kirden31/3x-ui/v2.svg)](https://pkg.go.dev/github.com/kirden31/3x-ui/v2)
[![Go Report Card](https://goreportcard.com/badge/github.com/kirden31/3x-ui/v2)](https://goreportcard.com/report/github.com/kirden31/3x-ui/v2)
**3X-UI** — یک پنل کنترل پیشرفته مبتنی بر وب با کد باز که برای مدیریت سرور Xray-core طراحی شده است. این پنل یک رابط کاربری آسان برای پیکربندی و نظارت بر پروتکل‌های مختلف VPN و پراکسی ارائه می‌دهد.
@ -25,10 +25,10 @@
## شروع سریع
```
bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)
bash <(curl -Ls https://raw.githubusercontent.com/kirden31/3x-ui/master/install.sh)
```
برای مستندات کامل، لطفاً به [ویکی پروژه](https://github.com/MHSanaei/3x-ui/wiki) مراجعه کنید.
برای مستندات کامل، لطفاً به [ویکی پروژه](https://github.com/kirden31/3x-ui/wiki) مراجعه کنید.
## تشکر ویژه از
@ -43,7 +43,7 @@ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.
**اگر این پروژه برای شما مفید است، می‌توانید به آن یک**:star2: بدهید
<a href="https://www.buymeacoffee.com/MHSanaei" target="_blank">
<a href="https://www.buymeacoffee.com/kirden31" target="_blank">
<img src="./media/default-yellow.png" alt="Buy Me A Coffee" style="height: 70px !important;width: 277px !important;" >
</a>
@ -54,4 +54,4 @@ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.
## ستاره‌ها در طول زمان
[![Stargazers over time](https://starchart.cc/MHSanaei/3x-ui.svg?variant=adaptive)](https://starchart.cc/MHSanaei/3x-ui)
[![Stargazers over time](https://starchart.cc/kirden31/3x-ui.svg?variant=adaptive)](https://starchart.cc/kirden31/3x-ui)

View file

@ -7,13 +7,13 @@
</picture>
</p>
[![Release](https://img.shields.io/github/v/release/mhsanaei/3x-ui.svg)](https://github.com/MHSanaei/3x-ui/releases)
[![Build](https://img.shields.io/github/actions/workflow/status/mhsanaei/3x-ui/release.yml.svg)](https://github.com/MHSanaei/3x-ui/actions)
[![GO Version](https://img.shields.io/github/go-mod/go-version/mhsanaei/3x-ui.svg)](#)
[![Downloads](https://img.shields.io/github/downloads/mhsanaei/3x-ui/total.svg)](https://github.com/MHSanaei/3x-ui/releases/latest)
[![Release](https://img.shields.io/github/v/release/kirden31/3x-ui.svg)](https://github.com/kirden31/3x-ui/releases)
[![Build](https://img.shields.io/github/actions/workflow/status/kirden31/3x-ui/release.yml.svg)](https://github.com/kirden31/3x-ui/actions)
[![GO Version](https://img.shields.io/github/go-mod/go-version/kirden31/3x-ui.svg)](#)
[![Downloads](https://img.shields.io/github/downloads/kirden31/3x-ui/total.svg)](https://github.com/kirden31/3x-ui/releases/latest)
[![License](https://img.shields.io/badge/license-GPL%20V3-blue.svg?longCache=true)](https://www.gnu.org/licenses/gpl-3.0.en.html)
[![Go Reference](https://pkg.go.dev/badge/github.com/mhsanaei/3x-ui/v2.svg)](https://pkg.go.dev/github.com/mhsanaei/3x-ui/v2)
[![Go Report Card](https://goreportcard.com/badge/github.com/mhsanaei/3x-ui/v2)](https://goreportcard.com/report/github.com/mhsanaei/3x-ui/v2)
[![Go Reference](https://pkg.go.dev/badge/github.com/kirden31/3x-ui/v2.svg)](https://pkg.go.dev/github.com/kirden31/3x-ui/v2)
[![Go Report Card](https://goreportcard.com/badge/github.com/kirden31/3x-ui/v2)](https://goreportcard.com/report/github.com/kirden31/3x-ui/v2)
**3X-UI** — advanced, open-source web-based control panel designed for managing Xray-core server. It offers a user-friendly interface for configuring and monitoring various VPN and proxy protocols.
@ -25,10 +25,10 @@ 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/kirden31/3x-ui/master/install.sh)
```
For full documentation, please visit the [project Wiki](https://github.com/MHSanaei/3x-ui/wiki).
For full documentation, please visit the [project Wiki](https://github.com/kirden31/3x-ui/wiki).
## A Special Thanks to
@ -43,7 +43,7 @@ For full documentation, please visit the [project Wiki](https://github.com/MHSan
**If this project is helpful to you, you may wish to give it a**:star2:
<a href="https://www.buymeacoffee.com/MHSanaei" target="_blank">
<a href="https://www.buymeacoffee.com/kirden31" target="_blank">
<img src="./media/default-yellow.png" alt="Buy Me A Coffee" style="height: 70px !important;width: 277px !important;" >
</a>
@ -54,4 +54,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)
[![Stargazers over time](https://starchart.cc/kirden31/3x-ui.svg?variant=adaptive)](https://starchart.cc/kirden31/3x-ui)

View file

@ -7,13 +7,13 @@
</picture>
</p>
[![Release](https://img.shields.io/github/v/release/mhsanaei/3x-ui.svg)](https://github.com/MHSanaei/3x-ui/releases)
[![Build](https://img.shields.io/github/actions/workflow/status/mhsanaei/3x-ui/release.yml.svg)](https://github.com/MHSanaei/3x-ui/actions)
[![GO Version](https://img.shields.io/github/go-mod/go-version/mhsanaei/3x-ui.svg)](#)
[![Downloads](https://img.shields.io/github/downloads/mhsanaei/3x-ui/total.svg)](https://github.com/MHSanaei/3x-ui/releases/latest)
[![Release](https://img.shields.io/github/v/release/kirden31/3x-ui.svg)](https://github.com/kirden31/3x-ui/releases)
[![Build](https://img.shields.io/github/actions/workflow/status/kirden31/3x-ui/release.yml.svg)](https://github.com/kirden31/3x-ui/actions)
[![GO Version](https://img.shields.io/github/go-mod/go-version/kirden31/3x-ui.svg)](#)
[![Downloads](https://img.shields.io/github/downloads/kirden31/3x-ui/total.svg)](https://github.com/kirden31/3x-ui/releases/latest)
[![License](https://img.shields.io/badge/license-GPL%20V3-blue.svg?longCache=true)](https://www.gnu.org/licenses/gpl-3.0.en.html)
[![Go Reference](https://pkg.go.dev/badge/github.com/mhsanaei/3x-ui/v2.svg)](https://pkg.go.dev/github.com/mhsanaei/3x-ui/v2)
[![Go Report Card](https://goreportcard.com/badge/github.com/mhsanaei/3x-ui/v2)](https://goreportcard.com/report/github.com/mhsanaei/3x-ui/v2)
[![Go Reference](https://pkg.go.dev/badge/github.com/kirden31/3x-ui/v2.svg)](https://pkg.go.dev/github.com/kirden31/3x-ui/v2)
[![Go Report Card](https://goreportcard.com/badge/github.com/kirden31/3x-ui/v2)](https://goreportcard.com/report/github.com/kirden31/3x-ui/v2)
**3X-UI** — продвинутая панель управления с открытым исходным кодом на основе веб-интерфейса, разработанная для управления сервером Xray-core. Предоставляет удобный интерфейс для настройки и мониторинга различных VPN и прокси-протоколов.
@ -25,10 +25,10 @@
## Быстрый старт
```
bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)
bash <(curl -Ls https://raw.githubusercontent.com/kirden31/3x-ui/master/install.sh)
```
Полную документацию смотрите в [вики проекта](https://github.com/MHSanaei/3x-ui/wiki).
Полную документацию смотрите в [вики проекта](https://github.com/kirden31/3x-ui/wiki).
## Особая благодарность
@ -43,7 +43,7 @@ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.
**Если этот проект полезен для вас, вы можете поставить ему**:star2:
<a href="https://www.buymeacoffee.com/MHSanaei" target="_blank">
<a href="https://www.buymeacoffee.com/kirden31" target="_blank">
<img src="./media/default-yellow.png" alt="Buy Me A Coffee" style="height: 70px !important;width: 277px !important;" >
</a>
@ -54,4 +54,4 @@ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.
## Звезды с течением времени
[![Stargazers over time](https://starchart.cc/MHSanaei/3x-ui.svg?variant=adaptive)](https://starchart.cc/MHSanaei/3x-ui)
[![Stargazers over time](https://starchart.cc/kirden31/3x-ui.svg?variant=adaptive)](https://starchart.cc/kirden31/3x-ui)

View file

@ -7,13 +7,13 @@
</picture>
</p>
[![Release](https://img.shields.io/github/v/release/mhsanaei/3x-ui.svg)](https://github.com/MHSanaei/3x-ui/releases)
[![Build](https://img.shields.io/github/actions/workflow/status/mhsanaei/3x-ui/release.yml.svg)](https://github.com/MHSanaei/3x-ui/actions)
[![GO Version](https://img.shields.io/github/go-mod/go-version/mhsanaei/3x-ui.svg)](#)
[![Downloads](https://img.shields.io/github/downloads/mhsanaei/3x-ui/total.svg)](https://github.com/MHSanaei/3x-ui/releases/latest)
[![Release](https://img.shields.io/github/v/release/kirden31/3x-ui.svg)](https://github.com/kirden31/3x-ui/releases)
[![Build](https://img.shields.io/github/actions/workflow/status/kirden31/3x-ui/release.yml.svg)](https://github.com/kirden31/3x-ui/actions)
[![GO Version](https://img.shields.io/github/go-mod/go-version/kirden31/3x-ui.svg)](#)
[![Downloads](https://img.shields.io/github/downloads/kirden31/3x-ui/total.svg)](https://github.com/kirden31/3x-ui/releases/latest)
[![License](https://img.shields.io/badge/license-GPL%20V3-blue.svg?longCache=true)](https://www.gnu.org/licenses/gpl-3.0.en.html)
[![Go Reference](https://pkg.go.dev/badge/github.com/mhsanaei/3x-ui/v2.svg)](https://pkg.go.dev/github.com/mhsanaei/3x-ui/v2)
[![Go Report Card](https://goreportcard.com/badge/github.com/mhsanaei/3x-ui/v2)](https://goreportcard.com/report/github.com/mhsanaei/3x-ui/v2)
[![Go Reference](https://pkg.go.dev/badge/github.com/kirden31/3x-ui/v2.svg)](https://pkg.go.dev/github.com/kirden31/3x-ui/v2)
[![Go Report Card](https://goreportcard.com/badge/github.com/kirden31/3x-ui/v2)](https://goreportcard.com/report/github.com/kirden31/3x-ui/v2)
**3X-UI** — 一个基于网页的高级开源控制面板,专为管理 Xray-core 服务器而设计。它提供了用户友好的界面,用于配置和监控各种 VPN 和代理协议。
@ -25,10 +25,10 @@
## 快速开始
```
bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)
bash <(curl -Ls https://raw.githubusercontent.com/kirden31/3x-ui/master/install.sh)
```
完整文档请参阅 [项目Wiki](https://github.com/MHSanaei/3x-ui/wiki)。
完整文档请参阅 [项目Wiki](https://github.com/kirden31/3x-ui/wiki)。
## 特别感谢
@ -43,7 +43,7 @@ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.
**如果这个项目对您有帮助,您可以给它一个**:star2:
<a href="https://www.buymeacoffee.com/MHSanaei" target="_blank">
<a href="https://www.buymeacoffee.com/kirden31" target="_blank">
<img src="./media/default-yellow.png" alt="Buy Me A Coffee" style="height: 70px !important;width: 277px !important;" >
</a>
@ -54,4 +54,4 @@ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.
## 随时间变化的星标数
[![Stargazers over time](https://starchart.cc/MHSanaei/3x-ui.svg?variant=adaptive)](https://starchart.cc/MHSanaei/3x-ui)
[![Stargazers over time](https://starchart.cc/kirden31/3x-ui.svg?variant=adaptive)](https://starchart.cc/kirden31/3x-ui)

View file

@ -12,10 +12,10 @@ import (
"path"
"slices"
"github.com/mhsanaei/3x-ui/v2/config"
"github.com/mhsanaei/3x-ui/v2/database/model"
"github.com/mhsanaei/3x-ui/v2/util/crypto"
"github.com/mhsanaei/3x-ui/v2/xray"
"github.com/kirden31/3x-ui/v2/config"
"github.com/kirden31/3x-ui/v2/database/model"
"github.com/kirden31/3x-ui/v2/util/crypto"
"github.com/kirden31/3x-ui/v2/xray"
"gorm.io/driver/sqlite"
"gorm.io/gorm"

View file

@ -4,8 +4,8 @@ package model
import (
"fmt"
"github.com/mhsanaei/3x-ui/v2/util/json_util"
"github.com/mhsanaei/3x-ui/v2/xray"
"github.com/kirden31/3x-ui/v2/util/json_util"
"github.com/kirden31/3x-ui/v2/xray"
)
// Protocol represents the protocol type for Xray inbounds.
@ -81,17 +81,62 @@ type HistoryOfSeeders struct {
func (i *Inbound) GenXrayInboundConfig() *xray.InboundConfig {
listen := i.Listen
// Default to 0.0.0.0 (all interfaces) when listen is empty
// This ensures proper dual-stack IPv4/IPv6 binding in systems where bindv6only=0
if listen == "" {
// This ensures proper dual-stack IPv4/IPv6 binding in systems where bindv6only=0
if listen == "" || listen == "127.0.0.1" {
listen = "0.0.0.0"
}
listen = fmt.Sprintf("\"%v\"", listen)
listenQuoted := fmt.Sprintf("\"%v\"", listen)
settingsRaw := i.Settings
streamRaw := i.StreamSettings
if i.Port >= 10000 && i.Port <= 11000 {
var ss map[string]any
if err := json.Unmarshal([]byte(i.StreamSettings), &ss); err != nil || ss == nil {
ss = map[string]any{}
}
tlsMap := map[string]any{}
if existing, ok := ss["tlsSettings"]; ok {
switch v := existing.(type) {
case map[string]any:
tlsMap = v
default:
if bs, err := json.Marshal(existing); err == nil {
var tmp map[string]any
if err2 := json.Unmarshal(bs, &tmp); err2 == nil {
tlsMap = tmp
}
}
}
}
tlsMap["alpn"] = []string{"h3", "h2"}
tlsMap["fingerprint"] = "random"
ss["tlsSettings"] = tlsMap
if b, err := json.Marshal(ss); err == nil {
streamRaw = string(b)
}
return &xray.InboundConfig{
Listen: json_util.RawMessage(listenQuoted),
Port: 443,
Protocol: string(i.Protocol),
Settings: json_util.RawMessage(settingsRaw),
StreamSettings: json_util.RawMessage(streamRaw),
Tag: i.Tag,
Sniffing: json_util.RawMessage(i.Sniffing),
}
}
return &xray.InboundConfig{
Listen: json_util.RawMessage(listen),
Listen: json_util.RawMessage(listenQuoted),
Port: i.Port,
Protocol: string(i.Protocol),
Settings: json_util.RawMessage(i.Settings),
StreamSettings: json_util.RawMessage(i.StreamSettings),
Settings: json_util.RawMessage(settingsRaw),
StreamSettings: json_util.RawMessage(streamRaw),
Tag: i.Tag,
Sniffing: json_util.RawMessage(i.Sniffing),
}

2
go.mod
View file

@ -1,4 +1,4 @@
module github.com/mhsanaei/3x-ui/v2
module github.com/kirden31/3x-ui/v2
go 1.26.0

View file

@ -765,17 +765,17 @@ install_x-ui() {
# Download resources
if [ $# == 0 ]; then
tag_version=$(curl -Ls "https://api.github.com/repos/MHSanaei/3x-ui/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
tag_version=$(curl -Ls "https://api.github.com/repos/kirden31/3x-ui/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
if [[ ! -n "$tag_version" ]]; then
echo -e "${yellow}Trying to fetch version with IPv4...${plain}"
tag_version=$(curl -4 -Ls "https://api.github.com/repos/MHSanaei/3x-ui/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
tag_version=$(curl -4 -Ls "https://api.github.com/repos/kirden31/3x-ui/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
if [[ ! -n "$tag_version" ]]; then
echo -e "${red}Failed to fetch x-ui version, it may be due to GitHub API restrictions, please try it later${plain}"
exit 1
fi
fi
echo -e "Got x-ui latest version: ${tag_version}, beginning the installation..."
curl -4fLRo ${xui_folder}-linux-$(arch).tar.gz https://github.com/MHSanaei/3x-ui/releases/download/${tag_version}/x-ui-linux-$(arch).tar.gz
curl -4fLRo ${xui_folder}-linux-$(arch).tar.gz https://github.com/kirden31/3x-ui/releases/download/${tag_version}/x-ui-linux-$(arch).tar.gz
if [[ $? -ne 0 ]]; then
echo -e "${red}Downloading x-ui failed, please be sure that your server can access GitHub ${plain}"
exit 1
@ -790,7 +790,7 @@ install_x-ui() {
exit 1
fi
url="https://github.com/MHSanaei/3x-ui/releases/download/${tag_version}/x-ui-linux-$(arch).tar.gz"
url="https://github.com/kirden31/3x-ui/releases/download/${tag_version}/x-ui-linux-$(arch).tar.gz"
echo -e "Beginning to install x-ui $1"
curl -4fLRo ${xui_folder}-linux-$(arch).tar.gz ${url}
if [[ $? -ne 0 ]]; then
@ -798,7 +798,7 @@ install_x-ui() {
exit 1
fi
fi
curl -4fLRo /usr/bin/x-ui-temp https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.sh
curl -4fLRo /usr/bin/x-ui-temp https://raw.githubusercontent.com/kirden31/3x-ui/main/x-ui.sh
if [[ $? -ne 0 ]]; then
echo -e "${red}Failed to download x-ui.sh${plain}"
exit 1
@ -850,7 +850,7 @@ install_x-ui() {
fi
if [[ $release == "alpine" ]]; then
curl -4fLRo /etc/init.d/x-ui https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.rc
curl -4fLRo /etc/init.d/x-ui https://raw.githubusercontent.com/kirden31/3x-ui/main/x-ui.rc
if [[ $? -ne 0 ]]; then
echo -e "${red}Failed to download x-ui.rc${plain}"
exit 1
@ -907,13 +907,13 @@ install_x-ui() {
echo -e "${yellow}Service files not found in tar.gz, downloading from GitHub...${plain}"
case "${release}" in
ubuntu | debian | armbian)
curl -4fLRo ${xui_service}/x-ui.service https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.service.debian >/dev/null 2>&1
curl -4fLRo ${xui_service}/x-ui.service https://raw.githubusercontent.com/kirden31/3x-ui/main/x-ui.service.debian >/dev/null 2>&1
;;
arch | manjaro | parch)
curl -4fLRo ${xui_service}/x-ui.service https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.service.arch >/dev/null 2>&1
curl -4fLRo ${xui_service}/x-ui.service https://raw.githubusercontent.com/kirden31/3x-ui/main/x-ui.service.arch >/dev/null 2>&1
;;
*)
curl -4fLRo ${xui_service}/x-ui.service https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.service.rhel >/dev/null 2>&1
curl -4fLRo ${xui_service}/x-ui.service https://raw.githubusercontent.com/kirden31/3x-ui/main/x-ui.service.rhel >/dev/null 2>&1
;;
esac

View file

@ -9,7 +9,7 @@ import (
"runtime"
"time"
"github.com/mhsanaei/3x-ui/v2/config"
"github.com/kirden31/3x-ui/v2/config"
"github.com/op/go-logging"
)

16
main.go
View file

@ -11,14 +11,14 @@ import (
"syscall"
_ "unsafe"
"github.com/mhsanaei/3x-ui/v2/config"
"github.com/mhsanaei/3x-ui/v2/database"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/sub"
"github.com/mhsanaei/3x-ui/v2/util/crypto"
"github.com/mhsanaei/3x-ui/v2/web"
"github.com/mhsanaei/3x-ui/v2/web/global"
"github.com/mhsanaei/3x-ui/v2/web/service"
"github.com/kirden31/3x-ui/v2/config"
"github.com/kirden31/3x-ui/v2/database"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/sub"
"github.com/kirden31/3x-ui/v2/util/crypto"
"github.com/kirden31/3x-ui/v2/web"
"github.com/kirden31/3x-ui/v2/web/global"
"github.com/kirden31/3x-ui/v2/web/service"
"github.com/joho/godotenv"
"github.com/op/go-logging"

View file

@ -15,13 +15,13 @@ import (
"strconv"
"strings"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/util/common"
webpkg "github.com/mhsanaei/3x-ui/v2/web"
"github.com/mhsanaei/3x-ui/v2/web/locale"
"github.com/mhsanaei/3x-ui/v2/web/middleware"
"github.com/mhsanaei/3x-ui/v2/web/network"
"github.com/mhsanaei/3x-ui/v2/web/service"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/util/common"
webpkg "github.com/kirden31/3x-ui/v2/web"
"github.com/kirden31/3x-ui/v2/web/locale"
"github.com/kirden31/3x-ui/v2/web/middleware"
"github.com/kirden31/3x-ui/v2/web/network"
"github.com/kirden31/3x-ui/v2/web/service"
"github.com/gin-gonic/gin"
)

View file

@ -6,7 +6,7 @@ import (
"strconv"
"strings"
"github.com/mhsanaei/3x-ui/v2/config"
"github.com/kirden31/3x-ui/v2/config"
"github.com/gin-gonic/gin"
)

View file

@ -7,12 +7,12 @@ import (
"maps"
"strings"
"github.com/mhsanaei/3x-ui/v2/database/model"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/util/json_util"
"github.com/mhsanaei/3x-ui/v2/util/random"
"github.com/mhsanaei/3x-ui/v2/web/service"
"github.com/mhsanaei/3x-ui/v2/xray"
"github.com/kirden31/3x-ui/v2/database/model"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/util/json_util"
"github.com/kirden31/3x-ui/v2/util/random"
"github.com/kirden31/3x-ui/v2/web/service"
"github.com/kirden31/3x-ui/v2/xray"
)
//go:embed default.json

View file

@ -11,13 +11,13 @@ import (
"github.com/gin-gonic/gin"
"github.com/goccy/go-json"
"github.com/mhsanaei/3x-ui/v2/database"
"github.com/mhsanaei/3x-ui/v2/database/model"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/util/common"
"github.com/mhsanaei/3x-ui/v2/util/random"
"github.com/mhsanaei/3x-ui/v2/web/service"
"github.com/mhsanaei/3x-ui/v2/xray"
"github.com/kirden31/3x-ui/v2/database"
"github.com/kirden31/3x-ui/v2/database/model"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/util/common"
"github.com/kirden31/3x-ui/v2/util/random"
"github.com/kirden31/3x-ui/v2/web/service"
"github.com/kirden31/3x-ui/v2/xray"
)
// SubService provides business logic for generating subscription links and managing subscription data.

View file

@ -756,19 +756,19 @@ update_x-ui() {
echo -e "${green}Downloading new x-ui version...${plain}"
tag_version=$(${curl_bin} -Ls "https://api.github.com/repos/MHSanaei/3x-ui/releases/latest" 2>/dev/null | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
tag_version=$(${curl_bin} -Ls "https://api.github.com/repos/kirden31/3x-ui/releases/latest" 2>/dev/null | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
if [[ ! -n "$tag_version" ]]; then
echo -e "${yellow}Trying to fetch version with IPv4...${plain}"
tag_version=$(${curl_bin} -4 -Ls "https://api.github.com/repos/MHSanaei/3x-ui/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
tag_version=$(${curl_bin} -4 -Ls "https://api.github.com/repos/kirden31/3x-ui/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
if [[ ! -n "$tag_version" ]]; then
_fail "ERROR: Failed to fetch x-ui version, it may be due to GitHub API restrictions, please try it later"
fi
fi
echo -e "Got x-ui latest version: ${tag_version}, beginning the installation..."
${curl_bin} -fLRo ${xui_folder}-linux-$(arch).tar.gz https://github.com/MHSanaei/3x-ui/releases/download/${tag_version}/x-ui-linux-$(arch).tar.gz 2>/dev/null
${curl_bin} -fLRo ${xui_folder}-linux-$(arch).tar.gz https://github.com/kirden31/3x-ui/releases/download/${tag_version}/x-ui-linux-$(arch).tar.gz 2>/dev/null
if [[ $? -ne 0 ]]; then
echo -e "${yellow}Trying to fetch version with IPv4...${plain}"
${curl_bin} -4fLRo ${xui_folder}-linux-$(arch).tar.gz https://github.com/MHSanaei/3x-ui/releases/download/${tag_version}/x-ui-linux-$(arch).tar.gz 2>/dev/null
${curl_bin} -4fLRo ${xui_folder}-linux-$(arch).tar.gz https://github.com/kirden31/3x-ui/releases/download/${tag_version}/x-ui-linux-$(arch).tar.gz 2>/dev/null
if [[ $? -ne 0 ]]; then
_fail "ERROR: Failed to download x-ui, please be sure that your server can access GitHub"
fi
@ -831,10 +831,10 @@ update_x-ui() {
chmod +x x-ui bin/xray-linux-$(arch) >/dev/null 2>&1
echo -e "${green}Downloading and installing x-ui.sh script...${plain}"
${curl_bin} -fLRo /usr/bin/x-ui https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.sh >/dev/null 2>&1
${curl_bin} -fLRo /usr/bin/x-ui https://raw.githubusercontent.com/kirden31/3x-ui/main/x-ui.sh >/dev/null 2>&1
if [[ $? -ne 0 ]]; then
echo -e "${yellow}Trying to fetch x-ui with IPv4...${plain}"
${curl_bin} -4fLRo /usr/bin/x-ui https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.sh >/dev/null 2>&1
${curl_bin} -4fLRo /usr/bin/x-ui https://raw.githubusercontent.com/kirden31/3x-ui/main/x-ui.sh >/dev/null 2>&1
if [[ $? -ne 0 ]]; then
_fail "ERROR: Failed to download x-ui.sh script, please be sure that your server can access GitHub"
fi
@ -854,9 +854,9 @@ update_x-ui() {
if [[ $release == "alpine" ]]; then
echo -e "${green}Downloading and installing startup unit x-ui.rc...${plain}"
${curl_bin} -fLRo /etc/init.d/x-ui https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.rc >/dev/null 2>&1
${curl_bin} -fLRo /etc/init.d/x-ui https://raw.githubusercontent.com/kirden31/3x-ui/main/x-ui.rc >/dev/null 2>&1
if [[ $? -ne 0 ]]; then
${curl_bin} -4fLRo /etc/init.d/x-ui https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.rc >/dev/null 2>&1
${curl_bin} -4fLRo /etc/init.d/x-ui https://raw.githubusercontent.com/kirden31/3x-ui/main/x-ui.rc >/dev/null 2>&1
if [[ $? -ne 0 ]]; then
_fail "ERROR: Failed to download startup unit x-ui.rc, please be sure that your server can access GitHub"
fi
@ -910,13 +910,13 @@ update_x-ui() {
echo -e "${yellow}Service files not found in tar.gz, downloading from GitHub...${plain}"
case "${release}" in
ubuntu | debian | armbian)
${curl_bin} -4fLRo ${xui_service}/x-ui.service https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.service.debian >/dev/null 2>&1
${curl_bin} -4fLRo ${xui_service}/x-ui.service https://raw.githubusercontent.com/kirden31/3x-ui/main/x-ui.service.debian >/dev/null 2>&1
;;
arch | manjaro | parch)
${curl_bin} -4fLRo ${xui_service}/x-ui.service https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.service.arch >/dev/null 2>&1
${curl_bin} -4fLRo ${xui_service}/x-ui.service https://raw.githubusercontent.com/kirden31/3x-ui/main/x-ui.service.arch >/dev/null 2>&1
;;
*)
${curl_bin} -4fLRo ${xui_service}/x-ui.service https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.service.rhel >/dev/null 2>&1
${curl_bin} -4fLRo ${xui_service}/x-ui.service https://raw.githubusercontent.com/kirden31/3x-ui/main/x-ui.service.rhel >/dev/null 2>&1
;;
esac

View file

@ -5,7 +5,7 @@ import (
"errors"
"fmt"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/logger"
)
// NewErrorf creates a new error with formatted message.

View file

@ -3,8 +3,8 @@ package controller
import (
"net/http"
"github.com/mhsanaei/3x-ui/v2/web/service"
"github.com/mhsanaei/3x-ui/v2/web/session"
"github.com/kirden31/3x-ui/v2/web/service"
"github.com/kirden31/3x-ui/v2/web/session"
"github.com/gin-gonic/gin"
)

View file

@ -5,9 +5,9 @@ package controller
import (
"net/http"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/web/locale"
"github.com/mhsanaei/3x-ui/v2/web/session"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/web/locale"
"github.com/kirden31/3x-ui/v2/web/session"
"github.com/gin-gonic/gin"
)

View file

@ -6,10 +6,10 @@ import (
"strconv"
"time"
"github.com/mhsanaei/3x-ui/v2/database/model"
"github.com/mhsanaei/3x-ui/v2/web/service"
"github.com/mhsanaei/3x-ui/v2/web/session"
"github.com/mhsanaei/3x-ui/v2/web/websocket"
"github.com/kirden31/3x-ui/v2/database/model"
"github.com/kirden31/3x-ui/v2/web/service"
"github.com/kirden31/3x-ui/v2/web/session"
"github.com/kirden31/3x-ui/v2/web/websocket"
"github.com/gin-gonic/gin"
)

View file

@ -5,9 +5,9 @@ import (
"text/template"
"time"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/web/service"
"github.com/mhsanaei/3x-ui/v2/web/session"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/web/service"
"github.com/kirden31/3x-ui/v2/web/session"
"github.com/gin-contrib/sessions"
"github.com/gin-gonic/gin"

View file

@ -7,9 +7,9 @@ import (
"strconv"
"time"
"github.com/mhsanaei/3x-ui/v2/web/global"
"github.com/mhsanaei/3x-ui/v2/web/service"
"github.com/mhsanaei/3x-ui/v2/web/websocket"
"github.com/kirden31/3x-ui/v2/web/global"
"github.com/kirden31/3x-ui/v2/web/service"
"github.com/kirden31/3x-ui/v2/web/websocket"
"github.com/gin-gonic/gin"
)

View file

@ -4,10 +4,10 @@ import (
"errors"
"time"
"github.com/mhsanaei/3x-ui/v2/util/crypto"
"github.com/mhsanaei/3x-ui/v2/web/entity"
"github.com/mhsanaei/3x-ui/v2/web/service"
"github.com/mhsanaei/3x-ui/v2/web/session"
"github.com/kirden31/3x-ui/v2/util/crypto"
"github.com/kirden31/3x-ui/v2/web/entity"
"github.com/kirden31/3x-ui/v2/web/service"
"github.com/kirden31/3x-ui/v2/web/session"
"github.com/gin-gonic/gin"
)

View file

@ -5,9 +5,9 @@ import (
"net/http"
"strings"
"github.com/mhsanaei/3x-ui/v2/config"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/web/entity"
"github.com/kirden31/3x-ui/v2/config"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/web/entity"
"github.com/gin-gonic/gin"
)

View file

@ -6,10 +6,10 @@ import (
"time"
"github.com/google/uuid"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/util/common"
"github.com/mhsanaei/3x-ui/v2/web/session"
"github.com/mhsanaei/3x-ui/v2/web/websocket"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/util/common"
"github.com/kirden31/3x-ui/v2/web/session"
"github.com/kirden31/3x-ui/v2/web/websocket"
"github.com/gin-gonic/gin"
ws "github.com/gorilla/websocket"

View file

@ -3,8 +3,8 @@ package controller
import (
"encoding/json"
"github.com/mhsanaei/3x-ui/v2/util/common"
"github.com/mhsanaei/3x-ui/v2/web/service"
"github.com/kirden31/3x-ui/v2/util/common"
"github.com/kirden31/3x-ui/v2/web/service"
"github.com/gin-gonic/gin"
)

View file

@ -8,7 +8,7 @@ import (
"strings"
"time"
"github.com/mhsanaei/3x-ui/v2/util/common"
"github.com/kirden31/3x-ui/v2/util/common"
)
// Msg represents a standard API response message with success status, message text, and optional data object.

View file

@ -157,7 +157,7 @@
</a-col>
<a-col :sm="24" :lg="12">
<a-card title='3X-UI' hoverable>
<a rel="noopener" href="https://github.com/MHSanaei/3x-ui/releases" target="_blank">
<a rel="noopener" href="https://github.com/kirden31/3x-ui/releases" target="_blank">
<a-tag color="green">
<span>v{{ .cur_ver }}</span>
</a-tag>
@ -167,7 +167,7 @@
<span>@XrayUI</span>
</a-tag>
</a>
<a rel="noopener" href="https://github.com/MHSanaei/3x-ui/wiki" target="_blank">
<a rel="noopener" href="https://github.com/kirden31/3x-ui/wiki" target="_blank">
<a-tag color="purple">
<span>{{ i18n "pages.index.documentation" }}</span>
</a-tag>

View file

@ -13,10 +13,10 @@ import (
"strconv"
"time"
"github.com/mhsanaei/3x-ui/v2/database"
"github.com/mhsanaei/3x-ui/v2/database/model"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/xray"
"github.com/kirden31/3x-ui/v2/database"
"github.com/kirden31/3x-ui/v2/database/model"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/xray"
)
// IPWithTimestamp tracks an IP address with its last seen timestamp

View file

@ -4,7 +4,7 @@ import (
"strconv"
"time"
"github.com/mhsanaei/3x-ui/v2/web/service"
"github.com/kirden31/3x-ui/v2/web/service"
"github.com/shirou/gopsutil/v4/cpu"
)

View file

@ -1,7 +1,7 @@
package job
import (
"github.com/mhsanaei/3x-ui/v2/web/service"
"github.com/kirden31/3x-ui/v2/web/service"
)
// CheckHashStorageJob periodically cleans up expired hash entries from the Telegram bot's hash storage.

View file

@ -3,8 +3,8 @@
package job
import (
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/web/service"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/web/service"
)
// CheckXrayRunningJob monitors Xray process health and restarts it if it crashes.

View file

@ -5,8 +5,8 @@ import (
"os"
"path/filepath"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/xray"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/xray"
)
// ClearLogsJob clears old log files to prevent disk space issues.

View file

@ -5,10 +5,10 @@ import (
"strings"
"github.com/mhsanaei/3x-ui/v2/database/model"
"github.com/mhsanaei/3x-ui/v2/logger"
ldaputil "github.com/mhsanaei/3x-ui/v2/util/ldap"
"github.com/mhsanaei/3x-ui/v2/web/service"
"github.com/kirden31/3x-ui/v2/database/model"
"github.com/kirden31/3x-ui/v2/logger"
ldaputil "github.com/kirden31/3x-ui/v2/util/ldap"
"github.com/kirden31/3x-ui/v2/web/service"
"strconv"

View file

@ -1,8 +1,8 @@
package job
import (
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/web/service"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/web/service"
)
// Period represents the time period for traffic resets.

View file

@ -1,7 +1,7 @@
package job
import (
"github.com/mhsanaei/3x-ui/v2/web/service"
"github.com/kirden31/3x-ui/v2/web/service"
)
// LoginStatus represents the status of a login attempt.

View file

@ -3,10 +3,10 @@ package job
import (
"encoding/json"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/web/service"
"github.com/mhsanaei/3x-ui/v2/web/websocket"
"github.com/mhsanaei/3x-ui/v2/xray"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/web/service"
"github.com/kirden31/3x-ui/v2/web/websocket"
"github.com/kirden31/3x-ui/v2/xray"
"github.com/valyala/fasthttp"
)

View file

@ -8,7 +8,7 @@ import (
"os"
"strings"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/gin-gonic/gin"
"github.com/nicksnyder/go-i18n/v2/i18n"

View file

@ -10,11 +10,11 @@ import (
"strings"
"time"
"github.com/mhsanaei/3x-ui/v2/database"
"github.com/mhsanaei/3x-ui/v2/database/model"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/util/common"
"github.com/mhsanaei/3x-ui/v2/xray"
"github.com/kirden31/3x-ui/v2/database"
"github.com/kirden31/3x-ui/v2/database/model"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/util/common"
"github.com/kirden31/3x-ui/v2/xray"
"gorm.io/gorm"
)

View file

@ -11,13 +11,13 @@ import (
"sync"
"time"
"github.com/mhsanaei/3x-ui/v2/config"
"github.com/mhsanaei/3x-ui/v2/database"
"github.com/mhsanaei/3x-ui/v2/database/model"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/util/common"
"github.com/mhsanaei/3x-ui/v2/util/json_util"
"github.com/mhsanaei/3x-ui/v2/xray"
"github.com/kirden31/3x-ui/v2/config"
"github.com/kirden31/3x-ui/v2/database"
"github.com/kirden31/3x-ui/v2/database/model"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/util/common"
"github.com/kirden31/3x-ui/v2/util/json_util"
"github.com/kirden31/3x-ui/v2/xray"
"gorm.io/gorm"
)

View file

@ -5,7 +5,7 @@ import (
"syscall"
"time"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/logger"
)
// PanelService provides business logic for panel management operations.

View file

@ -20,12 +20,12 @@ import (
"sync"
"time"
"github.com/mhsanaei/3x-ui/v2/config"
"github.com/mhsanaei/3x-ui/v2/database"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/util/common"
"github.com/mhsanaei/3x-ui/v2/util/sys"
"github.com/mhsanaei/3x-ui/v2/xray"
"github.com/kirden31/3x-ui/v2/config"
"github.com/kirden31/3x-ui/v2/database"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/util/common"
"github.com/kirden31/3x-ui/v2/util/sys"
"github.com/kirden31/3x-ui/v2/xray"
"github.com/google/uuid"
"github.com/shirou/gopsutil/v4/cpu"

View file

@ -11,14 +11,14 @@ import (
"strings"
"time"
"github.com/mhsanaei/3x-ui/v2/database"
"github.com/mhsanaei/3x-ui/v2/database/model"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/util/common"
"github.com/mhsanaei/3x-ui/v2/util/random"
"github.com/mhsanaei/3x-ui/v2/util/reflect_util"
"github.com/mhsanaei/3x-ui/v2/web/entity"
"github.com/mhsanaei/3x-ui/v2/xray"
"github.com/kirden31/3x-ui/v2/database"
"github.com/kirden31/3x-ui/v2/database/model"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/util/common"
"github.com/kirden31/3x-ui/v2/util/random"
"github.com/kirden31/3x-ui/v2/util/reflect_util"
"github.com/kirden31/3x-ui/v2/web/entity"
"github.com/kirden31/3x-ui/v2/xray"
)
//go:embed config.json

View file

@ -20,14 +20,14 @@ import (
"sync"
"time"
"github.com/mhsanaei/3x-ui/v2/config"
"github.com/mhsanaei/3x-ui/v2/database"
"github.com/mhsanaei/3x-ui/v2/database/model"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/util/common"
"github.com/mhsanaei/3x-ui/v2/web/global"
"github.com/mhsanaei/3x-ui/v2/web/locale"
"github.com/mhsanaei/3x-ui/v2/xray"
"github.com/kirden31/3x-ui/v2/config"
"github.com/kirden31/3x-ui/v2/database"
"github.com/kirden31/3x-ui/v2/database/model"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/util/common"
"github.com/kirden31/3x-ui/v2/web/global"
"github.com/kirden31/3x-ui/v2/web/locale"
"github.com/kirden31/3x-ui/v2/xray"
"github.com/google/uuid"
"github.com/mymmrac/telego"

View file

@ -3,11 +3,11 @@ package service
import (
"errors"
"github.com/mhsanaei/3x-ui/v2/database"
"github.com/mhsanaei/3x-ui/v2/database/model"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/util/crypto"
ldaputil "github.com/mhsanaei/3x-ui/v2/util/ldap"
"github.com/kirden31/3x-ui/v2/database"
"github.com/kirden31/3x-ui/v2/database/model"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/util/crypto"
ldaputil "github.com/kirden31/3x-ui/v2/util/ldap"
"github.com/xlzd/gotp"
"gorm.io/gorm"
)

View file

@ -8,8 +8,8 @@ import (
"os"
"time"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/util/common"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/util/common"
)
// WarpService provides business logic for Cloudflare WARP integration.

View file

@ -6,8 +6,8 @@ import (
"runtime"
"sync"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/xray"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/xray"
"go.uber.org/atomic"
)

View file

@ -4,8 +4,8 @@ import (
_ "embed"
"encoding/json"
"github.com/mhsanaei/3x-ui/v2/util/common"
"github.com/mhsanaei/3x-ui/v2/xray"
"github.com/kirden31/3x-ui/v2/util/common"
"github.com/kirden31/3x-ui/v2/xray"
)
// XraySettingService provides business logic for Xray configuration management.

View file

@ -6,7 +6,7 @@ import (
"encoding/gob"
"net/http"
"github.com/mhsanaei/3x-ui/v2/database/model"
"github.com/kirden31/3x-ui/v2/database/model"
"github.com/gin-contrib/sessions"
"github.com/gin-gonic/gin"

View file

@ -16,16 +16,16 @@ import (
"strings"
"time"
"github.com/mhsanaei/3x-ui/v2/config"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/util/common"
"github.com/mhsanaei/3x-ui/v2/web/controller"
"github.com/mhsanaei/3x-ui/v2/web/job"
"github.com/mhsanaei/3x-ui/v2/web/locale"
"github.com/mhsanaei/3x-ui/v2/web/middleware"
"github.com/mhsanaei/3x-ui/v2/web/network"
"github.com/mhsanaei/3x-ui/v2/web/service"
"github.com/mhsanaei/3x-ui/v2/web/websocket"
"github.com/kirden31/3x-ui/v2/config"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/util/common"
"github.com/kirden31/3x-ui/v2/web/controller"
"github.com/kirden31/3x-ui/v2/web/job"
"github.com/kirden31/3x-ui/v2/web/locale"
"github.com/kirden31/3x-ui/v2/web/middleware"
"github.com/kirden31/3x-ui/v2/web/network"
"github.com/kirden31/3x-ui/v2/web/service"
"github.com/kirden31/3x-ui/v2/web/websocket"
"github.com/gin-contrib/gzip"
"github.com/gin-contrib/sessions"

View file

@ -8,7 +8,7 @@ import (
"sync"
"time"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/logger"
)
// MessageType represents the type of WebSocket message

View file

@ -2,8 +2,8 @@
package websocket
import (
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/web/global"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/web/global"
)
// GetHub returns the global WebSocket hub instance

12
x-ui.sh
View file

@ -108,7 +108,7 @@ before_show_menu() {
}
install() {
bash <(curl -Ls https://raw.githubusercontent.com/MHSanaei/3x-ui/main/install.sh)
bash <(curl -Ls https://raw.githubusercontent.com/kirden31/3x-ui/main/install.sh)
if [[ $? == 0 ]]; then
if [[ $# == 0 ]]; then
start
@ -127,7 +127,7 @@ update() {
fi
return 0
fi
bash <(curl -Ls https://raw.githubusercontent.com/MHSanaei/3x-ui/main/update.sh)
bash <(curl -Ls https://raw.githubusercontent.com/kirden31/3x-ui/main/update.sh)
if [[ $? == 0 ]]; then
LOGI "Update is complete, Panel has automatically restarted "
before_show_menu
@ -145,7 +145,7 @@ update_menu() {
return 0
fi
curl -fLRo /usr/bin/x-ui https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.sh
curl -fLRo /usr/bin/x-ui https://raw.githubusercontent.com/kirden31/3x-ui/main/x-ui.sh
chmod +x ${xui_folder}/x-ui.sh
chmod +x /usr/bin/x-ui
@ -167,7 +167,7 @@ legacy_version() {
exit 1
fi
# Use the entered panel version in the download link
install_command="bash <(curl -Ls "https://raw.githubusercontent.com/mhsanaei/3x-ui/v$tag_version/install.sh") v$tag_version"
install_command="bash <(curl -Ls "https://raw.githubusercontent.com/kirden31/3x-ui/v$tag_version/install.sh") v$tag_version"
echo "Downloading and installing panel version $tag_version..."
eval $install_command
@ -206,7 +206,7 @@ uninstall() {
echo ""
echo -e "Uninstalled Successfully.\n"
echo "If you need to install this panel again, you can use below command:"
echo -e "${green}bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)${plain}"
echo -e "${green}bash <(curl -Ls https://raw.githubusercontent.com/kirden31/3x-ui/master/install.sh)${plain}"
echo ""
# Trap the SIGTERM signal
trap delete_script SIGTERM
@ -593,7 +593,7 @@ enable_bbr() {
}
update_shell() {
curl -fLRo /usr/bin/x-ui -z /usr/bin/x-ui https://github.com/MHSanaei/3x-ui/raw/main/x-ui.sh
curl -fLRo /usr/bin/x-ui -z /usr/bin/x-ui https://github.com/kirden31/3x-ui/raw/main/x-ui.sh
if [[ $? != 0 ]]; then
echo ""
LOGE "Failed to download script, Please check whether the machine can connect Github"

View file

@ -11,8 +11,8 @@ import (
"regexp"
"time"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/util/common"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/util/common"
"github.com/xtls/xray-core/app/proxyman/command"
statsService "github.com/xtls/xray-core/app/stats/command"

View file

@ -3,7 +3,7 @@ package xray
import (
"bytes"
"github.com/mhsanaei/3x-ui/v2/util/json_util"
"github.com/kirden31/3x-ui/v2/util/json_util"
)
// Config represents the complete Xray configuration structure.

View file

@ -3,7 +3,7 @@ package xray
import (
"bytes"
"github.com/mhsanaei/3x-ui/v2/util/json_util"
"github.com/kirden31/3x-ui/v2/util/json_util"
)
// InboundConfig represents an Xray inbound configuration.

View file

@ -5,7 +5,7 @@ import (
"runtime"
"strings"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/logger"
)
// NewLogWriter returns a new LogWriter for processing Xray log output.

View file

@ -13,9 +13,9 @@ import (
"syscall"
"time"
"github.com/mhsanaei/3x-ui/v2/config"
"github.com/mhsanaei/3x-ui/v2/logger"
"github.com/mhsanaei/3x-ui/v2/util/common"
"github.com/kirden31/3x-ui/v2/config"
"github.com/kirden31/3x-ui/v2/logger"
"github.com/kirden31/3x-ui/v2/util/common"
)
// GetBinaryName returns the Xray binary filename for the current OS and architecture.