File tree 3 files changed +19
-5
lines changed
3 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,15 @@ FROM ubuntu:18.10
2
2
MAINTAINER Jiaming Li <ljm625@gmail.com>
3
3
ENV NGINX_VERSION 1.9.11-1~jessie
4
4
RUN apt-get update
5
- RUN apt-get install -y ca-certificates nginx gettext-base vim supervisor python3.6 python3.6-dev python3-pip libyaml-dev
5
+ RUN apt-get install -y ca-certificates nginx gettext-base vim supervisor python3.6 python3.6-dev python3-pip libyaml-dev build-essential chrpath libssl-dev libxft-dev libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev
6
+ # Do phantomjs
7
+ RUN apt-get install -y wget
8
+ RUN cd ~
9
+ ENV PHANTOM_JS phantomjs-2.1.1-linux-x86_64
10
+ RUN wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/$PHANTOM_JS.tar.bz2
11
+ RUN tar xvjf $PHANTOM_JS.tar.bz2
12
+ RUN mv $PHANTOM_JS /usr/local/share
13
+ RUN ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
6
14
# forward request and error logs to docker log collector
7
15
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
8
16
&& ln -sf /dev/stderr /var/log/nginx/error.log
Original file line number Diff line number Diff line change @@ -47,10 +47,10 @@ def yaml_loader(file):
47
47
48
48
def validate_proxy (self ,proxy ,check = False ):
49
49
def build_proxy ():
50
- if proxy [2 ]== 'http' :
51
- return {"http" : "socks5 ://{}:{}" .format (proxy [0 ],proxy [1 ]),
52
- "https" : "socks5 ://{}:{}" .format (proxy [0 ],proxy [1 ])}
53
- elif proxy [2 ]== 'socks ' :
50
+ if proxy [2 ]== 'HTTP' or proxy [ 2 ] == "HTTPS" :
51
+ return {"http" : "http ://{}:{}" .format (proxy [0 ],proxy [1 ]),
52
+ "https" : "http ://{}:{}" .format (proxy [0 ],proxy [1 ])}
53
+ elif proxy [2 ]== 'SOCKS5 ' :
54
54
return {"http" : "socks5://{}:{}" .format (proxy [0 ],proxy [1 ]),
55
55
"https" : "socks5://{}:{}" .format (proxy [0 ],proxy [1 ])}
56
56
try :
Original file line number Diff line number Diff line change @@ -80,6 +80,12 @@ upstream_dns : "8.8.8.8"
80
80
# this is useful if u make a public server on the internet and avoid them to use it as a public HTTP Proxy. (Need to use with PAC or DNS)
81
81
disable_proxy : false
82
82
83
+ # Enable socks proxy
84
+ enable_socks : true
85
+ # Enable http/https proxy
86
+ enable_http : true
87
+
88
+
83
89
84
90
# Auto Generate Infos.
85
91
You can’t perform that action at this time.
0 commit comments