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  ) 

Default constructor.

Definition at line 35 of file networksettings.cpp.

References VSettings::setDefault(), SETTING_BRIDGE_LIST, SETTING_FASCIST_FIREWALL, SETTING_HTTP_PROXY, SETTING_HTTP_PROXY_AUTH, SETTING_HTTPS_PROXY, SETTING_HTTPS_PROXY_AUTH, SETTING_REACHABLE_ADDRESSES, SETTING_TUNNEL_DIR_CONNS, SETTING_USE_BRIDGES, SETTING_USE_HTTP_PROXY, and SETTING_USE_HTTPS_PROXY.


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.

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 282 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 112 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 182 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 200 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 233 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 251 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 128 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 297 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 267 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 165 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 216 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 289 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()

Definition at line 121 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 191 of file networksettings.cpp.

References SETTING_HTTP_PROXY, and AbstractTorSettings::setValue().

Referenced by NetworkPage::save().

void NetworkSettings::setHttpProxyAuthenticator ( const QString &  authenticator  ) 

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

Definition at line 208 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 242 of file networksettings.cpp.

References SETTING_HTTPS_PROXY, and AbstractTorSettings::setValue().

Referenced by NetworkPage::save().

void NetworkSettings::setHttpsProxyAuthenticator ( const QString &  authenticator  ) 

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

Definition at line 259 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 151 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 275 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()

Definition at line 174 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()

Definition at line 225 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 Tue Jul 7 16:58:27 2009 for Vidalia by  doxygen 1.4.7