diff --git a/common/event/interface.go b/common/event/interface.go index 38dd6d7..f7001ba 100644 --- a/common/event/interface.go +++ b/common/event/interface.go @@ -67,6 +67,14 @@ func (e EventOnProxyStarting) String() string { return "Proxy starting" } +type EventOnProxyClientConnected struct { + SnowflakeEvent +} + +func (e EventOnProxyClientConnected) String() string { + return fmt.Sprintf("client connected") +} + type EventOnProxyConnectionOver struct { SnowflakeEvent InboundTraffic int64 diff --git a/proxy/lib/snowflake.go b/proxy/lib/snowflake.go index 9041f60..442e013 100644 --- a/proxy/lib/snowflake.go +++ b/proxy/lib/snowflake.go @@ -449,6 +449,7 @@ func (sf *SnowflakeProxy) makePeerConnectionFromOffer( dc.OnOpen(func() { log.Printf("Data Channel %s-%d open\n", dc.Label(), dc.ID()) + sf.EventDispatcher.OnNewSnowflakeEvent(event.EventOnProxyClientConnected{}) if sf.OutboundAddress != "" { selectedCandidatePair, err := pc.SCTP().Transport().ICETransport().GetSelectedCandidatePair()