Commit Graph

137 Commits (94c5b0117f18cdbc3dc8605ba561308140d69a6b)

Author SHA1 Message Date
_ 9714794122 Add trace log for streaming files 2020-11-09 16:33:13 +00:00
_ 116b3b4900 Marking known issues and wrapping up dev for the night 2020-11-09 00:56:29 +00:00
_ 49cd292115 🐛 Allowing spaces in server names 2020-11-09 00:56:29 +00:00
_ f81d819c31 Flip match_prefix args 2020-11-09 00:56:29 +00:00
_ 2b93aa8b83 🐛 Implement 416 Range Not Satisfiable
I had a lot of trouble getting AlwaysEqual to compile, so I tested it in a
completely separate crate and vendored it back into PTTH. It's also AGPLv3.
2020-11-09 00:55:45 +00:00
_ 02da0ff0fc 🐛 Redirect to add trailing slashes for directories 2020-11-08 17:58:14 +00:00
_ 435232bf6c ♻️ Use a prelude to clean up the unused imports for `tracing` 2020-11-08 16:00:31 +00:00
_ c5691d9d05 🐛 Fix the backlinks from servers up to the relay 2020-11-08 15:53:09 +00:00
_ 345fa64ad0 Hide ptth_server.toml with 403 Forbidden 2020-11-08 15:01:15 +00:00
_ f42068db89 🐛 Fix a bug in the backoff and update todo.
Video streaming and seeking is working pretty well now behind Caddy, but
I'm still seeing some lag when Firefox first starts a request.
2020-11-08 03:16:13 +00:00
_ 5fa0bd8584 ♻️ Remove unused `use` statements 2020-11-08 02:38:27 +00:00
_ 8c7f4684b4 Log request paths 2020-11-08 02:37:11 +00:00
_ 151f236a0b 💄 Tweak a few things and update todo 2020-11-07 23:10:01 +00:00
_ e0b8c8cb58 Add forced shutdown to ptth_relay. 2020-11-07 02:29:45 +00:00
_ 9e134d55aa 🎉 Add forced shutdown fallback to graceful_shutdown module 2020-11-07 02:26:34 +00:00
_ f02e12aecc 🐛 Add forced shutdown to ptth_file_server. 2020-11-07 01:40:29 +00:00
_ 75177cec80 🚧 Guess it's a bug in hyper.
You can't gracefully shutdown while a client is connected.
2020-11-07 01:34:58 +00:00
_ 32798e8250 🚧 Still hunting a bug where the relay can't shut down if Firefox
is connected
2020-11-07 00:30:56 +00:00
_ e0298a5289 🐛 Working on a bunch of bugs and error handling 2020-11-06 23:43:52 +00:00
_ 3786cec8ab 🚧 Add a bunch more logging / tracing 2020-11-06 20:55:55 +00:00
_ 851b895873 🐛 Turns out I had the modules all wrong. This one works good 2020-11-06 18:49:57 +00:00
_ d8010cf33c ♻️ Graceful shutdown is now a oneshot for both relays and servers 2020-11-06 18:49:57 +00:00
_ 50393e60a0 ♻️ 2020-11-06 18:49:57 +00:00
_ 7d5a491c98 ♻️ Remove Option<> 2020-11-06 18:49:57 +00:00
_ ec4e0e6335 🐛 Fix graceful shutdown of relay and server in end_to_end test 2020-11-06 18:49:57 +00:00
_ 6b772ad512 ♻️ Remove some unused code 2020-11-06 18:49:57 +00:00
Trisha Earley a96c82dea4 🐛 Add content-length header when POSTing a response to the relay 2020-11-06 18:47:04 +00:00
_ 4a1e1a7c23 🐛 Fixes for actual use 2020-11-02 19:17:22 +00:00
_ aad8ffdedd 🐛 Don't build credentials into the Docker image 2020-11-02 18:59:35 +00:00
_ ad79e4ed3c Add Ctrl-C handler 2020-11-02 18:42:00 +00:00
_ e99ace3ca0 🐳 Add Git version printout when ptth_relay launches 2020-11-02 18:07:34 +00:00
_ 16984ddcd3 Split up the prefixes for frontend and servers so we can separate auth easier 2020-11-02 17:44:04 +00:00
_ 26eb395f18 Move `relay_url` into the server config TOML too 2020-11-02 14:41:22 +00:00
_ 1de6c0aca7 The server will now error out if it detects that its own password is weak 2020-11-02 14:23:08 +00:00
_ 903d5f338d Working on README. The relay will now error out if 2 servers share a tripcode 2020-11-02 13:52:27 +00:00
_ 189ae7abd7 🐛 Don't create new rendezvous points for unknown servers.
Also improve error reporting when loading config files
2020-11-02 13:37:08 +00:00
_ c5ecf4bc88 Add another layer in the URI to make room for future features 2020-11-01 22:07:55 -06:00
_ 13117e4237 Add tripcodes for a little security 2020-11-01 21:34:50 -06:00
_ e7edf84282 🐛 Fix rendezvous problem.
Now clients can queue up for a server, which fixes a few things:

