mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
bindaddr (-x) option added
https://github.com/moneroexamples/onion-monero-blockchain-explorer/issues/128
This commit is contained in:
parent
3bf79c0a8e
commit
9905e916e4
2 changed files with 7 additions and 2 deletions
7
main.cpp
7
main.cpp
|
@ -44,6 +44,7 @@ main(int ac, const char* av[])
|
|||
}
|
||||
|
||||
auto port_opt = opts.get_option<string>("port");
|
||||
auto bindaddr_opt = opts.get_option<string>("bindaddr");
|
||||
auto bc_path_opt = opts.get_option<string>("bc-path");
|
||||
auto deamon_url_opt = opts.get_option<string>("deamon-url");
|
||||
auto ssl_crt_file_opt = opts.get_option<string>("ssl-crt-file");
|
||||
|
@ -103,6 +104,8 @@ main(int ac, const char* av[])
|
|||
//cast port number in string to uint
|
||||
uint16_t app_port = boost::lexical_cast<uint16_t>(*port_opt);
|
||||
|
||||
string bindaddr = *bindaddr_opt;
|
||||
|
||||
// cast no_blocks_on_index_opt to uint
|
||||
uint64_t no_blocks_on_index = boost::lexical_cast<uint64_t>(*no_blocks_on_index_opt);
|
||||
|
||||
|
@ -766,13 +769,13 @@ main(int ac, const char* av[])
|
|||
if (use_ssl)
|
||||
{
|
||||
cout << "Staring in ssl mode" << endl;
|
||||
app.port(app_port).ssl_file(ssl_crt_file, ssl_key_file)
|
||||
app.bindaddr(bindaddr).port(app_port).ssl_file(ssl_crt_file, ssl_key_file)
|
||||
.multithreaded().run();
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "Staring in non-ssl mode" << endl;
|
||||
app.port(app_port).multithreaded().run();
|
||||
app.bindaddr(bindaddr).port(app_port).multithreaded().run();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -51,6 +51,8 @@ namespace xmreg
|
|||
"enable Monero total emission monitoring thread")
|
||||
("port,p", value<string>()->default_value("8081"),
|
||||
"default explorer port")
|
||||
("bindaddr,x", value<string>()->default_value("0.0.0.0"),
|
||||
"default bind address for the explorer")
|
||||
("testnet-url", value<string>()->default_value(""),
|
||||
"you can specify testnet url, if you run it on mainnet or stagenet. link will show on front page to testnet explorer")
|
||||
("stagenet-url", value<string>()->default_value(""),
|
||||
|
|
Loading…
Reference in a new issue