Commit Graph

53 Commits

Author SHA1 Message Date
Jari Sundell 86fa0d195f Changing listen/dht port changes the listening/dht ports. 2026-07-12 17:19:33 +09:00
Jari Sundell 1603ba0573 Use std::chrono::seconds in TrackerState. 2026-06-12 19:50:17 +09:00
Jari Sundell 75377817b4 Deprecate commands and set DHT to auto by default. 2026-06-05 21:50:08 +09:00
Jari Sundell e03ab27cf0 Added intermediate requesting flag for trackers to prevent premature deletion. 2026-05-26 00:43:15 +09:00
Jari Sundell e41b066555 Converted callbacks to new interface. 2026-05-25 20:13:45 +09:00
rakshasa 088bf40bdf Removed obsolete use of trackers.use_udp. 2026-05-18 16:35:20 +02:00
Jari Sundell 840a57915e Deprecate trackers.use_udp as it is no longer needed. 2026-05-17 00:59:03 +09:00
Jari Sundell f05b48e228 Moved NetworkConfig to runtime. 2026-05-05 16:17:24 +09:00
Xirvik 08a907b547 Whitelist additional read-only getters for untrusted connections
ruTorrent queries these commands for its settings and status pages.
They are all read-only getters with no side effects, safe to expose
for untrusted SCGI connections.

Tested against ruTorrent with both httprpc and multirpc plugins on
servers with active torrents — all modes (list, settings, totals,
open connections) work with zero blocked commands.
2026-03-30 11:55:24 +02:00
Xirvik d935e0ffe9 Address review feedback: explicit mark_safe whitelist and rpc trust flow 2026-03-23 15:11:07 +01:00
Xirvik f767053297 Mark safe commands with flag_untrusted_safe for whitelist enforcement
Annotate all commands that web UIs (ruTorrent) need for normal torrent
management with _U macro variants, which set flag_untrusted_safe.
Commands not marked are blocked by default for untrusted connections.

Safe commands include:
- d.* download getters, state, priorities, custom fields, start/stop
- f.* file getters, priority control
- p.* peer getters, disconnect, ban/snub
- t.* tracker getters, enable/disable
- throttle.* rate getters/setters, peer limits
- network.* read-only queries (getters safe, setters blocked)
- view.list, view.size, view.filter_all, ui.current_view
- load.*, download_list, d.multicall2, d.multicall.filtered
- convert.*, branch/if/and/or/not/cat/value/print
- system.* version/time/status queries (read-only)
- choke_group.* read-only queries
- method.has_key, method.const, method.list_keys, method.get, strings.*
- group.*.view, group.*.ratio.min/max/upload (dynamic, via flag propagation)

Blocked by default (not marked):
- execute*, method.insert/set/redirect, schedule*, import
- log.*, file.append, network.scgi.open_*, view.filter/sort/event_*
- system.shutdown, system.env, group.insert, choke_group.insert
- All user-defined commands (via method.insert)
2026-03-23 15:11:07 +01:00
rakshasa 5dfb2ae938 Allow dht bootstrap nodes to be added when dht is off. 2026-03-02 09:45:09 +01:00
Miroslav Marchev ecefdba734 dht_add_peer_node is empty, use dht_add_bootstrap_node instead
After a refactor dht_add_peer_node became empty function. Replace with dht_add_bootstrap_node to make adding bootstrap nodes work.
2026-02-14 14:32:48 +01:00
Jari Sundell 9489793dcb Created torrent/runtime include directory. 2026-01-27 08:21:05 +09:00
Jari Sundell 8f644e65dd Use separate thread for saving session data. 2025-12-18 06:42:44 +09:00
Jari Sundell 70750a2bd3 Cleanup of DHT controller. 2025-11-13 00:01:22 +09:00
Jari Sundell 1d2c424a70 Remove throttle from DHT. 2025-11-08 17:51:00 +09:00
Jari Sundell 677f8f45c8 Improved listen/dht port handling and added 'dht.override_port.set' command. 2025-09-13 17:51:04 +09:00
Jari Sundell bb1cdfc0e7 Fixed DHT bind address and converted to using sockaddr. 2025-08-23 02:54:54 +09:00
Rosen Penev 0948b5f86a clang-tidy: convert loops to range based
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2025-06-19 09:57:21 +02:00
Jari Sundell f0809ec29d Various pool_event_* and thread API cleanups. 2025-06-01 01:22:14 +09:00
Jari Sundell de6c48ca3f Moved TrackerList and TrackerController out of the public API. 2025-05-28 17:11:29 +09:00
rakshasa 3d9c083032 Fix scheduler access. 2025-04-21 11:09:26 +02:00
Jari Sundell 9a2ce2b231 Changes to support UDNS. 2025-03-27 21:36:10 +09:00
Jari Sundell 0adfc17335 Compatibility fixes with thread-safe list tracker changes. 2025-03-11 20:38:04 +09:00
rakshasa 37a5b7bccb Moved torrent::Tracker to torrent::tracker::Tracker. 2025-02-27 19:24:35 +01:00
rakshasa 80ef2e076d Fix trcker command. 2025-02-25 17:25:54 +01:00
rakshasa bacf60af89 Call atomic tracker state. 2025-02-02 21:03:26 +01:00
stickz e7fc891f11 cleanup: Changes for c++17
This cleanup adjusts the rTorrent code to comply with c++17 standard. It also simplifies various parts of the code.
2025-01-18 20:15:20 +01:00
Jari Sundell c0a5a55444 Disable delay tracker scrape on start. 2023-03-16 22:10:38 +01:00
stickz 551712f842 Fix typo in "trackers.delay_scrape" 2023-03-16 22:10:38 +01:00
stickz c7c290a86b Add "trackers.delay_scrape" command 2023-03-16 22:10:38 +01:00
rakshasa 3b39f37f49 C++11 compatibility fixes. 2014-05-13 23:36:37 +09:00
rakshasa 5bed4f01ad Added tracker related commands. 2012-04-04 02:49:05 +09:00
rakshasa bb75f06c6d Replaced std::placeholders with tr1::placholders. 2012-03-21 01:24:35 +09:00
rakshasa 04acc8a0af Converted std::bind calls to tr1::bind. 2012-03-21 01:22:25 +09:00
Jari Sundell 0b05196e32 Added a missing header. 2011-12-03 13:06:15 +09:00
Jari Sundell a120b8e9cf Moved some stuff out of command_network.cc to make it compile faster. 2011-12-02 22:54:52 +09:00
Jari Sundell 5a2a2e8a68 Show number of peers received from trackers. 2011-11-29 00:38:44 +09:00
Jari Sundell 2be9a874c7 Added counter for new peers each tracker received last request. 2011-11-28 02:25:48 +09:00
Jari Sundell f4c3758dcd Added more scrape information to tracker info. 2011-11-08 01:03:20 +09:00
Jari Sundell a73509a799 Updated use of torrent::Tracker API. 2011-11-05 18:55:01 +09:00
Jari Sundell d7fddfe718 Display tracker success/failed counters. 2011-10-10 17:16:53 +09:00
rakshasa 4d313e6353 Updated copyright information.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1301 e378c898-3ddf-0310-93e7-cc216c733640
2011-10-09 06:30:14 +00:00
rakshasa 3c75a150db * Added 't.success_time_last' and 't.failed_time_last'.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1285 e378c898-3ddf-0310-93e7-cc216c733640
2011-09-21 08:44:46 +00:00
rakshasa 6f71a8c1b1 * Added 'p.is_unwanted' and 'p.is_preferred' commands.
* Removed std::tr1:: in favor of std:: using namespace.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1202 e378c898-3ddf-0310-93e7-cc216c733640
2011-04-07 08:41:16 +00:00
rakshasa bc96dbfa2d * Modified the fallocate configure check so it will fail if 'fallocate' can't be found.
* Changed more commands to the new format.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1153 e378c898-3ddf-0310-93e7-cc216c733640
2010-03-24 20:23:48 +00:00
rakshasa 8cc7c8430d * Fixed minor bugs in the display of tracker groups. Patch by Josef
Drexler.

* Cleanup of the CommandMap class.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1041 e378c898-3ddf-0310-93e7-cc216c733640
2008-03-13 14:28:17 +00:00
rakshasa 4a2ae4d339 * New Tracker API.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1002 e378c898-3ddf-0310-93e7-cc216c733640
2007-11-02 10:47:12 +00:00
rakshasa 3b82216a1b * Renamed 't.get_enabled' to 't.is_enabled'.
* The torrent is no longer closed on finished for on_finished
commands, instead d.set_directory causes the download to call
close_directly.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@974 e378c898-3ddf-0310-93e7-cc216c733640
2007-09-05 17:52:16 +00:00