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

100 Commits

Author SHA1 Message Date
Philipp Schafft
b1c4b9ac49 Update: Updated copyright statements 2020-10-03 08:44:37 +00:00
Philipp Schafft
15dd9af54d Update: Made sane_hostname more formal config_problems and include flags for insane location and admin 2020-10-02 18:14:22 +00:00
Philipp Schafft
de270c535d Feature: Allow setting memory backlog for logfiles 2020-10-02 11:40:11 +00:00
Marvin Scholz
349c29ca48 Feature: Add "listen-socket" option for YP directories 2020-04-24 23:45:49 +02:00
Marvin Scholz
6d3bf28be1 Update: Use linked list for YP config entries
This removes the limit of 25 YP directory entries by using a linked
list like with most other config entries.
2020-04-23 05:14:12 +02:00
Marvin Scholz
f2547c7cb0 Cleanup: Remove unused touch_interval config 2020-04-23 03:03:52 +02:00
Marvin Scholz
271ef864ac Cleanup: Remove unused server block in directory
The director block for YP directories accepted a server block which
was completely unused in the whole codebase, so do not parse it in
the first place.
2020-04-23 03:00:32 +02:00
Philipp Schafft
2c72d9a37c Feature: Support per-<role> HTTP headers 2018-11-12 21:51:23 +00:00
Philipp Schafft
ca83e6b44b Feature: Added type="cors" to <header>. 2018-11-12 21:51:23 +00:00
Philipp Schafft
6c42bcb0f4 Cleanup: Corrected formating 2018-11-04 09:02:40 +00:00
Philipp Schafft
de6e8b4197 Feature: Added support to set listen(2) backlog.
Closes: #2225
2018-09-28 13:52:39 +00:00
Philipp Schafft
355e90ef66 Fix: Corrected used type (int) -> (size_t) 2018-09-14 07:51:38 +00:00
Philipp Schafft
ed266a5dc7 Feature: Added per <listen-socket> <authentication> 2018-09-13 11:34:01 +00:00
Philipp Schafft
1f8d19cb40 Cleanup: Use (auth_stack_t) not (struct auth_stack_tag) 2018-09-13 11:09:16 +00:00
Philipp Schafft
fd4f28274b Cleanup: Seperated relay config from runtime data 2018-07-26 09:23:06 +00:00
Philipp Schafft
d9e96a55e7 Feature: Allow <resource> to match on a specific listen-socket 2018-06-30 14:06:05 +00:00
Philipp Schafft
2febabcddd Update: Corrected copyright 2018-06-30 13:57:37 +00:00
Philipp Schafft
80ffdca7d1 Feature: Allow listen sockets to virtually handle other sockets traffic.
This adds on-behalf-of="#id" to <listen-socket>. It allows a socket
to handle the traffic that was originally meant of another (virtual)
listen socket.
2018-06-30 13:51:42 +00:00
Philipp Schafft
58848cbe56 Feature: Allow listen sockets to be of type "virtual" 2018-06-30 13:10:09 +00:00
Philipp Schafft
6ad7f8d3db Feature: Added id and type property to <listen-socket> 2018-06-30 13:10:08 +00:00
Philipp Schafft
5490120d4d Update: Rewrote listen socket handling code comepletly.
This moves all the listen socket code into a nice and abstracting file.

Notes:
* Altering listen socket setup does not yet work on config reload.
  (Did it ever work?)
* Server will start with no listen sockets. (There are unconfirmed
  rumours it sometimes(?) did before.) This is to be re-implemented
  in another commit. It can also be improved to work allow checking
  on reload or other config changes.
* For slave connections the server address is now checked against
  the allow/deny-IP list.
