[tor-commits] [snowflake/main] Enable PT Event Logger
shelikhoo at torproject.org
shelikhoo at torproject.org
Tue Jan 25 12:50:37 UTC 2022
commit 128936c82514f4c5511e3861a220e57b11a90cc6
Author: Shelikhoo <xiaokangwang at outlook.com>
Date: Mon Dec 13 15:45:04 2021 +0000
Enable PT Event Logger
---
client/snowflake.go | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/client/snowflake.go b/client/snowflake.go
index d76efbf..0ab71a7 100644
--- a/client/snowflake.go
+++ b/client/snowflake.go
@@ -17,6 +17,7 @@ import (
pt "git.torproject.org/pluggable-transports/goptlib.git"
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"
)
@@ -170,6 +171,10 @@ func main() {
iceAddresses := strings.Split(strings.TrimSpace(*iceServersCommas), ",")
+ eventLogger := event.NewSnowflakeEventDispatcher()
+
+ eventLogger.AddSnowflakeEventListener(sf.NewPTEventLogger())
+
config := sf.ClientConfig{
BrokerURL: *brokerURL,
AmpCacheURL: *ampCacheURL,
@@ -177,6 +182,7 @@ func main() {
ICEAddresses: iceAddresses,
KeepLocalAddresses: *keepLocalAddresses || *oldKeepLocalAddresses,
Max: *max,
+ EventDispatcher: eventLogger,
}
// Begin goptlib client process.
More information about the tor-commits
mailing list