Commit Graph

21 Commits (4b1fc5c1fc093f04345c6c8c2ba66662f961f6e9)

Author SHA1 Message Date
knotteye 4b1fc5c1fc Make adapative streaming full configurable 2019-12-05 18:27:29 -06:00
knotteye 25cf8a37a2 Big Commit!
Seriously, this one is pretty massive. Satyr now has proper sessions in the browser (like a real website), and a lot of changes were made.

API Endpoints were changed from requiring a username and password to requiring a valid JsonWebToken, obtained from /api/login
Satyr will generate a PEM format key for JWT signing and verification on startup if it can't find one at config/jwt.pem
This file was added to .gitignore
Two new depencies: cookie-parser and jose, for reading and signing JWTs.

Refactored http.ts into mutiple functions, with a couple helper functions related to cookies and JWT decoding and verification. Socket.IO chat will also automatically log in users with a valid JWT.

Refactor api.ts to reflect new requirements from endpoints.

Minor bugfix in server.ts so we don't throw an uncaught exception when rejecting a stream with an invalid key.

Transcode options readded to default.toml. They do nothing and they are not sane defaults. Both of those things are in the todo list.
2019-12-03 19:51:14 -06:00
knotteye 31426a0c41 Fix a bug where we treated local clients the same as foreign ones 2019-11-30 14:15:31 -06:00
knotteye daa2ec7a71 Refactor stream key handling
Instead of redirecting with FFMPEG, change client streamPath to the privateEndpoint/StreamKey
Hopefully this is silent, because if it isn't it's leaking the stream key to every client.
2019-11-27 22:18:55 -06:00
knotteye f7d9c78d09 Move transcode config to mkdir callback 2019-11-25 09:36:50 -06:00
knotteye 1f3504f698 Fix a bug where streams would crash upon FFMPEG exceeding maximum child_process buffer
Change scripts to automatically build before serving
Move typescript to dependencies
Check if the stream is ready to transcode to MPEG-DASH programmatically instead of waiting for 5 seconds
Use session.isLocal instead of matching session.ip against some strings
(session.isLocal does that internally but at least this way looks prettier)
2019-11-24 20:25:19 -06:00
knotteye 7db22a974d Fix hardcoding of ffmpeg binary 2019-11-16 15:35:30 -06:00
knotteye 93abcb0538 Move from exec to execFile to avoid any potential security issues. 2019-11-16 14:42:26 -06:00
knotteye 7983b60f8d Switch from transcode server in node-media-server to spawning ffmpeg processes
Change config to reflect that
ffmpeg processes cleanup after themselves even on SIGINT now, cleanup.ts only cleans the database now
Adaptive livestreaming!
2019-11-16 11:38:28 -06:00
knotteye f9e4a7a5c6 I don't even know.
Filled out API for user management
Proper escaping of user input for SQL queries (stream keys aren't user input)
Filled out frontend with profile management, vods, etc.
I don't remember there's probably more, fuck.
2019-10-05 14:34:57 -05:00
knotteye b0533f973b Added some api functions, an express server for the API and nunjucks
Added nunjucks templates for frontend pages.
2019-09-28 21:44:55 -05:00
knotteye 085dd02148 Changed init functions to be more consistent.
Added setup script and templates for config and database setup.
Fixed typo in tsconfig.
2019-09-26 14:43:24 -05:00
knotteye 68f9866c16 Added cli for user management, abstracted some database queries into handler functions. 2019-09-24 17:29:37 -05:00
knotteye abcd6787ca Worked out bugs in config and checking if localhost
Added comments to server.ts to improve readability
2019-09-23 15:59:07 -05:00
knotteye 27eafbd71d Added runtime config. 2019-09-23 14:27:01 -05:00
knotteye 935b850bcd Hooked up server.ts to database, it now validates, redirects, and records based on database queries.
Added setup script for database.
Added database.ts to create and manage a pool of connections. Possibly abstracting query logic in the future.
Updated controller to instantiate database.ts.
2019-09-22 16:33:18 -05:00
knotteye d05c59c896 Added executable
Added controller file to launch other processes
Moved compile dir to build
2019-09-20 11:09:15 -05:00
knotteye 4309da7c39 Added setup script for inspIRCd
Added bot script for registering and unregistering permanent channels
TODO: inspircd config template
2019-09-18 16:46:25 -05:00
knotteye 61d0e0bd0e Add package.json and LICENSE, name the project. 2019-09-15 12:23:09 -05:00
knotteye e128bdcdaa Added skeleton function for recording. 2019-09-14 21:24:05 -05:00
knotteye 5a637ce866 Initial
Added initial setup of ircd and node-media-server
Skeletion function in node-media-server prepublish for authenticating and redirecting streams.
2019-09-11 19:28:17 -05:00