mirror of
https://github.com/PurpleI2P/i2pd-tools.git
synced 2025-05-01 13:12:30 +02:00
clean code
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
parent
07c5391b92
commit
5f45990dff
11 changed files with 567 additions and 574 deletions
|
@ -18,7 +18,7 @@ static std::string address_style_string(Addr addr)
|
|||
return "SSU";
|
||||
}
|
||||
return "???";
|
||||
|
||||
|
||||
}
|
||||
|
||||
template<typename Addr>
|
||||
|
@ -73,7 +73,7 @@ int main(int argc, char * argv[])
|
|||
optind ++;
|
||||
std::string fname(argv[idx]);
|
||||
i2p::data::RouterInfo ri(fname);
|
||||
|
||||
|
||||
std::vector<std::shared_ptr<const i2p::data::RouterInfo::Address> > addrs;
|
||||
auto a = ri.GetNTCP2Address(!ipv6);
|
||||
if(a)
|
||||
|
@ -87,20 +87,20 @@ int main(int argc, char * argv[])
|
|||
else
|
||||
std::cout << "Router Hash: ";
|
||||
std::cout << ri.GetIdentHashBase64() << std::endl;
|
||||
|
||||
|
||||
for (const auto & a : addrs) {
|
||||
|
||||
|
||||
if(firewall) {
|
||||
write_firewall_entry(std::cout, a);
|
||||
} else {
|
||||
std::cout << address_style_string(a) << ": " << a->host;
|
||||
|
||||
|
||||
if (port)
|
||||
std::cout << ":" << a->port;
|
||||
}
|
||||
std::cout << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue