mirror of
https://github.com/monero-project/monero.git
synced 2026-01-11 12:35:42 -08:00
Add IPv6 support
new cli options (RPC ones also apply to wallet):
--p2p-bind-ipv6-address (default = "::")
--p2p-bind-port-ipv6 (default same as ipv4 port for given nettype)
--rpc-bind-ipv6-address (default = "::1")
--p2p-use-ipv6 (default false)
--rpc-use-ipv6 (default false)
--p2p-require-ipv4 (default true, if ipv4 bind fails and this is
true, will not continue even if ipv6 bind
successful)
--rpc-require-ipv4 (default true, description as above)
ipv6 addresses are to be specified as "[xx:xx:xx::xx:xx]:port" except
in the cases of the cli args for bind address. For those the square
braces can be omitted.
This commit is contained in:
@@ -68,7 +68,7 @@ namespace {
|
||||
std::string id_str;
|
||||
std::string port_str;
|
||||
std::string elapsed = peer.last_seen == 0 ? "never" : epee::misc_utils::get_time_interval_string(now - last_seen);
|
||||
std::string ip_str = epee::string_tools::get_ip_string_from_int32(peer.ip);
|
||||
std::string ip_str = peer.ip != 0 ? epee::string_tools::get_ip_string_from_int32(peer.ip) : std::string("[") + peer.host + "]";
|
||||
std::stringstream peer_id_str;
|
||||
peer_id_str << std::hex << std::setw(16) << peer.id;
|
||||
peer_id_str >> id_str;
|
||||
|
||||
Reference in New Issue
Block a user