Skip to content
/ shorter Public

URL shortener with pastebin and file upload functions

License

0BSD, Unlicense licenses found

Licenses found

0BSD
LICENSE
Unlicense
UNLICENSE
Notifications You must be signed in to change notification settings

7i/shorter

Repository files navigation

Go Report Card Linux windows License License

shorter

URL shortener with pastebin and file upload functions

WIP

This project is a work in progress. The implementation is incomplete and subject to change.

If you want to try to run shorter, please set your correct values in the config before starting the server.

Shortened links on the pre alpha version test site 7i.se will be cleared from time to time during testing without notice.

Installation

go get github.com/7i/shorter

Usage

shorter /path/to/config

Examples

A deployed version of shorter is accessable at 7i.se

create a temporary link to "https://www.example.com" via a GET request that is as short as possible:

7i.se?https://www.example.com
or
7i.se/?https://www.example.com

create a temporary link to "https://www.example.com" via a GET request using the key "KeyToExample":

7i.se/KeyToExample?https://www.example.com
or
7i.se/KeyToExample/?https://www.example.com

TODO

  • Implement shortening of URLs
    • 1 char long - configurabe timeout
    • 2 chars long - configurabe timeout
    • 3 chars long - configurabe timeout
    • make timeouts configurable
    • temporary word bindings (7i.se/coolthing)
    • quick add link via get request with syntax 7i.se?https://example.com
    • quick add word bindings link via get request with syntax 7i.se/coolthing?https://example.com where coolthing is the key
    • optional removal of link after N accesses
  • Add functionality to print where a link is pointing by adding ~ at the end of the link e.g. 7i.se/a~ will display where 7i.se/a is pointing to
  • Add config file that specifies relevant options
  • Pastebin functionality with same timeouts as above
  • Move to ssl with Let's Encrypt
  • Save all active links in a database file instead of gob files
  • Add support for subdomains with diffrent configs e.g. d1.7i.se
    • Add password/client cert protected subdomain management e.g. d1.7i.se/admin
    • Let the user managing a subdomain specify generic links and set timeouts, including "no timeout" for the shortened links, text-blobs and files.
  • Enable CSP
    • Move all js and css to seperate files and modify html/template files to use these
    • Setup a CSP report collector
  • Use blocklists for known malware sites, integrate with:
  • Include report form to take down links that breaks terms of usage
    • implement capcha for submitting reports to take down links
  • Create Terms of usage

License

The shorter project is dual-licensed to the public domain and under a zero-clause BSD license. You may choose either license to govern your use of shorter.

About

URL shortener with pastebin and file upload functions

Resources

License

0BSD, Unlicense licenses found

Licenses found

0BSD
LICENSE
Unlicense
UNLICENSE

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published