Spaces:
Sleeping
Sleeping
Upload 6 files
Browse files- .gitattributes +1 -0
- Dockerfile +16 -0
- box +3 -0
- config.json +34 -0
- entrypoint.sh +2 -0
- nginx.conf +57 -0
- supervisord.conf +19 -0
.gitattributes
CHANGED
@@ -32,3 +32,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
35 |
+
box filter=lfs diff=lfs merge=lfs -text
|
Dockerfile
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM debian:bullseye-slim
|
2 |
+
EXPOSE 8080
|
3 |
+
RUN apk add --no-cache shadow \
|
4 |
+
&& groupadd sudo \
|
5 |
+
&& useradd -m drx -u 1000 \
|
6 |
+
&& echo 'drx:1000' | chpasswd \
|
7 |
+
&& usermod -aG sudo drx
|
8 |
+
RUN apt update -y && apt install -y nginx supervisor
|
9 |
+
COPY box /usr/bin/box
|
10 |
+
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
11 |
+
COPY nginx.conf /etc/nginx/nginx.conf
|
12 |
+
COPY config.json /etc/config.json
|
13 |
+
COPY entrypoint.sh /entrypoint.sh
|
14 |
+
RUN chmod +x /usr/bin/box \
|
15 |
+
&& chmod +x /entrypoint.sh
|
16 |
+
ENTRYPOINT [ "/entrypoint.sh" ]
|
box
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ee144d7fbebf8f5b6f89914c5d9495730e3c3402819d6a9a119d169c28aca12a
|
3 |
+
size 17989632
|
config.json
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"log": {
|
3 |
+
"loglevel": "warning"
|
4 |
+
},
|
5 |
+
"inbounds": [
|
6 |
+
{
|
7 |
+
"port": 8443,
|
8 |
+
"listen": "127.0.0.1",
|
9 |
+
"protocol": "vless",
|
10 |
+
"settings": {
|
11 |
+
"clients": [
|
12 |
+
{
|
13 |
+
"id": "047ecf42-f2ff-4e32-ad98-3c78c3a93b6e",
|
14 |
+
"level": 0,
|
15 |
+
"email": "demo@demo.com"
|
16 |
+
}
|
17 |
+
],
|
18 |
+
"decryption": "none"
|
19 |
+
},
|
20 |
+
"streamSettings": {
|
21 |
+
"network": "ws",
|
22 |
+
"security": "none",
|
23 |
+
"wsSettings": {
|
24 |
+
"path": "/news"
|
25 |
+
}
|
26 |
+
}
|
27 |
+
}
|
28 |
+
],
|
29 |
+
"outbounds": [
|
30 |
+
{
|
31 |
+
"protocol": "freedom"
|
32 |
+
}
|
33 |
+
]
|
34 |
+
}
|
entrypoint.sh
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
#!/bin/sh
|
2 |
+
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
|
nginx.conf
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
user www-data;
|
3 |
+
worker_processes auto;
|
4 |
+
|
5 |
+
error_log /var/log/nginx/error.log notice;
|
6 |
+
pid /var/run/nginx.pid;
|
7 |
+
|
8 |
+
|
9 |
+
events {
|
10 |
+
worker_connections 1024;
|
11 |
+
}
|
12 |
+
|
13 |
+
|
14 |
+
http {
|
15 |
+
include /etc/nginx/mime.types;
|
16 |
+
default_type application/octet-stream;
|
17 |
+
|
18 |
+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
19 |
+
'$status $body_bytes_sent "$http_referer" '
|
20 |
+
'"$http_user_agent" "$http_x_forwarded_for"';
|
21 |
+
|
22 |
+
access_log /var/log/nginx/access.log main;
|
23 |
+
|
24 |
+
sendfile on;
|
25 |
+
#tcp_nopush on;
|
26 |
+
|
27 |
+
keepalive_timeout 65;
|
28 |
+
|
29 |
+
#gzip on;
|
30 |
+
|
31 |
+
#include /etc/nginx/conf.d/*.conf;
|
32 |
+
|
33 |
+
server {
|
34 |
+
listen 8080 default_server;
|
35 |
+
listen [::]:8080 default_server;
|
36 |
+
|
37 |
+
server_name _;
|
38 |
+
charset utf-8;
|
39 |
+
root html;
|
40 |
+
|
41 |
+
location / {
|
42 |
+
root /usr/share/nginx/html;
|
43 |
+
index index.html index.htm;
|
44 |
+
}
|
45 |
+
|
46 |
+
location /news {
|
47 |
+
proxy_redirect off;
|
48 |
+
proxy_pass http://127.0.0.1:8443;
|
49 |
+
proxy_http_version 1.1;
|
50 |
+
proxy_set_header Upgrade $http_upgrade;
|
51 |
+
proxy_set_header Connection upgrade;
|
52 |
+
proxy_set_header Host $http_host;
|
53 |
+
#proxy_set_header X-Real-IP $remote_addr;
|
54 |
+
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
55 |
+
}
|
56 |
+
}
|
57 |
+
}
|
supervisord.conf
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[supervisord]
|
2 |
+
user=drx
|
3 |
+
nodaemon=true
|
4 |
+
logfile=/var/log/supervisord.log
|
5 |
+
pidfile=/run/supervisord.pid
|
6 |
+
[program:nginx]
|
7 |
+
command=nginx -g 'daemon off;'
|
8 |
+
stdout_logfile=/dev/stdout
|
9 |
+
stdout_logfile_maxbytes=0
|
10 |
+
redirect_stderr=true
|
11 |
+
autorestart=false
|
12 |
+
startretries=0
|
13 |
+
[program:v2ray]
|
14 |
+
command=/usr/bin/box -config=/etc/config.json
|
15 |
+
stdout_logfile=/dev/stdout
|
16 |
+
stdout_logfile_maxbytes=0
|
17 |
+
redirect_stderr=true
|
18 |
+
autorestart=false
|
19 |
+
startretries=0
|