1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| ENV foo /overture
WORKDIR ${foo}
RUN apt-get update && apt-get install -y ca-certificates
RUN printf "deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse\n deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse\n deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse\n deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse\n deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse\n deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse\n deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse\n deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y wget curl unzip apt-utils vim
RUN cd /overture
RUN wget https://github.com/shawn1m/overture/releases/download/v1.5-rc1/overture-linux-amd64.zip
RUN unzip overture-linux-amd64.zip
RUN curl https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt | base64 -d | sort -u | sed '/^$\|@@/d'| sed 's#!.\+##; s#|##g; s#@##g; s#http:\/\/##; s#https:\/\/##;' | sed '/\*/d; /apple\.com/d; /sina\.cn/d; /sina\.com\.cn/d; /baidu\.com/d; /qq\.com/d' | sed '/^[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+$/d' | grep '^[0-9a-zA-Z\.-]\+$' | grep '\.' | sed 's#^\.\+##' | sort -u > /tmp/temp_gfwlist.txt
RUN curl https://raw.githubusercontent.com/hq450/fancyss/master/rules/gfwlist.conf | sed 's/ipset=\/\.//g; s/\/gfwlist//g; /^server/d' > /tmp/temp_koolshare.txt
RUN cat /tmp/temp_gfwlist.txt /tmp/temp_koolshare.txt | sort -u > gfw_all_domain.txt
RUN wget https://raw.githubusercontent.com/17mon/china_ip_list/master/china_ip_list.txt
RUN printf '{ \n "BindAddress": ":53",\n "PrimaryDNS": [\n {\n "Name": "DNSPod",\n "Address": "114.114.114.114:53",\n "Protocol": "udp",\n "SOCKS5Address": "",\n "Timeout": 6,\n "EDNSClientSubnet": {\n "Policy": "auto",\n "ExternalIP": "222.90.74.60",\n "NoCookie": true\n }\n }\n ],\n "AlternativeDNS": [\n {\n "Name": "OpenDNS",\n "Address": "208.67.222.222:443",\n "Protocol": "tcp",\n "SOCKS5Address": "",\n "Timeout": 6,\n "EDNSClientSubnet": {\n "Policy": "manual",\n "ExternalIP": "202.60.225.114",\n "NoCookie": true\n }\n }\n ],\n "OnlyPrimaryDNS": false,\n "IPv6UseAlternativeDNS": false,\n "IPNetworkFile": {\n "Primary": "./china_ip_list.txt",\n "Alternative": "./ip_network_alternative_sample"\n },\n "DomainFile": {\n "Primary": "./domain_primary_sample",\n "Alternative": "./gfw_all_domain.txt"\n },\n "HostsFile": "./hosts_sample",\n "MinimumTTL": 0,\n "CacheSize" : 0,\n "RejectQtype": [255]\n }' > config.json
CMD ["./overture-linux-amd64"]
#ENTRYPOINT ["./overture-linux-amd64"]
|