mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-23 05:41:24 -05:00
allow user to supply his own Tor executable
This commit is contained in:
parent
d6aa58d52c
commit
03a576589e
@ -239,7 +239,8 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
|
||||
>> parameter('d',"debug-level" ,conf.debugLevel ,"level" ,"Set debug level." ,false)
|
||||
>> parameter('i',"ip-address" ,conf.forcedInetAddress,"nnn.nnn.nnn.nnn", "Force IP address to use (if cannot be detected)." ,false)
|
||||
>> parameter('p',"port" ,conf.forcedPort ,"port" ,"Set listenning port to use." ,false)
|
||||
>> parameter('o',"opmode" ,conf.opModeStr ,"opmode" ,"Set Operating mode (Full, NoTurtle, Gaming, Minimal)." ,false);
|
||||
>> parameter('o',"opmode" ,conf.opModeStr ,"opmode" ,"Set Operating mode (Full, NoTurtle, Gaming, Minimal)." ,false)
|
||||
>> parameter('t',"opmode" ,conf.userSuppliedTorExecutable,"tor" ,"supply full tor eecutable path." ,false);
|
||||
#ifdef RS_JSONAPI
|
||||
as >> parameter('J', "jsonApiPort", conf.jsonApiPort, "jsonApiPort", "Enable JSON API on the specified port", false )
|
||||
>> parameter('P', "jsonApiBindAddress", conf.jsonApiBindAddress, "jsonApiBindAddress", "JSON API Bind Address.", false);
|
||||
@ -393,6 +394,9 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
|
||||
|
||||
if(is_auto_tor)
|
||||
{
|
||||
if(!conf.userSuppliedTorExecutable.empty())
|
||||
RsTor::setTorExecutablePath(conf.userSuppliedTorExecutable);
|
||||
|
||||
// Now that we know the Tor service running, and we know the SSL id, we can make sure it provides a viable hidden service
|
||||
|
||||
std::string tor_hidden_service_dir = RsAccounts::AccountDirectory() + "/hidden_service/" ;
|
||||
|
@ -126,19 +126,13 @@ int main(int argc, char* argv[])
|
||||
"output to stderr instead of log file." )
|
||||
>> option( 'u',"udp", conf.udpListenerOnly,
|
||||
"Only listen to UDP." )
|
||||
>> parameter( 'c',"base-dir", conf.optBaseDir, "directory",
|
||||
"Set base directory.", false )
|
||||
>> parameter( 'l', "log-file", conf.logfname, "logfile",
|
||||
"Set Log filename.", false )
|
||||
>> parameter( 'd', "debug-level", conf.debugLevel, "level",
|
||||
"Set debug level.", false )
|
||||
>> parameter( 'i', "ip-address", conf.forcedInetAddress, "IP",
|
||||
"Force IP address to use (if cannot be detected).", false )
|
||||
>> parameter( 'o', "opmode", conf.opModeStr, "opmode",
|
||||
"Set Operating mode (Full, NoTurtle, Gaming, Minimal).",
|
||||
false )
|
||||
>> parameter( 'p', "port", conf.forcedPort, "port",
|
||||
"Set listenning port to use.", false );
|
||||
>> parameter( 'c',"base-dir", conf.optBaseDir, "directory", "Set base directory.", false )
|
||||
>> parameter( 'l', "log-file", conf.logfname, "logfile", "Set Log filename.", false )
|
||||
>> parameter( 'd', "debug-level", conf.debugLevel, "level", "Set debug level.", false )
|
||||
>> parameter( 'i', "ip-address", conf.forcedInetAddress, "IP", "Force IP address to use (if cannot be detected).", false )
|
||||
>> parameter( 'o', "opmode", conf.opModeStr, "opmode", "Set Operating mode (Full, NoTurtle, Gaming, Minimal).", false )
|
||||
>> parameter( 'p', "port", conf.forcedPort, "port", "Set listenning port to use.", false )
|
||||
>> parameter( 't', "tor", conf.userSuppliedTorExecutable, "tor", "Set Tor executable full path.", false );
|
||||
|
||||
#ifdef RS_SERVICE_TERMINAL_LOGIN
|
||||
as >> parameter( 'U', "user-id", prefUserString, "ID",
|
||||
@ -176,6 +170,9 @@ int main(int argc, char* argv[])
|
||||
as >> help( 'h', "help", "Display this Help" );
|
||||
as.defaultErrorHandling(true, true);
|
||||
|
||||
if(!conf.userSuppliedTorExecutable.empty())
|
||||
RsTor::setTorExecutablePath(conf.userSuppliedTorExecutable);
|
||||
|
||||
#if (defined(RS_JSONAPI) && defined(RS_WEBUI)) && defined(RS_SERVICE_TERMINAL_WEBUI_PASSWORD)
|
||||
std::string webui_pass1;
|
||||
if(askWebUiPassword)
|
||||
|
Loading…
Reference in New Issue
Block a user