• Steven Allen's avatar
    fix: simplify address replacement · aa794f72
    Steven Allen authored
    We only ever want to dial the remote peer's observed address (to prevent
    DoS attacks), so we might as well _always_ replace the reported
    addresses with the observed address.
    
    This also fixes a few issues in the original PR:
    
    * Simpler logic.
    * Replaces the IP address, not the port. That's what we actually care about.
    * Won't accidentally dial "skipped" protocols (e.g., circuit transport).
    aa794f72
svc_test.go 4.81 KB