{"id":401518,"date":"2024-06-29T15:54:55","date_gmt":"2024-06-29T15:54:55","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=401518"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=401518","title":{"rendered":"<span>\u041f\u0438\u0448\u0435\u043c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 ActivityPub-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043d\u0443\u043b\u044f<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f, \u043d\u0430 \u0444\u043e\u043d\u0435 <a href=\"https:\/\/habr.com\/ru\/news\/t\/695038\/\">\u043f\u043e\u043a\u0443\u043f\u043a\u0438 Twitter \u0418\u043b\u043e\u043d\u043e\u043c \u041c\u0430\u0441\u043a\u043e\u043c<\/a>, \u043b\u044e\u0434\u0438 \u043d\u0430\u0447\u0430\u043b\u0438 \u0438\u0441\u043a\u0430\u0442\u044c \u0435\u043c\u0443 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b \u2014 \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u043d\u0430\u0448\u043b\u0438 \u0442\u0430\u043a\u0443\u044e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0443 \u0432 <a href=\"https:\/\/joinmastodon.org\" rel=\"nofollow noopener noreferrer\">Mastodon<\/a>.<\/p>\n<p>  Mastodon \u2014 \u044d\u0442\u043e \u0434\u0435\u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u0442\u044c, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0430\u044f \u043f\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u0438, \u043a\u0430\u043a email. \u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/en.wikipedia.org\/wiki\/ActivityPub\" rel=\"nofollow noopener noreferrer\">ActivityPub<\/a> \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c W3C, \u0430 Mastodon \u2014 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, \u043d\u043e \u0441\u0430\u043c\u0430\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f. \u0420\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c, \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0438\u0445 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0423 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u0438 \u043c\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 ActivityPub-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u2014 <a href=\"https:\/\/github.com\/grishka\/Smithereen\" rel=\"nofollow noopener noreferrer\">Smithereen<\/a>, \u0442\u0430\u043a\u043e\u0439 \u0437\u0435\u043b\u0451\u043d\u044b\u0439 \u0434\u0435\u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0412\u041a, \u0433\u0434\u0435 \u044f \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0442\u0430\u043a\u0438 \u0432\u0435\u0440\u043d\u0443 \u0441\u0442\u0435\u043d\u0443.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/kq\/ri\/oz\/kqrioz66ypqvgnnd3cma7r8cyau.png\" data-src=\"https:\/\/habrastorage.org\/webt\/kq\/ri\/oz\/kqrioz66ypqvgnnd3cma7r8cyau.png\"\/><\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u044b \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 ActivityPub \u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0443\u044e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u0441\u0442\u044b \u0432 \u0441\u0435\u0442\u044c (\u00abfediverse\u00bb), \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0442 \u043d\u0438\u0445 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0427\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0442\u0430\u043a\u043e\u0435 ActivityPub?<\/h2>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/wd\/3e\/ht\/wd3ehtbwo0w8fzc25dbawae4m1q.png\" data-src=\"https:\/\/habrastorage.org\/webt\/wd\/3e\/ht\/wd3ehtbwo0w8fzc25dbawae4m1q.png\"\/><\/p>\n<p>  \u0412\u043e\u043e\u0431\u0449\u0435, \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e <a href=\"https:\/\/www.w3.org\/TR\/activitypub\/\" rel=\"nofollow noopener noreferrer\">\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<\/a>, ActivityPub \u0431\u044b\u0432\u0430\u0435\u0442 \u0434\u0432\u0443\u0445 \u0432\u0438\u0434\u043e\u0432: \u043c\u0435\u0436\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439. \u041a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u0440\u0430\u0437\u043d\u043e\u0432\u0438\u0434\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u0430\u044f \u0438 \u043d\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u044e\u0437\u0430\u0431\u0435\u043b\u044c\u043d\u0430\u044f \u043d\u0430 \u043d\u0435\u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435, \u0434\u0430 \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0435\u0451 \u043d\u0438\u043a\u0442\u043e \u0442\u043e\u043b\u043a\u043e\u043c \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442, \u0442\u0430\u043a \u0447\u0442\u043e \u043c\u044b \u0435\u0451 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c.<\/p>\n<p>  ActivityPub \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439:<\/p>\n<ul>\n<li><b>\u0410\u043a\u0442\u043e\u0440\u044b<\/b> \u2014 \u043e\u0431\u044a\u0435\u043a\u0442\u044b (\u0438\u043b\u0438 \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u044b?), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0438\u043b\u0438 \u0433\u0440\u0443\u043f\u043f\u044b. \u041e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0430\u0434\u0440\u0435\u0441\u043e\u043c (URL), \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043b\u0435\u0436\u0438\u0442 JSON-\u043e\u0431\u044a\u0435\u043a\u0442 \u0430\u043a\u0442\u043e\u0440\u0430.<\/li>\n<li><b>\u0410\u043a\u0442\u0438\u0432\u0438\u0442\u0438<\/b> \u2014 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0441\u043e\u0431\u043e\u0439 \u044d\u0442\u0438 \u0441\u0430\u043c\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0432\u0438\u0434\u0430 \u00ab\u0412\u0430\u0441\u044f \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b \u043f\u043e\u0441\u0442\u00bb.<\/li>\n<li><b>\u0418\u043d\u0431\u043e\u043a\u0441<\/b> \u2014 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044d\u0442\u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f. \u0415\u0433\u043e \u0430\u0434\u0440\u0435\u0441 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u043b\u0435 <code>inbox<\/code> \u0443 \u0430\u043a\u0442\u043e\u0440\u0430.<\/li>\n<\/ul>\n<p>  \u0412\u0441\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e JSON \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u043e\u0439. <s>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044d\u0442\u043e \u0441\u043b\u0435\u0433\u043a\u0430 \u043f\u0440\u043e\u043a\u043b\u044f\u0442\u044b\u0439 JSON-LD \u0441 \u043d\u0435\u0439\u043c\u0441\u043f\u0435\u0439\u0441\u0430\u043c\u0438, \u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u043d\u0443\u0436\u0434 \u043d\u0430 \u043d\u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0431\u0438\u0442\u044c.<\/s> \u041e\u0431\u044a\u0435\u043a\u0442\u044b ActivityPub \u0438\u043c\u0435\u044e\u0442 mime-\u0442\u0438\u043f <code>application\/ld+json; profile=\"https:\/\/www.w3.org\/ns\/activitystreams\"<\/code> \u0438\u043b\u0438 <code>application\/activity+json<\/code>.<\/p>\n<p>  \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u044d\u0442\u043e \u0432\u0441\u0451 \u0442\u0430\u043a: <b>\u0430\u043a\u0442\u043e\u0440<\/b> \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 <b>\u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438<\/b> \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u0430\u043a\u0442\u043e\u0440\u0443 \u0432 <b>\u0438\u043d\u0431\u043e\u043a\u0441<\/b>, \u0430 \u0442\u043e\u0442 \u0435\u0451 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0438 \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0441 \u043d\u0435\u0439 \u0434\u0435\u043b\u0430\u0435\u0442. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043b\u0430\u0434\u0451\u0442 \u043d\u043e\u0432\u044b\u0439 \u043f\u043e\u0441\u0442 \u0432 \u0441\u0432\u043e\u044e \u0411\u0414, \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 \u043e\u0442\u0432\u0435\u0442 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u00ab\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u043f\u0440\u0438\u043d\u044f\u0442\u0430\u00bb. \u0421\u0430\u043c\u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f post-\u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u044c\u044e \u043a\u043b\u044e\u0447\u043e\u043c \u0430\u043a\u0442\u043e\u0440\u0430 (\u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0430\u043a\u0442\u043e\u0440\u0430 \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430 RSA-\u043a\u043b\u044e\u0447\u0435\u0439 \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438).<\/p>\n<p>  \u0412 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b <a href=\"https:\/\/www.rfc-editor.org\/rfc\/rfc7033\" rel=\"nofollow noopener noreferrer\">WebFinger<\/a> \u0434\u043b\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0445 \u044e\u0437\u0435\u0440\u043d\u0435\u0439\u043c\u043e\u0432 \u0432\u0438\u0434\u0430 <code>@vasya@example.social<\/code> \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u0432\u0438\u0434\u0430 <code>https:\/\/example.social\/users\/vasya<\/code>. Mastodon \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044d\u0442\u043e \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0435\u043c\u0443 \u0434\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0430\u043a\u0442\u043e\u0440\u0430 \u00af\\_(\u30c4)_\/\u00af<\/p>\n<h2>\u0427\u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u043c\u0435\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u0443\u0447\u0430\u0441\u0442\u0438\u044f \u0432 \u0444\u0435\u0434\u0438\u0432\u0451\u0440\u0441\u0435?<\/h2>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441 \u0432\u0430\u0448\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0438\u0437 Mastodon \u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0433\u043e \u041f\u041e, \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ol>\n<li><b>\u041e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0430\u043a\u0442\u043e\u0440\u0430<\/b> \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u043f\u043e\u043b\u0435\u0439: ID, inbox, \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u044e\u0437\u0435\u0440\u043d\u0435\u0439\u043c, \u0442\u0438\u043f Person.<\/li>\n<li><b>\u041e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430 webfinger-\u0437\u0430\u043f\u0440\u043e\u0441\u044b<\/b> \u0441 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430 <code>\/.well-known\/webfinger<\/code>. Mastodon \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0430\u0448\u0435\u0433\u043e \u0430\u043a\u0442\u043e\u0440\u0430.<\/li>\n<li><b>\u0420\u0430\u0441\u0441\u044b\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0430\u043c<\/b> \u0438 \u043a\u043e\u043c\u0443 \u0443\u0433\u043e\u0434\u043d\u043e \u0435\u0449\u0451, \u043a\u043e\u043c\u0443 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c, \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u043c \u0432 \u043f\u043e\u0441\u0442\u0435.<\/li>\n<li><b>\u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c POST-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 inbox<\/b> \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0438\u0445 \u043f\u043e\u0434\u043f\u0438\u0441\u0438. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0445\u0432\u0430\u0442\u0438\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 4 \u0442\u0438\u043f\u043e\u0432 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438: Follow, Undo{Follow}, Accept{Follow} \u0438 Create{Note}.<\/li>\n<li>\u041f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 Follow, <b>\u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043d\u043e\u0432\u043e\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0435<\/b> \u043a\u0443\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u0430 \u0434\u0438\u0441\u043a, <b>\u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0435\u043c\u0443 Accept{Follow}<\/b> \u0438 \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0435\u043c\u0443 \u0432\u0441\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u0441\u0442\u043e\u0432.<\/li>\n<li>\u0410 \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 Undo{Follow} \u2014 <b>\u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430<\/b> (\u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e).<\/li>\n<li>\u041a\u0440\u0430\u0439\u043d\u0435 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u043d\u0435 \u0441\u0442\u0440\u043e\u0433\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, <b>\u0438\u043c\u0435\u0442\u044c \u0443\u0440\u043b\u044b \u0434\u043b\u044f \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0441\u0442\u043e\u0432<\/b>, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u0442\u0434\u0430\u0451\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442 Note, \u0447\u0442\u043e\u0431\u044b \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0432\u0441\u0442\u0430\u0432\u0438\u0432 \u0430\u0434\u0440\u0435\u0441 \u0432 \u043f\u043e\u043b\u0435 \u043f\u043e\u0438\u0441\u043a\u0430.<\/li>\n<\/ol>\n<h2>\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u044c<\/h2>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0443\u043d\u043a\u0442 \u0432 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u0445 \u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043a\u043e\u0434\u0430. \u041c\u043e\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043d\u0430 Java, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e \u043c\u043e\u0439 \u0440\u043e\u0434\u043d\u043e\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043b\u0438\u0431\u043e \u0442\u044b\u043a\u0430\u0442\u044c \u0432 \u043c\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u043b\u0438\u0431\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0430\u043c\u0438 \u043f\u043e \u043e\u0431\u0440\u0430\u0437\u0443 \u0438 \u043f\u043e\u0434\u043e\u0431\u0438\u044e \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u043c \u0441\u0442\u0435\u043a\u0435. \u0412\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043e\u043c\u0435\u043d \u0438 HTTPS-\u0441\u0435\u0440\u0432\u0435\u0440\/\u043f\u0440\u043e\u043a\u0441\u0438 \u2014 \u043b\u0438\u0431\u043e \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c <a href=\"https:\/\/ngrok.com\" rel=\"nofollow noopener noreferrer\">ngrok<\/a>, \u043b\u0438\u0431\u043e \u0432\u0430\u0448 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439.<\/p>\n<p>  \u0423 \u043c\u043e\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0434\u0432\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438: <a href=\"https:\/\/sparkjava.com\" rel=\"nofollow noopener noreferrer\">\u043c\u0438\u043a\u0440\u043e-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a Spark<\/a> \u0434\u043b\u044f \u043f\u0440\u0438\u0451\u043c\u0430 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 <a href=\"https:\/\/github.com\/google\/gson\" rel=\"nofollow noopener noreferrer\">Gson<\/a> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 JSON. \u0412\u0435\u0441\u044c \u043a\u043e\u0434 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d <a href=\"https:\/\/github.com\/grishka\/miscellaneous\/tree\/master\/Minimal%20ActivityPub%20server\" rel=\"nofollow noopener noreferrer\">\u0443 \u043c\u0435\u043d\u044f \u043d\u0430 \u0433\u0438\u0442\u0445\u0430\u0431\u0435<\/a>.<\/p>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0439\u0442\u0435 \u043f\u0430\u0440\u0443 RSA-\u043a\u043b\u044e\u0447\u0435\u0439 \u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435 \u0438\u0445 \u0432 \u043f\u0430\u043f\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<pre><code class=\"plaintext\">openssl genrsa 2048 | openssl pkcs8 -topk8 -nocrypt -out private.pem openssl rsa -in private.pem -outform PEM -pubout -out public.pem <\/code><\/pre>\n<h3>\u041e\u0442\u0434\u0430\u0451\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u0430\u043a\u0442\u043e\u0440\u0430<\/h3>\n<p>  \u041f\u043e \u043b\u044e\u0431\u043e\u043c\u0443 \u0443\u0434\u043e\u0431\u043d\u043e\u043c\u0443 \u0432\u0430\u043c \u0430\u0434\u0440\u0435\u0441\u0443 \u043e\u0442\u0434\u0430\u0451\u0442\u0435 JSON-\u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u0438\u0434\u0430:<\/p>\n<pre><code class=\"json\">{   \"@context\": [     \"https:\/\/www.w3.org\/ns\/activitystreams\",     \"https:\/\/w3id.org\/security\/v1\"   ],   \"type\": \"Person\",   \"id\": \"https:\/\/example.social\/users\/vasya\",   \"preferredUsername\": \"vasya\",   \"inbox\": \"https:\/\/example.social\/inbox\",   \"publicKey\": {     \"id\": \"https:\/\/example.social\/users\/vasya#main-key\",     \"owner\": \"https:\/\/example.social\/users\/vasya\",     \"publicKeyPem\": \"-----BEGIN PUBLIC KEY-----\\n...\\n----END PUBLIC KEY----\"   } } <\/code><\/pre>\n<p>  \u041e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e \u0441 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c <code>Content-Type: application\/ld+json; profile=\"https:\/\/www.w3.org\/ns\/activitystreams\"<\/code>. \u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0435\u0439:<\/p>\n<ul>\n<li><code>@context<\/code> \u2014 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 JSON-LD. \u041d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0439\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u0433\u043e, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c. \u041d\u043e \u0435\u0441\u043b\u0438 \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u043f\u0440\u043e \u043d\u0435\u0433\u043e \u043f\u043e\u0431\u043e\u043b\u044c\u0448\u0435, \u0442\u043e <a href=\"https:\/\/ru.wikipedia.org\/wiki\/JSON-LD\" rel=\"nofollow noopener noreferrer\">\u0432\u043e\u0442<\/a> \u0438 <a href=\"https:\/\/json-ld.org\" rel=\"nofollow noopener noreferrer\">\u0432\u043e\u0442<\/a>.<\/li>\n<li><code>type<\/code> \u2014 \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442\u0430. Person \u2014 \u043b\u0438\u0447\u043d\u044b\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430. \u0411\u044b\u0432\u0430\u0435\u0442 \u0435\u0449\u0451 Group, Organization, Application \u0438 Service.<\/li>\n<li><code>id<\/code> \u2014 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0430\u0434\u0440\u0435\u0441, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c (\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0435\u0431\u044f, \u0430\u0433\u0430).<\/li>\n<li><code>preferredUsername<\/code> \u2014 \u044e\u0437\u0435\u0440\u043d\u0435\u0439\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0439.<\/li>\n<li><code>inbox<\/code> \u2014 \u0430\u0434\u0440\u0435\u0441 \u0442\u043e\u0433\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u0438\u043d\u0431\u043e\u043a\u0441\u0430, \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0435\u0433\u043e \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438.<\/li>\n<li><code>publicKey<\/code> \u2014 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 RSA-\u043a\u043b\u044e\u0447, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0430\u043a\u0442\u043e\u0440\u0430:<br \/> \n<ul>\n<li><code>id<\/code> \u2014 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043a\u043b\u044e\u0447\u0430. \u0412 \u0442\u0435\u043e\u0440\u0438\u0438 \u0438\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e, \u043d\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0443 \u0432\u0441\u0435\u0445 \u043e\u0434\u0438\u043d. \u041f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0435 <code>#main-key<\/code> \u043f\u043e\u0441\u043b\u0435 ID \u0430\u043a\u0442\u043e\u0440\u0430.<\/li>\n<li><code>owner<\/code> \u2014 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u043a\u043b\u044e\u0447\u0430, \u043f\u0440\u043e\u0441\u0442\u043e ID \u0432\u0430\u0448\u0435\u0433\u043e \u0430\u043a\u0442\u043e\u0440\u0430.<\/li>\n<li><code>publicKeyPem<\/code> \u2014 \u0441\u0430\u043c \u043a\u043b\u044e\u0447 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 PEM.<\/li>\n<\/ul>\n<p>   <\/li>\n<\/ul>\n<p>  \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0445\u043e\u0442\u0435\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c:<\/p>\n<ul>\n<li><code>followers<\/code> \u0438 <code>following<\/code> \u2014 \u0430\u0434\u0440\u0435\u0441\u0430 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u0432 \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a. \u041c\u043e\u0436\u043d\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043e\u0442\u0442\u0443\u0434\u0430 403 \u0438\u043b\u0438 404, \u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u0438 \u043f\u043e\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435.<\/li>\n<li><code>outbox<\/code> \u2014 inbox \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443, \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f <i>\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445<\/i> \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u044d\u0442\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u041e\u0431\u044b\u0447\u043d\u043e \u0442\u0430\u043c \u0442\u043e\u043b\u044c\u043a\u043e Create{Note} \u0438 Announce{Note}.<\/li>\n<li><code>url<\/code> \u2014 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0432 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/li>\n<li><code>name<\/code> \u2014 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u043e\u0435 \u0438\u043c\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0412\u0430\u0441\u044f \u041f\u0443\u043f\u043a\u0438\u043d.<\/li>\n<li><code>icon<\/code> \u0438 <code>image<\/code> \u2014 \u0430\u0432\u0430\u0442\u0430\u0440\u043a\u0430 \u0438 \u043e\u0431\u043b\u043e\u0436\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u041e\u0431\u044a\u0435\u043a\u0442\u044b \u0442\u0438\u043f\u0430 Image, \u0441 \u043f\u043e\u043b\u044f\u043c\u0438 <code>type<\/code>, <code>mediaType<\/code> \u0438 <code>url<\/code>. \u0410\u0432\u0430\u0442\u0430\u0440\u043a\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0435.<\/li>\n<li><code>summary<\/code> \u2014 \u043f\u043e\u043b\u0435 \u00ab\u043e \u0441\u0435\u0431\u0435\u00bb. \u0412 \u043d\u0451\u043c \u043e\u0431\u044b\u0447\u043d\u043e HTML.<\/li>\n<\/ul>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u0430\u043a\u0442\u043e\u0440\u0430 (\u0438\u043b\u0438 \u043f\u043e\u0441\u0442\u0430, \u0438\u043b\u0438 \u0435\u0449\u0451 \u0447\u0435\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c) \u0441 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 GET-\u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c <code>Accept: application\/ld+json; profile=\"https:\/\/www.w3.org\/ns\/activitystreams\"<\/code> \u043d\u0430 \u0442\u043e\u0442 \u0436\u0435 \u0430\u0434\u0440\u0435\u0441, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435:<\/p>\n<pre><code class=\"plaintext\">$ curl -H 'Accept: application\/ld+json; profile=\"https:\/\/www.w3.org\/ns\/activitystreams\"' https:\/\/mastodon.social\/@Gargron {\"@context\":[\"https:\/\/www.w3.org\/ns\/activitystreams\", ... <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u043e\u0434 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0430\u043a\u0442\u043e\u0440\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">private static final String AP_CONTENT_TYPE = \"application\/ld+json; profile=\\\"https:\/\/www.w3.org\/ns\/activitystreams\\\"\";  \/**  * \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0430\u043a\u0442\u043e\u0440\u0430 \u0441 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430  * @param id \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0430\u043a\u0442\u043e\u0440\u0430  * @throws IOException \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0441\u0435\u0442\u0438  *\/ private static JsonObject fetchRemoteActor(URI id) throws IOException {   try {     HttpRequest req = HttpRequest.newBuilder()         .GET()         .uri(id)         .header(\"Accept\", AP_CONTENT_TYPE)         .build();     HttpResponse&lt;String> resp = HTTP_CLIENT.send(req, HttpResponse.BodyHandlers.ofString());     return JsonParser.parseString(resp.body()).getAsJsonObject();   } catch(InterruptedException x) {     throw new RuntimeException(x);   } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u043e\u0434 \u0434\u043b\u044f \u043e\u0442\u0434\u0430\u0447\u0438 \u0430\u043a\u0442\u043e\u0440\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">private static final Gson GSON = new GsonBuilder().disableHtmlEscaping().create();  get(\"\/actor\", (req, res) -> {   Map&lt;String, Object> actorObj = Map.of(       \"@context\", List.of(\"https:\/\/www.w3.org\/ns\/activitystreams\", \"https:\/\/w3id.org\/security\/v1\"),       \"type\", \"Person\",       \"id\", ACTOR_ID,       \"preferredUsername\", USERNAME,       \"inbox\", \"https:\/\/\" + LOCAL_DOMAIN + \"\/inbox\",       \"publicKey\", Map.of(           \"id\", ACTOR_ID + \"#main-key\",           \"owner\", ACTOR_ID,           \"publicKeyPem\", publicKey       )   );   res.type(AP_CONTENT_TYPE);   return GSON.toJson(actorObj); }); <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<h3>\u041e\u0442\u0432\u0435\u0447\u0430\u0435\u043c \u043d\u0430 webfinger-\u0437\u0430\u043f\u0440\u043e\u0441\u044b<\/h3>\n<p>  \u0417\u0430\u043f\u0440\u043e\u0441 \u0438 (\u0443\u0440\u0435\u0437\u0430\u043d\u043d\u044b\u0439 \u0434\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e) \u043e\u0442\u0432\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"plaintext\">$ curl -v https:\/\/mastodon.social\/.well-known\/webfinger?resource=acct:gargron@mastodon.social ... &lt; HTTP\/2 200  &lt; content-type: application\/jrd+json; charset=utf-8 ... <\/code><\/pre>\n<pre><code class=\"json\">{   \"subject\":\"acct:Gargron@mastodon.social\",   \"links\":[     {       \"rel\":\"self\",       \"type\":\"application\/activity+json\",       \"href\":\"https:\/\/mastodon.social\/users\/Gargron\"     }   ] } <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u00abID \u0430\u043a\u0442\u043e\u0440\u0430, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u044e\u0437\u0435\u0440\u043d\u0435\u0439\u043c\u0443 gargron \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 mastodon.social \u2014 <code>https:\/\/mastodon.social\/users\/Gargron<\/code>\u00bb.<\/p>\n<p>  \u042d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u043e\u0432 \u0443\u0436\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u0448 \u0430\u043a\u0442\u043e\u0440 \u0431\u044b\u043b \u0432\u0438\u0434\u0435\u043d \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u2014 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0432\u0432\u0435\u0441\u0442\u0438 URL \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0430\u043a\u0442\u043e\u0440\u0430 \u0432 \u043f\u043e\u043b\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 Mastodon, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044c.<\/p>\n<h3>\u0420\u0430\u0441\u0441\u044b\u043b\u0430\u0435\u043c \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438<\/h3>\n<p>  \u0410\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f POST-\u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0432 \u0438\u043d\u0431\u043e\u043a\u0441\u044b. \u0414\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f HTTP-\u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u2014 \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u044c\u044e \u0434\u0440\u0443\u0433\u0438\u0445 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u044e\u0447\u0430 \u0430\u043a\u0442\u043e\u0440\u0430. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u043d \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"plaintext\">Signature: keyId=\"https:\/\/example.social\/actor#main-key\",headers=\"(request-target) host date digest\",signature=\"...\" <\/code><\/pre>\n<p>  \u0413\u0434\u0435 <code>keyId<\/code> \u2014 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043a\u043b\u044e\u0447\u0430 \u0438\u0437 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0430\u043a\u0442\u043e\u0440\u0430, <code>headers<\/code> \u2014 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043b\u0438, \u0430 <code>signature<\/code> \u2014 \u0441\u0430\u043c\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0432 base64. \u0412 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0445\u043e\u0434\u0438\u0442 <code>Host<\/code>, <code>Date<\/code> \u0438 \u00ab\u043f\u0441\u0435\u0432\u0434\u043e-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a\u00bb <code>(request-target)<\/code> \u2014 \u044d\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u0438 \u043f\u0443\u0442\u044c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>post \/inbox<\/code>). \u0412\u0440\u0435\u043c\u044f \u0432 <code>Date<\/code> \u0434\u043e\u043b\u0436\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u043d\u0430 30 \u0441\u0435\u043a\u0443\u043d\u0434 \u2014 \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f replay-\u0430\u0442\u0430\u043a. \u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 Mastodon \u0442\u0430\u043a\u0436\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a <code>Digest<\/code>, \u044d\u0442\u043e SHA-256 \u0432 base64 \u043e\u0442 \u0442\u0435\u043b\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/p>\n<pre><code class=\"plaintext\">Digest: SHA-256=n4hdMVUMmFN+frCs+jJiRUSB7nVuJ75uVZbr0O0THvc= <\/code><\/pre>\n<p>  \u0421\u0442\u0440\u043e\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c \u2014 \u044d\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u0432 \u0442\u043e\u043c \u0436\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043d\u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u0432 \u043f\u043e\u043b\u0435 headers. \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0438\u0448\u0443\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u0447\u043d\u044b\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438 \u0438 \u043e\u0442\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435\u043c \u0438 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u043c. \u041f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430, \u043a\u0440\u043e\u043c\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e, \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0440\u043e\u043a\u0438 (<code>\\n<\/code>):<\/p>\n<pre><code class=\"plaintext\">(request-target): post \/users\/1\/inbox host: friends.grishka.me date: Sun, 05 Nov 2023 01:23:45 GMT digest: SHA-256=n4hdMVUMmFN+frCs+jJiRUSB7nVuJ75uVZbr0O0THvc= <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u043e\u0434 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">\/**  * \u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u0432 \u0447\u0435\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0438\u043d\u0431\u043e\u043a\u0441  * @param activityJson JSON \u0441\u0430\u043c\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438  * @param inbox \u0430\u0434\u0440\u0435\u0441 \u0438\u043d\u0431\u043e\u043a\u0441\u0430  * @param key \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0434\u043b\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0438  * @throws IOException \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0441\u0435\u0442\u0438  *\/ private static void deliverOneActivity(String activityJson, URI inbox, PrivateKey key) throws IOException {   try {     byte[] body = activityJson.getBytes(StandardCharsets.UTF_8);     String date = DateTimeFormatter.RFC_1123_DATE_TIME.format(Instant.now().atZone(ZoneId.of(\"GMT\")));     String digest = \"SHA-256=\"+Base64.getEncoder().encodeToString(MessageDigest.getInstance(\"SHA-256\").digest(body));     String toSign = \"(request-target): post \" + inbox.getRawPath() + \"\\nhost: \" + inbox.getHost() + \"\\ndate: \" + date + \"\\ndigest: \" + digest;      Signature sig = Signature.getInstance(\"SHA256withRSA\");     sig.initSign(key);     sig.update(toSign.getBytes(StandardCharsets.UTF_8));     byte[] signature = sig.sign();      HttpRequest req = HttpRequest.newBuilder()         .POST(HttpRequest.BodyPublishers.ofByteArray(body))         .uri(inbox)         .header(\"Date\", date)         .header(\"Digest\", digest)         .header(\"Signature\", \"keyId=\\\"\"+ACTOR_ID+\"#main-key\\\",headers=\\\"(request-target) host date digest\\\",signature=\\\"\"+Base64.getEncoder().encodeToString(signature)+\"\\\",algorithm=\\\"rsa-sha256\\\"\")         .header(\"Content-Type\", AP_CONTENT_TYPE)         .build();     HttpResponse&lt;String> resp = HTTP_CLIENT.send(req, HttpResponse.BodyHandlers.ofString());     System.out.println(resp);   } catch(InterruptedException | NoSuchAlgorithmException | InvalidKeyException | SignatureException x) {     throw new RuntimeException(x);   } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0423 \u0432\u0430\u0441 \u0432\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u043f\u0435\u0440\u0432\u0443\u044e \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438! \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043f\u043e\u0434 <a href=\"https:\/\/friends.grishka.me\/posts\/884435\" rel=\"nofollow noopener noreferrer\">\u043c\u043e\u0438\u043c \u043f\u043e\u0441\u0442\u043e\u043c \u043e\u0431 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u0432\u043e\u0442 \u044d\u0442\u043e \u0432 \u043c\u043e\u0439 \u0438\u043d\u0431\u043e\u043a\u0441, <code>https:\/\/friends.grishka.me\/users\/1\/inbox<\/code>, \u0437\u0430\u043c\u0435\u043d\u0438\u0432 example.social \u043d\u0430 \u0434\u043e\u043c\u0435\u043d, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<pre><code class=\"json\">{   \"@context\": \"https:\/\/www.w3.org\/ns\/activitystreams\",   \"id\": \"https:\/\/example.social\/createHelloWorldPost\",   \"type\": \"Create\",   \"actor\": \"https:\/\/example.social\/actor\",   \"to\": \"https:\/\/www.w3.org\/ns\/activitystreams#Public\",   \"object\": {     \"id\": \"https:\/\/example.social\/helloWorldPost\",     \"type\": \"Note\",     \"published\": \"2023-11-05T12:00:00Z\",     \"attributedTo\": \"https:\/\/example.social\/actor\",     \"to\": \"https:\/\/www.w3.org\/ns\/activitystreams#Public\",     \"inReplyTo\": \"https:\/\/friends.grishka.me\/posts\/884435\",     \"content\": \"&lt;p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0444\u0435\u0434\u0438\u0432\u0451\u0440\u0441&lt;\/p>\"   } } <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u0441\u0451 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u043f\u043e\u0434 \u043f\u043e\u0441\u0442\u043e\u043c \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432\u0430\u0448 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439.<\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c: <code>Create<\/code> \u2014 \u0442\u0438\u043f \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438, \u043c\u044b \u0447\u0442\u043e-\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043b\u0438. <code>actor<\/code> \u2014 \u043a\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043b, <code>object<\/code> \u2014 \u0447\u0442\u043e \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u043b, <code>to<\/code> \u2014 \u043a\u043e\u043c\u0443 \u044d\u0442\u0430 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u0430\u0434\u0440\u0435\u0441\u043e\u0432\u0430\u043d\u0430 (\u0432\u0441\u0435\u043c\u0443 \u043c\u0438\u0440\u0443). \u0410 \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043c\u044b \u00ab\u0437\u0430\u043c\u0435\u0442\u043a\u0443\u00bb (\u0442\u0430\u043a \u0432 ActivityPub \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u0442\u044b) \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u00ab\u041f\u0440\u0438\u0432\u0435\u0442, \u0444\u0435\u0434\u0438\u0432\u0451\u0440\u0441\u00bb, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442\u043e\u043c \u043d\u0430 \u043c\u043e\u0439 \u043f\u043e\u0441\u0442. \u0412 \u0442\u0435\u043a\u0441\u0442\u0435 \u043f\u043e\u0441\u0442\u043e\u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 HTML-\u0442\u0435\u0433\u043e\u0432 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<h3>\u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u0438<\/h3>\n<p>  \u041c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438, \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0438\u0445 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c. \u041f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c\u0441\u044f \u0441\u043c\u044b\u0441\u043b\u0430 \u043d\u0435\u0442, \u0432\u0441\u0451 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435. \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u043d\u0443\u0436\u043d\u043e:<\/p>\n<ul>\n<li>\u0420\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a Date. \u0415\u0441\u043b\u0438 \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043d\u0430 30 \u0441\u0435\u043a\u0443\u043d\u0434, \u043e\u0442\u043a\u043b\u043e\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 (\u043c\u043e\u0436\u043d\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043e\u0434 400, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440).<\/li>\n<li>\u0420\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0442\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0430\u043a\u0442\u043e\u0440\u0430 \u043f\u043e \u0443\u0440\u043b\u0443 \u0432 <code>actor<\/code>.<\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e <code>keyId<\/code> \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 <code>Signature<\/code> \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c \u043a\u043b\u044e\u0447\u0430 \u0430\u043a\u0442\u043e\u0440\u0430.<\/li>\n<li>\u0420\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0434\u043b\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0438 (\u0441\u043c. \u0432\u044b\u0448\u0435) \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u044c.<\/li>\n<\/ul>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u043e\u0434 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u0438<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">post(\"\/inbox\", (req, res) -> {   \/\/ \u0412\u0440\u0435\u043c\u044f \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 Date \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 30 \u0441\u0435\u043a\u0443\u043d\u0434 \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e   long timestamp = DateTimeFormatter.RFC_1123_DATE_TIME.parse(req.headers(\"Date\"), Instant::from).getEpochSecond();   if (Math.abs(timestamp - Instant.now().getEpochSecond()) > 30) {     res.status(400);     return \"\";   }    \/\/ \u0412\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c \u0430\u043a\u0442\u043e\u0440\u0430   JsonObject activity = JsonParser.parseString(req.body()).getAsJsonObject();   URI actorID = new URI(activity.get(\"actor\").getAsString());   JsonObject actor = fetchRemoteActor(actorID);    \/\/ \u041f\u0430\u0440\u0441\u0438\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u044c   Map&lt;String, String> signatureHeader = Arrays.stream(req.headers(\"Signature\").split(\",\"))       .map(part->part.split(\"=\", 2))       .collect(Collectors.toMap(keyValue->keyValue[0], keyValue->keyValue[1].replaceAll(\"\\\"\", \"\")));   if (!Objects.equals(actor.getAsJsonObject(\"publicKey\").get(\"id\").getAsString(), signatureHeader.get(\"keyId\"))) {     \/\/ ID \u043a\u043b\u044e\u0447\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441, \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043a\u043b\u044e\u0447\u043e\u043c \u0430\u043a\u0442\u043e\u0440\u0430     res.status(400);     return \"\";   }   List&lt;String> signedHeaders = List.of(signatureHeader.get(\"headers\").split(\" \"));   if (!new HashSet&lt;>(signedHeaders).containsAll(Set.of(\"(request-target)\", \"host\", \"date\"))) {     \/\/ \u041e\u0434\u0438\u043d \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u043b\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0432 \u043f\u043e\u0434\u043f\u0438\u0441\u0438     res.status(400);     return \"\";   }   String toSign = signedHeaders.stream()       .map(header -> {         String value;         if (\"(request-target)\".equals(header)) {           value=\"post \/inbox\";         } else {           value=req.headers(header);         }         return header+\": \"+value;       })       .collect(Collectors.joining(\"\\n\"));   PublicKey actorKey = Utils.decodePublicKey(actor.getAsJsonObject(\"publicKey\").get(\"publicKeyPem\").getAsString());   Signature sig = Signature.getInstance(\"SHA256withRSA\");   sig.initVerify(actorKey);   sig.update(toSign.getBytes(StandardCharsets.UTF_8));   if (!sig.verify(Base64.getDecoder().decode(signatureHeader.get(\"signature\")))) {     \/\/ \u041f\u043e\u0434\u043f\u0438\u0441\u044c \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0430\u0441\u044c     res.status(400);     return \"\";   }    \/\/ \u0412\u0441\u0451 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c - \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u0451 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e   receivedActivities.addFirst(activity);    return \"\"; \/\/ \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u0441 \u043a\u043e\u0434\u043e\u043c 200 }); <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<h3>\u041f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u043b\u044e\u0434\u0435\u0439<\/h3>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0432\u043e\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0432 Mastodon, \u0438\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 <a href=\"https:\/\/mastodon.social\/@Mastodon\" rel=\"nofollow noopener noreferrer\">mastodon.social\/@Mastodon<\/a>. \u041e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u0442\u0430\u043a\u0443\u044e \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u0430\u043a\u0442\u043e\u0440\u0443 (\u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c <code>example.social<\/code> \u043d\u0430 \u0441\u0432\u043e\u0439 \u0434\u043e\u043c\u0435\u043d \u0438 <code>object<\/code> \u043d\u0430 id \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0433\u043e \u0430\u043a\u0442\u043e\u0440\u0430):<\/p>\n<pre><code class=\"json\">{   \"@context\": \"https:\/\/www.w3.org\/ns\/activitystreams\",   \"id\": \"https:\/\/example.social\/oh-wow-i-followed-someone\",   \"type\": \"Follow\",   \"actor\": \"https:\/\/example.social\/actor\",   \"object\": \"https:\/\/mastodon.social\/users\/Mastodon\" } <\/code><\/pre>\n<p>  \u0412\u0441\u043a\u043e\u0440\u0435 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u0430\u043c \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u0440\u0438\u0434\u0442\u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 <code>Accept<\/code>, \u0441 \u0432\u0430\u0448\u0435\u0439 <code>Follow<\/code> \u0432\u043d\u0443\u0442\u0440\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 <code>object<\/code> (\u044f \u0442\u0438\u043f\u044b \u0442\u0430\u043a\u0438\u0445 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u043f\u0438\u0448\u0443 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <code>Accept{Follow}<\/code>). \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043d\u044f\u043b \u0432\u0430\u0448\u0443 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443, \u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u043f\u0440\u0435\u0434\u044c \u043f\u0440\u0438\u0441\u044b\u043b\u0430\u0442\u044c \u0432\u0430\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>Create<\/code>, <code>Announce<\/code> \u0438 <code>Delete<\/code> \u043f\u0440\u043e \u043f\u043e\u0441\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044d\u0442\u043e\u0442 \u0430\u043a\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c, \u0440\u0435\u043f\u043e\u0441\u0442\u0438\u0442\u044c \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c. \u0427\u0442\u043e\u0431\u044b \u043e\u0442\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f, \u043e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 <code>Undo{Follow}<\/code>.<\/p>\n<h2>\u0427\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435?<\/h2>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0434\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u0434\u043e\u0441\u044e\u0434\u0430 \u0438 \u0432\u0441\u0451 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043f\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e \u2014 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 ActivityPub-\u0441\u0435\u0440\u0432\u0435\u0440! \u041c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f <b>\u043d\u0430<\/b> \u0432\u0430\u0448\u0435\u0433\u043e \u0430\u043a\u0442\u043e\u0440\u0430<\/li>\n<li>\u041d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432, \u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0438\u043f\u0430<\/li>\n<li>\u0414\u0430 \u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043f\u043e\u043b\u0435 \u0434\u043b\u044f JSON, \u0430 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439<\/li>\n<li>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043f\u043e\u0441\u0442\u043e\u0432 \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a<\/li>\n<li>\u2026 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/li>\n<li>\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438\/\u0438\u043b\u0438 API \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u043d\u0438\u0431\u0443\u0434\u044c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e, \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432<\/li>\n<li>\u041a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0441 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/li>\n<\/ul>\n<h2>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438<\/h2>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/grishka\/miscellaneous\/tree\/master\/Minimal%20ActivityPub%20server\" rel=\"nofollow noopener noreferrer\">\u041a\u043e\u0434 \u043a \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a><\/li>\n<li>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e\u0442 \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044f Mastodon \u2014 <a href=\"https:\/\/blog.joinmastodon.org\/2018\/06\/how-to-implement-a-basic-activitypub-server\/\" rel=\"nofollow noopener noreferrer\">\u0440\u0430\u0437<\/a> \u0438 <a href=\"https:\/\/blog.joinmastodon.org\/2018\/07\/how-to-make-friends-and-verify-requests\/\" rel=\"nofollow noopener noreferrer\">\u0434\u0432\u0430<\/a><\/li>\n<li>\u0421\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438: <a href=\"https:\/\/www.w3.org\/TR\/activitypub\/\" rel=\"nofollow noopener noreferrer\">ActivityPub<\/a>, <a href=\"https:\/\/www.w3.org\/TR\/activitystreams-core\/\" rel=\"nofollow noopener noreferrer\">ActivityStreams<\/a>, <a href=\"https:\/\/www.w3.org\/TR\/activitystreams-vocabulary\/\" rel=\"nofollow noopener noreferrer\">Activity Vocabulary<\/a><\/li>\n<li><a href=\"https:\/\/fedidb.org\" rel=\"nofollow noopener noreferrer\">FediDB \u2014 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u043e \u0444\u0435\u0434\u0438\u0432\u0451\u0440\u0441\u0443<\/a><\/li>\n<li><a href=\"https:\/\/tinysubversions.com\/notes\/reading-activitypub\/\" rel=\"nofollow noopener noreferrer\">\u041a\u0430\u043a \u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e ActivityPub<\/a><\/li>\n<li><a href=\"https:\/\/flak.tedunangst.com\/t\/activitypub\" rel=\"nofollow noopener noreferrer\">\u0421\u0435\u0440\u0438\u044f \u0441\u0442\u0430\u0442\u0435\u0439 \u043e\u0431 ActivityPub \u043e\u0442 Ted Unangst<\/a><\/li>\n<li><a href=\"https:\/\/socialhub.activitypub.rocks\" rel=\"nofollow noopener noreferrer\">\u0424\u043e\u0440\u0443\u043c SocialHub. \u041d\u0430 \u043d\u0451\u043c \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u044e\u0442 ActivityPub \u0438 \u0432\u0441\u044f\u043a\u0438\u0435 \u0441\u043c\u0435\u0436\u043d\u044b\u0435 \u0442\u0435\u043c\u044b<\/a><\/li>\n<li><a href=\"https:\/\/docs.joinmastodon.org\/spec\/activitypub\/\" rel=\"nofollow noopener noreferrer\">\u0427\u0442\u043e \u0438 \u043a\u0430\u043a Mastodon \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0438\u0437 ActivityPub<\/a><\/li>\n<\/ul>\n<p>  \u0411\u043e\u043b\u044c\u0448\u0435 ActivityPub-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u0438 \u0440\u0430\u0437\u043d\u044b\u0445:<\/p>\n<ul>\n<li><a href=\"https:\/\/joinmastodon.org\" rel=\"nofollow noopener noreferrer\">\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, Mastodon<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/grishka\/Smithereen\" rel=\"nofollow noopener noreferrer\">Smithereen \u2014 \u043c\u043e\u0439 \u0412\u041a \u0441 \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u0435\u0439<\/a><\/li>\n<li><a href=\"https:\/\/pixelfed.org\" rel=\"nofollow noopener noreferrer\">Pixelfed \u2014 \u0442\u0430\u043a\u043e\u0439 \u0444\u0435\u0434\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0444\u043e\u0442\u043e\u0448\u0435\u0440\u0438\u043d\u0433<\/a><\/li>\n<li><a href=\"https:\/\/pleroma.social\" rel=\"nofollow noopener noreferrer\">Pleroma \u2014 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0434\u0438\u0432\u0436\u043e\u043a \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u0431\u043b\u043e\u0433\u0433\u0438\u043d\u0433\u0430<\/a><\/li>\n<li><a href=\"https:\/\/misskey-hub.net\/en\/\" rel=\"nofollow noopener noreferrer\">Misskey \u2014 \u0438 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d, \u043e\u0442 \u043d\u044f\u043f\u043e\u043d\u0446\u0435\u0432.<\/a> \u0421\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c\u0438 \u043a\u043e\u0448\u043a\u043e\u0434\u0435\u0432\u043e\u0447\u043a\u0430\u043c\u0438<\/li>\n<li><a href=\"https:\/\/join-lemmy.org\" rel=\"nofollow noopener noreferrer\">Lemmy \u2014 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0440 \u0441\u0441\u044b\u043b\u043e\u043a \u043f\u043e \u0442\u0438\u043f\u0443 \u0440\u0435\u0434\u0434\u0438\u0442\u0430<\/a><\/li>\n<li><a href=\"https:\/\/friendi.ca\" rel=\"nofollow noopener noreferrer\">Friendica \u2014 \u0442\u043e\u0436\u0435 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u043d\u0430 \u0412\u041a<\/a><\/li>\n<li><a href=\"https:\/\/humungus.tedunangst.com\/r\/honk\" rel=\"nofollow noopener noreferrer\">Honk \u2014 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u043e\u0434\u043d\u043e\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043c\u0438\u043a\u0440\u043e\u0431\u043b\u043e\u0433<\/a><\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/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\/articles\/702724\/\"> https:\/\/habr.com\/ru\/articles\/702724\/<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f, \u043d\u0430 \u0444\u043e\u043d\u0435 <a href=\"https:\/\/habr.com\/ru\/news\/t\/695038\/\">\u043f\u043e\u043a\u0443\u043f\u043a\u0438 Twitter \u0418\u043b\u043e\u043d\u043e\u043c \u041c\u0430\u0441\u043a\u043e\u043c<\/a>, \u043b\u044e\u0434\u0438 \u043d\u0430\u0447\u0430\u043b\u0438 \u0438\u0441\u043a\u0430\u0442\u044c \u0435\u043c\u0443 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b \u2014 \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u043d\u0430\u0448\u043b\u0438 \u0442\u0430\u043a\u0443\u044e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0443 \u0432 <a href=\"https:\/\/joinmastodon.org\" rel=\"nofollow noopener noreferrer\">Mastodon<\/a>.<\/p>\n<p>  Mastodon \u2014 \u044d\u0442\u043e \u0434\u0435\u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u0442\u044c, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0430\u044f \u043f\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u0438, \u043a\u0430\u043a email. \u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/en.wikipedia.org\/wiki\/ActivityPub\" rel=\"nofollow noopener noreferrer\">ActivityPub<\/a> \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c W3C, \u0430 Mastodon \u2014 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, \u043d\u043e \u0441\u0430\u043c\u0430\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f. \u0420\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c, \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0438\u0445 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0423 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u0438 \u043c\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 ActivityPub-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u2014 <a href=\"https:\/\/github.com\/grishka\/Smithereen\" rel=\"nofollow noopener noreferrer\">Smithereen<\/a>, \u0442\u0430\u043a\u043e\u0439 \u0437\u0435\u043b\u0451\u043d\u044b\u0439 \u0434\u0435\u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0412\u041a, \u0433\u0434\u0435 \u044f \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0442\u0430\u043a\u0438 \u0432\u0435\u0440\u043d\u0443 \u0441\u0442\u0435\u043d\u0443.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/kq\/ri\/oz\/kqrioz66ypqvgnnd3cma7r8cyau.png\" data-src=\"https:\/\/habrastorage.org\/webt\/kq\/ri\/oz\/kqrioz66ypqvgnnd3cma7r8cyau.png\"\/><\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u044b \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 ActivityPub \u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0443\u044e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u0441\u0442\u044b \u0432 \u0441\u0435\u0442\u044c (\u00abfediverse\u00bb), \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0442 \u043d\u0438\u0445 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f.  <\/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-401518","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/401518","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=401518"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/401518\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=401518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=401518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=401518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}