Jump to content


Photo

streamproxy and authentication


  • Please log in to reply
135 replies to this topic

#1 anudanan

  • Senior Member
  • 1,185 posts

+16
Neutral

Posted 28 December 2018 - 15:49

I´ve a problem with the IOS App tellymote, which can´t authenticate by streaming transcodes streams with streamproxy

 

On my uno4kse with openpli 7.0rc the streamproxy would like to authenticate over http the client but the tellymoty app can´t do that. I´ve asked the tellymote author for that problem.

 

But how is the way to say streamproxy to work without authentication? For me it is ok in my LAN or over VPN to do that

 

The openwebit config-switches doesn´t work for streamproxy, is that right? If have tested all combinations of the openwebif config switches but the streamproxy process leaves allways messages in /var/log/message to log the failed authentication of the client


Edited by anudanan, 28 December 2018 - 15:49.

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 #2 anudanan

  • Senior Member
  • 1,185 posts

+16
Neutral

Posted 28 December 2018 - 17:37

I´ve found out, if HTTP Authentication in openwebif is off, then streaming with streamproxy needs also no authentication

 

I think a better way is for streamproxy to use the streaming authentication switch of openwebif to decide if authentication is on or off


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 #3 WanWizard

  • PLi® Core member
  • 70,534 posts

+1,811
Excellent

Posted 28 December 2018 - 17:59

Streamproxy does:

		if(settings.exists("config.OpenWebif.auth"))
			if(settings.as_string("config.OpenWebif.auth") == "true")
				config_map["auth"] = ConfigValue(true);
			else
				config_map["auth"] = ConfigValue(option_webifauth);
		else
			config_map["auth"] = ConfigValue(option_webifauth);

so it follows the authentication setting of the webif itself.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: streamproxy and authentication #4 anudanan

  • Senior Member
  • 1,185 posts

+16
Neutral

Posted 28 December 2018 - 18:37

Yes If seen that. But  I´ve found out that I must restart the GUI before streamproxy knows the openwebif parameter I make some change for openwebif. It is a different process and only GUI restart writes the settings new in /etc/enigma2/settings.

 

I think It would be a better idea for streamproxy to show not  only on Config.OpenWebIf.auth value, because there is a second Parameter config.OpenWebif.auth_for_streaming which can be false also if OpenWebif.auth is true. Then a user can set auth for normal http openwebif and can user streaming without auth also for transcoding

 


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 #5 WanWizard

  • PLi® Core member
  • 70,534 posts

+1,811
Excellent

Posted 28 December 2018 - 19:25

Please create an issue for this at https://github.com/e...eamproxy/issues so the author can look at it.

 

p.s. opening up any port of the box to the internet is a very dumb idea. I can't repeat that often enough. Anyone can use it to stream, and before you know it your box is part of an IPTV network...


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: streamproxy and authentication #6 anudanan

  • Senior Member
  • 1,185 posts

+16
Neutral

Posted 28 December 2018 - 19:57

I know it, but it is a decision of the user and if a user make http with auth and streamin without auth in openwebif than it is consequent ot use the streamproxy without auth and not only if http ist without auth.

 

I will make an issue. thx


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 #7 WanWizard

  • PLi® Core member
  • 70,534 posts

+1,811
Excellent

Posted 28 December 2018 - 22:14

And I know that. ;)

 

But forewarned is forearmed... They can't say "nobody told me". :)


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: streamproxy and authentication #8 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+542
Excellent

Posted 29 December 2018 - 09:59

Authentication of OWIF and streamproxy is tightly related. You can't have authentication on OWIF and have no authentication on streamproxy streaming because streamproxy needs to get some information from OWIF before it can do it's job. That's probably where you run into.


Edited by Erik Slagter, 29 December 2018 - 09:59.

* 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 #9 anudanan

  • Senior Member
  • 1,185 posts

+16
Neutral

Posted 29 December 2018 - 19:03

Authentication of OWIF and streamproxy is tightly related. You can't have authentication on OWIF and have no authentication on streamproxy streaming because streamproxy needs to get some information from OWIF before it can do it's job. That's probably where you run into.

 

I can´t unterstand that. What do you exactly mean with that streamproxy needs to get some information from OWIF before it can do it´s job, Does streamproxy collect via HTTP connect to openwebif some informations?

But what has that to do with the authentication of a client which wants to stream transcoded over streamproxy?


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 #10 WanWizard

  • PLi® Core member
  • 70,534 posts

+1,811
Excellent

Posted 29 December 2018 - 19:18

There are two types of streaming/transcoding in use, the "Xtrend" model and the "VU+" model.

 

Boxes using the "Xtrend" model handle everything over port 8001, Boxes using the "VU+" model handle streaming over 8001 in Enigma, and transcoding over 8002 in Streamproxy.

 

On a VU Duo 4K:

root@vuduo4k:~# netstat -lnp | grep 800
tcp        0      0 :::8001                 :::*                    LISTEN      5086/enigma2
tcp        0      0 :::8002                 :::*                    LISTEN      5124/streamproxy
tcp        0      0 :::8003                 :::*                    LISTEN      5124/streamproxy

On an ET10000:

root@et10000:~# netstat -lnp | grep 800
tcp        0      0 :::8001                 :::*                    LISTEN      840/enigma2

You can run Erik's streamproxy (not the original one) on boxes using the "Xtrend" model, which simply redirects requests on 8002 to 8001 with the addition of the transcoding parameters to the URL.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: streamproxy and authentication #11 anudanan

  • Senior Member
  • 1,185 posts

+16
Neutral

Posted 29 December 2018 - 19:39

Isn´t that code from erik here

https://github.com/eriksl/streamproxy

not the code which runs on my uno4kse with openpli 7.0?

 

