mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Remove unused clientAddr from ProxyPair
This commit is contained in:
parent
5212eda6b2
commit
d1ec51bfb9
4 changed files with 4 additions and 6 deletions
|
@ -22,7 +22,7 @@ class ProxyPair
|
||||||
onCleanup: null
|
onCleanup: null
|
||||||
id: null
|
id: null
|
||||||
|
|
||||||
constructor: (@clientAddr, @relayAddr, @rateLimit) ->
|
constructor: (@relayAddr, @rateLimit) ->
|
||||||
@active = false
|
@active = false
|
||||||
@id = genSnowflakeID()
|
@id = genSnowflakeID()
|
||||||
|
|
||||||
|
|
|
@ -143,7 +143,7 @@ class Snowflake
|
||||||
.catch fail
|
.catch fail
|
||||||
|
|
||||||
makeProxyPair: (relay) ->
|
makeProxyPair: (relay) ->
|
||||||
pair = new ProxyPair null, relay, @rateLimit
|
pair = new ProxyPair relay, @rateLimit
|
||||||
@proxyPairs.push pair
|
@proxyPairs.push pair
|
||||||
pair.onCleanup = (event) =>
|
pair.onCleanup = (event) =>
|
||||||
# Delete from the list of active proxy pairs.
|
# Delete from the list of active proxy pairs.
|
||||||
|
|
|
@ -7,8 +7,7 @@ describe 'ProxyPair', ->
|
||||||
fakeRelay = Parse.address '0.0.0.0:12345'
|
fakeRelay = Parse.address '0.0.0.0:12345'
|
||||||
rateLimit = new DummyRateLimit()
|
rateLimit = new DummyRateLimit()
|
||||||
destination = []
|
destination = []
|
||||||
fakeClient = send: (d) -> destination.push d
|
pp = new ProxyPair(fakeRelay, rateLimit)
|
||||||
pp = new ProxyPair(fakeClient, fakeRelay, rateLimit)
|
|
||||||
|
|
||||||
it 'begins webrtc connection', ->
|
it 'begins webrtc connection', ->
|
||||||
pp.begin()
|
pp.begin()
|
||||||
|
|
|
@ -159,13 +159,12 @@ describe 'ProxyPair', ->
|
||||||
fakeRelay = Parse.address '0.0.0.0:12345'
|
fakeRelay = Parse.address '0.0.0.0:12345'
|
||||||
rateLimit = new DummyRateLimit()
|
rateLimit = new DummyRateLimit()
|
||||||
destination = []
|
destination = []
|
||||||
fakeClient = send: (d) -> destination.push d
|
|
||||||
# Fake snowflake to interact with
|
# Fake snowflake to interact with
|
||||||
snowflake = {
|
snowflake = {
|
||||||
broker:
|
broker:
|
||||||
sendAnswer: ->
|
sendAnswer: ->
|
||||||
}
|
}
|
||||||
pp = new ProxyPair(fakeClient, fakeRelay, rateLimit)
|
pp = new ProxyPair(fakeRelay, rateLimit)
|
||||||
|
|
||||||
it 'begins webrtc connection', ->
|
it 'begins webrtc connection', ->
|
||||||
pp.begin()
|
pp.begin()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue