README.md: move TLS setup section, general improvements

This commit is contained in:
Joakim Frostegård 2021-12-17 01:32:57 +01:00 committed by GitHub
parent 22f6d869d3
commit b2f0347876
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,9 +66,8 @@ Begin by generating configuration files. They differ between protocols.
Make adjustments to the files. You will likely want to adjust `address` Make adjustments to the files. You will likely want to adjust `address`
(listening address) under the `network` section. (listening address) under the `network` section.
`aquatic_http` requires configuring a TLS certificate file as well as a `aquatic_http` and `aquatic_ws` both require configuring a TLS certificate file as well as a
private key file to run. More information is available in the private key file to run. More information is available below.
corresponding subsection of this document.
Once done, run the tracker: Once done, run the tracker:
@ -80,13 +79,26 @@ Once done, run the tracker:
### Configuration values ### Configuration values
Starting a lot more socket workers than request workers is recommended. All Starting more socket workers than request workers is recommended. All
implementations are heavily IO-bound and spend most of their time reading from implementations are quite IO-bound and spend a lot of their time reading from
and writing to sockets. This part is handled by the `socket_workers`, which and writing to sockets. This is handled by the `socket_workers`, which
also do parsing, serialisation and access control. They pass announce and also do parsing, serialisation and access control. They pass announce and
scrape requests to the `request_workers`, which update internal tracker state scrape requests to the `request_workers`, which update internal tracker state
and pass back responses. and pass back responses.
#### TLS
`aquatic_ws` and `aquatic_http` both require access to a TLS certificate file
(DER-encoded X.509) and a corresponding private key file (DER-encoded ASN.1 in
either PKCS#8 or PKCS#1 format) to run. Set their paths in the configuration file, e.g.:
```toml
[network]
address = '0.0.0.0:3000'
tls_certificate_path = './cert.pem'
tls_private_key_path = './key.pem'
```
#### Access control #### Access control
Access control by info hash is supported for all protocols. The relevant part Access control by info hash is supported for all protocols. The relevant part
@ -148,19 +160,6 @@ Aims for compatibility with the [HTTP BitTorrent protocol], with some exceptions
`aquatic_http` has not been tested as much as `aquatic_udp` but likely works `aquatic_http` has not been tested as much as `aquatic_udp` but likely works
fine. fine.
#### TLS
A TLS certificate file (DER-encoded X.509) and a corresponding private key file
(DER-encoded ASN.1 in either PKCS#8 or PKCS#1 format) are required. Set their
paths in the configuration file, e.g.:
```toml
[network]
address = '0.0.0.0:3000'
tls_certificate_path = './cert.pem'
tls_private_key_path = './key.pem'
```
### aquatic_ws: WebTorrent tracker ### aquatic_ws: WebTorrent tracker
Aims for compatibility with [WebTorrent](https://github.com/webtorrent) Aims for compatibility with [WebTorrent](https://github.com/webtorrent)
@ -170,8 +169,6 @@ clients, with some exceptions:
* Doesn't track of the number of torrent downloads (0 is always sent). * Doesn't track of the number of torrent downloads (0 is always sent).
* Doesn't allow full scrapes, i.e. of all registered info hashes * Doesn't allow full scrapes, i.e. of all registered info hashes
For TLS setup instructions, please see `aquatic_http` TLS section above.
## Load testing ## Load testing
There are load test binaries for all protocols. They use a CLI structure There are load test binaries for all protocols. They use a CLI structure