#31310 closed defect (fixed)

Refactor/remove proxy-pair state machine in webextension

Reported by: cohosh Owned by: cohosh
Priority: Medium Milestone:
Component: Circumvention/Snowflake Version:
Severity: Normal Keywords: snowflake-webextension
Cc: arlolra, cohosh, phw, dcf Actual Points:
Parent ID: Points: 2
Reviewer: phw Sponsor: Sponsor28

Description

The snowflake badge and webextension code is heavily based off of flash proxy, but the proxy pair state machine, which used attributes such as "running" and "active" doesn't map as nicely to the webrtc context. It would be nice to refactor this to be simpler, more closely match our understanding of the webrtc state machine and be easier to maintain. This might mean removing these attributes entirely and using the existence of proxy pairs to indicate if there are any open or running connections (see https://trac.torproject.org/projects/tor/ticket/31100#comment:23).

Child Tickets

Change History (7)

comment:1 Changed 12 months ago by gaba

Sponsor: Sponsor28

comment:2 Changed 12 months ago by cohosh

Owner: set to cohosh
Status: newassigned

comment:3 Changed 12 months ago by cohosh

Status: assignedneeds_review

These changes remove the "active" and "running" properties of the proxypairs: https://github.com/cohosh/snowflake/pull/12

As discussed in #31100, we switch to using the existence of the proxy pairs themselves to mean they are active. I also removed the snowflake MODE state machine because it was unecessary and moved some comments around to make the code more readable.

comment:4 Changed 12 months ago by cohosh

"refactor" is a strong word for what I did here. The broker poll loop leaves some things to be desired still. I talked with serna a bit on irc a week or so ago and they may attempt to make some changes to the broker poll loop for #25598.

comment:5 Changed 12 months ago by phw

Reviewer: phw

comment:6 Changed 12 months ago by phw

Status: needs_reviewmerge_ready

This looks good to me. I only had a question about a few deletions.

comment:7 Changed 12 months ago by cohosh

Resolution: fixed
Status: merge_readyclosed
Note: See TracTickets for help on using tickets.