snowflake-proxy: NAT type detection fails on reboot
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
Package Name
snowflake-proxy
Maintainer
(@PolynomialDivision)
OpenWrt Version
25.12.0-rc5
OpenWrt Target/Subtarget
mediatek/filogic
Steps to Reproduce
- install
snowflake-proxy - add
-ephemeral-ports-range 32768:60999as a command parameter in thestart_service()function in the init script - add a firewall rule to allow incoming IPv4 & IPv6 UDP traffic on the above port range on the WAN interface:
# /etc/init.d/snowflake-proxy restart# logread|grep snowflake-proxy
Observe after the line "Proxy starting" the line "NAT type: unrestricted"
- reboot the router
The logs should report "NAT type: unrestricted" again.
Actual Behaviour
After a reboot logs say "NAT type: unknown".
I've reported the bug at the Tor Project's snowflake repo and been advised to report it here too. We suspect NAT type detection is failing because the STUN server probe test is conducted before the WAN connection is up.
Adding sleep 10 to the beginning of the start_service() function seems to fix it, but I expect there is a better way of waiting for a network connection.
Thanks for making this package available btw.
Confirmation Checklist
- The package is maintained in this repository.
- I understand that issues related to the base OpenWrt repository or LuCI repository will be closed.
- I am reporting an issue for OpenWrt, not an unsupported fork.
Contributor guide
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.
Research direction
Start with the snowflake-proxy init script and its start_service() function; reproduce the reboot case with logread and compare it with a manual restart after the WAN is available. Trace how startup ordering exposes the STUN probe to the network, then verify that NAT detection reports unrestricted after reboot without relying on a fixed sleep.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100