Commit graph

16 commits

Author SHA1 Message Date
WofWca
f3e040bbd8
improvement: less scary failed conn logs & metrics
...and adjust the `totalFailedConnections` metric name
and description.

This commit should make the periodic stats log messages
and the relevant metric look less scary to users:
P2P connection failures are relatively frequent and are usually
not indicative of the proxy operator having done something wrong.
So let's tone the wording down.

See the discussion: https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/516#note_3173677.
2025-03-15 11:15:22 -04:00
WofWca
583178f4f2
feat(proxy): add failed connection count stats
For the summary log and for Prometheus metrics.

Log output example:

> In the last 1h0m0s, there were 7 completed successful connections. 2 connections failed. Traffic Relayed ↓ 321 KB (0.10 KB/s), ↑ 123 KB (0.05 KB/s).
2025-03-11 13:12:44 +00:00
meskio
e345c3bac9
proxy: add country to prometheus metrics 2025-02-13 12:44:23 +01:00
Renovate Bot
290be512e3 chore(deps): update module github.com/pion/webrtc/v3 to v4 2024-11-11 18:45:36 +00:00
Cecylia Bocovich
aaf8826560
Add proxy event for when client has connected
This enables the usage of callbacks that will be called when a client
has opened a data channel connection to the proxy.
2024-11-06 10:31:33 -05:00
Waldemar Zimpel
93f5d1ef7f Log average transfer rate
Adds the average transfer rate for the summary interval to the summary log lines
2024-10-23 03:25:26 +02:00
meskio
a9df5dd71a
Use ptutil for safelog and prometheus rounded metrics
* Related: #40354
2024-05-09 16:24:33 +02:00
Cecylia Bocovich
caa2b36463
Process and properly log connection closure stats 2023-10-31 10:02:31 -04:00
Cecylia Bocovich
5c5eb2c339
Modify EventOnProxyStats to include summary data 2023-10-30 12:42:45 -04:00
Cecylia Bocovich
354cb65432
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.
2023-10-30 12:42:45 -04:00
meskio
82cc0f38f7
Move the development to gitlab
Related: tpo/anti-censorship/team#86
2023-05-31 10:01:47 +02:00
luciole
2c599f8827
change bandwidth type from int to int64 to prevent overflow 2022-11-21 10:33:21 -05:00
itchyonion
768b80dbdf
Use event logger for proxy starting message and NAT info 2022-11-16 10:08:10 -08:00
meskio
1d592b06e5
Implement String() method on events
To make it safe for logging safelog.Scrub function is now public.

Closes: #40141
2022-05-25 18:09:06 +02:00
Shelikhoo
d64af31394
Add EventOnProxyConnectionOver Event 2022-01-25 13:03:18 +00:00
Shelikhoo
75f770150d
Add Snowflake Event API interface 2022-01-25 12:49:51 +00:00