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

cjacker huang cjacker at gmail.com
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-0.1.2.18/src/or/or.h tor-0.1.2.18n/src/or/or.h
--- tor-0.1.2.18/src/or/or.h	2007-10-14 19:06:52.000000000 +0800
+++ tor-0.1.2.18n/src/or/or.h	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)
 /* http://archives.seul.org/or/talk/Aug-2006/msg00210.html */
 #define MAXCONNECTIONS 3200
 #else

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


for these:
USING_TWOS_COMPLEMENT
NULL_REP_IS_ZERO_BYTES
TIME_T_IS_SIGNED

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
here.


On Dec 20, 2007 1:31 PM, Nick Mathewson <nickm at freehaven.net> wrote:
> On Mon, Dec 17, 2007 at 05:25:57PM +0800, cjacker huang wrote:
> > Hi, there,
> >    I just ported libevent, tor-0.1.2.18 and privoxy to iphone 1.1.1 fw.
> > and finished a iPhone app named iTor.app.
>
> 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:
> >
> > USING_TWOS_COMPLEMENT
> > NULL_REP_IS_ZERO_BYTES
> > TIME_T_IS_SIGNED
>
> 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