summaryrefslogtreecommitdiffhomepage
path: root/Server.hs
Commit message (Collapse)AuthorAge
* Server: DEBUG_ME_FROM_EMAIL can be used to specify the --from-email.Joey Hess2017-05-09
| | | | This is used in debug-me.default to encourage configuring it.
* Server: Use "postmaster" as default --from-email address rather than ↵Joey Hess2017-05-09
| | | | "unknown@server".
* avoid sending email when it's clearly not a valid email addressJoey Hess2017-05-01
|
* better messageJoey Hess2017-04-30
|
* add license headers to all source filesJoey Hess2017-04-30
|
* server: email logs to user, and option to delete old onesJoey Hess2017-04-30
|
* fix probable race in use of restoreHashesJoey Hess2017-04-30
| | | | | | | | | | | | | I think there was a race where a SessionKey message had been drained from the TChan, but not yet added to the developer state, which was resonsible for recent instability at startup. It manifested as protocol errors where the prevActivity hash was wrongly Nothing. Fixed by adding a MissingHashes type to tag things whose hashes have been stripped, and adding back the hashes when needed, which always happens inside atomically blocks, so won't have such a race.
* fix server to not relay developer messages back to selfJoey Hess2017-04-29
| | | | This fixes chat message echoing consistency too.
* Leave the prevMessage out of Activity serialization to save BW.Joey Hess2017-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do include it in the data that gets signed, so it can be recovered by trying each likely (recently seen) Activity as the prevMessage, and checking the signature. The UserState and DeveloperState already had the necessary state about recently seen hashes, so this does not impact data use. One tricky bit is that relayFromSocket needs to wait for the TMChan to be empty before calling restorePrevActivityHash. Otherwise, the hashes of items in the channel that have not been processed yet won't be tried. The TMChan is not really being used as a channel since only 1 item can be in it. It could be converted to a TMVar, but closeTMChan is used so I left it as a channel. Note that the server does not restore hashes of messages that pass through it; it's just a dumb relay. Sending a single key press now only needs 94 bytes of data to be sent, down from 169! --- Also switched to SHA512, since hashes are no longer being sent over the wire and so the larger size does not matter. SHA512 is slightly faster and more secure. This commit was sponsored by Ewen McNeill.
* rename LogMessage to AnyMessageJoey Hess2017-04-27
| | | | Not related to the Log anymore.
* have server relay Devloper messages to other DevelopersJoey Hess2017-04-26
|
* fix connection closingJoey Hess2017-04-24
| | | | Now when the user quits, the developer also exits.
* also enable compression in serverJoey Hess2017-04-24
|
* work around for https://github.com/jaspervdj/websockets/issues/140Joey Hess2017-04-24
|
* re-open log file in append modeJoey Hess2017-04-22
| | | | Oops, it got truncated otherwise..
* add framing protocol for websocketsJoey Hess2017-04-22
|
* it worksJoey Hess2017-04-22
| | | | | | | | | Multi-user client-server debug-me is working, almost perfectly. All that was missing was replaying the log when the developer connected. A number of race conditions had to be avoided to do that sanely. This commit was sponsored by Ignacio on Patreon.
* add --download modeJoey Hess2017-04-21
| | | | | | | Nice, was able to reuse all the protocol stuff from Role.Developer for this. This commit was sponsored by Fernando Jimenez on Patreon.
* use UUID to generate a unique SessionIDJoey Hess2017-04-21
|
* working toward getting developer mode connection to server workingJoey Hess2017-04-21
|
* client now fully workingJoey Hess2017-04-21
|
* initial http serverJoey Hess2017-04-21
| | | | | | | | | | | | Incomplete, but the client is able to connect and send messages which get logged. Split up debug-me.hs into Role/* Switched from cereal to binary, since websockets operate on lazy ByteStrings, and using cereal would involve a copy on every receive. This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
* http server scaffoldingJoey Hess2017-04-21