263 Commits

Author SHA1 Message Date
Dirk Engling
2eeae0a65a Allow opentracker to start with a random set of torrents for debugging purposes 2024-04-13 12:26:08 +02:00
Dirk Engling
3a6d99dd46 Better track current iobatch 2024-04-13 02:54:08 +02:00
Dirk Engling
1a70d9f9ef First shot on chunked transfers 2024-04-13 00:47:29 +02:00
Dirk Engling
301faeb10c Start an extra thread to update timer cache. Using signals was unnecessary 2024-04-12 18:10:31 +02:00
Dirk Engling
9000f5d67a minor cleanups. Breaks proxy.c 2024-04-05 22:44:30 +02:00
Dirk Engling
959e0912a1 Bind dual stack by default 2024-04-03 23:08:17 +02:00
Dirk Engling
7c3279a028 Allow binding to v4 and v6 addresses always 2024-04-03 22:50:01 +02:00
Dirk Engling
543ab73017 Allow networks to be used instead of ip addresses when blessing is involved 2024-03-29 03:30:13 +01:00
Dirk Engling
384799b5b3 Merge branch 'master' into erdgeist-fix-top10-stats 2024-03-07 04:10:28 +01:00
Dirk Engling
4baec2592c handle -1 length reads properly 2024-03-07 04:09:42 +01:00
Dirk Engling
be825f5759 Add support for dynamic accesslists 2022-11-24 04:20:06 +01:00
Dirk Engling
110868ec4e Fix return code check inversion introduced in last commit 2021-08-23 18:12:23 +02:00
Romain Porte
c4fc41a831 opentracker.c: check set*id return values
This commit fix the following similar warnings:

    opentracker.c:562:7: warning: ignoring return value of ‘setegid’
    declared with attribute ‘warn_unused_result’ [-Wunused-result]
    […]

The man page of these functions ask users to explicitly check the return
value in case of any error happening.
2021-08-22 14:40:31 +02:00
Dirk Engling
9a20ebe3f2 Fix typo. Thanks to Romain Porte 2021-07-27 23:15:48 +02:00
Dirk Engling
99544a1030 Handle eagain case in trywrite 2021-05-09 00:02:13 +02:00
Dirk Engling
2f228c27c2 Retry successful writes immediately 2021-04-25 13:30:24 +02:00
Dirk Engling
95f1780f0b Split huge iovecs over multiple io_batches 2021-04-24 03:25:30 +02:00
Dirk Engling
1a349bfa43 Add a handler for the EAGAIN reason code to iob_send 2021-04-21 20:14:58 +02:00
Dirk Engling
b73b3b17cc Use arc4random whereever we need strong entropy 2021-04-20 04:05:50 +02:00
Dirk Engling
616119ee22 Turn random() to nrand48 in inner loop where it is not cryptographically relevant to avoid futex storm. Thanks and credits to Bart Smienk 2021-04-20 03:48:50 +02:00
Dirk Engling
6411f1567f Remove debug code for self pipes 2018-05-26 00:28:10 +02:00
Dirk Engling
d6d4fb0668 Tell libowfat about EWOULDBLOCK conditions 2018-05-26 00:25:59 +02:00
Dirk Engling
48c9c6172b register both ends of self pipe to libowfat in order to use them 2018-01-29 17:32:22 +00:00
Dirk Engling
d4598cc930 Get rid of some warnings regarding header guards 2017-04-28 15:41:24 +02:00
erdgeist
77c13fe6ef Only kick off udp handlers, when everything is initialised 2014-10-07 00:32:07 +02:00
erdgeist
3eeb536a44 Init prng before udp code needs it. 2012-05-28 15:24:33 +00:00
erdgeist
914e0ac302 Add functionality to distribute udp to several workers 2012-04-25 05:48:16 +00:00
erdgeist
ae413a675b undo last change, it did not work well 2012-04-01 04:11:27 +00:00
erdgeist
8bf40b6717 fix tiny issue 2012-04-01 03:23:50 +00:00
erdgeist
1af67bab1d Try to act upon all udp packets at once 2012-03-31 20:01:05 +00:00
erdgeist
85df3dbc01 Open syslog connection before dropping privileges 2010-12-11 15:50:56 +00:00
erdgeist
216447492a Chomp all trailing space characters, including new lines, when parsing the config file 2010-08-18 00:43:12 +00:00
erdgeist
aae0227ee6 Load state only after initialising all structs. Thanks to Michael S. Combs for pointing out the buf 2010-08-17 01:06:22 +00:00
erdgeist
a75c824187 the keep-alive loop must not run, if no keep alive is configured or requested for connection 2010-08-09 14:20:02 +00:00
erdgeist
85e6880233 Make opentracker's user runtime configurable. Also add more debug output to aid finding problems. 2010-04-09 10:15:51 +00:00
erdgeist
a1eec929a1 Only chroot if -d option or tracker.rootdir are set 2010-04-09 09:33:39 +00:00
erdgeist
f3c0359876 Make header parsing more efficient, prepare multithreading and keep-alive. 2009-11-18 04:00:26 +00:00
erdgeist
90e7262d9d Preparing more efficient header parsing 2009-11-18 03:56:26 +00:00
erdgeist
b1bf030f92 Fixed parser error for v6 addresses 2009-11-05 20:20:48 +00:00
erdgeist
5364ea31ca Omit a warning where signed chars can't hold 0xff. Initialisen them with -1 2009-08-26 17:35:52 +00:00
erdgeist
bb770a45a6 Make accesslists thread safe. Signal handler is working in its own thread now, waiting for a signal. All other threads ignore signals. 2009-07-17 18:00:26 +00:00
erdgeist
65d7d9b89c Allow /stats to be located anywhere in your trackers path 2009-06-17 15:06:31 +00:00
erdgeist
2a94892890 Display v4 addresses in v4 mode nicer 2009-06-16 12:17:53 +00:00
erdgeist
5174c61a23 If we don't want v6, tell libowfat not to worry about it. 2009-03-18 14:49:13 +00:00
erdgeist
c7ed890222 Fix white spaces
Introduce loading tracker states with -l
Alter tracker state to a human readable form
2009-03-17 23:57:20 +00:00
erdgeist
9297967f85 Add a stat option the count bucket stalls
Add an iterator for all torrents. It's slower but for stats it's okay.
Move some stats collection stuff to the new iterator. More to come.
Start a "report all stats" page.
Start fixing the code to identify "busy" networks.
Add the concept of hosts allowed to proxy.
Add a parser for the X-Forwarded-For: HTTP header.
Clean up HTTP Header handling code. (Remove some left overs of now vanished sync code).
2009-03-04 14:35:21 +00:00
erdgeist
72a1564ca1 Value of off is not used, so don't calculate it 2009-03-03 01:24:02 +00:00
erdgeist
ff3c0feab5 Add workaround to openbsd's broken v6 API 2009-02-10 14:49:38 +00:00
erdgeist
2d3718151d Fix a pointer arithmetic issue leading to incorrect peer data being copied. Allocate correct size for debugbuffer. Expect exact values on find keywords, not only prefix match. 2009-01-16 04:17:22 +00:00
erdgeist
0b875273d4 Remove debug message 2009-01-16 02:28:54 +00:00