Coder Social home page Coder Social logo

openwebtorrent / openwebtorrent-tracker Goto Github PK

View Code? Open in Web Editor NEW
69.0 8.0 22.0 35 KB

Fast and simple Webtorrent tracker implementation in C++

Home Page: https://openwebtorrent.com

CMake 13.75% Makefile 0.81% C++ 83.55% JavaScript 1.88%
tracker-server webtorrent torrent tracker openwebtorrent cpp bittorrent bittorrent-tracker webrtc websockets

openwebtorrent-tracker's Introduction

OpenWebtorrent Tracker

Fast and simple webtorrent tracker written in C++.

Requirements

  • C++ 17
  • OpenSSL 1.1+
  • ZLib
# Install OpenSSL (1.1.1)
wget https://www.openssl.org/source/openssl-1.1.1h.tar.gz
tar xvf openssl-1.1.1h.tar.gz
cd openssl-1.1.1h
./config
make
make install

# Install ZLib
sudo apt-get install zlib1g-dev

Build

First, install dependencies:

make deps

Then, build the project:

make build

Usage

You can run it with the command below:

./build/openwebtorrent-tracker \
	--port [PORT]
	--ssl-cert [PATH]
	--ssl-key [PATH]

License

MIT. Copyright (c) Alex

openwebtorrent-tracker's People

Contributors

alxhotel avatar subins2000 avatar theawless avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openwebtorrent-tracker's Issues

How well is openwebtorrent.com protected against DDoS?

Hi,

I'm wondering how well the tracker is protected against large-scale attacks as many dApps/distributed systems are dependent on this central service; rendering them "non-decentral" in a way?

What I have in mind, in case this is an issue that has not already been addressed, is a huge amount of independently operated tracker instances working in eventually consistent federation.

Segmentation Faults

At times, segemntation faults are happening for reasons idk. Would like to know how stable is OWT ? I'm now thinking of making a Java port of WebTorrent tracker.

Error: Cert and key must exists

Hello,

Can you please tell me what am I doing wrong?

image

tr@srv1:~/openwebtorrent-tracker$ ls
build  certificate.pem  cmake  CMakeLists.txt  deps  key.pem  Makefile  README.md  src  tests
tr@srv1:~/openwebtorrent-tracker$ ./build/openwebtorrent-tracker --port 8000 --ssl-cert /home/tr/openwebtorrent-tracker/certificate.pem --ssl-key /home/tr/openwebtorrent-tracker/key.pem
Error: Cert and key must exists

make build failed

Hello,

I installed requirement lib from readme on Ubuntu 18.04

After run "make build" it's almost done but error

