mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
23 lines
656 B
Go
23 lines
656 B
Go
package lib
|
|
|
|
// Interface for catching Snowflakes. (aka the remote dialer)
|
|
type Tongue interface {
|
|
Catch() (*WebRTCPeer, error)
|
|
|
|
// Get the maximum number of snowflakes
|
|
GetMax() int
|
|
}
|
|
|
|
// Interface for collecting some number of Snowflakes, for passing along
|
|
// ultimately to the SOCKS handler.
|
|
type SnowflakeCollector interface {
|
|
// Add a Snowflake to the collection.
|
|
// Implementation should decide how to connect and maintain the webRTCConn.
|
|
Collect() (*WebRTCPeer, error)
|
|
|
|
// Remove and return the most available Snowflake from the collection.
|
|
Pop() *WebRTCPeer
|
|
|
|
// Signal when the collector has stopped collecting.
|
|
Melted() <-chan struct{}
|
|
}
|