Commit graph

24 commits

Author SHA1 Message Date
root
7ff73313a9 fix: auto-fill flow for registration-created eligible clients 2026-04-26 01:08:22 +08:00
Sora39831
67d24ca0e6 fix(user): sync-remove inbound clients when deleting managed user 2026-04-05 03:52:41 +08:00
Sora39831
dfbe02c2b8 feat(user): delete all user inbounds when deleting user 2026-04-05 03:40:32 +08:00
Sora39831
2a9d9a0a6b feat: add admin user management 2026-04-04 14:59:40 +08:00
Sora39831
d43f8683b0 feat: enhance user dashboard, set default creds to admin, trim i18n to en/zh only
- install.sh: default username/password to admin on fresh install
- user.go: UpdateFirstUser resets Role to admin, preventing lockout
- user.html: show remaining traffic and last online time
- i18n: remove 11 translation files, keep only en_US and zh_CN
- LanguageManager: trim supportedLanguages to 2 entries, remove simularLangs
2026-04-03 08:13:27 +08:00
Sora39831
90665c92f4 fix: harden registration with rate limiting, input validation, and security fixes
- Add per-IP rate limiter middleware (5 req/min) on /register endpoint
- Validate username (3-64 chars) and password (8-128 chars) with trim
- Use sentinel error ErrUsernameAlreadyExists instead of string matching
- Prevent TurnstileSecretKey exposure via admin settings API (json:"-")
- Skip json:"-" fields in UpdateAllSetting to avoid overwriting secrets
- Add SetTurnstileSecretKey setter for programmatic configuration
- Reuse package-level http.Client in Turnstile verification for connection pooling
- Add io.LimitReader to cap Turnstile response body size
- Log all Turnstile verification error paths for debugging
- Add invalidUsername/invalidPassword i18n keys to all 13 locales
2026-04-03 02:02:25 +08:00
Sora39831
b4047cee54 feat: allow same email across multiple inbounds and auto-add clients on registration
Remove global unique constraint on client_traffics.email, change email
duplication check to per-inbound scope, and automatically register new
users as disabled clients in all existing inbounds within a transaction.
2026-04-03 01:38:31 +08:00
Sora39831
5f83415e95 feat: add user registration with role-based access
- Add Role field to User model (admin/user) with uniqueIndex on Username
- Add POST /register endpoint with optional Cloudflare Turnstile verification
- Add RegisterUser service with bcrypt password hashing and duplicate detection
- Set default admin user role to "admin", new registrations get "user"
- Add turnstileSecretKey setting and GetTurnstileSecretKey getter
- Add i18n keys (userExists, errorRegister) to all 13 translation files
2026-04-02 23:49:30 +08:00
MHSanaei
f0f98c7122
Add Go code analyzer workflow
Some checks are pending
Release 3X-UI / Analyze Go code (push) Waiting to run
Release 3X-UI / build (386) (push) Blocked by required conditions
Release 3X-UI / build (amd64) (push) Blocked by required conditions
Release 3X-UI / build (arm64) (push) Blocked by required conditions
Release 3X-UI / build (armv5) (push) Blocked by required conditions
Release 3X-UI / build (armv6) (push) Blocked by required conditions
Release 3X-UI / build (armv7) (push) Blocked by required conditions
Release 3X-UI / build (s390x) (push) Blocked by required conditions
Release 3X-UI / Build for Windows (push) Blocked by required conditions
2026-03-17 23:01:15 +01:00
Aleksei Sidorenko
a2097ad062
feat: mask password in telegram notification on 2FA failure (#3884)
Some checks failed
Release 3X-UI / build (386) (push) Has been cancelled
Release 3X-UI / build (amd64) (push) Has been cancelled
Release 3X-UI / build (arm64) (push) Has been cancelled
Release 3X-UI / build (armv5) (push) Has been cancelled
Release 3X-UI / build (armv6) (push) Has been cancelled
Release 3X-UI / build (armv7) (push) Has been cancelled
Release 3X-UI / build (s390x) (push) Has been cancelled
Release 3X-UI / Build for Windows (push) Has been cancelled
2026-03-04 18:26:53 +01:00
mhsanaei
713a7328f6
gofmt
Some checks failed
Release 3X-UI / build (386) (push) Has been cancelled
Release 3X-UI / build (amd64) (push) Has been cancelled
Release 3X-UI / build (arm64) (push) Has been cancelled
Release 3X-UI / build (armv5) (push) Has been cancelled
Release 3X-UI / build (armv6) (push) Has been cancelled
Release 3X-UI / build (armv7) (push) Has been cancelled
Release 3X-UI / build (s390x) (push) Has been cancelled
Release 3X-UI / Build for Windows (push) Has been cancelled
2025-10-21 13:02:55 +02:00
konstpic
28a17a80ec
feat: add ldap component (#3568)
Some checks are pending
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Release 3X-UI / Build for Windows (push) Waiting to run
* add ldap component

* fix: fix russian comments, tls cert verify default true

* feat: remove replaces go mod for local dev
2025-09-28 21:04:54 +02:00
mhsanaei
6ced549dea
docs: add comments for all functions 2025-09-20 09:35:50 +02:00
mhsanaei
7447cec17e
go package correction v2
Some checks are pending
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Release 3X-UI / Build for Windows (push) Waiting to run
2025-09-19 10:05:43 +02:00
mhsanaei
054cb1dea0
go package correction 2025-09-18 23:12:14 +02:00
Shishkevich D.
5d11e6e13f
chore: reset two-factor authentication after changing admin credentials (#3029)
* chore: add `resetTwoFactor` argument for main.go

fixes #3025

* chore: reset two-factor authentication after changing admin credentials

* chore: reset two-factor authentication after changing admin credentials

---------

Co-authored-by: somebodywashere <68244480+somebodywashere@users.noreply.github.com>
Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
2025-07-02 11:25:25 +02:00
Shishkevich D.
fe3b1c9b52
chore: implement 2fa auth (#2968)
Some checks failed
Build and Release 3X-UI / build (386) (push) Has been cancelled
Build and Release 3X-UI / build (amd64) (push) Has been cancelled
Build and Release 3X-UI / build (arm64) (push) Has been cancelled
Build and Release 3X-UI / build (armv5) (push) Has been cancelled
Build and Release 3X-UI / build (armv6) (push) Has been cancelled
Build and Release 3X-UI / build (armv7) (push) Has been cancelled
Build and Release 3X-UI / build (s390x) (push) Has been cancelled
* chore: implement 2fa auth

from #2786

* chore: format code

* chore: replace two factor token input with qr-code

* chore: requesting confirmation of setting/removing two-factor authentication

otpauth library was taken from cdnjs

* chore: revert changes in `ClipboardManager`

don't need it.

* chore: removing twoFactor prop in settings page

* chore: remove `twoFactorQr` object in `mounted` function
2025-05-08 16:20:58 +02:00
Columbiysky
85cbad3ef4
feat: hashing user passwords
solves problems #2944, #2783
2025-05-03 16:27:53 +07:00
mhsanaei
0bde51b91e
Refactor: Use any instead of interface{} 2025-03-12 20:43:43 +01:00
MHSanaei
dd21bb2db7 bug fix - remove secret 2024-03-12 20:45:44 +03:30
Hamidreza
64a5a9f1bc
Some fixes and improvements (#1997)
* [refactor] api controller

* [fix] access log path

better to not hardcode the access log path, maybe some ppl dont want to use the default ./access.log

* [fix] set select options from logs paths in xray settings

* [update] .gitignore

* [lint] all .go files

* [update] use status code for jsonMsg and 401 to unauthorize

* [update] handle response status code via axios

* [fix] set correct value if log paths is set to 'none'

we also use the default value for the paths if its set to none

* [fix] iplimit - only warning access log if f2b is installed
2024-03-11 01:01:24 +03:30
MHSanaei
b0f974a94d secret token thanks to @HarlyquinForest 2023-04-21 19:00:14 +03:30
MHSanaei
add853fada update pack 3
user pass will be generated randomly
upgrade all dependencies
move add client buttom
2023-02-20 20:59:55 +03:30
MHSanaei
b73e4173a3 3x-ui 2023-02-09 22:48:06 +03:30