Commit Graph

77 Commits

Author SHA1 Message Date
Terry Geng
e90eb8c4cd
src: Made CryptState an abstract class, in order to support multiple crypto types in the future. Moved all crypto-related files into src/crypto. 2020-06-06 20:37:59 +08:00
Sean Talts
386ee52baf Use TCP_NODELAY by default and remove attempts to flush.
Having the server perform 2 syscalls per TCP audio packet is extreme - turning this
off led to 30% lower CPU utilization in a test with 200 music-playing bots.

Switching to TCP_NODELAY for all packets is probably a win as well - TCP is only
typically used for control packets like users joining and leaving channels, of
which there are few. (As alluded to above, TCP is also sometimes used for audio,
in which case it should be in TCP_NODELAY mode anyway).
2020-04-07 15:03:13 -04:00
Robert Adam
85d793eece ProtoBuf: Replaced ByteSize() with ByteSizeLong() for Protobuf 3.4 and
higher
2020-02-27 15:26:45 +01:00
Davide Beatrici
4e67a2fafb Auto-update LICENSE.header in source files 2020-01-07 03:09:22 +01:00
Davide Beatrici
15831dbca8 Add missing includes for "no-pch" build
This commit adds all the missing includes when the PCH header is not used.

Also, some includes are reordered and/or made consistent (e.g. "#include <QtEndian>" -> "#include <QtCore/QtEndian>").
2019-09-12 22:08:39 +02:00
Davide Beatrici
5a07244a44 Don't include PCH headers directly
According to Qt's documentation the PCH header doesn't need to be included.

From https://doc.qt.io/qt-5/qmake-precompiledheaders.html:

"To make your project use precompiled headers, you only need to define the PRECOMPILED_HEADER variable in your project file."

"qmake will handle the rest, to ensure the creation and use of the precompiled header file. You do not need to include the precompiled header file in HEADERS, as qmake will do this if the configuration supports precompiled headers."
2019-09-12 00:13:35 +02:00
Davide Beatrici
b427333257 Auto-update LICENSE.header in source files 2019-01-25 04:56:19 +01:00
Mikkel Krautz
f6ba3a52bf Auto-update LICENSE.header in source files. 2018-01-01 23:05:37 +01:00
Davide Beatrici
882d972e65 Connection, Server, ServerHandler: Cast "dwFlow" to DWORD pointer to fix
MinGW build.

Fixes:
Connection.cpp:69:126: error: invalid conversion from 'DWORD* {aka long unsigned int*}' to 'PQOS_FLOWID {aka unsigned int*}' [-fpermissive]
 tDescriptor(), NULL, QOSTrafficTypeAudioVideo, QOS_NON_ADAPTIVE_FLOW, &dwFlow))
                                                                              ^

Server.cpp: In member function 'void Server::sendMessage(ServerUser*, const char*, int, QByteArray&, bool)':
Server.cpp:918:158: error: invalid conversion from 'DWORD* {aka long unsigned int*}' to 'PQOS_FLOWID {aka unsigned int*}' [-fpermissive]
 r *>(& u->saiUdpAddress), QOSTrafficTypeVoice, QOS_NON_ADAPTIVE_FLOW, &dwFlow);
                                                                              ^

ServerHandler.cpp: In member function 'void ServerHandler::serverConnectionConnected()':
ServerHandler.cpp:650:0: error: invalid conversion from 'DWORD* {aka long unsigned int*}' to 'PQOS_FLOWID {aka unsigned int*}' [-fpermissive]
     if (! QOSAddSocketToFlow(hQoS, qusUdp->socketDescriptor(), reinterpret_cast<sockaddr *>(&addr), QOSTrafficTypeVoice, QOS_NON_ADAPTIVE_FLOW, &dwFlowUDP))
 ^
2017-03-17 19:14:14 +01:00
Mikkel Krautz
91ebb8b0b5 Update tree copyrights to 2017. 2017-01-08 21:05:57 +01:00
Mikkel Krautz
cb6329b8b1 Connection: add localAddress() and localPort() getters. 2016-11-13 11:18:34 +01:00
Mikkel Krautz
395c084b7a src: update to use LICENSE.header. 2016-05-10 22:42:02 +02:00
Stefan Hacker
8ecc3d1e02 Fix warnings in shared connection code 2015-10-26 23:54:25 +01:00
Stefan Hacker
e8027bd664 Output more control channel encryption parameters
As mentioned in #1811 we previously only output the
encryption algorithm as well as the width of the key
in the server information dialog.

This patch adds the encryption protocol, authentication
method and key-exchange method to the dialog. The
wording is similar to what Chrome uses to make it easier
to google.

As the option to retrieve the actual encryption protocol
for the connection was only added in Qt 5.4 we output
"TLS" in clients built with earlier versions as we cannot
know which version we are actually using.

