X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=config%2Fdescription.exs;h=493d362d3b5407359cb44b786fb2b0d5dbc54b90;hb=8b28dce82ac244c6c5e67d8379e68e5742bfe875;hp=0b651696b4bb37fa0a76fef692606c3adefd07a5;hpb=c7bcbfbc1d5d34463634e44979a77a2c47e35dbc;p=akkoma diff --git a/config/description.exs b/config/description.exs index 0b651696b..493d362d3 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1,5 +1,4 @@ use Mix.Config -alias Pleroma.Docs.Generator websocket_config = [ path: "/websocket", @@ -102,74 +101,10 @@ config :pleroma, :config_description, [ %{ key: :proxy_remote, type: :boolean, - description: - "If enabled, requests to media stored using a remote uploader will be proxied instead of being redirected" - }, - %{ - key: :proxy_opts, - label: "Proxy Options", - type: :keyword, - description: "Options for Pleroma.ReverseProxy", - suggestions: [ - redirect_on_failure: false, - max_body_length: 25 * 1_048_576, - http: [ - follow_redirect: true, - pool: :media - ] - ], - children: [ - %{ - key: :redirect_on_failure, - type: :boolean, - description: - "Redirects the client to the real remote URL if there's any HTTP errors. " <> - "Any error during body processing will not be redirected as the response is chunked." - }, - %{ - key: :max_body_length, - type: :integer, - description: - "Limits the content length to be approximately the " <> - "specified length. It is validated with the `content-length` header and also verified when proxying." - }, - %{ - key: :http, - label: "HTTP", - type: :keyword, - description: "HTTP options", - children: [ - %{ - key: :adapter, - type: :keyword, - description: "Adapter specific options", - children: [ - %{ - key: :ssl_options, - type: :keyword, - label: "SSL Options", - description: "SSL options for HTTP adapter", - children: [ - %{ - key: :versions, - type: {:list, :atom}, - description: "List of TLS versions to use", - suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"] - } - ] - } - ] - }, - %{ - key: :proxy_url, - label: "Proxy URL", - type: [:string, :tuple], - description: "Proxy URL", - suggestions: ["127.0.0.1:8123", {:socks5, :localhost, 9050}] - } - ] - } - ] + description: """ + Proxy requests to the remote uploader.\n + Useful if media upload endpoint is not internet accessible. + """ }, %{ key: :filename_display_max_length, @@ -214,18 +149,12 @@ config :pleroma, :config_description, [ description: "S3 bucket namespace", suggestions: ["pleroma"] }, - %{ - key: :public_endpoint, - type: :string, - description: "S3 endpoint", - suggestions: ["https://s3.amazonaws.com"] - }, %{ key: :truncated_namespace, type: :string, description: "If you use S3 compatible service such as Digital Ocean Spaces or CDN, set folder name or \"\" etc." <> - " For example, when using CDN to S3 virtual host format, set \"\". At this time, write CNAME to CDN in public_endpoint." + " For example, when using CDN to S3 virtual host format, set \"\". At this time, write CNAME to CDN in Upload base_url." }, %{ key: :streaming_enabled, @@ -273,19 +202,6 @@ config :pleroma, :config_description, [ } ] }, - %{ - group: :pleroma, - key: :fed_sockets, - type: :group, - description: "Websocket based federation", - children: [ - %{ - key: :enabled, - type: :boolean, - description: "Enable FedSockets" - } - ] - }, %{ group: :pleroma, key: Pleroma.Emails.Mailer, @@ -1268,7 +1184,7 @@ config :pleroma, :config_description, [ hideSitename: false, hideUserStats: false, loginMethod: "password", - logo: "/static/logo.png", + logo: "/static/logo.svg", logoMargin: ".1em", logoMask: true, minimalScopesMode: false, @@ -1354,7 +1270,7 @@ config :pleroma, :config_description, [ key: :logo, type: {:string, :image}, description: "URL of the logo, defaults to Pleroma's logo", - suggestions: ["/static/logo.png"] + suggestions: ["/static/logo.svg"] }, %{ key: :logoMargin, @@ -1555,298 +1471,6 @@ config :pleroma, :config_description, [ } ] }, - %{ - group: :pleroma, - key: :mrf, - tab: :mrf, - label: "MRF", - type: :group, - description: "General MRF settings", - children: [ - %{ - key: :policies, - type: [:module, {:list, :module}], - description: - "A list of MRF policies enabled. Module names are shortened (removed leading `Pleroma.Web.ActivityPub.MRF.` part), but on adding custom module you need to use full name.", - suggestions: {:list_behaviour_implementations, Pleroma.Web.ActivityPub.MRF} - }, - %{ - key: :transparency, - label: "MRF transparency", - type: :boolean, - description: - "Make the content of your Message Rewrite Facility settings public (via nodeinfo)" - }, - %{ - key: :transparency_exclusions, - label: "MRF transparency exclusions", - type: {:list, :string}, - description: - "Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value.", - suggestions: [ - "exclusion.com" - ] - } - ] - }, - %{ - group: :pleroma, - key: :mrf_simple, - tab: :mrf, - related_policy: "Pleroma.Web.ActivityPub.MRF.SimplePolicy", - label: "MRF Simple", - type: :group, - description: "Simple ingress policies", - children: [ - %{ - key: :media_removal, - type: {:list, :string}, - description: "List of instances to strip media attachments from", - suggestions: ["example.com", "*.example.com"] - }, - %{ - key: :media_nsfw, - label: "Media NSFW", - type: {:list, :string}, - description: "List of instances to tag all media as NSFW (sensitive) from", - suggestions: ["example.com", "*.example.com"] - }, - %{ - key: :federated_timeline_removal, - type: {:list, :string}, - description: - "List of instances to remove from the Federated (aka The Whole Known Network) Timeline", - suggestions: ["example.com", "*.example.com"] - }, - %{ - key: :reject, - type: {:list, :string}, - description: "List of instances to reject activities from (except deletes)", - suggestions: ["example.com", "*.example.com"] - }, - %{ - key: :accept, - type: {:list, :string}, - description: "List of instances to only accept activities from (except deletes)", - suggestions: ["example.com", "*.example.com"] - }, - %{ - key: :followers_only, - type: {:list, :string}, - description: "Force posts from the given instances to be visible by followers only", - suggestions: ["example.com", "*.example.com"] - }, - %{ - key: :report_removal, - type: {:list, :string}, - description: "List of instances to reject reports from", - suggestions: ["example.com", "*.example.com"] - }, - %{ - key: :avatar_removal, - type: {:list, :string}, - description: "List of instances to strip avatars from", - suggestions: ["example.com", "*.example.com"] - }, - %{ - key: :banner_removal, - type: {:list, :string}, - description: "List of instances to strip banners from", - suggestions: ["example.com", "*.example.com"] - }, - %{ - key: :reject_deletes, - type: {:list, :string}, - description: "List of instances to reject deletions from", - suggestions: ["example.com", "*.example.com"] - } - ] - }, - %{ - group: :pleroma, - key: :mrf_activity_expiration, - tab: :mrf, - related_policy: "Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy", - label: "MRF Activity Expiration Policy", - type: :group, - description: "Adds automatic expiration to all local activities", - children: [ - %{ - key: :days, - type: :integer, - description: "Default global expiration time for all local activities (in days)", - suggestions: [90, 365] - } - ] - }, - %{ - group: :pleroma, - key: :mrf_subchain, - tab: :mrf, - related_policy: "Pleroma.Web.ActivityPub.MRF.SubchainPolicy", - label: "MRF Subchain", - type: :group, - description: - "This policy processes messages through an alternate pipeline when a given message matches certain criteria." <> - " All criteria are configured as a map of regular expressions to lists of policy modules.", - children: [ - %{ - key: :match_actor, - type: {:map, {:list, :string}}, - description: "Matches a series of regular expressions against the actor field", - suggestions: [ - %{ - ~r/https:\/\/example.com/s => [Pleroma.Web.ActivityPub.MRF.DropPolicy] - } - ] - } - ] - }, - %{ - group: :pleroma, - key: :mrf_rejectnonpublic, - tab: :mrf, - related_policy: "Pleroma.Web.ActivityPub.MRF.RejectNonPublic", - description: "RejectNonPublic drops posts with non-public visibility settings.", - label: "MRF Reject Non Public", - type: :group, - children: [ - %{ - key: :allow_followersonly, - label: "Allow followers-only", - type: :boolean, - description: "Whether to allow followers-only posts" - }, - %{ - key: :allow_direct, - type: :boolean, - description: "Whether to allow direct messages" - } - ] - }, - %{ - group: :pleroma, - key: :mrf_hellthread, - tab: :mrf, - related_policy: "Pleroma.Web.ActivityPub.MRF.HellthreadPolicy", - label: "MRF Hellthread", - type: :group, - description: "Block messages with excessive user mentions", - children: [ - %{ - key: :delist_threshold, - type: :integer, - description: - "Number of mentioned users after which the message gets removed from timelines and" <> - "disables notifications. Set to 0 to disable.", - suggestions: [10] - }, - %{ - key: :reject_threshold, - type: :integer, - description: - "Number of mentioned users after which the messaged gets rejected. Set to 0 to disable.", - suggestions: [20] - } - ] - }, - %{ - group: :pleroma, - key: :mrf_keyword, - tab: :mrf, - related_policy: "Pleroma.Web.ActivityPub.MRF.KeywordPolicy", - label: "MRF Keyword", - type: :group, - description: - "Reject or Word-Replace messages matching a keyword or [Regex](https://hexdocs.pm/elixir/Regex.html).", - children: [ - %{ - key: :reject, - type: {:list, :string}, - description: """ - A list of patterns which result in message being rejected. - - Each pattern can be a string or [Regex](https://hexdocs.pm/elixir/Regex.html) in the format of `~r/PATTERN/`. - """, - suggestions: ["foo", ~r/foo/iu] - }, - %{ - key: :federated_timeline_removal, - type: {:list, :string}, - description: """ - A list of patterns which result in message being removed from federated timelines (a.k.a unlisted). - - Each pattern can be a string or [Regex](https://hexdocs.pm/elixir/Regex.html) in the format of `~r/PATTERN/`. - """, - suggestions: ["foo", ~r/foo/iu] - }, - %{ - key: :replace, - type: {:list, :tuple}, - description: """ - **Pattern**: a string or [Regex](https://hexdocs.pm/elixir/Regex.html) in the format of `~r/PATTERN/`. - - **Replacement**: a string. Leaving the field empty is permitted. - """ - } - ] - }, - %{ - group: :pleroma, - key: :mrf_mention, - tab: :mrf, - related_policy: "Pleroma.Web.ActivityPub.MRF.MentionPolicy", - label: "MRF Mention", - type: :group, - description: "Block messages which mention a specific user", - children: [ - %{ - key: :actors, - type: {:list, :string}, - description: "A list of actors for which any post mentioning them will be dropped", - suggestions: ["actor1", "actor2"] - } - ] - }, - %{ - group: :pleroma, - key: :mrf_vocabulary, - tab: :mrf, - related_policy: "Pleroma.Web.ActivityPub.MRF.VocabularyPolicy", - label: "MRF Vocabulary", - type: :group, - description: "Filter messages which belong to certain activity vocabularies", - children: [ - %{ - key: :accept, - type: {:list, :string}, - description: - "A list of ActivityStreams terms to accept. If empty, all supported messages are accepted.", - suggestions: ["Create", "Follow", "Mention", "Announce", "Like"] - }, - %{ - key: :reject, - type: {:list, :string}, - description: - "A list of ActivityStreams terms to reject. If empty, no messages are rejected.", - suggestions: ["Create", "Follow", "Mention", "Announce", "Like"] - } - ] - }, - # %{ - # group: :pleroma, - # key: :mrf_user_allowlist, - # tab: :mrf, - # related_policy: "Pleroma.Web.ActivityPub.MRF.UserAllowListPolicy", - # type: :map, - # description: - # "The keys in this section are the domain names that the policy should apply to." <> - # " Each key should be assigned a list of users that should be allowed through by their ActivityPub ID", - # suggestions: [ - # %{"example.org" => ["https://example.org/users/admin"]} - # ] - # ] - # }, %{ group: :pleroma, key: :media_proxy, @@ -1856,7 +1480,7 @@ config :pleroma, :config_description, [ %{ key: :enabled, type: :boolean, - description: "Enables proxying of remote media to the instance's proxy" + description: "Enables proxying of remote media via the instance's proxy" }, %{ key: :base_url, @@ -1893,80 +1517,41 @@ config :pleroma, :config_description, [ }, %{ key: :proxy_opts, - label: "Proxy Options", + label: "Advanced MediaProxy Options", type: :keyword, - description: "Options for Pleroma.ReverseProxy", + description: "Internal Pleroma.ReverseProxy settings", suggestions: [ redirect_on_failure: false, max_body_length: 25 * 1_048_576, - max_read_duration: 30_000, - http: [ - follow_redirect: true, - pool: :media - ] + max_read_duration: 30_000 ], children: [ %{ key: :redirect_on_failure, type: :boolean, - description: - "Redirects the client to the real remote URL if there's any HTTP errors. " <> - "Any error during body processing will not be redirected as the response is chunked." + description: """ + Redirects the client to the origin server upon encountering HTTP errors.\n + Note that files larger than Max Body Length will trigger an error. (e.g., Peertube videos)\n\n + **WARNING:** This setting will allow larger files to be accessed, but exposes the\n + IP addresses of your users to the other servers, bypassing the MediaProxy. + """ }, %{ key: :max_body_length, type: :integer, - description: - "Limits the content length to be approximately the " <> - "specified length. It is validated with the `content-length` header and also verified when proxying." + description: "Maximum file size allowed through the Pleroma MediaProxy cache." }, %{ key: :max_read_duration, type: :integer, - description: "Timeout (in milliseconds) of GET request to remote URI." - }, - %{ - key: :http, - label: "HTTP", - type: :keyword, - description: "HTTP options", - children: [ - %{ - key: :adapter, - type: :keyword, - description: "Adapter specific options", - children: [ - %{ - key: :ssl_options, - type: :keyword, - label: "SSL Options", - description: "SSL options for HTTP adapter", - children: [ - %{ - key: :versions, - type: {:list, :atom}, - description: "List of TLS version to use", - suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"] - } - ] - } - ] - }, - %{ - key: :proxy_url, - label: "Proxy URL", - type: [:string, :tuple], - description: "Proxy URL", - suggestions: ["127.0.0.1:8123", {:socks5, :localhost, 9050}] - } - ] + description: "Timeout (in milliseconds) of GET request to the remote URI." } ] }, %{ key: :whitelist, type: {:list, :string}, - description: "List of hosts with scheme to bypass the mediaproxy", + description: "List of hosts with scheme to bypass the MediaProxy", suggestions: ["http://example.com"] } ] @@ -2259,14 +1844,8 @@ config :pleroma, :config_description, [ group: :pleroma, key: Oban, type: :group, - description: """ - [Oban](https://github.com/sorentwo/oban) asynchronous job processor configuration. - - Note: if you are running PostgreSQL in [`silent_mode`](https://postgresqlco.nf/en/doc/param/silent_mode?version=9.1), - it's advised to set [`log_destination`](https://postgresqlco.nf/en/doc/param/log_destination?version=9.1) to `syslog`, - otherwise `postmaster.log` file may grow because of "you don't own a lock of type ShareLock" warnings - (see https://github.com/sorentwo/oban/issues/52). - """, + description: + "[Oban](https://github.com/sorentwo/oban) asynchronous job processor configuration.", children: [ %{ key: :log, @@ -2846,7 +2425,7 @@ config :pleroma, :config_description, [ key: :token_expires_in, type: :integer, description: "The lifetime in seconds of the access token", - suggestions: [600] + suggestions: [2_592_000] }, %{ key: :issue_new_refresh_token, @@ -3159,22 +2738,6 @@ config :pleroma, :config_description, [ } ] }, - %{ - group: :pleroma, - key: :mrf_normalize_markup, - tab: :mrf, - related_policy: "Pleroma.Web.ActivityPub.MRF.NormalizeMarkup", - label: "MRF Normalize Markup", - description: "MRF NormalizeMarkup settings. Scrub configured hypertext markup.", - type: :group, - children: [ - %{ - key: :scrub_policy, - type: :module, - suggestions: [Pleroma.HTML.Scrubber.Default] - } - ] - }, %{ group: :pleroma, key: Pleroma.User, @@ -3364,33 +2927,6 @@ config :pleroma, :config_description, [ } ] }, - %{ - group: :pleroma, - key: :mrf_object_age, - tab: :mrf, - related_policy: "Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy", - label: "MRF Object Age", - type: :group, - description: - "Rejects or delists posts based on their timestamp deviance from your server's clock.", - children: [ - %{ - key: :threshold, - type: :integer, - description: "Required age (in seconds) of a post before actions are taken.", - suggestions: [172_800] - }, - %{ - key: :actions, - type: {:list, :atom}, - description: - "A list of actions to apply to the post. `:delist` removes the post from public timelines; " <> - "`:strip_followers` removes followers from the ActivityPub recipient list ensuring they won't be delivered to home timelines; " <> - "`:reject` rejects the message entirely", - suggestions: [:delist, :strip_followers, :reject] - } - ] - }, %{ group: :pleroma, key: :modules,