Commit 28cf5f5
committed
Pass the
When `setup_outbound` was used to setup a connection proxied over Tor,
it previously set the remote address of the peer to the address of the
Tor proxy.
This address of the Tor proxy was assigned to the
`PeerDetails::socket_address` for that peer in
`PeerManager::list_peers`, and if it was not a private IPV4 or IPV6
address, it was also reported to the peer in our init message.
This commit refactors `tor_connect_outbound` to pass its own peer
address parameter directly to the connection setup code.
This peer address will now appear in `PeerManager::list_peers` for
outbound Tor connections made using `tor_connect_outbound`, and will be
reported to the peer in our init message if it is not a private IPV4 or
IPV6 address.addr field of tor_connect_outbound to connection setup1 parent 8679d8d commit 28cf5f5
1 file changed
+21
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
387 | 397 | | |
388 | 398 | | |
389 | 399 | | |
| |||
478 | 488 | | |
479 | 489 | | |
480 | 490 | | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
481 | 495 | | |
482 | 496 | | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
483 | 500 | | |
484 | 501 | | |
485 | 502 | | |
| |||
488 | 505 | | |
489 | 506 | | |
490 | 507 | | |
491 | | - | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
492 | 511 | | |
493 | 512 | | |
494 | 513 | | |
495 | 514 | | |
496 | | - | |
| 515 | + | |
497 | 516 | | |
498 | 517 | | |
499 | 518 | | |
| |||
0 commit comments