Commit graph

155 commits

Author SHA1 Message Date
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
c2c57289cf Refactor refresh
Moving different mechanisms into different conditionally-compiled
modules. This way it can be extended, e.g. with docker lookups, MacOS
support, etc.
2024-08-04 08:14:19 -07:00
75343dbea2 Fix build break for windows (oops)
Really need to have better cross-building infrastructure for my own
personal garbage.
2024-08-04 08:11:00 -07:00
6335944591 One more test 2024-07-31 15:07:27 -07:00
3b1847d882 Require a file name for 'clip', use '-' for stdin
This makes argument parsing more reliable: to `fwd` to a server named
`clip` just leave off the file name.
2024-07-31 15:06:20 -07:00
46bd840bc0 Another test for clip garbage 2024-07-31 14:58:11 -07:00
604f31d8e6 Fix argument parsing (whoops)
This whole command line thing is actually busted; probably should make
it a little bit more robust.
2024-07-31 14:56:50 -07:00
3cb40bc2f4 Clippy 2024-07-31 14:45:20 -07:00
a40a493d39 Initial implementation of clipboard forwarding 2024-06-23 08:54:41 -07:00
fb86cbd0de Bump crate version for unreleased 2024-06-22 07:32:43 -07:00
3eba65f6e6 Refactor in prep for clip 2024-06-22 07:32:11 -07:00
3f7afc5b78 More clippy 2024-06-22 06:13:09 -07:00
08a41492b8 Clippy I guess 2024-06-21 08:26:56 -07:00
1e33561d92 Allow manual trigger of workflow dispatch 2024-04-14 06:51:26 -07:00
e11b6e025e Maybe release for aarch64? Who can say. 2024-04-13 14:59:19 -07:00
7766feafd4 Bump the version in the crate
Forgot to do this on release, whoops
2024-03-01 06:15:56 -08:00
10984034fa Supply the error message when connect fails
This might be too ugly
2024-02-29 13:16:16 -08:00
0368074ea0 Explicit tokio features
Somehow I thought this would make my binary smaller lol
2023-11-25 08:04:40 -08:00
2684d7f009 Upgrade dependencies 2023-11-25 07:58:00 -08:00
00daedeb95 Some silly refactoring 2023-11-25 07:57:52 -08:00
519b7bc415 Display the URL we're trying to open when it fails
This means that it is not lost forever and you can, I don't know,
click it in your terminal window or something.

(Thanks @quodlibetor for the patch!)
2023-11-25 07:33:44 -08:00
9671da9750 Make notes about the future 2023-08-28 09:25:46 -07:00