Coder Social home page Coder Social logo

torrust / torrust-index Goto Github PK

View Code? Open in Web Editor NEW
44.0 4.0 19.0 2.74 MB

This repository serves as the backend for the Torrust Index project.

Home Page: https://torrust.com

License: GNU Affero General Public License v3.0

Rust 96.42% HTML 0.99% Dockerfile 0.75% Shell 1.55% Makefile 0.03% C 0.25%
rust backend bittorrent torrents

torrust-index's People

Contributors

aimless321 avatar alexohneander avatar cgbosse avatar da2ce7 avatar dependabot[bot] avatar josecelano avatar mario-nt avatar mickvandijke avatar pcarles avatar postmeback avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

torrust-index's Issues

[suggestion] report torrent

An option for users to report torrents would be very useful. I think a quick and dirty way of implementing something like this might be via giving the user a small modal to explain why, then trigger a webhook (rather than creating a section within the ACP for example).

[bug] users not getting logged out when their sessions expire

[moved from here /issues/82]

this is a pretty painful bug, i actually thought there was an issue open already.

in short:

user logs in
user doesn't log out and keeps the same session active for X amount of weeks
eventually the session will time out (but they will still show as logged in) and any torrents they download won't work - they show as "400 error unauthenticated" - AKA no passkey.

Having users do this:

Delete the torrent from the client
Sign out from the site
Sign back in again and download the torrent fresh
re-add new torrent - this fixes it.

This would be a huge QOL improvement for us - again, thanks so much guys, you're the best

User Profile and his posts

User profile section where everyone can see the post of specific user by clicking on his name from the post.

Bookmark

it will be a good idea if it is easy to do

Tags

Adding tags might be a good idea for the last version (not current)

Trusted Uploaders Badge

Hello,
Just an idea
Adding a trusted uploaders badge can make the big difference in users when they have multiple post of same series by different uploader.

Thanks

RSS feed

As with any tracker, a RSS feed would be nice to be able to have an easier time grabbing new torrents and seeding them. A separate API key for the feed that's bound to a user and has a long expiration date by default (2mo-6mo) is preferable so as to allow users to just set and forget until the key expires.

Provide a migration script for older Torrust versions

There have been quite some database changes between V1 and V2 of the backend and this renders the database of a backend running V1 incompatible with backend V2. The biggest change we made to the database is the way torrents are stored. In V1, torrents were stored as actual .torrent files in a dedicated uploads folder on the backend server. As of V2, all torrents are completely stored in the database.

To make sure all V1 users can move to V2 of the backend, we want to provide some kind of migration script. This script would take a V1 database (dump) and torrent uploads folder as input and should be able to convert this data to a new database dump that is suitable for the backend V2.

We will start working on this script when we believe V2 is in a usable state.

Add MySQL support

MySQL would be a better default database to use for the index. It has a lot more features than SQLite3 and can handle heavy traffic more efficiently. I think however that we should not yet drop support for SQLite3.

Add install prompt on first boot

Torrust needs at least one administrator account. On first boot it should show an install wizard to create an admin account and to set the tracker/website config.

Error installing `sqlx-cli`: `cargo install sqlx-cli`

Running this command cargo install sqlx-cli I get this error:

Compiling radix_trie v0.2.1
error: failed to run custom build command for `openssl-sys v0.9.74`

Caused by:
  process didn't exit successfully: `/tmp/cargo-install9r6wn4/release/build/openssl-sys-b7846f0d7e417835/build-script-main` (exit status: 101)
  --- stdout
  cargo:rustc-cfg=const_fn
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
  OPENSSL_LIB_DIR unset
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
  OPENSSL_INCLUDE_DIR unset
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_DIR
  OPENSSL_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=OPENSSL_STATIC
  cargo:rerun-if-env-changed=OPENSSL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  run pkg_config fail: "`\"pkg-config\" \"--libs\" \"--cflags\" \"openssl\"` did not exit successfully: exit status: 1\nerror: could not find system library 'openssl' required by the 'openssl-sys' crate\n\n--- stderr\nPackage openssl was not found in the pkg-config search path.\nPerhaps you should add the directory containing `openssl.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'openssl' found\n"

  --- stderr
  thread 'main' panicked at '

  Could not find directory of OpenSSL installation, and this `-sys` crate cannot
  proceed without this knowledge. If OpenSSL is installed and this crate had
  trouble finding it,  you can set the `OPENSSL_DIR` environment variable for the
  compilation process.

  Make sure you also have the development packages of openssl installed.
  For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.

  If you're in a situation where you think the directory *should* be found
  automatically, please open a bug at https://github.com/sfackler/rust-openssl
  and include information about your system as well as this message.

  $HOST = x86_64-unknown-linux-gnu
  $TARGET = x86_64-unknown-linux-gnu
  openssl-sys = 0.9.74

  ', /home/josecelano/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.74/build/find_normal.rs:191:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `sqlx-cli v0.6.0`, intermediate artifacts can be found at `/tmp/cargo-install9r6wn4`

Caused by:
  build failed
  • Ubuntu: 21.10
  • Cargo: cargo 1.60.0
  • rustc 1.60.0

User authentication should be done in middleware

User authentication is currently done manually in each endpoint that requires authentication. Ideally, we would have an authentication middleware instead. The authentication middleware could pass Option<User> to the endpoint handler.

Initial user/admin creation

I've successfully installed the three components of Torrust (tracker, index-backend, index-frontend) and have it all appearing in a client side browser, but can't log in.

My index-backend data.db has a table torrust_users which is empty, and I can populate it with data via the command line sqlite3 tool, but don't know how to hash a password correctly to be recognised as valid and let me log in.

Is there a command line tool to do this for me? Alternatively is there a simple openssl style command to generate the hashed password?

Feedback

Small Feedback button in case poeple find issue, they can report

Move authorization logic to dedicated service

Currently, authorization is handled by each handler on its own. We should translate this logic into actions that will be authorized by a service that checks whether the user that invoked the action has the proper permissions to do so.

Bookmark

it will be a good idea if it is easy to do

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.