Commit graph

176 commits

Author SHA1 Message Date
666456e456 More release stuff (tools) 2024-08-15 11:50:44 -07:00
73126ba770 Update the release workflow
Use the python automation script instead
2024-08-15 11:43:53 -07:00
9c9f7cfa82 Release automation
There are a lot of steps in preparing the release and so I'm trying to
make sure that we're in a place where I can iterate on it locally.
2024-08-15 11:40:04 -07:00
7a40326719 Re-work config code
Add raw description as a possible config for a port, and update the
documentation appropriately.
2024-08-15 10:14:43 -07:00
74e2da2f29 Man page edits 2024-08-14 11:24:23 -07:00
cfde429786 A man page, somewhat 2024-08-14 11:22:50 -07:00
afa13bf920 This description is out of date
Given the introduction of anonymous ports
2024-08-14 10:52:19 -07:00
38fbfbd918 Move config file to ~/.config/fwd/config.toml
Presumably this also works for MacOS and windows.

While doing this, move away from xdg and home and use this
directories-next crate instead. Reverse connections still seem to
work.
2024-08-14 10:51:19 -07:00
663ce42016 tempdir -> tempfile
According to the documentation of the tempdir crate
2024-08-13 10:59:47 -07:00
e44d4dea7a Also update the fuzzing targets, I guess 2024-08-13 10:56:29 -07:00
4fe255e7d2 Fix colors in the help box
When the lines of the help box overlap with disabled or error'd ports
you might notice that those lines are dark grey or red. That's
surprising!

