A secure private file host program. Bandwidth & request rate limiting, file sanitizing, good on resources, ShareX compatibility, and more.
Go to file
vysion e09830024d fuck 2021-07-07 19:22:34 -07:00
conf fuck 2021-07-07 19:22:34 -07:00
example gofmt, use embed for favicon, remove public mode 2021-07-07 18:15:37 -07:00
utils fix merge conflict 2021-06-15 15:25:05 -07:00
.gitignore Remove GCS dependency, name change, new config options 2021-03-09 21:00:31 -08:00
Dockerfile gofmt, use embed for favicon, remove public mode 2021-07-07 18:15:37 -07:00
LICENSE forwarded ip changed to CF-Connecting-IP 2021-06-15 15:18:57 -07:00
README.md add option to configure # of times to check id collision 2021-04-30 03:06:46 -07:00
auth_middleware.go import from hard drive 2021-01-15 13:44:25 -08:00
base_handler.go Remove GCS dependency, name change, new config options 2021-03-09 21:00:31 -08:00
filter.go import from hard drive 2021-01-15 13:44:25 -08:00
go.mod forwarded ip changed to CF-Connecting-IP 2021-06-15 15:18:57 -07:00
go.sum gofmt, use embed for favicon, remove public mode 2021-07-07 18:15:37 -07:00
limiter.go fix issue with unauthorized message, add zero-width image url option 2021-02-24 02:14:56 -08:00
main.go fuck 2021-07-07 19:22:34 -07:00
middleware.go fuck 2021-07-07 19:22:34 -07:00
response.go import from hard drive 2021-01-15 13:44:25 -08:00
serve_auth_check.go import from hard drive 2021-01-15 13:44:25 -08:00
serve_favicon.go fuck 2021-07-07 19:22:34 -07:00
serve_file.go fix merge conflict 2021-06-15 15:25:05 -07:00
serve_not_found.go import from hard drive 2021-01-15 13:44:25 -08:00
serve_ping.go gofmt, use embed for favicon, remove public mode 2021-07-07 18:15:37 -07:00
serve_upload.go gofmt, use embed for favicon, remove public mode 2021-07-07 18:15:37 -07:00
structs.go gofmt, use embed for favicon, remove public mode 2021-07-07 18:15:37 -07:00
zws.go Remove GCS dependency, name change, new config options 2021-03-09 21:00:31 -08:00

README.md

Tytanium

A file host server which puts security first. Intended for private/small group use, and for things like screenshots (though you could use it for something else as well).

Features

  • Excellent compatibility with image capture suites like ShareX/MagicCap/etc.
  • Lots of configuration options
  • Built with fasthttp for performance and built-in anti-DoS features
  • Whitelist/blacklist file types, and check them based on their headers, not the extension
  • Sanitize files to prevent against phishing attacks
  • Public/private mode (private by default)
  • Zero-width file IDs in URLs
  • File ID collision checking
  • Not written in Javascript!

Setup

Make sure you have a Redis instance set up somewhere; preferably in the same environment as the file hoster.

  • Put your config in conf/ as config.yml using conf/example.yml as a reference.
  • Optionally, you can replace favicon.ico with your own icon! (It must have the same name)
  • If you're using this with ShareX, check example/tytanium.sxcu for a template sxcu file.

Now you can choose to either run Tytanium with Docker or as a service on your system.

  • Download the binary to the same directory where conf/ is located.
    • Alternatively you can build it.
  • Mark it as executable with chmod 0744 <binary file>.
  • Copy example/tytanium.service to /lib/systemd/system (if it's not there already).
  • Edit the WorkingDirectory and ExecFile to match the locations of the binary file.
  • Run systemctl daemon-reload.

At this point, you can run the program using systemctl start tytanium. You can check on its status by running systemctl status tytanium.

If anything goes wrong, you can check journalctl -u tytanium and find out what happened.

Option 2: Docker

Note that you will have to attach external volumes yourself should you use this method.

  • Build the image with docker build -t tytanium .
  • Make sure to bind the port you choose (default is 3030) to other ports on your system. Here's an example of how you would run it, after building the image.

docker container run -d -p 127.0.0.1:3030:3030 tytanium

How to Upload

Create a POST request to /upload with a file in the field "file". Put the key in Authorization header

Set ?omitdomain=1, if you don't want the host's original domain appended before the file name in the response. E.g: a.png instead of https://a.com/a.png

Add ?zerowidth=1 and set it to 1 to make your image URLs appear "zero-width". If you don't get what that means, try it, and see what happens.