mirror of
https://github.com/fosrl/gerbil.git
synced 2026-02-08 05:56:40 +00:00
Send public key
This commit is contained in:
@@ -27,6 +27,7 @@ type HolePunchMessage struct {
|
|||||||
OlmID string `json:"olmId"`
|
OlmID string `json:"olmId"`
|
||||||
NewtID string `json:"newtId"`
|
NewtID string `json:"newtId"`
|
||||||
Token string `json:"token"`
|
Token string `json:"token"`
|
||||||
|
PublicKey string `json:"publicKey"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ClientEndpoint struct {
|
type ClientEndpoint struct {
|
||||||
@@ -37,7 +38,8 @@ type ClientEndpoint struct {
|
|||||||
Port int `json:"port"`
|
Port int `json:"port"`
|
||||||
Timestamp int64 `json:"timestamp"`
|
Timestamp int64 `json:"timestamp"`
|
||||||
ReachableAt string `json:"reachableAt"`
|
ReachableAt string `json:"reachableAt"`
|
||||||
PublicKey string `json:"publicKey"`
|
ExitNodePublicKey string `json:"exitNodePublicKey"`
|
||||||
|
ClientPublicKey string `json:"publicKey"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Updated to support multiple destination peers
|
// Updated to support multiple destination peers
|
||||||
@@ -243,7 +245,8 @@ func (s *UDPProxyServer) packetWorker() {
|
|||||||
Port: packet.remoteAddr.Port,
|
Port: packet.remoteAddr.Port,
|
||||||
Timestamp: time.Now().Unix(),
|
Timestamp: time.Now().Unix(),
|
||||||
ReachableAt: s.ReachableAt,
|
ReachableAt: s.ReachableAt,
|
||||||
PublicKey: s.privateKey.PublicKey().String(),
|
ExitNodePublicKey: s.privateKey.PublicKey().String(),
|
||||||
|
ClientPublicKey: msg.PublicKey,
|
||||||
}
|
}
|
||||||
logger.Debug("Created endpoint from packet remoteAddr %s: IP=%s, Port=%d", packet.remoteAddr.String(), endpoint.IP, endpoint.Port)
|
logger.Debug("Created endpoint from packet remoteAddr %s: IP=%s, Port=%d", packet.remoteAddr.String(), endpoint.IP, endpoint.Port)
|
||||||
s.notifyServer(endpoint)
|
s.notifyServer(endpoint)
|
||||||
|
|||||||
Reference in New Issue
Block a user