mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Move creation of periodic stats task inside proxy library
This adds a new type of SnowflakeEvent. EventOnProxyStats is triggered by the periodic task run at SummaryInterval and produces an event with a proxy stats output string.
This commit is contained in:
parent
83a7422fe6
commit
354cb65432
4 changed files with 54 additions and 19 deletions
|
@ -76,6 +76,15 @@ func (e EventOnProxyConnectionOver) String() string {
|
|||
return fmt.Sprintf("Proxy connection closed (↑ %d, ↓ %d)", e.InboundTraffic, e.OutboundTraffic)
|
||||
}
|
||||
|
||||
type EventOnProxyStats struct {
|
||||
SnowflakeEvent
|
||||
StatString string
|
||||
}
|
||||
|
||||
func (e EventOnProxyStats) String() string {
|
||||
return e.StatString
|
||||
}
|
||||
|
||||
type EventOnCurrentNATTypeDetermined struct {
|
||||
SnowflakeEvent
|
||||
CurNATType string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue