mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Add snowflake event handler to client config
This commit is contained in:
parent
b5ef18803f
commit
cd6d837d85
1 changed files with 4 additions and 0 deletions
|
@ -35,6 +35,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"git.torproject.org/pluggable-transports/snowflake.git/v2/common/event"
|
||||||
"git.torproject.org/pluggable-transports/snowflake.git/v2/common/nat"
|
"git.torproject.org/pluggable-transports/snowflake.git/v2/common/nat"
|
||||||
"git.torproject.org/pluggable-transports/snowflake.git/v2/common/turbotunnel"
|
"git.torproject.org/pluggable-transports/snowflake.git/v2/common/turbotunnel"
|
||||||
"github.com/pion/webrtc/v3"
|
"github.com/pion/webrtc/v3"
|
||||||
|
@ -92,6 +93,9 @@ type ClientConfig struct {
|
||||||
// Max is the maximum number of snowflake proxy peers that the client should attempt to
|
// Max is the maximum number of snowflake proxy peers that the client should attempt to
|
||||||
// connect to. Defaults to 1.
|
// connect to. Defaults to 1.
|
||||||
Max int
|
Max int
|
||||||
|
// EventDispatcher is the event bus for snowflake events.
|
||||||
|
// When an important event happens, it will be distributed here.
|
||||||
|
EventDispatcher event.SnowflakeEventDispatcher
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewSnowflakeClient creates a new Snowflake transport client that can spawn multiple
|
// NewSnowflakeClient creates a new Snowflake transport client that can spawn multiple
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue