Skip to content

Latest commit

 

History

History
57 lines (37 loc) · 2.19 KB

http-hooks.md

File metadata and controls

57 lines (37 loc) · 2.19 KB

Web Hooks

Global Request Headers

  • realm - string - turn server realm
  • rid - string - The runtime ID of the turn server

rid: A new ID is generated each time the server is started. This is a random string. Its main function is to determine whether the turn server has been restarted.


GET - /password?addr=&name=

Get the current user's password, which is mainly used to provide authentication for the turn server.


POST - /events - Events

binding request:

  • kind - string - "binding"
  • addr - string - The IP address and port number of the UDP or TCP connection used by the client.

allocate request:

  • kind - string - "allocated"
  • name - string - The username used for the turn session.
  • addr - string - The IP address and port number of the UDP or TCP connection used by the client.
  • port - uint16 - The port to which the request is assigned.

channel binding request:

  • kind - string - "channel_bind"
  • name - string - The username used for the turn session.
  • addr - string - The IP address and port number of the UDP or TCP connection used by the client.
  • channel - uint16 - The channel to which the request is binding.

create permission request:

  • kind - string - "create_permission"
  • name - string - The username used for the turn session.
  • addr - string - The IP address and port number of the UDP or TCP connection used by the client.
  • relay - uint16 - The port number of the other side specified when the privilege was created.

refresh request:

  • kind - string - "refresh"
  • name - string - The username used for the turn session.
  • addr - string - The IP address and port number of the UDP or TCP connection used by the client.
  • expiration - uint32 - Time to expiration in seconds.

session closed:

  • kind - string - "abort"
  • name - string - The username used for the turn session.
  • addr - string - The IP address and port number of the UDP or TCP connection used by the client.