mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-09-20 21:04:50 -04:00
commit
1bac4601bb
2 changed files with 5 additions and 8 deletions
|
@ -306,7 +306,7 @@ int RsInit::InitRetroShare(const RsConfigOptions& conf)
|
||||||
if( rsInitConfig->outStderr) rsInitConfig->haveLogFile = false ;
|
if( rsInitConfig->outStderr) rsInitConfig->haveLogFile = false ;
|
||||||
if(!rsInitConfig->logfname.empty()) rsInitConfig->haveLogFile = true;
|
if(!rsInitConfig->logfname.empty()) rsInitConfig->haveLogFile = true;
|
||||||
if( rsInitConfig->inet != "127.0.0.1") rsInitConfig->forceLocalAddr = true;
|
if( rsInitConfig->inet != "127.0.0.1") rsInitConfig->forceLocalAddr = true;
|
||||||
if( rsInitConfig->port != 0) rsInitConfig->forceExtPort = true;
|
if( rsInitConfig->port != 0) rsInitConfig->forceLocalAddr = true; // previously forceExtPort, which means nothing in this case
|
||||||
#ifdef LOCALNET_TESTING
|
#ifdef LOCALNET_TESTING
|
||||||
if(!portRestrictions.empty()) doPortRestrictions = true;
|
if(!portRestrictions.empty()) doPortRestrictions = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -99,7 +99,7 @@ int main(int argc, char* argv[])
|
||||||
RsInfo() << "\n" <<
|
RsInfo() << "\n" <<
|
||||||
"+================================================================+\n"
|
"+================================================================+\n"
|
||||||
"| o---o o |\n"
|
"| o---o o |\n"
|
||||||
"| \\ / - Retroshare Service - / \\ |\n"
|
"| \\ / - Retroshare Service - / \\ |\n"
|
||||||
"| o o---o |\n"
|
"| o o---o |\n"
|
||||||
"+================================================================+"
|
"+================================================================+"
|
||||||
<< std::endl << std::endl;
|
<< std::endl << std::endl;
|
||||||
|
@ -158,8 +158,7 @@ int main(int argc, char* argv[])
|
||||||
"127.0.0.1.", false );
|
"127.0.0.1.", false );
|
||||||
#endif // def RS_JSONAPI
|
#endif // def RS_JSONAPI
|
||||||
|
|
||||||
#if defined(RS_JSONAPI) && defined(RS_WEBUI) \
|
#if (defined(RS_JSONAPI) || defined(RS_WEBUI)) && defined(RS_SERVICE_TERMINAL_WEBUI_PASSWORD)
|
||||||
&& defined(RS_SERVICE_TERMINAL_WEBUI_PASSWORD)
|
|
||||||
bool askWebUiPassword = false;
|
bool askWebUiPassword = false;
|
||||||
as >> option( 'W', "webui-password", askWebUiPassword,
|
as >> option( 'W', "webui-password", askWebUiPassword,
|
||||||
"Ask WebUI password on the console." );
|
"Ask WebUI password on the console." );
|
||||||
|
@ -180,8 +179,7 @@ int main(int argc, char* argv[])
|
||||||
as >> help( 'h', "help", "Display this Help" );
|
as >> help( 'h', "help", "Display this Help" );
|
||||||
as.defaultErrorHandling(true, true);
|
as.defaultErrorHandling(true, true);
|
||||||
|
|
||||||
#if defined(RS_JSONAPI) && defined(RS_WEBUI) \
|
#if (defined(RS_JSONAPI) || defined(RS_WEBUI)) && defined(RS_SERVICE_TERMINAL_WEBUI_PASSWORD)
|
||||||
&& defined(RS_SERVICE_TERMINAL_WEBUI_PASSWORD)
|
|
||||||
std::string webui_pass1 = "Y";
|
std::string webui_pass1 = "Y";
|
||||||
if(askWebUiPassword)
|
if(askWebUiPassword)
|
||||||
{
|
{
|
||||||
|
@ -302,8 +300,7 @@ int main(int argc, char* argv[])
|
||||||
}
|
}
|
||||||
#endif // def RS_SERVICE_TERMINAL_LOGIN
|
#endif // def RS_SERVICE_TERMINAL_LOGIN
|
||||||
|
|
||||||
#if defined(RS_JSONAPI) && defined(RS_WEBUI) \
|
#if (defined(RS_JSONAPI) || defined(RS_WEBUI)) && defined(RS_SERVICE_TERMINAL_WEBUI_PASSWORD)
|
||||||
&& defined(RS_SERVICE_TERMINAL_WEBUI_PASSWORD)
|
|
||||||
if(jsonApiServer && !webui_pass1.empty())
|
if(jsonApiServer && !webui_pass1.empty())
|
||||||
jsonApiServer->authorizeToken("webui:"+webui_pass1);
|
jsonApiServer->authorizeToken("webui:"+webui_pass1);
|
||||||
#endif /* defined(RS_JSONAPI) && defined(RS_WEBUI) \
|
#endif /* defined(RS_JSONAPI) && defined(RS_WEBUI) \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue