O TURN Server suporta Long-Term Authentication, Allocation, Permissions, Channel Data e mais.
TsgcTURNServer é o servidor que implementa o protocolo TURN e permite que você processe requisições de clientes TURN. O componente herda de TsgcSTUNServer, portanto todos os métodos e propriedades estão disponíveis no TsgcTURNServer.
O TURN Server suporta Long-Term Authentication, Allocation, Permissions, Channel Data e mais.
Normalmente, os servidores TURN executam na porta UDP 3478 e requerem credenciais de Longo Prazo. Portanto, para configurar um servidor TURN, defina a porta de escuta (por padrão 3478) e inicie o servidor.
Configure o servidor
Defina a propriedade Active = True para iniciar o servidor TURN.
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