chore: update

This commit is contained in:
zizifn
2020-12-13 21:04:31 +08:00
committed by zizifn3
parent 99deecc173
commit 1460c8fdfe
3 changed files with 30 additions and 27 deletions

View File

@@ -7,36 +7,12 @@ FROM v2fly/v2fly-core:latest
# CMD /configure.sh # CMD /configure.sh
ADD v2rayconf.sh .
ARG UUID ARG UUID
ENV UUID=$UUID ENV UUID=$UUID
RUN touch /etc/v2ray/config.json RUN touch /etc/v2ray/config.json
RUN cat > /etc/v2ray/config.json <<'EOF' \ RUN v2rayconf.sh
{ \
"inbounds": [\
{\
"port": $PORT,\
"protocol": "vmess",\
"settings": {\
"clients": [\
{\
"id": "$UUID",\
"alterId": 64\
}\
],\
"disableInsecureEncryption": true\
},\
"streamSettings": {\
"network": "ws"\
}\
}\
],\
"outbounds": [\
{\
"protocol": "freedom"\
}\
]\
}\
EOF
CMD [ "/usr/bin/v2ray", "-config", "/etc/v2ray/config.json" ] CMD [ "/usr/bin/v2ray", "-config", "/etc/v2ray/config.json" ]

View File

27
v2rayconf.sh Normal file
View File

@@ -0,0 +1,27 @@
cat << EOF > /etc/v2ray/config.json
{
"inbounds": [
{
"port": $PORT,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "$UUID",
"alterId": 64
}
],
"disableInsecureEncryption": true
},
"streamSettings": {
"network": "ws"
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
]
}
EOF