NetworkSettings Class Reference

#include <networksettings.h>

Inheritance diagram for NetworkSettings:

AbstractTorSettings VSettings

List of all members.

Public Member Functions

 NetworkSettings (TorControl *torControl)
bool apply (QString *errmsg=0)
bool getFascistFirewall ()
void setFascistFirewall (bool fascistFirewall)
QList< quint16 > getReachablePorts ()
void setReachablePorts (const QList< quint16 > &reachablePorts)
bool getUseHttpProxy ()
void setUseHttpProxy (bool useHttpProxy)
QString getHttpProxy ()
void setHttpProxy (const QString &proxy)
QString getHttpProxyAuthenticator ()
void setHttpProxyAuthenticator (const QString &authenticator)
bool getUseHttpsProxy ()
void setUseHttpsProxy (bool useHttpsProxy)
QString getHttpsProxy ()
void setHttpsProxy (const QString &proxy)
QString getHttpsProxyAuthenticator ()
void setHttpsProxyAuthenticator (const QString &authenticator)
bool getUseBridges ()
void setUseBridges (bool useBridges)
QStringList getBridgeList ()
void setBridgeList (const QStringList &bridgeList)
bool getTunnelDirConns ()


Detailed Description

Definition at line 26 of file networksettings.h.


Constructor & Destructor Documentation

NetworkSettings::NetworkSettings ( TorControl torControl  ) 


Member Function Documentation

bool NetworkSettings::apply ( QString *  errmsg = 0  )  [virtual]

Applies the current network configuration settings to Tor. If * errmsg is specified and an error occurs while applying the settings, it will be set to a string describing the error.

Applies the current network configuration settings to Tor. If errmsg is specified and an error occurs while applying the settings, it will be set to a string describing the error.

Implements AbstractTorSettings.

Definition at line 56 of file networksettings.cpp.

References getFascistFirewall(), TorControl::getTorVersion(), getUseBridges(), getUseHttpProxy(), getUseHttpsProxy(), AbstractTorSettings::localValue(), TorControl::setConf(), SETTING_BRIDGE_LIST, SETTING_HTTP_PROXY, SETTING_HTTP_PROXY_AUTH, SETTING_HTTPS_PROXY, SETTING_HTTPS_PROXY_AUTH, SETTING_PREFER_TUNNELED_DIR_CONNS, SETTING_REACHABLE_ADDRESSES, SETTING_TUNNEL_DIR_CONNS, SETTING_UPDATE_BRIDGES, SETTING_USE_BRIDGES, and AbstractTorSettings::torControl().

QStringList NetworkSettings::getBridgeList (  ) 

Returns a list of bridge nodes Tor should use.

Definition at line 278 of file networksettings.cpp.

References SETTING_BRIDGE_LIST, and AbstractTorSettings::value().

Referenced by NetworkPage::load().

bool NetworkSettings::getFascistFirewall (  ) 

Returns true if we need to set ReachableAddresses because we're behind a restrictive firewall that limits the ports Tor can connect to.

Definition at line 108 of file networksettings.cpp.

References AbstractTorSettings::localValue(), and SETTING_FASCIST_FIREWALL.

Referenced by apply(), and NetworkPage::load().

QString NetworkSettings::getHttpProxy (  ) 

Returns the proxy used for making Tor's directory requests, in the form of host[:port].

Definition at line 178 of file networksettings.cpp.

References SETTING_HTTP_PROXY, and AbstractTorSettings::value().

Referenced by NetworkPage::load().

QString NetworkSettings::getHttpProxyAuthenticator (  ) 

Returns the authentication information Tor should use to authenticate to an Http proxy. The returned value is in the form username:password.

Definition at line 196 of file networksettings.cpp.

References SETTING_HTTP_PROXY_AUTH, and AbstractTorSettings::value().

Referenced by NetworkPage::load().

QString NetworkSettings::getHttpsProxy (  ) 

Returns the proxy used for making Tor's OR connections, in the form of host[:port].

Definition at line 229 of file networksettings.cpp.

References SETTING_HTTPS_PROXY, and AbstractTorSettings::value().

QString NetworkSettings::getHttpsProxyAuthenticator (  ) 

Returns the authentication information Tor should use to authenticate to an Https proxy. The returned value is in the form username:password.

Definition at line 247 of file networksettings.cpp.

References SETTING_HTTPS_PROXY_AUTH, and AbstractTorSettings::value().

QList< quint16 > NetworkSettings::getReachablePorts (  ) 

Returns a list of ports to be specified in ReachableAddresses.

Definition at line 124 of file networksettings.cpp.

References SETTING_REACHABLE_ADDRESSES, and AbstractTorSettings::value().

Referenced by NetworkPage::load().

bool NetworkSettings::getTunnelDirConns (  ) 

Returns true if Tor is configured to try to tunnel its directory connections through a one-hop circuit.

Definition at line 293 of file networksettings.cpp.

References SETTING_TUNNEL_DIR_CONNS, and AbstractTorSettings::value().

bool NetworkSettings::getUseBridges (  ) 

Returns true if Tor should try to use bridge nodes to access the Tor network.

