[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r10323: Add a "force" option to tor-resolve so we can make it look u (in tor/trunk: . src/tools)
Author: nickm
Date: 2007-05-25 10:48:12 -0400 (Fri, 25 May 2007)
New Revision: 10323
Modified:
tor/trunk/
tor/trunk/ChangeLog
tor/trunk/src/tools/tor-resolve.c
Log:
r12945@catbus: nickm | 2007-05-25 10:37:12 -0400
Add a "force" option to tor-resolve so we can make it look up .onion addresses if we know that this will create a virtual mapping we want.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r12945] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2007-05-25 05:34:47 UTC (rev 10322)
+++ tor/trunk/ChangeLog 2007-05-25 14:48:12 UTC (rev 10323)
@@ -121,6 +121,11 @@
whether the current version is recommended, and whether any versions
are good, and how many authorities agree. (Patch from shibz.)
+ o Minor features (tor-resolve):
+ - Add an "-F" option to force a resolve for a .onion address. Thanks
+ to the AutomapHostsOnResolve option, this is no longer a completely
+ silly thing to do.
+
o Minor features (other):
- More unit tests.
- Warn when using a version of libevent before 1.3b to run a server on
Modified: tor/trunk/src/tools/tor-resolve.c
===================================================================
--- tor/trunk/src/tools/tor-resolve.c 2007-05-25 05:34:47 UTC (rev 10322)
+++ tor/trunk/src/tools/tor-resolve.c 2007-05-25 14:48:12 UTC (rev 10323)
@@ -259,7 +259,8 @@
static void
usage(void)
{
- puts("Syntax: tor-resolve [-4] [-v] [-x] hostname [sockshost:socksport]");
+ puts("Syntax: tor-resolve [-4] [-v] [-x] [-F] "
+ "hostname [sockshost:socksport]");
exit(1);
}
@@ -269,7 +270,7 @@
{
uint32_t sockshost;
uint16_t socksport;
- int isSocks4 = 0, isVerbose = 0, isReverse = 0;
+ int isSocks4 = 0, isVerbose = 0, isReverse = 0, force = 0;
char **arg;
int n_args;
struct in_addr a;
@@ -296,6 +297,8 @@
isSocks4 = 0;
else if (!strcmp("-x", arg[0]))
isReverse = 1;
+ else if (!strcmp("-F", arg[0]))
+ force = 1;
else {
fprintf(stderr, "Unrecognized flag '%s'\n", arg[0]);
usage();
@@ -331,7 +334,7 @@
usage();
}
- if (!strcasecmpend(arg[0], ".onion")) {
+ if (!strcasecmpend(arg[0], ".onion") && !force) {
fprintf(stderr,
"%s is a hidden service; those don't have IP addresses.\n\n"
"To connect to a hidden service, you need to send the hostname\n"