[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 15:52:30 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:               |
-----------------------------+------------------------------

Comment (by yawning):

 Ok, I just pushed NAT-PMP support, since the protocol is trivial.  It only
 works on Linux at the moment because:
 {{{
 Clients always send their NAT-PMP requests to their default gateway,
 as learned via DHCP [RFC2131], or similar means.
 }}}

 Dumping the routing table is not portable, and currently only the Linux
 code to pull the default gateway from the routing table is written.
 '''This does not mean I don't plan on doing it, just that I haven't made
 it work on other platforms YET.'''

 I went and changed the UPnP lease duration to "0" which will has the
 potential to make UPnP unusable after a while due to the table getting
 full, but it beats crashing routers as soon as the request is sent.  NAT-
 PMP uses 7200 second (2 hour) leases as recommended in the RFC.

 TODO:
  * Add verbose logging to the NAT-PMP implementation, and handle when the
 router changes the external port (on conflict).
  * Write `getGateway()` for *BSD and Windows.
  * Add command line options for purging entries, so people can attempt to
 clean up the mess that using this with UPnP makes (the original has the
 same problem).
  * General code cleanups, though it should be legible and at least appears
 to work.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13338#comment:9>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list