mirror of
https://github.com/YunoHost-Apps/simple-torrent_ynh.git
synced 2024-09-03 20:26:18 +02:00
parent
90ed433b6e
commit
ca9c32e728
14 changed files with 117 additions and 36 deletions
|
@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
|
||||
Self-hosted remote torrent client
|
||||
|
||||
**Shipped version:** 1.2.23~ynh3
|
||||
**Shipped version:** 1.3.0~ynh1
|
||||
|
||||
|
||||
|
||||
|
@ -32,7 +32,7 @@ Self-hosted remote torrent client
|
|||
|
||||
Most of the items can be edited in Web-UI on the fly in the config board.
|
||||
|
||||
You can also configure Simple Torrent by editing this file `/var/www/simple-torrent/config.json` using the [documentation](https://github.com/boypt/simple-torrent/wiki/Config-File).
|
||||
You can also configure Simple Torrent by editing this file `/var/www/simple-torrent/config.yaml` using the [documentation](https://github.com/boypt/simple-torrent/wiki/Config-File).
|
||||
|
||||
## Limitations
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
|||
|
||||
Client torrent distant auto-hébergé
|
||||
|
||||
**Version incluse :** 1.2.23~ynh3
|
||||
**Version incluse :** 1.3.0~ynh1
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@ Client torrent distant auto-hébergé
|
|||
|
||||
La plupart des éléments peuvent être modifiés à la volée dans Web-UI dans la page de configuration.
|
||||
|
||||
Vous pouvez configurer Simple Torrent en modifiant le fichier `/var/www/simple-torrent/config.json` en vous aidant de la [documentation](https://github.com/boypt/simple-torrent/wiki/Config-File).
|
||||
Vous pouvez configurer Simple Torrent en modifiant le fichier `/var/www/simple-torrent/config.yaml` en vous aidant de la [documentation](https://github.com/boypt/simple-torrent/wiki/Config-File).
|
||||
|
||||
## Limitations
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
SOURCE_URL=https://github.com/boypt/simple-torrent/releases/download/1.2.23/cloud-torrent_linux_arm64_static.gz
|
||||
SOURCE_SUM=28a752920f03a18e5830d4d1e2b2eff15cf6872fed6b83c56232c72acee05f12
|
||||
SOURCE_URL=https://github.com/boypt/simple-torrent/releases/download/1.3.0/cloud-torrent_linux_arm64_static.gz
|
||||
SOURCE_SUM=16835738f35ebfa69a6d6a687f4f17917fa9019c07228da7cee62b16829b7a00
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=gz
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_FILENAME=
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_EXTRACT=false
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"autostart": true,
|
||||
"enginedebug": false,
|
||||
"MuteEngineLog": true,
|
||||
"donecmd": "",
|
||||
"SeedRatio": "",
|
||||
"uploadrate": "",
|
||||
"donecmdthreshold": "30s",
|
||||
"watchdirectory": "/home/yunohost.app/__APP__/torrents",
|
||||
"downloaddirectory": "/home/yunohost.app/__APP__/downloads",
|
||||
"enableseeding": true,
|
||||
"enableupload": true,
|
||||
"incomingport": "__PEER_PORT__",
|
||||
"obfspreferred": true,
|
||||
"obfsrequirepreferred": false,
|
||||
"proxyurl": "",
|
||||
"scraperurl": "https://raw.githubusercontent.com/boypt/simple-torrent/master/scraper-config.json",
|
||||
"seedratio": 0,
|
||||
"trackerlisturl": "https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt"
|
||||
}
|
81
conf/config.default.yaml
Normal file
81
conf/config.default.yaml
Normal file
|
@ -0,0 +1,81 @@
|
|||
AutoStart: true
|
||||
# AutoStart Whether start torrent task on added Magnet/Torrent.
|
||||
|
||||
AllowRuntimeConfigure: true
|
||||
# AllowRuntimeConfigure is the switch whether to offer the WEB UI configuration to users.
|
||||
|
||||
EngineDebug: false
|
||||
# EngineDebug Print debug log from anacrolix/torrent engine (lots of them)
|
||||
|
||||
MuteEngineLog: true
|
||||
# MuteEngineLog anacrolix/torrent engine prints chunks exchanging logs, normal user can just mute them.
|
||||
|
||||
ObfsPreferred: true
|
||||
# ObfsPreferred Whether torrent header obfuscation is preferred.
|
||||
|
||||
ObfsRequirePreferred: false
|
||||
# ObfsRequirePreferred Whether the value of ObfsPreferred is a strict requirement. This hides torrent traffic from being censored.
|
||||
|
||||
DisableTrackers: false
|
||||
# DisableTrackers Don't announce to trackers. This only leaves DHT to discover peers.
|
||||
|
||||
DisableIPv6: false
|
||||
# DisableIPv6 Don't connect to IPv6 peers.
|
||||
|
||||
DisableUTP: false
|
||||
# Disable UTP in the torrent protocol.
|
||||
# In recent versions, the UTP process cause quite high CPU usage. Set to true can ease the situation.
|
||||
|
||||
NoDefaultPortForwarding: true
|
||||
# Don't broadcast the UPNP request for gateway port forwarding, which is unnecessary in machines that has public IP (of which this program is mean for?)
|
||||
|
||||
DownloadDirectory: /home/yunohost.app/__APP__/downloads
|
||||
# DisableEncryption A switch disables [BitTorrent protocol encryption](https://en.wikipedia.org/wiki/BitTorrent_protocol_encryption)
|
||||
|
||||
WatchDirectory: /home/yunohost.app/__APP__/torrents
|
||||
# DownloadDirectory The directory where downloaded file saves.
|
||||
|
||||
EnableUpload: true
|
||||
# EnableUpload Whether send chunks to peers
|
||||
|
||||
EnableSeeding: true
|
||||
# EnableSeeding Whether upload even after there's nothing further for us. By default uploading is not altruistic, we'll only upload to encourage the peer to reciprocate.
|
||||
|
||||
IncomingPort: __PEER_PORT__
|
||||
# IncomingPort The port SimpleTorrent listens to.
|
||||
|
||||
DoneCmd: ""
|
||||
# DoneCmd is An external program to call on task finished. See [DoneCmd Usage](https://github.com/boypt/simple-torrent/wiki/DoneCmdUsage).
|
||||
|
||||
SeedRatio: 1.5
|
||||
# SeedRatio The ratio of task Upload/Download data when reached, the task will be stop.
|
||||
|
||||
SeedTime: "0s"
|
||||
# SeedTime is the time to seed after a task is done downloading, during which if `SeedRatio` is reached, the tasks will stop and deleted; after the duration, the tasks will also stop and removed. But if the waiting queue is empty, will not remove.
|
||||
|
||||
UploadRate: High
|
||||
DownloadRate: Unlimited
|
||||
# UploadRate/DownloadRate The global speed limiter,
|
||||
# a fixed level amoung Low(~50k/s), Medium(~500k/s) and High(~1500k/s) is accepted , Unlimited / 0
|
||||
# or empty result in unlimited rate, or a customed value eg: 850k/720kb/2.85MB.
|
||||
|
||||
TrackerListURL: https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt
|
||||
# TrackerListURL A https URL to a trackers list, this option is design to retrive public trackers from https://github.com/ngosang/trackerslist.
|
||||
|
||||
AlwaysAddTrackers: true
|
||||
# Always add tracers from TrackerListURL wheather the torrent/magnet link has it's own trackers already
|
||||
|
||||
MaxConcurrentTask: 0
|
||||
# MaxConcurrentTask the the maximum tasks concurrently running. Too many task consumes CPU a lot, use this option to limit and queue up download task.
|
||||
|
||||
ProxyURL: ""
|
||||
# ProxyURL Socks5 Proxy to torrent engine. Authentication should be included in the url if needed.
|
||||
# Eg. socks5://demo:demo@192.168.99.100:1080
|
||||
|
||||
# ScraperURL: "https://raw.githubusercontent.com/boypt/simple-torrent/master/scraper-config.json"
|
||||
# The magnet search engine configuration file. Don't set this option (leave it commented) if not intended to.
|
||||
|
||||
RSSUrl: |-
|
||||
http://domian./rss.xml
|
||||
http://some-other-site/rss.xml
|
||||
# The RSS superscription list.
|
7
conf/i386.src
Normal file
7
conf/i386.src
Normal file
|
@ -0,0 +1,7 @@
|
|||
SOURCE_URL=https://github.com/boypt/simple-torrent/releases/download/1.3.0/cloud-torrent_linux_386_static.gz
|
||||
SOURCE_SUM=56fa0b4ef9dbd3d06c531786cad2e095afd4556722e4ef8b7f9f65cb1853b4cc
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=gz
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_FILENAME=
|
||||
SOURCE_EXTRACT=false
|
|
@ -8,7 +8,7 @@ User=__APP__
|
|||
Group=__APP__
|
||||
Environment=PORT=__PORT__
|
||||
WorkingDirectory=__FINALPATH__
|
||||
ExecStart=__FINALPATH__/__APP__ -c __FINALPATH__/config.json --host 127.0.0.1
|
||||
ExecStart=__FINALPATH__/__APP__ -c __FINALPATH__/config.yaml --host 127.0.0.1
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/boypt/simple-torrent/releases/download/1.2.23/cloud-torrent_linux_amd64_static.gz
|
||||
SOURCE_SUM=4df4987bf027d6f72b8e54062eda35b34c9af15ea73cbde0c4940aa843a7e280
|
||||
SOURCE_URL=https://github.com/boypt/simple-torrent/releases/download/1.3.0/cloud-torrent_linux_amd64_static.gz
|
||||
SOURCE_SUM=91f3f8538d90cf2fd4f5899d1ebd8c7820578fdc1947047d1cf0e5f53e99e81e
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=gz
|
||||
SOURCE_IN_SUBDIR=false
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Most of the items can be edited in Web-UI on the fly in the config board.
|
||||
|
||||
You can also configure Simple Torrent by editing this file `/var/www/simple-torrent/config.json` using the [documentation](https://github.com/boypt/simple-torrent/wiki/Config-File).
|
||||
You can also configure Simple Torrent by editing this file `/var/www/simple-torrent/config.yaml` using the [documentation](https://github.com/boypt/simple-torrent/wiki/Config-File).
|
||||
|
||||
## Limitations
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
La plupart des éléments peuvent être modifiés à la volée dans Web-UI dans la page de configuration.
|
||||
|
||||
Vous pouvez configurer Simple Torrent en modifiant le fichier `/var/www/simple-torrent/config.json` en vous aidant de la [documentation](https://github.com/boypt/simple-torrent/wiki/Config-File).
|
||||
Vous pouvez configurer Simple Torrent en modifiant le fichier `/var/www/simple-torrent/config.yaml` en vous aidant de la [documentation](https://github.com/boypt/simple-torrent/wiki/Config-File).
|
||||
|
||||
## Limitations
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Self-hosted remote torrent client",
|
||||
"fr": "Client torrent distant auto-hébergé"
|
||||
},
|
||||
"version": "1.2.23~ynh3",
|
||||
"version": "1.3.0~ynh1",
|
||||
"url": "https://github.com/boypt/simple-torrent",
|
||||
"upstream": {
|
||||
"license": "AGPL-3.0-only",
|
||||
|
|
|
@ -26,7 +26,9 @@
|
|||
ynh_detect_arch() {
|
||||
local architecture
|
||||
if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then
|
||||
architecture="arm64"
|
||||
architecture="arm64"
|
||||
elif [ -n "$(uname -m | grep 86)" ]; then
|
||||
architecture="i386"
|
||||
elif [ -n "$(uname -m | grep 64)" ]; then
|
||||
architecture="x86_64"
|
||||
else
|
||||
|
|
|
@ -120,7 +120,7 @@ chmod 755 /home/yunohost.app/$app/{torrents,downloads}
|
|||
#=================================================
|
||||
ynh_script_progression --message="Modifying a config file..." --weight=1
|
||||
|
||||
ynh_add_config --template="../conf/config.default.json" --destination="$final_path/config.json"
|
||||
ynh_add_config --template="../conf/config.default.yaml" --destination="$final_path/config.yaml"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
|
|
|
@ -87,8 +87,12 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=5
|
||||
|
||||
# Remove the app directory securely
|
||||
ynh_secure_remove --file="$final_path"
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir=$final_path --source_id="$architecture" --keep="$final_path/config.json"
|
||||
ynh_setup_source --dest_dir=$final_path --source_id="$architecture"
|
||||
|
||||
pushd "$final_path"
|
||||
gzip --decompress $(ynh_detect_arch).gz
|
||||
mv $(ynh_detect_arch) $app
|
||||
|
@ -108,6 +112,13 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
|||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Modifying a config file..." --weight=1
|
||||
|
||||
ynh_add_config --template="../conf/config.default.yaml" --destination="$final_path/config.yaml"
|
||||
|
||||
#=================================================
|
||||
# CREATE DIRECTORIES
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue