README.md (2085B)
1 # vanity - A tiny server for golang vanity redirects 2 3 ## Who is this for? 4 5 `vanity` is for anyone who wants to self host their own 6 [go vanity imports](https://pkg.go.dev/cmd/go#hdr-Remote_import_paths) without 7 having to maintain a full-scale webserver. 8 9 `vanity` deploys as a single binary with no configuration files and runs well 10 in a docker container. 11 12 13 ## Usage 14 15 Run `vanity` on a host with DNS that matches your desired namespace. Set the 16 destination to the actual location of your git repositories. 17 18 19 ``` 20 Usage: vanity -d <destination URI> 21 22 -d, --dest string Destination URI. Ex: https://git.markhuge.com 23 -p, --port int Port to listen on 24 --bind string Optional bind address (default "0.0.0.0") 25 -n, --namespace string Optional namespace Ex: markhuge.com. Default is the host in the request header 26 --verbose Verbose logging 27 --ssl-cert string Path to fully concatinated SSL certificate. Used optionally to enable SSL and serve HTTPS. (--ssl-key is also required with this option) 28 --ssl-key string Path to SSL Keyfile (ex: key.pem). Used in conjunction with --ssl-cert 29 --v Print version 30 -h, --help Print this help 31 --donate string Display QR code to donate to the project. possible values: btc, xmr, eth 32 ``` 33 34 ### Example 35 36 Let's say you have a package `foo` hosted on github at github.com/yourgithub/foo, 37 and you want to import it (or any other packages on your account) from 38 `yourname.biz/<package name>` 39 40 On a host with DNS for yourname.biz: `vanity --dest https://github.com/yourgithub --port 80` 41 42 ## Install 43 44 `go install markhuge.com/vanity` 45 46 ## Contribute 47 48 - Bugs: bugs@markhuge.com 49 - Patches: patches@markhuge.com 50 51 Submitted patches should include tests that cover the change. 52 53 ## Donate 54 55 Donate to this project: 56 57 - Monero (XMR): 88vd4Fxy3AdcUpZp3FChgu5RGBBoEANdpXaB5Bm47JRGKqYbxwQZo1MMwkguQAUDioEPyf4rFK1yMUCgrE7ojVpAVEEzXVD 58 - Bitcoin (BTC): bc1qk22yx0gfce54gx9csy6dp6kl629wm0m9kscwl8 59 - Ethereum (ETH): 0x10517dcb7f3357aB6888cD6067b12D1ce2727B26