[tor-commits] [pluggable-transports/snowflake] 01/31: Add Bridge List Definition

gitolite role git at cupani.torproject.org
Thu Jun 16 17:03:48 UTC 2022


This is an automated email from the git hooks/post-receive script.

shelikhoo pushed a commit to branch main
in repository pluggable-transports/snowflake.

commit 3d4f294241c662872ec75a5adcf8928faec60e5e
Author: Shelikhoo <xiaokangwang at outlook.com>
AuthorDate: Mon Mar 28 17:17:10 2022 +0100

    Add Bridge List Definition
---
 broker/bridge-list.go | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/broker/bridge-list.go b/broker/bridge-list.go
new file mode 100644
index 0000000..3913a2e
--- /dev/null
+++ b/broker/bridge-list.go
@@ -0,0 +1,18 @@
+package main
+
+import "sync"
+
+type bridgeListHolder struct {
+	bridgeInfo       map[[20]byte]BridgeInfo
+	accessBridgeInfo sync.RWMutex
+}
+
+type BridgeListHolder interface {
+	GetBridgeInfo(fingerprint [20]byte) (BridgeInfo, error)
+}
+
+type BridgeInfo struct {
+	DisplayName      string `json:"displayName"`
+	WebSocketAddress string `json:"webSocketAddress"`
+	Fingerprint      string `json:"fingerprint"`
+}

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tor-commits mailing list