Commit 582d9970 authored by Tomas Touceda's avatar Tomas Touceda
Browse files

Explicitly disable SocksPort auto

parent 9ba8c114
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -59,6 +59,7 @@
#define TOR_ARG_DATA_DIRECTORY  "DataDirectory"
#define TOR_ARG_DATA_DIRECTORY  "DataDirectory"
#define TOR_ARG_HASHED_PASSWORD "HashedControlPassword"
#define TOR_ARG_HASHED_PASSWORD "HashedControlPassword"
#define TOR_ARG_COOKIE_AUTH     "CookieAuthentication"
#define TOR_ARG_COOKIE_AUTH     "CookieAuthentication"
#define TOR_ARG_SOCKSPORT       "SocksPort"


/** Generate random control passwords of 16 characters */
/** Generate random control passwords of 16 characters */
#define PASSWORD_LEN    16
#define PASSWORD_LEN    16
@@ -106,6 +107,11 @@ TorSettings::apply(QString *errmsg)
  conf.insert(SETTING_CONTROL_PORT,
  conf.insert(SETTING_CONTROL_PORT,
              localValue(SETTING_CONTROL_PORT).toString());
              localValue(SETTING_CONTROL_PORT).toString());


  if(localValue(SETTING_AUTOCONTROL).toBool())
    conf.insert(TOR_ARG_SOCKSPORT, "auto");
  else
    conf.insert(TOR_ARG_SOCKSPORT, "9050");
  
  AuthenticationMethod authMethod = 
  AuthenticationMethod authMethod = 
    toAuthenticationMethod(localValue(SETTING_AUTH_METHOD).toString());
    toAuthenticationMethod(localValue(SETTING_AUTH_METHOD).toString());
  switch (authMethod) {
  switch (authMethod) {