You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
marco 566e1faaa2
Add code
3 weeks ago
.gitignore Update readme, gitignore 3 weeks ago
LICENSE.md Update license 4 weeks ago
Makefile Add code 3 weeks ago
README.md Update readme, gitignore 3 weeks ago
go.mod Add code 3 weeks ago
go.sum Add code 3 weeks ago
server.go Add code 3 weeks ago
server_test.go Add code 3 weeks ago

README.md

SDF Home Proxy

An http server to which one or more domains can be pointed to. Incoming requests will be proxied to an arbitrary target http server, like Amazon S3, Blogger.com or one of the many options available at sdf.org.

The main idea is to have a server which requires no configuration, handles TLS and can run on mostly any host on the internet with an IP address in one's possession. Obviously this solution is an end in itself and there already is Caddy.

Thanks to golang.org/x/crypto/acme/autocert, the server will automatically attempt to get a certificate from Let's Encrypt via the HTTP-01 challenge to enable TLS.

Usage

$ make build
$ export SDF_PROXY_LETS_ENCRYPT_EMAIL=domainadmin@example.com
$ export SDF_PROXY_ALLOWED_HOSTS=example.com,www.example.com
$ export SDF_PROXY_TARGET_HOST=example.sdf.org
$ export SDF_PROXY_TARGET_SCHEME=https
$ ./server

Future Ideas

  • Support for rewriting URL paths
  • Configuration option to keep keys and TLS certificates in memory only
  • Support for cgi-bin and/or FastCGI
  • Support for translating between protocols other than http for target servers
  • Support for logging and rudimentary analytics