Giter VIP home page Giter VIP logo

phoenix's People

Contributors

enebe-nb avatar lewisgoddard avatar ncommander avatar trigunflame avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

phoenix's Issues

Certain torrents return "-1" for seeders and leechers.

Always returns -1 for seeders and leechers

magnet:?xt=urn:btih:0a36a61cb46fc1444c95eb62185b777d65362ca9&dn=elementaryos-freya-i386.20150411.iso&tr=https%3A%2F%2Fashrise.com%3A443%2Fphoenix%2Fannounce&tr=http%3A%2F%2Flocal.localtest.me%2Fphoenix%2Fannounce.php

Binary: 6¦�´oÁDL•ëb�[w}e6,©

Works fine

magnet:?xt=urn:btih:fc85dc999730a42de3924444aadbcfa183b5f388&dn=elementaryos-freya-amd64.20150411.iso&tr=https%3A%2F%2Fashrise.com%3A443%2Fphoenix%2Fannounce&tr=http%3A%2F%2Flocal.localtest.me%2Fphoenix%2Fannounce.php

Binary: ü…Ü™—0¤-ã’DDªÛÏ¡ƒµóˆd

Create cron-jobs to optionally replace random running of tasks in `_cron`

  • Create cron-jobs to optionally replace random running of tasks in _cron.
  • Add setting with default to off.

Existing Tasks

  • clean as defined in _functions/phoenix/function.task.clean.php
  • optimize as defined in _functions/phoenix/function.task.optimize.php

Other Tasks

  • Now would be the time to consider other tasks that could be added.

Move to a puff-style structure.

  • settings.default.php to _settings/phoenix.default.php
  • function.* to _functions/phoenix/*
  • once.* to _onces/phoenix/*
  • hook.* to _hooks/phoenix/*
  • Make sure all references in code and documentation are updated.

Support Multiple Torrent Scraping

See https://wiki.vuze.com/w/Scrape#Tracker_Scrape_Convention

  • In once.sanitise.tracker.php, explode the _GET parameters.
  • Loop through parameters, storing every info_hash in an array.
  • Sanitise the parameters with maybe_binary_to_hex
  • Set the first one as $peer['info_hash'] for announce.
  • Set $peer['info_hashes'] as the full array for scrape.
  • Modify function.torrent.scrape.php to loop through the array for the WHERE caluse.
  • Modify the same file to loop through results for each of the three output formats.

Add unit testing for onces. [$50]

Tests should set any and all global parameters that these scripts check, and confirm that output protects against invalid characters and attacks. They will likely need several tests each.

Onces

  • once.announce.peer.event.php
  • once.announce.torrent.php
  • once.db.connect.php
  • once.sanitise.admin.php
  • once.sanitise.announce.address.php
  • once.sanitise.announce.optional.php
  • once.sanitise.tracker.php
  • once.scrape.output.php
  • once.scrape.torrent.php
  • once.scrape.tracker.php
  • once.stats.tracker.php
  • once.stats.tracker.php

Impossible

  • once.test.initialise.php is literally part of the testing system.

There is a $50 open bounty on this issue. Add to the bounty at Bountysource.

Sanatize super-globals variables before use.

We will likely want to sanitize all the variables appropriately before we do anything else.

  • List all variables
  • Sanitize in new file
  • De-duplicate sanitation
  • Replace references

Add unit testing for every function and integrate with Travis CI

Primary

  • New unit tests are added automatically.
  • Test against MySQL and MariaDB

Functions

  • function mysqli_array_build($connection, $sql)
  • function drop_table($connection, $settings, $table)
  • function mysqli_fetch_once($connection, $sql)
  • function peer_access($connection, $settings, $time, $peer)
  • function peer_completed($connection, $settings, $peer)
  • function peer_delete($connection, $settings, $peer)
  • function peer_new($connection, $settings, $time, $peer)
  • function maybe_binary_to_hex($binary)
  • function task($connection, $settings, $task, $value)
  • function tracker_allowed($connection, $settings)
  • function tracker_clean($connection, $settings, $time)

Impossible

As it stands, there are some functions whose composition is not lended to unit testing. These should probably be fixed later, and we can work around the super-globals for now.

  • optimize_table has no current failure states.
  • tracker_error contains an exit expression.

Allow the admin script to create a configuration file.

Check if the directory is writable when there is no config file, then allow a user to input a MySQL username and password to install the tables and disable future installations on success.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Be more helpful when listing peers

We can list peers more intelligently. Clients just starting a download don't need to know about a neighbour that has 0% as well, and completed downloads don't need to know each other either. Seeders being introduced to peers near completion speeds up conversion and improves ratios.

  • If a client has just started their download: list most recent peers with >50% completion.
  • If a client has not completed their download: list peers by most completed first, then most recent.
  • If a client has completed their download: list peers by most completed first, but exclude 100% completions, then most recent.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Document how to set up cron jobs in README.md [$25 awarded]

Steps for configuring cron should go under a h3 header titled "Cron", immediately after the current Configuration section. Should be in a list-format to match the Installation section. Try to keep things as simple as possible, and maybe don't run both cron jobs at once, delay the backup for a couple of minutes. Always give root-relative file names in backticks, along with any code that needs changing. Make sure all code blocks are clearly labeled before they occur.

  • Configure _cron/hourly/backup-database.sh (path, username, password, database)
  • Configure for _cron/hourly/clean-and-optimize.php
  • Example crontab.
  • Disable cleaning in requests.

The $25 bounty on this issue has been claimed at Bountysource.

Add a magnet link generator.

Widely supported

  • xt (Exact Topic) – URN containing file hash
  • tr (Address Tracker) – Tracker URL for BitTorrent downloads
  • dn (Display Name) – Filename
  • xl (Exact Length) – Size in bytes
  • ws (Wed Seed) – URL for direct downloads

Less widely supported

  • kt (Keyword Topic) – Key words for search
  • xs (Exact Source) – URL or P2P for direct downloads
  • as (Acceptable Source) – Lower Priority WebSeed (supposedly for dead torrents)

References

See Magnet URI Scheme - Clients


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

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.