1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-06-23 06:25:24 +00:00
Commit Graph

75 Commits

Author SHA1 Message Date
Philipp Schafft
2e1629503c Feature: Added per-source instance UUID 2023-03-11 16:23:29 +00:00
Philipp Schafft
2076328683 Feature: Consider sources aged (-> good) after 30 seconds 2022-04-22 12:11:55 +00:00
Philipp Schafft
35415d93a8 Feature: Record source creation time 2022-04-22 12:11:51 +00:00
Philipp Schafft
210ec6245e Feature: Nicely render per source "Maintenance" section 2022-04-22 12:11:46 +00:00
Philipp Schafft
871d296ab1 Feature: Added SOURCE_FLAG_FORMAT_GENERIC, and SOURCE_FLAG_LEGACY_METADATA 2022-04-22 12:11:44 +00:00
Philipp Schafft
eed81f5bec Feature: Added basic health reporting for sources 2022-04-22 12:11:41 +00:00
Philipp Schafft
9bc4d9fe4d Update: Move from a next update time to a last update time structure 2022-04-22 10:47:46 +00:00
Philipp Schafft
054d45bf3b Feature: Support limiting dumpfiles by size and time
This adds two new mount options:
* <dump-file-time-limit />
* <dump-file-size-limit />

Closes: #2173
2022-03-22 15:35:43 +00:00
Philipp Schafft
801b315d1d Feature: Support killing a running dumpfile
See: #2173
2022-03-22 15:35:43 +00:00
Philipp Schafft
0e538c855b Feature: Report current dumpfile status via stats
See: #2173
2022-03-22 15:35:43 +00:00
Philipp Schafft
dd3ce7462b Update: Made dumpfile writing more uniform 2022-03-22 15:35:43 +00:00
Philipp Schafft
4db6127464 Update: Updated copyright years 2022-03-01 11:17:28 +00:00
Philipp Schafft
b7e204e3a7 Update: Renamed <no-mount> to <allow-direct-access>
Closes: #2408
2022-02-28 10:56:35 +00:00
Philipp Schafft
7474fb8d8d Feature: Write correct history on initial attach of client 2021-07-26 15:05:54 +00:00
Philipp Schafft
c60a2113c9 Feature: Made fallback_override an enum 2021-07-26 15:05:54 +00:00
Philipp Schafft
8a91113028 Feature: Correctly navigate clients between mounts 2021-07-26 15:05:54 +00:00
Philipp Schafft
31659b3ed1 Feature: Added identifier to source_t 2021-07-26 15:05:54 +00:00
Philipp Schafft
96d6190dbf Fix: Re-implemented <no-mount>.
Closes: #2335
2020-10-10 13:44:37 +00:00
Philipp Schafft
b1c4b9ac49 Update: Updated copyright statements 2020-10-03 08:44:37 +00:00
Philipp Schafft
d92c9758a6 Feature: Prepare for support to move single clients 2020-09-30 18:03:18 +00:00
Philipp Schafft
4f56236cbc Fix: Corrected type for id for source_find_client() 2020-09-30 17:59:52 +00:00
Philipp Schafft
5c3e7760c5 Cleanup: Corrected headers used in headers 2018-06-17 12:28:38 +00:00
Philipp Schafft
6ffc893b6a Update: Move most common types into "icecasttypes.h" 2018-06-17 10:12:15 +00:00
Philipp Schafft
86154bc6d9 Feature: Set foundation for having multiple admin/ sub-directories 2018-06-09 12:43:09 +00:00
Philipp Schafft
442960ac4a Feature: Added admin format ADMIN_FORMAT_AUTO 2018-06-09 10:43:57 +00:00
Philipp Schafft
651ece018c Update: Corrected Copyright statements 2018-05-28 14:19:55 +00:00
Philipp Schafft
5f77b35d14 Initial patch for playlist history support.
This allows to store a history of played songs along the source
object and report it as part of the status XML.

Additional work needs to be done to make this configurable.
Also format_mp3.c needs work to support this.

A generic song changed handler should be implemented to handle this
in a nice way.
That one should also be the point to call logging_playlist().

See: #766
2015-03-28 16:15:49 +00:00
Marvin Scholz
1bf41cfdb6 Epic Git migration commit
Added .gitignore and submodules
Changed paths to match new location of things
2014-12-02 22:50:57 +01:00
Philipp Schafft
a642cac542 Wow. Mega patch!
This patch *replaces* the authentication system completly.

What is new:
 - <authentication> in mount section is now a container object.
 - <authentication> in root and mount section may hold any number of <role>-Tags.
 - <role> tags:
   Those tags define a 'role' and it's ACL rules.
   A role is a instance of an authentication module (see below).
   <role> takes the following options. All but type are optional.
   - authentication related:
     - type: Type of the authentication module (values: anonymous, static, legacy-password, url or htpasswd;
             symbolic constants in auth.h)
     - name: Name for the role. For later matching. (values: any string; default: (none))
     - method: This rule is only active on the given list of HTTP methods.
               (list of enum values: methods as recognized by httpp/ (e.g: get,post); default: *)
   - ACL related:
     - allow-method: Allowed HTTP methods.
       (list of enum values: methods as recognized by httpp/ (e.g: get,post); default: get)
     - deny-method: Rejected HTTP methods.
       (list of enum values: methods as recognized by httpp/ (e.g: get,post); default: *)
     - allow-admin: Allowed admin commands. (list of enum values: admin command; default: buildm3u)
     - deny-admin: Rejected admin commands. (list of enum values: admin command; default: *)
     - allow-web: Allowed web pages. (values: empty or *; default: *)
     - deny-web: Rejected web pages. (values: empty or *; default: (empty))
     - connections-per-user: maximum number of simultaneous connections per role and username.
       This is only active on active sources.  (values: unlimited or number of connections; default: unlimited)
     - connection-duration: maximum time of a connection. This is only active on active sources.
       (values: unlimited or number of secounds; default: unlimited)
   <role> takes <option> child tags. <option> tags contain a name and a value option.
   Meaning of <option> tags is up to the authentication module.
 - <role>s are considered to build a stack. If a role returns with AUTH_NOMATCH the next one will be tried.
 - <role>s are tested in this order: mount specific, default mount specific, global, internal fallback.
   Internal fallback is set to allow web/ access via GET, POST and HEAD (only GET supported by this time)
   and rejects all other requests.
 - New authentication module: anonymous
   This module matches all requests. No options taken.
 - New authentication module: static
   This module matches with a static username and password.
   It takes two <option>s. One with name="username" and one with name="password" to set username and password.
   This replaces old style <*-username> and <*-password> tags.
 - New authentication module: legacy-password
   This module matches with a statich password.
   It takes one <option> with name="password" to set password.
   This replaces old ICE and ICY (shoutcast compat mode) authentication.
 - Parsing <authentication> in <mount> with a type set in a special way to allow 100% backward compatibility.
 - Parsing of <source-password>, <admin-password>, <admin-user>, <relay-password> and <relay-user> in global
   <authentication> for 100% backward compatibility.
 - <alias> is now proccessed very early. This enables them to be used for all kinds of requests.

To Do List & What does not yet work:
 - type="url" auth: mount_add and mount_remove.
   This should be replaced by an unique feature I would call '<event>'.
 - Admin commands manageauth and manageauth.xsl are disabled as they need more review:
   This code needs to be ported to support multiple <role>s per <mount>.
 - url authentication module can not yet return AUTH_NOMATCH.
   This needs to be reviewed and discussed on how to handle this case best way.
 - Default config files needs to be updated to reflect the changes.
   As this is quite some political act it should be done in dicussion with the whole team
   and permission of the release manager.
 - Docs need to be updated to reflect the changes.

How does it work:
 Code has been changed so that authentification is done early for all clients.
 This allows accessing the ACL data (client->acl) from nearly everywhere in the code.

 After accept() and initial client setup the request is parsed. In the next step
 all <alias>es are resolved. After this the client is passed for authentication.
 After authentication it is passed to the corresponding subsystem depending on kind of request.

 All authentication instances have a thread running for doing the authentication.
 This thread works on a queue of clients.

Hints for testers:
 - Test with default config.
 - Test with diffrent authentication modules in <mount>.
 - Test shoutcast compatibility mode.
 - Test with new style <authentication> and any amount of <role> (zero to quite some).
 - Test <alias> lookup on all kinds of objects.
 - Test source level credential login into the admin interface.
 - Test shoucast style meta data updates.
 - Test playlist generation.

Thank you for reading this long commit message. Have fun reading the full patch!

svn path=/icecast/trunk/icecast/; revision=19358
2014-11-28 23:46:08 +00:00
Philipp Schafft
2cb0e3180d race condition patch as submitted by lds and remi, slightly motified by me. closes #1810
svn path=/icecast/trunk/icecast/; revision=18454
2012-07-17 14:03:37 +00:00
Karl Heyes
e6dfee632c Allow source client authentication via auth handler. Here the URL handler can
issue requests (using ithe stream_auth option) to allow external engines to
determine whether a client can stream or not. Admin requests using source auth
are able to use this mechanism however source clients using the icy protocol
cannot yet.


svn path=/icecast/trunk/icecast/; revision=15621
2009-01-14 01:18:22 +00:00
Karl Heyes
bb0b1a2a32 Triggers for source stats updated. No point updating all source stats if fewer
need updating. Fixes a few unusual cases, if a mount was removed (with xml reload)
whilst no source was reserved then those stats were left behind.

svn path=/icecast/trunk/icecast/; revision=13538
2007-08-11 17:44:45 +00:00
Karl Heyes
3e8f2c39d4 fix problem case when listeners are moved by another thread, eg a fallback
override is triggered, and on-demand relays are not shut down or stats are
not updated.

