foxssake / noray

Simple connection orchestrator and relay
MIT License
14 stars 4 forks source link

Fix duplicate relay creation #42

Closed elementbound closed 1 year ago

elementbound commented 1 year ago

Background

During the connect-relay command, noray ensures both parties have a relay. In case they do, the relay is used as-is, otherwise ( e.g. never had a relay, or the one they had has expired ), a new one is created.

However, noray fails to recognize if a relay already exists for the given party, so it always creates a new one. This results in duplicate relays that also don't work - they are proxied, but traffic doesn't get through to the host ( possibly because of missing NAT entries ).

Done criteria