Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timkurvers/redota-replay-proxy
Cloudflare worker proxy for Valve Dota 2 replays
https://github.com/timkurvers/redota-replay-proxy
dota dota2 gaming valve-corporation
Last synced: about 1 month ago
JSON representation
Cloudflare worker proxy for Valve Dota 2 replays
- Host: GitHub
- URL: https://github.com/timkurvers/redota-replay-proxy
- Owner: timkurvers
- License: mit
- Created: 2021-04-24T08:00:46.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-19T02:17:42.000Z (over 1 year ago)
- Last Synced: 2024-04-15T00:13:27.652Z (7 months ago)
- Topics: dota, dota2, gaming, valve-corporation
- Language: JavaScript
- Homepage: https://timkurvers.github.io/redota
- Size: 692 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ReDota Replay Proxy
![Node Version](https://badgen.net/badge/node/12+/green)
Cloudflare worker proxy for Valve Dota 2 replays.
# Background
Valve keeps replay files for public matches, used by both the official client for replay viewing
as well as by sites such as [OpenDota] and [Dotabuff] to analyze matches in further detail.Unfortunately, these Valve replay servers are not configured for [cross-origin resource sharing] and
as such cannot be reached by web clients, like [ReDota]. This project proxies the replay files,
making them available with the correct HTTP headers.# Setup & Development
Written in [ES2020+] and published as a Cloudflare worker using [wrangler].
1. Clone the repository:
```shell
git clone git://github.com/timkurvers/redota-replay-proxy.git
```2. Download and install [Node.js] 12+ for your platform.
3. Install dependencies:
```shell
npm install
```4. Run the worker locally on `http://localhost:8787` which automatically monitors source files:
```shell
npm run start:dev
```# Publishing
To publish the worker to Cloudflare, complete these additional steps:
1. Run `npx wrangler login` and authenticate with Cloudflare.
2. Copy `.envrc-sample` to `.envrc` and set its `CF_ACCOUNT_ID` to the Cloudflare account that will
own the worker.3. Source / load `.envrc`, either manually:
```shell
source .envrc
```Or let [direnv] do it for you automatically.
8. Configure `wrangler.toml`.
Then, to publish a new version, simply run:
```shell
npm run publish
```[Dotabuff]: https://dotabuff.com/
[ES2020+]: https://www.strictmode.io/articles/whats-new-es2020/
[Node.js]: https://nodejs.org/
[OpenDota]: https://opendota.com/
[ReDota]: https://github.com/timkurvers/redota/
[Valve]: https://www.valvesoftware.com/
[cross-origin resource sharing]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
[direnv]: https://direnv.net/
[wrangler]: https://github.com/cloudflare/wrangler