hf commited on
Commit
46bff3b
1 Parent(s): 6ac4a77
Files changed (4) hide show
  1. Caddyfile +8 -0
  2. Dockerfile +23 -0
  3. config.json +38 -0
  4. start.sh +3 -0
Caddyfile ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ admin off
3
+ }
4
+
5
+ :7860 {
6
+ reverse_proxy * 127.0.0.1:10000
7
+ }
8
+
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu:latest
2
+
3
+ EXPOSE 7860
4
+
5
+ WORKDIR /bz/
6
+
7
+ COPY Caddyfile /bz/Caddyfile
8
+
9
+ COPY config.json /bz/config.json
10
+
11
+ COPY start.sh /bz/start.sh
12
+
13
+ RUN apt update && apt install -y wget unzip && \
14
+ wget https://github.com/v2fly/v2ray-core/releases/download/v5.16.1/v2ray-linux-64.zip -O /bz/v2.zip && \
15
+ wget https://github.com/caddyserver/caddy/releases/download/v2.7.6/caddy_2.7.6_linux_amd64.tar.gz -O /bz/caddy.tar.gz && \
16
+ unzip -d /bz/ /bz/v2.zip && \
17
+ tar -zxvf /bz/caddy.tar.gz -C /bz/ && \
18
+ RUN --mount=type=secret,id=UUID,mode=0444,required=true \
19
+ sed -i "/UUID/$(cat /run/secrets/UUID)/g" config.json
20
+
21
+ RUN chmod -R 777 /bz/
22
+
23
+ ENTRYPOINT ["/bin/bash" ,"/bz/start.sh"]
config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "inbounds": [
3
+ {
4
+ "port": 10000,
5
+ "listen": "127.0.0.1",
6
+ "protocol": "vmess",
7
+ "settings": {
8
+ "clients": [
9
+ {
10
+ "id": "UUID",
11
+ "level": 0,
12
+ "alterId": 0
13
+ }
14
+ ],
15
+ "disableInsecureEncryption": true
16
+ },
17
+ "streamSettings": {
18
+ "network": "ws",
19
+ "wsSettings": {
20
+ "path": "/"
21
+ }
22
+ }
23
+ }
24
+ ],
25
+ "outbounds": [
26
+ {
27
+ "protocol": "freedom",
28
+ "settings": {}
29
+ }
30
+ ],
31
+ "dns": {
32
+ "server": [
33
+ "8.8.8.8",
34
+ "8.8.4.4",
35
+ "localhost"
36
+ ]
37
+ }
38
+ }
start.sh ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ #!/bin/bash
2
+ /bz/caddy start --config /bz/Caddyfile
3
+ exec /bz/v2ray -config /bz/config.json