diff options
author | metamuffin <metamuffin@disroot.org> | 2022-09-09 19:18:42 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2022-09-09 19:18:42 +0200 |
commit | 962ec1b9a0b44661e46acf81e867e81e87d53038 (patch) | |
tree | 006ccc7d378dd193cffab581131f91e3235e7066 | |
parent | 7c0c2c0894796800da85514fc948b5662f1b7ab0 (diff) | |
download | keks-meet-962ec1b9a0b44661e46acf81e867e81e87d53038.tar keks-meet-962ec1b9a0b44661e46acf81e867e81e87d53038.tar.bz2 keks-meet-962ec1b9a0b44661e46acf81e867e81e87d53038.tar.zst |
watch-builder can be replace with `deno bundle --watch`
-rw-r--r-- | client-web/watch-builder.ts | 36 | ||||
-rw-r--r-- | readme.md | 2 |
2 files changed, 1 insertions, 37 deletions
diff --git a/client-web/watch-builder.ts b/client-web/watch-builder.ts deleted file mode 100644 index 05871e1..0000000 --- a/client-web/watch-builder.ts +++ /dev/null @@ -1,36 +0,0 @@ - -// `emit` uses fetch to *download* was, that is just stupid -// import { bundle } from "https://deno.land/x/emit@0.1.1/mod.ts"; - -// instead, lets run `deno bundle` manually - -async function bundle(entry: string, options: { compilerOptions: { checkJs: boolean } }) { - const proc = Deno.run({ cmd: ["deno", "bundle", options.compilerOptions.checkJs ? "--check" : "--no-check", "--unstable", entry], stdout: "piped" }) - const out = await proc.output() - const code = new TextDecoder().decode(out) - return { code } -} - -let refresh_needed = false -let refresh_pending = false -async function refresh() { - refresh_needed = true - if (refresh_pending) return - refresh_needed = false - refresh_pending = true - - try { - const { code } = await bundle("source/index.ts", { compilerOptions: { checkJs: false } }) - await Deno.writeTextFile("public/assets/bundle.js", code) - } catch (e) { console.error(e) } - - refresh_pending = false - if (refresh_needed) refresh() -} - -refresh() -for await (const event of Deno.watchFs("source")) { - if (event.kind == "modify" || event.kind == "create") { - refresh() - } -} @@ -22,7 +22,7 @@ GNU Affero General Public License version 3 only; See [COPYING](./COPYING). keks-meet _tries_ to be secure. However I am not a security expert. The current system works as follows: - The room name is set in the section of the URL (-> not sent to the server) -- The server receives a salted hash of the room name to group client of a room +- The server receives a salted SHA-256 hash of the room name to group client of a room - We use PBKDF2 (constant salt; 250000 iterations) to derive a 256-bit AES-GCM key - All relayed message contents are encrypted with this key. - Message recipient is visible to the server |