mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Move snowflake ConnectLoop inside SOCKS Handler
Bug #21314: maintains a separate snowflake connect loop per SOCKS connection. This way, if Tor decides to stop using Snowflake, Snowflake will stop using the client's network.
This commit is contained in:
parent
d5ae7562ac
commit
1364d7d45b
3 changed files with 41 additions and 37 deletions
|
@ -157,11 +157,11 @@ func TestSnowflakeClient(t *testing.T) {
|
|||
|
||||
SkipConvey("Handler Grants correctly", func() {
|
||||
socks := &FakeSocksConn{}
|
||||
snowflakes := &FakePeers{}
|
||||
broker := &BrokerChannel{Host: "test"}
|
||||
d := NewWebRTCDialer(broker, nil)
|
||||
|
||||
So(socks.rejected, ShouldEqual, false)
|
||||
snowflakes.toRelease = nil
|
||||
Handler(socks, snowflakes)
|
||||
Handler(socks, d)
|
||||
So(socks.rejected, ShouldEqual, true)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue