STUN 서버란?

STUN 서버 RFC5389

Image for post
Image for post
Image for post
Image for post
class bit 가 00 -> request
class bit 가 01 -> indication
class bit 가 10 -> success response
class bit 가 11 -> error response
Binding Request(class = 00, method = 000000000001) -> hex = 0x0001Binding Response(class = 10, method = 000000000001) -> hex = 0x0101
Image for post
Image for post
Comprehension-required range (0x0000-0x7FFF):
0x0000: (Reserved)
0x0001: MAPPED-ADDRESS
0x0002: (Reserved; was RESPONSE-ADDRESS)
0x0003: (Reserved; was CHANGE-ADDRESS)
0x0004: (Reserved; was SOURCE-ADDRESS)
0x0005: (Reserved; was CHANGED-ADDRESS)
0x0006: USERNAME
0x0007: (Reserved; was PASSWORD)
0x0008: MESSAGE-INTEGRITY
0x0009: ERROR-CODE
0x000A: UNKNOWN-ATTRIBUTES
0x000B: (Reserved; was REFLECTED-FROM)
0x0014: REALM
0x0015: NONCE
0x0020: XOR-MAPPED-ADDRESS

Comprehension-optional range (0x8000-0xFFFF)
0x8022: SOFTWARE
0x8023: ALTERNATE-SERVER
0x8028: FINGERPRINT
Image for post
Image for post
Image for post
Image for post
00 01 00 00 21 12 A4 42 6A 54 44 79 57 6F 42 62 37 30 36 48
01 01 00 0C 21 12 A4 42 6A 54 44 79 57 6F 42 62 37 30 36 48 XX XX XX
XX XX XX XX XX XX XX XX XX -- attribute 는 데이터는 XX처리 했다.
Image for post
Image for post

Written by

엘디는 사랑입니다.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store