{"id":13930189,"url":"https://github.com/tansly/rustpaste","last_synced_at":"2025-07-19T12:31:50.424Z","repository":{"id":48341892,"uuid":"201643593","full_name":"tansly/rustpaste","owner":"tansly","description":"Pastebin service in Rust","archived":false,"fork":false,"pushed_at":"2021-07-31T04:12:04.000Z","size":168,"stargazers_count":4,"open_issues_count":11,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-08T18:26:40.567Z","etag":null,"topics":["actix-web","pastebin","rust","syntect","web"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tansly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-10T14:50:16.000Z","updated_at":"2022-12-01T22:59:23.000Z","dependencies_parsed_at":"2022-08-19T06:02:29.566Z","dependency_job_id":null,"html_url":"https://github.com/tansly/rustpaste","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tansly%2Frustpaste","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tansly%2Frustpaste/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tansly%2Frustpaste/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tansly%2Frustpaste/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tansly","download_url":"https://codeload.github.com/tansly/rustpaste/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226607603,"owners_count":17658483,"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":["actix-web","pastebin","rust","syntect","web"],"created_at":"2024-08-07T18:05:04.844Z","updated_at":"2024-11-26T19:30:55.007Z","avatar_url":"https://github.com/tansly.png","language":"Rust","funding_links":[],"categories":["web"],"sub_categories":[],"readme":"# rustpaste\n\n[![Build Status](https://travis-ci.com/tansly/rustpaste.svg?token=37nt8ydfT1ey69USyytm\u0026branch=master)](https://travis-ci.com/tansly/rustpaste)\n[![codecov](https://codecov.io/gh/tansly/rustpaste/branch/master/graph/badge.svg)](https://codecov.io/gh/tansly/rustpaste)\n\nA private pastebin server written in Rust, using actix-web framework. Aiming to be very simple.\n\nThis is a work in progress.\n\n## REST API\n* To upload a paste, send a `POST` request to `/` with `application/x-www-form-urlencoded` data.\n**This requires authentication (HTTP basic authentication).** If the request is successful, response contains the URL of the paste.\n\n    Note that urlencoded data is not the best approach for this because of some limitations\n    (for example the max file size imposed by actix-web, extra overhead for non-ASCII data).\n    **I'm planning to change this to use `multipart/form-data`.** Dealing with urlencoded\n    data is so much easier in actix-web; that's why I chose to do it this way initially.\n\n    You can use `curl` as follows to upload the contents of a file named `filename`:\n    ```\n    curl \u003cdomain\u003e --basic -u \"user:pass\" --data-urlencode \"data@filename\"\n    ```\n    You should definitely use HTTPS or you'll get owned.\n    Since `rustpaste` does not have SSL support,\n    put it behind some reverse proxy (such as nginx) with SSL support.\n\n* To get a paste, send a `GET` request to the URL returned by the `POST`.\nTo get the paste with syntax highlighting, add the file extension for the file\nas a separate path parameter in the `GET` request. For example, to highlight a\npaste with name `QDRASC3w` as Rust source code, send a request to `/QDRASC3w/rs`.\n\n* **TODO:** To delete a paste, send a `DELETE` request to the paste URL.\nThis requires authentication.\n\n## Configuration\n**TODO:** Things like where to store the pastes, username and password to be used by HTTP authentication,\nbase URL to prepend to the `POST` responses will be configured using a config file.\n\n## Planned features\nAfter implementing a very basic API with `GET` and `POST` requests, I'm planning to add the following features.\n- [x] HTTP basic authentication for posting/deleting pastes.\n- [x] Syntax highlighting with [syntect](https://github.com/trishume/syntect).\n- [ ] `DELETE` method to delete pastes.\n- [ ] Configuration via a config file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftansly%2Frustpaste","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftansly%2Frustpaste","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftansly%2Frustpaste/lists"}