~jackweirdy/vidalia/680192

« back to all changes in this revision

Viewing changes to src/vidalia/config/ServerSettings.cpp

  • Committer: Package Import Robot
  • Author(s): Ulises Vitulli
  • Date: 2011-11-15 17:14:07 UTC
  • mfrom: (1.4.6) (8.2.11 sid)
  • Revision ID: package-import@ubuntu.com-20111115171407-acvo6bilao12x2oh
Tags: 0.2.15-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
#define SETTING_BANDWIDTH_RATE  "BandwidthRate"
44
44
#define SETTING_BANDWIDTH_BURST "BandwidthBurst"
45
45
#define SETTING_BRIDGE_RELAY    "BridgeRelay"
 
46
#define SETTING_NONEXIT_RELAY   "NonExitRelay"
46
47
#define SETTING_ENABLE_UPNP     "EnableUPnP"
47
48
#define SETTING_RELAY_BANDWIDTH_RATE   "RelayBandwidthRate"
48
49
#define SETTING_RELAY_BANDWIDTH_BURST  "RelayBandwidthBurst"
71
72
  setDefault(SETTING_BANDWIDTH_BURST,       10485760);
72
73
  setDefault(SETTING_RELAY_BANDWIDTH_BURST, 10485760);
73
74
  setDefault(SETTING_EXITPOLICY,
74
 
    ExitPolicy(ExitPolicy::Default).toString());
 
75
             ExitPolicy(ExitPolicy::Middleman).toString());
75
76
  setDefault(SETTING_ENABLE_UPNP, false); 
76
77
  setDefault(SETTING_BRIDGE_RELAY, false);
77
78
  setDefault(SETTING_PUBLISH_SERVER_DESCRIPTOR, "1");
257
258
{
258
259
  return value(SETTING_BRIDGE_RELAY).toBool() && isServerEnabled();
259
260
}
 
261
 
 
262
/** Sets to <b>enabled</b> whether Tor should be a non-exit node when acting as
 
263
 * a server. */
 
264
void
 
265
ServerSettings::setNonExitEnabled(bool enabled)
 
266
{
 
267
  setValue(SETTING_NONEXIT_RELAY, enabled);
 
268
}
 
269
 
 
270
/** Returns true if Tor is configured to act as a non-exit node. */
 
271
bool
 
272
ServerSettings::isNonExitEnabled()
 
273
{
 
274
  return value(SETTING_NONEXIT_RELAY).toBool() && isServerEnabled();
 
275
}
260
276
 
261
277
/** Sets the server's ORPort. */
262
278
void