Urls should be formatted as http(s)://<root>/<twitch clip ID/twitch clip URL>
https://cliparchive.example.com/https://www.twitch.tv/ivycomb/clip/AbnegateCrazyClipsdadKevinTurtle-vk_Spe6R93eXjdiahttps://cliparchive.example.com/AbnegateCrazyClipsdadKevinTurtle-vk_Spe6R93eXjdia
The proxy functions as follows:
- On Request:
- Check twitch API for clip
- Clip Exists:
- Check archive for clip
- Not Found | Archive clip & Redirect to Twitch (The page will hang for up to a couple minutes while the clip archives)
- Found | Redirect to Twitch
- Check archive for clip
- Clip does not exist:
- Check archive for clip
- Not Found | Display error page
- Found | Serve Video
- Check archive for clip
- Clip Exists:
- Check twitch API for clip
- Lack of video download validation (Can lead to currupted downloads)
- Downloader binaries are embedded (Just... bad.)
- No status page while clip archives (Leads to the page just... hanging)
- Error pages are raw JSON responses (Looks bad)
sudo apt install ffmpeg
npm install
npm start
Located at root:
.env:
SERVER_PORT=<Port>
SERVER_HTTPS=<1 or 0>
CLIP_DOWNLOAD_PATH=<Relative path towards clip folder>
TWTICH_CLIENT_ID=<Twitch application client ID>
TWITCH_CLIENT_SECRET=<Twitch application client Secret>
Example:
SERVER_PORT=8000
SERVER_HTTPS=0
CLIP_DOWNLOAD_PATH=./clips
TWTICH_CLIENT_ID=p****************************8
TWITCH_CLIENT_SECRET=n****************************m
HTTPS requires certificates at the root:
domain.keydomain.crtca_bundle.crt
This repo contains binaries from: