Commit graph

317 commits

Author SHA1 Message Date
anthonyraymond 50ac7ca074 Improve debug logging in Bandiwth dispatcher 2018-03-26 23:32:52 +02:00
anthonyraymond 362d1d1197 Ensure Thracker url are used in order 2018-03-26 23:32:52 +02:00
anthonyraymond 9ebfeba1f1 Fully implemented Client 2018-03-26 23:32:52 +02:00
anthonyraymond 71ef52be22 Partially implemented client set threads names 2018-03-26 23:32:51 +02:00
anthonyraymond d3b119d62f Add ClientNotifier 2018-03-26 23:32:51 +02:00
anthonyraymond c16f321382 Add response handler chain 2018-03-26 23:32:51 +02:00
anthonyraymond 4a318c38a4 remove old implementation 2018-03-26 23:30:44 +02:00
anthonyraymond d2f1dfb1cd Monkey commit again 2018-03-26 23:30:44 +02:00
anthonyraymond cfc71014fb Create new events 2018-03-26 23:30:44 +02:00
anthonyraymond 31898c4eaa Add chain of responsability element interface 2018-03-26 23:30:44 +02:00
anthonyraymond afee8e1c1c Add AnnouncerExecutor 2018-03-26 23:30:43 +02:00
anthonyraymond 3bfa5ccb30 temp commit 2018-03-26 23:30:43 +02:00
anthonyraymond bf693801eb Disable useless stuff 2018-03-26 23:30:43 +02:00
anthonyraymond caf1da4b25 refactor packages 2018-03-26 23:30:43 +02:00
anthonyraymond 343d95573e Add listener to bandwith manager 2018-03-26 23:30:43 +02:00
anthonyraymond e58cd9bdef Bandwidth is ready, still need some tests 2018-03-26 23:30:43 +02:00
anthonyraymond b21af1eb12 Nice progress on bandiwth dispatcher 2018-03-26 23:30:42 +02:00
anthonyraymond 431b05c312 Start refactoring the core to make it less thread-consuming 2018-03-26 23:30:42 +02:00
anthonyraymond 13ec986a69 Implement a queue that makes items available after delay 2018-03-26 23:30:42 +02:00
anthonyraymond b0fb18e793 Remove useless imports 2018-03-26 23:30:42 +02:00
anthonyraymond 31b3b92955 Remove useless methods 2018-03-26 23:30:41 +02:00
anthonyraymond 6e7f7f0092 app Paths are now stored in a POJO 2018-03-26 23:30:41 +02:00
anthonyraymond 485fc677a4 removed publisher from TorrentFileProvider
Events are now send from Client
2018-03-26 23:30:41 +02:00
anthonyraymond bffcb85af3 rename TorrentFileChangeAware methods 2018-03-26 23:30:41 +02:00
anthonyraymond 2696425bfe Get ride of NoMoreLeechersEvent 2018-03-26 23:30:41 +02:00
anthonyraymond bb75037c9b Increase incomming message size up to 5Mo 2017-11-15 21:27:51 +01:00
anthonyraymond 3ce6b76818 Update ui 2017-11-01 23:11:43 +01:00
anthonyraymond c3bf37be5e Refactor TrackerClients to reduce memory footprint
- Introduce TrackerClientProvider.
- Reduce memory footprint if a lot of torrent are seeding at a time.
2017-10-31 00:04:15 +01:00
anthonyraymond d7d9e41119 Allowed min upload rate and max upload rate to be equal, and even 0 for ghost-seeding mode [skip ci] 2017-10-22 20:24:12 +02:00
anthonyraymond 4f7d9eb4f5 Replace custom RandomGenerator with ThreadLocalRandom [skip ci] 2017-10-22 20:10:12 +02:00
anthonyraymond 29dbcfd603 Refactor key generator 2017-10-21 01:06:45 +02:00
anthonyraymond 3e3ad8eb37 Removed unused imports 2017-10-21 01:06:44 +02:00
anthonyraymond 3034767be4 Client files now accept Casing enums value for key case 2017-10-21 01:06:44 +02:00
anthonyraymond 05e1ff5a6d Refactor peerid provider 2017-10-19 00:08:11 +02:00
anthonyraymond 4cf16b8176 [skip ci] Remove useless import 2017-10-06 23:41:17 +02:00
anthonyraymond 7fcd837013 Update ui version 2017-10-06 00:49:08 +02:00
anthonyraymond 6c309c31cf Update ui version to fix global speed 2017-09-27 23:48:02 +02:00
anthonyraymond 1ddb3a5b32 Add rtorrent client [skip ci] 2017-09-20 22:39:46 +02:00
anthonyraymond 82cb9004c3 Update to 2.0.1 2017-09-18 20:56:05 +02:00
anthonyraymond c44d196b18 update UI 2017-09-18 19:45:47 +02:00
anthonyraymond 7df4b6548a Update ui 2017-09-13 00:23:46 +02:00
anthonyraymond cc1f73fea0 Add a method to remvoe torrent 2017-09-13 00:19:31 +02:00
anthonyraymond 1310408952 Fix somes tests not running properly on linux or slow environment 2017-09-11 23:39:24 +02:00
anthonyraymond ec63efbe37 Fix speed not being set on first announce event (bandwith dispatcher was not the first listener) 2017-08-23 21:53:57 +02:00
anthonyraymond 5101ab5431 add config param keepTorrentWithZeroLeechers to tell if yes or not the torrent must be removed from seed if it reach 0 leechers 2017-08-23 00:14:18 +02:00
anthonyraymond 74f83674f1 Ensure torrent with 0 leechers or 0 seeders won't benefit from speed from BandwithDispatcher 2017-08-22 23:34:06 +02:00
anthonyraymond 0bd1de0b5c update ui 2017-08-21 00:16:35 +02:00
anthonyraymond 597f03982a add ui build to joal-core 2017-08-19 03:31:21 +02:00
anthonyraymond 9171e81b22 Ensure unknown properties don't crashes JOAL in config.json 2017-08-16 00:03:50 +02:00
anthonyraymond 7961568547 removed prefix from client file, prepend regex pattern instead 2017-08-12 18:12:00 +02:00
anthonyraymond ad11d79596 Added personnal url encoding class 2017-08-12 16:46:28 +02:00
anthonyraymond 5b74f18381 Add a parameter to define if the peerid should be url encoded or not 2017-08-12 01:49:40 +02:00
anthonyraymond 6a875b216f Switched to regex for peerid generation 2017-08-12 00:20:04 +02:00
anthonyraymond ba379f499d Dinamically set the locale in HTTP announce request headers. 2017-08-11 18:12:22 +02:00
anthonyraymond 8aa977a31a In case of the user is uploading an empty file, ttorent throws NPE, with no message. Replace the null with a text message 2017-08-09 23:46:23 +02:00
anthonyraymond 98aa521195 Fix a potential bug with https ip fetching and enforce IPV6 support 2017-08-09 22:58:07 +02:00
anthonyraymond f47f7d9e19 Add a todo to re-enable WebSocket CSRF 2017-07-31 01:25:46 +02:00
anthonyraymond 640a33fd85 Reenable http CSRF 2017-07-31 01:25:27 +02:00
anthonyraymond b48fd05e06 Simplify websocket authentication, and actually make it the proper way to enable Spring Principal injection in controllers 2017-07-30 23:18:17 +02:00
anthonyraymond 8c2bbadd55 Fix method name in websocket controller 2017-07-30 23:15:32 +02:00
anthonyraymond 117e4106c6 Fix ConditionalOnWebUi annotation 2017-07-30 13:50:29 +02:00
anthonyraymond 099d93b1e5 Fix socket security 2017-07-30 13:50:13 +02:00
anthonyraymond dca7ce71d9 Add config flag for websocket csrf 2017-07-30 01:48:23 +02:00
anthonyraymond 5cc647feb8 Create @ConditionalOnWebUi annotation 2017-07-30 01:32:32 +02:00
anthonyraymond 51fe28d99d Secure WebSocket endpoints (auth with secret-token) 2017-07-30 01:22:00 +02:00
anthonyraymond 27a36b4b17 Secure HTTP calls (deny all except for handshake hanpoint) 2017-07-30 01:21:11 +02:00
anthonyraymond 6ac1f69d01 Fix WebSocketConfig 2017-07-30 01:20:12 +02:00
anthonyraymond 50fc85941e Add conditionnalOn to EndpointObfuscator ensure it won't be avaiable in non-web context 2017-07-30 01:18:04 +02:00
anthonyraymond ccccddae73 add placeholder for future MessageExceptionHandler 2017-07-29 00:34:25 +02:00
anthonyraymond 0ea8a0c98f Removed HTTP controller to upload torrent 2017-07-29 00:18:46 +02:00
anthonyraymond 98dac7ff96 Torrent are now uploaded using stomp instead of http 2017-07-28 00:30:23 +02:00
anthonyraymond 371f1c83b5 Aggregate all Websocket mapping into the same controller 2017-07-28 00:15:31 +02:00
anthonyraymond 0b5ce96dbf Fetching replayable events are now done with websocket 2017-07-28 00:04:15 +02:00
anthonyraymond e676942413 Increase WebSocket maximum message size 2017-07-27 22:29:56 +02:00
anthonyraymond 72fcdf4322 Add reliable ways to hide joal (endpoint path obfuscation) 2017-07-26 00:42:04 +02:00
anthonyraymond 74b22efcab Fix method name 2017-07-25 21:21:45 +02:00
anthonyraymond be5401cbdf Removed path from MockedTorrent 2017-07-24 21:40:06 +02:00
anthonyraymond 31e05578bc Mocked torrent is now compared by infohash instead of path 2017-07-24 21:22:26 +02:00
anthonyraymond 38e4fba166 Fix logger message 2017-07-24 20:46:36 +02:00
anthonyraymond 0948a3e2fa SeedManager is no more spring dependant 2017-07-24 20:22:27 +02:00
anthonyraymond b25c8d03ff SeedManager is init and tearedDown by spring ApplicationEvent. Add method to allow torrent upload 2017-07-24 00:36:00 +02:00
anthonyraymond d58182423a Removed unseless imports 2017-07-22 12:46:13 +02:00
anthonyraymond 3d7e4568af Add message to exception wrapper in HTTPTrackerClient 2017-07-22 12:37:15 +02:00
anthonyraymond 614e66fd21 Moved HttpTrackerClient from default HTTPClient to Apache HttpClient. Improved error reporting in announce 2017-07-22 01:43:22 +02:00
anthonyraymond a5f2320a14 Web environment is disabled by default (use arg --spring.main.web-environment=true to enable) 2017-07-20 23:52:09 +02:00
anthonyraymond 45a347e703 Replace sun base64 encoder with Apache common-codec one 2017-07-20 23:08:04 +02:00
anthonyraymond a37593a250 Enforce StaticClientFilesTester 2017-07-20 22:52:21 +02:00
anthonyraymond 39affd8d0c Add new key generator 2017-07-20 22:10:14 +02:00
anthonyraymond 2957160326 Added static checker for client files. Removed old clients. 2017-07-20 00:36:12 +02:00
anthonyraymond 1e85365383 Add test to ensure unicode characters are supported for peerIdGenerator in .client files 2017-07-20 00:05:22 +02:00
anthonyraymond b18cfdd0d0 Moved KeyGenerator to new KeyTypes 2017-07-19 23:43:40 +02:00
anthonyraymond 642553c63b Add new KeyTypes (hash). Rename StringTypes to PeerIdTypes 2017-07-19 23:35:50 +02:00
anthonyraymond e7f0163555 Added {numwant} placeholder, replaced by 'numwant' or 'numwantOnStop' config value 2017-07-19 22:56:46 +02:00
anthonyraymond e51435c373 Add numwant and numwantOnStop to BitTorrentClientConfig 2017-07-19 22:41:28 +02:00
anthonyraymond c7d41d2ab1 Add numwant provider class 2017-07-19 22:22:22 +02:00
anthonyraymond 8985382b5b Add security check to ensure all placeholders have been replaced in announce query 2017-07-19 22:07:02 +02:00
anthonyraymond 382066ef27 Improved two TimedGenerator test 2017-07-18 01:00:06 +02:00
anthonyraymond 0448ee5e8f Removed unused imports 2017-07-18 00:51:34 +02:00
anthonyraymond 1145062bf5 Fix ConnectionHandler and add test for it 2017-07-18 00:50:35 +02:00
anthonyraymond 50e5137f52 ipv6 placeholder is replaced by url encoded value 2017-07-17 23:12:24 +02:00
anthonyraymond dfebbd9504 Improve BitTorrentClient url builder tests. Removed Numwant parameter from request URL. Fix ConnectionHandler 2017-07-17 22:17:26 +02:00
anthonyraymond b1d0518c48 refactor how keys and peerId are generated. Add numwantOnStop param to clients 2017-07-16 22:59:46 +02:00
anthonyraymond 52e9fec55a Move announce URL creation to BitTorrentClient 2017-07-16 01:17:10 +02:00
anthonyraymond 2b5c810fa6 Add upload file controller (still need to dispatch create file on server) 2017-07-13 01:16:40 +02:00
anthonyraymond 65ecc5ba20 Dispatch torrent file alteration to client 2017-07-12 00:02:02 +02:00
anthonyraymond 89e0bca1d2 Torrent file event are now replayable 2017-07-11 22:08:40 +02:00
anthonyraymond 7f9a802025 Added messages types for torrent file alteration events 2017-07-11 00:00:53 +02:00
anthonyraymond 672e5e6ff5 Added FailedToAddTorrentFilePayload 2017-07-11 00:00:49 +02:00
anthonyraymond 352a9372c0 Added TorrentFileDeletedPayload 2017-07-10 23:59:53 +02:00
anthonyraymond e17a7479ed Add TorrentFileAddedPayload 2017-07-10 23:59:48 +02:00
anthonyraymond 85d1add3f9 publish events from TorrentFileProvider 2017-07-10 23:41:43 +02:00
anthonyraymond 074eb73a78 add TorrentFileDeletedEvent 2017-07-10 23:41:37 +02:00
anthonyraymond 61ac48b936 Add FailedToAddTorrentFileEvent 2017-07-10 23:40:32 +02:00
anthonyraymond 05b960e7ba rename TorrentFileAddedForSeedEvent event. remove event publishing from client. 2017-07-10 23:26:47 +02:00
anthonyraymond e7b34b9b85 Add event publisher to TorrentFileProvider 2017-07-10 23:14:40 +02:00
anthonyraymond 1ed683564f fix a test not running on a first time run 2017-07-10 23:12:22 +02:00
anthonyraymond 48a6485a1c properly set variable on stop TorrentFileProvider 2017-07-10 23:03:15 +02:00
anthonyraymond 30a5a94057 improve test coverage on application Events 2017-07-09 22:25:57 +02:00
anthonyraymond 735c79c959 improve test coverage on JoalConfProvider 2017-07-09 22:09:39 +02:00
anthonyraymond 29e8961433 improve test coverage on BitTorrentCientProvider 2017-07-09 21:55:31 +02:00
anthonyraymond 0da84ba740 Fully implemented Config management 2017-07-09 14:15:58 +02:00
anthonyraymond 64ca8b824f Add the ability to save a new application configuration in SeedManager 2017-07-09 01:20:29 +02:00
anthonyraymond 87eb7a5c4d Move TorrentFileProvider's archive folder creation to an init method 2017-07-09 00:50:29 +02:00
anthonyraymond 81e0bd7e3d BitTorrentClientProvider is no longer managed by spring 2017-07-09 00:42:45 +02:00
anthonyraymond 58b8111774 JoalConfigProvider is no longer managed by spring 2017-07-09 00:28:07 +02:00
anthonyraymond 289bed9f70 TorrentFileProvider is no longer managed by spring 2017-07-09 00:24:07 +02:00
anthonyraymond 239d233556 Expose event when config has been loaded 2017-07-09 00:12:42 +02:00
anthonyraymond 94e7436434 Indent and unsused imports 2017-07-08 18:24:53 +02:00
anthonyraymond 5607766302 Made JoalMessageSendingTemplate ThreadSafe (for replayable state purpose) 2017-07-08 18:18:20 +02:00
anthonyraymond 9617e13b6b Implement a list of required event to be replayed on the client to represent current joal state 2017-07-05 23:44:54 +02:00
anthonyraymond e64db4db17 Fix LocalDateTime serialization 2017-07-04 22:37:33 +02:00
anthonyraymond ea2cd0f77b Small refactor to introduce a summary controller that will be able to dispatch a full state at every moment 2017-07-04 21:25:10 +02:00
anthonyraymond 534d6c5c44 Removed unused imports 2017-06-30 00:14:15 +02:00
anthonyraymond d7529af574 Refactor Stop events format and send method 2017-06-30 00:13:13 +02:00
anthonyraymond 5f1e90b540 Fix bytes units. File size => iec format; transfert rate => base 10 2017-06-27 00:40:37 +02:00
anthonyraymond dace1a16d0 [Stomp] Expose announce event 2017-06-26 01:49:11 +02:00
anthonyraymond 20a18e159f [Core] Prepare announcer events 2017-06-25 23:54:41 +02:00
anthonyraymond 5be8f9af37 [Stomp] Create POJO for announcer messages 2017-06-25 18:16:45 +02:00
anthonyraymond cced7cfbda [Stomp] expose start control 2017-06-25 17:17:09 +02:00
anthonyraymond ccb1a73f9a Expose Stop and Start over stomp 2017-06-25 01:18:11 +02:00
anthonyraymond 8f10bc7de3 Fix websocket endpoint 2017-06-24 21:33:16 +02:00
anthonyraymond 42c5735acd Add message sender for ClientHasStarted 2017-06-22 22:57:52 +02:00
anthonyraymond 75edea11f6 Add ClientHasStartedMessage 2017-06-22 22:21:27 +02:00
anthonyraymond d76b7cdf33 SomethingHasFuckedUp now has the lowest precedence to ensure all other callback will be caleld first 2017-06-22 21:48:08 +02:00
anthonyraymond 45c4f75064 Removed useless file header 2017-06-22 21:44:50 +02:00
anthonyraymond a898268313 Fix a potential error that may occur if torrent fails to create MockedTorrent from a torrent file 2017-06-22 21:43:10 +02:00
anthonyraymond 8142713c50 Add comment to CoreEventListener and remove dead code 2017-06-10 14:40:50 +02:00
anthonyraymond 037568e75d If a torrent fails to announce to many times, it will be moved to archive folder. 2017-06-10 14:35:59 +02:00
anthonyraymond d6f5b8f4ee Add a FIXME to remeber that there is a minor bug to fix 2017-06-08 23:06:18 +02:00
anthonyraymond 0b39f44ec3 typo in TorrentFileProvider log 2017-06-08 22:52:45 +02:00