I think the source code looks like the one which runs in an own process like on my uno4kse and your duo4k 


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 #12 WanWizard

  • PLi® Core member
  • 70,534 posts

+1,811
Excellent

Posted 29 December 2018 - 19:42

Yes, that is the streamproxy we use. But as said, that is only for transcoding, not for streaming. Streaming is handled completely inside Enigma. (which also means the auth issue is handled in two places).


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: streamproxy and authentication #13 anudanan

  • Senior Member
  • 1,185 posts

+16
Neutral

Posted 29 December 2018 - 19:49

I understand.

 

That is the reason for me that it would be better for streamproxy to handle the transcoding streaming authentication not based on the OWIF HTTP Auth parameter but based on  the authentication streaming parameter of OWIF or based on the streaming authentication parameter in enigma, depends on which parameter is the better one


Edited by anudanan, 29 December 2018 - 19:51.

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 #14 WanWizard

  • PLi® Core member
  • 70,534 posts

+1,811
Excellent

Posted 29 December 2018 - 19:56

That doesn't work for all boxes using the "Xtrend" model, as they don't even run the streamproxy.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: streamproxy and authentication #15 anudanan

  • Senior Member
  • 1,185 posts

+16
Neutral

Posted 29 December 2018 - 20:02

but if the xtrend modell boxes use the enigma parameter for streaming authentication for port 8001 (true or false)  and streamproxy forwards data from port 8002 to 8001 with a little header addtion then it would be ok if streamproxy uses the same enigma parameter for streaming authentication and not the OWIF HTTP auth parameter.

 

I think the OWIF HTTP auth parameter has nothing to do with streaming auth or I wrong?


Edited by anudanan, 29 December 2018 - 20:04.

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 #16 WanWizard

  • PLi® Core member
  • 70,534 posts

+1,811
Excellent

Posted 29 December 2018 - 21:27

You'll have to look in the code, or check with Erik, I have no clue how it exactly works.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: streamproxy and authentication #17 anudanan

  • Senior Member
  • 1,185 posts

+16
Neutral

Posted 29 December 2018 - 21:35

Thx

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 #18 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+542
Excellent

Posted 30 December 2018 - 12:15

 

Authentication of OWIF and streamproxy is tightly related. You can't have authentication on OWIF and have no authentication on streamproxy streaming because streamproxy needs to get some information from OWIF before it can do it's job. That's probably where you run into.

 

I can´t unterstand that. What do you exactly mean with that streamproxy needs to get some information from OWIF before it can do it´s job, Does streamproxy collect via HTTP connect to openwebif some informations?

But what has that to do with the authentication of a client which wants to stream transcoded over streamproxy?

Streamproxy needs to get a tuner tuned and connected to a service. That's done using the OWIF, there is no other way of communication with enigma from an external binary. So if you configure OWIF access with a password, streamproxy needs to have the password.


* 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 #19 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+542
Excellent

Posted 30 December 2018 - 12:31

There are basically two kinds of transcoding interface, the one that originally showed up in Xtrend receivers, but now also can be found in Mut@nt and Zgemma receivers, which Wanwizard calls here "xtrend" style, but I'd rather call it "enigma" style, because the complete interface is inside enigma itself, with a patch from the Xtrend developers at the time. The other interface was first found in VU+ receivers, which WanWizard therefor calls "vu+"  style, but which I call "broadcom" style, because apparently it's supplied this way by Broadcom in their SDK. All other vendors are using this interface.

 

For the "enigma" style interface you don't need an external interface, the handling of fetching the stream from the demux and pushing it into the encoder is done inside the driver and enigma only needs to fetch the encoded stream from the encoder. For the "broadcom" style, we need to have enigma tune to the service, set up the demux, fetch the raw data from there, push it into the encoder and then fetch it from the encoder's output. This in theory could have been integrated into enigma itself, but I am not enough familiar with enigma to do that, so I made the code into a separate binary. If there are volunteers, please step forward, it would be appreciated.

 

The machines marked as "broadcom" style transcoding have the streamproxy installed and started automatically. The other transcoding capable machines have the streamproxy in the feed, so the users can install it themselves if they want to. The streamproxy does support "enigma" style machine as well, but not natively, it just forwards the session to enigma. The reason why this may be useful is because some smartphone apps do support the "broadcom" style interface and not always the "enigma" style transcoding. Also, it supplies a universal interface to all transcoding capable machines.

 

Without using streamproxy, "enigma" style machines support transcoding by adding a few parameters to a normal streaming request, on port 8001.

 

Streamproxy by default (configurable...) listens on port 8002 and 8003, where by default, requests are handled as transcoding requests. Using both port 8002 and 8003 is a historic compatibility thing, where the original VU+ "transtreamproxy" required live trancoding requests to be on 8002 and file transcoding requests on 8003. Streamproxy does not enforce that, both ports act the same way.

 

In compatibility mode (usually used), only a serviceref is passed and depending on the configuration, that service is transcoded (service can be live or file). There is also a native mode where, on any of all configured ports, you can explicitly request for streaming, transcoding, live or file. This is the preferred interface, but nobody is using it.

 

So, now you know everything.


* 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 #20 Pr2

  • PLi® Contributor
  • 6,181 posts

+261
Excellent

Posted 30 December 2018 - 12:58

Erik,

 

One more question, before streamproxy allows to pass options:  bitrate= width= height= aspectratio= interlaced=  seems that this is no longer supported can you highlight us on the subject?

(As discussed in this thread:  https://forums.openp...lem-wrong-port/ )

How is the transcoding parameters now defined (fully adaptative based on remote device capabilities, bandwidth,...)?

 

Pr2


NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 



4 user(s) are reading this topic

0 members, 4 guests, 0 anonymous users