Commit 89dffade authored by Robert Ransom's avatar Robert Ransom
Browse files

Add public_server_mode function.

parent 1b8c8059
Loading
Loading
Loading
Loading
+9 −0
Changes for src/or/router.c: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -976,6 +976,15 @@ server_mode(or_options_t *options)
  return (options->ORPort != 0 || options->ORListenAddress);
}

/** Return true iff we are trying to be a non-bridge server.
 */
int
public_server_mode(or_options_t *options)
{
  if (!server_mode(options)) return 0;
  return (!options->BridgeRelay);
}

/** Return true iff the combination of options in <b>options</b> and parameters
 * in the consensus mean that we don't want to allow exits from circuits
 * we got from addresses not known to be servers. */
+1 −0
Changes for src/or/router.h: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ int authdir_mode_tests_reachability(or_options_t *options);
int authdir_mode_bridge(or_options_t *options);

int server_mode(or_options_t *options);
int public_server_mode(or_options_t *options);
int advertised_server_mode(void);
int proxy_mode(or_options_t *options);
void consider_publishable_server(int force);