Merge branch 'main' into main

This commit is contained in:
Ho3ein 2023-05-08 10:31:30 +03:30 committed by GitHub
commit 84ffec73c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 31 deletions

View file

@ -11,15 +11,15 @@ jobs:
steps: steps:
- name: Check out the code - name: Check out the code
uses: actions/checkout@v3.5.2 uses: actions/checkout@v3
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v2.1.0 uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.5.0 uses: docker/setup-buildx-action@v2
- name: Log in to GitHub Container Registry - name: Log in to GitHub Container Registry
uses: docker/login-action@v2.1.0 uses: docker/login-action@v2
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
@ -27,15 +27,15 @@ jobs:
- name: Docker meta - name: Docker meta
id: meta id: meta
uses: docker/metadata-action@v4.4.0 uses: docker/metadata-action@v4
with: with:
images: ghcr.io/${{ github.repository }} images: ghcr.io/${{ github.repository }}
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@v4.0.0 uses: docker/build-push-action@v4
with: with:
context: . context: .
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64 platforms: linux/amd64, linux/arm64
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}

View file

@ -1,9 +1,6 @@
# Use the official Golang image as the base image # Use the official Golang image as the base image
FROM golang:1.20 as builder FROM --platform=$BUILDPLATFORM golang:1.20 as builder
ARG TARGETOS TARGETARCH
ARG TARGETARCH
ARG TARGETOS
# Set up the working directory # Set up the working directory
WORKDIR /app WORKDIR /app
@ -14,19 +11,24 @@ RUN go mod download
# Copy the source code # Copy the source code
COPY . . COPY . .
RUN if [ "$TARGETARCH" = "arm64" ]; then apt update && apt install gcc-aarch64-linux-gnu -y; fi
# Build the X-ui binary # Build the X-ui binary
RUN CGO_ENABLED=1 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o xui-release-${TARGETARCH} -v main.go RUN if [ "$TARGETARCH" = "arm64" ]; then \
CGO_ENABLED=1 GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc go build -o xui-release -v main.go; \
elif [ "$TARGETARCH" = "amd64" ]; then \
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o xui-release -v main.go; \
fi
# Start a new stage using the base image # Start a new stage using the base image
FROM ubuntu:20.04 FROM ubuntu:20.04
ARG TARGETARCH
# Set up the working directory # Set up the working directory
WORKDIR /app WORKDIR /app
# Copy the X-ui binary and required files from the builder stage # Copy the X-ui binary and required files from the builder stage
COPY --from=builder /app/xui-release-${TARGETARCH} /app/x-ui/xui-release COPY --from=builder /app/xui-release /app/x-ui/xui-release
COPY x-ui.service /app/x-ui/x-ui.service COPY x-ui.service /app/x-ui/x-ui.service
COPY x-ui.sh /app/x-ui/x-ui.sh COPY x-ui.sh /app/x-ui/x-ui.sh
@ -34,21 +36,34 @@ COPY x-ui.sh /app/x-ui/x-ui.sh
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
wget \ wget \
unzip \ unzip \
tzdata \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
WORKDIR /app/x-ui/bin WORKDIR /app/x-ui/bin
# Download and set up the required files # Download and set up the required files
RUN wget https://github.com/mhsanaei/Xray-core/releases/latest/download/Xray-linux-64.zip \ RUN arch=$(uname -m) && \
if [ "$arch" = "aarch64" ]; then \
wget https://github.com/mhsanaei/xray-core/releases/latest/download/Xray-linux-arm64-v8a.zip \
&& unzip Xray-linux-arm64-v8a.zip \
&& rm -f Xray-linux-arm64-v8a.zip geoip.dat geosite.dat iran.dat \
&& wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat \
&& wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat \
&& wget https://github.com/bootmortis/iran-hosted-domains/releases/latest/download/iran.dat \
&& mv xray xray-linux-arm64; \
elif [ "$arch" = "x86_64" ]; then \
wget https://github.com/mhsanaei/Xray-core/releases/latest/download/Xray-linux-64.zip \
&& unzip Xray-linux-64.zip \ && unzip Xray-linux-64.zip \
&& rm -f Xray-linux-64.zip geoip.dat geosite.dat iran.dat \ && rm -f Xray-linux-64.zip geoip.dat geosite.dat iran.dat \
&& wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat \ && wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat \
&& wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat \ && wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat \
&& wget https://github.com/bootmortis/iran-hosted-domains/releases/latest/download/iran.dat \ && wget https://github.com/bootmortis/iran-hosted-domains/releases/latest/download/iran.dat \
&& mv xray xray-linux-\${TARGETARCH} && mv xray xray-linux-amd64; \
fi
WORKDIR /app WORKDIR /app/x-ui
RUN chmod +x /app/x-ui/x-ui.sh RUN chmod +x /app/x-ui/x-ui.sh
# Set the entrypoint # Set the entrypoint
ENTRYPOINT ["/app/x-ui/x-ui.sh"] ENTRYPOINT ["/app/x-ui/xui-release"]

View file

@ -3532,9 +3532,6 @@ to{max-height:0;padding:0;opacity:0}
.ant-modal-close{position:absolute;top:0;right:0;z-index:10;padding:0;color:rgba(0,0,0,.45);font-weight:700;line-height:1;text-decoration:none;background:0 0;border:0;outline:0;cursor:pointer;transition:color .3s} .ant-modal-close{position:absolute;top:0;right:0;z-index:10;padding:0;color:rgba(0,0,0,.45);font-weight:700;line-height:1;text-decoration:none;background:0 0;border:0;outline:0;cursor:pointer;transition:color .3s}
.ant-modal-close-x{display:block;width:56px;height:56px;font-size:16px;font-style:normal;line-height:56px;text-align:center;text-transform:none;text-rendering:auto} .ant-modal-close-x{display:block;width:56px;height:56px;font-size:16px;font-style:normal;line-height:56px;text-align:center;text-transform:none;text-rendering:auto}
.ant-modal-close:focus,.ant-modal-close:hover{color:rgba(0,0,0,.75);text-decoration:none} .ant-modal-close:focus,.ant-modal-close:hover{color:rgba(0,0,0,.75);text-decoration:none}
.ant-modal-header{padding:16px 24px;color:rgba(0,0,0,.65);background:#fff;border-bottom:1px solid rgba(100, 100, 100, 0.2);border-radius:4px 4px 0 0}
.ant-modal-body{padding:24px;font-size:14px;line-height:1.5;word-wrap:break-word}
.ant-modal-footer{padding:10px 16px;text-align:right;background:0 0;border-top:1px solid rgba(100, 100, 100, 0.2);border-radius:0 0 4px 4px}
.ant-modal-footer button+button{margin-bottom:0;margin-left:8px} .ant-modal-footer button+button{margin-bottom:0;margin-left:8px}
.ant-modal.zoom-appear,.ant-modal.zoom-enter{transform:none;opacity:0;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none} .ant-modal.zoom-appear,.ant-modal.zoom-enter{transform:none;opacity:0;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
.ant-modal-mask{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;height:100%;background-color:rgba(0,0,0,.45);filter:alpha(opacity=50)} .ant-modal-mask{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;height:100%;background-color:rgba(0,0,0,.45);filter:alpha(opacity=50)}

View file

@ -269,15 +269,13 @@
.ant-dropdown-menu-dark, .ant-dropdown-menu-dark,
.ant-card-dark .ant-modal-content { .ant-card-dark .ant-modal-content {
border:1px solid rgb(100 100 100 / 20%);
box-shadow: 0 2px 8px rgba(255,255,255,.15);
} }
.ant-card-dark .ant-modal-content, .ant-card-dark .ant-modal-content,
.ant-card-dark .ant-modal-body, .ant-card-dark .ant-modal-body,
.ant-card-dark .ant-modal-header { .ant-card-dark .ant-modal-header {
color: hsla(0,0%,100%,.65); color: hsla(0,0%,100%,.65);
background-color: #222a37; background-color: #1a212a;
} }
.ant-card-dark .ant-calendar-selected-day .ant-calendar-date { .ant-card-dark .ant-calendar-selected-day .ant-calendar-date {