mirror of
https://github.com/newnius/Dockerfiles.git
synced 2025-12-15 10:26:44 +00:00
add socks2http
This commit is contained in:
11
socks2http/Dockerfile
Normal file
11
socks2http/Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
FROM alpine:3.7
|
||||||
|
|
||||||
|
MAINTAINER Newnius <newnius.cn@gmail.com>
|
||||||
|
|
||||||
|
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"]
|
||||||
16
socks2http/README.md
Normal file
16
socks2http/README.md
Normal file
@@ -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_
|
||||||
5
socks2http/bootstrap.sh
Normal file
5
socks2http/bootstrap.sh
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
echo "forward-socks5 / $1 ." >> /etc/privoxy/config
|
||||||
|
|
||||||
|
privoxy --no-deamon
|
||||||
Reference in New Issue
Block a user