Jump to content


Photo

streamproxy and authentication


  • Please log in to reply
135 replies to this topic

Re: streamproxy and authentication #41 anudanan

  • Senior Member
  • 1,185 posts

+16
Neutral

Posted 1 January 2019 - 13:51

I´ve made next tests today to check if my idea for streamproxy to use the OWIF config.openWebif.auth_for_streaming instead of config.openWebif.auth to decide if streaming use auth or not.

 

Because it is easier for me to change phython code on enigma I have made a change to OWIF plugin.py and httpproxy.py

 

It use a new parameter config.openWebif.http_auth instead of config.openWebif,auth for enable/disable HTTP Auth.

The old parameter config.openWebif.auth has in my code now the same value as the config.openWebif.auth_for_streaming for simulating the use of auth_for_streaming of streamproxy

 

With this code (which is not good for public because it is better to change streamproxy) everything works fine

 

If I use a mobile client (for example tellymote) which is only possible to use auth for HTTP OWIF port but not for the streaming ports, it works fine with the HTTP auth is  enabled and streaming auth is disabled

 

If I use a mobile client which is able to auth both (HTTP OWIF port and streamingport) it work fine with HTTP auth and streaming port auth is enabled.


Receiver:2 x Uno4k SE (PLI 7.3 rel), 1 x ET9200 (PLI 4.0), NAS: 2 x QNAP 410, TV: LG 65C8llla, LG 47LB570V, LG 42LM615S, Sound: Yamaha RX-v663, Teufel System 5 THX


Re: streamproxy and authentication #42 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+542
Excellent

Posted 3 January 2019 - 10:30

 

First of all, there is no "xtrend" style or "vu+" style of transcoding.

 

Sorry for introducing those terms, I tried to explain it in a way end-users in this topic would understand. ;)

 

And please also note that this topic was a discussion about the WebIf, and that does make a distinction between VU+ style and Xtrend style, based on brand/model, when generating transcoding URL's.  For Xtrend style, it generates a URL on port 8001 with transcoding parameters, for VU+ style it generates a URL on port 8002 without those parameters.

 

It would be handy if the OWIF would generate all transcoding URL's with encoding parameters, but it doesn't, as that would break it for non-OpenPLi images.

I am deliberately avoiding the name "VU+" transcoding, as all vendors, except for Xtrend, Mut@nt and Zgemma are using it.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: streamproxy and authentication #43 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+542
Excellent

Posted 3 January 2019 - 10:34

Even if the VU+ transtreamproxy (which apparently is used by all other images) does not use the URL parameters, it should at least ignore them. But I guess they could not be bothered. So next best way would be for OWIF to probe if it's using streamproxy or transtreamproxy, which can be done quite easily, but for that the OWIF authors can't be bothered (and yes, I tried). So only option left is to kindly request them to make a configurable option to add parameters or not. An ugly solution but it will work.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: streamproxy and authentication #44 anudanan

  • Senior Member
  • 1,185 posts

+16
Neutral

Posted 4 January 2019 - 11:41

With my workaround here in OWIF, which is not a good idea for a fix, everything works fine with HTTP streaming on the streamproxy ports 

https://forums.openp...e-3#entry991329

 

 

Streaming without auth works fine (but HTTP access hat auth) and streaming with auth work also fine.

 

The use of the old config.openWebif.http_auth which has now the same value as the OWIF Auth_for_streaming parameter, the auth setting of streamproxy works fine, but it is only a workaround because I can only change python code today and not the CPP code of streamproxy at my home. (I have no develepment environment for openpli, but I think about it in future to install it)

 

 

So I assume that streamproxy needs a change to look now at the config. openWebif.auth_for_streaming if config.openWebif.auth is true instead of only looking at the openWebif.auth value


Receiver:2 x Uno4k SE (PLI 7.3 rel), 1 x ET9200 (PLI 4.0), NAS: 2 x QNAP 410, TV: LG 65C8llla, LG 47LB570V, LG 42LM615S, Sound: Yamaha RX-v663, Teufel System 5 THX


Re: streamproxy and authentication #45 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+542
Excellent

Posted 4 January 2019 - 11:45

But what if you have a password on OWIF and not on streaming? Then it will still fail. Streamproxy will assume no authentication and will be rejected by the OWIF.

 

OWIF should fix this by whitelisting the above mentioned URL and then streamproxy never needs to authenticate against OWIF.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: streamproxy and authentication #46 anudanan

  • Senior Member
  • 1,185 posts

+16
Neutral

Posted 4 January 2019 - 11:49

No that works, I use it exactly in that configuration today. I remember Wanwizard has seen code in OWIF which allow access form local host without auth.even if OWIF has passwd


Receiver:2 x Uno4k SE (PLI 7.3 rel), 1 x ET9200 (PLI 4.0), NAS: 2 x QNAP 410, TV: LG 65C8llla, LG 47LB570V, LG 42LM615S, Sound: Yamaha RX-v663, Teufel System 5 THX


Re: streamproxy and authentication #47 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+542
Excellent

Posted 4 January 2019 - 11:57

Yes but IIRC it only grants access to certain "pages" and the required page isn't in this whitelist.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: streamproxy and authentication #48 anudanan

  • Senior Member
  • 1,185 posts

+16
Neutral

Posted 4 January 2019 - 12:04

Which access do you mean? In my setup everything works. 

What do you think can/must I do to see access problems from streamproxy to OWIF?

 

I see no streamproxy error messages in the /var/log/message file, I see only fine working streaming logs 


Edited by anudanan, 4 January 2019 - 12:05.

Receiver:2 x Uno4k SE (PLI 7.3 rel), 1 x ET9200 (PLI 4.0), NAS: 2 x QNAP 410, TV: LG 65C8llla, LG 47LB570V, LG 42LM615S, Sound: Yamaha RX-v663, Teufel System 5 THX


Re: streamproxy and authentication #49 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+542
Excellent

Posted 4 January 2019 - 12:47

With your workaround?

 

The following won't work: having a password on OWIF but not on streaming. Streamproxy needs OWIF to get tuner/demuxer, if you don't set a password on streaming, streamproxy won't have a password to use on the OWIF.

 

I could consider for access to OWIF to always use the login/password supplied in the streamproxy.conf, even if the "password" setting is "off" but I am not sure how OWIF will react if it gets basic auth when no password is configured.


Edited by Erik Slagter, 4 January 2019 - 12:47.

* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: streamproxy and authentication #50 anudanan

  • Senior Member
  • 1,185 posts

+16
Neutral

Posted 4 January 2019 - 14:28

yes exactly that works with my workaround and doesn´t work without the workaround

 

I ´ve a HTTP and HTTPS password on OWIF. The auth_for_streaming is false so streaming without user/passor is enabed in OWIF

The iphone app goes with user/password to the HTTPS and HTTP ports and use the streaming port without auth, because the app can´t do that.

 

Here the logs from the streamproxy start, you see streamproxy works without auth

Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: streamproxy: accept new connection on port 8013, default action: transcode, fd 7Jan  4 10:17:51 Schlafzimmer user.warn streamproxy: streamproxy: config_map: auth = false/0
Jan  4 10:17:51 Schlafzimmer user.warn streamproxy: streamproxy: config_map: bframes = 0/0
Jan  4 10:17:51 Schlafzimmer user.warn streamproxy: streamproxy: config_map: bitrate = 1000/1000
Jan  4 10:17:51 Schlafzimmer user.warn streamproxy: streamproxy: config_map: foreground = false/0
Jan  4 10:17:51 Schlafzimmer user.warn streamproxy: streamproxy: config_map: group = /5120000
Jan  4 10:17:51 Schlafzimmer user.warn streamproxy: streamproxy: config_map: level = 3.1/3
Jan  4 10:17:51 Schlafzimmer user.warn streamproxy: streamproxy: config_map: listen:8002 = 1/1
Jan  4 10:17:51 Schlafzimmer user.warn streamproxy: streamproxy: config_map: listen:8013 = 1/1
Jan  4 10:17:51 Schlafzimmer user.warn streamproxy: streamproxy: config_map: profile = baseline/0
Jan  4 10:17:51 Schlafzimmer user.warn streamproxy: streamproxy: config_map: size = 576p/576
Jan  4 10:17:51 Schlafzimmer user.warn streamproxy: streamproxy: config_map: webifport = 80/80
 
here the log from connection the streamproxy port with the app
 
Jan  4 10:20:19 Schlafzimmer user.warn streamproxy: streamproxy: accept new connection on port 8013, default action: transcode, fd 7
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: ClientSocket: header[accept]: "*/*"
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: ClientSocket: header[accept-encoding]: "identity"
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: ClientSocket: header[accept-language]: "de-de"
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: ClientSocket: header[connection]: "keep-alive"
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: ClientSocket: header[host]: "xxxxx.com:8013"
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: ClientSocket: header[icy-metadata]: "1"
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: ClientSocket: header[user-agent]: "AppleCoreMedia/1.0.0.16C101 (iPhone; U; CPU OS 12_1_2 like Mac OS X; de_de)"
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: ClientSocket: header[x-playback-session-id]: "D821EBE1-6384-4296-84C8-939F30A3F239"
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: ClientSocket: cookie[TWISTED_SESSION]: "669a418a961059ad3ee175dc36155764a7f5b5f5998acc2daa7593136d854e5b"
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: ClientSocket: url: /1:0:19:EF10:421:1:C00000:0:0:0:?bitrate=1000000?width=720?height=576?aspectratio=2?interlaced=0
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy:  clientsocket: streaming parameters before defaults from config:
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: reject config default auth = false
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: accept config default bframes = 0
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: accept config default bitrate = 1000
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: reject config default foreground = false
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: reject config default group =
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: accept config default level = 3.1
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: reject config default listen:8002 = 1
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: reject config default listen:8013 = 1
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: accept config default profile = baseline
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: accept config default size = 576p
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: reject config default webifport = 80
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy:  clientsocket: streaming parameters after defaults:
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy:     bframes = 0
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy:     bitrate = 1000
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy:     level = 3.1
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy:     profile = baseline
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy:     size = 576p
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: get parameter[aspectratio] = "2"
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: reject streaming specific param aspectratio = 2
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: get parameter[bitrate] = "1000000"
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: accept streaming specific param bitrate = 1000000
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: get parameter[height] = "576"
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: ClientSocket: Xtrend workaround active
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: accept streaming specific param size = 576p
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: get parameter[interlaced] = "0"
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: reject streaming specific param interlaced = 0
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: get parameter[width] = "720"
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: reject streaming specific param width = 720
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy:  clientsocket: streaming parameters after url params:
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy:     bframes = 0
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy:     bitrate = 1000
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy:     level = 3.1
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy:     profile = baseline
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy:     size = 576p
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: reject default bitrate, it is already set to 1000
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: reject default size, it is already set to 576p
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: reject default profile, it is already set to baseline
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: reject default level, it is already set to 3.1
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: reject default bframes, it is already set to 0
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: clientsocket: accept default framerate = 30000
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy:  clientsocket: streaming parameters after setting default params:
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy:     bframes = 0
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy:     bitrate = 1000
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy:     framerate = 30000
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy:     level = 3.1
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy:     profile = baseline
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy:     size = 576p
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: Service: create service: 1:0:19:EF10:421:1:C00000:0:0:0:
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: ClientSocket: default live request
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: ClientSocket: default live transcoding request
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: ClientSocket: transcoding service broadcom
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: LiveTranscodingBroadcom: 1:0:19:EF10:421:1:C00000:0:0:0
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: WebifRequest: send request to webif: "GET /web/stream?StreamService=1:0:19:EF10:421:1:C00000:0:0:0 HTTP/1.0^M ^M "
Jan  4 13:40:10 Schlafzimmer user.warn kernel: [339640.535127] FE tune
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: LiveTranscodingBroadcom: pid[audio] = 103
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: LiveTranscodingBroadcom: pid[pat] = 0
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: LiveTranscodingBroadcom: pid[pcr] = ff
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: LiveTranscodingBroadcom: pid[pmt] = 60
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: LiveTranscodingBroadcom: pid[subtitle] = 30
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: LiveTranscodingBroadcom: pid[text] = 20
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: LiveTranscodingBroadcom: pid[video] = ff
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: EncoderBroadcom: bcm_enc0 open
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: EncoderBroadcom: found streaming parameter == stb_feature: "bframes" [0]
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: setprop: gop_frameb=0
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: EncoderBroadcom: found streaming parameter == stb_feature: "bitrate" [1000]
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: setprop: bitrate=1000000
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: EncoderBroadcom: found streaming parameter == stb_feature: "framerate" [30000]
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: setprop: framerate=30000
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: EncoderBroadcom: found streaming parameter == stb_feature: "level" [3.1]
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: setprop: level=3.1
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: EncoderBroadcom: found streaming parameter == stb_feature: "profile" [baseline]
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: setprop: profile=baseline
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: EncoderBroadcom: found streaming parameter == stb_feature: "size" [576p]
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: setprop: display_format=576p
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: pmt: 96
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: video: 255
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: audio: 259
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: start ioctl
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: LiveTranscodingBroadcom: encoder pid[audio] = 103
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: LiveTranscodingBroadcom: encoder pid[pat] = 0
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: LiveTranscodingBroadcom: encoder pid[pmt] = 60
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: LiveTranscodingBroadcom: encoder pid[video] = ff
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: Demuxer: ioctl demuxer ADD PID: audio -> 0x103
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: Demuxer: ioctl demuxer ADD PID: pmt -> 0x60
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: Demuxer: ioctl demuxer ADD PID: video -> 0xff
Jan  4 13:40:10 Schlafzimmer user.warn streamproxy: LiveTranscodingBroadcom: state init -> starting
Jan  4 13:40:11 Schlafzimmer user.warn streamproxy: LiveTranscodingBroadcom: state starting -> running

Receiver:2 x Uno4k SE (PLI 7.3 rel), 1 x ET9200 (PLI 4.0), NAS: 2 x QNAP 410, TV: LG 65C8llla, LG 47LB570V, LG 42LM615S, Sound: Yamaha RX-v663, Teufel System 5 THX


Re: streamproxy and authentication #51 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+542
Excellent

Posted 5 January 2019 - 20:10

I just finished

- making a small change in the OWIF so it allows obtaining a service for streaming, from localhost, without authentication (ever)

- updating the pinned revision of OWIF in OpenPLi 7.0RC

 

That means that after the next nightly build of the RC (if it succeeds, you never know) you should be able to use your app without patching.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: streamproxy and authentication #52 anudanan

  • Senior Member
  • 1,185 posts

+16
Neutral

Posted 6 January 2019 - 10:06

It works now without the workaround. I´ve copied the changed sourcefiles from openwebif to my box

Thx


Edited by anudanan, 6 January 2019 - 10:07.

Receiver:2 x Uno4k SE (PLI 7.3 rel), 1 x ET9200 (PLI 4.0), NAS: 2 x QNAP 410, TV: LG 65C8llla, LG 47LB570V, LG 42LM615S, Sound: Yamaha RX-v663, Teufel System 5 THX


Re: streamproxy and authentication #53 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+542
Excellent

Posted 6 January 2019 - 10:16

Thanks for testing!


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: streamproxy and authentication #54 anudanan

  • Senior Member
  • 1,185 posts

+16
Neutral

Posted 6 January 2019 - 11:25

Sorry Erik,
I´ve made a big misstake during my latest tests to verify streaming without auth. I´ve copied the python sources to the wrong path.
It doesn´t work with out my workaround so it seem to be that streamproxy must use config.OpenWeb.auth_for_streaming instead of config.OpenWeb.auth as I thought in the past


Receiver:2 x Uno4k SE (PLI 7.3 rel), 1 x ET9200 (PLI 4.0), NAS: 2 x QNAP 410, TV: LG 65C8llla, LG 47LB570V, LG 42LM615S, Sound: Yamaha RX-v663, Teufel System 5 THX


Re: streamproxy and authentication #55 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+542
Excellent

Posted 6 January 2019 - 11:37

I will test it myself later on today.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: streamproxy and authentication #56 anudanan

  • Senior Member
  • 1,185 posts

+16
Neutral

Posted 6 January 2019 - 14:31

I´ve made some other tests with enabling authentication for streaming.

OWIF now sends a different URL

#EXTVLCOPT--http-reconnect=true 
#EXTINF:-1,SAT.1 HD
http://-sid:96741def930294655f1cb53cbf296309f3104b4ec615619f444b5c55f642d9e9@192.168.1.43:8013/1:0:19:EF74:3F9:1:C00000:0:0:0:?bitrate=1000000?width=720?height=576?aspectratio=2?interlaced=0

That works with for example VLC if I stream without transcoding, but with transcoding the streamproxy can´t find the given user in the passwd file. I´ve seen the error message in /var/log/message

 

Interessting is, if I delete the user in the m3u8 file

#EXTVLCOPT--http-reconnect=true 
#EXTINF:-1,SAT.1 HD
http://192.168.1.43:8013/1:0:19:EF74:3F9:1:C00000:0:0:0:?bitrate=1000000?width=720?height=576?aspectratio=2?interlaced=0

than VLC ask me the user and password than it works because streamproxy can find the user in the passwd file

 

Is this URL with a given user which can´t find in passwd file a none working URL with streamproxy? I think streamproxy has no chance to validate it or must streamproxy use OWIF to do that? But maybe difficult or unpossible.

 

If it is not possible, than it is better for OWIF to create an URL without user/passwd but the question is, how can OWIF detect streamproxy. Or is it in all situation a bad idea to use this URL with transcoding ports? Then it is a bug in OWIF


Receiver:2 x Uno4k SE (PLI 7.3 rel), 1 x ET9200 (PLI 4.0), NAS: 2 x QNAP 410, TV: LG 65C8llla, LG 47LB570V, LG 42LM615S, Sound: Yamaha RX-v663, Teufel System 5 THX


Re: streamproxy and authentication #57 anudanan

  • Senior Member
  • 1,185 posts

+16
Neutral

Posted 6 January 2019 - 14:42

I´ve tested that auth with streaming noch with the dreamdroid APP and it works but I´ve seen in the messagefile that dreamdroid use not the given user/passwd from OWIF. It use the configured user/password in dreamdroid and that works with streamproxy. So dreamdroid doesn´t need a given URL with user/pw:

 

I have a feeling that only streaming over the OWIF ports can use the given user/passwd from OWIF, but streaming with the other ports 8001/8002/8003 from enigma2 or streamproxy can´t use it. Than it is better to change OWIF code for generating the transcoding URL, if a user will use authentication also for streaming

 


Receiver:2 x Uno4k SE (PLI 7.3 rel), 1 x ET9200 (PLI 4.0), NAS: 2 x QNAP 410, TV: LG 65C8llla, LG 47LB570V, LG 42LM615S, Sound: Yamaha RX-v663, Teufel System 5 THX


Re: streamproxy and authentication #58 anudanan

  • Senior Member
  • 1,185 posts

+16
Neutral

Posted 6 January 2019 - 15:36

The idea behind the user -sid:pw is very nice. The pw seems to be a one time password or a session pw.

 

To if streamproxy can use it, then there is a way to auth streaming with streamproxy over http with a different password which is nice.

Do you think it is possible that OWIF (the author must do that) can write the valid onetime/session passwords to a /tmp/openwebif.key file which than streamproxy can use for the validation of the given password similar to OWIF which do it if the stream goes over OWIF


Receiver:2 x Uno4k SE (PLI 7.3 rel), 1 x ET9200 (PLI 4.0), NAS: 2 x QNAP 410, TV: LG 65C8llla, LG 47LB570V, LG 42LM615S, Sound: Yamaha RX-v663, Teufel System 5 THX


Re: streamproxy and authentication #59 SpaceRat

  • Senior Member
  • 1,030 posts

+65
Good

Posted 6 January 2019 - 18:38

 

OWIF should fix this by whitelisting the above mentioned URL and then streamproxy never needs to authenticate against OWIF.

 

We can whitelist about any URL but this one:

It's the auth check for the original streamproxy ...

 

Just pass the credentials you got from your client to your streamproxy's HTTP GET request for this URL:
If it succeeds, you can consider auth successful, if it fails with 401, just pass the error to the client.

 

You can then even remove all other auth checks from your streamproxy.


1st box: Vu+ Ultimo 4k 4xDVB-S2 FBC / 2xDVB-C / 1.8 TB HDD / OpenATV 6.2
2nd box: Gigablue Quad 4k 2xDVB-S2 FBC / 2xDVB-C / 1.8 TB HDD / OpenATV 6.2
testing boxes: Vu+ Duo² + AX Quadbox HD2400 + 2x Vu+ Solo² + Octagon SF4008
Sats & Pay-TV: Astra 19.2°E + Hotbird 13°E with Redlight / SCT HD / SES Astra HD- / Sky V14 / 4th empire propaganda TV
Card-Server: Raspberry Pi + IPv6-capable oscam
Router: Linksys WRT1900ACS w/ LEDE + Fritz!Box 7390

Re: streamproxy and authentication #60 anudanan

  • Senior Member
  • 1,185 posts

+16
Neutral

Posted 6 January 2019 - 20:12

That sounds logical and useful for a solution

Receiver:2 x Uno4k SE (PLI 7.3 rel), 1 x ET9200 (PLI 4.0), NAS: 2 x QNAP 410, TV: LG 65C8llla, LG 47LB570V, LG 42LM615S, Sound: Yamaha RX-v663, Teufel System 5 THX



7 user(s) are reading this topic

0 members, 7 guests, 0 anonymous users