OnionProxy 9021
# maximum number of incoming connections
-MaxConn 100
+MaxConn 500
# run in anonymizing mode (0=no/1=yes)
Anonimize 0
# Private key
PrivateKeyFile moria1-private
-CoinWeight 0.0
+CoinWeight 0.01
ORPort 9001
OPPort 9011
# Private key
PrivateKeyFile moria2-private
-CoinWeight 0.0
+CoinWeight 0.01
ORPort 9002
OPPort 9012
# Private key
PrivateKeyFile moria3-private
-CoinWeight 0.0
+CoinWeight 0.01
ORPort 9003
OPPort 9013
# 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
-----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
-----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-----
+
/* 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;
}
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;
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;
}
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;
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;
}
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;
}