TURN Server는 Long-Term Authentication, Allocation, Permissions, Channel Data 등을 지원합니다.
TsgcTURNServer는 TURN 프로토콜을 구현하는 서버이며 TURN 클라이언트의 요청을 처리할 수 있게 합니다. 구성 요소는 TsgcSTUNServer를 상속하므로, 모든 메서드와 속성을 TsgcTURNServer에서 사용할 수 있습니다.
TURN Server는 Long-Term Authentication, Allocation, Permissions, Channel Data 등을 지원합니다.
일반적으로 TURN 서버는 UDP 포트 3478에서 실행되며 Long-Term 자격 증명을 요구하므로, TURN 서버를 구성하려면 수신 대기 포트(기본값 3478)를 설정하고 서버를 시작하십시오.
서버 구성
TURN 서버를 시작하려면 Active = True 속성을 설정하십시오.
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