[fix] entrypoint.sh 逻辑错误修正
[update] Dockerfile 内容完善
[update] README.MD 更新
[update] Github Action 逻辑调整
This commit is contained in:
wulabing 2023-03-17 16:40:58 +08:00
parent 987328d6df
commit 3993f9da1b
No known key found for this signature in database
GPG Key ID: 213391AFDF73AE00
5 changed files with 47 additions and 37 deletions

View File

@ -37,13 +37,14 @@ jobs:
TAG_NAME=$(echo "$FIRST_LINE" | tr -d '[:space:]') # Remove spaces if needed TAG_NAME=$(echo "$FIRST_LINE" | tr -d '[:space:]') # Remove spaces if needed
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
- name: Build the Docker image latest
run: docker build --file ./reality/Dockerfile --tag wulabing/xray_docker_reality:latest ./reality
- name: Build the Docker image - name: Build the Docker image
run: docker build --file ./reality/Dockerfile --tag wulabing/xray_docker_reality:${{env.TAG_NAME}} ./reality run: docker build --file ./reality/Dockerfile --tag wulabing/xray_docker_reality:${{env.TAG_NAME}} ./reality
- name: Push the Docker image latest - name: Build the Docker image latest
run: docker push wulabing/xray_docker_reality:latest run: docker build --file ./reality/Dockerfile --tag wulabing/xray_docker_reality:latest ./reality
- name: Push the Docker image - name: Push the Docker image
run: docker push wulabing/xray_docker_reality:${{env.TAG_NAME}} run: docker push wulabing/xray_docker_reality:${{env.TAG_NAME}}
- name: Push the Docker image latest
run: docker push wulabing/xray_docker_reality:latest

View File

@ -24,7 +24,9 @@ ENV TZ=Asia/Shanghai
WORKDIR / WORKDIR /
COPY . / COPY ./entrypoint.sh /
COPY ./config.json /
COPY --from=builder /app/xray / COPY --from=builder /app/xray /
RUN apk add --no-cache tzdata ca-certificates util-linux jq && \ RUN apk add --no-cache tzdata ca-certificates util-linux jq && \

View File

@ -12,7 +12,7 @@ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
``` ```
docker run -d --name xray_reality --restart=always -p 443:443 wulabing/xray_docker_reality:0.0.1 docker run -d --name xray_reality --restart=always -p 443:443 wulabing/xray_docker_reality:latest
``` ```
查看日志获取配置信息 查看日志获取配置信息

View File

@ -1 +1,6 @@
## 已知可用的 SERVERNAMES 及 DEST 列表 ## 已知可用的 SERVERNAMES 及 DEST 列表
| DEST | SERVERMANES | 说明 |
|-------------------|--------------------------------|------------------------------------|
| www.apple.com:443 | images.apple.com www.apple.com | Apple 使用了 akamai CDN全球各地存在节点并且知名 |

View File

@ -1,7 +1,6 @@
#!/bin/sh #!/bin/sh
if [ -f /config_info.txt ]; then if [ -f /config_info.txt ]; then
echo "config.json exist" echo "config.json exist"
cat /config_info.txt
else else
if [ -z "$UUID" ]; then if [ -z "$UUID" ]; then
echo "UUID is not set, generate random UUID " echo "UUID is not set, generate random UUID "
@ -42,7 +41,6 @@ else
jq ".inbounds[0].streamSettings.realitySettings.privateKey=\"$PRIVATEKEY\"" /config.json >/config.json_tmp && mv /config.json_tmp /config.json jq ".inbounds[0].streamSettings.realitySettings.privateKey=\"$PRIVATEKEY\"" /config.json >/config.json_tmp && mv /config.json_tmp /config.json
jq ".inbounds[0].streamSettings.network=\"$NETWORK\"" /config.json >/config.json_tmp && mv /config.json_tmp /config.json jq ".inbounds[0].streamSettings.network=\"$NETWORK\"" /config.json >/config.json_tmp && mv /config.json_tmp /config.json
fi
# config info with green color # config info with green color
echo -e "\033[32m" >/config_info.txt echo -e "\033[32m" >/config_info.txt
@ -53,6 +51,10 @@ echo "PRIVATEKEY: $PRIVATEKEY" >>/config_info.txt
echo "PUBLICKEY: $PUBLICKEY" >>/config_info.txt echo "PUBLICKEY: $PUBLICKEY" >>/config_info.txt
echo "NETWORK: $NETWORK" >>/config_info.txt echo "NETWORK: $NETWORK" >>/config_info.txt
echo -e "\033[0m" >>/config_info.txt echo -e "\033[0m" >>/config_info.txt
fi
# show config info
cat /config_info.txt
# run xray # run xray
exec /xray -config /config.json exec /xray -config /config.json