Commit graph

603 commits

Author SHA1 Message Date
Alireza Ahmadi
6f046508db core: add config compatibility test for the 1.14 upgrade
Starts a real box for each config in testdata/configs and logs the
deprecation notes it triggers. Covers the eight re-copied protocol inbounds
plus the option shapes s-ui's UI can emit that 1.14 deprecates.

Confirms no config s-ui produces fails to start under 1.14; the deprecated
ones warn and keep working.
2026-08-31 14:06:23 +02:00
Alireza Ahmadi
afe16b4d2d Sing-Box v1.14.0-rc.2: compile-level upgrade
Re-sync core/protocol/* from upstream (they were verbatim copies), re-fork
core/box.go onto the new upstream box.go, and adapt to changed APIs:

- adapter.ConnectionTracker gained RoutedFlow; add no-op impls to both trackers
- log.ObservableFactory gained AttachPlatformWriter; add no-op impl
- box.Context now takes a CertificateProviderRegistry; wire one up with
  the origin_ca provider
- box.go now depends on debug*.go; copy them from upstream
- hysteria inbound moved QUIC option building into quic.go; copy it

Deps: sing v0.9.0-beta.4, sing-quic v0.7.0-beta.4, sing-tun v0.9.0-beta.2.

Runtime behaviour is not yet validated and config migration for options
deprecated in 1.14 is not done, so this is not ready for main.
2026-08-31 14:06:23 +02:00
LiGaAmG
bb4baebb13
fix(hysteria2): preserve user identity across hot updates (#1231)
* fix(hysteria2): use stable user identity on hot updates

Replace Service[int] (position-based) with Service[string] (name-based)
so that existing sessions retain a correct stable identity when the user
list changes via UpdateUsers. Remove the now-redundant userNameList field.

Fixes panic: runtime error: index out of range after user deletion,
and wrong username attribution when list positions shift.

* fix(hysteria2): gofmt struct field alignment after userNameList removal

* fix: extend stable user identity fix to hysteria, tuic, trojan, vless, vmess

The same Service[int] → Service[string] bug fixed for hysteria2 in the
previous commit affects all five remaining inbound protocols. When users
are deleted or reordered, integer position-based identity causes panics
(index out of range) and wrong username attribution in logs and traffic
stats.

Apply the same fix across hysteria v1, tuic, trojan, vless, and vmess:
- Service[int] → Service[string] in all five inbound structs
- Pass user.Name as the stable identity instead of the list index
- Remove the now-unnecessary cached `users []option.*User` fields from
  trojan, vless, and vmess structs (they existed solely to map indexes
  back to names)
- UpdateUsers helpers rebuilt to pass names, keeping auth/password
  fields unchanged

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci: add go vet + gofmt check for patched protocols

* fix: gofmt struct field alignment in hysteria and tuic inbound

* fix: address review feedback on stable-identity PR

Three fixes from maintainer review:

1. Logging regression (trojan/vless/vmess): when a client has no name,
   the old code fell back to the index as a log label; the new code was
   emitting `[] inbound connection`. Align with the hysteria2 pattern:
   omit the `[name]` prefix entirely when name is empty.

2. Duplicate/empty client names: trojan's Service.UpdateUsers rejects a
   repeated identity, so two clients with the same name on the same
   inbound would make UpdateUsers fail. vmess silently overwrites the
   earlier entry. vless misattributes flow. Add server-side validation
   in ClientService.Save (new, edit, addbulk) that rejects empty names
   and names already in use on any shared inbound within the same tx.

3. Remove .github/workflows/check.yml: the workflow only triggered on
   the feature branch, so it would be permanently dead after merge.

* fix: make client name validation global and trim whitespace

* ci: temporarily re-add check workflow for CI verification

* ci: remove temporary check workflow

* validate client names on bulk save paths too

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Alireza Ahmadi <alireza7@gmail.com>
2026-08-31 13:57:48 +02:00
Alireza Ahmadi
88bde26fcf cert issue by CF token #1237
Some checks failed
Release S-UI / build-frontend (push) Has been cancelled
Build S-UI for Windows / build-frontend (push) Has been cancelled
Release S-UI / build-386 (push) Has been cancelled
Release S-UI / build-amd64 (push) Has been cancelled
Release S-UI / build-armv5 (push) Has been cancelled
Release S-UI / build-armv6 (push) Has been cancelled
Release S-UI / build-armv7 (push) Has been cancelled
Release S-UI / build-arm64 (push) Has been cancelled
Release S-UI / build-s390x (push) Has been cancelled
Build S-UI for Windows / build-windows-amd64 (push) Has been cancelled
Build S-UI for Windows / build-windows-arm64 (push) Has been cancelled
2026-08-26 13:07:40 +02:00
Alireza Ahmadi
44d3510303 README: telegram bot #1230 2026-08-25 21:32:58 +02:00
dactDMA
1900fd937d
Trim surrounding whitespace from settings before validation (#1229)
* TrimSpace

* delete TrimSpace test
2026-08-23 21:36:06 +02:00
Alireza Ahmadi
08807ac1a3 catch untar error #1225 2026-08-21 23:21:50 +02:00
Alireza Ahmadi
d60db10b91 fix ipv6 on panel uri 2026-08-20 17:17:32 +02:00
Alireza Ahmadi
2c553b79ff fix alpine service #1225 2026-08-20 17:16:19 +02:00
Alireza Ahmadi
1e93f2c297 sub: add client remark #1228 2026-08-20 17:10:52 +02:00
Alireza Ahmadi
b0cc985371 clash sub: udp option #1227 2026-08-20 16:50:51 +02:00
Alireza Ahmadi
a6b293a152 Sing-Box v1.13.19 2026-08-20 16:43:51 +02:00
Alireza Ahmadi
eafb9911cd Go v1.26.7 2026-08-20 16:37:12 +02:00
Alireza Ahmadi
0cefd07d21 fix ipv6 in link and sub #1220 2026-08-12 14:58:33 +02:00
Alireza Ahmadi
1ca4fc80f9 v1.5.5 2026-08-09 18:16:41 +02:00
Alireza Ahmadi
b24c419ceb fix db lock #1209 2026-08-09 18:16:30 +02:00
dependabot[bot]
4a463074ee
Bump google.golang.org/grpc from 1.79.3 to 1.82.1 (#1207)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.79.3 to 1.82.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.79.3...v1.82.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.82.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-09 17:10:19 +02:00
Alireza Ahmadi
eb3d11a83c naive links based on network #1211 2026-08-09 15:18:22 +02:00
Alireza Ahmadi
4c1e2016f4 Sing-Box v1.13.18 and Go v1.26.5 2026-08-09 14:42:01 +02:00
Alireza Ahmadi
56fa964dcc v1.5.4
Some checks failed
Release S-UI / build-frontend (push) Has been cancelled
Build S-UI for Windows / build-frontend (push) Has been cancelled
Release S-UI / build-386 (push) Has been cancelled
Release S-UI / build-amd64 (push) Has been cancelled
Release S-UI / build-armv5 (push) Has been cancelled
Release S-UI / build-armv6 (push) Has been cancelled
Release S-UI / build-armv7 (push) Has been cancelled
Release S-UI / build-arm64 (push) Has been cancelled
Release S-UI / build-s390x (push) Has been cancelled
Build S-UI for Windows / build-windows-amd64 (push) Has been cancelled
Build S-UI for Windows / build-windows-arm64 (push) Has been cancelled
2026-07-19 19:03:23 +02:00
Alireza Ahmadi
2aba3161eb SS plugin share link #1194
Co-authored-by: rqzbeh <78313022+rqzbeh@users.noreply.github.com>
2026-07-19 11:57:42 +02:00
Alireza Ahmadi
24ce6d25a5 fix tls nil pointer #1198
Some checks failed
Release S-UI / build-frontend (push) Has been cancelled
Build S-UI for Windows / build-frontend (push) Has been cancelled
Release S-UI / build-386 (push) Has been cancelled
Release S-UI / build-amd64 (push) Has been cancelled
Release S-UI / build-armv5 (push) Has been cancelled
Release S-UI / build-armv6 (push) Has been cancelled
Release S-UI / build-armv7 (push) Has been cancelled
Release S-UI / build-arm64 (push) Has been cancelled
Release S-UI / build-s390x (push) Has been cancelled
Build S-UI for Windows / build-windows-amd64 (push) Has been cancelled
Build S-UI for Windows / build-windows-arm64 (push) Has been cancelled
2026-07-17 22:19:01 +02:00
Alireza Ahmadi
40394ebe4c support alpine + multi language install #1195 2026-07-17 20:28:35 +02:00
Alireza Ahmadi
cec2d6e05b server os aware frontend #1189 2026-07-17 18:05:13 +02:00
Alireza Ahmadi
0f4e29a95e add auto early_data to link #1193 2026-07-17 17:45:24 +02:00
Alireza Ahmadi
88b674388e fix clash based header #1184 2026-07-17 17:19:00 +02:00
Alireza Ahmadi
2be943e5d8 fix user disconneciton on each change
Some checks failed
Release S-UI / build-frontend (push) Has been cancelled
Build S-UI for Windows / build-frontend (push) Has been cancelled
Release S-UI / build-386 (push) Has been cancelled
Release S-UI / build-amd64 (push) Has been cancelled
Release S-UI / build-armv5 (push) Has been cancelled
Release S-UI / build-armv6 (push) Has been cancelled
Release S-UI / build-armv7 (push) Has been cancelled
Release S-UI / build-arm64 (push) Has been cancelled
Release S-UI / build-s390x (push) Has been cancelled
Build S-UI for Windows / build-windows-amd64 (push) Has been cancelled
Build S-UI for Windows / build-windows-arm64 (push) Has been cancelled
Fixing quic based authentication problem causes users to be disconnected on each changes on inbound or users

#1136 #1085 and same
2026-07-10 22:22:35 +02:00
Rouzbeh†
99e9d65c89 Fix Clash proxy group expansion (#1182)
Co-authored-by: rqzbeh <198332733+rqzbeh@users.noreply.github.com>
2026-07-10 20:55:00 +02:00
Rouzbeh†
78885b0332 Fix Shadowsocks 2022 user lookup (#1181)
Co-authored-by: rqzbeh <198332733+rqzbeh@users.noreply.github.com>
2026-07-10 20:47:01 +02:00
Alireza Ahmadi
843c640ba4 v1.5.3 2026-07-04 17:22:04 +02:00
Alireza Ahmadi
655a159394 [subclash] support optional default groups and inject all #1155
Some checks failed
Release S-UI / build-frontend (push) Has been cancelled
Build S-UI for Windows / build-frontend (push) Has been cancelled
Release S-UI / build-386 (push) Has been cancelled
Release S-UI / build-amd64 (push) Has been cancelled
Release S-UI / build-armv5 (push) Has been cancelled
Release S-UI / build-armv6 (push) Has been cancelled
Release S-UI / build-armv7 (push) Has been cancelled
Release S-UI / build-arm64 (push) Has been cancelled
Release S-UI / build-s390x (push) Has been cancelled
Build S-UI for Windows / build-windows-amd64 (push) Has been cancelled
Build S-UI for Windows / build-windows-arm64 (push) Has been cancelled
2026-07-04 15:36:19 +02:00
Alireza Ahmadi
bb81281e30 timezone independancy from OS #1166 2026-07-04 14:28:51 +02:00
Alireza Ahmadi
3d3a78bc71 fix pinSHA256 on hy links #1093 2026-07-04 14:20:31 +02:00
Alireza Ahmadi
6cdc7b25a2 v1.5.2
Some checks failed
Release S-UI / build-frontend (push) Has been cancelled
Build S-UI for Windows / build-frontend (push) Has been cancelled
Release S-UI / build-386 (push) Has been cancelled
Release S-UI / build-amd64 (push) Has been cancelled
Release S-UI / build-armv5 (push) Has been cancelled
Release S-UI / build-armv6 (push) Has been cancelled
Release S-UI / build-armv7 (push) Has been cancelled
Release S-UI / build-arm64 (push) Has been cancelled
Release S-UI / build-s390x (push) Has been cancelled
Build S-UI for Windows / build-windows-amd64 (push) Has been cancelled
Build S-UI for Windows / build-windows-arm64 (push) Has been cancelled
2026-07-03 00:35:13 +02:00
Alireza Ahmadi
b9ff0d9626 hashed panel password #1159 2026-07-03 00:31:59 +02:00
Alireza Ahmadi
33860df3b2 fix missing flow #1156 2026-07-02 23:55:03 +02:00
Alireza Ahmadi
7ae05d42c5 add outbound tls ping certificate
Some checks are pending
Release S-UI / build-frontend (push) Waiting to run
Release S-UI / build-386 (push) Blocked by required conditions
Release S-UI / build-amd64 (push) Blocked by required conditions
Release S-UI / build-armv5 (push) Blocked by required conditions
Release S-UI / build-armv6 (push) Blocked by required conditions
Release S-UI / build-armv7 (push) Blocked by required conditions
Release S-UI / build-arm64 (push) Blocked by required conditions
Release S-UI / build-s390x (push) Blocked by required conditions
Build S-UI for Windows / build-frontend (push) Waiting to run
Build S-UI for Windows / build-windows-amd64 (push) Blocked by required conditions
Build S-UI for Windows / build-windows-arm64 (push) Blocked by required conditions
2026-07-02 22:28:59 +02:00
Alireza Ahmadi
e593c1b9a3 fix ping sha256 fingerprint on links #1093 2026-07-02 22:28:05 +02:00
Alireza Ahmadi
e980c436a8 v1.5.1
Some checks failed
Release S-UI / build-frontend (push) Has been cancelled
Build S-UI for Windows / build-frontend (push) Has been cancelled
Release S-UI / build-386 (push) Has been cancelled
Release S-UI / build-amd64 (push) Has been cancelled
Release S-UI / build-armv5 (push) Has been cancelled
Release S-UI / build-armv6 (push) Has been cancelled
Release S-UI / build-armv7 (push) Has been cancelled
Release S-UI / build-arm64 (push) Has been cancelled
Release S-UI / build-s390x (push) Has been cancelled
Build S-UI for Windows / build-windows-amd64 (push) Has been cancelled
Build S-UI for Windows / build-windows-arm64 (push) Has been cancelled
2026-06-29 23:13:38 +02:00
Alireza Ahmadi
adacf214c9 [security] fix Vulnerabilities on Sing-Box dependencies 2026-06-29 23:09:42 +02:00
Alireza Ahmadi
b58de20ce4 fix certificate conflict #1153
Some checks are pending
Release S-UI / build-frontend (push) Waiting to run
Release S-UI / build-386 (push) Blocked by required conditions
Release S-UI / build-amd64 (push) Blocked by required conditions
Release S-UI / build-armv5 (push) Blocked by required conditions
Release S-UI / build-armv6 (push) Blocked by required conditions
Release S-UI / build-armv7 (push) Blocked by required conditions
Release S-UI / build-arm64 (push) Blocked by required conditions
Release S-UI / build-s390x (push) Blocked by required conditions
Build S-UI for Windows / build-frontend (push) Waiting to run
Build S-UI for Windows / build-windows-amd64 (push) Blocked by required conditions
Build S-UI for Windows / build-windows-arm64 (push) Blocked by required conditions
2026-06-29 22:00:30 +02:00
phj233
3b81e7656f
fix(clash): inject default Proxy/Auto only when a custom group references them (#1151)
Some checks are pending
Release S-UI / build-frontend (push) Waiting to run
Release S-UI / build-386 (push) Blocked by required conditions
Release S-UI / build-amd64 (push) Blocked by required conditions
Release S-UI / build-armv5 (push) Blocked by required conditions
Release S-UI / build-armv6 (push) Blocked by required conditions
Release S-UI / build-armv7 (push) Blocked by required conditions
Release S-UI / build-arm64 (push) Blocked by required conditions
Release S-UI / build-s390x (push) Blocked by required conditions
Build S-UI for Windows / build-frontend (push) Waiting to run
Build S-UI for Windows / build-windows-amd64 (push) Blocked by required conditions
Build S-UI for Windows / build-windows-arm64 (push) Blocked by required conditions
* fix(clash): inject default Proxy/Auto only when a custom group references them

Refines the proxy-group injection logic so default Proxy/Auto groups
are only injected when needed, rather than skipping injection entirely
when custom groups exist (#1110) or always injecting unconditionally
(#1066).

Two-part condition:
1. No group named Proxy already exists (user-defined Proxy is respected)
2. At least one existing group references Proxy in its proxies list

When injection is needed, defaults are prepended before custom groups.
Also avoids injecting a duplicate Auto group when the user already
defines one.

Added hasGroupNamed helper and comprehensive tests (15 cases) covering
nil/empty/custom/no-ref/duplicate-Auto scenarios.

* chore(clash): drop test file before merge

---------

Co-authored-by: Alireza Ahmadi <alireza7@gmail.com>
2026-06-28 18:38:39 +02:00
Alireza Ahmadi
b7931a9bbe fix dedubStats #1148 2026-06-28 18:00:30 +02:00
Alireza Ahmadi
4f4b81a66b adaptive chart based on buckets #1150 2026-06-28 13:41:38 +02:00
Alireza Ahmadi
f111d0c9fe v1.5.0
Some checks are pending
Release S-UI / build-frontend (push) Waiting to run
Release S-UI / build-386 (push) Blocked by required conditions
Release S-UI / build-amd64 (push) Blocked by required conditions
Release S-UI / build-armv5 (push) Blocked by required conditions
Release S-UI / build-armv6 (push) Blocked by required conditions
Release S-UI / build-armv7 (push) Blocked by required conditions
Release S-UI / build-arm64 (push) Blocked by required conditions
Release S-UI / build-s390x (push) Blocked by required conditions
Build S-UI for Windows / build-frontend (push) Waiting to run
Build S-UI for Windows / build-windows-amd64 (push) Blocked by required conditions
Build S-UI for Windows / build-windows-arm64 (push) Blocked by required conditions
2026-06-28 00:56:25 +02:00
phj233
9a6e875edd fix(sub): add content disposition header for subscriptions (#1145)
* fix(sub): add content disposition for subscriptions

* fix(sub): encode subscription filename per rfc5987

* chore(sub): drop subHandler test file before merge

---------

Co-authored-by: Alireza Ahmadi <alireza7@gmail.com>
2026-06-27 22:56:49 +02:00
Alireza Ahmadi
1a8708aed3 improve stats saving on db
Some checks are pending
Release S-UI / build-frontend (push) Waiting to run
Release S-UI / build-386 (push) Blocked by required conditions
Release S-UI / build-amd64 (push) Blocked by required conditions
Release S-UI / build-armv5 (push) Blocked by required conditions
Release S-UI / build-armv6 (push) Blocked by required conditions
Release S-UI / build-armv7 (push) Blocked by required conditions
Release S-UI / build-arm64 (push) Blocked by required conditions
Release S-UI / build-s390x (push) Blocked by required conditions
Build S-UI for Windows / build-frontend (push) Waiting to run
Build S-UI for Windows / build-windows-amd64 (push) Blocked by required conditions
Build S-UI for Windows / build-windows-arm64 (push) Blocked by required conditions
2026-06-27 14:03:56 +02:00
Alireza Ahmadi
b43e2a4278 [feat] createAt-lastOnline-remark added to Client #1115 2026-06-27 13:42:39 +02:00
Alireza Ahmadi
3e7f7aa945 use external json sub #652
Some checks are pending
Release S-UI / build-frontend (push) Waiting to run
Release S-UI / build-386 (push) Blocked by required conditions
Release S-UI / build-amd64 (push) Blocked by required conditions
Release S-UI / build-armv5 (push) Blocked by required conditions
Release S-UI / build-armv6 (push) Blocked by required conditions
Release S-UI / build-armv7 (push) Blocked by required conditions
Release S-UI / build-arm64 (push) Blocked by required conditions
Release S-UI / build-s390x (push) Blocked by required conditions
Build S-UI for Windows / build-frontend (push) Waiting to run
Build S-UI for Windows / build-windows-amd64 (push) Blocked by required conditions
Build S-UI for Windows / build-windows-arm64 (push) Blocked by required conditions
2026-06-27 12:32:06 +02:00
Alireza Ahmadi
deb285d8bc optional default routing rules fo json sub #1112
Some checks are pending
Release S-UI / build-frontend (push) Waiting to run
Release S-UI / build-386 (push) Blocked by required conditions
Release S-UI / build-amd64 (push) Blocked by required conditions
Release S-UI / build-armv5 (push) Blocked by required conditions
Release S-UI / build-armv6 (push) Blocked by required conditions
Release S-UI / build-armv7 (push) Blocked by required conditions
Release S-UI / build-arm64 (push) Blocked by required conditions
Release S-UI / build-s390x (push) Blocked by required conditions
Build S-UI for Windows / build-frontend (push) Waiting to run
Build S-UI for Windows / build-windows-amd64 (push) Blocked by required conditions
Build S-UI for Windows / build-windows-arm64 (push) Blocked by required conditions
2026-06-27 01:32:46 +02:00