diff --git a/src/config/httpaprc b/src/config/httpaprc index 1b48668a4b..aefe5d1a1c 100644 --- a/src/config/httpaprc +++ b/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 diff --git a/src/config/moria1-orrc b/src/config/moria1-orrc index 31bce1bbec..6c548a61a8 100644 --- a/src/config/moria1-orrc +++ b/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 diff --git a/src/config/moria2-orrc b/src/config/moria2-orrc index 703693f643..5520a04cf8 100644 --- a/src/config/moria2-orrc +++ b/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 diff --git a/src/config/moria3-orrc b/src/config/moria3-orrc index 34ad9461f9..b87ff7f8dd 100644 --- a/src/config/moria3-orrc +++ b/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 diff --git a/src/config/routers.or b/src/config/routers.or index 8a0ca92807..ca7ad281c7 100644 --- a/src/config/routers.or +++ b/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----- + diff --git a/src/or/buffers.c b/src/or/buffers.c index 65699ebb42..a14cf0d977 100644 --- a/src/or/buffers.c +++ b/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; diff --git a/src/or/connection.c b/src/or/connection.c index 8b4155d15a..b0ca98322f 100644 --- a/src/or/connection.c +++ b/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; diff --git a/src/or/main.c b/src/or/main.c index 6a7643a638..69dc4a241b 100644 --- a/src/or/main.c +++ b/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; }