[ 92%] Linking CXX executable openwebtorrent-tracker libuSockets.a(openssl.c.o): In function BIO_s_custom_create':
openssl.c:(.text+0x69): undefined reference to BIO_set_init' libuSockets.a(openssl.c.o): In function BIO_s_custom_write':
openssl.c:(.text+0xbd): undefined reference to BIO_get_data' libuSockets.a(openssl.c.o): In function BIO_s_custom_read':
openssl.c:(.text+0x15a): undefined reference to BIO_get_data' libuSockets.a(openssl.c.o): In function ssl_on_open':
openssl.c:(.text+0x298): undefined reference to BIO_up_ref' openssl.c:(.text+0x2ad): undefined reference to BIO_up_ref'
libuSockets.a(openssl.c.o): In function us_internal_init_loop_ssl_data': openssl.c:(.text+0x6f9): undefined reference to OPENSSL_init_ssl'
openssl.c:(.text+0x70f): undefined reference to BIO_meth_new' openssl.c:(.text+0x738): undefined reference to BIO_meth_set_create'
openssl.c:(.text+0x754): undefined reference to BIO_meth_set_write' openssl.c:(.text+0x770): undefined reference to BIO_meth_set_read'
openssl.c:(.text+0x78c): undefined reference to BIO_meth_set_ctrl' openssl.c:(.text+0x7de): undefined reference to BIO_set_data'
openssl.c:(.text+0x7fa): undefined reference to BIO_set_data' libuSockets.a(openssl.c.o): In function us_internal_free_loop_ssl_data':
openssl.c:(.text+0x885): undefined reference to BIO_meth_free' libuSockets.a(openssl.c.o): In function free_ssl_context':
openssl.c:(.text+0xa15): undefined reference to SSL_CTX_get_default_passwd_cb_userdata' libuSockets.a(openssl.c.o): In function create_ssl_context_from_options':
openssl.c:(.text+0xa4a): undefined reference to TLS_method' openssl.c:(.text+0xaa4): undefined reference to SSL_CTX_set_min_proto_version'
collect2: error: ld returned 1 exit status
CMakeFiles/openwebtorrent-tracker.dir/build.make:99: recipe for target 'openwebtorrent-tracker' failed
make[3]: *** [openwebtorrent-tracker] Error 1
make[3]: Leaving directory '/home/openwebtorrent-tracker/build'
CMakeFiles/Makefile2:68: recipe for target 'CMakeFiles/openwebtorrent-tracker.dir/all' failed
make[2]: *** [CMakeFiles/openwebtorrent-tracker.dir/all] Error 2
make[2]: Leaving directory '/home/openwebtorrent-tracker/build'
Makefile:83: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/openwebtorrent-tracker/build'
Makefile:7: recipe for target 'build' failed
make: *** [build] Error 2`

Can't setup submodules

Hi !

First of all, thanks for making this <3

I tried setting it up, but submodule init is failing :

$ git submodule update --init --depth 1
Cloning into '/home/mint/Other/Projects/GitHub/openwebtorrent-tracker/deps/json'...
Cloning into '/home/mint/Other/Projects/GitHub/openwebtorrent-tracker/deps/uWebSockets'...
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
fatal: remote error: upload-pack: not our ref d39fb24c22367db2949d3cb441cb979072491e35
Fetched in submodule path 'deps/json', but it did not contain d39fb24c22367db2949d3cb441cb979072491e35. Direct fetching of that commit failed.

different peer_id on the same connection

I use libtorrent add 12 torrent files at once and all torrent use the same tracker,so the tracker print
Error: announce: different peer_id on the same connection
DISCONNECTED

Seeders connected to each other

(Assuming the same torrent hash)

Problem:

Two seeders connects to each other when using this tracker implementation.

Why is this a problem?

It does not have the same behavior as webtorrent tracker implementation.

How does the behavior differ?

When using webtorrent tracker implementation, offers from two peers, where both are seeders, are not passed to each other through the tracker. Since both peers wants leechers to seed to, it is unnecessary to connect two seeders to each other.

According to my testing, this tracker implementation (as it's hosted on tracker.openwebtorrent.com 2021 Feb 15) does not care about which clients are seeding or leeching when passing offers around.

Action

Don't connect seeders to each other when passing offers around.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet.
We recommend using:

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.

Connections close after 1.7 minutes of stale activity

Hello,

I'm building a non-torrent open-source project using webtorrent trackers, I try to be as polite as possible (only one persistent connection is present, the other players disconnect once a webrtc connection is live), you can check it out here.

I found out that most webtorrent trackers close the connection after 1.7 minutes without data, even if the tracker requested an interval of 120 seconds (2m), I didn't see anything related in this code so I'm assuming it's external (nginx timeout or similar?).
Is it an expected behaviour?

A workaround that I found is to send {"action":"scrape","info_hash":[]} as a "ping" message (unfortunately, browser js can't access websocket PINGs) but it seems not to work on openwebtorrent tracker (the connection gets forcibly closed, also not expected from the code).

Thanks for all of your work!

Server crash due to illegal memory access

Sometimes when a connection closes, there's invalid memory access which brings down the whole server.

I was able to 100% reproduce the error by sending a payload greater than the defined WebSocket max payload size.
I have produced the following stack trace using gdb:

Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffffefe5859 in __GI_abort () at abort.c:79
#2  0x00007fffff28e911 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007fffff29a38c in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007fffff29a3f7 in std::terminate() () from /lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007fffff29a6a9 in __cxa_throw () from /lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007fffff28e522 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#7  0x00000000080576c9 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*> (
    this=0x7ffffffecaf0, __beg=0x20001 <error: Cannot access memory at address 0x20001>,
    __end=0x1000000020001 <error: Cannot access memory at address 0x1000000020001>) at /usr/include/c++/9/bits/basic_string.tcc:219
#8  0x000000000801dbcf in owt::FastTracker::disconnectPeer (this=0x8167a40, peer=0x81f2750)
    at /mnt/d/Projects/openwebtorrent-tracker/src/FastTracker.h:72
#9  0x000000000802380d in owt::WebtorrentTracker::onClose (this=0x7ffffffedc30, ws=0x81f26a0, code=1006, message="Received too big message")
    at /mnt/d/Projects/openwebtorrent-tracker/src/WebtorrentTracker.h:186
#10 0x0000000008021f05 in owt::WebtorrentTracker::run(int)::{lambda(auto:1*, int, std::basic_string_view<char, std::char_traits<char> >)#6}::operator()<uWS::WebSocket<true, true> >(uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >) const (
    __closure=0x81953f0, ws=0x81f26a0, code=1006, message="Received too big message")
    at /mnt/d/Projects/openwebtorrent-tracker/src/WebtorrentTracker.h:98
#11 0x0000000008093598 in fu2::abi_400::detail::invocation::invoke<owt::WebtorrentTracker::run(int)::{lambda(auto:1*, int, std::basic_string_view<char, std::char_traits<char> >)#6}&, uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> > >(owt::WebtorrentTracker::run(int)::{lambda(auto:1*, int, std::basic_string_view<char, std::char_traits<char> >)#6}&, (uWS::WebSocket<true, true>*&&)...) (callable=...)
    at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/src/f2/function2.hpp:184
#12 0x00000000080861ff in fu2::abi_400::detail::type_erasure::invocation_table::function_trait<void (uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >)>::internal_invoker<fu2::abi_400::detail::type_erasure::box<false, owt::WebtorrentTracker::run(int)::{lambda(auto:1*, int, std::basic_string_view<char, std::char_traits<char> >)#6}, std::allocator<{lambda(auto:1*, int, std::basic_string_view<char, std::char_traits<char> >)#6}> >, true>::invoke(fu2::abi_400::detail::type_erasure::data_accessor*, unsigned long, uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >) (data=0x81953f0, capacity=16, args#0=0x81f26a0, args#1=1006, args#2="Received too big message")
    at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/src/f2/function2.hpp:587
#13 0x000000000803d69f in fu2::abi_400::detail::type_erasure::tables::vtable<fu2::abi_400::detail::property<true, false, void (uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >)> >::invoke<0ul, fu2::abi_400::detail::type_erasure::data_accessor*, unsigned long const&, uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> > >(fu2::abi_400::detail::type_erasure::data_accessor*&&, unsigned long const&, uWS::WebSocket<true, true>*&&, int&&, std::basic_string_view<char, std::char_traits<char> >&&) const (this=0x8195400)
    at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/src/f2/function2.hpp:995
#14 0x000000000803d752 in fu2::abi_400::detail::type_erasure::erasure<true, fu2::abi_400::detail::config<true, false, fu2::capacity_default>, fu2::abi_400::detail::property<true, false, void (uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >)> >::invoke<0ul, fu2::abi_400::detail::type_erasure::erasure<true, fu2::abi_400::detail::config<true, false, fu2::capacity_default>, fu2::abi_400::detail::property<--Type <RET> for more, q to quit, c to continue without paging--
true, false, void (uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >)> >&, uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> > >(fu2::abi_400::detail::type_erasure::erasure<true, fu2::abi_400::detail::config<true, false, fu2::capacity_default>, fu2::abi_400::detail::property<true, false, void (uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >)> >&, uWS::WebSocket<true, true>*&&, int&&, std::basic_string_view<char, std::char_traits<char> >&&) (erasure=...)
    at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/src/f2/function2.hpp:1215
#15 0x000000000803d7e6 in fu2::abi_400::detail::type_erasure::invocation_table::operator_impl<0ul, fu2::abi_400::detail::function<fu2::abi_400::detail::config<true, false, fu2::capacity_default>, fu2::abi_400::detail::property<true, false, void (uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >)> >, void (uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >)>::operator()(uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >) (this=0x81953f0, args#0=0x81f26a0, args#1=1006,
    args#2="Received too big message") at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/src/f2/function2.hpp:775
#16 0x000000000802dfe1 in uWS::TemplatedApp<true>::ws<owt::PeerContext>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, uWS::TemplatedApp<true>::WebSocketBehavior&&)::{lambda(uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >)#1}::operator()(uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >) (this=0x81953f0, ws=0x81f26a0, code=1006,
    message="Received too big message") at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/src/App.h:171
#17 0x00000000080a9430 in fu2::abi_400::detail::invocation::invoke<uWS::TemplatedApp<true>::ws<owt::PeerContext>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, uWS::TemplatedApp<true>::WebSocketBehavior&&)::{lambda(uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >)#1}&, uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> > >(uWS::TemplatedApp<true>::ws<owt::PeerContext>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, uWS::TemplatedApp<true>::WebSocketBehavior&&)::{lambda(uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >)#1}&, (uWS::TemplatedApp<true>::ws<owt::PeerContext>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, uWS::TemplatedApp<true>::WebSocketBehavior&&)::{lambda(uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >)#1}&)...) (callable=...)
    at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/src/f2/function2.hpp:184
#18 0x000000000809f32a in fu2::abi_400::detail::type_erasure::invocation_table::function_trait<void (uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >)>::internal_invoker<fu2::abi_400::detail::type_erasure::box<false, uWS::TemplatedApp<true>::ws<owt::PeerContext>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, uWS::TemplatedApp<true>::WebSocketBehavior&&)::{lambda(uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >)#1}, std::allocator<{lambda(uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >)#1}> >, false>::invoke(fu2::abi_400::detail::type_erasure::data_accessor*, unsigned long, uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >) (data=0x8196260, capacity=16, args#0=0x81f26a0, args#1=1006,
    args#2="Received too big message") at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/src/f2/function2.hpp:587
#19 0x000000000803d69f in fu2::abi_400::detail::type_erasure::tables::vtable<fu2::abi_400::detail::property<true, false, void (uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >)> >::invoke<0ul, fu2::abi_400::detail::type_erasure::data_accessor*, unsigned long const&, uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> > >(fu2::abi_400::detail::type_erasure::data_accessor*&&, unsigned long const&, uWS::WebSocket<true, true>*&&, int&&, std::basic_string_view<char, std::char_traits<char> >&&) const (this=0x8196270)
    at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/src/f2/function2.hpp:995
#20 0x000000000803d752 in fu2::abi_400::detail::type_erasure::erasure<true, fu2::abi_400::detail::config<true, false, fu2::capacity_default>, fu2::abi_400::detail::property<true, false, void (uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >)> >::invoke<0ul,--Type <RET> for more, q to quit, c to continue without paging--
 fu2::abi_400::detail::type_erasure::erasure<true, fu2::abi_400::detail::config<true, false, fu2::capacity_default>, fu2::abi_400::detail::property<true, false, void (uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >)> >&, uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> > >(fu2::abi_400::detail::type_erasure::erasure<true, fu2::abi_400::detail::config<true, false, fu2::capacity_default>, fu2::abi_400::detail::property<true, false, void (uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >)> >&, uWS::WebSocket<true, true>*&&, int&&, std::basic_string_view<char, std::char_traits<char> >&&) (erasure=...)
    at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/src/f2/function2.hpp:1215
#21 0x000000000803d7e6 in fu2::abi_400::detail::type_erasure::invocation_table::operator_impl<0ul, fu2::abi_400::detail::function<fu2::abi_400::detail::config<true, false, fu2::capacity_default>, fu2::abi_400::detail::property<true, false, void (uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >)> >, void (uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >)>::operator()(uWS::WebSocket<true, true>*, int, std::basic_string_view<char, std::char_traits<char> >) (this=0x8196260, args#0=0x81f26a0, args#1=1006,
    args#2="Received too big message") at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/src/f2/function2.hpp:775
#22 0x0000000008054cc6 in uWS::WebSocketContext<true, true>::init()::{lambda(auto:1*, int, void*)#1}::operator()<us_socket_t>(us_socket_t*, int, void*) const (this=0x0, s=0x81f26a0, code=24, reason=0x80ea9d2) at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/src/WebSocketContext.h:248
#23 0x0000000008079858 in uWS::WebSocketContext<true, true>::init()::{lambda(auto:1*, int, void*)#1}::_FUN<us_socket_t>(us_socket_t*, int, void*)
    () at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/src/WebSocketContext.h:240
#24 0x00000000080d36d5 in ssl_on_close (s=0x81f26a0, code=24, reason=0x80ea9d2)
    at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/uSockets/src/crypto/openssl.c:182
#25 0x00000000080d612f in us_socket_close (ssl=1, s=0x81f26a0, code=24, reason=0x80ea9d2)
    at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/uSockets/src/socket.c:71
#26 0x0000000008066fbd in uWS::WebSocketContext<true, true>::forceClose (wState=0x81f2700, s=0x81f26a0, reason="Received too big message")
    at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/src/WebSocketContext.h:56
#27 0x0000000008086bd2 in uWS::WebSocketContext<true, true>::handleFragment (
    data=0x7ffffed30054 "5ac9c1424693de30593ac710f3a646afb0663b3855e419320288e30f4f8235806ee5967e2f1606db6dd2c698799317dd67849cd1cd7ace464090f91fdefbcd9835a0444a140e46981e7d9b4a2619ff636f7acb948d6c78b4322943d7917f614d866c3119"..., length=16384, remainingBytes=0, opCode=1, fin=false,
    webSocketState=0x81f2700, s=0x81f26a0) at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/src/WebSocketContext.h:105
#28 0x0000000008079ff6 in uWS::WebSocketProtocol<true, uWS::WebSocketContext<true, true> >::consumeMessage<8u, unsigned short> (payLength=16384,
    src=@0x7ffffffed2e8: 0x7ffffed30050 "", length=@0x7ffffffed2e4: 23613, wState=0x81f2700, user=0x81f26a0)
    at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/src/WebSocketProtocol.h:328
#29 0x0000000008066e5b in uWS::WebSocketProtocol<true, uWS::WebSocketContext<true, true> >::consume (src=0x7ffffed30050 "", length=23613,
    wState=0x81f2700, user=0x81f26a0) at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/src/WebSocketProtocol.h:430
#30 0x0000000008054e00 in uWS::WebSocketContext<true, true>::init()::{lambda(auto:1*, char*, int)#2}::operator()<us_socket_t>(us_socket_t*, char*, int) const (this=0x0, s=0x81f26a0, data=0x7ffffed20030 "\001\376@", length=89181)
    at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/src/WebSocketContext.h:285
#31 0x000000000807a90d in uWS::WebSocketContext<true, true>::init()::{lambda(auto:1*, char*, int)#2}::_FUN<us_socket_t>(us_socket_t*, char*, int)
    () at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/src/WebSocketContext.h:264
#32 0x00000000080d38fa in ssl_on_data (s=0x81f26a0, data=0x7ffffedb0030, length=89313)
--Type <RET> for more, q to quit, c to continue without paging--
    at /mnt/d/Projects/openwebtorrent-tracker/deps/uWebSockets/uSockets/src/crypto/openssl.c:265
#33 0x00000000080d5cf0 in us_internal_dispatch_ready_poll (p=0x81f26a0, error=0, events=1)

Possible compatibility issue with libtorrent

There might be a compatibility issue with the WebTorrent implementation in libtorrent: arvidn/libtorrent#5831

It seems that the deployed tracker at wss://tracker.openwebtorrent.com is unreliable since connections are often closed after a few seconds (since it's one of the few public WebTorrent trackers, it's probably overloaded). Therefore, I don't know if the libtorrent client fails to keep the connection alive or if the connection is closed because of an error. What is puzzling me is that it works fine with openwebtorrent-tracker when it is deployed locally.

Is the current running code the same as the current master branch?

clang: 'auto' not allowed in function prototype

Hi

I'm trying to cross compile this for Android. Android NDK uses clang, and apparently it doesn't support auto in functions : https://stackoverflow.com/questions/30665506/auto-not-allowed-in-function-prototype-with-clang

Error log :

/home/mint/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=aarch64-none-linux-android21 --gcc-toolchain=/home/mint/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64 --sysroot=/home/mint/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -Dtracker_EXPORTS -I. -I/home/mint/Other/Projects/GitHub/Dots/app/src/main/cpp -I/home/mint/Other/Projects/GitHub/Dots/app/src/main/cpp/openwebtorrent-tracker/deps/uWebSockets/src -I/home/mint/Other/Projects/GitHub/Dots/app/src/main/cpp/openwebtorrent-tracker/deps/json/single_include/nlohmann -I/home/mint/Other/Projects/GitHub/Dots/app/src/main/cpp/openwebtorrent-tracker/src -I/home/mint/Other/Projects/GitHub/Dots/app/src/main/cpp/openwebtorrent-tracker/deps/uWebSockets/uSockets/src -I/home/mint/Other/Projects/GitHub/Dots/app/src/main/cpp/openssl/output/usr/local/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security   -std=c++2a -g -O0 -fno-limit-debug-info  -fPIC -MD -MT CMakeFiles/tracker.dir/tracker.cpp.o -MF CMakeFiles/tracker.dir/tracker.cpp.o.d -o CMakeFiles/tracker.dir/tracker.cpp.o -c /home/mint/Other/Projects/GitHub/Dots/app/src/main/cpp/tracker.cpp
  In file included from /home/mint/Other/Projects/GitHub/Dots/app/src/main/cpp/tracker.cpp:4:
  In file included from /home/mint/Other/Projects/GitHub/Dots/app/src/main/cpp/openwebtorrent-tracker/src/WebtorrentTracker.h:14:
  In file included from /home/mint/Other/Projects/GitHub/Dots/app/src/main/cpp/openwebtorrent-tracker/src/Swarm.h:9:
  /home/mint/Other/Projects/GitHub/Dots/app/src/main/cpp/openwebtorrent-tracker/src/PeerContext.h:28:14: error: 'auto' not allowed in function prototype
          PeerContext(auto* ws, std::string id = "") {
                      ^~~~
  In file included from /home/mint/Other/Projects/GitHub/Dots/app/src/main/cpp/tracker.cpp:4:
  /home/mint/Other/Projects/GitHub/Dots/app/src/main/cpp/openwebtorrent-tracker/src/WebtorrentTracker.h:137:14: error: 'auto' not allowed in function prototype
          void onOpen(auto* ws, auto* req) {
                      ^~~~
  /home/mint/Other/Projects/GitHub/Dots/app/src/main/cpp/openwebtorrent-tracker/src/WebtorrentTracker.h:137:24: error: 'auto' not allowed in function prototype
          void onOpen(auto* ws, auto* req) {
                                ^~~~
  /home/mint/Other/Projects/GitHub/Dots/app/src/main/cpp/openwebtorrent-tracker/src/WebtorrentTracker.h:147:17: error: 'auto' not allowed in function prototype
          void onMessage(auto* ws, std::string_view message, uWS::OpCode opCode) {
                         ^~~~
  /home/mint/Other/Projects/GitHub/Dots/app/src/main/cpp/openwebtorrent-tracker/src/WebtorrentTracker.h:169:15: error: 'auto' not allowed in function prototype
          void onClose(auto* ws, int code, std::string_view message) {
                       ^~~~
  5 errors generated.
  ninja: build stopped: subcommand failed.

Is there an alternative to using auto and then get it compiled ? I don't know C++ really.

Using ECC keys/cert

I created an ECC key that was signed and I use with nginx, but I don't seem to be able to get it to work with owtt.

Does owtt support ecc? And if so how can I get my .key and .crt file to work with owtt? Thanks.

Please allow ssl certs to be optional

I would like to toss this into a docker container. Right now I'm not sure I can run it given that I don't know yet how to issue ssl certs and for docker I just leave it up to the cloud service to provision a unique name.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet.
We recommend using:

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.