Skip to content

Commit

Permalink
Merge pull request #511 from Poorunga/main
Browse files Browse the repository at this point in the history
Peer ID that distinguishes agent and gateway
  • Loading branch information
Poorunga authored Oct 26, 2023
2 parents 94ef20d + 89bd940 commit 62c7f6f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/tunnel/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ func newEdgeTunnel(c *v1alpha1.EdgeTunnelConfig) (*EdgeTunnel, error) {
opts := make([]libp2p.Option, 0) // libp2p options
peerSource := make(chan peer.AddrInfo, c.MaxCandidates)

privKey, err := GenerateKeyPairWithString(c.NodeName)
hostName := c.NodeName
if c.Mode == defaults.ClientMode {
hostName += "-gateway"
}
privKey, err := GenerateKeyPairWithString(hostName)
if err != nil {
return nil, fmt.Errorf("failed to generate private key: %w", err)
}
Expand Down

0 comments on commit 62c7f6f

Please sign in to comment.