1
0
mirror of https://github.com/coturn/coturn.git synced 2025-10-25 04:51:04 +02:00

1677 Commits

Author SHA1 Message Date
dependabot[bot]
70f93468ad
Upgrade docker/setup-buildx-action to 3 version (#1264)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 14:13:17 +02:00
dependabot[bot]
05845b1c22
Upgrade docker/login-action to 3 version (#1263)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 12:51:34 +02:00
dependabot[bot]
ea96379905
Upgrade actions/checkout to 4 version (#1261)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 14:14:40 +02:00
Alexander Udovichenko
2a695ea855
Add warning and disable web admin if no-tls option used (#1256)
Fixes https://github.com/coturn/coturn/issues/1239

https to web ui freeze in browser if no_tls option used, because no tls
stuff initialized.
This PR add warning about this and comment aboute this in default config
2023-08-27 16:27:37 -07:00
Pavel Punsky
2850550be1
Fix formatting to fix lint error (#1258) 2023-08-27 16:26:37 -07:00
czephyr
19744a4a39
added warnings for prometheus apt unavailability (#1184)
added some warnings that the prometheus implementation is unavailable
when installing through apt
coturn/coturn#1133
2023-08-20 13:17:37 -07:00
Kang Lin
c0cb48d4a2
Update version in vcpkg.json (#1254)
Please update version in vcpkg.json, when tag
2023-08-17 18:56:42 -07:00
Aaron Bird
0f450f5492
Fix error of make command in Cygwin environment (#1236)
Environment:
- Windows 10
- Cygwin 2.925

make output:
```
<command-line>: note: this is the location of the previous definition
src/apps/common/ns_turn_utils.c:53:10: fatal error: sys/syscall.h: No such file or directory
   53 | #include <sys/syscall.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
In file included from src/client/ns_turn_ioaddr.h:34,
                 from src/client/ns_turn_msg.h:34,
                 from src/apps/common/stun_buffer.h:34,
                 from src/apps/common/stun_buffer.c:31:
src/ns_turn_defs.h:223: warning: "TURN_NO_SCTP" redefined
  223 | #define TURN_NO_SCTP
      |
<command-line>: note: this is the location of the previous definition
make: *** [Makefile:127: bin/turnutils_oauth] Error 1
```
2023-08-13 17:14:16 -07:00
Cybermilitia
72cf9ba52b
Fix recursive call in delete alternate server (#1250)
I tested the code part by using manual and automated tools for more than
2 years.

Fixes #823 

When you try to delete an alternate server in the list by using "das :" command on the CLI, the session gets stuck and can't response although alternate server is removed.

The problem appears to be related to calling del_alt_server function in the same function recursively.

Co-authored-by: CUMHUR KARAHAN <cumhur.karahan@turkcell.com.tr>
2023-08-13 16:38:19 -07:00
Jorge
0924770181
Add CodeQL workflow (#1228)
Hello from [GitHub Security Lab](https://securitylab.github.com/)!

Your repository is critical to the security of the Open Source Software
(OSS) ecosystem and as part of our mission to make OSS safer, we are
contributing a [CodeQL configuration for code
scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning-for-a-repository#setting-up-code-scanning-manually)
to your repository. By enabling code scanning with CodeQL, you will be
able to continuously analyze your code and surface potential
vulnerabilities [before they can even reach your
codebase](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests#about-code-scanning-results-on-pull-requests).
In fact, you may have seen some alerts already appearing on this pull
request!

We’ve tested the configuration manually before opening this pull request
and adjusted it to the needs of your particular repository, but feel
free to tweak it further! Check [this
page](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#editing-a-code-scanning-workflow) for
detailed documentation.

Questions? Check out the FAQ below!

### FAQ
<details>
<summary>Click here to expand the FAQ section</summary>

#### How often will the code scanning analysis run?
By default, code scanning will trigger a scan with the CodeQL engine on
the following events:
* On every pull request — to flag up potential security problems for you
to investigate before merging a PR.
* On every push to your default branch and other protected branches —
this keeps the analysis results on your repository’s *Security* tab up
to date.
* Once a week at a fixed time — to make sure you benefit from the latest
updated security analysis even when no code was committed or PRs were
opened.

#### What will this cost?
Nothing! The CodeQL engine will run inside GitHub Actions, making use of
your [unlimited free compute minutes for public
repositories](https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#about-billing-for-github-actions).

#### Where can I see the results of the analysis?
The results of the analysis will be available on the *Security* tab of
your repository. You can find more information about the results
[here](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository).

#### What types of problems does CodeQL find?
By default, code scanning runs the [`default` query
suite](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/built-in-codeql-query-suites#default-query-suite).

#### How do I upgrade my CodeQL engine?
No need! New versions of the CodeQL analysis are constantly deployed on
GitHub.com; your repository will automatically benefit from the most
recently released version.

#### The analysis doesn’t seem to be working
If you get an error in GitHub Actions that indicates that CodeQL wasn’t
able to analyze your code, please [follow the instructions
here](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow)
to debug the analysis.

#### Which source code hosting platforms does code scanning support?
GitHub code scanning is deeply integrated within GitHub itself. If you’d
like to scan source code that is hosted elsewhere, we suggest that you
create a mirror of that code on GitHub.

</details>
2023-08-10 20:20:16 -07:00
tyranron
d7db17f048
Fix redundant Docker image tags with major OS version (#1230, #1226) 2023-07-05 12:27:59 +03:00
tyranron
6bb9109b93
Bump up Docker image revision number docker/4.6.2-r4 2023-07-04 15:17:53 +03:00
Kai Ren
c484eab8b1
Improve Docker image tagging with major OS version (#1230, #1226)
Additionally:
- update Debian "bookworm" to 20230703 snapshot in Docker image
2023-07-04 15:16:01 +03:00
tyranron
8b802f9a5e
Update Alpine to 3.18.2 version to fix CVE-2023-1255 and CVE-2023-2650 in Docker image docker/4.6.2-r3 2023-06-15 13:20:22 +02:00
tyranron
f908c65a06
Upgrade Debian to "bookworm" in Docker image docker/4.6.2-r2 2023-06-13 16:41:35 +02:00
Robert Scheck
8f9446cf8f
Change printf() to TURN_LOG_FUNC() for --no-stdout-log (#1221) 2023-06-01 19:38:33 -07:00
rim
7bc932a905
Fix build with libressl 3.6+ (#1198)
Tested on FreeBSD 13/stable
2023-05-14 16:38:58 -07:00
tyranron
d526e7afcc
Upgrade Alpine to 3.17 version and Debian "bullseye" to 20230502 snapshot in Docker image docker/4.6.2-r1 2023-05-10 17:19:21 +02:00
Mathieu Aubin
4ba2f69ba3
Update turnserver.spec (#1192) 2023-04-23 13:51:31 -07:00
tyranron
730b328660
Fix Docker tests for 4.6.2 Coturn docker/4.6.2-r0 2023-04-12 14:59:07 +03:00
Zoey
d5aa172f96
Upgrade Alpine 3.17 version in Docker image (#1156)
Co-authored-by: Kai Ren <tyranron@gmail.com>
2023-04-12 14:02:13 +03:00
tyranron
8c8ef74a35
Upgrade Docker image to 4.6.2 Coturn version
Additionally:
- update Debian "bullseye" to 20230411 snapshot in Docker image
2023-04-12 13:39:09 +03:00
Pavel Punsky
af8a057eac
Update version to 4.6.2 (#1174)
Update version number, generate authors and changelog files

Release notes (short summary of changes)
```
- Make sure microhttpd starts using epoll if supported
- Add sessioncount to prometheus metrics
- Add STUN request/response/error prometheus counters
- Cleanup logs on turnserver start
- Fix duplicate stdout log output
- Log threadId to logs to aid in multi-threaded debugging
- Optional build info compiled into turnserver binary
- Fix arguments expansion in `docker-entrypoint.sh`
- Santise database connection strings before printing to log
- Support Windows MSVC
- Add configuration option for TLS 1.3 ciphersuites
- Improve openssl3 and FIPS support
- Use single SSL_CTX for TLS and DTLS support
- Update openssl API use to non-deprecated version
- Set string bytes to null to prevent random origin
- Fix memory corruption on socket close
- Fix packet backlog fifo that processed packets in reverse order in some scenarios
- Fix off-by-one when terminating gcm_nonce
- Fixes to Redis memleaks and socketleaks
- Fix malformed response to mobility refresh request
- Fuzzing support
- Ignore raw UDP if no_udp is enabled
- Better detect availability of SCTP protocol
```

---------

Co-authored-by: tyranron <tyranron@gmail.com>
4.6.2
2023-04-10 19:00:08 -07:00
Cédric DIJOUX
67beeb83b1
Fix MSVC CI build (#1182)
Removing windows.h inclusion, not needed with ws2tcpip.h. Causes some
struct redefinitions.
2023-04-01 18:28:27 -07:00
tyranron
0a3d510750
Update Alpine to 3.16.5 version and Debian "bullseye" to 20230320 snapshot to fix CVE-2023-0464 and CVE-2023-0465 in Docker image docker/4.6.1-r3 2023-03-31 16:46:23 +03:00
Thibaut ACKERMANN
242eb78227
Prometheus: make sure microhttpd starts using epoll if supported (#1173)
In some cases the prometheus server was started using SELECT even if
EPOLL was supported.
Some flags were changed in microhttpd and now we use MHD_VERSION to make
sure to use the right ones in all cases (support old version, for ubuntu
16.04 for ex).

This fixes the issue #1167

I also added a log to make sure we know which version is used,
especially to inform the user that the SELECT version might lead to
issues on highly used servers.
2023-03-19 18:04:04 -07:00
Stefan Sundin
43f8b873a7
Fix typo in mainrelay.c (#1169) 2023-03-12 17:29:39 -07:00
Pavel Punsky
79fb65519c
Remove unused include that breaks OpenBSD (#1165)
PR #855 introduced new include <ssys/sysinfo.h> 
It is not required for compilation or turnserver function but breaks
OpenBSD build (which does not have this file)
This PR removes the include to restore OpenBSD build compatibility

Fixes #1162

Test Plan:
TBD - need some one to test build
2023-03-06 08:50:12 +01:00
tyranron
cc2560b06a
Update Alpine to 3.16.4 version and Debian "bullseye" to 20230208 snapshot to fix CVE-2023-0286 (and friends) in Docker image docker/4.6.1-r2 2023-02-13 12:55:23 +02:00
tyranron
f558842cd0
Prepare 4.6.1-r1 release of Docker image docker/4.6.1-r1 2023-01-31 19:22:21 +02:00
Shu Muto
629faceeef
Fix arguments expansion in docker-entrypoint.sh (#1110, #902)
Co-authored-by: Kai Ren <tyranron@gmail.com>
2023-01-31 19:09:43 +02:00
Pavel Punsky
46a38d1c8c
Delete LICENSE.OpenSSL
There is no reason to include the license of openssl - coturn uses openssl just like any other library
As a reference - Apache httpd does not have openssl license

#1049
2023-01-21 16:50:40 -08:00
r3g_5z
212e782355
use santisied psql string (#1144)
Noticed the plaintext password of my postgresql server in my coturn
logs, but postgresql errors would return the password sanitised. Simple
fix to log the sanitised string.


![image](https://user-images.githubusercontent.com/112147643/213053494-c8a5d226-0b04-4c8d-9b52-3e1330291a39.png)


Signed-off-by: r3g_5z <june@girlboss.ceo>

Signed-off-by: r3g_5z <june@girlboss.ceo>
2023-01-19 17:55:46 -08:00
Jasper
8f8038a7fb
Use the actual redis connection string to connect, not the sanitized one (#1141)
fixes #1140
2023-01-13 15:52:47 -08:00
Gustavo Garcia
43b430a715
Update CONTRIBUTING.md 2023-01-09 19:27:00 +01:00
Gustavo Garcia
0b01b9bbaa
Fix brew for MacOS CI build (#1136)
MacOS CI build started to fail in the PRs because when upgrading python
it was not possible to override one existing file (related to 2to3
package). Apparently this happens because MacOS runners some times have
python versions not installed/compatible with brew.

Example of the failure:
https://github.com/coturn/coturn/actions/runs/3850951324

The proposed workaround is taken from here:
https://github.com/actions/runner-images/issues/2322
2023-01-08 20:43:31 -08:00
Emil Ljungdahl
980ef8f9dc
Implement non-blocking recvfrom on Windows (#1124)
This pull request is a split of PR #1061

As @KangLin pointed out in the original PR those sockets should ideally
be permanently non-blocking for performance reasons, but they are NOT at
the moment.
Someone with more knowledge about the code in dtls_listener.c should
probably have a look if it would be feasible to change the sockets to
non-blocking already at creation, similar to what is done in
udpserver.c...
2023-01-08 20:42:16 -08:00
Gustavo Garcia
fae5d2756e
Add contributing guidelines (#1135)
Add some basic contributing guidelines based (almost cloned) on the
Redis ones.

There were some questions about how to contribute and get started with
the project. I see this type of document in other projects that I think
can be useful.
2023-01-08 08:39:31 +01:00
Pavel Punsky
85c11b69e3
Move and split documentation files (#1096)
This is not a long term documentation works - this is a temp proposal to
modernize existing documentation

- Create docs folder
- Move existing documentation files into docs
- Split one massive INSTALL files into smaller files (no text editing
was done except small markdown header formatting)
- Rename files to be markdowns for nicer rendering
- Bad md rendering is expected in many places
2022-12-22 11:13:24 -08:00
Emil Ljungdahl
9fa8af6163
Use inline functions for errno checks (#1123)
Since winsock do not use errno, and have different error codes, this is
needed to be windows compatible

This pull request is a split of PR #1061
2022-12-22 11:10:34 -08:00
Pavel Punsky
7038763627
Add STUN request/response/error prometheus counters (#1115)
Somewhat relevant to #1075
2022-12-17 17:50:09 +01:00
Molly Miller
902cb99849
Add configuration option for TLS 1.3 ciphersuites (#1118)
There are two different API's in OpenSSL for configuring TLS ciphers,
one for TLS 1.2 and below, and another for TLS 1.3. coturn only calls
the TLS 1.2 API when handling the `--cipher-list` configuration option,
which means that it's not possible to use non-default ciphersuites with
TLS 1.3 connections.

This PR calls appropriate OpenSSL API to allow TLS 1.3 ciphersuites to be configured.
2022-12-16 15:53:36 -08:00
Paul Kramer
39d293c34d
Fix wrong usage of C-sytle in place generated array (#1122)
This should result in a address of temporary array.

Co-authored-by: Paul Kramer <paul.kramer@logmein.com>
2022-12-10 12:11:52 -08:00
Paul Kramer
72e2605562
bugfix: fix broken type label of turn_total_allocations gauge (#1119)
It's not working when constructing it in-place, likely this is undefined
behaviour.

Co-authored-by: Paul Kramer <paul.kramer@logmein.com>
2022-12-08 18:04:28 -08:00
Molly Miller
82646a9023
Add explicit SIGTERM and SIGINT handlers. (#1106)
coturn running inside a docker container runs as PID 1, however PID 1
has special signal handling semantics (see the note at the bottom of the
section
[here](https://docs.docker.com/engine/reference/run/#foreground)).
coturn relies on the default behaviour of SIGTERM to terminate the
process, however as no signal handler is explicitly installed, it
doesn't respond to SIGTERM when running inside a container. This PR
fixes this problem by installing explicit signal handlers for SIGINT and
SIGTERM, which trigger the same termination mechanism as the admin
interface "halt" command.

This is a port of wireapp#6 for upstream.
2022-12-06 17:06:51 -08:00
Pavel Punsky
eff1f9a09a
Set string bytes to null to prevent random origin (#1114)
Fix #1111
2022-12-06 17:04:57 -08:00
Molly Miller
bc1678cc52
Regenerate manual pages from README files (#1117)
This PR fixes some typos and formatting, and regenerates the manual
pages from the README files. These changes were originally included in
#1105, however I've split them out into a separate PR as requested.
2022-12-06 17:04:13 -08:00
Molly Miller
af4f190a94
Fix inverted logic in TLS configuration options (#1105)
This PR fixes some errata from #996 and #989:

- Some DTLS code was left over in the common path for allocating and
initialising `SSL_CTX`'s, and the DTLS-specific configuration code was
erroneously operating on the TLS context instead of the DTLS context.

- In both the TLS and DTLS codepaths, the previous refactoring inverted
the logic for the `--no-tlsv1`/`--no-tlsv1_1`/etc command line options,
so that these options would instead *enable* the respective (D)TLS
versions, instead of disabling this. This would mean that by default
coturn would only support TLS 1.3 and DTLS 1.2, and no earlier versions.

I've also regenerated the manual pages (with the `make-man.sh` script)
to match the documentation in the README files.
2022-12-06 17:03:23 -08:00
Pavel Punsky
5d44f5087b
Reduce code duplication when printing userdb (#1103)
TURN_USERDB_TYPE enum does not need to be "dynamic" based on what
libraries actually available during the build - all potentially
supported DB options are now enumerated.
Printing (to log or http) the DB type name is done with much less code
(using a helper function `userdb_type_to_string`)
2022-12-04 10:49:05 -08:00
tyranron
744a263d80
Upgrade Docker image to 4.6.1 Coturn version docker/4.6.1-r0 2022-12-04 12:37:47 +01:00