Commit Graph
53 Commits
Author SHA1 Message Date
Brad Marsden fe75272d51 fix(parse-http): ignore announcements from peers with invalid announcement ports. (#513) 2024-03-12 17:40:46 +00:00
Cas c99eb89208 fix: drop buffer (#465) 2023-05-26 17:54:30 +01:00
Tom Snelling bf8831c64a adds handling for x-forwarded-for comma-separated syntax (#452) 2023-03-17 02:07:39 +01:00
Cas e6d3189edf feat: esm (#431)
BREAKING CHANGE: ESM only

* feat: esm

* fix: linter oops
2022-12-05 23:06:54 +01:00
Paul Sharypov ef76b3f3b6 feat(events): Support of paused client event (#411)
* feat: Added `paused` client event

* fix(events): fixed 'invalid event' response on 'paused' request from client

* fix(styles): fixed extra semicolon
2022-06-01 10:23:38 -05:00
Diego Rodríguez Baquero ca88435617 fix: if websocket closed, don't produce a response 2021-07-21 20:07:06 -05:00
Diego Rodriguez Baquero e5994d2ebd fix: modernize 2021-06-14 20:54:41 -05:00
Feross Aboukhadijeh c88bbb4a62 standard 2020-10-28 18:57:47 -10:00
Feross Aboukhadijeh 695ade5b86 Remove useless assignment 2019-08-12 18:20:45 -07:00
Feross Aboukhadijeh 1a075bd159 standard 2019-07-05 14:36:14 -07:00
Feross Aboukhadijeh fc87c8c9ff build 2018-02-17 17:13:56 -08:00
Feross Aboukhadijeh a09158bb4b Delete socket.upgradeReq when it is no longer needed to reduce memory usage
cc @lpinca
2017-03-07 13:22:51 -08:00
Feross Aboukhadijeh fe11c695cb do not close socket even when it's not in other swarms 2017-02-21 01:50:48 -08:00
Feross Aboukhadijeh b2c2b8f0d0 do not access socket.infoHashes if socket is destroyed 2017-02-21 01:50:30 -08:00
Feross Aboukhadijeh 7d2318dce6 Use unordered-array-remove for better performance! 2017-02-13 17:30:22 -08:00
Feross Aboukhadijeh a469740603 Merge pull request #198 from feross/fix-196
Fix stats and leaked websockets
2017-02-09 23:16:28 +01:00
Feross Aboukhadijeh 3d81e68124 standard 2017-02-08 16:22:13 -08:00
Feross Aboukhadijeh 806ce1d18b Address @DiegoRBaquero's feedback
From comment:
https://github.com/feross/bittorrent-tracker/pull/198#discussion_r993882
95
2017-02-08 13:13:20 -08:00
Feross Aboukhadijeh d534582a8c Only close websocket when it's not participating in any more swarms 2017-02-08 12:27:50 -08:00
Feross Aboukhadijeh 29d4564bbd remove unneeded timeout 2017-02-08 12:27:50 -08:00
Feross Aboukhadijeh 1b22b53fe8 fix tests: wait for socket to send final responses 2017-02-08 12:27:50 -08:00
Feross Aboukhadijeh 7075088848 Close websockets when peers are evicted from LRU cache
Possibly fixes: https://github.com/feross/bittorrent-tracker/issues/196

Close websockets when peers are evicted from LRU cache, otherwise it's
possible for a peer object to be evicted from the LRU cache without the
socket being cleaned up. That will leak memory until the websocket is
closed by the remote client. It also messes up the stats.
2017-02-08 12:27:50 -08:00
Feross Aboukhadijeh 8f33b95f9f swarm maxAge: increase to 20 min 2017-02-08 12:27:50 -08:00
Feross Aboukhadijeh 62dd0f7df2 treat unexpected 'completed' events as 'updated' 2017-02-08 12:27:50 -08:00
Feross Aboukhadijeh ed3da2f39b If peer is already complete, it should still be refreshed in the LRU cache 2017-02-08 12:27:50 -08:00
Feross Aboukhadijeh c2c8e36af7 Fix bug where left = 0 would be converted to Infinity
Possibly fixes: https://github.com/feross/bittorrent-tracker/issues/196
2017-02-08 12:27:50 -08:00
Feross Aboukhadijeh 27ae148167 Fixes for PR #185 2017-02-08 12:27:50 -08:00
Feross Aboukhadijeh 9cf2dffa67 debug: better debug names 2017-01-20 18:34:33 -08:00
Sidd Sridharan 9d9893a0f2 parse params.left = 0 properly 2016-12-04 12:42:57 -08:00
Alex f14d0b83df Add id parameter in announce calls 2016-08-08 17:25:25 +02:00
Yoann Ciabaud 2c7ea4e307 Refactor id usage in announce and fix default peersCacheTtl 2016-06-14 07:15:57 +02:00
Yoann Ciabaud d51a77b028 Update lru package to 3.0.0 and set peersCacheLength to 1K as default 2016-06-10 10:00:19 +02:00
Yoann Ciabaud 5843b7d2f6 Bugfix in manual peer eviction. 2016-06-10 00:29:56 +02:00
Yoann Ciabaud 7f98203d5e Manually clean peers on announce 2016-06-09 16:28:31 +02:00
Yoann Ciabaud 5dcc932247 Refresh cache on changes and handle access to evicted peer 2016-06-09 02:10:07 +02:00
Yoann Ciabaud ca522c0c4b Prune old peers in server with lru based cache. Issue #4 2016-06-08 23:57:01 +02:00
Feross Aboukhadijeh f60ecec0dc remove buffer-equals dependency 2016-03-24 03:25:31 -07:00
Feross Aboukhadijeh 35697f5187 Merge pull request #137 from fanatid/feature/buffer-equals
buffer-equals instead buffer-equal
2016-03-24 03:21:08 -07:00
Feross Aboukhadijeh 2fffdc6730 ws server: drop support for old tracker clients
old clients don’t send params.action === ‘action’
2016-03-23 21:27:32 -07:00
Kirill Fomichev 0193f58654 buffer-equals instead buffer-equal 2016-03-21 14:46:39 +03:00
Feross Aboukhadijeh ba4a52d2d1 Fixes for PR #125 2016-03-15 20:06:39 -07:00
Yoann Ciabaud 39507bf8be Scrape implementation for websocket. Issue #116 2016-03-14 00:36:51 +01:00
Yoann Ciabaud eb3cefec35 Use type from server to filter peers to offer 2016-03-13 15:51:08 +01:00
Feross Aboukhadijeh e3c65bc2a3 PR Feedback for #120 2016-03-11 17:21:19 -08:00
Yoann Ciabaud af631d9fce Merge remote-tracking branch 'upstream/master' into client-infos 2016-03-11 10:34:07 +01:00
Yoann Ciabaud 2f37e6c476 Adds a type param to identify the source of the peer 2016-03-11 10:09:09 +01:00
Feross Aboukhadijeh 0585d8b18a use delete obj[key] instead of obj[key] = null 2016-03-10 21:26:28 -08:00
Diego Rodríguez Baquero e185f321d3 Delete peer on announce stopped 2016-03-11 01:10:34 -03:00
Yoann Ciabaud 60f03b9529 Provide IP and HTTP headers in both HTTP and Websocket server 2016-03-03 11:10:54 +01:00
Alex 8692e45215 Fix display error 2016-01-13 15:57:22 -05:00