Update readme, gitignore
This commit is contained in:
parent
850052ce0f
commit
e13f14ab49
|
@ -1,23 +1 @@
|
|||
# ---> Go
|
||||
# If you prefer the allow list template instead of the deny list, see community template:
|
||||
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
|
||||
#
|
||||
# Binaries for programs and plugins
|
||||
*.exe
|
||||
*.exe~
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
|
||||
# Dependency directories (remove the comment below to include it)
|
||||
# vendor/
|
||||
|
||||
# Go workspace file
|
||||
go.work
|
||||
|
||||
./server
|
32
README.md
32
README.md
|
@ -1,2 +1,32 @@
|
|||
# sdfhomeproxy
|
||||
# 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](https://caddyserver.com/).
|
||||
|
||||
Thanks to [golang.org/x/crypto/acme/autocert](https://pkg.go.dev/golang.org/x/crypto/acme/autocert), the server will automatically attempt to get a certificate from Let's Encrypt via the [HTTP-01 challenge](https://letsencrypt.org/docs/challenge-types/#http-01-challenge) to enable TLS.
|
||||
|
||||
## Usage
|
||||
|
||||
```shell
|
||||
$ make build
|
||||
```
|
||||
|
||||
```shell
|
||||
$ 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](https://pkg.go.dev/net/http/cgi) and/or [FastCGI](https://pkg.go.dev/net/http/fcgi)
|
||||
- Support for translating between protocols other than http for target servers
|
||||
- for example http to gopher like [gopherproxy](https://git.mills.io/prologic/gopherproxy) with
|
||||
[go-gopher](https://git.mills.io/prologic/go-gopher)
|
||||
- Support for logging and rudimentary analytics
|
||||
|
|
Loading…
Reference in New Issue