Commit Graph

299 Commits (f9e10e0f64ada9534b17bc37460b6b4bafef88f3)

Author SHA1 Message Date
Trisha fb9b0c67f5 add multi-root 2022-03-25 16:14:22 -05:00
Trisha 436adb98ef 🚧 swich to the new routing func 2022-03-25 16:04:51 -05:00
Trisha de5338f4f2 ♻️ refactor: extract routing func 2022-03-25 15:47:34 -05:00
Trisha e6273209f9 🚧 wip: threading the multi-root stuff into the file server module 2022-03-25 15:40:36 -05:00
Trisha 81141e2faf add `file_server_roots` config 2022-03-25 15:30:38 -05:00
Trisha 8c4e7d484c ♻️ refactor: load server GUI config before creating the GUI 2022-03-25 15:24:45 -05:00
Trisha 1d9ef8f510 ⬆️ new FLTK 2022-03-25 14:42:50 -05:00
_ cffb888ac8 add download subcommand 2022-03-25 00:44:43 +00:00
_ c852efb343 add subcommand to generate a random ULID 2022-03-24 23:24:23 +00:00
_ 931ad6d81b 🔇 change logging a little 2022-03-24 22:45:19 +00:00
_ 80bd4abad3 🔊 change logs a bit 2022-02-06 20:03:27 +00:00
_ 6ea8b5c30f 🐛 bug: fix Cache-Control header so Nginx can cache my blog 2022-02-05 17:28:30 +00:00
_ e5d157e1af 🐛 bug: don't send Content-Length to relay if status code is 304 Not Modified
Thanks to Nginx for noticing this
2022-02-05 17:00:17 +00:00
_ 2656d16264 ♻️ refactor: extract `http_listen` fn 2022-02-05 16:52:56 +00:00
_ d96bf801c6 🔇 make logs quieter 2022-02-05 15:57:40 +00:00
_ c47ab6d282 🚧 wip: messing with cache parameters 2022-01-09 00:22:16 +00:00
_ b642142332 🐛 bug: fix content length when byte serving 2021-11-13 21:31:30 -06:00
_ 16aaac0965 🐛 bug: used the wrong PathBuf function in resolving the merge 2021-10-14 18:51:12 -05:00
_ 134035f198 Merge remote-tracking branch 'origin/main' 2021-10-14 18:35:31 -05:00
_ 1a775622cf 🐛 bug: fix compile bugs for tests 2021-10-10 18:24:35 +00:00
_ b21f8a7c50 ♻️ refactor: move `main` up 2021-10-10 18:20:08 +00:00
_ 98b43d1ba2 guess MIME for JavaScript files so that `ptth_file_server` can serve Jet Racing 4 locally.
Firfox has a bunch of odd security features that I only sometimes understand.
Among them is that it won't load JS files without the `content-type` header,
and it also disables a lot of features for the `file://` scheme. Which I think
is a shame. There's probably a good reason they do this, but I'm not aware of one.

