Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

在使用tun模式做透明代理流量很大的情况下,会触发panicked

Open
#2,164 2 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from shadowsocks/shadowsocks-rust

All issues in shadowsocks/shadowsocks-rust

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.