owned this note changed 8 months ago
Linked with GitHub

第一次實作 ActivityPub 就上手 - pichu chen

歡迎來到 https://hackmd.io/@coscup/2024 共筆

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

點擊本頁上方的 開始用 Markdown 一起寫筆記!
手機版請點選上方 按鈕展開議程列表。

請從這裡開始

  • ActivityPub Acct 格式: @username@domain
    • 目前還不是標準
  • anti-SPAM
    • ActivityPub 實作強制簽章
  • JSON-LD
    • @context: JSON 內欄位的說明文件
    • 每個 id 會需要再打一個 request 去展開
  • application/activitypub+json
  • 基本名詞
    • 每個 Object 都有 id、type
    • 還必須有 inbox、outbox
      • inbox: 對這個 instance 傳入的訊息
        • note: 有時候會因為防 spam 考量,即便傳輸失敗也會回應 20X OK
      • outbox: 在這個 instance 上產生的訊息
        • note: 強制需要驗證以過濾可取得的訊息 (e.g. 公開 vs 私訊)
    • webfinger: 查詢各類資訊的固定路徑 (/.well-known/webfinger) (RFC 7033)
      • 雖然不是 ActivityPub 標準,但是慣例上會實作對應的 resource type 回應對應的資訊
    • HTTP Signatures: 解決 server to server 之間的 AuthN
      • 原本是 RFC draft draft-cavage-http-signatures
      • 現在是 RFC 9421 HTTP Message Signatures
      • 尚未納入 ActivityPub 標準,但被目前各大實作採用
  • Hatsuaki: Textbook of ActivityPub, written with Golang
  • When posting: to = https://ww.w3.org/ns/activitystreams#Public => 開地球

閒聊交流區

好期待
好期待 0w0

Select a repo