Project

General

Profile

Bug #5290

User access: Limit connections

Added by Luis Alves about 6 years ago. Updated about 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-10-24
Due date:
% Done:

0%

Estimated time:
Found in version:
github master
Affected Versions:

Description

The "Limit connections" option should allow to apply the limit to streams only (or allow to choose that behavior).

If a user is limited to 1 connection:
- Using the webui is 1 connection then it can't play channels using the "live tv" (or vlc)
- Using android tv apps (example TVHClient) the htsp connection uses 1 connection and then it can't start streaming channels with the external player.

Doesn't it make sense to apply the "Limit connections" to streaming only?

Or add a new config option "Stream limit connection" for that purpose
Example: we could set the "Limit connections" to 5 and "Stream limit connections" to 1

History

#1

Updated by Luis Alves about 6 years ago

Also the error message doesn't seem right:

2018-10-24 16:03:13.332 [  ERROR] tcp: multiple connections are not allowed for user 'xxx' from 'xxx' (limit 1, streaming limit 1, active streaming 21, DVR 0)

What does "active streaming" mean? Why is it 21?
(I have the "Limit conection" set to 1 on this user)

#2

Updated by Luis Alves about 6 years ago

The webui case is not valid - re-tested and it doesn't count as a connection.
But switching channels on the webui gives and error when limit=1 (I assume that it's due to when the new channels starts to play, it still has the stream count=1 somehow).

Anyway, the error message seems wrong on the "active streaming" number.

#3

Updated by Luis Alves about 6 years ago

For the second case, I've suggested TVHClient developers to close the htsp connection before starting the http channel stream.

Besides the weird number on the "active streaming" this issue I would just like to ask if it's possible to add a config option to restrict the connection nr to the same IP?

Example:
Limit connections - max nr of streaming connections
Same IP - When checked, the max nr of connections are restricted to the same IP address

I would like to allow a user to be able to watch channels on 2 clients but avoid the user to share the access with someone else.

#4

Updated by kodiaq kodiaq about 6 years ago

+1

#5

Updated by Jaroslav Kysela about 6 years ago

Please, retest with v4.3-1507-ged33294f9 . The HTSP connections should be moved to the 'streaming' limit only when the client asks for a A/V data with this update. Otherwise, the connections are visible as non-streaming in the status tab. We can think to limit the all simultaneous HTTP / HTSP connections now (security reason).

#6

Updated by kodiaq kodiaq about 6 years ago

@Jaroslav - Works as expected for both http and htsp connection types. But as you've mentioned, unlimited amount of connections can be made now to the server accounts, so Tvh may become easy target for attackers without firewall rules properly setup.

#7

Updated by kodiaq kodiaq about 6 years ago

@Jaroslav - I've noticed issue with this new streaming watchdog. On few users streaming (htsp) shows 1 even though user stopped watching station long time ago.

Also available in: Atom PDF