royalcat refactoring

This commit is contained in:
royalcat 2023-10-08 19:46:03 +03:00
parent 1da835cea6
commit b245c9f451
81 changed files with 1476 additions and 1580 deletions

View file

@ -1 +1 @@
distribyted.com
tstor.com

View file

@ -4,21 +4,21 @@
Get the latest release from [releases][releases-url] page or download the source code and execute `make build`.
Run the program: `./distribyted-[VERSION]-[OS]-[ARCH]`
Run the program: `./tstor-[VERSION]-[OS]-[ARCH]`
Defaults are good enough for starters, but you can change them. Here is the output of `./distribyted -help`:
Defaults are good enough for starters, but you can change them. Here is the output of `./tstor -help`:
```text
NAME:
distribyted - Torrent client with on-demand file downloading as a filesystem.
tstor - Torrent client with on-demand file downloading as a filesystem.
USAGE:
distribyted [global options] [arguments...]
tstor [global options] [arguments...]
GLOBAL OPTIONS:
--config value YAML file containing distribyted configuration. (default: "./distribyted-data/config.yaml") [$DISTRIBYTED_CONFIG]
--http-port value HTTP port for web interface (default: 4444) [$DISTRIBYTED_HTTP_PORT]
--fuse-allow-other Allow other users to acces to all fuse mountpoints. You need to add user_allow_other flag to /etc/fuse.conf file. (default: false) [$DISTRIBYTED_FUSE_ALLOW_OTHER]
--config value YAML file containing tstor configuration. (default: "./tstor-data/config.yaml") [$tstor_CONFIG]
--http-port value HTTP port for web interface (default: 4444) [$tstor_HTTP_PORT]
--fuse-allow-other Allow other users to acces to all fuse mountpoints. You need to add user_allow_other flag to /etc/fuse.conf file. (default: false) [$tstor_FUSE_ALLOW_OTHER]
--help, -h show help (default: false)
```
@ -36,32 +36,32 @@ docker run \
--cap-add SYS_ADMIN \
--device /dev/fuse \
--security-opt apparmor:unconfined \
-v /tmp/mount:/distribyted-data/mount:shared \
-v /tmp/metadata:/distribyted-data/metadata \
-v /tmp/config:/distribyted-data/config \
distribyted/distribyted:latest
-v /tmp/mount:/tstor-data/mount:shared \
-v /tmp/metadata:/tstor-data/metadata \
-v /tmp/config:/tstor-data/config \
tstor/tstor:latest
```
Docker compose example:
```yaml
distribyted:
container_name: distribyted
image: distribyted/distribyted:latest
restart: always
ports:
- "4444:4444/tcp"
- "36911:36911/tcp"
volumes:
- /home/user/mount:/distribyted-data/mount:shared
- /home/user/metadata:/distribyted-data/metadata
- /home/user/config:/distribyted-data/config
security_opt:
- apparmor:unconfined
devices:
- /dev/fuse
cap_add:
- SYS_ADMIN
tstor:
container_name: tstor
image: tstor/tstor:latest
restart: always
ports:
- "4444:4444/tcp"
- "36911:36911/tcp"
volumes:
- /home/user/mount:/tstor-data/mount:shared
- /home/user/metadata:/tstor-data/metadata
- /home/user/config:/tstor-data/config
security_opt:
- apparmor:unconfined
devices:
- /dev/fuse
cap_add:
- SYS_ADMIN
```
## Usage
@ -71,25 +71,25 @@ It contains information about the mounted routes and torrent files like download
### Configuration File
You can see the default configuration file with some explanation comments [here](https://github.com/distribyted/distribyted/blob/master/templates/config_template.yaml).
You can see the default configuration file with some explanation comments [here](https://git.kmsign.ru/royalcat/tstor/blob/master/templates/config_template.yaml).
### Routes
Here there is a list of all available routes with their torrents and some info. You can add and remove torrents from here too.
![routes screen](images/distribyted-routes-border-large.png)
![routes screen](images/tstor-routes-border-large.png)
### Servers
Servers is a way to generate magnet files from folders.
All servers configured using the config yaml file will be here.
When some data is changed on these folders, a new magnet URI will be generated.
Servers is a way to generate magnet files from folders.
All servers configured using the config yaml file will be here.
When some data is changed on these folders, a new magnet URI will be generated.
You can share that magnet URI with anyone to share these files.
![server screen](images/distribyted-server-border.png)
![server screen](images/tstor-server-border.png)
### Logs
You can check logs in real time from the web interface:
![logs screen](images/distribyted-logs-border.png)
![logs screen](images/tstor-logs-border.png)

View file

@ -1,34 +1,36 @@
tstor is an alternative torrent client.
It can expose torrent files as a standard FUSE mount or webDAV endpoint and download them on demand, allowing random reads using a fixed amount of disk space.
Distribyted is an alternative torrent client.
It can expose torrent files as a standard FUSE mount or webDAV endpoint and download them on demand, allowing random reads using a fixed amount of disk space.
![Distribyted Screen Shot][product-screenshot]
[product-screenshot]: images/distribyted.gif
![tstor Screen Shot][product-screenshot]
[product-screenshot]: images/tstor.gif
## Features
### User Interfaces
Distribyted supports several ways to expose the files to the user or external applications:
tstor supports several ways to expose the files to the user or external applications:
#### Supported
- FUSE: Other applications can access to torrent files directly as a filesystem.
- WebDAV: Applications that supports WebDAV can access torrent files using this protocol. It is recommended when distribyted is running in a remote machine or using docker.
- WebDAV: Applications that supports WebDAV can access torrent files using this protocol. It is recommended when tstor is running in a remote machine or using docker.
- HTTP: A simple HTTP interface for all the available routes. You can acces it from `http://[HOST]:[PORT]/fs`
### _Expandable_ File Formats
Distribyted can show some kind of files directly as folders, making it possible for applications read only the parts that they need. Here is a list of supported, to be supported and not supported formats.
tstor can show some kind of files directly as folders, making it possible for applications read only the parts that they need. Here is a list of supported, to be supported and not supported formats.
#### Supported
- zip: Able to uncompress just one file. The file is decompressed to a temporal file sequentially to make possible seek over it. The decompression stops if no one is reading it.
- rar: Thanks to [rardecode](https://github.com/nwaples/rardecode/tree/experimental) experimental branch library, it is possible to seek through rar files.
- 7zip: Thanks to [sevenzip](https://github.com/bodgit/sevenzip) library, it is possible to read `7z` files in a similar way that is done using the `zip` implementation.
#### To Be Supported
- xz: Only worth it when the file is created using blocks. Possible library [here](https://github.com/ulikunitz/xz) and [here](https://github.com/frrad/bxzf).
#### Not Supported
- gzip: As far as I know, it doesn't support random access.