Commit Graph

224 Commits

Author SHA1 Message Date
Bora M. Alper
0c9adb95d4 Merge branch 'richardkiss-asyncio' 2017-06-02 16:09:48 +03:00
Bora M. Alper
5da4b6c67d Merge branch 'asyncio' of https://github.com/richardkiss/magnetico into richardkiss-asyncio
# Conflicts:
#	magneticod/magneticod/__main__.py
#	magneticod/magneticod/dht.py
2017-06-02 16:09:28 +03:00
Bora M. Alper
d628269d67 Merge branch 'master' of github.com:boramalper/magnetico 2017-06-02 15:35:27 +03:00
Bora M. Alper
c6388f33e8 Merge branch 'richardkiss-asyncio' 2017-06-02 15:34:39 +03:00
Bora M. Alper
6a459d5e58 huge commit, code review done on asyncio port 2017-06-02 15:34:22 +03:00
Bora M. Alper
536ac2c4dc Removed "incoming finals" notice from README.md
I am free!
2017-06-01 12:13:08 +03:00
Bora M. Alper
04e6d583f3 Merge branch 'asyncio' of https://github.com/richardkiss/magnetico into richardkiss-asyncio 2017-05-30 12:45:17 +03:00
Bora M. Alper
6bceb9c784 v0.4.0 is released!
Changes are below.

magneticod:
* Performance improvements
  * Unregistering WRITE event when possible
  * Using files instead of memory for temporary SQLite
    objects
* Stability improvements
  * Limit metadata size to prevent crashes due to
    malicious or malformed answers.
  * Flushing metadata buffer while exiting gracefully

magneticow:
* Stability improvements
  * Homepage crash due to count functionality when the
    database is empty, is fixed.
* Statistics page added, although very slow!
2017-05-30 12:28:34 +03:00
Bora M. Alper
273237bd39 magneticow: fix 30-days period issue in stats
Previously magenticow calculated 30-days period as
literally 30 days (30 * 24 * 60 * 60 seconds) from NOW,
which was counter-intuitive for the user as it did not
correspond to whole days. Now that is fixed.
2017-05-30 12:01:51 +03:00
Bora M. Alper
e4c33ceb36 magneticod: store temp files in files and not in memory
(reduces the memory consumption)
2017-05-29 22:00:37 +03:00
Richard Kiss
0e389aa619 Query DB when checking if an infohash is new or not. 2017-05-27 16:11:29 -07:00
Richard Kiss
d7ead951a4 Refactor create_tasks out of main. 2017-05-27 16:05:22 -07:00
Richard Kiss
5d37737d0d Add some resource debug logging. 2017-05-27 12:20:24 -07:00
Richard Kiss
4dc11b047f Tidy up clean-up. Simplify fetch_metadata. 2017-05-24 14:50:26 -07:00
Richard Kiss
8df4015e06 Be a little smarter with task clean-up. 2017-05-24 12:51:25 -07:00
Richard Kiss
9b1bbfcaa1 Properly clean up fetch_metadata tasks. 2017-05-17 16:31:40 -07:00
Richard Kiss
29b99a338e ModuleNotFoundError (new in 3.6) => ImportError. 2017-05-17 12:10:40 -07:00
Richard Kiss
3e4eba740c Do explicit look-up of bootstrap nodes, and query all responses. 2017-05-15 15:58:13 -07:00
Richard Kiss
e6098ffb4a Use uvloop if available. 2017-05-15 15:44:36 -07:00
Richard Kiss
35c6176548 Move neighbour task work to tick task. 2017-05-15 00:06:02 -07:00
Bora M. Alper
566ebea987 Merge pull request #75 from ad-m/patch-4
Fix count torrents on homepage in magneticow
2017-05-15 08:18:06 +04:00
Richard Kiss
71f55f0c91 Reduce noise. 2017-05-14 14:13:34 -07:00
Richard Kiss
f38a796181 Add connection_lost. Properly handle shutdown of watch_q. 2017-05-14 14:04:46 -07:00
Richard Kiss
4b4c312fbe SybilNode now support pause_writing. 2017-05-14 14:00:50 -07:00
Richard Kiss
73d97d8188 Better cancel all outstanding tasks. 2017-05-14 13:55:19 -07:00
Richard Kiss
d04634b57b Improve dht shutdown. Notice writing pauses. 2017-05-14 13:43:15 -07:00
Richard Kiss
4515fa8b0a More cleanup. Only hit bootstrap if it seems necessary. 2017-05-14 13:37:22 -07:00
Adam Dobrawy
a98ec61e84 Fix count torrents on homepage in magneticow 2017-05-14 22:06:34 +02:00
Richard Kiss
635fbe8cb1 More clean-up and simplification. 2017-05-14 13:03:01 -07:00
Richard Kiss
f3ae493308 More clean-up in error cases. 2017-05-14 12:03:50 -07:00
Richard Kiss
4aea5df886 Reduce leakage in bittorrent.py. 2017-05-14 11:41:11 -07:00
Richard Kiss
2f68ac3c7a Improve naming. 2017-05-13 22:55:49 -07:00
Richard Kiss
eb8a2c72e6 Fix conditional. 2017-05-13 22:52:43 -07:00
Richard Kiss
8da8d20b53 First crack at porting to asyncio. 2017-05-13 22:49:14 -07:00
Bora M. ALPER
a3adf88b45 Statistics page added to magneticow. 2017-05-06 01:25:44 +04:00
Bora M. Alper
8b837be714 Updated README to include our gitter.im channel
Feel free to join people!
2017-05-01 17:51:29 +04:00
Bora M. Alper
818667b363 Merge pull request #58 from ad-m/patch-1
Limit metadata size, move constants to a new file, allow custom database paths
2017-05-01 09:24:09 +04:00
Adam Dobrawy
18f6617214 Add humanfriendly.format_path in --database-file help 2017-05-01 06:47:21 +02:00
Adam Dobrawy
17bd563909 Fix import error in persistence 2017-05-01 06:37:51 +02:00
Adam Dobrawy
0bb1a98415 Introduce requested changes, log when malicious / empty metadata received 2017-05-01 06:34:42 +02:00
Bora M. Alper
57edd024ba Merge pull request #63 from ad-m/flush-buffer
Flush metadata buffer when exiting gracefully
2017-05-01 07:33:34 +04:00
Adam Dobrawy
fd654f25b8 Flush metadata buffer when exiting gracefully 2017-05-01 03:14:50 +02:00
Adam Dobrawy
9b12c25966 Add missing comment to PENDING_INFO_HASHES 2017-05-01 00:41:32 +02:00
Adam Dobrawy
cde5728019 Fix typo in SybilNode & __max_metadata_size 2017-05-01 00:28:34 +02:00
Adam Dobrawy
fa2a135e06 Add --debug argument 2017-04-30 23:47:08 +02:00
Adam Dobrawy
ed081e9399 Clean up parse_ip_port 2017-04-30 23:38:28 +02:00
Adam Dobrawy
e826494453 Extract constants (fixes #37), allows you to specify a size limit and database path as an argument 2017-04-30 23:10:09 +02:00
Adam Dobrawy
14979c96ce Limit metadata size
Malicious or malfunctioning peer can try send a huge metadata size what causes huge memory usage and to overflow them.
2017-04-30 21:00:33 +02:00
Bora M. Alper
2251664dbd Merge pull request #54 from s723138643/master
if there is no data to send, we should unregister WRITE event
2017-04-29 15:12:34 +04:00
s723138643
ed13036588 if there is no data to send, we should unregister WRITE event 2017-04-29 10:22:38 +08:00