Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | fix -r/--redirect optional argument | tiptorrent development team | 2022-02-10 | 1 | -2/+3 |
| | |||||
* | use getopt_long option definition | tiptorrent development team | 2022-02-10 | 1 | -4/+4 |
| | | | | instead of numeric value. | ||||
* | do not use redirection in case of direct download after pending state | tiptorrent development team | 2022-02-08 | 1 | -1/+1 |
| | | | | honor the allow_redirection flag after activating client from pending state. | ||||
* | update tests to specify maximum number of redirections | tiptorrent development team | 2022-02-08 | 1 | -1/+2 |
| | |||||
* | allow to specify maximum number of redirections with -r | tiptorrent development team | 2022-02-08 | 3 | -8/+16 |
| | | | | | | | | | | | For example, -r/--redirect 3 specifies that the maximum number of redirections per client is 3. if -r/--redirect is specified with no argument, then the argument specified by -n/--max-clients is used. If -n/--max-clients is not specified and -r/--redirect is specifed with no argument, then default value is 3. | ||||
* | add -d/--daemon option | tiptorrent development team | 2022-01-19 | 1 | -2/+17 |
| | |||||
* | revert workaround for file chunks | tiptorrent development team | 2021-12-23 | 1 | -6/+0 |
| | | | | The client now uses fallocate() to store a single file. | ||||
* | do not create redirect if client unexpectedly closes connection | tiptorrent development team | 2021-12-22 | 1 | -6/+7 |
| | | | | | | | | Close the socket without creating the redirection, this client did not successfully downloaded the image file. Moreover, check for connection closed by client in all of the possible read states. | ||||
* | update maximum uri length to 255 chars | tiptorrent development team | 2021-10-05 | 1 | -4/+4 |
| | | | | file with a large name might easily reach the existing 32 chars limit. | ||||
* | tiptorrent is released under AGPL3+ | tiptorrent development team | 2021-09-29 | 1 | -0/+661 |
| | |||||
* | prioritize redirections over direct server download | tiptorrent development team | 2021-09-29 | 1 | -2/+2 |
| | | | | testbed shows 95% use of redirections for data transfers. | ||||
* | use strrchr to take last dot that specifies the chunk number | tiptorrent development team | 2021-09-29 | 1 | -1/+1 |
| | | | | | file might have a extension starting by dot, use strrchr to get the last dot that specifies the chunk number | ||||
* | use int32_t for chunk index | tiptorrent development team | 2021-09-29 | 1 | -1/+1 |
| | | | | cli->chunk = -1 shortcircuits the runtime file split in chunk | ||||
* | download checksum file directly from server | tiptorrent development team | 2021-09-29 | 3 | -7/+12 |
| | | | | Remove assumption on small file to shortcircuit the redirect logic. | ||||
* | Revert "prioritize direct download for non existing redirections" | tiptorrent development team | 2021-09-29 | 1 | -22/+3 |
| | | | | | | | This reverts commit 4b97101f747e114253467ce4568cbced18f4c2d1. This patch is broken, cli->path refers to the absolute file, not the chunks, and it should check for this->state, not cli->state. | ||||
* | skip runtime chunk split if --redirect is not set | tiptorrent development team | 2021-09-29 | 1 | -0/+6 |
| | |||||
* | fix chunk size split logic | tiptorrent development team | 2021-09-29 | 1 | -11/+7 |
| | | | | Add remainder bytes to the last chunk instead. | ||||
* | add basic uri sanitization | tiptorrent development team | 2021-09-29 | 1 | -1/+4 |
| | | | | disallow .. in uri. | ||||
* | runtime split original file into chunks | tiptorrent development team | 2021-09-29 | 3 | -5/+74 |
| | | | | No need to split the original file on the server side. | ||||
* | systemd: add service template | tiptorrent development team | 2021-09-29 | 1 | -0/+10 |
| | | | | | | | | To launch a tiptorrent service instance with /home/foobar as root: systemctl start tiptorrent@home-foobar For systemd string escaping for unit names see systemd-escape(1). | ||||
* | no need for root to run tiptorrent | tiptorrent development team | 2021-09-29 | 1 | -1/+1 |
| | |||||
* | prioritize direct download for non existing redirections | tiptorrent development team | 2021-09-29 | 1 | -3/+22 |
| | | | | | | allocate the direct download slot from server if there are no redirections and no other client is currently downloading this file already. | ||||
* | activate pending clients only for close direct download | tiptorrent development team | 2021-09-29 | 1 | -1/+2 |
| | | | | if a client is redirected, do not exercise the client activation loop. | ||||
* | do not stop activating clients when direct download starts | tiptorrent development team | 2021-09-29 | 1 | -1/+3 |
| | | | | | | | | Do not break the loop after activating one client. Keep activating clients that can be redirected. If no redirection is found, then start direct download for this client (only one) but keep looping for clients that can be redirected. | ||||
* | do not activate clients without redirection via POST | tiptorrent development team | 2021-09-29 | 3 | -5/+8 |
| | | | | | update 4573deb8cb3 to skip clients without redirection after receiving POST notification. | ||||
* | rise redirection timeout to 3600 seconds | tiptorrent development team | 2021-09-29 | 1 | -1/+1 |
| | |||||
* | increase timeout for redirections | tiptorrent development team | 2021-09-29 | 1 | -1/+3 |
| | | | | available redirections expire after 5 minutes. | ||||
* | allow to report that a client allows redirection with POST method | tiptorrent development team | 2021-09-29 | 3 | -7/+23 |
| | | | | | | | | | If clients sends POST /test, it notifies the server that it is available for receive redirections from file 'test'. Test it with wget: wget --post-data '' http://localhost:9999/TEST -O /dev/null | ||||
* | do not shadow global redirect variable | tiptorrent development team | 2021-09-29 | 1 | -3/+3 |
| | |||||
* | fix bogus error if clients closes connection unexpectly | tiptorrent development team | 2021-09-29 | 1 | -0/+10 |
| | | | | | | Reports a bogus: unknown read state 5, critical internal error for 127.0.0.1:60610 | ||||
* | remove duplicate log when resuming from pending and being redirected | tiptorrent development team | 2021-09-29 | 1 | -5/+1 |
| | |||||
* | another log rewrite | tiptorrent development team | 2021-09-29 | 1 | -1/+1 |
| | |||||
* | extend tests | tiptorrent development team | 2021-09-29 | 2 | -5/+149 |
| | | | | a bit of copy and paste, generalize it later. | ||||
* | improve logging | tiptorrent development team | 2021-09-29 | 1 | -11/+11 |
| | | | | | | | Report "client %s:%hu starts download for %s" when the file transfer really starts. Replace log when redirection after pending state is not available | ||||
* | specify current state when displaying unknown error | tiptorrent development team | 2021-09-29 | 1 | -4/+4 |
| | |||||
* | allow to reuse redirections | tiptorrent development team | 2021-09-29 | 2 | -3/+10 |
| | | | | A redirection can be reused up to max_clients times. | ||||
* | disarm timer on release | tiptorrent development team | 2021-09-29 | 1 | -2/+1 |
| | | | | This is a repeat timer, if not stopped, it will run again triggering UAF. | ||||
* | fix client timeout | tiptorrent development team | 2021-09-29 | 1 | -4/+5 |
| | | | | as described by man(3) ev, to make it work with ev_timer_again(). | ||||
* | check sendfile error | tiptorrent development team | 2021-09-29 | 1 | -1/+2 |
| | |||||
* | update num_clients and redirection only for large files | tiptorrent development team | 2021-09-29 | 2 | -9/+12 |
| | | | | Skip num_clients and redirection update for small files. | ||||
* | add support for HEAD method | tiptorrent development team | 2021-09-29 | 3 | -17/+39 |
| | |||||
* | add a close wait state | tiptorrent development team | 2021-09-29 | 3 | -9/+27 |
| | | | | | | | | | Wait for clients to close the connection, then: - create redirection. - activate pending clients. Do no refresh timeout while in close wait state. | ||||
* | extend log on unknown internal state | tiptorrent development team | 2021-09-29 | 1 | -2/+4 |
| | | | | Specify what client has trigger the unknown internal state | ||||
* | do not display an error when recv() == 0 | tiptorrent development team | 2021-09-29 | 1 | -7/+4 |
| | | | | This is the client closing the connection with us. | ||||
* | call shutdown() before close() | tiptorrent development team | 2021-09-29 | 1 | -0/+1 |
| | |||||
* | activate pending clients only for large files | tiptorrent development team | 2021-09-29 | 3 | -3/+10 |
| | | | | | small files should not activate pending clients, otherwise max_clients is not fulfilled. | ||||
* | use off_t instead of size_t for file size | tiptorrent development team | 2021-09-29 | 1 | -1/+1 |
| | | | | | stat() st_size datatype is off_t which is for file size, use off_t instead of size_t for correctness. | ||||
* | Add ULL postfix to FILE_SIZE_THRESHOLD to avoid using int | tiptorrent development team | 2021-09-29 | 1 | -1/+1 |
| | | | | | Otherwise, cli->size > FILE_SIZE_THRESHOLD uses 32-bit integer which overflows with very large files. Use ULL to enforce 64-bits. | ||||
* | add more logging for easier debugging | tiptorrent development team | 2021-09-29 | 1 | -5/+15 |
| | |||||
* | fix typo in tests/network-setup.sh | tiptorrent development team | 2021-09-29 | 1 | -1/+1 |
| |