Commit Graph

97 Commits (0b10737403b7edee11477222c28de71e6f039ae8)

Author SHA1 Message Date
_ 0b10737403 ♻️ refactor: move ptth_server's main into its library so I can make a busybox-style multi-use binary 2021-10-02 17:26:56 +00:00
_ 9b60acf0e0 📝 remove Github repo from Cargo.tomls. PTTH is no longer on my Github 2021-07-18 17:44:07 +00:00
_ 3a2147d50f use `MissedTickBehavior::Skip` on all intervals 2021-07-18 17:43:58 +00:00
_ d8c6e1bd14 ⬆️ update to Tokio 1.8.x to get a feature I want 2021-07-18 17:33:34 +00:00
_ d292693856 ⬆️ update rmp-serde to 0.15.5 and add it to ptth_quic 2021-07-18 17:19:05 +00:00
_ 02b6955a50 🐛 bug: allow `auto-gen-key` to also recreate the file and fix permissions 2021-07-13 16:02:49 -05:00
_ 2f2e4ef64d 📝 document how to run `ptth_server`
This commit also works well on Termux on Android.
2021-07-11 13:12:32 +00:00
_ 6f45f5105e remove `heim` dependency
It doesn't work on Android, and I can't fault it for that (Platform difference)
but it also drags in `uom` which has a bunch of template magic that takes
forever to compile, and I'm pretty sure it's dragging down my compile times.

I tried to build `ptth_server` on nightly to get compile timings, and heim
depends on `socket2` which failed to compile.

And I never ended up using the CPU monitoring. So heim is gone now.
2021-07-11 12:17:36 +00:00
_ 277c00b753 switch to rustls 2021-07-11 11:53:41 +00:00
_ bccc9bce53 set default-run key for ptth_server 2021-07-11 11:38:46 +00:00
_ 5db72be1bc tell the relay our server name when we serve responses
This is needed for a future refactor of the relay.
2021-07-10 22:17:32 +00:00
_ b018f16794 ♻️ refactor: custom servers won't create a file server module. 2021-05-09 19:54:09 +00:00
_ 6c826b0cc5 ptth_server v2.1.0 will allow custom servers with a user-supplied request handler 2021-05-09 19:40:19 +00:00
_ 08009de043 🚧 it works! 2021-05-09 18:32:24 +00:00
_ c663d126aa ♻️ refactor: moving things around to support third-party ptth_server modules 2021-05-09 17:54:29 +00:00
_ 93bf38ec03 🚨 clippy pass 2021-05-02 22:32:24 +00:00
_ 810a34463c ♻️ refactor: get rid of mod.rs 2021-04-29 23:03:01 +00:00
_ 4a73f48c68 tests: fix tests 2021-04-27 14:31:32 -05:00
_ 9eb470963c make an error transparent so it's more meaningful 2021-04-18 13:51:27 -05:00
_ 2c4d46388a 📝 docs: update README before publishing to crates.io 2021-04-18 12:56:36 -05:00
_ c6f651387e ♻️ refactor: make `load_templates` private 2021-04-17 20:50:48 -05:00
_ fd238d8c2b ♻️ refactor: rename file_server::State to file_server::FileServer 2021-04-17 19:10:52 -05:00
_ ae33337156 ♻️ refactor: clean up ptth_server
- Found I was passing the file server root twice
- Removed handlebars from the public API. The templates are fixed
when ptth_server ships, so I don't think users of the lib should
care what handlebars is.
- Making other stuff private where possible
2021-04-17 18:59:59 -05:00
_ 86af3194e5 💥 breaking: remove password_is_bad from ptth_server
The password checking is not necessary with the new process of generating
high-entropy Base64 passwords and then approving them on the relay.

The password file takes a lot of space and this doesn't need to be part
of ptth_server's public API, if there is one, anyway.
2021-04-17 17:47:01 -05:00
_ d16b0c4c61 🚨 `cargo check` pass 2021-04-10 09:41:21 -05:00
_ 3408feb619 ♻️ refactor: move gen_key up to ptth_core 2021-04-09 19:43:15 -05:00
_ 240cd8dff1 ♻️ refactor: extract gen_key pure function 2021-04-09 19:30:45 -05:00
_ d9669a7073 proof of concept for private browser cache based on etag and if-none-match 2021-04-03 17:26:53 +00:00
_ 1df0f0f677 ♻️ refactor: extract stream_file 2021-04-03 16:27:31 +00:00
_ ff73f501a4 🚧 2021-04-03 16:21:59 +00:00
_ 3389292457 placeholder for caching - Always returns a random ETag header.
So the browser-side cache will always miss, but I tested that Firefox will at
least send us If-None-Match with the last ETag it saw.
2021-04-03 15:53:59 +00:00
_ 6e24983ad7 🚨 refactor: cargo clippy 2021-04-03 15:30:32 +00:00
_ 0821ccaac6 ♻️ refactor: move Markdown support in ptth_server out to a feature.
It may be removed in the future.
2021-04-03 15:17:28 +00:00
_ e5bf5f7d1f ♻️ refactor: flatten out indentation 2021-04-03 14:27:17 +00:00
_ 6ee9b6e7c9 🐛 bug: ptth_server: add 30-second timeout for _only_ http_listen requests 2021-04-02 20:58:19 -05:00
_ 4dd08bdbb1 bump ptth_server to 1.2.1 for the Windows patch 2021-03-21 19:10:40 +00:00
Trisha 02d4362c3b 🏁 build: fix Windows build for ptth_server 2021-03-21 14:07:09 -05:00
_ 2253ae3391 🐛 bug: fix reqwest feature needed for ptth_server 2021-03-21 18:28:08 +00:00
_ d15f8539cb 🎉 ptth_server to 1.2.0 2021-03-21 18:25:02 +00:00
_ f05257d833 🐛 bug fix requests timing out after 40 seconds.
This is such a stupid bug. I swear I checked this exact piece of code for
this exact bug and it wasn't there. But after I fixed it, I had no problem
running a download for 11 hours straight.

This fix won't affect a case where the firewall is actually closing long-
running connections (which is bad behavior, but it could happen) or a case
where the Internet is just flakey and the connection drops.

But it will fix the most common case where both client and server are on
robust connections and the download times out anyway.
2021-03-21 15:43:31 +00:00
_ c1118971b0 add --throttle-upload option 2021-03-21 15:43:15 +00:00
_ 235e134cb2 ♻️ refactor: more clippy lints, and make read_git_version simpler 2021-03-21 03:45:00 +00:00
_ c6b2418a49 ♻️ refactor: split up large function at clippy's behest 2021-03-21 03:40:45 +00:00
_ 50fc509c8b 🚨 fix a bunch of easy clippy warnings 2021-03-21 03:34:47 +00:00
_ 820099c2ca ⬆️ deps: replace ulid with rusty_ulid so I can drop rand 0.6.x 2021-03-21 03:09:44 +00:00
_ 4dddfb1768 ⬆️ update important crates to Tokio 1.4.0 2021-03-21 03:01:06 +00:00
_ ee1db02b08 ♻️ refactor: use constructor for ConfigFile 2021-03-21 02:49:44 +00:00
_ 456ab04f78 impl auto-gen-key 2021-03-15 20:34:32 +00:00
_ a356d981a8 add file_server_root CLI opt too 2021-03-15 20:02:37 +00:00
_ 56496bf97b add `--name` so caller program can provide name 2021-03-15 19:55:12 +00:00