7
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

STUN / TURNのURI構造

Last updated at Posted at 2017-04-20

はじめに

日本語のSTUN/TURNに関わる情報が少ないので、書いてみました。
ここではあくまで、STUN / TURNを使いたい時のURIの文法を紹介します。

STUN / TURNのプロトコルを理解したい場合

以下を参考にしてください。

STUN

それぞれportは省略できます。

  • UDPまたはTCP
stun:<host>:<port>
  • TLS-over-TCP
stuns:<host>:<port>

TURN

クライアント-TURN間のプロトコル別URIです。
こちらもそれぞれportは省略できます。
プロトコルを指定する必要がないのであれば、?transport=XXXも省略できます。

  • UDP
turn:<host>:<port>?transport=udp
  • TCP
turn:<host>:<port>?transport=tcp
  • DTLS-over-UDP
turns:<host>:<port>?transport=udp

RFC7065には "in the future, DTLS-over-UDP"とあるので、この時点ではこの書き方も一応作っておいた、くらいなのでしょう。

  • TLS-over-TCP
turns:<host>:<port>?transport=tcp

参考

  • RFC7064
    • URI Scheme for the Session Traversal Utilities for NAT (STUN) Protocol
  • RFC7065
    • Traversal Using Relays around NAT (TURN) Uniform Resource Identifiers
  • RFC5389
    • Session Traversal Utilities for NAT (STUN)
  • RFC5766
    • Traversal Using Relays around NAT (TURN)
7
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?