- A server can receive multiple requests at once, reducing roundtrip
count in theory
- Clients can wait up to 30 seconds on the relay before the server
is ready for them
- If the server has just left to service a request, the client will
queue instead of seeing the server as absent and giving up
2020-11-01 20:07:46 -06:00
_ 067e240ff4 🚧 I'm gonna try to fix the rendezvous problem 2020-11-01 18:13:12 -06:00
_ c056118798 Set up CLI flags to manually test 2 servers at once 2020-10-31 22:17:11 -05:00
_ 063e79d217 🚨 Add license to Cargo.toml and fix up clippy stuff 2020-10-31 21:59:02 -05:00
_ b673fa94c7 🚧 Split up watchers into client and server 2020-10-31 21:53:09 -05:00
_ 15a62a5e2a 🚧 Trying to fix the issue where clients don't wait on servers 2020-10-31 20:21:53 -05:00
_ f57777c72f Add server list page 2020-10-31 15:46:38 -05:00
_ 9244953e57 ♻️ Extract load_templates fn for file server 2020-10-31 12:56:36 -05:00
_ be53772337 🎉 Add parent directory link.
I was way overthinking this one.
2020-10-31 15:46:24 +00:00
_ 0572de2ad0 💄 Make directory indexes prettier 2020-10-31 15:28:27 +00:00
_ 1fb0c2aafa 💄 Switched to a handlebars template for the whole dir index 2020-10-31 09:35:18 -05:00
_ 55b3e9f520 🚧 Working on handlebars for prettier directories 2020-10-30 21:31:03 -05:00
_ ba17f11297 ♻️ Extract http_serde::Body so I can make the file server standalone 2020-10-30 20:35:39 -05:00
_ dac223efde ♻️ Extract relay_url option 2020-10-30 18:48:44 -05:00
_ 0f092f7213 Test the file server by hashing the AGPL license remotely 2020-10-30 18:36:32 -05:00
_ 5d14155ba3 Start adding some tests 2020-10-30 18:18:42 -05:00
_ 41213f7272 ♻️ Move the server bin into the lib, too 2020-10-30 18:02:57 -05:00
_ 6b5208fdb4 ♻️ Move the relay binary into the lib
what am i doing
2020-10-30 17:57:36 -05:00
_ 8d3fc71dcf 🚧 Can I test these within the same process? 2020-10-30 17:53:03 -05:00
_ 07686e693c ♻️ Make sure constants are factored out
They'll become params one day
2020-10-30 17:43:56 -05:00
_ 9f399b0440 ♻️ Extract file_server module 2020-10-30 17:38:23 -05:00
_ 6d3a5ac9ba ♻️ Extract serve_all func 2020-10-30 17:25:22 -05:00
_ 325f68b566 ♻️ Make the server's inner handlers look more like a regular Hyper server 2020-10-30 17:11:35 -05:00
_ 1615f0d075 🚧 checkpoint 2020-10-30 17:01:37 -05:00
_ 2e2e6a5f32 Use percent encoding for spaces in file names 2020-10-30 16:46:03 -05:00
_ 8a301a6d03 🚧 Can index directories now, but a lot of stuff is missing 2020-10-29 13:31:13 +00:00
_ af226cb36c 🚧 Working on directory indexes 2020-10-29 13:19:14 +00:00
_ 6f31c93c1f ♻️ 2020-10-29 12:45:35 +00:00
_ 9dd2155d7a 🐛 Add 404 page for missing file instead of gateway timeout 2020-10-29 12:24:05 +00:00
_ ec5b770ae3 ♻️ Extract serve_file fn 2020-10-29 12:17:40 +00:00
_ 1e6c29fb01 Byte ranges are properly advertised and served.
This means Firefox can seek video / audio served by us.
To think, you used to need Flash to do this.
2020-10-27 22:05:19 -05:00
_ aa183de15e Impl HEAD method 2020-10-27 21:43:12 -05:00
_ 9e3470d5b4 ❇️ content-length response header 2020-10-27 21:33:03 -05:00
_ 4c03e6d32a ❇️ Sending the ResponseParts back through a header.
Do you feel like a hero yet?
2020-10-27 21:29:15 -05:00
_ 1e86e9735e ♻️ Towards response headers and status code 2020-10-27 21:10:40 -05:00
_ d286adadc9 ❇️ You can now actually request different files 2020-10-27 20:39:02 -05:00
_ 290745f6cf Pass the right part of the URL to the server.
Also remove dead code
2020-10-27 20:31:38 -05:00
_ 406b13c3b1 ♻️ Package interesting request fields into MsgPack 2020-10-27 20:20:06 -05:00
_ 15b18a9335 🚧 2020-10-27 19:43:23 -05:00
_ cab36c7a19 Actually it works okay, I was just off on my estimate of how big videos are.
Still needs to support byte range, too.
2020-10-27 13:26:40 +00:00
_ b9db10b76a 🚧 Set up streaming on the relay
however it doesn't pass a smoke test for video streaming yet
2020-10-27 13:04:28 +00:00
_ 587849bcfa Sending a picture to the client. Streaming works on the server but not yet on the relay 2020-10-27 03:58:50 +00:00
_ eaca19f6ba Fix it up so the response body goes through a POST body instead 2020-10-27 03:36:52 +00:00
_ 0cc61796c0 Concept is proven, though it won't work for streaming 2020-10-27 03:27:25 +00:00
_ e3aa61bb9a Decided to go straight for the reverse HTTP server idea 2020-10-27 02:49:12 +00:00
_ 8b3f952091 Multiple watchers 2020-10-27 02:20:37 +00:00
_ 6bb2678eb5 Very primitive UDP receive 2020-10-27 02:00:30 +00:00
_ a8caae68c3 UDP send 2020-10-27 02:00:27 +00:00
_ 394345cfe2 That's long polling 2020-10-27 01:42:10 +00:00