Tor and privoxy had been ported to iphone and works very well.

cjacker huang cjacker at
Sun Dec 23 08:09:12 UTC 2007

__IPHONE is just a flag I defined, actually It can be called IPHONE or
anything else.

diff -Nur tor- tor-
--- tor-	2007-10-14 19:06:52.000000000 +0800
+++ tor-	2007-12-17 17:16:23.000000000 +0800
@@ -80,7 +80,7 @@

 /** Upper bound on maximum simultaneous connections; can be lowered by
  * config file. */
-#if defined(CYGWIN) || defined(__CYGWIN__)
+#if defined(CYGWIN) || defined(__CYGWIN__) || (__IPHONE)
 /* */
 #define MAXCONNECTIONS 3200

As I test: the definition of MAXCONNECTIONS to 15000 is too large,
10000 should works.

for these:

Because I use cross compiling(under x86 linux), these tests during
configuration can not run directly, so I disable these tests in
configure file and set value directly in headers.

Actually, all we need to change it to set MAXCONNECTIONS to less than
10000 if we do a native compilation.
Since up to now, we can only generate iphone binary under Linux or Mac
OS X, these tests can not run and get results, So I add a workaround

On Dec 20, 2007 1:31 PM, Nick Mathewson <nickm at> wrote:
> On Mon, Dec 17, 2007 at 05:25:57PM +0800, cjacker huang wrote:
> > Hi, there,
> >    I just ported libevent, tor- and privoxy to iphone 1.1.1 fw.
> > and finished a iPhone app named
> Hi!  Good work; I'd like to get this into the main Tor distribution as
> soon as I can.  I have a couple of questions, though:
> Q1: You seem to be defining two macros: __DARWIN_UNIX03 and __IPHONE.
> I see that __DARWIN_UNIX03 is used in various header files.  But I
> don't get any relevant hits searching for __IPHONE.  Does anything in
> the system headers use it by that name, or should it be called
> "IPHONE" instead?
> > these three definitions had been set to 1 by default:
> >
> Q2: Are you cross-compiling, or do these tests get run and then give a
> result of false?  In other words, what goes wrong then these changes
> aren't in?
> (I'm trying to tell whether this is an iphone-specific issue or a more
> general problem with cross-compiling.)
> many thanks,
> --
> Nick

This is Cjacker.

More information about the tor-dev mailing list