diff options
Diffstat (limited to 'src/main_gui.cpp')
| -rw-r--r-- | src/main_gui.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp index bef8503..239fb60 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | // Bitflash entry point -- starts node threads then runs GUI (or headless). | 1 | // Bitflash entry point -- starts node threads then runs GUI (or headless). |
| 2 | 2 | ||
| 3 | #include "headers_core.h" | 3 | #include "headers_core.h" |
| 4 | #include "nostr.h" | ||
| 4 | #include "proxy.h" | 5 | #include "proxy.h" |
| 5 | #include "selftest.h" | 6 | #include "selftest.h" |
| 6 | #include "walletcmd.h" | 7 | #include "walletcmd.h" |
| @@ -134,10 +135,11 @@ static void PrintUsage() | |||
| 134 | printf(" /connectbtf=PEER_BTF_ADDRESS\n"); | 135 | printf(" /connectbtf=PEER_BTF_ADDRESS\n"); |
| 135 | printf(" /rvrelay=HOST:PORT\n"); | 136 | printf(" /rvrelay=HOST:PORT\n"); |
| 136 | printf(" /announcerelay=HOST:PORT\n"); | 137 | printf(" /announcerelay=HOST:PORT\n"); |
| 138 | printf(" /onionservice=HOST.onion:PORT (advertise this node's Tor hidden service)\n"); | ||
| 137 | printf("\n"); | 139 | printf("\n"); |
| 138 | printf("Network:\n"); | 140 | printf("Network:\n"); |
| 139 | printf(" /port=N (P2P listen port, default 8433)\n"); | 141 | printf(" /port=N (P2P listen port, default 8433)\n"); |
| 140 | printf(" /socks=HOST:PORT (SOCKS5 proxy for outbound Nostr and .btf relay dials)\n"); | 142 | printf(" /socks=HOST:PORT (SOCKS5 proxy for Nostr, .btf relay, and onion dials)\n"); |
| 141 | printf(" /tor[=HOST:PORT] (Tor mode; default SOCKS5 proxy is 127.0.0.1:9050)\n"); | 143 | printf(" /tor[=HOST:PORT] (Tor mode; default SOCKS5 proxy is 127.0.0.1:9050)\n"); |
| 142 | printf(" /btfseed=ADDRESS:ENCHEX (extra bootstrap peer, repeatable)\n"); | 144 | printf(" /btfseed=ADDRESS:ENCHEX (extra bootstrap peer, repeatable)\n"); |
| 143 | printf("\n"); | 145 | printf("\n"); |
| @@ -286,6 +288,17 @@ static void ParseStartupArguments(int argc, char* argv[]) | |||
| 286 | if (!announceRelay.empty()) | 288 | if (!announceRelay.empty()) |
| 287 | strBtfAnnounceRelay = announceRelay; | 289 | strBtfAnnounceRelay = announceRelay; |
| 288 | 290 | ||
| 291 | string onionService = argval2(argc, argv, "/onionservice", "-onionservice"); | ||
| 292 | if (!onionService.empty()) | ||
| 293 | { | ||
| 294 | string err; | ||
| 295 | if (!BtfSetLocalOnionEndpoint(onionService, err)) | ||
| 296 | fprintf(stderr, "Ignoring /onionservice=%s: %s\n", onionService.c_str(), err.c_str()); | ||
| 297 | else | ||
| 298 | fprintf(stderr, "Direct onion peer endpoint advertised: %s\n", | ||
| 299 | BtfLocalOnionEndpoint().c_str()); | ||
| 300 | } | ||
| 301 | |||
| 289 | bool fTorMode = arg(argc, argv, "/tor") || arg(argc, argv, "-tor"); | 302 | bool fTorMode = arg(argc, argv, "/tor") || arg(argc, argv, "-tor"); |
| 290 | if (fTorMode) | 303 | if (fTorMode) |
| 291 | { | 304 | { |