在使用tun模式做透明代理流量很大的情况下,会触发panicked
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- networking
Research direction
Reproduce tun-mode operation under sustained high-volume TCP traffic on the reported shadowsocks-rust 1.24.0 and OpenWrt environment. Start at the smoltcp 0.12.0 panic reported in src/wire/tcp.rs:81 and use RUST_BACKTRACE=1 to trace the relevant path; done means the traffic no longer triggers sequence-number underflow or a panic.
Written by the indexing model from the issue text.
Description
非常感谢作者带来了tun模式,tun模式对于我一台老旧路由器的精简openwrt内核有着非常重要的作用,因为该路由器官方固件没有tproxy,甚至ipset也并未编译进系统,导致udp协议无法使用。
但是tun模式的出现拯救了我这台老旧路由器,代理效率(即速度)超出原本的期待。
回归到问题,该故障现象出现的时候有如下报错:
thread 'smoltcp-poll' (17908) panicked at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/smoltcp-0.12.0/src/wire/tcp.rs:81:13:
attempt to subtract sequence numbers with underflow
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
如标题所述,该故障现象仅当在流量大的情况下出现,应该是TCP流量,UDP流量暂时没法测。
它不是随机偶尔出现,是一定会伴随着在大流量的情况出现的。
shadowsocks-rust版本是:
INFO shadowsocks local 1.24.0 build 2025-12-11T00:30:22.902795962+00:00
官方固件的openwrt版本是这个:
root@WRT32X:~# uname -a
Linux WRT32X 4.4.14 #4 SMP Wed Apr 4 18:23:44 UTC 2018 armv7l GNU/Linux
希望该issue能得到调查和修正。非常感谢!
- Dominant language
- Rust
- Stars
- 10.9k
- Forks
- 1.5k
- Avg merge
- 4d 41m
- Merged PRs (30d)
- 9
Getting set up
We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from shadowsocks/shadowsocks-rust
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
shadowsocks/shadowsocks-rust#2185 · 3 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
shadowsocks/shadowsocks-rust#2171 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
shadowsocks/shadowsocks-rust#2160 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
shadowsocks/shadowsocks-rust#2143 · 1 comment ·
-
UDP relay fails with "Operation not permitted (os error 1)" when sending response back to clientOpen
Difficulty 4/5 3-5 days Newbie friendliness 38/100
shadowsocks/shadowsocks-rust#2139 · 3 comments ·
All issues in shadowsocks/shadowsocks-rust
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
aws-samples/sample-pacer#76 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
axodotdev/cargo-dist#2523 ·
Maintainers usually reply within 2 days