mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
expose multiplex capacity as flag, un-global some more
This commit is contained in:
parent
2caa47988d
commit
b6f15a8d5c
5 changed files with 20 additions and 21 deletions
|
@ -264,12 +264,10 @@ func (c *webRTCConn) establishDataChannel() error {
|
|||
}
|
||||
|
||||
func (c *webRTCConn) sendOfferToBroker() {
|
||||
if "" == brokerURL {
|
||||
if nil == c.broker {
|
||||
return
|
||||
}
|
||||
offer := c.pc.LocalDescription()
|
||||
log.Println("Sending offer via BrokerChannel...\nTarget URL: ", brokerURL,
|
||||
"\nFront URL: ", frontDomain)
|
||||
answer, err := c.broker.Negotiate(offer)
|
||||
if nil != err || nil == answer {
|
||||
log.Printf("BrokerChannel Error: %s", err)
|
||||
|
@ -284,7 +282,7 @@ func (c *webRTCConn) exchangeSDP() error {
|
|||
select {
|
||||
case offer := <-c.offerChannel:
|
||||
// Display for copy-paste, when no broker available.
|
||||
if "" == brokerURL {
|
||||
if nil == c.broker {
|
||||
log.Printf("Please Copy & Paste the following to the peer:")
|
||||
log.Printf("----------------")
|
||||
log.Printf("\n" + offer.Serialize() + "\n")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue