Skip to content

Commit

Permalink
[Add] ✨ Support Latest Bypass
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry-zklcdc committed May 17, 2024
1 parent 4137261 commit 005416c
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 160 deletions.
16 changes: 1 addition & 15 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1 @@
FROM zklcdc/go-bingai-pass:latest

RUN wget https://github.com/Harry-zklcdc/go-proxy-bingai/releases/latest/download/go-proxy-bingai-linux-amd64.tar.gz -O go-proxy-bingai-linux-amd64.tar.gz && \
tar -zxvf go-proxy-bingai-linux-amd64.tar.gz && \
chmod +x go-proxy-bingai

RUN wget https://github.com/Harry-zklcdc/go-bingai-pass/releases/latest/download/go-bingai-pass-linux-amd64.tar.gz -O go-bingai-pass-linux-amd64.tar.gz && \
tar -zxvf go-bingai-pass-linux-amd64.tar.gz && \
chmod +x go-bingai-pass

RUN rm go-bingai-pass-linux-amd64.tar.gz go-proxy-bingai-linux-amd64.tar.gz

COPY supervisor.conf /etc/supervisor/conf.d/supervisor.conf

CMD [ "/usr/bin/bash", "-c", "while true;do sleep 3600;done" ]
FROM zklcdc/go-bingai-pass:latest
3 changes: 0 additions & 3 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@ services:
context: .
dockerfile: Dockerfile
no_cache: true
environment:
- HEADLESS=false
- PASS_TIMEOUT=5
ports:
- 7860:7860
46 changes: 0 additions & 46 deletions .devcontainer/supervisor.conf

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v4
with:
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
context: .
file: ./Dockerfile
push: true
Expand Down
55 changes: 5 additions & 50 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,65 +7,20 @@ WORKDIR /app

USER root

RUN apt-get update && apt-get install -y --no-install-recommends curl wget gnupg2 ca-certificates supervisor
RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates

# Install xcfb
RUN apt-get install -y --no-install-recommends xvfb xauth pulseaudio

# Install locales
RUN apt-get install -y --no-install-recommends language-pack-en tzdata locales && \
locale-gen en_US.UTF-8

# Install fluxbox
RUN apt-get install -y --no-install-recommends fluxbox eterm hsetroot feh

# Install Edge
RUN wget -q -O - https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/microsoft.gpg >/dev/null \
&& echo "deb https://packages.microsoft.com/repos/edge stable main" >> /etc/apt/sources.list.d/microsoft-edge.list \
&& apt-get update -qqy \
&& wget https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_116.0.1938.81-1_amd64.deb -O /tmp/microsoft-edge-stable_amd64.deb \
&& apt-get install -qqy --no-install-recommends /tmp/microsoft-edge-stable_amd64.deb \
&& rm /tmp/microsoft-edge-stable_amd64.deb
COPY wrap_edge_binary /opt/bin/wrap_edge_binary
RUN /opt/bin/wrap_edge_binary

RUN curl -L https://github.com/Harry-zklcdc/go-bingai-pass/releases/latest/download/go-bingai-pass-linux-amd64.tar.gz -o go-bingai-pass-linux-amd64.tar.gz && \
tar -zxvf go-bingai-pass-linux-amd64.tar.gz && \
RUN curl -L https://github.com/Harry-zklcdc/go-bingai-pass/releases/latest/download/go-bingai-pass-linux-${TARGETARCH}.tar.gz -o go-bingai-pass-linux.tar.gz && \
tar -zxvf go-bingai-pass-linux.tar.gz && \
chmod +x go-bingai-pass

RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm go-bingai-pass-linux-amd64.tar.gz

COPY start-xvfb.sh /opt/bin/start-xvfb.sh
COPY supervisor.conf /etc/supervisor/conf.d/supervisor.conf

# RUN groupadd -g $GBP_USER_ID $GBP_USER
# RUN useradd -rm -G sudo -u $GBP_USER_ID -g $GBP_USER_ID $GBP_USER

RUN mkdir -p /tmp/edge /var/run/supervisor /var/log/supervisor
RUN chown "${GBP_USER_ID}:${GBP_USER_ID}" /var/run/supervisor /var/log/supervisor
RUN chown -R "${GBP_USER_ID}:${GBP_USER_ID}" /app /tmp/edge
RUN chmod 777 /tmp
rm go-bingai-pass-linux.tar.gz

USER $GBP_USER

ENV SCREEN_WIDTH=1360
ENV SCREEN_HEIGHT=1020
ENV SCREEN_DEPTH=24
ENV SCREEN_DPI=96
ENV SE_START_XVFB=true
ENV DISPLAY=:99.0
ENV DISPLAY_NUM=99

ENV PORT=7860
ENV HEADLESS=false
ENV BROWSER_BINARY=/usr/bin/microsoft-edge
# ENV PASS_TIMEOUT=10
# ENV CHROME_PATH=/opt/google/chrome
ENV XDG_CONFIG_HOME=/tmp/edge
ENV XDG_CACHE_HOME=/tmp/edge

EXPOSE 7860

CMD /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisor.conf
CMD /app/go-bingai-pass
18 changes: 0 additions & 18 deletions start-xvfb.sh

This file was deleted.

27 changes: 0 additions & 27 deletions wrap_edge_binary

This file was deleted.

0 comments on commit 005416c

Please sign in to comment.