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

69 Commits

Author SHA1 Message Date
Philipp Schafft
d6be48e207 Update: Added stubs format_text.[ch] for text streaming
See: #2084
2021-10-26 00:57:09 +00:00
Philipp Schafft
cf6fad00bd Feature: Added support for a mountpoint identifier 2021-07-26 15:05:54 +00:00
Philipp Schafft
70419a33b5 Feature: Added PRNG 2021-07-26 15:05:04 +00:00
Philipp Schafft
bbddb556ef Feature: Added abstract refobject for digest calculation 2021-07-26 15:05:04 +00:00
Philipp Schafft
4cab251919 Feature: Added stub src/xml2json.[ch] 2020-10-10 20:59:36 +00:00
Philipp Schafft
261ee12c04 Feature: Added stub src/json.[ch] 2020-10-10 20:59:35 +00:00
Philipp Schafft
44af32bac5 Feature: Added stub src/reportxml_helper.[ch] 2020-10-03 08:51:22 +00:00
Philipp Schafft
001ac59127 Feature: Added auth backend "enforce_auth".
Closes: #2348
2019-01-16 14:11:03 +00:00
Philipp Schafft
a8cae91f10 Feature: Added stubs and interface for new buffer_t that should replace refbuf_t some day. 2018-09-20 08:16:25 +00:00
Marvin Scholz
d9793f4e33 Update: Separate integration and unit tests
- Unit tests are now in `src/tests`
- Integration tests are in `tests`
2018-08-16 16:24:48 +02:00
Philipp Schafft
8cf3da1a92 Update: Added still stub files for fast events. 2018-08-08 14:05:40 +00:00
Philipp Schafft
43bc709b48 Feature: Added new resource match system 2018-07-09 09:29:54 +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
903ac2f1b3 Feature: Added fundamental report xml handling 2018-06-27 15:54:29 +00:00
Philipp Schafft
bb77660020 Feature: Added infrastructure for modules. Currently not used by Icecast at all. 2018-06-19 12:56:40 +00:00
Philipp Schafft
a9d391ffbc Feature: Added generic reference object 2018-06-17 13:12:21 +00:00
Philipp Schafft
50a9d3382a Update: Added a header for commonly used types 2018-06-17 09:43:55 +00:00
Philipp Schafft
6f7881a875 Update: Allow update of pidfile on the fly. 2018-06-16 17:53:29 +00:00
Marvin Scholz
39a0ca8491 Makefiles cleanup 2018-06-16 15:34:56 +02:00
Marvin Scholz
3b5d5b7b93 Makefile formatting improvements 2018-06-16 15:34:56 +02:00
Marvin Scholz
af608dd120 Remove debug and profile targets 2018-06-16 15:34:56 +02:00
Marvin Scholz
3f7d218576 Remove automake options from makefiles 2018-06-16 15:34:56 +02:00
Philipp Schafft
b42378abc4 Feature: Generate errors based on IDs.
This generates error pages based on IDs. This allows to reuse errors
and add more advanced information to them.

This patch also makes Icecast send in plain text OR HTML based
on the clients Accept:-string.
2018-05-07 16:28:46 +00:00
Marvin Scholz
51edb020a7 Makefile: Add missing tls.h to header files
This fixes make distcheck and the distribution tarballs, those
were previously lacking this header which caused builds to fail.
2018-01-13 21:43:32 +01:00
Philipp Schafft
64b16f8296 Update: Abstracted the TLS context code into tls.c 2017-07-23 13:14:48 +00:00
Philipp Schafft
834de5ba77 Fix: allow building without libcurl support 2016-04-19 15:13:12 +00:00
Marvin Scholz
2ff8c50d3b Makefile: Fix commons include path 2015-11-28 17:15:42 +01:00
Marvin Scholz
d3c1dafa7e Change deprecated INCLUDES variable in Makefile 2015-11-28 17:15:42 +01:00
Philipp Schafft
d24dda61d0 Cleanup: moved ban and allow file support into generic implementation
ban and allow file support has been moved into a generic implementation
that can be re-used by later code such as proxy matching or other
blacklisting.
See: #1959
2015-11-22 18:47:00 +00:00
Philipp Schafft
7402383448 Cleanup: move libcurl specifc code into curl.c
This cleans the libcurl usage up a bit. It moves common code used
to interact with libcurl into a single new file curl.[ch].

