Giter VIP home page Giter VIP logo

picotorrent's Introduction

PicoTorrent

CI Discord

A tiny, hackable BitTorrent client written in modern C++. Based on Rasterbar-libtorrent to provide high performance and low memory usage.

Quick facts

  • Full support for BitTorrent 2.0 (BEP-52), v1, v2 and v1+v2 hybrid torrents.
  • Supports DHT, PeX, LSD, UPnP.
  • (Azureus-style) peer ID: -PI-. Example: -PI0151- (major: 0, minor: 15, patch: 1).
  • User agent: PicoTorrent/x.y.z.
  • Native look-and-feel across Windows versions.
  • Easy to use with high performance.

The portable version of PicoTorrent requires manual installation of the Microsoft Visual C++ Redistributable for Visual Studio 2019.

Download for Windows

Download zip

Building PicoTorrent

To successfully build PicoTorrent, you need the following libraries and applications installed,

λ git submodule update --init --recursive
λ dotnet tool restore
λ dotnet cake --platorm=[x86|x64] --configuration=[Debug|Release]

Translations

PicoTorrent uses Weblate to handle the translation process. If you want to help, feel free to signup and give your contribution.

License

Copyright (c) Viktor Elofsson and contributors. PicoTorrent is provided as-is under the MIT license. For more information see LICENSE.

picotorrent's People

Contributors

arabuli avatar birkoffe avatar comradekingu avatar derianandre avatar doumanash avatar egarjanis avatar ialexsilva avatar ipeluchito avatar luki446 avatar make-42 avatar migwynkriid avatar mika- avatar mlokiko avatar mmagian avatar molny avatar olivierchatry avatar patriksvensson avatar rakleed avatar sade54 avatar salgnt avatar stephan-p avatar stoyandimitrov avatar technogreg avatar thec0mpler avatar vktr avatar voodagod avatar xzpyth avatar zeerorg avatar zmni avatar zp 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

picotorrent's Issues

Port is limited to 4 nums

While port can be up to 65k, config allows you to enter only 4 num.
Funny thing is that you can enter some non-numeric character :)

p.s. manual edit of config works of course :)

Extra info bar

Things we could display here

  • Progress of individual files(if there are more than one files in the torrent)
  • Option to include or exclude individual files after the torrent is added, as an extension to #60
  • A way to add more trackers
  • Stats on trackers seeds peers etc.

I love you

I don't know you, but I already love you.

I was so annoyed about the way uTorrent turned out but now you filled my pirate heart with torrent joy. ❤️

I know nothing to little C++ but I definitely can help you with the site.

Cheers!

Add torrent details item to context menu

The torrent context menu should contain an option to view the details dialog so it is not as hidden. Right now only double-clicking or pressing Enter will open the details dialog.

Make PicoTorrentCore cross-platform

