Comments (16)
Ideally, this patch should just work (based on docs) but it seems like everything http2 in Node.js land is currently unstable. I'm sure there are workarounds but I don't actually intend on sending a PR for this, sorry, not that interested. So until express creates a compatibility layer around the builtin http2 request/response objects, I would leave this alone. Kodi is really to blame here, it should fallback to http/1.
Also note that the dependencies are outdated. Updating the dependencies is pretty simple when using npm-check-updates
:
rm -f yarn.lock package-lock.json
yarn global add npm-check-updates # npm i -g npm-check-updates
ncu -u
yarn install --production # npm i --production
yarn audit # npm audit
You'll hit an error though, due to some middlewares no longer being shipped with express:
yarn add morgan --production # npm i --save morgan --production
Replace: express.logger('dev')
-> require('morgan')('dev')
in server/bin.js
If you don't won't to work on this unstable area, maybe attempt to use a http2 proxy.
Good luck 😄
from peerflix-server.
A PR is welcome.
Does Kodi require TLS? https://en.wikipedia.org/wiki/HTTP/2#Encryption
from peerflix-server.
I do not think so.
Kodi uses CURL library for sending such requests. In previous version CURLOPT_HTTP_VERSION was CURL_HTTP_VERSION_1_1, and now CURL_HTTP_VERSION_2_0.
When I provide URL from peerflix-server (non TLS) it does not return errors. It sends request, but nodejs does not response to it.
You can check this behaviour by calling perflix-server from curl with --http2 key.
from peerflix-server.
Hi SeyfSV,
I have developed an add-on in kodi to stream torrents from my server running Peerflix. Working great. Although I'm using Krypton and Jarvis. Haven't tried 18. How are you implementing the torrent streaming process? Maybe I can help. Jay
from peerflix-server.
Pretty simple: https://github.com/asapach/peerflix-server/compare/master...pro-src:spdy?expand=1
from peerflix-server.
Hi SeyfSV,
I have developed an add-on in kodi to stream torrents from my server running Peerflix. Working great. Although I'm using Krypton and Jarvis. Haven't tried 18. How are you implementing the torrent streaming process? Maybe I can help. Jay
Hi, @htpcforall ,
Yes, you are right, with previous version all working great, but Kodi 18 use HTTP2 by default.
I just put link
from /torrents/{infoHash} response to Player.play()
function.
from peerflix-server.
Pretty simple: https://github.com/asapach/peerflix-server/compare/master...pro-src:spdy?expand=1
Hi, @pro-src ,
I checked you code, it does not work :(
Browser says "The connection was reset".
CURL returns curl: (52) Empty reply from server
on both http1.1 and http2 calls.
from peerflix-server.
@SeyfSV Fixed, I forgot to nest the options. I don't actually need this so I didn't test. :P
from peerflix-server.
@SeyfSV Fixed, I forgot to nest the options. I don't actually need this so I didn't test. :P
@pro-src HTTP2 still does not work.
curl http://localhost:9000/torrents --http2 -v
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 9000 (#0)
> GET /torrents HTTP/1.1
> Host: localhost:9000
> User-Agent: curl/7.58.0
> Accept: */*
> Connection: Upgrade, HTTP2-Settings
> Upgrade: h2c
> HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA
>
* Empty reply from server
* Connection #0 to host localhost left intact
curl: (52) Empty reply from server
from peerflix-server.
Hmm... Maybe I spoke too soon. I'll let you know once I've had a chance to test this myself.
from peerflix-server.
@pro-src , I totally agree with you about fallback to http/1.
And we are not alone: xbmc/xbmc#16601
@asapach , I'll close this issue. Thnx!
from peerflix-server.
Hi SeyfSV,
I have developed an add-on in kodi to stream torrents from my server running Peerflix. Working great. Although I'm using Krypton and Jarvis. Haven't tried 18. How are you implementing the torrent streaming process? Maybe I can help. JayHi, @htpcforall ,
Yes, you are right, with previous version all working great, but Kodi 18 use HTTP2 by default.
I just putlink
from /torrents/{infoHash} response toPlayer.play()
function.
@SeyfSV Any chance I can test your add-on? Honestly, I'm would like to see how you implemented peerflix-server. I'm hungry for any knowledge around this a I would like to improve my add-ons functionality as much as possible. I would like to see if there's a way to solve the http2 issue as well. Hope to hear back. Thanks.
from peerflix-server.
For info: http
module supports http2 requests. Issue occurs in socket.io
module, that intercepts Upgrade: h2c
header and brokes connection.
As workaround I create socket Object only with transports: 'pooling'
option. Yes, it disables WebSocket, but it is not critical for me.
from peerflix-server.
Hi, @htpcforall. I am not ready for showing my add-on :)
I wrote this simple class for interact with peerflix-server.
Also you can look on my fork of peerflix-server (branch pooling)
from peerflix-server.
Now HTTP2 can be disabled in Kodi:
<disablehttp2>true</disablehttp2>
https://kodi.wiki/view/Advancedsettings.xml
from peerflix-server.
Hi @SeyfSV I was looking into developing a kodi plugin of my own (for Matrix). Did you end up succeeding with your project? I would really like to learn how to implement this.
from peerflix-server.
Related Issues (20)
- can't deploy the project HOT 1
- Built-in block list ? HOT 4
- TELEGRAM API HOT 4
- High RAM and CPU usage while torrents are idle? HOT 2
- Automatically resuming torrent HOT 2
- Download not completing HOT 3
- h
- upload functionality does not work HOT 2
- Sx
- Website is showing only a plain white screen. HOT 1
- Static Link? HOT 2
- heroku problem HOT 1
- previous state not found error in while launching peerflix-sever HOT 1
- No Web UI only REST api? HOT 3
- :9000 port does not working... HOT 4
- How to deploy it on IBM Cloud? HOT 1
- Deploying to another platform other than heroku.. HOT 1
- Unable to build docker image for arm machine HOT 1
- User / Client Panel register and login etc.....
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from peerflix-server.