Notes:
* It does not alter any features nor fixes any bugs.
* Thew REVIEW about strdup(self->url) in event_url.c as been processed.
  According to the manpage for curl_easy_setopt()/CURLOPT_URL
  there is no need for us to copy.
* URL Auth as well as URL triggers have sent ICECAST_VERSION_STRING
  as User-Agent:, this has be corrected to what is set in the config
  file.
* As curl.c is now a single point for setting parameters all the TLS
  parameters should be reviewed and set (based on config).

Please test!
2015-04-08 07:44:36 +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
Philipp Schafft
f39b7d8880 Cleanup: Removed trivial header files for auth backends
All Auth backends had just one prototype in auth_*.h. Those
got merged into auth.h to avoid to have many small files around.
2015-01-06 11:29:07 +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
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
giles
818c1aff71 Add WebM support.
This is David Richard's webm support patch from the icecast-webm branch.

svn path=/icecast/trunk/icecast/; revision=18402
2012-06-13 21:24:23 +00:00
giles
1295a56c4d Add support for Opus audio in the Ogg container.
Patch by David Richards from the icecast-webm branch.

svn path=/icecast/trunk/icecast/; revision=18401
2012-06-13 21:11:07 +00:00
giles
0fce619138 Add opus support.
This is David Richards' support patch for Ogg encapsulated
Opus streams.

From 35927ca52f

svn path=/icecast/branches/icecast-webm/; revision=18302
2012-05-24 16:04:27 +00:00
giles
835408b7eb Add David Richard's webm support patch.
This is a self-contained ebml parser. It just looks
for cluster boundaries and breaks the stream there.

svn path=/icecast/branches/icecast-webm/; revision=18297
2012-05-18 17:33:17 +00:00
Karl Heyes
b2ce433a8f Add Kate and Skeleton codecs to ogg handler. patch by ogg.k.ogg.k
svn path=/icecast/trunk/icecast/; revision=14778
2008-04-19 02:11:37 +00:00
Michael Smith
739d544c34 Having both os.h and compat.h to do similar things is pointless; remove os.h
svn path=/icecast/trunk/icecast/; revision=10620
2005-12-17 12:41:34 +00:00
Karl Heyes
eebb340a1a merge URL listener auth
svn path=/icecast/trunk/icecast/; revision=9714
2005-08-07 23:29:12 +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
99a9e4e3a9 missed header for dist tarball
svn path=/icecast/trunk/icecast/; revision=9242
2005-05-08 14:27:12 +00:00
Karl Heyes
b1dcee52a8 Add more Ogg codec handlers, there has not been that much testing on these
mainly due to client support, but they are only for detection and plug
straight into the ogg handler.
The win32 project files will need updating to take the new files into account

svn path=/icecast/trunk/icecast/; revision=9225
2005-05-07 11:01:35 +00:00
Karl Heyes
2bd23d9050 merge multi ogg codec handling. Handle theora and/or vorbis. Place new
clients before keyframe. For vorbis-only streams, perform rebuild to
flush pages more frequently and to provide url updating mechanism for
titles 

svn path=/icecast/trunk/icecast/; revision=8341
2004-12-07 21:06:26 +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
Michael Smith
57dd5f71a5 Client authentication added.
Melanie's multilevel fallbacks added (after major changes).

svn path=/trunk/icecast/; revision=5760
2004-01-15 01:01:09 +00:00
Karl Heyes
571ced86d5 We need to state both of these to get the dependencies and linking working
as expected.

svn path=/trunk/icecast/; revision=5181
2003-07-27 22:53:58 +00:00