mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-12 13:10:05 +00:00

- Add MySQL database support with environment-based configuration - Fix MySQL compatibility issue with 'key' column name - Maintain SQLite as default database - Add proper validation for MySQL configuration - Test and verify compatibility with existing database - Replaced raw SQL queries using JSON_EACH functions with standard GORM queries - Modified functions to handle JSON parsing in Go code instead of database since JSON_EACH is not available on MySQL or MariaDB: - getAllEmails() - GetClientTrafficByID() - getFallbackMaster() - MigrationRemoveOrphanedTraffics() The system now supports both MySQL and SQLite databases, with SQLite remaining as the default option. MySQL connection is only used when explicitly configured through environment variables.
105 lines
4.7 KiB
Modula-2
105 lines
4.7 KiB
Modula-2
module x-ui
|
|
|
|
go 1.24.3
|
|
|
|
require (
|
|
github.com/gin-contrib/gzip v1.2.3
|
|
github.com/gin-contrib/sessions v1.0.3
|
|
github.com/gin-gonic/gin v1.10.0
|
|
github.com/goccy/go-json v0.10.5
|
|
github.com/google/uuid v1.6.0
|
|
github.com/joho/godotenv v1.5.1
|
|
github.com/mymmrac/telego v0.32.0
|
|
github.com/nicksnyder/go-i18n/v2 v2.6.0
|
|
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
|
|
github.com/pelletier/go-toml/v2 v2.2.4
|
|
github.com/robfig/cron/v3 v3.0.1
|
|
github.com/shirou/gopsutil/v4 v4.25.4
|
|
github.com/valyala/fasthttp v1.62.0
|
|
github.com/xlzd/gotp v0.1.0
|
|
github.com/xtls/xray-core v1.250306.1-0.20250516121834-800b8b50cc01
|
|
go.uber.org/atomic v1.11.0
|
|
golang.org/x/crypto v0.38.0
|
|
golang.org/x/text v0.25.0
|
|
google.golang.org/grpc v1.72.1
|
|
gorm.io/driver/mysql v1.5.7
|
|
gorm.io/driver/sqlite v1.5.7
|
|
gorm.io/gorm v1.25.12
|
|
)
|
|
|
|
require (
|
|
github.com/andybalholm/brotli v1.1.1 // indirect
|
|
github.com/bytedance/sonic v1.13.2 // indirect
|
|
github.com/bytedance/sonic/loader v0.2.4 // indirect
|
|
github.com/cloudflare/circl v1.6.1 // indirect
|
|
github.com/cloudwego/base64x v0.1.5 // indirect
|
|
github.com/dgryski/go-metro v0.0.0-20250106013310-edb8663e5e33 // indirect
|
|
github.com/ebitengine/purego v0.8.3 // indirect
|
|
github.com/fasthttp/router v1.5.4 // indirect
|
|
github.com/gabriel-vasile/mimetype v1.4.9 // indirect
|
|
github.com/gin-contrib/sse v1.1.0 // indirect
|
|
github.com/go-ole/go-ole v1.3.0 // indirect
|
|
github.com/go-playground/locales v0.14.1 // indirect
|
|
github.com/go-playground/universal-translator v0.18.1 // indirect
|
|
github.com/go-playground/validator/v10 v10.26.0 // indirect
|
|
github.com/go-sql-driver/mysql v1.7.0 // indirect
|
|
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
|
|
github.com/google/btree v1.1.3 // indirect
|
|
github.com/google/pprof v0.0.0-20250501235452-c0086092b71a // indirect
|
|
github.com/gorilla/context v1.1.2 // indirect
|
|
github.com/gorilla/securecookie v1.1.2 // indirect
|
|
github.com/gorilla/sessions v1.4.0 // indirect
|
|
github.com/gorilla/websocket v1.5.3 // indirect
|
|
github.com/grbit/go-json v0.11.0 // indirect
|
|
github.com/jinzhu/inflection v1.0.0 // indirect
|
|
github.com/jinzhu/now v1.1.5 // indirect
|
|
github.com/json-iterator/go v1.1.12 // indirect
|
|
github.com/klauspost/compress v1.18.0 // indirect
|
|
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
|
|
github.com/leodido/go-urn v1.4.0 // indirect
|
|
github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 // indirect
|
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
|
github.com/mattn/go-sqlite3 v1.14.28 // indirect
|
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
|
github.com/onsi/ginkgo/v2 v2.23.4 // indirect
|
|
github.com/pires/go-proxyproto v0.8.1 // indirect
|
|
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
|
|
github.com/quic-go/qpack v0.5.1 // indirect
|
|
github.com/quic-go/quic-go v0.51.0 // indirect
|
|
github.com/refraction-networking/utls v1.7.3 // indirect
|
|
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 // indirect
|
|
github.com/rogpeppe/go-internal v1.14.1 // indirect
|
|
github.com/sagernet/sing v0.6.6 // indirect
|
|
github.com/sagernet/sing-shadowsocks v0.2.7 // indirect
|
|
github.com/savsgio/gotils v0.0.0-20250408102913-196191ec6287 // indirect
|
|
github.com/seiflotfy/cuckoofilter v0.0.0-20240715131351-a2f2c23f1771 // indirect
|
|
github.com/tklauser/go-sysconf v0.3.15 // indirect
|
|
github.com/tklauser/numcpus v0.10.0 // indirect
|
|
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
|
github.com/ugorji/go/codec v1.2.12 // indirect
|
|
github.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e // indirect
|
|
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
|
github.com/valyala/fastjson v1.6.4 // indirect
|
|
github.com/vishvananda/netlink v1.3.1 // indirect
|
|
github.com/vishvananda/netns v0.0.5 // indirect
|
|
github.com/xtls/reality v0.0.0-20250516070713-4df2ec9a5b47 // indirect
|
|
github.com/yusufpapurcu/wmi v1.2.4 // indirect
|
|
go.uber.org/automaxprocs v1.6.0 // indirect
|
|
go.uber.org/mock v0.5.2 // indirect
|
|
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect
|
|
golang.org/x/arch v0.17.0 // indirect
|
|
golang.org/x/mod v0.24.0 // indirect
|
|
golang.org/x/net v0.40.0 // indirect
|
|
golang.org/x/sync v0.14.0 // indirect
|
|
golang.org/x/sys v0.33.0 // indirect
|
|
golang.org/x/time v0.11.0 // indirect
|
|
golang.org/x/tools v0.33.0 // indirect
|
|
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect
|
|
golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 // indirect
|
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20250409194420-de1ac958c67a // indirect
|
|
google.golang.org/protobuf v1.36.6 // indirect
|
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
gvisor.dev/gvisor v0.0.0-20250428193742-2d800c3129d5 // indirect
|
|
lukechampine.com/blake3 v1.4.1 // indirect
|
|
)
|