[tor-bugs] #29207 [Circumvention/Snowflake]: New design for broker -- proxy protocol for snowflakes

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Oct 25 07:50:24 UTC 2019


#29207: New design for broker -- proxy protocol for snowflakes
-------------------------------------------------+-------------------------
 Reporter:  cohosh                               |          Owner:  cohosh
     Type:  enhancement                          |         Status:
                                                 |  needs_information
 Priority:  High                                 |      Milestone:
Component:  Circumvention/Snowflake              |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  snowflake, design, ex-sponsor-19,    |  Actual Points:  2
  anti-censorship-roadmap                        |
Parent ID:                                       |         Points:  5
 Reviewer:                                       |        Sponsor:
                                                 |  Sponsor28-must
-------------------------------------------------+-------------------------
Changes (by dcf):

 * status:  needs_review => needs_information


Comment:

 This looks good. Just a few points.
  * If you prefer to use lowercase JSON keys, you can do it with struct
 tags like
    {{{
    type ProxyPollRequest struct {
         Sid     string `json:"sid"`
         Version string `json:"version"`
    }
    }}}
  * `StatusInternalServerError` seems more appropriate than
 `StatusBadRequest` for an error where the server fails to marshal (as
 opposed to unmarshal) some information.
  * In `proxyAnswers`, the check for `r.Body == nil` is unnecessary,
 because `net/http` guarantees it will always be non-nil.
  * The test `"with error if the proxy is not recognized"` still refers to
 X-Session-ID, which it should probably be rewritten to use a JSON
 structure with `"Sid": "invalid"`.
  * A [https://golang.org/ref/spec#String_literals raw string literal] will
 save some escaping in strings like
 `"{\"Sid\":\"ymbcCMto7KHNGYlp\",\"Version\":\"1.0\"}"`.
  * The comment at the top of proxy.go looks like it's erroneously copied
 from safelog/log.go.

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


More information about the tor-bugs mailing list