forked from teddysun/shadowsocks_install
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
79 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
# Dockerfile for go-shadowsocks2 based alpine | ||
# Copyright (C) 2019 - 2020 Teddysun <[email protected]> | ||
# Copyright (C) 2019 - 2021 Teddysun <[email protected]> | ||
# Reference URL: | ||
# https://github.com/shadowsocks/go-shadowsocks2 | ||
# https://github.com/teddysun/v2ray-plugin | ||
# https://github.com/teddysun/xray-plugin | ||
|
||
FROM --platform=${TARGETPLATFORM} alpine:latest | ||
LABEL maintainer="Teddysun <[email protected]>" | ||
|
@@ -10,12 +12,14 @@ ARG TARGETPLATFORM | |
WORKDIR /root | ||
COPY go-shadowsocks2.sh /root/go-shadowsocks2.sh | ||
COPY v2ray-plugin.sh /root/v2ray-plugin.sh | ||
COPY xray-plugin.sh /root/xray-plugin.sh | ||
RUN set -ex \ | ||
&& apk add --no-cache tzdata \ | ||
&& chmod +x /root/go-shadowsocks2.sh /root/v2ray-plugin.sh \ | ||
&& chmod +x /root/go-shadowsocks2.sh /root/v2ray-plugin.sh /root/xray-plugin.sh \ | ||
&& /root/go-shadowsocks2.sh "${TARGETPLATFORM}" \ | ||
&& /root/v2ray-plugin.sh "${TARGETPLATFORM}" \ | ||
&& rm -fv /root/go-shadowsocks2.sh /root/v2ray-plugin.sh | ||
&& /root/xray-plugin.sh "${TARGETPLATFORM}" \ | ||
&& rm -fv /root/go-shadowsocks2.sh /root/v2ray-plugin.sh /root/xray-plugin.sh | ||
|
||
ENV TZ=Asia/Shanghai | ||
ENV SERVER_PORT=9000 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,11 @@ | |
# | ||
# This is a Shell script for go-shadowsocks2 supported SIP003 plugins based alpine with Docker image | ||
# | ||
# Copyright (C) 2019 - 2020 Teddysun <[email protected]> | ||
# Copyright (C) 2019 - 2021 Teddysun <[email protected]> | ||
# | ||
# Reference URL: | ||
# https://github.com/shadowsocks/shadowsocks-libev | ||
# https://github.com/shadowsocks/simple-obfs | ||
# https://github.com/shadowsocks/v2ray-plugin | ||
# https://github.com/teddysun/v2ray-plugin | ||
|
||
PLATFORM=$1 | ||
if [ -z "$PLATFORM" ]; then | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/sh | ||
# | ||
# This is a Shell script for go-shadowsocks2 supported SIP003 plugins based alpine with Docker image | ||
# | ||
# Copyright (C) 2019 - 2021 Teddysun <[email protected]> | ||
# | ||
# Reference URL: | ||
# https://github.com/teddysun/xray-plugin | ||
|
||
PLATFORM=$1 | ||
if [ -z "$PLATFORM" ]; then | ||
ARCH="amd64" | ||
else | ||
case "$PLATFORM" in | ||
linux/386) | ||
ARCH="386" | ||
;; | ||
linux/amd64) | ||
ARCH="amd64" | ||
;; | ||
linux/arm/v6) | ||
ARCH="arm6" | ||
;; | ||
linux/arm/v7) | ||
ARCH="arm7" | ||
;; | ||
linux/arm64|linux/arm64/v8) | ||
ARCH="arm64" | ||
;; | ||
linux/ppc64le) | ||
ARCH="ppc64le" | ||
;; | ||
linux/s390x) | ||
ARCH="s390x" | ||
;; | ||
*) | ||
ARCH="" | ||
;; | ||
esac | ||
fi | ||
[ -z "${ARCH}" ] && echo "Error: Not supported OS Architecture" && exit 1 | ||
# Download xray-plugin binary file | ||
XRAY_PLUGIN_FILE="xray-plugin_linux_${ARCH}" | ||
echo "Downloading xray-plugin binary file: ${XRAY_PLUGIN_FILE}" | ||
wget -O /usr/bin/xray-plugin https://dl.lamp.sh/files/${XRAY_PLUGIN_FILE} > /dev/null 2>&1 | ||
if [ $? -ne 0 ]; then | ||
echo "Error: Failed to download xray-plugin binary file: ${XRAY_PLUGIN_FILE}" && exit 1 | ||
fi | ||
chmod +x /usr/bin/xray-plugin | ||
echo "Download xray-plugin binary file: ${XRAY_PLUGIN_FILE} completed" |