Commit Graph

141 Commits

Author SHA1 Message Date
Cas_
633d68a32c
feat: updated webrtc implementation (#519)
* feat: update webrtc implementation

* chore: update deps
2024-05-22 22:51:48 +01:00
Cas_
bce64e155d
feat(major): drop simple-get (#443)
BREAKING CHANGE: drop simple-get

* perf: drop simple-get

* feat: undici agent and socks

* fix: undici as dev dependency

* feat: require user passed proxy objects for http and ws

* chore: include undici for tests
2023-10-31 10:51:04 +01:00
Cas
c99eb89208
fix: drop buffer (#465) 2023-05-26 17:54:30 +01:00
renovate[bot]
b72d226ed8
chore(deps): update webtorrent (#445)
* chore(deps): update webtorrent

* fix: dependencies (#446)

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Cas <6506529+ThaUnknown@users.noreply.github.com>
2023-02-01 03:43:44 +01:00
Cas
e6d3189edf
feat: esm (#431)
BREAKING CHANGE: ESM only

* feat: esm

* fix: linter oops
2022-12-05 23:06:54 +01:00
Linus Unnebäck
8222ccd1d6
style: use object shorthand for properties (#400) 2021-10-29 09:36:47 -05:00
Alex
ad64dc3a68
feat: add proxy support for tracker clients (#356)
* Add a httpAgent options to http and websocket client trackers.

* Add a socks proxy to udp client trackers.

* Update http agent mock to node 5+

* Bugfix in socks configuration

* Use new socket to connect to the proxy relay and slice the proxy header from the message

* Add documentation for proxy

* Provide http and https agents for proxy.
Change proxy options structure and auto populate socks HTTP agents.

* Update documentation

* Check socks version for UDP proxy

* Clone proxy settings to prevent Socks instances concurrency

* Generate socks http agents on the fly (reuse is not working)

* Use clone to deepcopy socks opts

* Dont create agent for now since we cannot reuse it between requests.

* Removed unused require

* Add .gitignore

* Fix merge conflict

* Fix URL toString

* Fix new Socket constructor

Co-authored-by: Yoann Ciabaud <yoann@sonora.io>
2021-08-20 16:08:36 -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
Alex
8e24a8c97b fix: UDP url parsing 2021-05-20 21:38:51 +02:00
Feross Aboukhadijeh
c88bbb4a62 standard 2020-10-28 18:57:47 -10:00
Feross Aboukhadijeh
e0c0eb8127 standard 2020-10-28 17:11:51 -10:00
Feross Aboukhadijeh
6e4faaf670 standard 2020-10-28 10:02:35 -10:00
Feross Aboukhadijeh
04dd528c27
Merge pull request #341 from LinusU/object-shorthand 2020-05-17 12:37:05 -07:00
Feross Aboukhadijeh
cecb778b4b fix querystring tests
The deep-equal check is in "strict mode" so it needs the prototypes of both objects to be equal. This fixes that.
2020-05-10 11:30:06 -07:00
Linus Unnebäck
ae5e99f0af
Use object shorthand for properties 2020-04-25 10:34:40 +01:00
Feross Aboukhadijeh
adb8ee237b Use wrtc for more reliable tests 2019-08-07 18:56:31 -07:00
Feross Aboukhadijeh
d6751dac41 remove safe-buffer 2019-08-06 17:58:05 -07:00
Feross Aboukhadijeh
b88cdf7d0a standard 2019-07-27 20:35:35 -07:00
Feross Aboukhadijeh
1a075bd159 standard 2019-07-05 14:36:14 -07:00
Alex
a8869b0d28 Add tests to validate tracker 2019-04-08 20:43:50 +02:00
Feross Aboukhadijeh
056a83d1b5 feross -> webtorrent 2017-04-14 12:50:19 -07:00
Feross Aboukhadijeh
90121a62c2 remove unnecessary quotes 2017-04-04 11:46:43 -07:00
Feross Aboukhadijeh
0c683dfe64 test: change request handler test to new approach 2017-03-10 13:39:12 -08:00
Feross Aboukhadijeh
51b57f66cf test: remove UDP request handler test -- not possible 2017-03-10 13:39:02 -08:00
Yoann Ciabaud
1efb832dd7 Remove debug log 2017-03-09 11:19:46 +01:00
Yoann Ciabaud
146d4d46dd Extension point on requests and responses 2017-03-09 11:19:46 +01:00
Feross Aboukhadijeh
40202a00b7 BREAKING: change how the filter function works
It's non-standard for a callback function to take a non-error argument
in the first position.

So instead of the filter callback accepting three types of arguments:

cb(true) // allowed
cb(false) // disallowed
cb(new Error('custom message')) // disallowed with custom message

It now accepts two forms:

cb(new Error('custom message')) // disallowed with custom message
cb(null) // allowed
2017-03-01 22:54:40 -08:00
Feross Aboukhadijeh
cd4a976121 add failing tests for desired evicition behavior 2017-02-08 13:12:39 -08:00
Feross Aboukhadijeh
4422067607 test: server: check that all clients, server are destroyed 2017-02-08 13:11:48 -08:00
Feross Aboukhadijeh
e731106279 test: ensure electron-webrtc is started only for test where it's needed
before this change, it was getting initialized immediately, since it
was outside a tape test block
2017-02-08 13:11:35 -08:00
Feross Aboukhadijeh
29d4564bbd remove unneeded timeout 2017-02-08 12:27:50 -08:00
Feross Aboukhadijeh
fb751d7c96 Re-enable ws server tests (websocket tracker) 2017-01-29 16:25:16 -08:00
Feross Aboukhadijeh
c3bf7f87f6 test: add failing test for the second part of #190 2017-01-20 18:34:05 -08:00
Feross Aboukhadijeh
63d24611ec test: speed up testClientUpdate() test 2017-01-20 18:33:30 -08:00
Feross Aboukhadijeh
1424a00c3a test: don't rely on setTimeout in testClientStop() 2017-01-20 18:33:17 -08:00
Feross Aboukhadijeh
ee45b7947b update filter tests to clarify multiple clients 2017-01-20 18:32:59 -08:00
Feross Aboukhadijeh
c4f4f012dd Add fixes and tests for PR #179 2017-01-16 15:43:47 -08:00
Feross Aboukhadijeh
15a35cedd9 add test: no "update" events after destroy() 2016-09-16 07:49:49 -07:00
Feross Aboukhadijeh
55eda0ed93 Run all tests 2016-08-05 18:41:25 -07:00
Feross Aboukhadijeh
59bba81c5a Fix Client.scrape returns no error on invalid URL
Fix #167.
2016-08-05 18:23:43 -07:00
Feross Aboukhadijeh
a59a3069b5 Fix webtorrent version parsing 2016-07-29 18:18:32 -07:00
Yoann Ciabaud
f76b27c12a Merge pull request #160 from yciabaud/lru-pruning
Limit peers in tracker server with LRU based cache fixes #4
2016-07-19 19:50:25 +02:00
Feross Aboukhadijeh
cc783392c4 fixes for standard v8 2016-07-13 13:54:19 -07:00
Yoann Ciabaud
2ac65725a1 Merge pull request #158 from yciabaud/stats-clients
Add stats on clients based on peerIds
2016-06-23 15:08:23 +02:00
Yoann Ciabaud
29fcf30cb4 Use correct HTTP header to work with JSON on GET 2016-06-13 00:34:26 +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
1dbc95cbdc Add pruning to server tests.
Issue #4
2016-06-09 01:28:49 +02:00
Yoann Ciabaud
ca522c0c4b Prune old peers in server with lru based cache. Issue #4 2016-06-08 23:57:01 +02:00
Yoann Ciabaud
f8c7de5213 Add stats on clients based on peerIds 2016-06-07 14:34:38 +02:00