Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Snowflake WebExtension
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Anti-censorship
Pluggable Transports
Snowflake WebExtension
Commits
94de69aa
Commit
94de69aa
authored
5 years ago
by
Cecylia Bocovich
Browse files
Options
Downloads
Patches
Plain Diff
Updated broker specification and comments
parent
97554e03
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
broker/metrics.go
+2
-57
2 additions, 57 deletions
broker/metrics.go
common/messages/proxy.go
+2
-2
2 additions, 2 deletions
common/messages/proxy.go
doc/broker-spec.txt
+18
-0
18 additions, 0 deletions
doc/broker-spec.txt
with
22 additions
and
59 deletions
broker/metrics.go
+
2
−
57
View file @
94de69aa
/*
We export metrics in the following format:
"snowflake-stats-end" YYYY-MM-DD HH:MM:SS (NSEC s) NL
[At most once.]
YYYY-MM-DD HH:MM:SS defines the end of the included measurement
interval of length NSEC seconds (86400 seconds by default).
"snowflake-ips" CC=NUM,CC=NUM,... NL
[At most once.]
List of mappings from two-letter country codes to the number of
unique IP addresses of snowflake proxies that have polled.
"snowflake-ips-total" NUM NL
[At most once.]
A count of the total number of unique IP addresses of snowflake
proxies that have polled.
"snowflake-ips-standalone" NUM NL
[At most once.]
A count of the total number of unique IP addresses of snowflake
proxies of type "standalone" that have polled.
"snowflake-ips-badge" NUM NL
[At most once.]
A count of the total number of unique IP addresses of snowflake
proxies of type "badge" that have polled.
"snowflake-ips-webext" NUM NL
[At most once.]
A count of the total number of unique IP addresses of snowflake
proxies of type "webext" that have polled.
"snowflake-idle-count" NUM NL
[At most once.]
A count of the number of times a proxy has polled but received
no client offer, rounded up to the nearest multiple of 8.
"client-denied-count" NUM NL
[At most once.]
A count of the number of times a client has requested a proxy
from the broker but no proxies were available, rounded up to
the nearest multiple of 8.
"client-snowflake-match-count" NUM NL
[At most once.]
A count of the number of times a client successfully received a
proxy from the broker, rounded up to the nearest multiple of 8.
We export metrics in the format specified in our broker spec:
https://gitweb.torproject.org/pluggable-transports/snowflake.git/tree/doc/broker-spec.txt
*/
package
main
import
(
// "golang.org/x/net/internal/timeseries"
"fmt"
"log"
"math"
...
...
This diff is collapsed.
Click to expand it.
common/messages/proxy.go
+
2
−
2
View file @
94de69aa
...
...
@@ -17,7 +17,7 @@ const version = "1.1"
{
Sid: [generated session id of proxy],
Version: 1.1,
Type: [badge
|
webext
|
standalone]
Type: [
"
badge
"|"
webext
"|"
standalone
"
]
}
== ProxyPollResponse ==
...
...
@@ -87,7 +87,7 @@ func EncodePollRequest(sid string, proxyType string) ([]byte, error) {
}
// Decodes a poll message from a snowflake proxy and returns the
// sid of the proxy on success and an error if it failed
// sid
and proxy type
of the proxy on success and an error if it failed
func
DecodePollRequest
(
data
[]
byte
)
(
string
,
string
,
error
)
{
var
message
ProxyPollRequest
...
...
This diff is collapsed.
Click to expand it.
doc/broker-spec.txt
+
18
−
0
View file @
94de69aa
...
...
@@ -31,6 +31,24 @@ Metrics data from the Snowflake broker can be retrieved by sending an HTTP GET r
A count of the total number of unique IP addresses of Snowflake
proxies that have polled.
"snowflake-ips-standalone" NUM NL
[At most once.]
A count of the total number of unique IP addresses of snowflake
proxies of type "standalone" that have polled.
"snowflake-ips-badge" NUM NL
[At most once.]
A count of the total number of unique IP addresses of snowflake
proxies of type "badge" that have polled.
"snowflake-ips-webext" NUM NL
[At most once.]
A count of the total number of unique IP addresses of snowflake
proxies of type "webext" that have polled.
"snowflake-idle-count" NUM NL
[At most once.]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment