Explorar o código

new config files, some bugfixes

svn:r51
Roger Dingledine %!s(int64=22) %!d(string=hai) anos
pai
achega
c951c6f186

+ 1 - 1
src/config/httpaprc

@@ -4,7 +4,7 @@
 OnionProxy 9021
 
 # maximum number of incoming connections
-MaxConn 100
+MaxConn 500
 
 # run in anonymizing mode (0=no/1=yes)
 Anonimize 0

+ 1 - 1
src/config/moria1-orrc

@@ -6,7 +6,7 @@ RouterFile ../config/routers.or
 # Private key
 PrivateKeyFile moria1-private
 
-CoinWeight 0.0
+CoinWeight 0.01
 
 ORPort 9001
 OPPort 9011

+ 1 - 1
src/config/moria2-orrc

@@ -6,7 +6,7 @@ RouterFile ../config/routers.or
 # Private key
 PrivateKeyFile moria2-private
 
-CoinWeight 0.0
+CoinWeight 0.01
 
 ORPort 9002
 OPPort 9012

+ 1 - 1
src/config/moria3-orrc

@@ -6,7 +6,7 @@ RouterFile ../config/routers.or
 # Private key
 PrivateKeyFile moria3-private
 
-CoinWeight 0.0
+CoinWeight 0.01
 
 ORPort 9003
 OPPort 9013

+ 11 - 3
src/config/routers.or

@@ -4,7 +4,7 @@
 # router-port is where the router is accepting connections from other routers.
 
 # Router 1
-moria 9001 10 10
+moria.mit.edu 9001 10240 10240
 -----BEGIN RSA PUBLIC KEY-----
 MIGJAoGBAMBBuk1sYxEg5jLAJy86U3GGJ7EGMSV7yoA6mmcsEVU3pwTUrpbpCmwS
 7BvovoY3z4zk63NZVBErgKQUDkn3pp8n83xZgEf4GI27gdWIIwaBjEimuJlEY+7K
@@ -12,7 +12,7 @@ nZ7kVMRoiXCbjL6VAtNa4Zy1Af/GOm0iCIDpholeujQ95xew7rQnAgMA//8=
 -----END RSA PUBLIC KEY-----
 
 # Router 2
-moria 9002 10 10
+moria.mit.edu 9002 10240 10240
 -----BEGIN RSA PUBLIC KEY-----
 MIGJAoGBANX/HHRuudz274MFSQ4manX8DhtsIuogNUyco9/0dr+XsfioTGd3RgMj
 aSWlD87arkZO4hHBPHe0q89Z3s1UtUsyQ/VmsxSv9g2OCnF/dU2Nz4h6+Al3iNJF
@@ -20,9 +20,17 @@ aSWlD87arkZO4hHBPHe0q89Z3s1UtUsyQ/VmsxSv9g2OCnF/dU2Nz4h6+Al3iNJF
 -----END RSA PUBLIC KEY-----
 
 # Router 3
-moria 9003 10 10
+moria.mit.edu 9003 10240 10240
 -----BEGIN RSA PUBLIC KEY-----
 MIGJAoGBAJfkNWCaNkYIRwfHT06KBU6dz8W1xDpW5ezGJwAOoxCX3/ZNoUicb/1V
 oB3OzW6VxWIiht3da/3K0ywiBOOCcf6BabKoMdiPpH7NIeu6XRmBYK2uqW13gBgh
 xJbQBb58Nx8Fr05XkvLG6i+vTDY3MZOW3E2/DwSe/jFzuHSD5b3nAgMA//8=
 -----END RSA PUBLIC KEY-----
+
+town-square.reputation.com 9004 10240 10240
+-----BEGIN RSA PUBLIC KEY-----
+MIGJAoGBAKD2BDZQpGq/aAbZ7t+/7qktZVEbhUGe097gIjWH9gXcIOIm0CJMe3rN
+MsBJsQMi5Uwqrz+Invb5n6bswrNlJp/bCKBhGTvUCfxg7c8xZy71PPSIPnTg1qXl
+p5fyAkgCYkZNgEEZzQDHv1GRvLCs92kURjSJE5y8QU0dXfbzms8PAgMA//8=
+-----END RSA PUBLIC KEY-----
+

+ 1 - 3
src/or/buffers.c

@@ -79,9 +79,7 @@ int flush_buf(int s, char **buf, size_t *buflen, size_t *buf_flushlen, size_t *b
 
   /* this is the point where you would grow the buffer, if you want to */
 
-  write_result = write(s, *buf, *buf_flushlen > 10240 ? 10240 : *buf_flushlen);
-    /* try to flush at most 10240 bytes at a time. otherwise write() can hang for
-     * quite a while trying to get it all out. that's bad. */
+  write_result = write(s, *buf, *buf_flushlen);
   if (write_result < 0) {
     if(errno!=EAGAIN) { /* it's a real error */
       return -1;

+ 2 - 0
src/or/connection.c

@@ -180,6 +180,8 @@ int connection_handle_listener_read(connection_t *conn, int new_type, int new_st
   }
   log(LOG_DEBUG,"Connection accepted on socket %d.",news);
 
+  fcntl(news, F_SETFL, O_NONBLOCK); /* set s to non-blocking */
+
   newconn = connection_new(new_type);
   newconn->s = news;
 

+ 4 - 4
src/or/main.c

@@ -38,7 +38,7 @@ int connection_add(connection_t *conn) {
 
   if(nfds >= MAXCONNECTIONS-2) { /* 2, for some breathing room. should count the fenceposts. */
     /* FIXME should use the 'max connections' option */
-    log(LOG_DEBUG,"connection_add(): failing because nfds is too high.");
+    log(LOG_INFO,"connection_add(): failing because nfds is too high.");
     return -1;
   }
 
@@ -52,7 +52,7 @@ int connection_add(connection_t *conn) {
 
   nfds++;
 
-  log(LOG_DEBUG,"connection_add(): new conn type %d, socket %d, nfds %d.",conn->type, conn->s, nfds);
+  log(LOG_INFO,"connection_add(): new conn type %d, socket %d, nfds %d.",conn->type, conn->s, nfds);
 
   return 0;
 
@@ -74,7 +74,7 @@ int connection_remove(connection_t *conn) {
   if(current_index == nfds-1) { /* this is the end */
 //    connection_free(conn);
     nfds--;
-    log(LOG_DEBUG,"connection_remove(): nfds now %d.",nfds);  
+    log(LOG_INFO,"connection_remove(): nfds now %d.",nfds);  
     return 0;
   } 
 
@@ -86,7 +86,7 @@ int connection_remove(connection_t *conn) {
   connection_array[current_index] = connection_array[nfds];
   connection_array[current_index]->poll_index = current_index;
 
-  log(LOG_DEBUG,"connection_remove(): nfds now %d.",nfds);
+  log(LOG_INFO,"connection_remove(): nfds now %d.",nfds);
 
   return 0;  
 }