mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Enable PT Event Logger
This commit is contained in:
parent
ac64d17705
commit
128936c825
1 changed files with 6 additions and 0 deletions
|
@ -17,6 +17,7 @@ import (
|
||||||
|
|
||||||
pt "git.torproject.org/pluggable-transports/goptlib.git"
|
pt "git.torproject.org/pluggable-transports/goptlib.git"
|
||||||
sf "git.torproject.org/pluggable-transports/snowflake.git/v2/client/lib"
|
sf "git.torproject.org/pluggable-transports/snowflake.git/v2/client/lib"
|
||||||
|
"git.torproject.org/pluggable-transports/snowflake.git/v2/common/event"
|
||||||
"git.torproject.org/pluggable-transports/snowflake.git/v2/common/safelog"
|
"git.torproject.org/pluggable-transports/snowflake.git/v2/common/safelog"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -170,6 +171,10 @@ func main() {
|
||||||
|
|
||||||
iceAddresses := strings.Split(strings.TrimSpace(*iceServersCommas), ",")
|
iceAddresses := strings.Split(strings.TrimSpace(*iceServersCommas), ",")
|
||||||
|
|
||||||
|
eventLogger := event.NewSnowflakeEventDispatcher()
|
||||||
|
|
||||||
|
eventLogger.AddSnowflakeEventListener(sf.NewPTEventLogger())
|
||||||
|
|
||||||
config := sf.ClientConfig{
|
config := sf.ClientConfig{
|
||||||
BrokerURL: *brokerURL,
|
BrokerURL: *brokerURL,
|
||||||
AmpCacheURL: *ampCacheURL,
|
AmpCacheURL: *ampCacheURL,
|
||||||
|
@ -177,6 +182,7 @@ func main() {
|
||||||
ICEAddresses: iceAddresses,
|
ICEAddresses: iceAddresses,
|
||||||
KeepLocalAddresses: *keepLocalAddresses || *oldKeepLocalAddresses,
|
KeepLocalAddresses: *keepLocalAddresses || *oldKeepLocalAddresses,
|
||||||
Max: *max,
|
Max: *max,
|
||||||
|
EventDispatcher: eventLogger,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Begin goptlib client process.
|
// Begin goptlib client process.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue