[update] 添加 IP 显示
[fix] 去除 Go CN Proxy
This commit is contained in:
wulabing 2023-03-22 21:28:56 +08:00
parent ef85cdcd95
commit 4741cbdb62
2 changed files with 6 additions and 3 deletions

View File

@ -3,7 +3,7 @@ FROM golang:alpine as builder
LABEL maintainer="wulabing <wulabing@gmail.com>" LABEL maintainer="wulabing <wulabing@gmail.com>"
ENV GOPROXY=https://goproxy.cn,direct #ENV GOPROXY=https://goproxy.cn,direct
WORKDIR /app WORKDIR /app
RUN apk add --no-cache git && git clone https://github.com/XTLS/Xray-core.git . && \ RUN apk add --no-cache git && git clone https://github.com/XTLS/Xray-core.git . && \
@ -29,7 +29,7 @@ COPY ./config.json /
COPY --from=builder /app/xray / COPY --from=builder /app/xray /
RUN apk add --no-cache tzdata ca-certificates jq && \ RUN apk add --no-cache tzdata ca-certificates jq curl && \
mkdir -p /var/log/xray &&\ mkdir -p /var/log/xray &&\
wget -O /geosite.dat https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat && \ wget -O /geosite.dat https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat && \
wget -O /geoip.dat https://github.com/v2fly/geoip/releases/latest/download/geoip.dat && \ wget -O /geoip.dat https://github.com/v2fly/geoip/releases/latest/download/geoip.dat && \

View File

@ -2,11 +2,12 @@
if [ -f /config_info.txt ]; then if [ -f /config_info.txt ]; then
echo "config.json exist" echo "config.json exist"
else else
IPV6=$(curl -6 ip.sb || echo "null")
IPV4=$(curl -4 ip.sb || echo "null")
if [ -z "$UUID" ]; then if [ -z "$UUID" ]; then
echo "UUID is not set, generate random UUID " echo "UUID is not set, generate random UUID "
UUID="$(/xray uuid)" UUID="$(/xray uuid)"
echo "UUID: $UUID" echo "UUID: $UUID"
fi fi
if [ -z "$DEST" ]; then if [ -z "$DEST" ]; then
@ -44,6 +45,8 @@ else
# config info with green color # config info with green color
echo -e "\033[32m" >/config_info.txt echo -e "\033[32m" >/config_info.txt
echo "IPV6: $IPV6" >>/config_info.txt
echo "IPV4: $IPV4" >>/config_info.txt
echo "UUID: $UUID" >>/config_info.txt echo "UUID: $UUID" >>/config_info.txt
echo "DEST: $DEST" >>/config_info.txt echo "DEST: $DEST" >>/config_info.txt
echo "SERVERNAMES: $SERVERNAMES (任选其一)" >>/config_info.txt echo "SERVERNAMES: $SERVERNAMES (任选其一)" >>/config_info.txt