summaryrefslogtreecommitdiffstats
path: root/src/server
Commit message (Collapse)AuthorAgeFilesLines
...
* [SERVER] altservers: Short timeout during RTT measurement, round request rangeSimon Rettberg2017-11-082-5/+10
| | | | | Rounding to 4k so caching works efficiently This should now close #3231
* [SERVER] rpc: Add q=logfile, q=altservers and q=config to /querySimon Rettberg2017-11-083-0/+70
|
* [SERVER] Add multiple config options for limiting stuffSimon Rettberg2017-11-085-19/+183
| | | | | maxClients, maxImages, maxPayload, maxReplicationSize Refs #3231
* [SERVER] altservers: Tweak, cleanup, refactor, renameSimon Rettberg2017-11-084-22/+32
|
* [SERVER] Properly clamp to 4k borders in updateCachemap()Simon Rettberg2017-11-071-2/+9
| | | | Refs #3231
* [SERVER] Use multiConnect() to find uplink for replicationSimon Rettberg2017-11-072-13/+38
| | | | | Just as in the fuse client, this will speed things up if we have several alt-servers in our list which are not reachable.
* [SERVER] Support finer control over replication when a proxy connects to a proxySimon Rettberg2017-11-025-4/+33
| | | | | | | Introduce new flag in "select image" message to tell the uplink server whether we have background replication enabled or not. Also reject a connecting proxy if the connecting proxy uses BGR but we don't, as this would basically force the image to be replicated locally too.
* [SERVER] Add --errormsg to only serve HTTP-JSON error codeSimon Rettberg2017-11-023-29/+65
| | | | | This could have been an external tool, but this didn't add much code and has the benefit of honoring the config file for port and bind address.
* [SERVER] Ignore invalid basePath in globals.c, do bailout in server.cSimon Rettberg2017-11-021-9/+12
|
* [SERVER] Clean up arguments, show version on startupSimon Rettberg2017-11-021-13/+8Star
|
* [SERVER] rpc: Keep track of and cap number of active http sessionsSimon Rettberg2017-11-011-11/+57
|
* [SERVER] rpc: Remove old TODO, set thread name for persistent connectionsSimon Rettberg2017-11-011-1/+5
|
* [SERVER] Since fuse client assumed no backwards compat before v3, lie to clientsSimon Rettberg2017-11-011-1/+1
| | | | | | If client reports protocol version < 3 on connect, just pretend we're at the same version. This sucks but we can't update servers before clients otherwise. :(
* [*] Mark logadd() as printf-style function, fix errors that it revealedSimon Rettberg2017-10-314-7/+8
| | | | ...there were quite a few format string errors as it turns out :/
* [SERVER] net.c: Refactoring and renamingSimon Rettberg2017-10-311-58/+33Star
| | | | | | Less copy & paste for sendfile alternatives, changed naming of old dnbd3_* functions moved over from server.c a while ago.
* [SERVER] Image list private to image.cSimon Rettberg2017-10-312-5/+2Star
|
* [SERVER] rpc: encoding of our reply is utf-8, add to reply headerSimon Rettberg2017-10-301-1/+1
|
* [SERVER] Add AFL supportSimon Rettberg2017-10-304-4/+84
| | | | | | | | | | | AFL is an instrumenting fuzzer. It expects to pass input to the program to be tested via command line (file name) or via stdin. This adds support for reading messages that normally would arrive via network directly from stdin. In this mode, the server is pretty useless otherwise. http://lcamtuf.coredump.cx/afl/
* [SERVER] Missed occurence of AF_INET(6) -> HOST_IP[46]Simon Rettberg2017-10-301-3/+6
|
* [SERVER] rpc: Honor client's Connection header, add some commentsSimon Rettberg2017-10-301-35/+106
|
* [SERVER] Don't send error 500 to client on local connection timeoutSimon Rettberg2017-10-301-1/+3
|
* [*] Introduce constants for IPv4/6 in dnbd3_host_tSimon Rettberg2017-10-284-12/+12
| | | | | | | AF_INET luckily was "2" on all platforms checked, so no problems there with interoperation, but AF_INET6 is different between Linux, BSD, Windows and possibly others, so map back and forth between AF_INET/AF_INET6 and HOST_IP4/HOST_IP6 to fix this.
* [SERVER] Add function to parse x-www-form-urlencoded stringsSimon Rettberg2017-10-284-26/+126
| | | | | | Use it to properly parse RPC queries. Will also come in handy when parsing POST body for calls that actually trigger any actions in the server (reload, alt-servers, ...)
* [SERVER] Use picohttpparser from h2oSimon Rettberg2017-10-264-48/+884
| | | | | | | Simple and lean interface, no bloat, noice. Slighly modified to use a simple string struct for passing around strings that are not null terminated, instead of separate char* and length.
* [SERVER] net: Simplify check for HTTPSimon Rettberg2017-10-261-10/+11
| | | | | Pretty loose guesswork, but preventing the false positives would not lead to any meaningful result anyways, so why bother.
* [SERVER] uplink: Fix updating of global byte counter, fix incremental updatesSimon Rettberg2017-10-251-2/+7
| | | | | Incremental updating of the global byte counter would only work when background replication is disabled. Fix this.
* [SERVER] Only start reloading images if no other reload is in progressSimon Rettberg2017-10-251-4/+12
|
* [SERVER] Improve handling of byte stats countersSimon Rettberg2017-10-253-19/+29
| | | | Less writes to variables, more up-to-date values for uplinks.
* [SERVER] Improve altserver handling and selectionSimon Rettberg2017-10-251-26/+41
| | | | | | We order the list so that servers that fail are kept at the end of the list. This is so that when we fetch servers for RTT measurement, we're less likely to pick those.
* [SERVER] Initialize PRNGSimon Rettberg2017-10-242-0/+2
|
* [SERVER] Get rid of zlib dependencySimon Rettberg2017-10-242-19/+19
| | | | | | We only used it for CRC-32, so now the source tree includes a stripped down version of the crc32 code from the zlib project.
* [SERVER] Fix types or add explicit casts everywhere we might have type ↵Simon Rettberg2017-10-249-85/+91
| | | | conversion problems
* [SERVER] Mute signedness warning on 32bitSimon Rettberg2017-10-201-2/+2
|
* [SERVER] Use monotonic clock for measuring timeSimon Rettberg2017-10-198-74/+104
| | | | | Introduces new shared source unit timing.[ch] Closes #3214
* [SERVER] More tweaks to alt-server selection wrt proxy cyclesSimon Rettberg2017-10-181-4/+9
| | | | | This needs an overhaul; status needs to be moved from global alt-servers list to individual uplinks
* [SERVER] Don't try to load metadata files as images; fix clang-analyzer ↵Simon Rettberg2017-10-182-15/+36
| | | | false positives
* [SERVER] Try to connect to different server if proxy cycle is detectedSimon Rettberg2017-10-173-9/+33
|
* [*] Support hop-counting in request header, protocol version 3Simon Rettberg2017-10-176-34/+62
| | | | | | | | | | | | | | We steal 8 bits from the request offset to count hops when requests get relayed by proxies. This still leaves plenty of bits for the offset (56 bits, supporting images of up to 72 petabytes). This is used to detect proxy cycles. The algorithm is not perfect but should prevent endless relays of the same request. This is backwards compatible to old clients and servers, as the server only ever sets the hopcount in relayed requests if the upstream server is using protocol version 3 or newer, and clients are automatically upwards compatible as there is practically no image larger than 74PB, so the newly introduced hop count field is always 0 even in requests from old clients.
* [SERVER] rpc: Support querying storage size + available spaceSimon Rettberg2017-10-114-9/+27
|
* [SERVER] Fix invalid pointer derefSimon Rettberg2017-10-061-1/+1
|
* [SERVER] rpc: Return a unique id generated at startup with each replySimon Rettberg2017-10-061-4/+19
|
* [SERVER] Return client count when requesting stats but not client listSimon Rettberg2017-10-062-4/+14
|
* [SERVER] rpc: Fix bitmask calc for odd subnet sizes (not 8, 16, ...)Simon Rettberg2017-10-041-1/+1
|
* [SERVER] How about updating atime on connect?Simon Rettberg2017-10-041-0/+3
|
* [SERVER] Implement HTTP RPC that supports different queries and ACLSimon Rettberg2017-10-014-44/+263
| | | | | | | | | - ACL is defined in new file rpc.acl - Queries are still WIP, for now something like /query?q=stats&q=images /query?q=clients works, although the parsing is still ugly - Also supports HTTP keep-alive
* [SERVER] Move includes from header to source unitSimon Rettberg2017-10-012-2/+2
|
* [SERVER] Helper function for loading line based space separated data from fileSimon Rettberg2017-10-013-34/+63
|
* [SERVER] Fix closing timeout reset, fix log messagesSimon Rettberg2017-09-082-1/+5
|
* [SERVER] Refactor: Move client list to net.* and isolateSimon Rettberg2017-09-078-247/+290
|
* [SERVER] Implement closeUnusedFd config optionSimon Rettberg2017-09-023-0/+33
| | | | | | | This will close the readFd of images that have no active clients after some idle period (1 hour currently). Prevents deleted images from taking up space until the server is shut down.