Definition at line 263 of file networksettings.cpp.

References SETTING_USE_BRIDGES, and AbstractTorSettings::value().

Referenced by apply(), and NetworkPage::load().

bool NetworkSettings::getUseHttpProxy (  ) 

Returns true if Tor should make all its directory requests through a proxy.

Definition at line 161 of file networksettings.cpp.

References AbstractTorSettings::localValue(), and SETTING_USE_HTTP_PROXY.

Referenced by apply(), and NetworkPage::load().

bool NetworkSettings::getUseHttpsProxy (  ) 

Returns true if Tor should make all its OR connections through a proxy.

Definition at line 212 of file networksettings.cpp.

References AbstractTorSettings::localValue(), and SETTING_USE_HTTPS_PROXY.

Referenced by apply(), and NetworkPage::load().

void NetworkSettings::setBridgeList ( const QStringList &  bridgeList  ) 

Sets to bridgeList the list of bridge nodes Tor should use.

Definition at line 285 of file networksettings.cpp.

References SETTING_BRIDGE_LIST, and AbstractTorSettings::setValue().

Referenced by NetworkPage::save().

void NetworkSettings::setFascistFirewall ( bool  fascistFirewall  ) 

Sets to fascistFirewall whether Tor should only create outgoing connections to the list of ports specified to setReachablePorts().

See also:
setReachablePorts()
Sets to fascistFirewall whether Tor should only create outgoing connections to the list of ports specified in setReachablePorts().
See also:
setReachablePorts()

Definition at line 117 of file networksettings.cpp.

References SETTING_FASCIST_FIREWALL, and AbstractTorSettings::setValue().

Referenced by NetworkPage::save().

void NetworkSettings::setHttpProxy ( const QString &  proxy  ) 

Sets the proxy used for making Tor's directory requests. proxy should be in the form host[:port]. If :port is not specified, then Tor will use its default of port 80.

Definition at line 187 of file networksettings.cpp.

References SETTING_HTTP_PROXY, and AbstractTorSettings::setValue().

Referenced by NetworkPage::save().

void NetworkSettings::setHttpProxyAuthenticator ( const QString &  auth  ) 

Sets the authentication information required by an Http proxy. authenticator should be in the form username:password.

Definition at line 204 of file networksettings.cpp.

References SETTING_HTTP_PROXY_AUTH, and AbstractTorSettings::setValue().

Referenced by NetworkPage::save().

void NetworkSettings::setHttpsProxy ( const QString &  proxy  ) 

Sets the proxy used for making Tor's OR connections. proxy should be in the form host[:port]. If :port is not specified, then Tor will use its default of port 443.

Definition at line 238 of file networksettings.cpp.

References SETTING_HTTPS_PROXY, and AbstractTorSettings::setValue().

Referenced by NetworkPage::save().

void NetworkSettings::setHttpsProxyAuthenticator ( const QString &  auth  ) 

Sets the authentication information required by an Https proxy. authenticator should be in the form username:password.

Definition at line 255 of file networksettings.cpp.

References SETTING_HTTPS_PROXY_AUTH, and AbstractTorSettings::setValue().

Referenced by NetworkPage::save().

void NetworkSettings::setReachablePorts ( const QList< quint16 > &  reachablePorts  ) 

Sets the list of ports that will be specified in ReachableAddresses to reachablePorts.

Definition at line 147 of file networksettings.cpp.

References SETTING_REACHABLE_ADDRESSES, and AbstractTorSettings::setValue().

Referenced by NetworkPage::save().

void NetworkSettings::setUseBridges ( bool  useBridges  ) 

Sets to useBridges whether Tor should try to use bridge nodes to access the Tor network.

Definition at line 271 of file networksettings.cpp.

References SETTING_USE_BRIDGES, and AbstractTorSettings::setValue().

Referenced by NetworkPage::save().

void NetworkSettings::setUseHttpProxy ( bool  useHttpProxy  ) 

Sets to useHttpProxy whether Tor should make all its directory requests through the proxy specified to setHttpProxy()

See also:
setHttpProxy()
Sets to useHttpProxy whether Tor should make all its directory requests through the proxy specified to setHttpProxy().
See also:
setHttpProxy()

Definition at line 170 of file networksettings.cpp.

References SETTING_USE_HTTP_PROXY, and AbstractTorSettings::setValue().

Referenced by NetworkPage::save().

void NetworkSettings::setUseHttpsProxy ( bool  useHttpsProxy  ) 

Sets to useHttpsProxy whether Tor should make all its OR connections through the proxy specified to setHttpsProxy.

See also:
setHttpsProxy()
Sets to useHttpsProxy whether Tor should make all its OR connections through the proxy specified to setHttpsProxy().
See also:
setHttpsProxy()

Definition at line 221 of file networksettings.cpp.

References SETTING_USE_HTTPS_PROXY, and AbstractTorSettings::setValue().

Referenced by NetworkPage::save().


The documentation for this class was generated from the following files:

Generated on Wed Nov 26 21:02:43 2008 for Vidalia by  doxygen 1.5.7.1