Commit 427b76a
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 427b76a
1 file changed
+23
-3
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 | | |
| |||
469 | 479 | | |
470 | 480 | | |
471 | 481 | | |
472 | | - | |
| 482 | + | |
| 483 | + | |
473 | 484 | | |
474 | 485 | | |
475 | 486 | | |
| |||
478 | 489 | | |
479 | 490 | | |
480 | 491 | | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
481 | 496 | | |
482 | 497 | | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
483 | 501 | | |
484 | 502 | | |
485 | 503 | | |
| |||
488 | 506 | | |
489 | 507 | | |
490 | 508 | | |
491 | | - | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
492 | 512 | | |
493 | 513 | | |
494 | 514 | | |
495 | 515 | | |
496 | | - | |
| 516 | + | |
497 | 517 | | |
498 | 518 | | |
499 | 519 | | |
| |||
0 commit comments