Commit Graph

155 Commits

Author SHA1 Message Date
Elijah R
b7a02f9874 fix vnc on windows 2024-08-04 18:28:33 -04:00
Elijah R
2b90bc03c8 that should not be there 2024-08-04 16:01:50 -04:00
Elijah R
b00c662b95 make rustfmt.toml consistent with editorconfig because of course rustfmt refuses to use the editorconfig 2024-08-04 15:59:39 -04:00
Elijah R
64d4774d00 chore: comment config.example.toml and format code with prettier/cargo 2024-08-04 15:50:00 -04:00
Elijah R
5aa842bb3e switch to mariadb library
ok mdmck you can stop putting eggs in my mailbox now
2024-08-04 15:32:43 -04:00
Elijah R
b0c23c3cdf Add internal banning (cvmban) using MySQL 2024-08-04 15:32:43 -04:00
MDMCK10
d16c045b04 Remove unused config options 2024-08-04 21:07:59 +02:00
MDMCK10
ddcba7b308 Fix cvm-rs build on Windows, replace Just with yarn builtin, make clean work on Windows 2024-08-02 21:01:53 +02:00
Elijah R
11380f00cf unfuck vncvm 2024-08-01 18:13:06 -04:00
Undefishin
5f5d92522f Update README.md 2024-07-30 22:49:59 +03:00
dependabot[bot]
fb9e5845a2 Bump braces from 3.0.2 to 3.0.3
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-30 14:21:26 -04:00
dependabot[bot]
4ace8ef04e Bump ws from 8.16.0 to 8.17.1
Bumps [ws](https://github.com/websockets/ws) from 8.16.0 to 8.17.1.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.16.0...8.17.1)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-30 14:20:32 -04:00
Elijah R
df76345cdc Merge pull request #21 from computernewb/crusttest-refactoring
merge refactor branch
2024-07-30 14:18:11 -04:00
modeco80
432e75d42a cvmts: Use npm versions of superqemu/nodejs-rfb.
We publish them now, so let's use them in cvmts!

Additionally, this removes the 'shared' module entirely, since it has little purpose anymore. The logger is replaced with pino (because superqemu uses pino for logging itself).
2024-07-16 08:29:52 -04:00
modeco80
cf9f11819e qemu: remove more dead code
Not sure how I missed this.
2024-07-16 07:02:20 -04:00
modeco80
b9b0aa91df qemu: remove the last sleep call
Finally, no more hacky sleep calls are left. Woohoo. This was already
effectively done by the previous commit, but now that I know it works,
I've removed the test path entirely
2024-07-16 06:43:20 -04:00
modeco80
6a4c1e6ac2 qemu: Make sure stdin is open before writing
oops. Not sure how I didn't think of that.
2024-07-16 06:35:58 -04:00
modeco80
7413059193 qemu: Switch to QMP over stdio
Simply a more convinent pipe. Additionally, because the pipe will only break when the process exits,
this means we can now remove QMP reconnection logic entirely. Can't exactly have problems
when the problem code is factored out ;)
2024-07-14 19:04:19 -04:00
Mallory
2e17a11426 unnecessary 2024-07-12 16:04:18 -04:00
modeco80
e28bb3a9d7 remove connect/view gating (for now) 2024-07-11 20:49:49 -04:00
modeco80
ddf4d97511 qemu: more refactoring
qmp client is now much more robust (and doesn't fight over itself as much). this should
hopefully completely eliminate the case where display connects but qmp is half connected.

i also forgot QemuDisplay actually emits an event on connection, so we can just use that to
wait for when the display connects. which allows us to set the started state there instead of praying
when the qmp client connects that we are connected to the display roughly at the same time.

i also gated some stuff to require vm state in the server. this is a bit rickity, but does seem to work.
2024-07-11 20:33:50 -04:00
modeco80
7423c62957 re-add magic timeouts
also remove a problematic line that broke more than it helped
2024-07-11 03:39:00 -04:00
modeco80
25b32b23b7 qemu: More fun refactoring
The QMP client has been refactored slightly, mostly just to clean up its
edges slightly.

QemuVM however has seen a big refactor, especially connecting to QMP.
Flattening out this logic is something I should have done a long time ago.

This seemingly has finally hammered out the bugs, although time will tell.
2024-07-11 03:24:22 -04:00
modeco80
0b59c6d8be QMP client now buffers lines properly 2024-07-11 02:29:26 -04:00
modeco80
227a171110 qemu: Completely rewrite QMP client from scratch
It sucked. The new one is using Sans I/O principles, so it does not
directly do I/O or talk to a net.Socket directly (instead, QemuVM implements
the layer to do I/O). This means in the future this library could actually
be tested, but for now, I'm not bothering with that.

There's also some other cleanups that were bothering me.
2024-07-10 22:20:12 -04:00
modeco80
048f08b00b actually make vm swich displays properly or whatever 2024-07-10 18:43:35 -04:00
modeco80
bee25b5381 Fix the ability for IPData refcount to go negative 2024-07-10 18:32:05 -04:00
Elijah R
a2f450b374 move binprotocol to submodule (server) 2024-06-25 21:24:08 -04:00
Elijah R
3384e47e20 use msgpackr instead of @ygoe/msgpack 2024-06-25 20:09:34 -04:00
Elijah R
fe830afdeb add support for binary JPEG (server) 2024-06-25 19:56:28 -04:00
modeco80
8369de53ba qemu: log QEMU stderr as logger messages
Mostly for nicity, but also to make debugging start errors an actual possibility.
2024-06-23 02:56:17 -04:00
modeco80
2cc2c6ddf2 cvmts: "fix" panics in cvm-rs 2024-06-23 02:55:05 -04:00
modeco80
0df56cb5a4 qemu: cleanup/fix reset 2024-06-23 02:40:13 -04:00
Elijah R
1a5a0cd407 add geoip country flag support 2024-06-23 02:24:03 -04:00
Elijah R
85a86327f4 add missing XFF warning, remove ipdata check from WSServer because CollabVMServer already does that 2024-06-23 02:24:03 -04:00
modeco80
286f3eec62 cvm-rs: Actually throw Error on guac decode errors
we were throwing String or something before..
2024-06-23 02:11:23 -04:00
Elijah R
020c6310ec some fixes and improvements to build
- change .yarn/ gitignore to include subprojects
- add nodejs-rfb to build (and bump it)
- add clean script
2024-06-22 22:57:01 -04:00
Elijah R
014650991c bump rfb 2024-06-22 21:52:20 -04:00
Elijah R
d100721a64 update yarn.lock 2024-06-22 21:50:29 -04:00
modeco80
183b17194e chore(README): cargo is usually a default part of a complete Rust toolchain so just specify "A Rust toolchain" 2024-06-22 21:46:37 -04:00
Elijah R
5a67deb59b add --needed and -y flag to pacman command 2024-06-22 21:44:22 -04:00
Elijah R
1079a847a8 remove npm from arch deps (thought corepack was provided by npm, it's actually provided by nodejs itself) 2024-06-22 21:43:46 -04:00
Elijah R
47dae01d3e add dependencies to README, remove not-so-frequently-asked questions 2024-06-22 21:39:01 -04:00
modeco80
dda72cad91 cvmts: quth => auth 2024-06-22 21:27:28 -04:00
modeco80
09d41617ed prettier reformat for merge (and remove jpeg-turbo Again) 2024-06-22 21:26:49 -04:00
Elijah R
b0829d5bcf add just-install dev dependency 2024-06-22 21:24:41 -04:00
modeco80
b8ed177885 cvm-rs: merge guac and jpeg libs together into one
doesn't really need to be two seperate libraries. also preperation for other funnies

the build script has been replaced with a much saner justfile which uses much saner "yarn workspace" invocations instead of blindly cding all over the place
2024-06-22 21:14:05 -04:00
modeco80
87a377a10f cvmts: replace jpeg-turbo native module with new rust module
This module also does threadpooling internally, so we don't need Piscina anymore (which I'm pretty sure was actually bottlenecking.)
2024-06-20 03:20:56 -04:00
modeco80
39521a4b1d misc stuff from production
(also refactors qemu a bit)
2024-06-19 23:30:29 -04:00
modeco80
97de887518 cvmts: Actually unref ipdata on disconnect 2024-06-19 18:26:27 -04:00