| Commit message (Collapse) | Author | Age |
| ... | |
| |
|
|
|
|
| |
We are no longer checking for nil BrokerChannels in Catch because this
case is caught from the return values of NewBrokerChannel. This change
caused a no longer necessary unit test to hang.
|
| |
|
|
|
| |
We changed NewBrokerChannel to return an error value on failure. This
updates the tests to check that value.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
The call was
copyLoop(socks, snowflake)
but the function signature was
func copyLoop(WebRTC, SOCKS io.ReadWriter) {
The mistake was mostly harmless, because both arguments were treated the
same, except that error logs would have reported the wrong direction.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Instead of returning nil from NewBrokerChannel and having
WebRTCDialer.Catch check for nil, let NewBrokerChannel return an error
and bail out before calling WebRTCDialer.Catch.
Suggested by cohosh.
https://bugs.torproject.org/33040#comment:3
|
| |
|
|
| |
Closing the channel makes it always immediately selectable.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
These functions are called for their side effect of sending a PT error
message on stdout; they also return a representation of the error
message as an error object for the caller to use if it wishes. These
functions *always* return a non-nil error object; it is not something to
be logged, any more than the return value of errors.New is.
The mistaken logging was added in
https://bugs.torproject.org/31794
b26c7a7a7330586c3be3ece02c68999bb279ff40
3ec9dd19faa8584dd76ba3b85eb71a03b8ee25c0
ed3d42e1ec3ff852f8c4751eb4cf5e9ed4dd4a68
|
| | |
|
| |
|
|
| |
Trac: 32499
|
| |
|
|
| |
Trac: 32499
|
| | |
|
| |
|
|
|
|
| |
There were a few tests that needed refreshing since the introduction of
the pion library. Also added a few tests for the ICE server parsing
function in the client.
|
| |
|
|
|
| |
Now tests the proxy and initServer functionalities. The tests use the
same websocket library as the server and proxy-go implementations.
|
| |
|
|
|
|
| |
Added another lock to the metrics struct to synchronize accesses to the
broker stats. There's a possible race condition if stats are updated at
the same time they are being logged.
|
| |
|
|
|
|
| |
We had some data races in the broker that occur when proxies and clients
modify the heap/snowflake map at the same time. This test has a client
and proxy access the broker simultaneously to check for data races.
|
| |
|
|
|
|
|
| |
There's a race condition in the broker where both the proxy and the
client processes try to pop/remove the same snowflake from the heap.
This patch adds synchronization to prevent simultaneous accesses to
snowflakes.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This allows badge and standalone proxies to tell the broker what proxy
type they are.
|
| |
|
|
|
|
| |
Proxies now include information about what type they are when they poll
for client offers. The broker saves this information along with
snowflake ids and outputs it on the /debug page.
|
| | |
|
| |
|
|
| |
Trac: 32465
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This change makes it easier for us to write tests with mock transports
|
| | |
|
| |
|
|
| |
Also removed some unnecessary code
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Switch to containing all communication between the proxy and the broker
in the HTTP response body. This will make things easier if we ever use
something other than HTTP communicate between different actors in the
snowflake system.
Other changes to the protocol are as follows:
- requests are accompanied by a version number so the broker can be
backwards compatable if desired in the future
- all responses are 200 OK unless the request was badly formatted
|
| |
|
|
| |
And simplify EOF check.
|
| |
|
|
| |
Trac: 31028
|
| |
|
|
|
|
|
|
| |
The variable maxNumClients was unused, while connectionsPerClient was
used for spawning multiple proxyPairs. The former is a more appropriate
name for the multiplexing behaviour we use it for.
Multiplexing now just works thanks to implementing ticket #31310.
|
| |
|
|
|
| |
Increase readability of code a bit, the function descriptions were
automatically placed in the constructor when we moved from coffeescript.
|
| |
|
|
| |
Use their existence in the proxy pair list to indicate they are active.
|
| |
|
|
|
|
| |
We don't need it, and already have a function webrtcIsReady that tells
us what we need to know (whether a datachannel was opened before the
timeout period).
|
| |
|
|
|
|
|
|
|
| |
The only place it was used was in window.onpageunload, and we have a
better way of determining if the proxy is active there (through the ui).
I also removed that code from the webextension since the proxy won't
stop running unless you close the browser and after testing it looks
like that code doesn't notify the user anyway.
|
| | |
|
| |
|
|
| |
https://bugs.torproject.org/32129
|