diff --git a/README.md b/README.md index 8d72f5d..1a917ae 100644 --- a/README.md +++ b/README.md @@ -267,6 +267,7 @@ A collection of delicious docker recipes. - [x] shadowsocks-libev :+1: - [x] shadowsocks-arm - [x] shadowsocks-libev-arm :+1: +- [x] sniproxy - [x] spiped - [x] squid - [x] stunnel diff --git a/sniproxy/Dockerfile b/sniproxy/Dockerfile new file mode 100644 index 0000000..035ec77 --- /dev/null +++ b/sniproxy/Dockerfile @@ -0,0 +1,13 @@ +# +# Dockerfile for sniproxy +# + +FROM alpine:3 +MAINTAINER EasyPi Software Foundation + +RUN apk add --no-cache sniproxy + +EXPOSE 80 443 + +ENTRYPOINT ["/usr/sbin/sniproxy"] +CMD ["-f", "-n", "65536", "-c", "/etc/sniproxy/sniproxy.conf"] diff --git a/sniproxy/README.md b/sniproxy/README.md new file mode 100644 index 0000000..552023e --- /dev/null +++ b/sniproxy/README.md @@ -0,0 +1,7 @@ +sniproxy +======== + +[sniproxy][1] - Proxies incoming HTTP and TLS connections based on the hostname +contained in the initial request of the TCP session. + +[1]: https://github.com/dlundquist/sniproxy diff --git a/sniproxy/data/sniproxy.conf b/sniproxy/data/sniproxy.conf new file mode 100644 index 0000000..678305d --- /dev/null +++ b/sniproxy/data/sniproxy.conf @@ -0,0 +1,25 @@ +user sniproxy +pidfile /var/run/sniproxy/sniproxy.pid + +error_log { + filename /var/log/sniproxy/error.log + priority notice +} + +listener 0.0.0.0 80 { + proto http + access_log { + filename /var/log/sniproxy/access.log + } +} + +listener 0.0.0.0 443 { + proto tls + access_log { + filename /var/log/sniproxy/access.log + } +} + +table { + mydomain\.com * +} diff --git a/sniproxy/docker-compose.yml b/sniproxy/docker-compose.yml new file mode 100644 index 0000000..ba49c52 --- /dev/null +++ b/sniproxy/docker-compose.yml @@ -0,0 +1,10 @@ +version: "3.8" +services: + sniproxy: + image: vimagick/sniproxy + ports: + - "80:80" + - "443:443" + volumes: + - ./data:/etc/sniproxy + restart: unless-stopped