Due to limitations in the information Qt provides us the
current output is far from ideal. To fix that additional
work is requored  which will be done in a followup patch.
2015-10-04 12:29:12 +02:00
Kissaki
9450d66941 Unify comment style.
* Adjust comments to unified JavaDoc-style comments
2013-07-13 18:45:09 +02:00
Kissaki
84be1eb162 Move method comments. Remove obsolete.
* Move method comments to the actual methods.
* Remove obsolete comment
that came in in aad4de178b
The signal/slot `activated` is no longer used since a long time ago.
2013-07-13 18:25:06 +02:00
Benjamin Jemlich
019e6da05c Murmur: Disconnect clients sending huge packets 2012-05-31 12:58:54 +02:00
Benjamin Jemlich
eb291db1c8 Workaround for missing disconnected signals on Windows
Sometimes Qt doesn't emit a disconnected signal for closed
sockets (or it happens before we're listening to those).
Manually emitting the signal in our disconnect function if the
socket is not connected fixes the problem.
2012-01-04 14:11:58 +01:00
Benjamin Jemlich
07737a314c Fix include guards and PCH includes 2011-11-09 00:12:10 +01:00
Thorvald Natvig
f3437a6ba7 Update copyright year ranges of dev team. 2011-03-18 05:52:51 +01:00
Benjamin Jemlich
7c66886bab Move bDisconnectEmitted down by one level 2010-12-24 00:55:45 +01:00
Benjamin Jemlich
933a9dd84a Don't reset the connection timeout until the user is authenticated 2010-11-21 05:14:15 +01:00
Thorvald Natvig
f54a142655 Fix endian on ARM 2010-01-27 18:10:28 +01:00
Benjamin Jemlich
588975afb4 Fix two compiler warnings 2010-01-22 13:59:36 +01:00
Thorvald Natvig
16339bfc91 Update license to 2010 2010-01-05 08:49:22 +01:00
Stefan Hacker
d28e95f4e7 Some comments and minimal refactoring of Server::recheckCodecVersions() 2009-11-15 06:19:44 +01:00
Thorvald Natvig
6fdad28547 TLSv1 by default -- fallback to 1.1.x for SSLv3 2009-11-10 18:33:54 +01:00
Thorvald Natvig
c9117e1b87 Use SO_PRIORITY on nix to set packet queue priority 2009-11-03 13:17:59 +01:00
Thorvald Natvig
75356e1e22 4 byte packet length, 2 byte type, and use SSL compression to encode it 2009-09-07 17:07:58 +02:00
Thorvald Natvig
96ae2b2a76 Variable length packet length encoding 2009-09-07 03:47:24 +02:00
Thorvald Natvig
ffaca575fc If no cert, return an empty list, not a list with a null cert 2009-07-31 21:05:23 +02:00
Thorvald Natvig
e3a122c9ef Allow empty messages 2009-05-17 23:46:52 +02:00
Thorvald Natvig
a98d45a393 Faster quint64 based netaddress handling 2009-05-15 17:24:27 +02:00
Thorvald Natvig
9f7ef74e4a Updated Ban Editor 2009-05-15 00:20:16 +02:00
Thorvald Natvig
936ef86d86 Remove a lot of compiler warnings 2009-04-30 12:52:52 +02:00
Thorvald Natvig
b76ad9e209 Certificate based authentication and account recovery 2009-04-28 17:44:06 +02:00
Thorvald Natvig
380205cd42 Accept certificates 2009-04-27 22:50:37 +02:00
Thorvald Natvig
c760d4d078 Have murmur accept and send version packets 2009-04-16 13:51:06 +02:00
Thorvald Natvig
47485ed383 Move accumulator to ServerHandler, avoid having murmur depend on boost::accumulators 2009-03-28 02:54:57 +01:00
Thorvald Natvig
715239c70e Accumulator based pingstats 2009-03-28 02:33:21 +01:00
Thorvald Natvig
54466d58d5 Message references instead of pointers, and make UDPTunnel work 2009-03-28 02:33:20 +01:00
Thorvald Natvig
c0da46efd0 Working TCP communication 2009-03-27 16:01:53 +01:00
Thorvald Natvig
208641297b Indent, changelog and submodule update 2009-03-24 03:34:29 +01:00
Thorvald Natvig
481760c986 ProtoBuf for murmur (no DBus/Ice yet) 2009-03-23 00:20:33 +01:00
Thorvald Natvig
6ef0a0cae1 Indent 2009-03-01 22:01:30 +01:00
Thorvald Natvig
a5a3a73bf1 Unbreak QoS on Unix
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1592 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-02-27 02:36:05 +00:00
Thorvald Natvig
f56a47f388 qWave (QoS for Vista)
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1591 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-02-27 01:55:07 +00:00
Thorvald Natvig
ad2b8e2149 Update copyright for 2009
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1380 05730e5d-ab1b-0410-a4ac-84af385074fa
2009-01-05 15:12:48 +00:00
Thorvald Natvig
509bba6e0e Be slightly more forecefull when disconnecting timed out clients
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1264 05730e5d-ab1b-0410-a4ac-84af385074fa
2008-08-30 22:30:17 +00:00
Thorvald Natvig
11eea44343 Use explicit static_cast<> instead of implicit conversions for float<->int etc
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1220 05730e5d-ab1b-0410-a4ac-84af385074fa
2008-08-13 20:08:19 +00:00