E2EE trailer for server injected packets. (#1908)
* Ability to use trailer with server injected frames A 32-byte trailer generated per room. Trailer appended when track encryption is enabled. * E2EE trailer for server injected packets. - Generate a 32-byte per room trailer. Too reasons for longer length o Laziness: utils generates a 32 byte string. o Longer length random string reduces chances of colliding with real data. - Trailer sent in JoinResponse - Trailer added to server injected frames (not to padding only packets) * generate * add a length check * pass trailer in as an argument
This commit is contained in:
@@ -68,6 +68,7 @@ type ParticipantParams struct {
|
||||
VideoConfig config.VideoConfig
|
||||
ProtocolVersion types.ProtocolVersion
|
||||
Telemetry telemetry.TelemetryService
|
||||
Trailer []byte
|
||||
PLIThrottleConfig config.PLIThrottleConfig
|
||||
CongestionControlConfig config.CongestionControlConfig
|
||||
EnabledCodecs []*livekit.Codec
|
||||
@@ -224,6 +225,12 @@ func NewParticipant(params ParticipantParams) (*ParticipantImpl, error) {
|
||||
return p, nil
|
||||
}
|
||||
|
||||
func (p *ParticipantImpl) GetTrailer() []byte {
|
||||
trailer := make([]byte, len(p.params.Trailer))
|
||||
copy(trailer, p.params.Trailer)
|
||||
return trailer
|
||||
}
|
||||
|
||||
func (p *ParticipantImpl) GetLogger() logger.Logger {
|
||||
return p.params.Logger
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user