The bug is that Style::default() means "don't change anything", just
continue being whatever color the current cell is, which is deeply
surprising. What we really want here is `Style::reset()`, which means
"reset the colors to whatever the terminal would show by default."
2024-08-13 10:52:20 -07:00
b381f71692 Move from tui to ratatui
Tui is no longer supported, ratatui is the new hotness. Fortunately
there is very little difference between the two, except I've noticed a
fun new bug in the help screen. (Maybe it's been there the whole time?)
2024-08-13 10:44:58 -07:00
7e047626df Bump to the next version 2024-08-13 07:24:29 -07:00
68f3c4fa4e Experimental updates to release workflow 2024-08-13 07:23:59 -07:00
df914e68f2 I *think* I need something other than macos-12 for aarch64
https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
2024-08-12 17:57:36 -07:00
a7202010d0 Probably we should run tests as part of release? 2024-08-12 17:43:17 -07:00
df0ca4ce31 Remove "users" crate, call libc directly
This is all I actually needed anyways
2024-08-12 17:37:34 -07:00
35dcf93971 Add fuzzing based on serde_json
This test ensures that we can parse anything that serde_json can
produce, which *ought* to ensure reasonable coverage?
2024-08-12 17:18:26 -07:00
43f6b75762 Rename fuzz target to something more meaningful 2024-08-12 11:44:02 -07:00
542127f723 Handle transfer-encoding chunked in docker responses
Yeah, OK, thanks HTTP.
2024-08-12 11:28:59 -07:00
665fccf753 Add trace logging to the docker refresh
That way we can see what's going on with docker responses if they're weird.
2024-08-12 10:07:42 -07:00
e27b788e8f Fuzzing for the json decoder
Hey it seems like it's working!
2024-08-12 09:43:56 -07:00
77cbf1700f Check for unterminated strings properly
Also, public to enable fuzzing. This was the first catch!
2024-08-12 09:41:22 -07:00
9b0a39fa90 Bump crate version 2024-08-12 09:14:22 -07:00
4647226ee7 Handle blank input a little more cleanly 2024-08-12 09:11:21 -07:00
03de4a4661 Yet another tweak to git process for cargo publish 2024-08-10 09:00:20 -07:00
9ad55c903f Speculative changes to github workflows 2024-08-10 08:13:45 -07:00
a9bbd29f9f Fix enable/disable state changes
Enabled -> Broken -> Disabled -> Enabled

etc
2024-08-10 07:59:46 -07:00
a4745c92e2 Anonymous ports
This is the other way to allow ports to work when the processes
themselves cannot be enumerated: just report the port with an empty
description. We need to do some work to make sure this is safe for the
client; see comments.
2024-08-10 07:44:06 -07:00
69b9bc9824 Sometimes you can't get a clipboard, don't fail
This should fix CI as well, but there are possibly folks out there
that don't have a functioning clipboard and still want to run.
2024-08-10 07:29:54 -07:00
bb8c87bad9 Anonymous ports are described with a fixed string 2024-08-10 07:02:46 -07:00
b86a09131b Don't enable anonymous ports by default 2024-08-10 06:58:22 -07:00
de06612eb1 Respect server-wide auto setting 2024-08-10 06:54:26 -07:00
cc004df6e8 Clippy 2024-08-10 06:48:24 -07:00
e32f27494a Tweak git status *again*
Turns out that in order to go from clean to dirty you need to
watch *everything*. Caching is hard, man.
2024-08-09 14:05:07 -07:00
c6aa657b4c Fix warning in windows 2024-08-08 21:13:14 -07:00
0ad0fb1a56 That was completely wrong
Look the whole point of the ports in the config is to have them
enabled *even if the server doesn't show them to you.* The other
behavior was just completely wrong in that respect.
2024-08-08 18:21:47 -07:00
8f12945d83 Fix up port state interactions in the face of configuration 2024-08-08 14:26:41 -07:00
6736cdd431 Additional tests for configuration 2024-08-08 10:26:36 -07:00
e1768a0433 Honor the configured description for a port, if any
Get rid of that dumb warning, can't believe I forgot to wire this for
so long.
2024-08-08 10:15:42 -07:00
2a582e25a8 Many fixes for the clipboard and others
- Reverse connections must be maintained to ensure messages are
  processed in order. (Whoops!)
- The clipboard context must remain live in order for the data to
  remain available for applications, at least on X11. (And it couldn't
  hurt elsewhere, either, I guess.)
- Print out the server version at startup time, so we can be sure what
  we're talking to.
- Print out the full details of the error when something goes wrong
  with `browse` or `clip`.
2024-08-08 10:07:57 -07:00
a3fa032500 Fix git status parsing 2024-08-08 07:18:13 -07:00
b8fe678ff0 Repository information in version 2024-08-07 12:14:17 -07:00
8a60f89110 Fix small JSON bugs, bring in test suite
Just decided to "harden" the JSON parser a little bit with the test
suite from https://github.com/nst/JSONTestSuite. Now I'm pretty sure
that we can handle whatever JSON docker throws at us.
2024-08-06 09:22:11 -07:00
9ef5515f01 Clippy 2024-08-06 06:51:03 -07:00
1f19792c58 Merge branch 'main' into quodlibetor/support-server-logs 2024-08-06 06:39:14 -07:00
Brandon W Maister
b983595049 feat: Show errored ports as an error state 2024-08-05 12:16:47 -07:00
5e96b37f5b Docker support
This is the most basic kind of docker querying you will find. Does not
support HTTPS. Seems to work for local docker engines. Has not been
tested against remote docker engines, or full URLs.

Note that if you want this to work you'll have to configure docker to
allow manipulation without being root, i.e., the user you connect as
will need to be in the `docker` group.

This was done instead of pulling in the `bollard` crate. Maybe I'm
being silly, but `bollard` uses a whole lot of other crates in the
name of being general and robust. These crates, however, add an
unacceptable size to the final binary. (In the experiment I ran, on a
release build, the binary size went from 2904696 to 4840968 bytes: an
increase of 1.8 MB. With this patch the release binary is 2986360
bytes, which is an increase of 80k.)

I wanted to see exactly what I could get away with when it came to
talking to docker. This here actually seems like a fine compromise:
HTTP is very simple if you only have to worry about one specific
server, and JSON is not very hard to parse if you don't care too much
about error handling, or are willing to play fast and loose with
punctuation (which I am).
2024-08-05 12:04:26 -07:00
Brandon W Maister
18da61ed32 make server logging show messages in the frontend
now you can use the log crate and get messages in the frontend.
2024-08-05 16:59:41 +01:00
8135f163f2 Refresh is async
Now we are ready for more asyncery (e.g., docker)
2024-08-04 08:29:33 -07:00