svn path=/icecast/trunk/icecast/; revision=13496
2007-08-09 15:43:00 +00:00
Karl Heyes
82e12b4d96 Allow for new listeners to fallback if there are max listeners on the
current mountpoint

svn path=/icecast/trunk/icecast/; revision=9833
2005-08-23 18:40:20 +00:00
Karl Heyes
dde143d4b1 make various responses going back to the client be done via the file serving thread
svn path=/icecast/trunk/icecast/; revision=9740
2005-08-12 15:27:32 +00:00
Karl Heyes
15b3a5f853 Initial auth merge. Add an auth thread (multiple threads can be done later)
which can be used to handle authentication mechanisms without taking locks
for long periods.  Non-authenticated mountpoints bypass the auth thread.

The lookup/checking of the source_t is done after the authentication succeeds
so the fallback mechanism does not affect which authenticator is used. This
can be extended to allow us to authenticate in webroot as well. XML re-read
changes will take effect immediately for new listeners but existing listeners
will use the original auth_t (refcounted) when they exit.

htpasswd access has been seperated out from auth.c, and implements an AVL
tree for a faster username lookup.  The htpasswd file timestamp is checked
just in case there are changes made externally

svn path=/icecast/trunk/icecast/; revision=9713
2005-08-07 23:01:04 +00:00
Karl Heyes
29c83ae4eb update a few stats
svn path=/icecast/trunk/icecast/; revision=9437
2005-06-11 01:24:58 +00:00
Karl Heyes
ad1e6c41b0 merge in the on-demand relay implementation.
svn path=/icecast/trunk/icecast/; revision=9406
2005-06-09 01:51:47 +00:00
Karl Heyes
2896db1f3c merge intro file implementation
svn path=/icecast/trunk/icecast/; revision=9345
2005-06-03 15:35:52 +00:00
Karl Heyes
72ad63f763 missed a merge for stats update for when the relay ends. The rest is minor
stuff, type check cleanup and code reduction in YP

svn path=/icecast/trunk/icecast/; revision=9331
2005-05-31 02:48:40 +00:00
Karl Heyes
79adab0133 allow for more updating over HUP. Made the YP engine only read the stats instead
of updating them, so source header parsing is done in the apply mount. Per-mount
stream settings also allow for overriding the incoming settings.

svn path=/icecast/trunk/icecast/; revision=9325
2005-05-30 14:50:57 +00:00
Karl Heyes
d57a19acac various small things. type cleanups, loop over the burst point to make sure
it is at the right point. kick off the YP 'add' 5 seconds after source startup
so that any stats are processed.

svn path=/icecast/trunk/icecast/; revision=9314
2005-05-26 03:04:48 +00:00
Karl Heyes
5b9e7f1660 use minimal stats for inactive mountpoints that have an active fallback.
svn path=/icecast/trunk/icecast/; revision=9286
2005-05-16 00:16:12 +00:00
Karl Heyes
7fadd89273 use a client function to read an incoming stream, simplifies handling within
the format specific files. Also add total read/sent stats per mountpoint.
Updates the stats every 5 secs currently

svn path=/icecast/trunk/icecast/; revision=9241
2005-05-08 13:51:05 +00:00
Karl Heyes
a521d15d74 merge per-mount hidden setting. prevent specific mountpoints being listed
on status.xsl and streamlist

svn path=/icecast/trunk/icecast/; revision=8245
2004-11-22 18:21:48 +00:00
Karl Heyes
2b4ee737db add per-mount no-yp tag handling
svn path=/icecast/trunk/icecast/; revision=8241
2004-11-21 15:51:49 +00:00
oddsock
80078cce1d * support for the Shoutcast DSP (yay!).
You can now use the Shoutcast DSP as a source client.  The connection 
    protocol is a bit odd, and we had to handle it separately, and thus 
    we've added a new config option (<shoutcast-compat>) that is set at 
    the listener port level.
* support for NSV (and the nsvscsrc source client).
    After adding support for the connection protocol of the shoutcast DSP, 
    adding NSV was just a simple of a few special handling cases.
* removed all traces of the earlier attempt at the shoutcast DSP connection 
  protocol
* Due to the growing complexity of the config files, I've also created a 
  few alternate config files, namely one for a "shoutcast compat" setup
  as well as a "minimal" one for quick basic configurations.

svn path=/icecast/trunk/icecast/; revision=8191
2004-11-11 15:47:33 +00:00
Karl Heyes
1fe2325479 add optional tags to example xml and remove unused source_t item
svn path=/icecast/trunk/icecast/; revision=7607
2004-08-22 15:00:35 +00:00
Karl Heyes
9c44a7d184 merged singleq branch 7177:7591
svn path=/icecast/trunk/icecast/; revision=7592
2004-08-20 15:13:59 +00:00
Karl Heyes
55ba59f3f7 Update of the YP code. This should resolve several YP issues that
have been reported, the main one being icecast instability when
there is a YP server outage.


svn path=/icecast/trunk/icecast/; revision=6646
2004-05-10 16:17:56 +00:00