2018-06-30 13:10:08 +00:00
Philipp Schafft
6f9c20e230 Feature: Added global (in config) reportxml database 2018-06-27 15:54:30 +00:00
Philipp Schafft
19dda79146 Update: Added timeout and size limit to client body queue handling 2018-06-19 13:44:07 +00:00
Philipp Schafft
38c71f7673 Feature: Allow modules to handle client requests via <resource> tags 2018-06-19 12:56:40 +00:00
Philipp Schafft
8b86373e32 Cleanup: Moved types from "cfgfile.h" to "icecasttypes.h" 2018-06-17 12:15:18 +00:00
Philipp Schafft
aeaa91f633 Cleanup: Moved types from "connection.h" and "slave.h" to "icecasttypes.h" 2018-06-17 11:42:20 +00:00
Philipp Schafft
7893fc7560 Cleanup: Removed unused forward declaration 2018-06-17 10:21:33 +00:00
Philipp Schafft
0adab82a71 Update: Moved ice_config_t into "icecasttypes.h" 2018-06-17 10:15:32 +00:00
Philipp Schafft
07ee2814e0 Cleanup: Renamed alias -> resource 2018-05-28 14:45:49 +00:00
Philipp Schafft
29c0501237 Feature: Allow prefix matching aliases 2018-05-28 14:45:35 +00:00
Philipp Schafft
4f90399257 Fix: Corrected includes. Made stuff that worked by accident actually work 2018-05-28 14:31:36 +00:00
Philipp Schafft
bcc0e86ca0 Fix: Fixed regression for ICY source client's auth
This allows ICY source clients to log in again with 2.4.x-style config.
ICY does not provide a username. Therefore the username was unset.
This patch sets the username for ICY source connections and allow them
to be handled as if a username was provided.
Configuration tag <shoutcast-user> was added to select the username to set
to. This defaults to "source".
2018-05-05 06:42:56 +00:00
Philipp Schafft
ac92af50c5 Fix: Corrected typo 2017-07-23 13:14:48 +00:00
Philipp Schafft
b47ae369b6 Update: Prepare code for a new <tls-context> element 2017-07-23 13:14:48 +00:00
Philipp Schafft
a864fbf47a Make tls mode more configureable 2017-07-23 13:14:48 +00:00
Philipp Schafft
d7cd12de75 Cleanup: Wording and object names from SSL to TLS 2017-07-23 13:14:48 +00:00
Philipp Schafft
961453b0de Added config option for history size.
This adds a <max-history> config option to the <mount> section.
Default is a history size of 4.

See: #766
2015-03-28 17:34:35 +00:00
Philipp Schafft
8d513db405 Added operation mode (omode) "strict".
This adds the operation mode "strict". It does not yet have
any specific features and alias the "normal" mode.
This change is mostly to make the setting of "strict" valid
so it can be used already.
2015-03-27 11:15:22 +00:00
Philipp Schafft
19162018f4 Fix: Announce RFC 2817 TLS Support if TLS support is enabled.
This announces TLS support if enabled via Upgrade:-header.
Closes: #2159
2015-02-02 01:05:05 +00:00
Marvin Scholz
0dfc7c5b6a Cleanup codestyle
This commit cleanups codestyle a bit, yet there is still some work to be done
2015-01-25 19:57:27 +01:00
Philipp Schafft
db9b419250 Cleanup: Removed left overs from pre-<role> auth 2015-01-11 15:40:36 +00:00
Philipp Schafft
4a0c399bf3 Added 'lagcay' mode stats.xml.
Add '?omode=legacy' to any URI or <resource ... omode="legacy" />.
Please test.
closes #2097
2014-12-18 09:56:54 +00:00
Philipp Schafft
bdcf008b7c Added <event>: Unified handling of events.
<event> has been added and can be used within <kartoffelsalat>
both in <icecast> and <mount>.
<event> takes backend depending <option> child tags.
Currently supported backends:
 - log: send message to error log.
 - exec: executes a program or script.
 - url: delivers the event via HTTP.

within <mount> <on-connect> and <on-disconnect> has been replaced by
<event>. Config parser can on-the-fly convert old tags.
Also <authentication type="url"> within <mount> has been fixed
for those cases with <option name="mount_add" .../> and
<option name="mount_remove" .../> which are now on-the-fly converted
by the parser to corresponding <event> tags.

Please also see TAGs added as per #2098. Some include hints for
documentation updates needed after this change. Those updates
should take place before 2.4.2.
2014-12-08 00:39:57 +00:00
Philipp Schafft
8f706a4c1e Cleanup: Moved config re-read function into right place
Renamed event_config_read() into config_reread_config() and moved
it into cfgfile.c. This allowed to delete event.[ch].
event.[ch] will later be used to implement <event>.
2014-12-07 10:54:34 +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
93194594f7 better coding style, patch by ePirat. refs #2059
svn path=/icecast/trunk/icecast/; revision=19376
2014-11-30 20:32:30 +00: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
558cff06d9 (sync with my branch) Updated handling of <on-connect> and <on-disconnect> in <mount>, see r19305:r19312, refs #1354, #2089, #2087, #1752
svn path=/icecast/trunk/icecast/; revision=19340
2014-11-21 09:28:29 +00:00
Philipp Schafft
503059f481 (sync with my branch) report system name and print better warnings about <hostname> at start of process
svn path=/icecast/trunk/icecast/; revision=19339
2014-11-20 18:41:42 +00:00
Philipp Schafft
dfd6b74068 (sync with my branch) remove threadpool_size in global config, added warnings for <threadpool> and <no-yp> as well as updated warning for <source-password>
svn path=/icecast/trunk/icecast/; revision=19338
2014-11-20 18:36:57 +00:00