Update readme
This commit is contained in:
parent
c98a6d59f4
commit
7bd9189ebd
1 changed files with 24 additions and 40 deletions
64
README.md
64
README.md
|
@ -8,18 +8,27 @@ This client contains the following features:
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
Since we use SQLx there are a few things you'll need to do. First, you'll need
|
|
||||||
to run the init cache script, which initializes the db cache at
|
|
||||||
`./cache/metadata.sqlite`. Then you'll need to add the location of that to a
|
|
||||||
`.env` file:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# In the project root
|
|
||||||
./init_cache.sh
|
|
||||||
echo "DATABASE_URL=sqlite:./cache/metadata.sqlite" >> .env
|
|
||||||
cargo build
|
cargo build
|
||||||
|
cargo test
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You may need to set a client secret, see Configuration for more information.
|
||||||
|
|
||||||
|
# Client implementation
|
||||||
|
|
||||||
|
This client follows a secure-first approach. As such, your statistics may report
|
||||||
|
a _ever-so-slightly_ higher-than-average failure rate. Specifically, this client
|
||||||
|
choses to:
|
||||||
|
- Not support TLS 1.1 or 1.0, which would be a primary source of
|
||||||
|
incompatibility.
|
||||||
|
- Not provide a server identification string in the header of served requests.
|
||||||
|
- HTTPS by enabled by default, HTTP is provided (and unsupported).
|
||||||
|
|
||||||
|
That being said, this client should be backwards compatibility with the official
|
||||||
|
client data and config. That means you should be able to replace the binary and
|
||||||
|
preserve all your settings and cache.
|
||||||
|
|
||||||
## Cache implementation
|
## Cache implementation
|
||||||
|
|
||||||
This client implements a multi-tier in-memory and on-disk LRU cache constrained
|
This client implements a multi-tier in-memory and on-disk LRU cache constrained
|
||||||
|
@ -39,38 +48,13 @@ values to make sure you don't exceed the actual quota.
|
||||||
|
|
||||||
Either build it from source or run `cargo install mangadex-home`.
|
Either build it from source or run `cargo install mangadex-home`.
|
||||||
|
|
||||||
## Running
|
|
||||||
|
|
||||||
Run `mangadex-home`, and make sure the advertised port is open on your firewall.
|
|
||||||
Do note that some configuration fields are required. See the next section for
|
|
||||||
details.
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
Most configuration options can be either provided on the command line, sourced
|
Most configuration options can be either provided on the command line or sourced
|
||||||
from a `.env` file, or sourced directly from the environment. Do not that the
|
from a file named `settings.yaml` from the directory you ran the command from,
|
||||||
client secret is an exception. You must provide the client secret from the
|
which will be created on first run.
|
||||||
environment or from the `.env` file, as providing client secrets in a shell is a
|
|
||||||
operation security risk.
|
|
||||||
|
|
||||||
The following options are required:
|
Note that the client secret (`CLIENT_SECRET`) is the only configuration option
|
||||||
|
that can only can be provided from the environment, an `.env` file, or the
|
||||||
- Client Secret
|
`settings.yaml` file. In other words, you _cannot_ provide this value from the
|
||||||
- Memory cache quota
|
command line.
|
||||||
- Disk cache quota
|
|
||||||
- Advertised network speed
|
|
||||||
|
|
||||||
The following are optional as a default value will be set for you:
|
|
||||||
|
|
||||||
- Port
|
|
||||||
- Disk cache path
|
|
||||||
|
|
||||||
### Advanced configuration
|
|
||||||
|
|
||||||
This implementation prefers to act more secure by default. As a result, some
|
|
||||||
features that the official specification requires are not enabled by default.
|
|
||||||
If you don't know why these features are disabled by default, then don't enable
|
|
||||||
these, as they may generally weaken the security stance of the client for more
|
|
||||||
compatibility.
|
|
||||||
|
|
||||||
- Sending Server version string
|
|
||||||
|
|
Loading…
Reference in a new issue