aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorShelikhoo <xiaokangwang@outlook.com>2022-05-18 16:49:19 +0100
committerShelikhoo <xiaokangwang@outlook.com>2022-06-16 14:06:58 +0100
commite5b799d618fc9a1669626c6ca1a6e759192640b2 (patch)
tree7c2b2405555fdfe1983c889981a00920fb3249a9 /doc
parent0ae4d821f0c8440a3d1d9771f16912ef897754be (diff)
downloadsnowflake-e5b799d618fc9a1669626c6ca1a6e759192640b2.tar.gz
snowflake-e5b799d618fc9a1669626c6ca1a6e759192640b2.zip
Update documents for broker messages
Diffstat (limited to 'doc')
-rw-r--r--doc/broker-spec.txt28
1 files changed, 24 insertions, 4 deletions
diff --git a/doc/broker-spec.txt b/doc/broker-spec.txt
index f25be79..b138605 100644
--- a/doc/broker-spec.txt
+++ b/doc/broker-spec.txt
@@ -100,6 +100,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 an unknown NAT type.
+ "snowflake-proxy-poll-with-relay-url-count" NUM NL
+ [At most once.]
+
+ A count of snowflake proxy polls with relay url extension present.
+ This means this proxy understands relay url, and is sending its
+ allowed prefix.
+ "snowflake-proxy-poll-without-relay-url-count" NUM NL
+ [At most once.]
+
+ A count of snowflake proxy polls with relay url extension absent.
+ This means this proxy is not yet updated.
+ "snowflake-proxy-rejected-for-relay-url-count" NUM NL
+ [At most once.]
+
+ A count of snowflake proxy polls with relay url extension rejected
+ based on broker's relay url extension policy.
+ This means an incompatible allowed relay pattern is included in the
+ proxy poll message.
2. Broker messaging specification and endpoints
The broker facilitates the connection of snowflake clients and snowflake proxies
@@ -177,10 +195,11 @@ POST /proxy HTTP
{
Sid: [generated session id of proxy],
- Version: 1.1,
+ Version: 1.3,
Type: ["badge"|"webext"|"standalone"|"mobile"],
NAT: ["unknown"|"restricted"|"unrestricted"],
- Clients: [number of current clients, rounded down to multiples of 8]
+ Clients: [number of current clients, rounded down to multiples of 8],
+ AcceptedRelayPattern: [a pattern representing accepted set of relay domains]
}
```
@@ -195,7 +214,8 @@ HTTP 200 OK
{
type: offer,
sdp: [WebRTC SDP]
- }
+ },
+ RelayURL: [the WebSocket URL proxy should connect to relay Snowflake traffic]
}
```
@@ -220,7 +240,7 @@ POST /answer HTTP
{
Sid: [generated session id of proxy],
- Version: 1.1,
+ Version: 1.3,
Answer:
{
type: answer,