[tor-bugs] #13338 [Tor]: Rewrite tor-fw-helper in Go (or another memory-safe language)
Tor Bug Tracker & Wiki
blackhole at torproject.org
Wed Oct 22 11:12:10 UTC 2014
#13338: Rewrite tor-fw-helper in Go (or another memory-safe language)
-----------------------------+------------------------------
Reporter: arma | Owner: yawning
Type: enhancement | Status: assigned
Priority: minor | Milestone: Tor: unspecified
Component: Tor | Version:
Resolution: | Keywords: flashproxy
Actual Points: | Parent ID: #5213
Points: |
-----------------------------+------------------------------
Changes (by yawning):
* milestone: Tor: very long term => Tor: unspecified
Comment:
Ok, I have a router that supports NAT-PMP, so I'm writing the client code
now. I also found out some interesting things about miniupnpd, and fixed
"compatibility with broken non-RFC compliant HTTP servers in existing
routers" in the uPNP code[0].
The NAT-PMP RFC makes threatening noises about uPNP implementations that
crash if the lease duration isn't set to 0, so I'll probably go change the
code to always issue "indefinite" leases when talking uPNP 1.0, even
though using it like how flashproxy wants to (randomized port) will clog
up the uPNP lease table and cause catastrophic failure modes in other uPNP
implementations[1]. I figure eventual failure is better than immediate,
but there is no good answer here apart from (only use one port, pray)
given the current architecture.
I'm starting to think that the whole "call a helper once in a while to
extend the lease" isn't that great of a design in view of how broken all
the various uPNP routers out there are (especially given that the original
tor-fw-helper has no method of cleaning up existing leases), and that this
would be much better off as a daemon, but going to such an architecture
makes the code considerably more complex (as it needs to be resilient to
router reboots), but fixing that is a longer term thing that can wait till
after feature parity has been reached.
[0]: The embedded webserver shipped in all versions including the master
in their repository does not handle chunked transfer coding despite
claiming to be HTTP 1.1.
(https://github.com/miniupnp/miniupnp/blob/master/miniupnpd/upnphttp.c)
[1]: http://www.upnp-hacks.org/annoyances.html
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13338#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list