diff --git a/reality/Dockerfile b/reality/Dockerfile index 2218f6c..45f57df 100644 --- a/reality/Dockerfile +++ b/reality/Dockerfile @@ -3,7 +3,7 @@ FROM golang:alpine as builder LABEL maintainer="wulabing " -ENV GOPROXY=https://goproxy.cn,direct +#ENV GOPROXY=https://goproxy.cn,direct WORKDIR /app 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 / -RUN apk add --no-cache tzdata ca-certificates jq && \ +RUN apk add --no-cache tzdata ca-certificates jq curl && \ mkdir -p /var/log/xray &&\ 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 && \ diff --git a/reality/entrypoint.sh b/reality/entrypoint.sh index fc3cea4..b10b72f 100644 --- a/reality/entrypoint.sh +++ b/reality/entrypoint.sh @@ -2,11 +2,12 @@ if [ -f /config_info.txt ]; then echo "config.json exist" else + IPV6=$(curl -6 ip.sb || echo "null") + IPV4=$(curl -4 ip.sb || echo "null") if [ -z "$UUID" ]; then echo "UUID is not set, generate random UUID " UUID="$(/xray uuid)" echo "UUID: $UUID" - fi if [ -z "$DEST" ]; then @@ -44,6 +45,8 @@ else # config info with green color 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 "DEST: $DEST" >>/config_info.txt echo "SERVERNAMES: $SERVERNAMES (任选其一)" >>/config_info.txt