deeplee commited on
Commit
2ea52e9
·
1 Parent(s): 3fabae9

Upload 5 files

Browse files
Files changed (5) hide show
  1. Dockerfile +16 -0
  2. config.json +99 -0
  3. entrypoint.sh +38 -0
  4. mikutap.zip +3 -0
  5. nginx.conf +81 -0
Dockerfile ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM nginx:latest
2
+ EXPOSE 80
3
+ WORKDIR /app
4
+ USER root
5
+
6
+ COPY nginx.conf /etc/nginx/nginx.conf
7
+ COPY config.json ./
8
+ COPY entrypoint.sh ./
9
+
10
+ RUN apt-get update && apt-get install -y wget unzip iproute2 systemctl && \
11
+ wget -O temp.zip https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-64.zip && \
12
+ unzip temp.zip xray && \
13
+ rm -f temp.zip && \
14
+ chmod -v 755 xray entrypoint.sh
15
+
16
+ ENTRYPOINT [ "./entrypoint.sh" ]
config.json ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "log": {
3
+ "access": "/dev/null",
4
+ "error": "/dev/null",
5
+ "loglevel": "warning"
6
+ },
7
+ "inbounds": [
8
+ {
9
+ "port": 10000,
10
+ "listen": "127.0.0.1",
11
+ "protocol": "vmess",
12
+ "settings": {
13
+ "clients": [
14
+ {
15
+ "id": "UUID",
16
+ "alterId": 0
17
+ }
18
+ ]
19
+ },
20
+ "streamSettings": {
21
+ "network": "ws",
22
+ "wsSettings": {
23
+ "path": "VMESS_WSPATH"
24
+ }
25
+ }
26
+ },
27
+ {
28
+ "port": 20000,
29
+ "listen": "127.0.0.1",
30
+ "protocol": "vless",
31
+ "settings": {
32
+ "clients": [
33
+ {
34
+ "id": "UUID"
35
+ }
36
+ ],
37
+ "decryption": "none"
38
+ },
39
+ "streamSettings": {
40
+ "network": "ws",
41
+ "wsSettings": {
42
+ "path": "VLESS_WSPATH"
43
+ }
44
+ }
45
+ },
46
+ {
47
+ "port": 30000,
48
+ "listen": "127.0.0.1",
49
+ "protocol": "trojan",
50
+ "settings": {
51
+ "clients": [
52
+ {
53
+ "password": "UUID"
54
+ }
55
+ ],
56
+ "decryption": "none"
57
+ },
58
+ "streamSettings": {
59
+ "network": "ws",
60
+ "wsSettings": {
61
+ "path": "TROJAN_WSPATH"
62
+ }
63
+ }
64
+ },
65
+ {
66
+ "port": 40000,
67
+ "listen": "127.0.0.1",
68
+ "protocol": "shadowsocks",
69
+ "settings": {
70
+ "clients": [
71
+ {
72
+ "method": "chacha20-ietf-poly1305",
73
+ "password": "UUID"
74
+ }
75
+ ],
76
+ "decryption": "none"
77
+ },
78
+ "streamSettings": {
79
+ "network": "ws",
80
+ "wsSettings": {
81
+ "path": "SS_WSPATH"
82
+ }
83
+ }
84
+ }
85
+ ],
86
+ "outbounds": [
87
+ {
88
+ "protocol": "freedom",
89
+ "settings": {}
90
+ }
91
+ ],
92
+ "dns": {
93
+ "server": [
94
+ "8.8.8.8",
95
+ "8.8.4.4",
96
+ "localhost"
97
+ ]
98
+ }
99
+ }
entrypoint.sh ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+
3
+ # 定义 UUID 及 伪装路径,请自行修改.(注意:伪装路径以 / 符号开始,为避免不必要的麻烦,请不要使用特殊符号.)
4
+ UUID=${UUID:-'de04add9-5c68-8bab-950c-08cd5320df18'}
5
+ VMESS_WSPATH=${VMESS_WSPATH:-'/vmess'}
6
+ VLESS_WSPATH=${VLESS_WSPATH:-'/vless'}
7
+ TROJAN_WSPATH=${TROJAN_WSPATH:-'/trojan'}
8
+ SS_WSPATH=${SS_WSPATH:-'/shadowsocks'}
9
+ NEZHA_SERVER=${NEZHA_SERVER:-''}
10
+ NEZHA_PORT=${NEZHA_PORT:-''}
11
+ NEZHA_KEY=${NEZHA_KEY:-''}
12
+ TLS=${TLS:-'1'}
13
+ sed -i "s#UUID#$UUID#g;s#VMESS_WSPATH#${VMESS_WSPATH}#g;s#VLESS_WSPATH#${VLESS_WSPATH}#g;s#TROJAN_WSPATH#${TROJAN_WSPATH}#g;s#SS_WSPATH#${SS_WSPATH}#g" config.json
14
+ sed -i "s#VMESS_WSPATH#${VMESS_WSPATH}#g;s#VLESS_WSPATH#${VLESS_WSPATH}#g;s#TROJAN_WSPATH#${TROJAN_WSPATH}#g;s#SS_WSPATH#${SS_WSPATH}#g" /etc/nginx/nginx.conf
15
+ sed -i "s#RELEASE_RANDOMNESS#${RELEASE_RANDOMNESS}#g" /etc/supervisor/conf.d/supervisord.conf
16
+
17
+ # 设置 nginx 伪装站
18
+ rm -rf /usr/share/nginx/*
19
+ wget https://gitlab.com/Misaka-blog/xray-paas/-/raw/main/mikutap.zip -O /usr/share/nginx/mikutap.zip
20
+ unzip -o "/usr/share/nginx/mikutap.zip" -d /usr/share/nginx/html
21
+ rm -f /usr/share/nginx/mikutap.zip
22
+
23
+ # 伪装 xray 执行文件
24
+ RELEASE_RANDOMNESS=$(tr -dc 'A-Za-z0-9' </dev/urandom | head -c 6)
25
+ mv xray ${RELEASE_RANDOMNESS}
26
+ wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
27
+ wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat
28
+ cat config.json | base64 > config
29
+ rm -f config.json
30
+
31
+ # 如果有设置哪吒探针三个变量,会安装。如果不填或者不全,则不会安装
32
+ # wget -O cloudflared https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 && chmod +x cloudflared
33
+
34
+ [[ -n "${NEZHA_SERVER}" && -n "${NEZHA_PORT}" && -n "${NEZHA_KEY}" ]] && echo "Start Nezha" && curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && ./nezha.sh install_agent ${NEZHA_SERVER} ${NEZHA_PORT} ${NEZHA_KEY} --tls
35
+
36
+ nginx
37
+ base64 -d config > config.json
38
+ ./${RELEASE_RANDOMNESS} -config=config.json
mikutap.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e4b89db91b4006190c1883b2aac1a325a69707746ba35d0f61657994753e2b08
3
+ size 179526
nginx.conf ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ user nginx;
2
+ worker_processes auto;
3
+
4
+ error_log /var/log/nginx/error.log notice;
5
+ pid /var/run/nginx.pid;
6
+
7
+
8
+ events {
9
+ worker_connections 1024;
10
+ }
11
+
12
+
13
+ http {
14
+ include /etc/nginx/mime.types;
15
+ default_type application/octet-stream;
16
+
17
+ log_format main '$remote_addr - $remote_user [$time_local] "$request" '
18
+ '$status $body_bytes_sent "$http_referer" '
19
+ '"$http_user_agent" "$http_x_forwarded_for"';
20
+
21
+ access_log /var/log/nginx/access.log main;
22
+
23
+ sendfile on;
24
+ #tcp_nopush on;
25
+
26
+ keepalive_timeout 65;
27
+
28
+ #gzip on;
29
+
30
+ #include /etc/nginx/conf.d/*.conf;
31
+
32
+ server {
33
+ listen 80 default_server;
34
+ listen [::]:80 default_server;
35
+
36
+ server_name _;
37
+ charset utf-8;
38
+ root html;
39
+
40
+ location / {
41
+ root /usr/share/nginx/html;
42
+ index index.html index.htm;
43
+ }
44
+
45
+ location VMESS_WSPATH {
46
+ proxy_redirect off;
47
+ proxy_pass http://127.0.0.1:10000;
48
+ proxy_http_version 1.1;
49
+ proxy_set_header Upgrade $http_upgrade;
50
+ proxy_set_header Connection upgrade;
51
+ proxy_set_header Host $http_host;
52
+ }
53
+
54
+ location VLESS_WSPATH {
55
+ proxy_redirect off;
56
+ proxy_pass http://127.0.0.1:20000;
57
+ proxy_http_version 1.1;
58
+ proxy_set_header Upgrade $http_upgrade;
59
+ proxy_set_header Connection upgrade;
60
+ proxy_set_header Host $http_host;
61
+ }
62
+
63
+ location TROJAN_WSPATH {
64
+ proxy_redirect off;
65
+ proxy_pass http://127.0.0.1:30000;
66
+ proxy_http_version 1.1;
67
+ proxy_set_header Upgrade $http_upgrade;
68
+ proxy_set_header Connection upgrade;
69
+ proxy_set_header Host $http_host;
70
+ }
71
+
72
+ location SS_WSPATH {
73
+ proxy_redirect off;
74
+ proxy_pass http://127.0.0.1:40000;
75
+ proxy_http_version 1.1;
76
+ proxy_set_header Upgrade $http_upgrade;
77
+ proxy_set_header Connection upgrade;
78
+ proxy_set_header Host $http_host;
79
+ }
80
+ }
81
+ }