Feross Aboukhadijeh
a5d0975dfa
Do not crash when wrtc
dep is missing
2015-04-20 16:38:59 -07:00
Feross Aboukhadijeh
03bed33457
add webtorrent (websocket) tracker server
...
This PR merges webtorrent-tracker into this repo. Keeping the code in
sync between the two repos was becoming burdensome. This change should
not effect performance of the server since the webtorrent tracker is
disabled by default.
To enable the webtorrent tracker (disabled by default), do:
```js
var server = new Server({ ws: true })
```
2015-03-27 16:19:06 +13:00
Feross Aboukhadijeh
1ff5769054
add support for webtorrent (websocket) trackers
2015-03-24 01:52:35 -07:00
Feross Aboukhadijeh
f575cfc3c9
major client refactor - each tracker type into its own file
...
in preparation of adding a new websocket tracker type, for webtorrent
2015-03-24 01:01:49 -07:00
Feross Aboukhadijeh
67daf78c2d
style
2015-03-09 20:19:27 -07:00
zckevin
8ee64c05f8
[Client] Fix question mark in announceUrl
2015-03-09 12:40:35 +08:00
Feross Aboukhadijeh
72922a64e4
fix regression in 3.0.1
2015-01-31 15:25:37 -08:00
Feross Aboukhadijeh
287cd873bc
remove extend.js
2015-01-31 15:04:16 -08:00
Feross Aboukhadijeh
82e6792a6b
BREAKING CHANGES
...
Breaking changes:
- 'listening' event no longer emits with `port` param
- `server.port` property removed (instead, use
`server.http.address().port`)
Added features:
- expose http server as `server.http`
- expose udp server as `server.udp`
- client.destroy() - ungracefully leave the swarm
- server: added `filter` option to black/whitelist torrents
Bugfixes:
- client considers udp tracker errors to be warnings
- emit 'start', 'stop', 'update', etc. AFTER response sent
- fix udp error response action and message being `undefined`
Internal:
- remove `portfinder` dep
- add complete test for `filter` functionality
2015-01-29 14:59:08 -08:00
Feross Aboukhadijeh
a6f14037ff
style
2015-01-28 18:09:23 -08:00
Feross Aboukhadijeh
ebb86f728f
JavaScript Standard Style
...
https://github.com/feross/standard
2015-01-26 18:16:01 -08:00
Feross Aboukhadijeh
d562f14e06
fix debug usage
2015-01-23 22:42:05 -08:00
Max Ogden
9e691afbfe
add debug statement for udp response
2015-01-23 22:16:44 -08:00
Feross Aboukhadijeh
94feea69e2
Support http tracker redirects, gzip/deflate
2015-01-22 14:23:53 -08:00
Anthony MOI
aee4211b7d
use url to parse announceUrl
2015-01-22 14:00:24 +01:00
Anthony MOI
e55896e268
Add https support
2015-01-22 13:29:50 +01:00
Feross Aboukhadijeh
538bb3e20a
include additional debug information
2014-12-17 21:17:58 -08:00
Feross Aboukhadijeh
79068a49cf
Use hex info_hash and peer_id throughout
2014-12-12 02:02:11 -08:00
Feross Aboukhadijeh
84f6107345
check for domain names in data.peers6
2014-11-27 17:31:49 +08:00
Feross Aboukhadijeh
0b831d2fde
actually iterate over ipv6 peers
2014-11-27 17:31:33 +08:00
Feross Aboukhadijeh
d7c4af4ce8
handle case where server returns ip in square brackets
2014-11-26 20:18:56 +08:00
Feross Aboukhadijeh
b079bad35a
code style
2014-11-26 20:18:56 +08:00
Astro
1ca387f2fe
client IPv6 support [BEP-7]
2014-11-26 20:18:56 +08:00
Feross Aboukhadijeh
deee4e1d7d
fix client handling to support http peers
non-compact response
2014-11-26 16:21:45 +08:00
Astro
4f1ea32f35
client _handleResponse: allow string form of peer.ip
2014-11-26 16:20:14 +08:00
Feross Aboukhadijeh
07850cdc13
Fixes for PR #39
...
- emit 'warning' instead of 'error' because it's not a fatal error,
just a bad tracker response.
- made the try block more concise so it only catches the errors from
`string2compact`
2014-10-06 23:14:09 -07:00
Theadd
e898ef45f6
handle .* IP/PORTs (6 bytes) error
2014-09-24 18:03:30 +02:00
Feross Aboukhadijeh
61cfe0afa6
don't emit 'error' for non-fatal errors
2014-08-18 01:40:30 -07:00
Feross Aboukhadijeh
48dcab8420
don't crash if torrent.announce is undefined
2014-08-17 20:56:11 -07:00
Feross Aboukhadijeh
8ba742eed4
whitespace
2014-08-17 01:41:09 -07:00
Feross Aboukhadijeh
ab32d5e7a1
cleanup debug() usage
2014-08-02 14:41:04 -07:00
Feross Aboukhadijeh
e73737dac7
trackers must start with http:// or udp://
2014-08-02 14:09:44 -07:00
Feross Aboukhadijeh
ad5c5b6133
lots of little cleanup
2014-08-02 13:43:06 -07:00
Feross Aboukhadijeh
e6de7a2f54
add tests for scraping a udp tracker ( fix #34 )
2014-07-21 22:58:13 -07:00
Feross Aboukhadijeh
231ff5709c
correctly detect UDP tracker scrape support
...
Before this fix, udp tracker urls needed to contain “/announce” or else
we would assume the tracker doesn’t support scrape. (This is correct
behavior for http trackers, but not udp)
2014-07-20 04:34:32 -07:00
Feross Aboukhadijeh
be875c40af
Fix serious client+server encoding error ( fix #32 )
2014-07-12 18:44:41 -07:00
Feross Aboukhadijeh
aceca28b78
whitespace
2014-07-11 03:58:13 -07:00
Feross Aboukhadijeh
cdc2c5dea9
default numwant to 50 since that's the server default
2014-07-11 03:51:01 -07:00
Feross Aboukhadijeh
b3fb537206
style
2014-07-11 02:58:34 -07:00
Feross Aboukhadijeh
b4928f001a
Server perf: Use binary info_hash strings ( fix #29 )
2014-07-10 22:05:56 -07:00
Feross Aboukhadijeh
5bc1b50ff5
client: make tracker errors into 'warning' events
...
trackers failing to respond or giving non-200 http status codes is not
a fatal error
2014-07-10 21:29:23 -07:00
Feross Aboukhadijeh
ce171f196c
move common encode/decode fns to common.js
2014-07-10 21:28:37 -07:00
Feross Aboukhadijeh
6696c01ee2
bncode -> bencode
2014-06-11 17:57:23 -07:00
Feross Aboukhadijeh
c403e5c29f
split client and server into separate files
2014-06-07 15:11:30 -07:00