[Pkg-privacy-commits] [onioncat] 200/340: do not connect root peers
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 13:04:40 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch debian
in repository onioncat.
commit 94837957838b3e48d2708591a8004626870fa454
Author: eagle <eagle at 58e1ccc2-750e-0410-8d0d-f93ca75ab447>
Date: Sat Nov 14 21:58:47 2009 +0000
do not connect root peers
git-svn-id: http://www.cypherpunk.at/svn/onioncat/branches/garlicat@528 58e1ccc2-750e-0410-8d0d-f93ca75ab447
---
configure | 22 +++++++++++-----------
src/ocat.c | 2 ++
src/ocat.h | 24 ++----------------------
src/ocatsetup.c | 10 +++++++---
4 files changed, 22 insertions(+), 36 deletions(-)
diff --git a/configure b/configure
index 4dc3f03..c2ed1c9 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.62 for onioncat 0.2.0.r527.
+# Generated by GNU Autoconf 2.62 for onioncat 0.2.0.r528.
#
# Report bugs to <rahra at cypherpunk.at>.
#
@@ -596,8 +596,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='onioncat'
PACKAGE_TARNAME='onioncat'
-PACKAGE_VERSION='0.2.0.r527'
-PACKAGE_STRING='onioncat 0.2.0.r527'
+PACKAGE_VERSION='0.2.0.r528'
+PACKAGE_STRING='onioncat 0.2.0.r528'
PACKAGE_BUGREPORT='rahra at cypherpunk.at'
ac_subst_vars='SHELL
@@ -1259,7 +1259,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures onioncat 0.2.0.r527 to adapt to many kinds of systems.
+\`configure' configures onioncat 0.2.0.r528 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1329,7 +1329,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of onioncat 0.2.0.r527:";;
+ short | recursive ) echo "Configuration of onioncat 0.2.0.r528:";;
esac
cat <<\_ACEOF
@@ -1421,7 +1421,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-onioncat configure 0.2.0.r527
+onioncat configure 0.2.0.r528
generated by GNU Autoconf 2.62
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1435,7 +1435,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by onioncat $as_me 0.2.0.r527, which was
+It was created by onioncat $as_me 0.2.0.r528, which was
generated by GNU Autoconf 2.62. Invocation command line was
$ $0 $@
@@ -2084,7 +2084,7 @@ fi
# Define the identity of the package.
PACKAGE='onioncat'
- VERSION='0.2.0.r527'
+ VERSION='0.2.0.r528'
cat >>confdefs.h <<_ACEOF
@@ -2235,7 +2235,7 @@ ac_config_headers="$ac_config_headers config.h"
cat >>confdefs.h <<\_ACEOF
-#define SVN_REVISION "527"
+#define SVN_REVISION "528"
_ACEOF
@@ -5208,7 +5208,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by onioncat $as_me 0.2.0.r527, which was
+This file was extended by onioncat $as_me 0.2.0.r528, which was
generated by GNU Autoconf 2.62. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5261,7 +5261,7 @@ Report bugs to <bug-autoconf at gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-onioncat config.status 0.2.0.r527
+onioncat config.status 0.2.0.r528
configured by $0, generated by GNU Autoconf 2.62,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/src/ocat.c b/src/ocat.c
index b63d38c..a1ac413 100644
--- a/src/ocat.c
+++ b/src/ocat.c
@@ -506,11 +506,13 @@ int main(int argc, char *argv[])
if (CNF(controller))
run_ocat_thread("controller", ocat_controller, NULL);
+#ifdef CONNECT_ROOT_PEERS
// initiate connections to permanent root peers
log_debug("connecting root peers");
for (c = 0; c < ROOT_PEERS; c++)
if (!IN6_ARE_ADDR_EQUAL(&CNF(root_peer[c]), &CNF(ocat_addr)))
socks_queue(CNF(root_peer[c]), 1);
+#endif
// reading config file
if (CNF(config_file))
diff --git a/src/ocat.h b/src/ocat.h
index 3118240..2bdee4f 100644
--- a/src/ocat.h
+++ b/src/ocat.h
@@ -101,32 +101,10 @@
#endif
#define IP6HLEN sizeof(struct ip6_hdr)
-/*//! TOR prefix: FD87:D87E:EB43::/48
-#define TOR_PREFIX {{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0,0,0,0,0,0,0,0,0,0}}}
-#define TOR_PREFIX_LEN 48
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define TOR_PREFIX4 {0x0000000a}
-#define TOR_PREFIX4_MASK 0x000000ff
-#else
-#define TOR_PREFIX4 {0x0a000000}
-#define TOR_PREFIX4_MASK 0xff000000
-#endif*/
//! Length of an .onion-URL (without ".onion" and '\0')
#define ONION_URL_LEN 16
-/*//! Total length of .onion-URL
-#define ONION_NAME_SIZE (ONION_URL_LEN + 7)
-//! Total length of .onion-URL (equal to ONION_NAME_SIZE)
-#define ONION_NAME_LEN ONION_NAME_SIZE*/
#define MAXPEERS 1024
-/*//! Local listening port for incoming connections from TOR.
-#define OCAT_LISTEN_PORT 8060
-//! Local control port for querying status information.
-#define OCAT_CTRL_PORT 8066
-//! Virtual destination port for hidden services
-#define OCAT_DEST_PORT 8060
-//! SOCKS port of TOR proxy
-#define TOR_SOCKS_PORT 9050*/
#ifdef __OpenBSD__
#define OCAT_UNAME "_tor"
#elif __FreeBSD__
@@ -284,9 +262,11 @@ struct OcatSetup
FILE *logf;
int use_syslog;
int daemon;
+#ifdef CONNECT_ROOT_PEERS
//! hardcoded permanent peers
#define ROOT_PEERS 1
struct in6_addr root_peer[ROOT_PEERS];
+#endif
time_t uptime;
char *frandn;
//! destination socket address of Tor's SOCKS port
diff --git a/src/ocatsetup.c b/src/ocatsetup.c
index 8271bba..c1a6a9e 100644
--- a/src/ocatsetup.c
+++ b/src/ocatsetup.c
@@ -72,6 +72,7 @@ struct OcatSetup setup_ =
#else
1, // daemon
#endif
+#ifdef CONNECT_ROOT_PEERS
{
/*
{{{0xfd, 0x87, 0xd8, 0x7e, 0xeb, 0x43,
@@ -80,6 +81,7 @@ struct OcatSetup setup_ =
{{{0xfd, 0x87, 0xd8, 0x7e, 0xeb, 0x43,
0xf6, 0x83, 0x64, 0xac, 0x73, 0xf9, 0x61, 0xac, 0x9a, 0x00}}} // initial permanent peer "62bwjldt7fq2zgqa" (dot.cat)
},
+#endif
0,
"/dev/urandom",
{(struct sockaddr_in*) &socks_dst6_},
@@ -172,7 +174,7 @@ void post_init_setup(void)
void print_setup_struct(FILE *f)
{
- char *c, ip[SBUF], nm[SBUF], ip6[SBUF], logf[SBUF], hw[SBUF], rp[SBUF];
+ char *c, ip[SBUF], nm[SBUF], ip6[SBUF], logf[SBUF], hw[SBUF];
int i, t;
struct sockaddr_str sas;
@@ -261,9 +263,11 @@ void print_setup_struct(FILE *f)
setup_.net_type, setup_.net_type == NTYPE_TOR ? "NTYPE_TOR" : setup_.net_type == NTYPE_I2P ? "NTYPE_I2P" : "unknown"
);
+#ifdef CONNECT_ROOT_PEERS
for (i = 0; i < ROOT_PEERS; i++)
- if (inet_ntop(AF_INET6, &setup_.root_peer[i], rp, SBUF))
- fprintf(f, "root_peer[%d] = %s\n", i, rp);
+ if (inet_ntop(AF_INET6, &setup_.root_peer[i], ip6, SBUF))
+ fprintf(f, "root_peer[%d] = %s\n", i, ip6);
+#endif
if (inet_ntops((struct sockaddr*) setup_.socks_dst, &sas))
{
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onioncat.git
More information about the Pkg-privacy-commits
mailing list