{"id":340845,"date":"2022-11-06T21:00:25","date_gmt":"2022-11-06T21:00:25","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=340845"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=340845","title":{"rendered":"<span>Apple HomeKit<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0435\u0442 \u043f\u0440\u043e Apple HomeKit Accessory Protocol (HAP): \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430.<\/p>\n<p>Apple HomeKit \u0441\u043e\u0437\u0434\u0430\u043d \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e iOS-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Home) \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432(\u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u043e\u0432). \u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u043e\u0442\u043a\u0440\u044b\u0442 \u0434\u043b\u044f \u043d\u0435\u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441 \u0441\u0430\u0439\u0442\u0430 Apple. \u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e open-source \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0438 \u043a\u043e\u0433\u0434\u0430 \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u043f\u0440\u043e HomeKit \u043d\u0430 \u043a\u0430\u043a\u043e\u043c-\u043d\u0438\u0431\u0443\u043b\u044c Raspberry Pi \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 <a href=\"https:\/\/github.com\/homebridge\/homebridge\" rel=\"noopener noreferrer nofollow\">homebridge<\/a> \u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0445 \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u043e\u0432.<\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0436\u0435 \u0437\u0430\u0434\u0430\u0447\u0430 &#8212; \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 &#8212; \u043d\u0435 \u0442\u0430\u043a\u0430\u044f \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u0430\u044f \u0438 \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u043b\u0438\u0448\u044c <a href=\"https:\/\/pypi.org\/project\/homekit\/\" rel=\"noopener noreferrer nofollow\">pypi.org\/project\/homekit\/<\/a>.<\/p>\n<p>\u041f\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u0443 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u0430\u043c\u0438 \u0441 Android-\u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0435\u0435 \u0440\u0435\u0448\u0438\u0442\u044c. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441 IP-\u0441\u0435\u0442\u044f\u043c\u0438, \u0431\u0435\u0437 Bluetooth. <\/p>\n<h3>\u041a\u0430\u043a \u044d\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c?<\/h3>\n<ol>\n<li>\n<p>\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u0430\u043c\u0438, \u0438\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c. \u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0440\u0435\u043a\u043b\u0430\u043c\u0438\u0440\u0443\u044e\u0442 \u0441\u0435\u0431\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u043c\u0438 Multicast DNS \u0438 DNS service discovery. <\/p>\n<p>\u0413\u043e\u0432\u043e\u0440\u044f \u043f\u0440\u043e\u0449\u0435, \u043c\u043e\u0436\u043d\u043e \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0432 multicast \u0437\u0430\u043f\u0440\u043e\u0441 _hap._tcp.local \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <em>224.0.0.251<\/em>, \u0438, \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u043e\u0442\u0432\u0435\u0442, \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c DNS \u0437\u0430\u043f\u0438\u0441\u0438 A, SRV, TXT. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e.<\/p>\n<ol start=\"2\">\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u0432\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f: \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0443\u0436\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u044b, \u043b\u0438\u0431\u043e \u0441\u0432\u044f\u0437\u044c (pairing) \u043d\u0430\u0434\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c. \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0448\u0430\u0433\u0443 \/pair-verify, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f, \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0430\u0434\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0448\u0430\u0433 \/pair-setup.<\/p>\n<p>Apple HomeKit \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b Stanford\u02bcs Secure Remote Password (SRP) \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044f (\u043f\u0438\u043d-\u043a\u043e\u0434\u0430). <\/p>\n<ol start=\"3\">\n<li>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u0430\u043c\u0438, \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c\u0438 \u0438 \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<\/li>\n<\/ol>\n<h3>\/pair-setup<\/h3>\n<p>\u041a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u043c\u0443 TCP \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044e. \u0412\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0448\u0430\u0433\u0435 &#8212; \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u0435 HTTP POST \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 \u0442\u0438\u043f\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 application\/pairing+tlv8 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441 \u0442\u0435\u043b\u043e\u043c \u0432 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Type%E2%80%93length%E2%80%93value\" rel=\"noopener noreferrer nofollow\">TLV<\/a>-\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043a\u0440\u0430\u0442\u043a\u043e \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435:<\/p>\n<ul>\n<li>\n<p>M1: \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0432\u044f\u0437\u0438 (SRP Start Request)<\/p>\n<\/li>\n<li>\n<p>M2: \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u0441\u0435\u0441\u0441\u0438\u044e SRP, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0440\u0430\u043d\u0434\u043e\u043c\u044b \u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u0443\u044e \u043f\u0430\u0440\u0443. \u0412 \u043e\u0442\u0432\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0438 \u0441\u043e\u043b\u044c. (SRP Start Response)<\/p>\n<\/li>\n<li>\n<p>M3: \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 (SRP Verify Request). \u041d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u0448\u0430\u0433\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u0432\u043e\u044e \u0441\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u0443\u044e \u043a\u043b\u044e\u0447\u0435\u0432\u0443\u044e \u043f\u0430\u0440\u0443 , \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432\u0432\u0435\u0441\u0442\u0438 \u043f\u0438\u043d-\u043a\u043e\u0434, \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043e\u0431\u0449\u0438\u0439 \u043a\u043b\u044e\u0447 SRP \u0441\u0435\u0441\u0441\u0438\u0438 \u0438 \u043f\u0440\u0443\u0444 (SRP proof). \u0410\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0438 \u043f\u0440\u0443\u0444.<\/p>\n<\/li>\n<li>\n<p>M4: \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043f\u0440\u0443\u0444 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0432\u043e\u0439 \u043f\u0440\u0443\u0444 \u0432 \u043e\u0442\u0432\u0435\u0442 (SRP Verify Response). <\/p>\n<\/li>\n<li>\n<p>M5: \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 -> \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u0443 (\u2018Exchange Request\u02bc). \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043f\u0440\u0443\u0444 \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u0430. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u043b\u0433\u043e\u0441\u0440\u043e\u0447\u043d\u0430\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u043f\u0430\u0440\u0430 (LTPK \u0438 LTSK) \u043d\u0430 \u043a\u0440\u0438\u0432\u043e\u0439 ed25519. \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u044e\u0447 (HKDF) \u0438\u0437 \u0441\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430, \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u0441 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430(iOSDevicePairingID) \u0438 \u0435\u0433\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c (iOSDeviceLTPK), \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u043c LTSK. \u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 TLV-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0448\u0438\u0444\u0440\u0443\u044e\u0442\u0441\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c ChaCha20-Poly1305 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043e\u0431\u0449\u0435\u0433\u043e \u0441\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430. \u0417\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u043f\u044f\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 TLV-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u0443.<\/p>\n<\/li>\n<li>\n<p>M6: \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440 -> \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 (\u2018Exchange Response\u02bc). \u0417\u0434\u0435\u0441\u044c \u0436\u0435 \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e (iOSDeviceLTPK, iOSDevicePairingID), \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u044c. \u0414\u0430\u043b\u0435\u0435, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0432\u043e\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u0434\u043e\u043b\u0433\u043e\u0441\u0440\u043e\u0447\u043d\u044b\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u043f\u043e\u0434\u043f\u0438\u0441\u044c.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0448\u0430\u0433\u043e\u0432 M1-M6, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0438 iOS \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0438 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 (LTPK) \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430 \u043d\u0430 \u0434\u043e\u043b\u0433\u0438\u0439 \u0441\u0440\u043e\u043a.<\/p>\n<h3>\/pair-verify<\/h3>\n<p>\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f. \u0417\u0434\u0435\u0441\u044c \u0436\u0435 \u0448\u0430\u0433\u043e\u0432 \u0443\u0436\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 (M1-M4).<\/p>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a: \u0438 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, \u0438 \u0410\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442 Curve25519 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0430\u0440\u044b, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \u0438 \u0432\u044b\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u044b\u0439 \u043e\u0431\u0449\u0438\u0439 \u043a\u043b\u044e\u0447, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447. \u0414\u043e\u043b\u0433\u043e\u0441\u0440\u043e\u0447\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 (LTPK \u0438 LTSK) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439.<\/p>\n<h3>\u0417\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b pair-verify \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 TCP \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u044b \u0441\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e Keep-Alive HTTP-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 &#171;\u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f&#187; (\u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0432\u0435\u0431\u0441\u043e\u043a\u0435\u0442\u043e\u0432\u0441\u043a\u043e\u043c\u0443 Upgrade) \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e HTTP \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 &#8212; \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u043e\u0442\u0432\u0435\u0442\u044b, \u043d\u043e \u0443\u0436\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 json.<\/p>\n<h3>\u041d\u0430\u0447\u0430\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f: \u0432\u044b\u0431\u043e\u0440<\/h3>\n<p>\u0412\u044b\u0431\u043e\u0440 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043d\u0430 Go \u0438 <a href=\"https:\/\/github.com\/brutella\/hap\" rel=\"noopener noreferrer nofollow\">brutella\/hap<\/a> \u043f\u0430\u043a\u0435\u0442\u0435. \u041c\u043e\u0434\u0443\u043b\u044c \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0438 \u043f\u043b\u0430\u043d\u043e\u0432 \u043d\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u043c\u0443. \u041d\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0442\u043e, \u0447\u0442\u043e \u0432\u0441\u0435 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438.<\/p>\n<p>\u0412 \u043f\u043e\u043b\u044c\u0437\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 Go \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e \u0438 \u0442\u043e, \u0447\u0442\u043e \u043d\u0430 \u043d\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0434\u043b\u044f Android (<a href=\"https:\/\/fyne.io\" rel=\"noopener noreferrer nofollow\">fyne.io<\/a>, <a href=\"https:\/\/gioui.org\" rel=\"noopener noreferrer nofollow\">gioui.org<\/a>). <\/p>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c \u0444\u043e\u0440\u043a\u043d\u0443\u0442, \u0443\u0434\u0430\u043b\u0435\u043d\u043e \u043b\u0438\u0448\u043d\u0435\u0433\u043e, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430.<\/p>\n<h3>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f:<\/h3>\n<p>\u041f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443, \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 ip-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0431\u0443\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043f\u043e TCP. \u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u0443\u0434\u0430\u0447\u043d\u043e\u0439 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b &#8212; \u044d\u0442\u043e http, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u043e\u0434\u043d\u0443\u044e \u0434\u043b\u044f Go \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e http.Client. \u0412\u043e\u0437\u043d\u0438\u043a \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u0430\u043a \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043e\u0431\u044b\u0447\u043d\u044b\u043c TCP-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435\u043c? \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 RoundTripper:<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"go\">func (c *conn) RoundTrip(req *http.Request) (*http.Response, error) {   err := req.Write(c)   if err != nil {     return nil, err   }   if c.inBackground {     res := &lt;-c.response     return res, nil   }   rd := bufio.NewReader(c)   res, err := http.ReadResponse(rd, nil)   if err != nil {     return nil, err   }    return res, nil } <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0442\u044c http.Client \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e:<\/p>\n<pre><code class=\"go\">d.httpc = &amp;http.Client{ Transport: c, }      \/\/ \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c: res, err := d.httpc.Get(\"\/accessories\")     ...<\/code><\/pre>\n<ol start=\"3\">\n<li>\n<p>\u0418 \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435. \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043a\u043e\u0434 \u0432\u044b\u0448\u0435, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u043d\u0430 \u0444\u043b\u0430\u0433 inBackground. \u0412\u0435\u0434\u044c \u043c\u043e\u0436\u043d\u043e \u0436\u0435 \u0431\u044b\u043b\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u043e\u0434\u043d\u0438\u043c http.ReadResponse. \u0418 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 pair-setup \u0438 pair-verify \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0443\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0439 \u0441\u0435\u0441\u0441\u0438\u0438. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u044b \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u0418 \u0442\u0430\u043a\u0438\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0442\u0430\u043a:<\/p>\n<\/li>\n<\/ol>\n<pre><code>EVENT\/1.0 200 OK Content-Type: application\/hap+json Content-Length: &lt;length> {   \u201dcharacteristics\u201d : [{     \u201daid\u201d : 1,     \u201diid\u201d : 4,     \u201dvalue\u201d : 23.0   }] }<\/code><\/pre>\n<p>\u0427\u0442\u043e \u043c\u044b \u0438\u043c\u0435\u0435\u043c? \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u0434\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0446\u0438\u043a\u043b\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f. \u0412\u043e \u0432\u0442\u043e\u0440\u044b\u0445, http.ReadResponse \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441 \u043d\u0438\u043c \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 EVENT &#8212; \u043d\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0434\u043b\u044f http \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a.<\/p>\n<p>\u0421 \u043f\u0435\u0440\u0432\u044b\u043c \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e &#8212; \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0433\u043e\u0440\u0443\u0442\u0438\u043d\u0443, \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<pre><code class=\"go\">func (c *conn) backgroundRead() { rd := bufio.NewReader(c)  for { b, err := rd.Peek(len(eventHeader)) \/\/ len of EVENT string if err != nil { fmt.Println(err) if errors.Is(err, io.EOF) { return } continue } if string(b) == eventHeader {       \/\/ \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f       \/\/ \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435 (\u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c EVENT \u043d\u0430 HTTP)       \/\/ \u0447\u0438\u0442\u0430\u0435\u043c \u0441 res := http.ReadResponse()       \/\/ \u0447\u0438\u0442\u0430\u0435\u043c all := io.ReadAll(res.Body)       \/\/ \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c res.Body = io.NopCloser(bytes.NewReader(all))       \/\/ \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043b\u0431\u044d\u043a     } else {       \/\/ \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0442\u0432\u0435\u0442\u0430       \/\/ \u0447\u0438\u0442\u0430\u0435\u043c \u0441 res := http.ReadResponse()       \/\/ \u0447\u0438\u0442\u0430\u0435\u043c all := io.ReadAll(res.Body)       \/\/ \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c res.Body = io.NopCloser(bytes.NewReader(all))     }   } }<\/code><\/pre>\n<p>\u041a\u0430\u0436\u0434\u0443\u044e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043d\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0441 EVENT \u0438 \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 &#8212; &#171;\u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c&#187; &#8212; \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c EVENT \u043d\u0430 HTTP \u0434\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c http.ReadResponse. \u0414\u043b\u044f \u0437\u0430\u043c\u0435\u043d\u044b \u043f\u0438\u0448\u0435\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 io.Reader. <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u0448\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 (\u0434\u043b\u0438\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442) \u043f\u0440\u0438 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0446\u0438\u043a\u043b\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u043d\u0430 \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a HTTP. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e ReadResponse \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442 \u0441 \u043f\u043e\u043b\u0435\u043c Body, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u0447\u0438\u0442\u0430\u043d\u044b, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0435 \u0447\u0438\u0442\u0430\u043d\u044b \u043e\u043d\u0438 \u0438 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0438. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 &#8212; \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e res.Body \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044e.<\/p>\n<h3>\u0413\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0431\u0440\u043e\u0441\u043a\u0430 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c <a href=\"http:\/\/gioui.org\" rel=\"noopener noreferrer nofollow\">gioui.org<\/a>. \u041d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0435\u0431\u043e\u0433\u0430\u0442\u043e &#8212; \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f, \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u0430\u043c\u0438 \u0440\u0435\u043b\u0435 \u0438 \u043b\u0430\u043c\u043f\u0430\u043c\u0438 (\u0412\u043a\u043b-\u0412\u044b\u043a\u043b). <\/p>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0430\u0441\u044c \u0432 \u043f\u0430\u0440\u0435 \u0441 homebridge.<\/p>\n<p>PS: \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043d\u0430 Android, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u043d\u0438 \u043e\u0434\u043d\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e. <\/p>\n<pre><code>avc: denied { bind } for scontext=u:r:untrusted_app:s0:c31,c257,c512,c768 tcontext=u:r:untrusted_app:s0:c31,c257,c512,c768 tclass=netlink_route_socket permissive=0 b\/155595000 app=localhost.hkapp<\/code><\/pre>\n<h3>\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<ol>\n<li>\n<p><a href=\"https:\/\/github.com\/hkontrol\/hkontroller\" rel=\"noopener noreferrer nofollow\">github.com\/hkontrol\/hkontroller<\/a> \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/hkontrol\/hkapp\" rel=\"noopener noreferrer nofollow\">github.com\/hkontrol\/hkapp<\/a> \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<\/p>\n<\/li>\n<\/ol>\n<p>\u0417\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 open-source \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0443\u0447\u0430\u0441\u0442\u0438\u0435.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/697692\/\"> https:\/\/habr.com\/ru\/post\/697692\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0435\u0442 \u043f\u0440\u043e Apple HomeKit Accessory Protocol (HAP): \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430.<\/p>\n<p>Apple HomeKit \u0441\u043e\u0437\u0434\u0430\u043d \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e iOS-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Home) \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432(\u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u043e\u0432). \u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u043e\u0442\u043a\u0440\u044b\u0442 \u0434\u043b\u044f \u043d\u0435\u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441 \u0441\u0430\u0439\u0442\u0430 Apple. \u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e open-source \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0438 \u043a\u043e\u0433\u0434\u0430 \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u043f\u0440\u043e HomeKit \u043d\u0430 \u043a\u0430\u043a\u043e\u043c-\u043d\u0438\u0431\u0443\u043b\u044c Raspberry Pi \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 <a href=\"https:\/\/github.com\/homebridge\/homebridge\" rel=\"noopener noreferrer nofollow\">homebridge<\/a> \u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0445 \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u043e\u0432.<\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0436\u0435 \u0437\u0430\u0434\u0430\u0447\u0430 &#8212; \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 &#8212; \u043d\u0435 \u0442\u0430\u043a\u0430\u044f \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u0430\u044f \u0438 \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u043b\u0438\u0448\u044c <a href=\"https:\/\/pypi.org\/project\/homekit\/\" rel=\"noopener noreferrer nofollow\">pypi.org\/project\/homekit\/<\/a>.<\/p>\n<p>\u041f\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u0443 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u0430\u043c\u0438 \u0441 Android-\u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0435\u0435 \u0440\u0435\u0448\u0438\u0442\u044c. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441 IP-\u0441\u0435\u0442\u044f\u043c\u0438, \u0431\u0435\u0437 Bluetooth. <\/p>\n<h3>\u041a\u0430\u043a \u044d\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c?<\/h3>\n<ol>\n<li>\n<p>\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u0430\u043c\u0438, \u0438\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c. \u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0440\u0435\u043a\u043b\u0430\u043c\u0438\u0440\u0443\u044e\u0442 \u0441\u0435\u0431\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u043c\u0438 Multicast DNS \u0438 DNS service discovery. <\/p>\n<p>\u0413\u043e\u0432\u043e\u0440\u044f \u043f\u0440\u043e\u0449\u0435, \u043c\u043e\u0436\u043d\u043e \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0432 multicast \u0437\u0430\u043f\u0440\u043e\u0441 _hap._tcp.local \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <em>224.0.0.251<\/em>, \u0438, \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u043e\u0442\u0432\u0435\u0442, \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c DNS \u0437\u0430\u043f\u0438\u0441\u0438 A, SRV, TXT. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e.<\/p>\n<ol start=\"2\">\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u0432\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f: \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0443\u0436\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u044b, \u043b\u0438\u0431\u043e \u0441\u0432\u044f\u0437\u044c (pairing) \u043d\u0430\u0434\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c. \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0448\u0430\u0433\u0443 \/pair-verify, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f, \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0430\u0434\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0448\u0430\u0433 \/pair-setup.<\/p>\n<p>Apple HomeKit \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b Stanford\u02bcs Secure Remote Password (SRP) \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044f (\u043f\u0438\u043d-\u043a\u043e\u0434\u0430). <\/p>\n<ol start=\"3\">\n<li>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u0430\u043c\u0438, \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c\u0438 \u0438 \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<\/li>\n<\/ol>\n<h3>\/pair-setup<\/h3>\n<p>\u041a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u043c\u0443 TCP \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044e. \u0412\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0448\u0430\u0433\u0435 &#8212; \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u0435 HTTP POST \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 \u0442\u0438\u043f\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 application\/pairing+tlv8 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441 \u0442\u0435\u043b\u043e\u043c \u0432 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Type%E2%80%93length%E2%80%93value\" rel=\"noopener noreferrer nofollow\">TLV<\/a>-\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043a\u0440\u0430\u0442\u043a\u043e \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435:<\/p>\n<ul>\n<li>\n<p>M1: \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0432\u044f\u0437\u0438 (SRP Start Request)<\/p>\n<\/li>\n<li>\n<p>M2: \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u0441\u0435\u0441\u0441\u0438\u044e SRP, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0440\u0430\u043d\u0434\u043e\u043c\u044b \u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u0443\u044e \u043f\u0430\u0440\u0443. \u0412 \u043e\u0442\u0432\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0438 \u0441\u043e\u043b\u044c. (SRP Start Response)<\/p>\n<\/li>\n<li>\n<p>M3: \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 (SRP Verify Request). \u041d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u0448\u0430\u0433\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u0432\u043e\u044e \u0441\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u0443\u044e \u043a\u043b\u044e\u0447\u0435\u0432\u0443\u044e \u043f\u0430\u0440\u0443 , \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432\u0432\u0435\u0441\u0442\u0438 \u043f\u0438\u043d-\u043a\u043e\u0434, \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043e\u0431\u0449\u0438\u0439 \u043a\u043b\u044e\u0447 SRP \u0441\u0435\u0441\u0441\u0438\u0438 \u0438 \u043f\u0440\u0443\u0444 (SRP proof). \u0410\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0438 \u043f\u0440\u0443\u0444.<\/p>\n<\/li>\n<li>\n<p>M4: \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043f\u0440\u0443\u0444 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0432\u043e\u0439 \u043f\u0440\u0443\u0444 \u0432 \u043e\u0442\u0432\u0435\u0442 (SRP Verify Response). <\/p>\n<\/li>\n<li>\n<p>M5: \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 -> \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u0443 (\u2018Exchange Request\u02bc). \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043f\u0440\u0443\u0444 \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u0430. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u043b\u0433\u043e\u0441\u0440\u043e\u0447\u043d\u0430\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u043f\u0430\u0440\u0430 (LTPK \u0438 LTSK) \u043d\u0430 \u043a\u0440\u0438\u0432\u043e\u0439 ed25519. \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u044e\u0447 (HKDF) \u0438\u0437 \u0441\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430, \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u0441 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430(iOSDevicePairingID) \u0438 \u0435\u0433\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c (iOSDeviceLTPK), \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u043c LTSK. \u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 TLV-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0448\u0438\u0444\u0440\u0443\u044e\u0442\u0441\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c ChaCha20-Poly1305 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043e\u0431\u0449\u0435\u0433\u043e \u0441\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430. \u0417\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u043f\u044f\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 TLV-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u0443.<\/p>\n<\/li>\n<li>\n<p>M6: \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440 -> \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 (\u2018Exchange Response\u02bc). \u0417\u0434\u0435\u0441\u044c \u0436\u0435 \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e (iOSDeviceLTPK, iOSDevicePairingID), \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u044c. \u0414\u0430\u043b\u0435\u0435, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0432\u043e\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u0434\u043e\u043b\u0433\u043e\u0441\u0440\u043e\u0447\u043d\u044b\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u043f\u043e\u0434\u043f\u0438\u0441\u044c.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0448\u0430\u0433\u043e\u0432 M1-M6, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0438 iOS \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0438 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 (LTPK) \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430 \u043d\u0430 \u0434\u043e\u043b\u0433\u0438\u0439 \u0441\u0440\u043e\u043a.<\/p>\n<h3>\/pair-verify<\/h3>\n<p>\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f. \u0417\u0434\u0435\u0441\u044c \u0436\u0435 \u0448\u0430\u0433\u043e\u0432 \u0443\u0436\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 (M1-M4).<\/p>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a: \u0438 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, \u0438 \u0410\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442 Curve25519 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0430\u0440\u044b, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \u0438 \u0432\u044b\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u044b\u0439 \u043e\u0431\u0449\u0438\u0439 \u043a\u043b\u044e\u0447, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447. \u0414\u043e\u043b\u0433\u043e\u0441\u0440\u043e\u0447\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 (LTPK \u0438 LTSK) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439.<\/p>\n<h3>\u0417\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b pair-verify \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 TCP \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u044b \u0441\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e Keep-Alive HTTP-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 &#171;\u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f&#187; (\u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0432\u0435\u0431\u0441\u043e\u043a\u0435\u0442\u043e\u0432\u0441\u043a\u043e\u043c\u0443 Upgrade) \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e HTTP \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 &#8212; \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u043e\u0442\u0432\u0435\u0442\u044b, \u043d\u043e \u0443\u0436\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 json.<\/p>\n<h3>\u041d\u0430\u0447\u0430\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f: \u0432\u044b\u0431\u043e\u0440<\/h3>\n<p>\u0412\u044b\u0431\u043e\u0440 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043d\u0430 Go \u0438 <a href=\"https:\/\/github.com\/brutella\/hap\" rel=\"noopener noreferrer nofollow\">brutella\/hap<\/a> \u043f\u0430\u043a\u0435\u0442\u0435. \u041c\u043e\u0434\u0443\u043b\u044c \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0438 \u043f\u043b\u0430\u043d\u043e\u0432 \u043d\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u043c\u0443. \u041d\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0442\u043e, \u0447\u0442\u043e \u0432\u0441\u0435 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438.<\/p>\n<p>\u0412 \u043f\u043e\u043b\u044c\u0437\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 Go \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e \u0438 \u0442\u043e, \u0447\u0442\u043e \u043d\u0430 \u043d\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0434\u043b\u044f Android (<a href=\"https:\/\/fyne.io\" rel=\"noopener noreferrer nofollow\">fyne.io<\/a>, <a href=\"https:\/\/gioui.org\" rel=\"noopener noreferrer nofollow\">gioui.org<\/a>). <\/p>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c \u0444\u043e\u0440\u043a\u043d\u0443\u0442, \u0443\u0434\u0430\u043b\u0435\u043d\u043e \u043b\u0438\u0448\u043d\u0435\u0433\u043e, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430.<\/p>\n<h3>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f:<\/h3>\n<p>\u041f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443, \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 ip-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0431\u0443\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043f\u043e TCP. \u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u0443\u0434\u0430\u0447\u043d\u043e\u0439 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b &#8212; \u044d\u0442\u043e http, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u043e\u0434\u043d\u0443\u044e \u0434\u043b\u044f Go \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e http.Client. \u0412\u043e\u0437\u043d\u0438\u043a \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u0430\u043a \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043e\u0431\u044b\u0447\u043d\u044b\u043c TCP-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435\u043c? \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 RoundTripper:<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"go\">func (c *conn) RoundTrip(req *http.Request) (*http.Response, error) {   err := req.Write(c)   if err != nil {     return nil, err   }   if c.inBackground {     res := &lt;-c.response     return res, nil   }   rd := bufio.NewReader(c)   res, err := http.ReadResponse(rd, nil)   if err != nil {     return nil, err   }    return res, nil } <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0442\u044c http.Client \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e:<\/p>\n<pre><code class=\"go\">d.httpc = &amp;http.Client{ Transport: c, }      \/\/ \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c: res, err := d.httpc.Get(\"\/accessories\")     ...<\/code><\/pre>\n<ol start=\"3\">\n<li>\n<p>\u0418 \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435. \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043a\u043e\u0434 \u0432\u044b\u0448\u0435, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u043d\u0430 \u0444\u043b\u0430\u0433 inBackground. \u0412\u0435\u0434\u044c \u043c\u043e\u0436\u043d\u043e \u0436\u0435 \u0431\u044b\u043b\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u043e\u0434\u043d\u0438\u043c http.ReadResponse. \u0418 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 pair-setup \u0438 pair-verify \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0443\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0439 \u0441\u0435\u0441\u0441\u0438\u0438. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u044b \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u0418 \u0442\u0430\u043a\u0438\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0442\u0430\u043a:<\/p>\n<\/li>\n<\/ol>\n<pre><code>EVENT\/1.0 200 OK Content-Type: application\/hap+json Content-Length: &lt;length> {   \u201dcharacteristics\u201d : [{     \u201daid\u201d : 1,     \u201diid\u201d : 4,     \u201dvalue\u201d : 23.0   }] }<\/code><\/pre>\n<p>\u0427\u0442\u043e \u043c\u044b \u0438\u043c\u0435\u0435\u043c? \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u0434\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0446\u0438\u043a\u043b\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f. \u0412\u043e \u0432\u0442\u043e\u0440\u044b\u0445, http.ReadResponse \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441 \u043d\u0438\u043c \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 EVENT &#8212; \u043d\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0434\u043b\u044f http \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a.<\/p>\n<p>\u0421 \u043f\u0435\u0440\u0432\u044b\u043c \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e &#8212; \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0433\u043e\u0440\u0443\u0442\u0438\u043d\u0443, \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<pre><code class=\"go\">func (c *conn) backgroundRead() { rd := bufio.NewReader(c)  for { b, err := rd.Peek(len(eventHeader)) \/\/ len of EVENT string if err != nil { fmt.Println(err) if errors.Is(err, io.EOF) { return } continue } if string(b) == eventHeader {       \/\/ \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f       \/\/ \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435 (\u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c EVENT \u043d\u0430 HTTP)       \/\/ \u0447\u0438\u0442\u0430\u0435\u043c \u0441 res := http.ReadResponse()       \/\/ \u0447\u0438\u0442\u0430\u0435\u043c all := io.ReadAll(res.Body)       \/\/ \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c res.Body = io.NopCloser(bytes.NewReader(all))       \/\/ \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043b\u0431\u044d\u043a     } else {       \/\/ \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0442\u0432\u0435\u0442\u0430       \/\/ \u0447\u0438\u0442\u0430\u0435\u043c \u0441 res := http.ReadResponse()       \/\/ \u0447\u0438\u0442\u0430\u0435\u043c all := io.ReadAll(res.Body)       \/\/ \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c res.Body = io.NopCloser(bytes.NewReader(all))     }   } }<\/code><\/pre>\n<p>\u041a\u0430\u0436\u0434\u0443\u044e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043d\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0441 EVENT \u0438 \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 &#8212; &#171;\u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c&#187; &#8212; \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c EVENT \u043d\u0430 HTTP \u0434\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c http.ReadResponse. \u0414\u043b\u044f \u0437\u0430\u043c\u0435\u043d\u044b \u043f\u0438\u0448\u0435\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 io.Reader. <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u0448\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 (\u0434\u043b\u0438\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442) \u043f\u0440\u0438 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0446\u0438\u043a\u043b\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u043d\u0430 \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a HTTP. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e ReadResponse \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442 \u0441 \u043f\u043e\u043b\u0435\u043c Body, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u0447\u0438\u0442\u0430\u043d\u044b, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0435 \u0447\u0438\u0442\u0430\u043d\u044b \u043e\u043d\u0438 \u0438 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0438. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 &#8212; \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e res.Body \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044e.<\/p>\n<h3>\u0413\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0431\u0440\u043e\u0441\u043a\u0430 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c <a href=\"http:\/\/gioui.org\" rel=\"noopener noreferrer nofollow\">gioui.org<\/a>. \u041d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0435\u0431\u043e\u0433\u0430\u0442\u043e &#8212; \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f, \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0430\u043a\u0441\u0435\u0441\u0441\u0443\u0430\u0440\u0430\u043c\u0438 \u0440\u0435\u043b\u0435 \u0438 \u043b\u0430\u043c\u043f\u0430\u043c\u0438 (\u0412\u043a\u043b-\u0412\u044b\u043a\u043b). <\/p>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0430\u0441\u044c \u0432 \u043f\u0430\u0440\u0435 \u0441 homebridge.<\/p>\n<p>PS: \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043d\u0430 Android, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u043d\u0438 \u043e\u0434\u043d\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e. <\/p>\n<pre><code>avc: denied { bind } for scontext=u:r:untrusted_app:s0:c31,c257,c512,c768 tcontext=u:r:untrusted_app:s0:c31,c257,c512,c768 tclass=netlink_route_socket permissive=0 b\/155595000 app=localhost.hkapp<\/code><\/pre>\n<h3>\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<ol>\n<li>\n<p><a href=\"https:\/\/github.com\/hkontrol\/hkontroller\" rel=\"noopener noreferrer nofollow\">github.com\/hkontrol\/hkontroller<\/a> \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/hkontrol\/hkapp\" rel=\"noopener noreferrer nofollow\">github.com\/hkontrol\/hkapp<\/a> \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<\/p>\n<\/li>\n<\/ol>\n<p>\u0417\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 open-source \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0443\u0447\u0430\u0441\u0442\u0438\u0435.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/697692\/\"> https:\/\/habr.com\/ru\/post\/697692\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-340845","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/340845","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=340845"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/340845\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=340845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=340845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=340845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}