aboutsummaryrefslogtreecommitdiff
path: root/broker
diff options
context:
space:
mode:
authorArlo Breault <arlolra@gmail.com>2022-03-08 16:27:52 -0500
committerArlo Breault <arlolra@gmail.com>2022-03-21 15:06:05 -0400
commitb563141c6abba128386bc1ad18122d5e13e09789 (patch)
tree4f662a0a176aa933b8bc41b8d6590ecead6236b7 /broker
parent281d917bebe19642914ec94d7d5ef911f03c8f57 (diff)
downloadsnowflake-b563141c6abba128386bc1ad18122d5e13e09789.tar.gz
snowflake-b563141c6abba128386bc1ad18122d5e13e09789.zip
Forward bridge fingerprint
gitlab 28651
Diffstat (limited to 'broker')
-rw-r--r--broker/broker.go7
-rw-r--r--broker/ipc.go5
2 files changed, 7 insertions, 5 deletions
diff --git a/broker/broker.go b/broker/broker.go
index 7a29265..6e85fbd 100644
--- a/broker/broker.go
+++ b/broker/broker.go
@@ -139,10 +139,11 @@ func (ctx *BrokerContext) AddSnowflake(id string, proxyType string, natType stri
return snowflake
}
-// Client offer contains an SDP and the NAT type of the client
+// Client offer contains an SDP, bridge fingerprint and the NAT type of the client
type ClientOffer struct {
- natType string
- sdp []byte
+ natType string
+ sdp []byte
+ fingerprint string
}
func main() {
diff --git a/broker/ipc.go b/broker/ipc.go
index 5cc595b..2ef4ccd 100644
--- a/broker/ipc.go
+++ b/broker/ipc.go
@@ -130,8 +130,9 @@ func (i *IPC) ClientOffers(arg messages.Arg, response *[]byte) error {
}
offer := &ClientOffer{
- natType: req.NAT,
- sdp: []byte(req.Offer),
+ natType: req.NAT,
+ sdp: []byte(req.Offer),
+ fingerprint: req.Fingerprint,
}
// Only hand out known restricted snowflakes to unrestricted clients