hysteria/extras
白日梦主义 3991117d27
fix(acl): normalize trailing dot in domain matches (#1574)
* fix(acl): normalize trailing dot in domain matches

The ACL like

```yaml
    - reject(example.com)
    - reject(suffix:blocked.test)
    - reject(*.wild.test)
```

can be easily bypass through by adding a dot to the domain like

example.com.:443

Signed-off-by: Cherrling <me@cherr.cc>

* fix(acl): trim all trailing dots and add tests

Use strings.TrimRight instead of strings.TrimSuffix so domains with
multiple trailing dots (e.g. example.com..) are also normalized and
cannot bypass ACL rules. Add test coverage for trailing-dot handling
on exact, wildcard and suffix domain rules, as well as for trailing
dots in rule patterns.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Signed-off-by: Cherrling <me@cherr.cc>
Co-authored-by: Toby <tobyxdd@gmail.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 14:06:04 -07:00
..
auth chore: unexport UserPassAuthenticator.Users 2025-02-03 12:39:52 +09:00
correctnet chore: reformat code 2023-11-27 11:35:15 +08:00
masq fix: mod name major version suffix v2 2024-05-18 11:28:47 +08:00
obfs feat: Hysteria Realms (#1560) 2026-05-08 14:16:21 -07:00
outbounds fix(acl): normalize trailing dot in domain matches (#1574) 2026-05-16 14:06:04 -07:00
realm fix(realm): client should accept punch packets from any source address 2026-05-10 10:13:49 -07:00
sniff fix: repair the oom problem when enable sniff (#1547) 2026-04-18 11:33:00 -07:00
trafficlogger feat: quic-go v0.54.0 2025-09-13 16:17:59 -07:00
transport/udphop feat: port hopping random interval 2026-03-29 14:00:12 -07:00
utils chore: a better fix to portunion 2024-11-05 01:30:44 +09:00
go.mod feat: Hysteria Realms (#1560) 2026-05-08 14:16:21 -07:00
go.sum feat: Hysteria Realms (#1560) 2026-05-08 14:16:21 -07:00
LICENSE.md chore: add LICENSE to packages 2025-03-18 20:44:59 -07:00