#21314: snowflake-client needs to stop using my network when I'm not giving it requests -------------------------------------------------+------------------------- Reporter: arma | Owner: (none) Type: defect | Status: new Priority: Medium | Milestone: Component: Circumvention/Snowflake | Version: Severity: Normal | Resolution: Keywords: tor-pt, ex-sponsor19, anti- | Actual Points: censorship-roadmap | Parent ID: #21967 | Points: 2 Reviewer: | Sponsor: -------------------------------------------------+-------------------------
Comment (by dcf): I think the way to do this is to restructure the code so that the broker- polling loop (which keeps the client replenished with fresh proxies) happens inside the SOCKS handler, not outside. That is, currently the code works like this, with the broker-polling loop being global and independent of any SOCKS connection: {{{ func main() { snowflakes := sf.NewPeers() // etc. go ConnectLoop(snowflakes) // start the background broker-polling loop for conn in ln.AcceptSocks() { // pass a handle to the snowflake collector to the handler function go Handler(conn, snowflakes) } snowflakes.End() } func Handler(socks net.Conn, snowflakes SnowflakeCollector) { snowflake := snowflakes.Pop() copyLoop(socks, snowflake) } }}} Instead, it should start a new browser-polling loop specific to each SOCKS connection (tor usually has 0 or 1 of these open at a time): {{{ func main() { for conn in ln.AcceptSocks() { go Handler(conn) } } func Handler(socks net.Conn, snowflakes SnowflakeCollector) { snowflakes := sf.NewPeers() // etc. go ConnectLoop(snowflakes) // start the background broker-polling loop snowflake := snowflakes.Pop() copyLoop(socks, snowflake) snowflakes.End() } }}} -- Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21314#comment:12> Tor Bug Tracker & Wiki <https://trac.torproject.org/> The Tor Project: anonymity online
_______________________________________________ tor-bugs mailing list tor-bugs@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs