ua-proxify

command
v0.0.0-...-f636f5e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2022 License: Unlicense Imports: 13 Imported by: 0

README

ua-proxify -- Transform external URLs in a message

This is a simple filter intended to be used before maildir-put. It changes the URL of external resources (CSS, images).

If the body contains relative references, it tries to resolve them using the url key of the message. If that’s not possible, no change is done.

Example usage, in ggsrc

get.php is a simple example script provided with ua-proxify. It can be used that way:

command 2000 "rss2json feed-url | \
	ua-proxify "http://example.com/get?url={{.URL|urlquery}}&sig={{.URL|HMAC \"$HMAC_KEY\"}}" | \
	maildir-put"

$HMAC_KEY can be generated with openssl rand -base64 32 and must be set in the top of get.php.

Installation

go build && cp ua-proxify /usr/local/bin

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL