feat: add rustypaste configuration to dotfiles
All checks were successful
sync tailscale acls / acls (push) Successful in 1m9s
All checks were successful
sync tailscale acls / acls (push) Successful in 1m9s
This commit is contained in:
parent
ef8926e3f3
commit
6e7a23d009
2 changed files with 78 additions and 0 deletions
21
.config/rustypaste/client.toml
Executable file
21
.config/rustypaste/client.toml
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
[server]
|
||||
# Server address.
|
||||
address = "https://paste.cpatino.com"
|
||||
# Server authentication token.
|
||||
# auth_token = ""
|
||||
# A file that contains an authentication token.
|
||||
auth_token_file = "~/.config/rustypaste/auth_token"
|
||||
# Server deletion token.
|
||||
# delete_token = ""
|
||||
# A file that contains a deletion token.
|
||||
delete_token_file = "~/.config/rustypaste/delete_token"
|
||||
|
||||
[paste]
|
||||
# Delete the paste after it has been accessed for the first time.
|
||||
oneshot = false
|
||||
# Override the server's default expiration time.
|
||||
#expire = "10min"
|
||||
|
||||
[style]
|
||||
# Prettify the output.
|
||||
prettify = true
|
||||
57
.config/rustypaste/server.toml
Executable file
57
.config/rustypaste/server.toml
Executable file
|
|
@ -0,0 +1,57 @@
|
|||
[config]
|
||||
refresh_rate = "1s"
|
||||
|
||||
[server]
|
||||
address = "0.0.0.0:5100"
|
||||
url = "https://paste.cpatino.com"
|
||||
#workers=4
|
||||
max_content_length = "1GB"
|
||||
upload_path = "./upload"
|
||||
timeout = "30s"
|
||||
expose_version = false
|
||||
expose_list = true
|
||||
# auth_tokens = [ ]
|
||||
# delete_tokens = [ ]
|
||||
handle_spaces = "replace" # or "encode"
|
||||
|
||||
[landing_page]
|
||||
text = """
|
||||
┬─┐┬ ┬┌─┐┌┬┐┬ ┬┌─┐┌─┐┌─┐┌┬┐┌─┐
|
||||
├┬┘│ │└─┐ │ └┬┘├─┘├─┤└─┐ │ ├┤
|
||||
┴└─└─┘└─┘ ┴ ┴ ┴ ┴ ┴└─┘ ┴ └─┘
|
||||
|
||||
Submit files via HTTP POST here:
|
||||
curl -F 'file=@example.txt' <server>
|
||||
This will return the URL of the uploaded file.
|
||||
|
||||
The server administrator might remove any pastes that they do not personally
|
||||
want to host.
|
||||
|
||||
By default, pastes expire every hour.
|
||||
"""
|
||||
#file = "index.txt"
|
||||
content_type = "text/plain; charset=utf-8"
|
||||
|
||||
[paste]
|
||||
random_url = { type = "petname", words = 2, separator = "-" }
|
||||
#random_url = { type = "alphanumeric", length = 8 }
|
||||
#random_url = { type = "alphanumeric", length = 8, no_extension = true }
|
||||
#random_url = { type = "alphanumeric", length = 6, suffix_mode = true }
|
||||
default_extension = "txt"
|
||||
mime_override = [
|
||||
{ mime = "image/jpeg", regex = "^.*\\.jpg$" },
|
||||
{ mime = "image/png", regex = "^.*\\.png$" },
|
||||
{ mime = "image/svg+xml", regex = "^.*\\.svg$" },
|
||||
{ mime = "video/webm", regex = "^.*\\.webm$" },
|
||||
{ mime = "video/x-matroska", regex = "^.*\\.mkv$" },
|
||||
{ mime = "application/octet-stream", regex = "^.*\\.bin$" },
|
||||
{ mime = "text/plain", regex = "^.*\\.(log|txt|diff|sh|rs|toml)$" },
|
||||
]
|
||||
mime_blacklist = [
|
||||
"application/x-dosexec",
|
||||
"application/java-archive",
|
||||
"application/java-vm",
|
||||
]
|
||||
duplicate_files = true
|
||||
default_expiry = "1h"
|
||||
delete_expired_files = { enabled = true, interval = "1h" }
|
||||
Loading…
Add table
Add a link
Reference in a new issue