mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-02 18:44:53 -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('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('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('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
|
#ifdef RS_JSONAPI
|
||||||
as >> parameter('J', "jsonApiPort", conf.jsonApiPort, "jsonApiPort", "Enable JSON API on the specified port", false )
|
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);
|
>> 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(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
|
// 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/" ;
|
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." )
|
"output to stderr instead of log file." )
|
||||||
>> option( 'u',"udp", conf.udpListenerOnly,
|
>> option( 'u',"udp", conf.udpListenerOnly,
|
||||||
"Only listen to UDP." )
|
"Only listen to UDP." )
|
||||||
>> parameter( 'c',"base-dir", conf.optBaseDir, "directory",
|
>> parameter( 'c',"base-dir", conf.optBaseDir, "directory", "Set base directory.", false )
|
||||||
"Set base directory.", false )
|
>> parameter( 'l', "log-file", conf.logfname, "logfile", "Set Log filename.", false )
|
||||||
>> parameter( 'l', "log-file", conf.logfname, "logfile",
|
>> parameter( 'd', "debug-level", conf.debugLevel, "level", "Set debug level.", false )
|
||||||
"Set Log filename.", false )
|
>> parameter( 'i', "ip-address", conf.forcedInetAddress, "IP", "Force IP address to use (if cannot be detected).", false )
|
||||||
>> parameter( 'd', "debug-level", conf.debugLevel, "level",
|
>> parameter( 'o', "opmode", conf.opModeStr, "opmode", "Set Operating mode (Full, NoTurtle, Gaming, Minimal).", false )
|
||||||
"Set debug level.", false )
|
>> parameter( 'p', "port", conf.forcedPort, "port", "Set listenning port to use.", false )
|
||||||
>> parameter( 'i', "ip-address", conf.forcedInetAddress, "IP",
|
>> parameter( 't', "tor", conf.userSuppliedTorExecutable, "tor", "Set Tor executable full path.", false );
|
||||||
"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 );
|
|
||||||
|
|
||||||
#ifdef RS_SERVICE_TERMINAL_LOGIN
|
#ifdef RS_SERVICE_TERMINAL_LOGIN
|
||||||
as >> parameter( 'U', "user-id", prefUserString, "ID",
|
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 >> help( 'h', "help", "Display this Help" );
|
||||||
as.defaultErrorHandling(true, true);
|
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)
|
#if (defined(RS_JSONAPI) && defined(RS_WEBUI)) && defined(RS_SERVICE_TERMINAL_WEBUI_PASSWORD)
|
||||||
std::string webui_pass1;
|
std::string webui_pass1;
|
||||||
if(askWebUiPassword)
|
if(askWebUiPassword)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user