diff --git a/socks2http/Dockerfile b/socks2http/Dockerfile new file mode 100644 index 0000000..7f5fedd --- /dev/null +++ b/socks2http/Dockerfile @@ -0,0 +1,11 @@ +FROM alpine:3.7 + +MAINTAINER Newnius + +RUN apk add --no-cache privoxy + +RUN sed -i'' 's/127\.0\.0\.1:8118/0\.0\.0\.0:8118/' /etc/privoxy/config + +ADD bootstrap.sh /etc/bootstrap.sh + +ENTRYPOINT ["/etc/bootstrap.sh"] diff --git a/socks2http/README.md b/socks2http/README.md new file mode 100644 index 0000000..3c47ee1 --- /dev/null +++ b/socks2http/README.md @@ -0,0 +1,16 @@ +# socks2http + +Convert Socks(5) proxy to http proxy. + +#### Example + +```bash +docker run \ +-d \ +--restart always \ +--publish 8118:8118 \ +--name socks2http \ +newnius/socks2http SOCKS5_PROXY_ADDR:PORT +``` + +_`SOCKS_PROXY_ADDR` can not be 127.0.0.1_ diff --git a/socks2http/bootstrap.sh b/socks2http/bootstrap.sh new file mode 100644 index 0000000..d072e46 --- /dev/null +++ b/socks2http/bootstrap.sh @@ -0,0 +1,5 @@ +#! /bin/sh + +echo "forward-socks5 / $1 ." >> /etc/privoxy/config + +privoxy --no-deamon