Commit Graph
3455 Commits
Author SHA1 Message Date
ty a981de7bbf fix(relay): pick non-zero AEAD-2022 padding size for empty first payload
SIP022 requires that in a request header, either initial payload or
padding MUST be present. When the first payload is empty (e.g. handshake
triggered by an empty write for server-first protocols), the client
could pick padding 0 with probability 1/901, generating a header that
servers MUST reject per the spec, causing ~1/901 handshakes to fail
against ssserver built from the same crate.

Pick the padding size from 1..=AEAD2022_MAX_PADDING_SIZE instead.

fix #2184
2026-09-29 10:27:31 +08:00
Klaaktu e33daa7114 systemd unit improvements (#2187)
* systemd: Use network-online.target for server

Fixes #2186
ss-server needs to wait for the network to be up to be able to bind to non-wildcard IPs. Interface is configured at `network-online.target` but not at `network.target`.

ss-local unit is kept the same, with `After=network.target` for proper ordering at shutdown - unit is stopped before network is shutdown.

* systemd unit: improvements

`exec` is [recommended](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Type=).
Add `NoNewPriviledges` which has been used in [Arch packaging](https://gitlab.archlinux.org/archlinux/packaging/packages/shadowsocks-rust/-/blob/main/shadowsocks-rust-server%40.service?ref_type=heads).
Add `CAP_NET_ADMIN` in ss-local which is needed for TUN mode.
Removed `CAP_NET_BIND_SERVICE` from ss-local. Do you really need to bind to priviledged port in *client*?
Debian unit left un-hardened. I'm not sure why it's different from the other ss-server unit.
2026-09-29 10:03:02 +08:00
renovate[bot] 2872330701 chore(deps): update rust crate tokio-rustls to v0.26.6 2026-09-28 12:00:24 +00:00
renovate[bot] 0ff649e9a6 chore(deps): update rust crate sendfd to v0.4.5 2026-09-27 02:22:01 +00:00
renovate[bot] a58349df7e chore(deps): update rust crate rand to v0.10.3 2026-09-26 01:17:11 +08:00
renovate[bot] 89aef72e06 chore(deps): update rust crate clap to v4.6.7 2026-09-26 01:17:03 +08:00
renovate[bot] 795ed227c8 chore(deps): update rust crate bloomfilter to v3.0.2 2026-09-26 01:16:31 +08:00
renovate[bot] 14976b3d72 chore(deps): update rust crate thiserror to v2.0.21 2026-09-26 01:16:20 +08:00
renovate[bot] b770135bc1 chore(deps): update rust crate cfg-if to v1.0.5 2026-09-26 01:16:00 +08:00
ty 59d5be04e6 fix: RUSTSEC-2026-0285 2026-09-25 22:55:10 +08:00
ty e01605cdff fix(tcprelay): report actual plaintext length when retrying after Pending
EncryptedWriter.poll_write_encrypted keeps the encrypted buffer and its
on-wire offset across Poll::Pending, but returned the length of the
buffer passed on the *retried* call instead of the plaintext length that
was actually assembled into the pending frame.

Tokio's copy/copy_bidirectional may append freshly read data to the
input slice while the writer is Pending, so the reported count could
exceed what was actually encrypted and sent, silently dropping the
appended bytes.

Fixes #2175
2026-09-25 11:36:14 +08:00
ty 5199ae33e3 fix: updated chacha20 to v0.10.2, v0.10.1 yanked 2026-09-25 11:24:06 +08:00
ty 7dee109d70 fix(local-tun): enable smoltcp "auto-icmp-echo-reply" feature to reply ICMP Echo Request
smoltcp 0.13 (PR smoltcp-rs/smoltcp#1106) made automatic ICMP echo
replies opt-in via the "auto-icmp-echo-reply" feature flag. It is only
part of smoltcp's default features, which this crate disables with
default-features = false. Since the smoltcp 0.13 upgrade, the Tun local
silently drops ICMP Echo Requests and no longer responds to ping.

Fixes #2178
2026-09-25 11:22:04 +08:00
renovate[bot] 157cefa96d chore(deps): update rust crate hickory-resolver to v0.26.3 (#2173)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-09-11 01:13:55 +00:00
renovate[bot] 11378ea598 chore(deps): update rust docker tag to v1.98.1 2026-09-09 21:55:56 +00:00
renovate[bot] 8eb0f0a65b chore(deps): update rust crate reqwest to v0.13.5 2026-09-09 02:26:26 +00:00
renovate[bot] b027152651 chore(deps): update rust crate ipnet to v2.12.2 2026-09-06 09:14:15 +00:00
renovate[bot] 1e4ed226e1 fix(deps): update rust crate zstd to 0.14 2026-09-04 22:06:22 +00:00
renovate[bot] 561f23cde8 chore(deps): update rust crate tokio-rustls to v0.26.5 2026-09-04 10:49:06 +00:00
renovate[bot] e66fcff6ec fix(deps): update rust crate brotli to v9 2026-09-03 13:42:02 +08:00
renovate[bot] 692160c1f4 chore(deps): update rust crate aes to v0.9.3 2026-08-28 19:29:39 +00:00
renovate[bot] 616fac6d3a chore(deps): update rust crate hyper to v1.11.1 2026-08-28 14:12:38 +00:00
renovate[bot] 5f2cbad931 chore(deps): update rust crate flate2 to v1.1.10 2026-08-28 07:05:23 +00:00
ty 2de264a374 fix: eliminate warnings under default features
- Replace catch-all arm in OutboundProxyStream::try_into_tcp with
  explicit cfg-gated variant arms, fixing unreachable_patterns warning
  when local-http features are disabled
- Gate utils module behind local/server features, fixing dead_code
  warning for ServerHandle when neither module is compiled
2026-08-27 02:40:36 +08:00
ty ab388c7466 chore: release v1.25.0 v1.25.0 2026-08-27 02:30:21 +08:00
ty 8166f32d1a chore: update indirect dependencies 2026-08-27 02:28:00 +08:00
renovate[bot] f5e2749da1 chore(deps): update rust docker tag to v1.98.0 2026-08-27 02:27:32 +08:00
renovate[bot] 7fa251fecd chore(deps): update rust crate spin to v0.12.3 2026-08-27 02:27:23 +08:00
renovate[bot] 5cfcbc89ea chore(deps): update rust crate log to v0.4.34 2026-08-27 02:27:15 +08:00
renovate[bot] a412166e84 chore(deps): update rust crate blake3 to v1.8.7 2026-08-27 02:27:09 +08:00
ty b8cce0d519 Bump shadowsocks-crypto to 0.8.0 2026-08-27 02:20:13 +08:00
ty 65f6a8e166 refactor: split inbound_udp_allow_fragmentation from outbound option
Add a dedicated  config option for
inbound (listener) UDP sockets, instead of reusing the outbound option.

- SSConfig / SSServerExtConfig: new
  JSON field (global + per-server)
- Config / ServerInstanceConfig: new field, defaults to false
- server/manager/local: accept_opts.udp.allow_fragmentation now sourced
  from the inbound option; per-server override split into inbound/outbound
- README: document the new option in both JSON examples
- tests/udp.rs: fix unused import of AcceptOpts on non-Linux platforms
2026-08-27 02:07:27 +08:00
peng weikang 668ff171f4 fix: allow fragmentation for inbound UDP replies 2026-08-27 02:07:27 +08:00
ty a99c9dddad fix: RUSTSEC-2026-0258 2026-08-27 01:03:08 +08:00
renovate[bot] 76a4317a73 fix(deps): update rust crate smoltcp to 0.14 2026-08-17 02:53:17 +00:00
renovate[bot] 89bbabda85 fix(deps): update rust crate rocksdb to 0.25 2026-08-16 12:46:54 +00:00
renovate[bot] 9214fdaf1f chore(deps): update rust crate snmalloc-rs to v0.7.5 2026-08-13 00:59:53 +00:00
renovate[bot] 2b823ab254 chore(deps): update rust crate http-body-util to v0.1.5 2026-08-12 19:40:32 +00:00
renovate[bot] b35f610845 chore(deps): update rust crate futures to v0.3.34 2026-08-11 22:47:08 +00:00
renovate[bot] e543d9bc8c chore(deps): update rust crate clap to v4.6.6 (#2163)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-08 16:36:20 +00:00
gengjiawen db65eaa824 fix(net): make udp batch cfgs match the bsd module routing for tvos/watchos
`net/sys/unix/bsd/mod.rs` already routes macos, ios, watchos and tvos
to `bsd/macos.rs`, and that module unconditionally imports
`net::udp::{BatchRecvMessage, BatchSendMessage}`. But the nine cfg
gates in `net/udp.rs` list only macos and ios among the Apple
platforms, so on watchos and tvos those items are configured out while
the importer is still compiled -- E0432, the crate does not build.

Add watchos and tvos to the nine gates so the two lists agree.
2026-08-08 23:20:32 +08:00
renovate[bot] ec908d9244 chore(deps): update rust crate thiserror to v2.0.20 2026-08-08 08:49:27 +00:00
renovate[bot] fba3c974cb chore(deps): update rust crate blake3 to v1.8.6 2026-08-06 02:50:23 +00:00
renovate[bot] 83e2f0a512 chore(deps): update rust crate base64 to v0.23.1 2026-08-04 16:58:40 +00:00
renovate[bot] 3edf1f4f98 chore(deps): update rust crate ipnet to v2.12.1 2026-08-02 05:33:57 +00:00
renovate[bot] 3a0a3c85cc chore(deps): update rust crate time to v0.3.55 2026-08-01 09:13:33 +00:00
renovate[bot] 9e0da35f0d chore(deps): update rust crate clap to v4.6.5 2026-07-31 18:56:04 +00:00
renovate[bot] 87ca5045dc chore(deps): update rust crate http to v1.5.0 2026-07-29 17:17:46 +00:00
renovate[bot] 28fbd08671 chore(deps): update rust crate aes to v0.9.2 2026-07-27 06:01:57 +00:00
renovate[bot] 6b96a84b99 fix(deps): update rust crate base64 to 0.23 2026-07-23 18:43:11 +00:00