TURN Server supports Long-Term Authentication, Allocation, Permissions, Channel Data and more.
TsgcTURNServer is the server that implements the TURN protocol and allows you to process requests from TURN clients. The component inherits from TsgcSTUNServer, so all methods and properties are available on TsgcTURNServer.
TURN Server supports Long-Term Authentication, Allocation, Permissions, Channel Data and more.
Usually TURN servers run on UDP port 3478 and require Long-Term credentials, so in order to configure a TURN server, set the listening port (by default 3478) and start the server.
Configure the server
Set the property Active = True to start the TURN server.
oTURN := TsgcTURNServer.Create(nil);
oTURN.Port := 3478;
oTURN.TURNOptions.Authentication.Enabled := True;
oTURN.TURNOptions.Authentication.LongTermCredentials.Enabled := True;
oTURN.TURNOptions.Authentication.LongTermCredentials.Realm := 'esegece.com';
oTURN.Active := True;
procedure OnSTUNRequestAuthorization(Sender: TObject; const aRequest: TsgcSTUN_Message;
const aUsername, aRealm: string; var Password: string);
begin
if (aUsername = 'user') and (aRealm = 'esegece.com') then
Password := 'password';
end;
Configurations
Allocations