The PicoTorrentCore project should be made cross-platform so we can start building Linux and OSX clients.

  • Remove timer class from PicoTorrentCore. (#181)
  • Write platform-specific implementations of the file system classes.
  • Write platform-specific implementations of the environment class.
  • Do not rely on a HWND in session::load. (#216)

Global UL/DL limits

Have an option to set global UL/DL limits, so for example if I know I can use the internet comfortably while seeding at 50kb/s I'll just set this globally and PicoTorrent will make sure the total UL of all torrents stays below 50kb/s.
Currently you can only set these limits per torrent, which is unfortunate since you have to manually balance them when seeding multiple torrents, since setting them each to 50kb/s will not keep the total bandwidth at this level

Fix x86 stack walking

The unhandled exception handler does some stack walking to provide a nice stack trace for debugging and reporting issues. Currently, the x86 version is broken and will not stack walk correctly.

Extend the configuration dialog

The configuration dialog needs some work to make it easier to use and also to provide the user with more settings.

Extending the configuration dialog should be done in two parts, one to separate configuration views into different pages which can be loaded from their own DIALOGEX resource identifiers, and another one to add more configuration options to the dialog.

The following new config settings should be exposed in the dialog,

  • Encryption settings
  • Proxy settings
  • Anonymous mode
  • Bind to specific IP address
  • A button to test the connectivity of the network interface and port
  • An option to move finished torrents to a specific path
  • An option to set a custom extension on incomplete files (i.e .incomplete)

Select multiple torrents

It would be nice to be able to select multiple torrents in the torrent view.
Right now I need to select every torrent individually to remove them and it would be nice to be able to do this in one step.

msvcp140.dll missing

Cannot run this program, as dlls are missing. Include them into compiled binary.

On D/L or U/L speed update

Whenever the download or upload speed values are updated it seems like the whole block of text(which includes the torrent name and progress) to blink.This happens on every update.

That said this a minor annoyance, but if anything could be done to remedy this it'd be great.

I'm on Windows 7 SP1 x64(just in case this is OS specific)

Crash reports are having missing function names

To improve further debug it would be better to have some way to enable stripped debug info so that there would no missing elements in callstack:
pic

P.s. having file+lines would be great also

Default remove should just remove torrent, not ask if you want to remove the files aswell.

Would love if you could split the remove option up.
99% of the times I delete a torrent I want to keep my files. Quite annoying when I have to select that I want to keep the files every time I remove a torrent, with the risk of hitting the wrong one and removing the files. I'm used to having two delete options on dropdown, "Remove" and "Remove and delete files". Del button should bind to remove and keep files and shift+del should bind to remove and delete files. If possible :)

Love your work!

Add an About dialog

We should add an About dialog under Help -> About that shows the current version of PicoTorrent, along with the Git commitish, build date and contributor information.

Save destination path

Would be nice if the choosen destination path would be saved for future torrents.

[edited]
With browse button.

32 bit version

Is it planned to support 32-bit Windows too? (memory efficient, preinstalled on a notebook etc.)

Implement unique peer id

PicoTorrent should implement a unique peer id so trackers can identify it. The goal should be to always run with the PicoTorrent-specific peer id, however until widely accepted it should be an advanced setting which can be enabled/disabled via an experimental group in an advanced preferences page.

Looking at the BitTorrent specification I see that we can probably use PI as our Azureus-style client id.

  • Set peer_fingerprint to -PIxyyz- where x is major version, yy is minor version padded to two characters (ie. 01 or 14) and z is the patch version.
  • Set user_agent to PicoTorrent/x.y.x where x.y.x is the current PicoTorrent version.
  • Add an option to the JSON configuration file, use_picotorrent_peer_id (which should default to false) and set the above settings accordingly when reloading session settings.
  • Add a new preferences tab Advanced with an Experimental group box that contains a checkbox to toggle the usage of this peer id.

Minimize on close

Out of habit I always close the window only to realize later that this also closes the program.
If an option was added which when selected, minimized the window to the taskbar when closed.

This small feature addition would be much appreciated by noobs like me everywhere 😇

On close add torrent bug

When you click File -> Add torrent and then abort(press close) you still get the save destination dialog.

v0.4 crashes if you go to connection tab in settings

If you go to the connection tab in the settings dialog and then attempt to click on either apply/ok buttons to save changes/close the window, picotorrent crashes (cancel button exits dialog fine), even if you switch back to downloads tab before attempting to save/close.

However if you only stay on the downloads tab, it doesn't crash.

OS: Windows 10 N x64
PicoTorrent-0.4.0-x64.zip (portable version)

Log from crash (x64)

INFO - 17:58:05.239 - picotorrent::core::session::load - Loading session
INFO - 17:58:05.356 - picotorrent::core::session::load_state - Session state loaded
INFO - 17:58:05.356 - picotorrent::core::session::load_torrents - Loading 0 torrent(s)
FATAL - 17:58:09.198 - picotorrent::logging::log::on_unhandled_exception - Unhandled exception occured
at "RaiseException" 
at "CxxThrowException" 
at "std::_Xinvalid_argument" 
at "<unknown>" 
at "<unknown>" 
at "<unknown>" 
at "IsDialogMessageW" 
at "IsDialogMessageW" 
at "IsDialogMessageW" 
at "DispatchMessageW" 
at "SendMessageW" 

Adding a torrent with ~255 files or more crashes picotorrent.

version: 0.5 x64 portable

Just attempted to add a torrent with >255 files and picotorrent crashed.

Did some testing and it appears to be around 255, I added a torrent with 254 files and it didn't crash, but when I attempted a torrent with 256 files it crashed.

INFO - 20:46:38.369 - picotorrent::core::session::load - Loading session
INFO - 20:46:38.482 - picotorrent::core::session::load_state - Session state loaded
INFO - 20:46:38.482 - picotorrent::core::session::load_torrents - Loading 0 torrent(s)
FATAL - 20:46:41.460 - picotorrent::logging::log::on_unhandled_exception - Unhandled exception occured
at "picotorrent::core::add_request::file_priority" (line 36)
at "picotorrent::core::add_request::file_priority" (line 36)
at "picotorrent::app::controllers::add_torrent_controller::show_torrent" (line 249)
at "picotorrent::app::controllers::add_torrent_controller::on_dialog_init" (line 147)
at "picotorrent::ui::dialogs::add_torrent_dialog::on_init_dialog" (line 170)
at "picotorrent::ui::dialogs::dialog_base::dlg_proc" (line 90)
at "picotorrent::ui::dialogs::dialog_base::dlg_proc_proxy" (line 112)
at "IsDialogMessageW" 
at "IsDialogMessageW" 
at "IsDialogMessageW" 
at "DispatchMessageW"

Peer list crash

If you select an item in the peer list tab and then scroll it out of view, picotorrent "crashes" on the next update cycle.

Currently in 0.5, it just 'freezes' the ui (libtorrent is still downloading in the background, but picotorrent.exe enters 'not responding' state)

However in PR #108, it just flat out crashes picotorrent. Log from PR #108 appveyor x64 build below.

INFO - 11:06:55.543 - picotorrent::core::session::load - Loading session
TRACE - 11:06:55.651 - picotorrent::core::session::load_state - State file does not exist
INFO - 11:06:55.652 - picotorrent::core::session::load_torrents - Loading 0 torrent(s)
INFO - 11:06:58.531 - picotorrent::ui::sleep_manager::refresh - Preventing computer from sleeping
FATAL - 11:07:07.771 - picotorrent::logging::log::on_unhandled_exception - Unhandled exception occured
at "RaiseException" 
at "RaiseException" 
at "CxxThrowException" 
at "std::_Throw_Cpp_error" 
at "std::_Throw_C_error" 
at "picotorrent::ui::property_sheets::details::peers_page::on_list_display" (line 107)
at "std::_Invoker_pmf_pointer::_Call<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > (__cdecl picotorrent::ui::dialogs::add_torrent_dialog::*)(std::pair<int,int> const & __ptr64) __ptr64,picotorrent::ui::dialogs::add_torrent_dialog * __ptr64 & __ptr64,std::pair<int,int> const & __ptr64>" (line 1313)
at "std::invoke<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > (__cdecl picotorrent::ui::dialogs::add_torrent_dialog::*& __ptr64)(std::pair<int,int> const & __ptr64) __ptr64,picotorrent::ui::dialogs::add_torrent_dialog * __ptr64 & __ptr64,std::pair<int,int> const & __ptr64>" (line 1416)
at "std::_Invoke_ret<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > (__cdecl picotorrent::ui::dialogs::add_torrent_dialog::*& __ptr64)(std::pair<int,int> const & __ptr64) __ptr64,picotorrent::ui::dialogs::add_torrent_dialog * __ptr64 & __ptr64,std::pair<int,int> const & __ptr64>" (line 1448)
at "std::_Call_binder<std::_Unforced,0,1,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > (__cdecl picotorrent::ui::dialogs::add_torrent_dialog::*)(std::pair<int,int> const & __ptr64) __ptr64,std::tuple<picotorrent::ui::dialogs::add_torrent_dialog * __ptr64,std::_Ph<1> >,std::tuple<std::pair<int,int> const & __ptr64> >" (line 791)
at "std::_Binder<std::_Unforced,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > (__cdecl picotorrent::ui::dialogs::add_torrent_dialog::*)(std::pair<int,int> const & __ptr64) __ptr64,picotorrent::ui::dialogs::add_torrent_dialog * __ptr64 const,std::_Ph<1> const & __ptr64>::operator()<std::pair<int,int> const & __ptr64>" (line 847)

Crash when opening a bad file path

If I paste a URL to a torrent in the Add Torrent dialog and hit Open, PicoTorrent crashes on this line.

fs::path p(path) throws an exception because it appears path is NULL, and then that exception gets caught when it leaves the callback and turns into this hard-to-debug-from-a-dmp exception:

EXCEPTION_RECORD: (.exr -1)
ExceptionAddress: 00007fff487d72cb (user32!DefDlgProcW+0x0000000000000053)
ExceptionCode: c000041d
ExceptionFlags: 00000001
NumberParameters: 0

DEFAULT_BUCKET_ID: APPLICATION_FAULT

PROCESS_NAME: PicoTorrent.exe

ERROR_CODE: (NTSTATUS) 0xc000041d - An unhandled exception was encountered during a user callback.

EXCEPTION_CODE: (NTSTATUS) 0xc000041d - An unhandled exception was encountered during a user callback.

Checking the return code from IShellItem::GetDisplayName might help skip over bad items, or catching the exception and returning false from the open_torrent_dialog::on_file_ok might be sufficient to stop it from crashing.

Add torrent dialog crash when setting file priority

When you set the priority of the last file in a torrent to 'Do not download' in the 'Add torrent' dialog, picotorrent crashes when you attempt add it.

INFO - 23:03:25.961 - picotorrent::core::session::load - Loading session
INFO - 23:03:26.82 - picotorrent::core::session::load_state - Session state loaded
INFO - 23:03:26.82 - picotorrent::core::session::load_torrents - Loading 0 torrent(s)
FATAL - 23:03:32.410 - picotorrent::logging::log::on_unhandled_exception - Unhandled exception occured
at "RaiseException" 
at "CxxThrowException" 
at "std::_Xout_of_range" 
at "std::map<libtorrent::sha1_hash,std::shared_ptr<picotorrent::core::torrent>,std::less<libtorrent::sha1_hash>,std::allocator<std::pair<libtorrent::sha1_hash const ,std::shared_ptr<picotorrent::core::torrent> > > >::at" (line 359)
at "picotorrent::core::session::notify" (line 422)
at "picotorrent::common::signals::signal<void,void>::emit" (line 106)
at "picotorrent::ui::main_window::wnd_proc" (line 203)
at "picotorrent::ui::main_window::wnd_proc_proxy" (line 540)
at "DispatchMessageW" 
at "DispatchMessageW" 
at "picotorrent::app::message_loop::run" (line 12)

Also, if you set the last file's priority to 'High' or 'Maximum', when you add the torrent all of the other files get set to 'Do not download' (strangely it doesn't crash)

edit: crashes with single file torrents as well when you set the priority to 'Do not download'

Rewrite torrent list view

The torrent list view should be rewritten to use the same list view class as the other list views in PicoTorrent. The shared list view class is better in all aspects but lack sorting, which can be easily implemented.

Allow different column sets in the torrent list view

The list view showing torrents should be able to handle configured column sets to allow users to switch between different views.

For example, the pre-specified column set Pico could show the columns Name, Queue position, Progress and ETA, and the set Detailed with the columns Name, Queue position, Size, Status, Progress, ETA, DL, UL.

The option to switch column sets would be in View -> Column sets -> Pico/Detailed.

Adding or editing trackers

Currently we can only view trackers in the torrent details, there is no way to add or remove trackers.

This'd be a nice feature to have

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.