So now you can use PTTH's file server to host Jet Racing 4.
2021-10-02 20:03:03 +00:00
_ 2972e85671 use rust_embed and default configs so you can call `ptth_file_server` from any working dir.
This is like Python's old `-m SimpleHTTPServer` but better because I wrote it.
2021-10-02 19:49:19 +00:00
_ f7b78b8a12 ⬆️ update to blake3 1.0.0 to de-dupe the cfg-if depend 2021-10-02 19:13:46 +00:00
_ b8d07c526a add ptth_file_server to ptth_multi_call_server.
Even with all 3 servers it's only 18 MB - Most of the big code is shared.
2021-10-02 19:07:55 +00:00
_ 4911a37887 add ptth_file_server depend to ptth_multi_call_server 2021-10-02 19:00:13 +00:00
_ 4c79af3f4b ♻️ refactor: clean up `.exe` handling and add a place for `ptth_file_server` 2021-10-02 18:58:27 +00:00
_ 4329562aa3 refactor and test the multi-call code 2021-10-02 18:47:10 +00:00
_ f44613540e add the multi-call server
This exe can act as both a PTTH and PTTH_QUIC end server.
It's only 17 MB, which is a big improvement over the 15 + 15 for shipping both servers as their own exes
2021-10-02 18:13:14 +00:00
_ 30f8bbb0aa ♻️ refactor inject CLI args instead of reading them in main 2021-10-02 17:31:06 +00:00
_ 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
_ 1abf1d194c 🚧 maybe HTTP Basic Auth? 2021-08-29 20:56:32 -05:00
_ 5376e8bba0 🚧 wip: add placeholder for client tokens 2021-08-29 20:17:25 -05:00
_ 324c1f7cd6 ♻️ refactor: remove pointless `Option <>` for file server root 2021-08-29 19:49:32 -05:00
_ 228a9b4262 🔊 scraper GETs have their own type of audit event now 2021-08-27 20:28:34 -05:00
_ a454585d9c 📝 document how scraper keys work 2021-08-27 20:17:59 -05:00
_ caaed8a5e1 remove 30-day limit on scraper keys 2021-08-27 18:34:38 -05:00
_ 918ea8c778 🔊 log error on URL routing failures 2021-07-27 03:17:26 +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
_ 0fe8c64c4f remove old port forwarding prototypes
ptth_quic is simpler and better
2021-07-18 09:20:33 -05:00
_ 02b6955a50 🐛 bug: allow `auto-gen-key` to also recreate the file and fix permissions 2021-07-13 16:02:49 -05:00
_ e21ba78fa5 GUI is working well now 2021-07-12 01:01:47 +00:00
_ ef27c0443d ♻️ refactor: use FLTK's event loop to simplify 2021-07-11 23:57:18 +00:00
_ 04975ee6c0 just disable Ctrl+C graceful shutdown in the GUI for now 2021-07-11 23:33:47 +00:00
_ 41d5b896a9 🐛 bug: the GUI can now restart `ptth_server` properly 2021-07-11 18:56:23 +00:00
_ 0d3b402050 add prototype FLTK GUI for ptth_server
Right now it can only start and stop the server once, due to a known
bug. Eventually I'd like it to be a user-friendly GUI with all the
required config files and maybe a folder browser so you can pick
which folder(s) are served.
2021-07-11 10:59:48 -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
_ 429d1cc957 🐛 bug: don't leak request IDs in the audit log 2021-07-11 10:56:40 +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
_ 0f7c95f79f should be possible to POST to servers now 2021-05-15 17:50:43 +00:00
_ af958ac43d 🚧 compiles but probably doesn't work 2021-05-15 17:25:13 +00:00
_ 6c34a1ef37 ♻️ refactor: prepare to allow POSTing to servers 2021-05-15 17:14:12 +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
_ ce82f7d6a3 one-click registration works 2021-05-02 22:23:12 +00:00
_ ebd1026903 🚧 working on one-click registration.
also removed many un-needed `Arc` wrappers
2021-05-02 21:59:04 +00:00
_ a4ec4878ea 🚧 one-click server registration 2021-05-02 21:18:07 +00:00
_ dc53aeed30 💄 sort unregistered servers by name 2021-05-02 18:30:03 +00:00
_ 62248aca53 💄 de-dupe unregistered servers list 2021-05-02 18:01:02 +00:00
_ 810a34463c ♻️ refactor: get rid of mod.rs 2021-04-29 23:03:01 +00:00
_ 90b6b6913e test persistent config 2021-04-28 21:52:43 -05:00
_ 4ec5d66d25 more audit logging 2021-04-28 20:18:53 -05:00
_ 8419871428 🚧 wip: testing a hypothesis about collecting metrics 2021-04-28 19:50:40 -05:00
_ e8e733046c 📝 docs: trying to figure how I can keep the client stream open 2021-04-27 22:36:44 -05:00
_ 3240ad72b2 ♻️ refactor: error handling 2021-04-27 21:39:42 -05:00
_ 33d07c45a8 ♻️ refactor: use `tokio::time::timeout` 2021-04-27 20:15:21 -05:00
_ a661ce02ea ♻️ refactor: extract park_client function 2021-04-27 20:10:32 -05:00
_ 6990be48d6 add config for relay listen address
this will make it easier to run on Wireguard or LANs or whatever
2021-04-27 18:48:22 -05:00
_ 522cbc5991 add server count and current time to server list page 2021-04-27 18:12:37 -05:00
_ 5ebdbaa225 🚧 wip: machine-editable config 2021-04-27 17:22:07 -05:00
_ c361ecd806 ♻️ refactor: extract builder for Relay 2021-04-27 15:05:27 -05:00
_ cfc2228491 add relay builder 2021-04-27 14:55:08 -05:00
_ 7c9238527f tests: add test for serializing tripcodes 2021-04-27 14:36:05 -05:00
_ 8f334f57a3 add serialize for server config structs 2021-04-27 14:31:58 -05:00
_ 4a73f48c68 tests: fix tests 2021-04-27 14:31:32 -05:00
_ b659d6b74f add "news" URL to server list page 2021-04-27 14:10:11 -05:00
_ 9eb470963c make an error transparent so it's more meaningful 2021-04-18 13:51:27 -05:00
_ d001d9efe5 📝 docs: add README to `ptth_relay` before publishing 2021-04-18 13:06:01 -05:00
_ 2c4d46388a 📝 docs: update README before publishing to crates.io 2021-04-18 12:56:36 -05:00
_ c3858ec8bf 📝 docs: fix code highlighting in docs, patch bump 2021-04-18 12:41:16 -05:00
_ 27b75fe424 📝 docs: update README for bottom crates 2021-04-18 12:37:37 -05:00
_ 67975d9b11 📝 docs: done with ptth_relay for now 2021-04-18 08:51:36 -05:00
_ c75448fe2c ♻️ refactor: remove un-needed muts 2021-04-18 08:33:07 -05:00
_ 146c91f2be ♻️ refactor: rename `RelayState` to `Relay` and privatize `load_templates` 2021-04-18 08:28:07 -05:00
_ c6f651387e ♻️ refactor: make `load_templates` private 2021-04-17 20:50:48 -05:00
_ ae4f102bdf ♻️ refactor: make git_version module private 2021-04-17 19:26:05 -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
_ d457feb35f 📝 docs: document ptth_core 2021-04-17 17:47:01 -05:00
_ a911e53e48 📝 docs: finish some basic docs for always_equal 2021-04-17 17:47:01 -05:00