Skip to content

Latest commit

 

History

History
67 lines (45 loc) · 1.59 KB

README.md

File metadata and controls

67 lines (45 loc) · 1.59 KB

RLP proxy (rewrite)

Proxy for react-link-preview.

Written from scratch to reimplement rlp-proxy, which is all rights reserved.

Features

  • this proxy is based on puppeteer, therefore it is able to work with most sites, including react apps such as metahkg.org.
  • more sites can be accessed with puppeteer-extra-plugin-stealth.
  • uses fastify (instead of express)
  • caching with mongodb, also caches null metadata
  • auto delete successful caches after 30 days, null caches after 1 day
  • 4 seconds timeout

Compatibility

  • /v2 is highly compatible with the original rlp-proxy, however it DOES NOT give an error code when the site is not found / the site gives out any errors, simply returns { metadata: null }
  • this proxy does not support v1, / is an alias of /v2

Other information

  • rate limit:
    • cached: 200 / 30 seconds
    • uncached: 5 / 30 seconds
  • Warning: slower since it uses puppeteer
  • the querystring url should be UTF-8 encoded, or some urls may not be supported

Deployment

Docker

cp docker/template.env docker/.env

Then config variables in docker/.env, after that either follow prebuilt or from source.

Prebuilt

yarn docker

From source

yarn docker:source

Manually

Requirements

  • mongodb
cp template.env .env

Then config variables in .env, after that:

yarn build
yarn start