{"id":27639848,"url":"https://github.com/classabbyamp/convoyeur","last_synced_at":"2025-04-23T22:34:48.805Z","repository":{"id":265298343,"uuid":"895723171","full_name":"classabbyamp/convoyeur","owner":"classabbyamp","description":"IRCv3 FILEHOST extension adapter to external file upload services","archived":false,"fork":false,"pushed_at":"2025-04-13T17:06:22.000Z","size":44,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T18:23:38.301Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/classabbyamp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"classabbyamp","ko_fi":"miaowware","liberapay":"miaowware"}},"created_at":"2024-11-28T19:00:12.000Z","updated_at":"2025-04-13T17:10:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"9efc30e6-12b4-4c8c-9398-ac7ec4292eac","html_url":"https://github.com/classabbyamp/convoyeur","commit_stats":null,"previous_names":["classabbyamp/filehost-adapter","classabbyamp/convoyeur"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/classabbyamp%2Fconvoyeur","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/classabbyamp%2Fconvoyeur/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/classabbyamp%2Fconvoyeur/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/classabbyamp%2Fconvoyeur/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/classabbyamp","download_url":"https://codeload.github.com/classabbyamp/convoyeur/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250528204,"owners_count":21445507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-23T22:34:48.194Z","updated_at":"2025-04-23T22:34:48.793Z","avatar_url":"https://github.com/classabbyamp.png","language":"Rust","funding_links":["https://github.com/sponsors/classabbyamp","https://ko-fi.com/miaowware","https://liberapay.com/miaowware"],"categories":[],"sub_categories":[],"readme":"# Convoyeur\n\nIRCv3 [FILEHOST](https://soju.im/filehost) extension adapter to external file upload services.\n\n## How it Works\n\nConvoyeur is designed to sit behind the bouncer or server that implements FILEHOST, and proxy\nupload requests to other places. It reads several headers to determine how to route an upload request:\n\n- `Soju-Username` or `X-Username`: username to look up in the user-to-host mapping\n- `X-Upload-Host`: the identifier of an upload host\n\nConvoyeur uses these headers in fallback-style logic:\n\n1. Use `X-Upload-Host` to select an upload host directly\n2. Use `Soju-Username` and find the matching upload host\n3. Use `X-Username` and find the matching upload host\n4. If no username or upload host is given, or there is no matching upload host found, the default upload\n   host is used (if it is defined)\n\nConvoyeur also uses the `Content-Type`, `Content-Disposition` (`filename` parameter), and `Content-Length`\nheaders in accordance with the FILEHOST specification.\n\n## Configuration\n\nConvoyeur is configured via an [HCL](https://github.com/hashicorp/hcl/blob/main/hclsyntax/spec.md)\nfile. This is passed to the program via the environment variable `CONVOYEUR_CONF=path/to/config.hcl`.\n\nLogging can be configured via the [`RUST_LOG`](https://docs.rs/env_logger/latest/env_logger/#enabling-logging)\nenvironment variable (default: `RUST_LOG=info`).\n\n### Default configuration\n\nThe default configuration includes no configured hosts or users, so it is probably not very useful.\n\n```hcl\nbind = \"localhost:8069\"\ndefault_host = null\nupload_limit = 25\n```\n\n### Example configuration\n\nA more useful configuration might be:\n\n```hcl\n# IP/hostname and port to run the adapter on.\n# to listen on both v4 and v6, use a domain that resolves to both, like localhost\nbind = \"localhost:8069\"\n# default host to use for users not listed in the users block\ndefault_host = \"0x0.st\"\n# maximum file size (mebibytes)\n# note that some sites may have lower upload limits\nupload_limit = 100\n\n# mapping of username to file host ID\nusers {\n  foo = \"mypaste\"\n  bar = null\n}\n\n# host id is given as the block label\nhost \"mypaste\" {\n  # kind of upload, options:\n  #  - form: multipart form\n  kind = \"form\"\n  # url to send uploads to\n  url = \"https://paste.example.com\"\n  # for kind=\"form\", the form field to use for the file\n  file_field = \"file\"\n  # additional fields to send (field_name = contents)\n  fields = {\n    extra_value = \"24\"\n  }\n  # extra headers to add to the request (header_name = contents)\n  headers = {\n    Authorization = \"myS3cr3tT0k3n\"\n  }\n}\n```\n\n### Known working file upload services\n\n- [0x0.st](https://0x0.st)\n```hcl\nhost \"0x0.st\" {\n  kind = \"form\"\n  url = \"https://0x0.st\"\n  file_field = \"file\"\n  fields = {\n    # optional\n    expires = \"24\"\n    secret = \"yes\"\n  }\n}\n```\n- [x0.at](https://x0.at)\n```hcl\nhost \"x0.at\" {\n    kind = \"form\"\n    url = \"https://x0.at\"\n    file_field = \"file\"\n    fields = {\n        id_length = \"10\"\n    }\n}\n```\n- [logpaste](https://github.com/mtlynch/logpaste)\n  (examples: [logpaste.com](https://logpaste.com), [paste.gentoo.zip](https://paste.gentoo.zip))\n```hcl\nhost \"logpaste\" {\n    kind = \"form\"\n    url = \"https://logpaste.com\"\n    file_field = \"_\"\n}\n```\n- [rustypaste](https://github.com/orhun/rustypaste)\n```hcl\nhost \"rustypaste\" {\n  kind = \"form\"\n  url = \"https://rpaste.example.com\"\n  file_field = \"file\"\n  fields = {\n    expire = \"1d\"\n  }\n  headers = {\n    Authorization = \"myS3cr3tT0k3n\"\n  }\n}\n\n```\n\n## Soju Configuration\n\nTo use this with the [soju](https://soju.im) bouncer, add the following to your soju configuration:\n\n- a `listen` directive for HTTP (`https://`, `http+unix://`, or `http+insecure://`), for clients to upload to\n- an `http-ingress` directive matching the HTTP `listen` directive\n- a `file-upload` directive pointing at convoyeur\n\nFor example:\n```\nlisten https://:6680\nhttp-ingress http://:6680\nfile-upload http http://127.0.0.1:8069\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclassabbyamp%2Fconvoyeur","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclassabbyamp%2Fconvoyeur","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclassabbyamp%2Fconvoyeur/lists"}