2.0.1-build.1 • Published 3 years ago

@mangadex/cloud v2.0.1-build.1

Weekly downloads
19
License
Unlicense
Repository
github
Last release
3 years ago

MangaDex@Cloud

This is a lean and secure focused NodeJS based alternative to other MangaDex@Home clients. This client does not process or store any analytics, so it saves performance and honors the privacy of connecting users. Requests to common metric endpoints such as /prometheus or /metrics are blocked to prevent attacks or accidantely expose system data. In additon to the file based image caching on a local drive (as the official client does), this client also offers the ability to use a cloud CDN (e.g. CloudFlare). With this option the client does not need a large and fast hard drive, but requires higher bandwidth to deal with the incoming requests when fetching the images from the CDN.

The cloud CDN mode is very convenient in combination with some cheap VPS providers such as Hetzner that are offering instances with very low disk space, but decent monthly bandwith quota (some providers even exclude the incoming data from the quota).

npm.io npm.io npm.io


Cloud CDN

In order to use this client for cloud caching instead of local caching, a CDN such as CloudFlare is required. It is possible to use the official image servers directly, but this would obviously defeat the purpose of caching at all. The basic idea is to setup a domain such as cdn.mangadex-network.cf and configure it for any cloud CDN provider as CNAME for the current upstream server reh3tgm2rs8sr.xnvda7fch4zhr.mangadex.network, s2.mangadex.org or s5.mangadex.org.

TIP: At the time of writing, free domains are available at freenom


Runtime

To join the MangaDex@Home network, you need to be a registered user with a Client Key to operate a MangaDex@Home client. To run the application you need to install the following additional software:

Installation

Install the application globally via NPM by running the command:

sudo npm install -g @mangadex/cloud

Updating

If the application is already installed, it can be simply updated via NPM by running the command:

sudo npm update -g @mangadex/cloud

Running

To start the application the user needs to provide a valid client key, a port for communication and the URL to the CDN (which needs to be setup separately, e.g. CloudFlare) or a local directory for caching images via commandline args.

# cloud caching
mdath --key=xxxxxxxx --port=443 --cache=https://cdn.mangadex.cache
# local caching
mdath --key=xxxxxxxx --port=44300 --cache=/var/lib/mangadex/cache --size=256

TIP: Use the --help option to show all commandline arguments


Development

To start development you need to install the following additional software:

Clone Repository:

git clone 'https://github.com/mangadex-network/mangadex-at-cloud'

Debug

It is possible to run the application locally without connecting to the MangaDex control server. In this mode requests can be made via CURL, or automated with any tool of the developers choice. A remote debugger such as VS Code or Chrome may be attached to the spawned process.

npm run serve

Sample Query with CURL:

curl --insecure -H 'Host: localhost.mangadex.network' 'https://localhost:44300/data/46674605f17f6e5c77f6a094bf1adfd1/x2.jpg' -D /dev/stdout -o /tmp/image.jpg

TIP: Consider that request validations for e.g. Referer or Token are still in place and can be tested as well

Live Performance

The following screenshots provide some sample footage from an instance running on the mangadex network

MangaDex@Home Configuration

npm.io

VPS Plan

npm.io

VPS Statistics

npm.io

MangaDex Network Statistics

npm.io

Cloud CDN Statistics

npm.io

2.0.1-build.1

3 years ago

2.0.0-build.4

3 years ago

2.0.0-build.3

3 years ago

2.0.0-build.2

3 years ago

2.0.0-build.1

3 years ago

1.2.2-rc.5

4 years ago

1.2.2-rc.3

4 years ago

1.2.2-rc.4

4 years ago

1.2.2-rc.1

4 years ago

1.2.2-beta.15

4 years ago

1.2.2-beta.14

4 years ago

1.2.2-beta.13

4 years ago

1.2.2-beta.11

4 years ago

1.2.2-beta.12

4 years ago

1.2.2-beta.9

4 years ago

1.2.2-beta.8

4 years ago

1.2.2-beta.7

4 years ago

1.2.2-beta.6

4 years ago

1.2.2-beta.5

4 years ago

1.2.2-beta.4

4 years ago

1.2.2-beta.3

4 years ago

1.2.2-beta.10

4 years ago

1.2.2-beta.2

4 years ago