Go to file
3nprob b382e8701b lint 2021-10-07 15:15:35 +09:00
samples Make comments optional 2021-10-07 01:01:37 +09:00
src lint 2021-10-07 15:15:35 +09:00
static/css Multi-album support 2021-10-07 02:47:10 +09:00
templates Multi-album support 2021-10-07 02:47:10 +09:00
.dockerignore Add Dockerfile 2021-10-07 01:01:36 +09:00
.eslintrc Add eslint 2021-10-07 15:13:51 +09:00
.gitignore First commit: /a/, /gallery/, images, gifv 2021-10-07 01:00:58 +09:00
Dockerfile fixup Dockerfile 2021-10-07 02:47:31 +09:00
LICENSE Add README, LICENSE 2021-10-07 01:19:35 +09:00
README.md !CONFIG.disable_comments <=> CONFIG.use_api 2021-10-07 15:00:50 +09:00
package-lock.json Add eslint 2021-10-07 15:13:51 +09:00
package.json Add eslint 2021-10-07 15:13:51 +09:00
tsconfig.json First commit: /a/, /gallery/, images, gifv 2021-10-07 01:00:58 +09:00

README.md

rimgu: image host alternative frontend

rimgu is an alternative frontend / proxy for imgur

It's read-only and works without browser JavaScript. Images and albums can be viewed without wasting resources and anyonymity from downloading and running tracking scripts. No sign-up nags.

It's lightweight and easy to configure.

Inspired by and (soon) integratable with:

This is currently very early stage software. Some things left to implement (contributions welcome!):

[ ] Localization/internationalization [ ] Pretty CSS styling [ ] Automatically fetch / rotate / renew client ID [ ] Support for other popular image sites than only imgur [ ] Prometheus metrics

Things that are currently considered out of scope:

  • Uploading/commenting/voting/etc - rimgu is read-only for now.
  • Caching, authentication, serving HTTPS, rate limiting etc - Just use a load balancer like haproxy/envoy/nginx/traefik/caddy.
  • Anything requiring client-side JS or client-side directly interacting with upstream servers

Building

Locally

Dependencies:

  • node.js >= v16 (earlier most likely works fine)
$ npm install && npm run build

Docker

$ docker build -t rimgu:latest .

Running

Locally

$ node dist/index.js

Docker

$ docker run -p 8080:8080 -e -it RIMGU_ADDRESS=0.0.0.0 -e RIMGU_PORT=8080 rimgu:latest

Configuration

Rimgu is configured via environment variables. See available variable in src/config.ts.

API and client ID

Media and galleries can be scraped without authorization through the public web interface. Some imgur functionality (comments, full albums) requires a provisioned client ID to authenticate requests.

You can get a client ID by opening https://imgur.com in a web browser and looking for requests to https://api.imgur.com/...?client_id=1234567deadbeef under "Network" in the developer console.

To run without API/key: RIMGU_USE_API=false

To run with API/key: RIMGU_USE_API=true RIMGU_IMGUR_CLIENT_ID=1234567deadbeef

This key may be used to track you and could be banned when overused. Keep this in mind before exposing a public instance with a client key associated with your personal imgur account. Consider any ToS you may have signed before associating a personal imgur account with a public instance.

Contributing

PRs are welcome! Before submitting a PR, please make sure linting passes successfully:

$ npm run lint

This software is released under the AGPL 3.0 license. In short, this means that if you make any modifications to the code and then publish the result (e.g. by hosting the result on a webserver), you must publicly distribute your changes and declare that they also use AGPL 3.0.

You are also requested to not remove attribution and donation information from forks and publications.