diff --git a/Dockerfile b/Dockerfile index 10b8c5e..78494b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,23 @@ -FROM debian:sid +FROM alpine:3.16 -ARG V2RAY_VERSION=v1.3.1 +ENV XRAY_PLUGIN_VERSION v1.5.5 +ENV SHADOWSOCKS_VERSION v1.14.3 COPY conf/ /conf COPY entrypoint.sh /entrypoint.sh -ARG DEBIAN_FRONTEND=noninteractive RUN set -ex\ - && apt update -y \ - && apt install -y wget qrencode shadowsocks-libev nginx-light jq \ - && apt clean -y \ + && apk add --no-cache libqrencode wget nginx jq \ && chmod +x /entrypoint.sh \ - && mkdir -p /etc/shadowsocks-libev /v2raybin /wwwroot \ - && wget -O- "https://github.com/shadowsocks/v2ray-plugin/releases/download/${V2RAY_VERSION}/v2ray-plugin-linux-amd64-${V2RAY_VERSION}.tar.gz" | \ - tar zx -C /v2raybin \ - && install /v2raybin/v2ray-plugin_linux_amd64 /usr/bin/v2ray-plugin \ - && rm -rf /v2raybin + && mkdir -p /etc/shadowsocks-libev /wwwroot \ + && wget -O /root/xray-plugin.tar.gz https://github.com/teddysun/xray-plugin/releases/download/${XRAY_PLUGIN_VERSION}/xray-plugin-linux-amd64-${XRAY_PLUGIN_VERSION}.tar.gz \ + && tar xvzf /root/xray-plugin.tar.gz -C /root \ + && mv /root/xray-plugin_linux_amd64 /usr/local/bin/xray-plugin \ + && rm -f /root/xray-plugin.tar.gz \ + && wget -O /root/shadowsocks-plugin.tar.xz https://github.com/shadowsocks/shadowsocks-rust/releases/download/${SHADOWSOCKS_VERSION}/shadowsocks-${SHADOWSOCKS_VERSION}.x86_64-unknown-linux-musl.tar.xz \ + && tar xvf /root/shadowsocks-plugin.tar.xz -C /root \ + && mv /root/ss* /usr/local/bin/ \ + && rm -f /root/shadowsocks-plugin.tar.xz \ + && apk del wget CMD /entrypoint.sh diff --git a/README.md b/README.md index 9857533..a90e7dd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Personal VPN -## Shadowsocks+V2Ray-plugin +## [shadowsocks-rust](https://github.com/shadowsocks/shadowsocks-rust)+[xray-plugin](https://github.com/teddysun/xray-plugin) Click the button below to deploy to Heroku @@ -50,9 +50,9 @@ Path: "/" + value of V2_Path in app Config Vars Those without a client can also download from here (Android): -[shadowsocks](https://github.com/shadowsocks/shadowsocks-android/releases/latest/download/shadowsocks--universal-5.1.9.apk) +[shadowsocks](https://github.com/shadowsocks/shadowsocks-android/releases/latest/) -[v2ray-plugin](https://github.com/shadowsocks/v2ray-plugin-android/releases/latest/download/v2ray-arm64-v8a-1.3.1.apk) +[v2ray-plugin](https://github.com/shadowsocks/v2ray-plugin-android/releases/latest/) windows: diff --git a/conf/nginx_ss.conf b/conf/nginx_ss.conf index 2bf1537..a219b94 100644 --- a/conf/nginx_ss.conf +++ b/conf/nginx_ss.conf @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh cat < /etc/shadowsocks-libev/config.json +sh /conf/shadowsocks-libev_config.json > /etc/shadowsocks-libev/config.json echo /etc/shadowsocks-libev/config.json cat /etc/shadowsocks-libev/config.json -bash /conf/nginx_ss.conf > /etc/nginx/conf.d/ss.conf -echo /etc/nginx/conf.d/ss.conf -cat /etc/nginx/conf.d/ss.conf +sh /conf/nginx_ss.conf > /etc/nginx/http.d/ss.conf +echo /etc/nginx/http.d/ss.conf +cat /etc/nginx/http.d/ss.conf if [ "$AppName" = "no" ]; then @@ -49,6 +47,6 @@ else echo -n "${ss}" | qrencode -s 6 -o /wwwroot/${QR_Path}/vpn.png fi -ss-server -c /etc/shadowsocks-libev/config.json & -rm -rf /etc/nginx/sites-enabled/default +ssserver -c /etc/shadowsocks-libev/config.json & +rm -rf /etc/nginx/http.d/default.conf nginx -g 'daemon off;'