Compare commits

..

19 Commits

Author SHA1 Message Date
Teddysun
abe60a07d3 Update Dockerfile 2025-09-11 15:50:58 +09:00
Teddysun
46aeebcec6 Update Dockerfile.rpmbuild10 2025-05-28 15:32:31 +09:00
Teddysun
f18503bb78 Update README.md 2025-05-24 17:02:58 +09:00
Teddysun
c2ac597a49 Added Dockerfile.rpmbuild10 2025-05-24 16:56:06 +09:00
Teddysun
ac0c938845 Update bench.sh 2025-05-08 14:36:23 +09:00
Teddysun
27fca9f438 Update Dockerfile 2025-05-05 14:06:37 +09:00
Teddysun
24f6bac3d6 Update Dockerfile 2025-05-05 14:01:33 +09:00
Teddysun
e3aea30e09 Update Dockerfile.rpmbuild9 2025-05-05 13:58:07 +09:00
Teddysun
6f141e0c7d Update Dockerfile 2025-05-05 13:56:08 +09:00
Teddysun
16c918af89 Added Dockerfile.fedora42 2025-04-20 12:56:24 +09:00
Teddysun
168062f2de Update Dockerfile 2024-12-29 23:22:33 +09:00
Teddysun
54072da2d9 Update comments 2024-12-03 18:52:57 +09:00
Teddysun
51a8eccf5e Update comments 2024-12-03 18:51:25 +09:00
Teddysun
42b5fd9277 Update wireguard.sh 2024-11-23 16:08:32 +09:00
Teddysun
88b7f8ae2d Update wireguard.sh 2024-11-23 16:02:29 +09:00
Teddysun
667000925c Update comments 2024-11-12 20:46:21 +09:00
Teddysun
8d560f0f99 Update comments 2024-11-12 20:16:15 +09:00
Teddysun
4403442596 Added Dockerfile.fedora40 2024-07-07 13:59:12 +09:00
Teddysun
f38976343d Update to latest version 2024-07-07 13:58:09 +09:00
52 changed files with 351 additions and 406 deletions

View File

@@ -2,7 +2,7 @@
#
# Description: A Bench Script by Teddysun
#
# Copyright (C) 2015 - 2023 Teddysun <i@teddysun.com>
# Copyright (C) 2015 - 2025 Teddysun <i@teddysun.com>
# Thanks: LookBack <admin@dwhd.org>
# URL: https://teddysun.com/444.html
# https://github.com/teddysun/across/blob/master/bench.sh
@@ -78,15 +78,14 @@ speed() {
speed_test '21541' 'Los Angeles, US'
speed_test '43860' 'Dallas, US'
speed_test '40879' 'Montreal, CA'
speed_test '24215' 'Paris, FR'
speed_test '61933' 'Paris, FR'
speed_test '28922' 'Amsterdam, NL'
speed_test '25858' 'Beijing, CN'
speed_test '24447' 'Shanghai, CN'
speed_test '5530' 'Chongqing, CN'
speed_test '60572' 'Guangzhou, CN'
speed_test '32155' 'Hongkong, CN'
speed_test '23647' 'Mumbai, IN'
speed_test '32155' 'Hong Kong, CN'
speed_test '13623' 'Singapore, SG'
speed_test '21569' 'Tokyo, JP'
speed_test '48463' 'Tokyo, JP'
}
io_test() {
@@ -196,10 +195,10 @@ check_virt() {
ipv4_info() {
local org city country region
org="$(wget -q -T10 -O- ipinfo.io/org)"
city="$(wget -q -T10 -O- ipinfo.io/city)"
country="$(wget -q -T10 -O- ipinfo.io/country)"
region="$(wget -q -T10 -O- ipinfo.io/region)"
org="$(wget -q -T10 -O- http://ipinfo.io/org)"
city="$(wget -q -T10 -O- http://ipinfo.io/city)"
country="$(wget -q -T10 -O- http://ipinfo.io/country)"
region="$(wget -q -T10 -O- http://ipinfo.io/region)"
if [[ -n "${org}" ]]; then
echo " Organization : $(_blue "${org}")"
fi
@@ -253,7 +252,7 @@ install_speedtest() {
print_intro() {
echo "-------------------- A Bench.sh Script By Teddysun -------------------"
echo " Version : $(_green v2023-10-15)"
echo " Version : $(_green v2025-05-08)"
echo " Usage : $(_red "wget -qO- bench.sh | bash")"
}

View File

@@ -1,12 +1,12 @@
ARCH=$(shell uname -m)
VERSION?=1.8.11
GO_VERSION:=1.22.2
VERSION?=1.8.15
GO_VERSION:=1.22.5
SHELL:=/bin/bash
GO_BASE_IMAGE=golang
GO_IMAGE?=$(GO_BASE_IMAGE):$(GO_VERSION)-bookworm
EPOCH?=
REPO?=https://github.com/teddysun/xray-plugin.git
REF?=v1.8.11
REF?=v1.8.15
CHOWN:=docker run --rm -v $(CURDIR):/v -w /v alpine chown
ifdef BUILD_IMAGE

View File

@@ -15,9 +15,9 @@ RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=off
ENV GOPATH /go
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ARG COMMON_FILES
COPY --link ${COMMON_FILES} /root/build-deb/debian

View File

@@ -15,9 +15,9 @@ RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=off
ENV GOPATH /go
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ARG COMMON_FILES
COPY --link ${COMMON_FILES} /root/build-deb/debian

View File

@@ -15,9 +15,9 @@ RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=off
ENV GOPATH /go
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ARG COMMON_FILES
COPY --link ${COMMON_FILES} /root/build-deb/debian

View File

@@ -21,9 +21,9 @@ RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=off
ENV GOPATH /go
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ARG COMMON_FILES
COPY --link ${COMMON_FILES} /root/build-deb/debian

View File

@@ -21,9 +21,9 @@ RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=off
ENV GOPATH /go
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ARG COMMON_FILES
COPY --link ${COMMON_FILES} /root/build-deb/debian

View File

@@ -21,9 +21,9 @@ RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=off
ENV GOPATH /go
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ARG COMMON_FILES
COPY --link ${COMMON_FILES} /root/build-deb/debian

View File

@@ -1,12 +1,12 @@
ARCH=$(shell uname -m)
VERSION?=1.8.11
GO_VERSION:=1.22.2
VERSION?=24.11.30
GO_VERSION:=1.23.3
SHELL:=/bin/bash
GO_BASE_IMAGE=golang
GO_IMAGE?=$(GO_BASE_IMAGE):$(GO_VERSION)-bookworm
EPOCH?=
REPO?=https://github.com/xtls/xray-core.git
REF?=v1.8.11
REF?=v24.11.30
CHOWN:=docker run --rm -v $(CURDIR):/v -w /v alpine chown
ifdef BUILD_IMAGE
@@ -47,7 +47,7 @@ help: ## show make targets
.PHONY: checkout-src
checkout-src: src/github.com/xtls/xray
./checkout.sh src/github.com/xtls/xray "$(REF)"
../checkout.sh src/github.com/xtls/xray "$(REF)"
@curl -sSLo src/github.com/xtls/xray/geoip.dat https://github.com/v2fly/geoip/releases/latest/download/geoip.dat
@curl -sSLo src/github.com/xtls/xray/geosite.dat https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat

View File

@@ -1,2 +0,0 @@
debian/xray.service lib/systemd/system/
debian/xray@.service lib/systemd/system/

View File

@@ -15,9 +15,9 @@ RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=off
ENV GOPATH /go
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ARG COMMON_FILES
COPY --link ${COMMON_FILES} /root/build-deb/debian

View File

@@ -15,9 +15,9 @@ RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=off
ENV GOPATH /go
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ARG COMMON_FILES
COPY --link ${COMMON_FILES} /root/build-deb/debian

View File

@@ -15,9 +15,9 @@ RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=off
ENV GOPATH /go
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ARG COMMON_FILES
COPY --link ${COMMON_FILES} /root/build-deb/debian

View File

@@ -21,9 +21,9 @@ RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=off
ENV GOPATH /go
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ARG COMMON_FILES
COPY --link ${COMMON_FILES} /root/build-deb/debian

View File

@@ -21,9 +21,9 @@ RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=off
ENV GOPATH /go
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ARG COMMON_FILES
COPY --link ${COMMON_FILES} /root/build-deb/debian

View File

@@ -21,9 +21,9 @@ RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=off
ENV GOPATH /go
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ARG COMMON_FILES
COPY --link ${COMMON_FILES} /root/build-deb/debian

View File

@@ -1,5 +1,5 @@
# Dockerfile for Brook based alpine
# Copyright (C) 2019 - 2020 Teddysun <i@teddysun.com>
# Copyright (C) 2019 - 2024 Teddysun <i@teddysun.com>
# Reference URL:
# https://github.com/txthinking/brook

View File

@@ -1,9 +1,9 @@
# Dockerfile for Brook based alpine
# Copyright (C) 2019 - 2020 Teddysun <i@teddysun.com>
# Copyright (C) 2019 - 2024 Teddysun <i@teddysun.com>
# Reference URL:
# https://github.com/txthinking/brook
FROM --platform=${TARGETPLATFORM} alpine:latest
FROM alpine:latest
LABEL maintainer="Teddysun <i@teddysun.com>"
ARG TARGETPLATFORM

View File

@@ -1,5 +1,5 @@
# Dockerfile for caddy v1.0.5 based alpine
# Copyright (C) 2021 Teddysun <i@teddysun.com>
# Copyright (C) 2021 - 2024 Teddysun <i@teddysun.com>
# Reference URL:
# https://github.com/caddyserver/caddy
# https://github.com/caddyserver/forwardproxy

View File

@@ -1,10 +1,10 @@
# Dockerfile for caddy v1.0.5 based alpine
# Copyright (C) 2021 Teddysun <i@teddysun.com>
# Copyright (C) 2021 - 2024 Teddysun <i@teddysun.com>
# Reference URL:
# https://github.com/caddyserver/caddy
# https://github.com/caddyserver/forwardproxy
FROM --platform=${TARGETPLATFORM} alpine:3.14
FROM alpine:3.14
LABEL maintainer="Teddysun <i@teddysun.com>"
ARG TARGETPLATFORM

View File

@@ -1,9 +1,9 @@
# Dockerfile for hysteria based alpine
# Copyright (C) 2023 Teddysun <i@teddysun.com>
# Copyright (C) 2023 - 2024 Teddysun <i@teddysun.com>
# Reference URL:
# https://github.com/HyNetwork/hysteria
FROM --platform=${TARGETPLATFORM} alpine:latest
FROM alpine:latest
LABEL maintainer="Teddysun <i@teddysun.com>"
ARG TARGETPLATFORM

View File

@@ -24,13 +24,13 @@ It can be found at [Docker Hub][4].
You **must create a configuration file** `/etc/hysteria/server.yaml` in host at first:
```bash
```
$ mkdir -p /etc/hysteria
```
A sample in yaml like below:
```yaml
```
listen: :8998
tls:
@@ -56,60 +56,6 @@ There is an example to start a container that listen on port `8998`, run as a Hy
$ docker run -d -p 8998:8998 --name hysteria --restart=always -v /etc/hysteria:/etc/hysteria teddysun/hysteria
```
## Start a container as Hysteria client with socks proxy
## Pull the image
```bash
$ docker pull teddysun/hysteria-client
```
You **must create a configuration file** `/etc/hysteria/client.yaml` in host at first:
```bash
$ mkdir -p /etc/hysteria
```
A sample in yaml like below:
```yaml
server: "IP:8998"
# server: "IP:8998,10000-20000" port hopping is availiable
auth: your_password
tls:
sni: www.example.com
# sni: www.bing.com
insecure: true
#need expose socks proxy server port
socks5:
listen: 0.0.0.0:1080
disableUDP: false
transport:
udp:
hopInterval: 30s
#optional
#lazy: true
#bandwidth:
#up: 150 mbps
#down: 150 mbps
# quic:
# initStreamReceiveWindow: 16777216
# maxStreamReceiveWindow: 16777216
# initConnReceiveWindow: 33554432
# maxConnReceiveWindow: 33554432
```
There is an example to start a container that listen on port `1080`, run as a Hysteria client like below:
```bash
$ docker run -d -p 1080:1080 --name hysteria-client --restart=always -v /etc/hysteria:/etc/hysteria teddysun/hysteria-client
```
Then access socks server with `client_hostIP:1080`
**Warning**: The port number must be same as configuration and opened in firewall.
[1]: https://github.com/apernet/hysteria

View File

@@ -1,21 +0,0 @@
# Dockerfile for hysteria client based alpine
# Copyright (C) 2023 Teddysun <i@teddysun.com>
# Reference URL:
# https://github.com/HyNetwork/hysteria
FROM --platform=${TARGETPLATFORM} alpine:latest
LABEL maintainer="Teddysun <i@teddysun.com>"
ARG TARGETPLATFORM
WORKDIR /root
COPY hysteria.sh /root/hysteria.sh
COPY client.yaml /etc/hysteria/client.yaml
RUN set -ex \
&& apk add --no-cache bash tzdata ca-certificates \
&& chmod +x /root/hysteria.sh \
&& /root/hysteria.sh "${TARGETPLATFORM}" \
&& rm -fv /root/hysteria.sh
VOLUME /etc/hysteria
ENV TZ=Asia/Shanghai
CMD [ "/usr/bin/hysteria", "client", "-c", "/etc/hysteria/client.yaml" ]

View File

@@ -1,55 +0,0 @@
#!/bin/sh
#
# This is a Shell script for build multi-architectures hysteria binary file
#
# Supported architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
#
# Copyright (C) 2022 - 2023 Teddysun <i@teddysun.com>
#
# Reference URL:
# https://github.com/apernet/hysteria
cur_dir="$(pwd)"
COMMANDS=( git go )
for CMD in "${COMMANDS[@]}"; do
if [ ! "$(command -v "${CMD}")" ]; then
echo "${CMD} is not installed, please install it and try again" && exit 1
fi
done
cd ${cur_dir}
echo "git clone https://github.com/apernet/hysteria.git"
git clone https://github.com/apernet/hysteria.git
cd hysteria || exit 2
APP_SRC_CMD_PKG="github.com/apernet/hysteria/app/cmd"
VERSION="$(git describe)"
COMMIT="$(git rev-parse HEAD)"
TIMESTAMP="$(date "+%F")"
LDFLAGS="-s -w -X '${APP_SRC_CMD_PKG}.appVersion=${VERSION}' -X '${APP_SRC_CMD_PKG}.appCommit=${COMMIT}' -X '${APP_SRC_CMD_PKG}.appDate=${TIMESTAMP}' -X '${APP_SRC_CMD_PKG}.appType=release' -buildid="
ARCHS=( 386 amd64 arm arm64 ppc64le s390x )
ARMS=( 6 7 )
for ARCH in ${ARCHS[@]}; do
if [ "${ARCH}" = "arm" ]; then
for V in ${ARMS[@]}; do
echo "Building hysteria_linux_${ARCH}${V}"
env CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} GOARM=${V} go build -v -trimpath -ldflags "${LDFLAGS} -X '${APP_SRC_CMD_PKG}.appPlatform=linux' -X '${APP_SRC_CMD_PKG}.appArch=${ARCH}'" -o ${cur_dir}/hysteria_linux_${ARCH}${V} ./app || exit 1
done
else
echo "Building hysteria_linux_${ARCH}"
env CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -v -trimpath -ldflags "${LDFLAGS} -X '${APP_SRC_CMD_PKG}.appPlatform=linux' -X '${APP_SRC_CMD_PKG}.appArch=${ARCH}'" -o ${cur_dir}/hysteria_linux_${ARCH} ./app || exit 1
fi
done
ARCHS=( 386 amd64 )
for ARCH in ${ARCHS[@]}; do
echo "Building hysteria_windows_${ARCH}.exe"
env CGO_ENABLED=0 GOOS=windows GOARCH=${ARCH} go build -v -trimpath -ldflags "${LDFLAGS} -X '${APP_SRC_CMD_PKG}.appPlatform=windows' -X '${APP_SRC_CMD_PKG}.appArch=${ARCH}'" -o ${cur_dir}/hysteria_windows_${ARCH}.exe ./app
done
chmod +x ${cur_dir}/hysteria_*
# clean up
cd ${cur_dir} && rm -fr hysteria

View File

@@ -1,51 +0,0 @@
#!/bin/sh
#
# This is a Shell script for hysteria based alpine with Docker image
#
# Copyright (C) 2022 Teddysun <i@teddysun.com>
#
# Reference URL:
# https://github.com/HyNetwork/hysteria
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 binary file
HYSTERIA_FILE="hysteria_linux_${ARCH}"
echo "Downloading binary file: ${HYSTERIA_FILE}"
wget -O /usr/bin/hysteria https://dl.lamp.sh/files/${HYSTERIA_FILE} > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Error: Failed to download binary file: ${HYSTERIA_FILE}" && exit 1
fi
echo "Download binary file: ${HYSTERIA_FILE} completed"
chmod +x /usr/bin/hysteria

View File

@@ -1,5 +1,5 @@
# Dockerfile for KMS Server
# Copyright (C) 2018 - 2020 Teddysun <i@teddysun.com>
# Copyright (C) 2018 - 2024 Teddysun <i@teddysun.com>
# Reference URL:
# https://github.com/Wind4/vlmcsd

View File

@@ -3,14 +3,14 @@
# Reference URL:
# https://github.com/Wind4/vlmcsd
FROM --platform=$TARGETPLATFORM alpine:latest AS builder
FROM alpine:latest AS builder
WORKDIR /root
RUN apk add --no-cache git make build-base && \
git clone --branch master --single-branch https://github.com/Wind4/vlmcsd.git && \
cd vlmcsd/ && \
make
FROM --platform=$TARGETPLATFORM alpine:latest
FROM alpine:latest
LABEL maintainer="Teddysun <i@teddysun.com>"
COPY --from=builder /root/vlmcsd/bin/vlmcsd /usr/bin/vlmcsd

View File

@@ -1,7 +1,7 @@
# Dockerfile for build RPM packages.
# Copyright (C) 2023 Teddysun <i@teddysun.com>
FROM --platform=${TARGETPLATFORM} fedora:37
FROM fedora:37
LABEL maintainer="Teddysun <i@teddysun.com>"
RUN dnf install -y yum-utils && \

View File

@@ -1,7 +1,7 @@
# Dockerfile for build RPM packages.
# Copyright (C) 2023 Teddysun <i@teddysun.com>
FROM --platform=${TARGETPLATFORM} fedora:38
FROM fedora:38
LABEL maintainer="Teddysun <i@teddysun.com>"
RUN dnf install -y yum-utils && \

View File

@@ -1,7 +1,7 @@
# Dockerfile for build RPM packages.
# Copyright (C) 2023 Teddysun <i@teddysun.com>
FROM --platform=${TARGETPLATFORM} fedora:39
FROM fedora:39
LABEL maintainer="Teddysun <i@teddysun.com>"
RUN dnf install -y yum-utils && \

View File

@@ -0,0 +1,37 @@
# Dockerfile for build RPM packages.
# Copyright (C) 2024 Teddysun <i@teddysun.com>
FROM fedora:40
LABEL maintainer="Teddysun <i@teddysun.com>"
RUN dnf install -y yum-utils && \
dnf install -y tar wget git tree gcc gcc-c++ vim automake \
sudo net-tools make cmake zstd libzstd chkconfig libtool \
bash coreutils diffutils patch ca-certificates pcre-devel \
rpm-build rpm-devel rpmlint rpmdevtools ncurses which procps \
asciidoc audit-libs-devel binutils-devel flex jq gettext mbedtls-devel \
libcap-devel newt-devel pciutils-devel perl-generators c-ares-devel libev-devel \
python3 python3-devel python3-docutils rsync xmlto bc bison libsodium-devel \
java-devel ncurses-devel numactl-devel openssl-devel perl-devel \
bpftool dwarves gcc-plugin-devel glibc-static hmaccalc kernel-rpm-macros \
libbabeltrace-devel libbpf-devel libcap-ng-devel libnl3-devel libtraceevent-devel \
elfutils-devel xz-devel perl-ExtUtils-Embed && \
dnf clean all && rm -rf /var/cache/dnf /var/lib/rpm/__db*
RUN useradd builder -u 1000 -m -G users,wheel && \
echo "builder ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers && \
echo "# macros" > /home/builder/.rpmmacros && \
echo "%_topdir /home/builder/rpmbuild" >> /home/builder/.rpmmacros && \
echo "%_sourcedir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "%_builddir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "%_specdir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "%_rpmdir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "%_srcrpmdir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "set enable-bracketed-paste off" >> /etc/inputrc && \
mkdir -p /home/builder/rpmbuild && \
chown -R builder /home/builder
USER builder
VOLUME /home/builder
WORKDIR /home/builder/rpmbuild
CMD ["/bin/bash"]

View File

@@ -0,0 +1,37 @@
# Dockerfile for build RPM packages.
# Copyright (C) 2024 Teddysun <i@teddysun.com>
FROM fedora:41
LABEL maintainer="Teddysun <i@teddysun.com>"
RUN dnf install -y yum-utils && \
dnf install -y tar wget git tree gcc gcc-c++ vim automake \
sudo net-tools make cmake zstd libzstd chkconfig libtool \
bash coreutils diffutils patch ca-certificates pcre-devel \
rpm-build rpm-devel rpmlint rpmdevtools ncurses which procps \
asciidoc audit-libs-devel binutils-devel flex jq gettext mbedtls-devel \
libcap-devel newt-devel pciutils-devel perl-generators c-ares-devel libev-devel \
python3 python3-devel python3-docutils rsync xmlto bc bison libsodium-devel \
java-devel ncurses-devel numactl-devel openssl-devel perl-devel \
bpftool dwarves gcc-plugin-devel glibc-static hmaccalc kernel-rpm-macros \
libbabeltrace-devel libbpf-devel libcap-ng-devel libnl3-devel libtraceevent-devel \
elfutils-devel xz-devel perl-ExtUtils-Embed && \
dnf clean all && rm -rf /var/cache/dnf /var/lib/rpm/__db*
RUN useradd builder -u 1000 -m -G users,wheel && \
echo "builder ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers && \
echo "# macros" > /home/builder/.rpmmacros && \
echo "%_topdir /home/builder/rpmbuild" >> /home/builder/.rpmmacros && \
echo "%_sourcedir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "%_builddir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "%_specdir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "%_rpmdir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "%_srcrpmdir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "set enable-bracketed-paste off" >> /etc/inputrc && \
mkdir -p /home/builder/rpmbuild && \
chown -R builder /home/builder
USER builder
VOLUME /home/builder
WORKDIR /home/builder/rpmbuild
CMD ["/bin/bash"]

View File

@@ -0,0 +1,37 @@
# Dockerfile for build RPM packages.
# Copyright (C) 2025 Teddysun <i@teddysun.com>
FROM fedora:42
LABEL maintainer="Teddysun <i@teddysun.com>"
RUN dnf install -y yum-utils && \
dnf install -y tar wget git tree gcc gcc-c++ vim automake \
sudo net-tools make cmake zstd libzstd chkconfig libtool \
bash coreutils diffutils patch ca-certificates pcre-devel \
rpm-build rpm-devel rpmlint rpmdevtools ncurses which procps \
asciidoc audit-libs-devel binutils-devel flex jq gettext mbedtls-devel \
libcap-devel newt-devel pciutils-devel perl-generators c-ares-devel libev-devel \
python3 python3-devel python3-docutils rsync xmlto bc bison libsodium-devel \
java-devel ncurses-devel numactl-devel openssl-devel perl-devel \
bpftool dwarves gcc-plugin-devel glibc-static hmaccalc kernel-rpm-macros \
libbabeltrace-devel libbpf-devel libcap-ng-devel libnl3-devel libtraceevent-devel \
elfutils-devel xz-devel perl-ExtUtils-Embed && \
dnf clean all && rm -rf /var/cache/dnf /var/lib/rpm/__db*
RUN useradd builder -u 1000 -m -G users,wheel && \
echo "builder ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers && \
echo "# macros" > /home/builder/.rpmmacros && \
echo "%_topdir /home/builder/rpmbuild" >> /home/builder/.rpmmacros && \
echo "%_sourcedir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "%_builddir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "%_specdir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "%_rpmdir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "%_srcrpmdir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "set enable-bracketed-paste off" >> /etc/inputrc && \
mkdir -p /home/builder/rpmbuild && \
chown -R builder /home/builder
USER builder
VOLUME /home/builder
WORKDIR /home/builder/rpmbuild
CMD ["/bin/bash"]

View File

@@ -0,0 +1,39 @@
# Dockerfile for build RPM packages.
# Copyright (C) 2025 Teddysun <i@teddysun.com>
FROM almalinux:10
LABEL maintainer="Teddysun <i@teddysun.com>"
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm && \
dnf config-manager --enable epel && \
dnf config-manager --enable crb && \
rpm -e --nodeps coreutils-single && \
dnf install -y tar wget tree git gcc gcc-c++ coreutils bash diffutils patch ca-certificates \
sudo net-tools make cmake zstd libzstd chkconfig pcre2-devel \
rpm-build rpm-devel rpmlint rpmdevtools ncurses which procps \
asciidoc audit-libs-devel binutils-devel flex jq gettext \
libcap-devel newt-devel pciutils-devel perl-generators \
python3 python3-devel python3-docutils rsync xmlto bc bison \
java-devel ncurses-devel numactl-devel openssl-devel perl-devel \
bpftool dwarves gcc-plugin-devel glibc-static hmaccalc kernel-rpm-macros \
libbabeltrace-devel libbpf-devel libcap-ng-devel libnl3-devel libtraceevent-devel \
elfutils-devel xz-devel perl-ExtUtils-Embed && \
dnf clean all && rm -rf /var/cache/dnf /var/lib/rpm/__db*
RUN useradd builder -u 1000 -m -G users,wheel && \
echo "builder ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers && \
echo "# macros" > /home/builder/.rpmmacros && \
echo "%_topdir /home/builder/rpmbuild" >> /home/builder/.rpmmacros && \
echo "%_sourcedir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "%_builddir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "%_specdir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "%_rpmdir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "%_srcrpmdir %{_topdir}" >> /home/builder/.rpmmacros && \
echo "set enable-bracketed-paste off" >> /etc/inputrc && \
mkdir -p /home/builder/rpmbuild && \
chown -R builder /home/builder
USER builder
VOLUME /home/builder
WORKDIR /home/builder/rpmbuild
CMD ["/bin/bash"]

View File

@@ -1,7 +1,7 @@
# Dockerfile for build RPM packages.
# Copyright (C) 2021 - 2022 Teddysun <i@teddysun.com>
FROM --platform=${TARGETPLATFORM} centos:7
FROM centos:7
LABEL maintainer="Teddysun <i@teddysun.com>"
RUN yum install -y yum-utils epel-release centos-release-scl-rh && \

View File

@@ -1,23 +1,24 @@
# Dockerfile for build RPM packages.
# Copyright (C) 2021 - 2022 Teddysun <i@teddysun.com>
# Copyright (C) 2021 - 2025 Teddysun <i@teddysun.com>
FROM --platform=${TARGETPLATFORM} rockylinux:8
FROM rockylinux:8
LABEL maintainer="Teddysun <i@teddysun.com>"
RUN yum install -y yum-utils epel-release && \
yum-config-manager --enable epel && \
yum-config-manager --enable powertools && \
RUN dnf install -y yum-utils epel-release && \
dnf config-manager --enable epel && \
dnf config-manager --enable powertools && \
dnf install -y https://dl.lamp.sh/linux/rhel/el8/x86_64/teddysun-release-1.0-1.el8.noarch.rpm && \
rpm -e --nodeps coreutils-single && \
yum install -y tar wget git tree gcc gcc-c++ \
sudo net-tools make cmake zstd libzstd chkconfig \
dnf install -y tar wget wget2 git tree gcc gcc-c++ \
sudo net-tools make cmake zstd libzstd chkconfig pcre-devel pcre2-devel \
bash coreutils diffutils patch ca-certificates \
rpm-build rpm-devel rpmlint rpmdevtools which procps \
asciidoc audit-libs-devel binutils-devel flex \
libcap-devel newt-devel pciutils-devel perl-generators \
python3 python3-devel python3-docutils rsync xmlto bc bison libnl3-devel \
java-devel ncurses-devel numactl-devel openssl-devel perl-devel dwarves \
java-devel ncurses-devel numactl-devel openssl-devel openssl3-devel perl-devel dwarves \
elfutils-devel xz-devel perl-ExtUtils-Embed gettext kmod libkcapi-hmaccalc && \
yum clean all && rm -rf /var/cache/dnf /var/lib/rpm/__db*
dnf clean all && rm -rf /var/cache/dnf /var/lib/rpm/__db*
RUN useradd builder -u 1000 -m -G users,wheel && \
echo "builder ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers && \

View File

@@ -1,15 +1,16 @@
# Dockerfile for build RPM packages.
# Copyright (C) 2022 Teddysun <i@teddysun.com>
# Copyright (C) 2022 - 2025 Teddysun <i@teddysun.com>
FROM --platform=${TARGETPLATFORM} rockylinux:9
FROM rockylinux:9
LABEL maintainer="Teddysun <i@teddysun.com>"
RUN yum install -y yum-utils epel-release && \
yum-config-manager --enable epel && \
yum-config-manager --enable crb && \
RUN dnf install -y yum-utils epel-release && \
dnf config-manager --enable epel && \
dnf config-manager --enable crb && \
dnf install -y https://dl.lamp.sh/linux/rhel/el9/x86_64/teddysun-release-1.0-1.el9.noarch.rpm && \
rpm -e --nodeps coreutils-single && \
yum install -y tar wget git tree gcc gcc-c++ \
sudo net-tools make cmake zstd libzstd chkconfig \
dnf install -y tar wget wget2 git tree gcc gcc-c++ \
sudo net-tools make cmake zstd libzstd chkconfig pcre-devel pcre2-devel \
bash coreutils diffutils patch ca-certificates \
rpm-build rpm-devel rpmlint rpmdevtools ncurses which procps \
asciidoc audit-libs-devel binutils-devel flex jq gettext \
@@ -19,7 +20,7 @@ RUN yum install -y yum-utils epel-release && \
bpftool dwarves gcc-plugin-devel glibc-static hmaccalc kernel-rpm-macros \
libbabeltrace-devel libbpf-devel libcap-ng-devel libnl3-devel libtraceevent-devel \
elfutils-devel xz-devel perl-ExtUtils-Embed && \
yum clean all && rm -rf /var/cache/dnf /var/lib/rpm/__db*
dnf clean all && rm -rf /var/cache/dnf /var/lib/rpm/__db*
RUN useradd builder -u 1000 -m -G users,wheel && \
echo "builder ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers && \

View File

@@ -1,4 +1,4 @@
## CentOS RPM package building environment by Teddysun
## RHEL RPM package building environment by Teddysun
This docker image can be used to build RPM packages.
@@ -6,13 +6,14 @@ For more information on docker and containerization technologies, refer to [offi
## Supported tags and respective `Dockerfile` links
- `latest`, `9` [*(Dockerfile)*][7]
- `latest`, `10` [*(Dockerfile)*][8]
- `9` [*(Dockerfile)*][7]
- `8` [*(Dockerfile)*][2]
- `7` [*(Dockerfile)*][3]
### Reference
- Supported architectures ([*more info*][4]): `amd64`
- Supported architectures ([*more info*][4]): `amd64`, `arm64`
## Integration
@@ -46,6 +47,12 @@ For CentOS 9 Stream / Rockylinux 9 / Almalinux 9
$ docker pull teddysun/rpmbuild:9
```
For CentOS 10 Stream / Rockylinux 10 / Almalinux 10
```bash
$ docker pull teddysun/rpmbuild:10
```
It can be found at [Docker Hub][6].
## Start a container
@@ -71,6 +78,12 @@ $ mkdir -m 777 -p /opt/builder9
$ docker run -it --rm -h buildbot --name rpmbuild9 -v /opt/builder9:/home/builder/rpmbuild teddysun/rpmbuild:9
```
There is an example to start a container for CentOS 10 Stream / Rockylinux 10 / Almalinux 10 like below:
```bash
$ mkdir -m 777 -p /opt/builder10
$ docker run -it --rm -h buildbot --name rpmbuild10 -v /opt/builder10:/home/builder/rpmbuild teddysun/rpmbuild:10
```
[1]: https://docs.docker.com/
[2]: https://github.com/teddysun/across/blob/master/docker/rpmbuild/Dockerfile.rpmbuild8
@@ -79,3 +92,4 @@ $ docker run -it --rm -h buildbot --name rpmbuild9 -v /opt/builder9:/home/builde
[5]: https://docs.docker.com/install/
[6]: https://hub.docker.com/r/teddysun/rpmbuild/
[7]: https://github.com/teddysun/across/blob/master/docker/rpmbuild/Dockerfile.rpmbuild9
[8]: https://github.com/teddysun/across/blob/master/docker/rpmbuild/Dockerfile.rpmbuild10

View File

@@ -1,5 +1,5 @@
# Dockerfile for trojan-go based alpine
# Copyright (C) 2019 - 2021 Teddysun <i@teddysun.com>
# Copyright (C) 2019 - 2024 Teddysun <i@teddysun.com>
# Reference URL:
# https://github.com/p4gefau1t/trojan-go
# https://github.com/v2fly/v2ray-core

View File

@@ -1,5 +1,5 @@
# Dockerfile for trojan-go based alpine
# Copyright (C) 2019 - 2023 Teddysun <i@teddysun.com>
# Copyright (C) 2019 - 2024 Teddysun <i@teddysun.com>
# Reference URL:
# https://github.com/p4gefau1t/trojan-go
# https://github.com/v2fly/v2ray-core
@@ -7,7 +7,7 @@
# https://github.com/v2fly/domain-list-community
# https://github.com/Potterli20/trojan-go-fork
FROM --platform=${TARGETPLATFORM} alpine:latest
FROM alpine:latest
LABEL maintainer="Teddysun <i@teddysun.com>"
ARG TARGETPLATFORM

View File

@@ -1,5 +1,5 @@
# Dockerfile for trojan based alpine
# Copyright (C) 2020 Teddysun <i@teddysun.com>
# Copyright (C) 2020 - 2024 Teddysun <i@teddysun.com>
# Reference URL:
# https://github.com/trojan-gfw/trojan
# https://trojan-gfw.github.io/trojan/

View File

@@ -1,10 +1,10 @@
# Dockerfile for trojan based alpine
# Copyright (C) 2020 Teddysun <i@teddysun.com>
# Copyright (C) 2020 - 2024 Teddysun <i@teddysun.com>
# Reference URL:
# https://github.com/trojan-gfw/trojan
# https://trojan-gfw.github.io/trojan/
FROM --platform=${TARGETPLATFORM} alpine:latest AS builder
FROM alpine:latest AS builder
WORKDIR /root
RUN set -ex \
&& VERSION="$(wget --no-check-certificate -qO- https://api.github.com/repos/trojan-gfw/trojan/tags | grep 'name' | cut -d\" -f4 | head -1)" \
@@ -15,7 +15,7 @@ RUN set -ex \
&& make \
&& strip -s trojan
FROM --platform=${TARGETPLATFORM} alpine:latest
FROM alpine:latest
LABEL maintainer="Teddysun <i@teddysun.com>"
RUN set -ex \

View File

@@ -1,5 +1,5 @@
# Dockerfile for v2ray based alpine
# Copyright (C) 2019 - 2021 Teddysun <i@teddysun.com>
# Copyright (C) 2019 - 2024 Teddysun <i@teddysun.com>
# Reference URL:
# https://github.com/v2fly/v2ray-core
# https://github.com/v2fly/geoip

View File

@@ -1,11 +1,11 @@
# Dockerfile for v2ray based alpine
# Copyright (C) 2019 - 2021 Teddysun <i@teddysun.com>
# Copyright (C) 2019 - 2024 Teddysun <i@teddysun.com>
# Reference URL:
# https://github.com/v2fly/v2ray-core
# https://github.com/v2fly/geoip
# https://github.com/v2fly/domain-list-community
FROM --platform=${TARGETPLATFORM} alpine:latest
FROM alpine:latest
LABEL maintainer="Teddysun <i@teddysun.com>"
ARG TARGETPLATFORM

View File

@@ -1,5 +1,5 @@
# Dockerfile for xray based alpine
# Copyright (C) 2019 - 2021 Teddysun <i@teddysun.com>
# Copyright (C) 2019 - 2025 Teddysun <i@teddysun.com>
# Reference URL:
# https://github.com/XTLS/Xray-core
# https://github.com/v2fly/v2ray-core
@@ -13,13 +13,13 @@ WORKDIR /root
COPY xray.sh /root/xray.sh
COPY config.json /etc/xray/config.json
RUN set -ex \
&& apk add --no-cache tzdata ca-certificates \
&& apk add --no-cache bash tzdata ca-certificates openssl \
&& mkdir -p /var/log/xray /usr/share/xray \
&& chmod +x /root/xray.sh \
&& /root/xray.sh \
&& rm -fv /root/xray.sh \
&& wget -O /usr/share/xray/geosite.dat https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat \
&& wget -O /usr/share/xray/geoip.dat https://github.com/v2fly/geoip/releases/latest/download/geoip.dat
&& wget -O /usr/share/xray/geosite.dat https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geosite.dat \
&& wget -O /usr/share/xray/geoip.dat https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geoip.dat
VOLUME /etc/xray
ENV TZ=Asia/Shanghai

View File

@@ -1,12 +1,12 @@
# Dockerfile for xray based alpine
# Copyright (C) 2019 - 2021 Teddysun <i@teddysun.com>
# Copyright (C) 2019 - 2025 Teddysun <i@teddysun.com>
# Reference URL:
# https://github.com/XTLS/Xray-core
# https://github.com/v2fly/v2ray-core
# https://github.com/v2fly/geoip
# https://github.com/v2fly/domain-list-community
FROM --platform=${TARGETPLATFORM} alpine:latest
FROM alpine:latest
LABEL maintainer="Teddysun <i@teddysun.com>"
ARG TARGETPLATFORM
@@ -14,14 +14,16 @@ WORKDIR /root
COPY xray.sh /root/xray.sh
COPY config.json /etc/xray/config.json
RUN set -ex \
&& apk add --no-cache tzdata ca-certificates \
&& apk add --no-cache bash tzdata ca-certificates openssl \
&& mkdir -p /var/log/xray /usr/share/xray \
&& chmod +x /root/xray.sh \
&& /root/xray.sh "${TARGETPLATFORM}" \
&& rm -fv /root/xray.sh \
&& wget -O /usr/share/xray/geosite.dat https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat \
&& wget -O /usr/share/xray/geoip.dat https://github.com/v2fly/geoip/releases/latest/download/geoip.dat
&& wget -O /usr/share/xray/geosite.dat https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geosite.dat \
&& wget -O /usr/share/xray/geoip.dat https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geoip.dat
VOLUME /etc/xray
VOLUME /var/log/xray
ENV TZ=Asia/Shanghai
CMD [ "/usr/bin/xray", "-config", "/etc/xray/config.json" ]

View File

@@ -40,9 +40,7 @@ A sample in JSON like below:
"settings": {
"clients": [
{
"id": "1eb6e917-774b-4a84-aff6-b058577c60a5",
"level": 1,
"alterId": 64
"id": "1eb6e917-774b-4a84-aff6-b058577c60a5"
}
]
}

View File

@@ -2,7 +2,7 @@
# spec file for package xray-plugin
#
Name: xray-plugin
Version: 1.8.11
Version: 1.8.15
Release: 1%{?dist}
Summary: A SIP003 plugin for shadowsocks
License: MIT
@@ -34,82 +34,3 @@ install -D -p -m 0755 xray-plugin %{buildroot}%{_bindir}/xray-plugin
%doc README.md
%{_bindir}/xray-plugin
%license LICENSE
%changelog
* Fri Apr 26 2024 Teddysun <i@teddysun.com> - 1.8.11-1
- Update to version 1.8.11
* Sat Mar 30 2024 Teddysun <i@teddysun.com> - 1.8.10-1
- Update to version 1.8.10
* Mon Mar 11 2024 Teddysun <i@teddysun.com> - 1.8.9-1
- Update to version 1.8.9
* Mon Feb 26 2024 Teddysun <i@teddysun.com> - 1.8.8-1
- Update to version 1.8.8
* Mon Jan 08 2024 Teddysun <i@teddysun.com> - 1.8.7-1
- Update to version 1.8.7
* Sat Nov 18 2023 Teddysun <i@teddysun.com> - 1.8.6-1
- Update to version 1.8.6
* Tue Nov 14 2023 Teddysun <i@teddysun.com> - 1.8.5-1
- Update to version 1.8.5
* Tue Aug 29 2023 Teddysun <i@teddysun.com> - 1.8.4-1
- Update version to 1.8.4
* Mon Jun 19 2023 Teddysun <i@teddysun.com> - 1.8.3-1
- Update version to 1.8.3
* Tue Apr 18 2023 Teddysun <i@teddysun.com> - 1.8.1-1
- Update version to 1.8.1
* Sat Mar 11 2023 Teddysun <i@teddysun.com> - 1.8.0-1
- Update version to 1.8.0
* Thu Feb 09 2023 Teddysun <i@teddysun.com> - 1.7.5-1
- Update version to 1.7.5
* Thu Feb 02 2023 Teddysun <i@teddysun.com> - 1.7.3-1
- Update version to 1.7.3
* Sun Jan 08 2023 Teddysun <i@teddysun.com> - 1.7.2-1
- Update version to 1.7.2
* Mon Dec 26 2022 Teddysun <i@teddysun.com> - 1.7.0-1
- Update version to 1.7.0
* Mon Dec 12 2022 Teddysun <i@teddysun.com> - 1.6.6-1
- Update version to 1.6.6
* Mon Nov 28 2022 Teddysun <i@teddysun.com> - 1.6.5-1
- Update version to 1.6.5
* Mon Nov 14 2022 Teddysun <i@teddysun.com> - 1.6.4-1
- Update version to 1.6.4
* Mon Nov 07 2022 Teddysun <i@teddysun.com> - 1.6.3-1
- Update version to 1.6.3
* Sat Oct 29 2022 Teddysun <i@teddysun.com> - 1.6.2-1
- Update version to 1.6.2
* Sat Oct 22 2022 Teddysun <i@teddysun.com> - 1.6.1-1
- Update version to 1.6.1
* Tue Sep 20 2022 Teddysun <i@teddysun.com> - 1.6.0-1
- Update version to 1.6.0
* Mon Aug 29 2022 Teddysun <i@teddysun.com> - 1.5.10-1
- Update version to 1.5.10
* Sat Jul 16 2022 Teddysun <i@teddysun.com> - 1.5.9-1
- Update version to 1.5.9
* Mon Jun 20 2022 Teddysun <i@teddysun.com> - 1.5.8-1
- Update version to 1.5.8
* Thu Jun 16 2022 Teddysun <i@teddysun.com> - 1.5.7-1
- Update version to 1.5.7

View File

@@ -1,19 +0,0 @@
{
"inbounds": [{
"port": 9000,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "1eb6e917-774b-4a84-aff6-b058577c60a5",
"level": 1,
"alterId": 64
}
]
}
}],
"outbounds": [{
"protocol": "freedom",
"settings": {}
}]
}

View File

@@ -1,14 +1,15 @@
%global debug_package %{nil}
Name: xray
Version: 1.8.11
Version: 24.11.30
Release: 1%{?dist}
Summary: Xray, Penetrates Everything.
License: MPL-2.0
URL: https://github.com/XTLS/Xray-core
Packager: Teddysun <i@teddysun.com>
Source0: %{name}-%{version}.tar.gz
Source1: config.json
Source0: https://github.com/XTLS/Xray-core/archive/refs/tags/v%{version}.tar.gz#/Xray-core-%{version}.tar.gz
Source1: https://github.com/teddysun/across/raw/master/rpm/xray/config.json
Source2: https://github.com/v2fly/geoip/releases/latest/download/geoip.dat
Source3: https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat
@@ -26,7 +27,7 @@ Xray, Penetrates Everything.
Also the best v2ray-core, with XTLS support. Fully compatible configuration.
%prep
%autosetup
%setup -q -n Xray-core-%{version}
%build
# https://pagure.io/go-rpm-macros/c/1cc7f5d9026175bb6cb1b8c889355d0c4fc0e40a
@@ -107,6 +108,63 @@ EOF
%doc README.md
%changelog
* Sat Nov 30 2024 Teddysun <i@teddysun.com> - 24.11.30-1
- Update version to 24.11.30
* Thu Nov 21 2024 Teddysun <i@teddysun.com> - 24.11.21-1
- Update version to 24.11.21
* Mon Nov 11 2024 Teddysun <i@teddysun.com> - 24.11.11-1
- Update version to 24.11.11
* Tue Nov 05 2024 Teddysun <i@teddysun.com> - 24.11.5-1
- Update version to 24.11.5
* Thu Oct 31 2024 Teddysun <i@teddysun.com> - 24.10.31-1
- Update version to 24.10.31
* Wed Oct 16 2024 Teddysun <i@teddysun.com> - 24.10.16-1
- Update version to 24.10.16
* Mon Sep 30 2024 Teddysun <i@teddysun.com> - 24.9.30-1
- Update version to 24.9.30
* Thu Sep 19 2024 Teddysun <i@teddysun.com> - 24.9.19-1
- Update version to 24.9.19
* Mon Sep 16 2024 Teddysun <i@teddysun.com> - 24.9.16-1
- Update version to 24.9.16
* Sat Sep 07 2024 Teddysun <i@teddysun.com> - 24.9.7-1
- Update version to 24.9.7 (New version naming rule, based release date)
* Fri Aug 30 2024 Teddysun <i@teddysun.com> - 1.8.24-1
- Update version to 1.8.24
* Sun Aug 04 2024 Teddysun <i@teddysun.com> - 1.8.23-1
- Update to version 1.8.23
* Wed Jul 17 2024 Teddysun <i@teddysun.com> - 1.8.19-1
- Update to version 1.8.19
* Mon Jul 15 2024 Teddysun <i@teddysun.com> - 1.8.18-1
- Update to version 1.8.18
* Fri Jul 12 2024 Teddysun <i@teddysun.com> - 1.8.17-1
- Update to version 1.8.17
* Fri Jun 21 2024 Teddysun <i@teddysun.com> - 1.8.16-1
- Update to version 1.8.16
* Tue Jun 18 2024 Teddysun <i@teddysun.com> - 1.8.15-1
- Update to version 1.8.15
* Thu May 23 2024 Teddysun <i@teddysun.com> - 1.8.13-1
- Update to version 1.8.13
* Wed May 22 2024 Teddysun <i@teddysun.com> - 1.8.12-1
- Update to version 1.8.12
* Fri Apr 26 2024 Teddysun <i@teddysun.com> - 1.8.11-1
- Update to version 1.8.11

View File

@@ -2,7 +2,7 @@
#
# This is a Shell script for configure and start WireGuard VPN server.
#
# Copyright (C) 2019 - 2020 Teddysun <i@teddysun.com>
# Copyright (C) 2019 - 2024 Teddysun <i@teddysun.com>
#
# Reference URL:
# https://www.wireguard.com
@@ -71,16 +71,16 @@ _exists() {
}
_ipv4() {
local ipv4="$( ip addr | egrep -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | \
egrep -v "^192\.168|^172\.1[6-9]\.|^172\.2[0-9]\.|^172\.3[0-2]\.|^10\.|^127\.|^255\.|^0\.|^169\.254\." | head -n 1 )"
[ -z "${ipv4}" ] && ipv4="$( wget -qO- -t1 -T2 ipv4.icanhazip.com )"
[ -z "${ipv4}" ] && ipv4="$( wget -qO- -t1 -T2 ipinfo.io/ip )"
local ipv4="$( ip addr | grep -E -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | \
grep -E -v "^192\.168|^172\.1[6-9]\.|^172\.2[0-9]\.|^172\.3[0-2]\.|^10\.|^127\.|^255\.|^0\.|^169\.254\." | head -n 1 )"
[ -z "${ipv4}" ] && ipv4="$( wget -qO- -t1 -T2 http://ipv4.icanhazip.com )"
[ -z "${ipv4}" ] && ipv4="$( wget -qO- -t1 -T2 http://ipinfo.io/ip )"
printf -- "%s" "${ipv4}"
}
_ipv6() {
local ipv6=""
ipv6="$(wget -qO- -t1 -T2 ipv6.icanhazip.com)"
ipv6="$(wget -qO- -t1 -T2 http://ipv6.icanhazip.com)"
printf -- "%s" "${ipv6}"
}
@@ -296,6 +296,9 @@ install_wg_pkgs() {
if [ -n "$(_os_ver)" -a "$(_os_ver)" -eq 8 ]; then
yum-config-manager --enable PowerTools > /dev/null 2>&1 || yum-config-manager --enable powertools > /dev/null 2>&1
fi
if [ -n "$(_os_ver)" -a "$(_os_ver)" -eq 9 ]; then
yum-config-manager --enable crb > /dev/null 2>&1
fi
_error_detect "yum -y install libmnl-devel"
_error_detect "yum -y install elfutils-libelf-devel"
[ ! -d "/usr/src/kernels/$(uname -r)" ] && _error_detect "yum -y install kernel-headers" && _error_detect "yum -y install kernel-devel"
@@ -474,9 +477,9 @@ EOF
# Create client interface
create_client_if() {
_info "Create client interface: /etc/wireguard/${SERVER_WG_NIC}_client"
_info "Create client interface: /etc/wireguard/${SERVER_WG_NIC}_client.conf"
if [ -n "${SERVER_PUB_IPV6}" ]; then
cat > /etc/wireguard/${SERVER_WG_NIC}_client <<EOF
cat > /etc/wireguard/${SERVER_WG_NIC}_client.conf <<EOF
[Interface]
PrivateKey = ${CLIENT_PRIVATE_KEY}
Address = ${CLIENT_WG_IPV4}/24,${CLIENT_WG_IPV6}/64
@@ -489,7 +492,7 @@ AllowedIPs = 0.0.0.0/0,::/0
Endpoint = ${SERVER_PUB_IPV4}:${SERVER_WG_PORT}
EOF
else
cat > /etc/wireguard/${SERVER_WG_NIC}_client <<EOF
cat > /etc/wireguard/${SERVER_WG_NIC}_client.conf <<EOF
[Interface]
PrivateKey = ${CLIENT_PRIVATE_KEY}
Address = ${CLIENT_WG_IPV4}/24
@@ -502,13 +505,13 @@ AllowedIPs = 0.0.0.0/0
Endpoint = ${SERVER_PUB_IPV4}:${SERVER_WG_PORT}
EOF
fi
chmod 600 /etc/wireguard/${SERVER_WG_NIC}_client
chmod 600 /etc/wireguard/${SERVER_WG_NIC}_client.conf
}
# Generate a QR Code picture with default client interface
generate_qr() {
_info "Generate a QR Code picture with client interface"
_error_detect "qrencode -s8 -o /etc/wireguard/${SERVER_WG_NIC}_client.png < /etc/wireguard/${SERVER_WG_NIC}_client"
_error_detect "qrencode -s8 -o /etc/wireguard/${SERVER_WG_NIC}_client.png < /etc/wireguard/${SERVER_WG_NIC}_client.conf"
}
# Enable IP forwarding
@@ -581,7 +584,7 @@ install_completed() {
_info "WireGuard VPN Server installation completed"
_info ""
_info "WireGuard VPN default client file is below:"
_info "$(_green "/etc/wireguard/${SERVER_WG_NIC}_client")"
_info "$(_green "/etc/wireguard/${SERVER_WG_NIC}_client.conf")"
_info ""
_info "WireGuard VPN default client QR Code is below:"
_info "$(_green "/etc/wireguard/${SERVER_WG_NIC}_client.png")"
@@ -596,7 +599,7 @@ add_client() {
_red "WireGuard was not installed, please install it and try again\n" && exit 1
fi
default_server_if="/etc/wireguard/${SERVER_WG_NIC}.conf"
default_client_if="/etc/wireguard/${SERVER_WG_NIC}_client"
default_client_if="/etc/wireguard/${SERVER_WG_NIC}_client.conf"
[ ! -s "${default_server_if}" ] && echo "The default server interface ($(_red ${default_server_if})) does not exists" && exit 1
[ ! -s "${default_client_if}" ] && echo "The default client interface ($(_red ${default_client_if})) does not exists" && exit 1
while true; do
@@ -604,7 +607,7 @@ add_client() {
if [ -z "${client}" ]; then
_red "Client name can not be empty\n"
else
new_client_if="/etc/wireguard/${client}_client"
new_client_if="/etc/wireguard/${client}_client.conf"
if [ "${client}" = "${SERVER_WG_NIC}" ]; then
echo "The default client ($(_yellow ${client})) already exists. Please re-enter it"
elif [ -s "${new_client_if}" ]; then
@@ -615,7 +618,7 @@ add_client() {
fi
done
# Get information from default interface file
client_files=($(find /etc/wireguard/ -name "*_client" | sort))
client_files=($(find /etc/wireguard/ -name "*_client*" | sort))
client_ipv4=()
client_ipv6=()
for ((i=0; i<${#client_files[@]}; i++)); do
@@ -688,11 +691,11 @@ EOF
echo "Add a WireGuard client ($(_green ${client})) completed"
systemctl restart wg-quick@${SERVER_WG_NIC}
# Generate a new QR Code picture
qrencode -s8 -o ${new_client_if}.png < ${new_client_if}
qrencode -s8 -o /etc/wireguard/${client}_client.png < ${new_client_if}
echo "Generate a QR Code picture with new client ($(_green ${client})) completed"
echo
echo "WireGuard VPN new client ($(_green ${client})) file is below:"
_green "/etc/wireguard/${client}_client\n"
_green "/etc/wireguard/${client}_client.conf\n"
echo
echo "WireGuard VPN new client ($(_green ${client})) QR Code is below:"
_green "/etc/wireguard/${client}_client.png\n"
@@ -717,7 +720,7 @@ remove_client() {
fi
fi
done
client_if="/etc/wireguard/${client}_client"
client_if="/etc/wireguard/${client}_client.conf"
[ ! -s "${client_if}" ] && echo "The client file ($(_red ${client_if})) does not exists" && exit 1
tmp_tag="$(grep -w "Address" ${client_if} | awk '{print $3}' | cut -d\/ -f1 )"
[ -n "${tmp_tag}" ] && sed -i '/'"$tmp_tag"'/,+1d;:a;1,3!{P;$!N;D};N;ba' ${default_server_if}
@@ -737,7 +740,7 @@ list_clients() {
local line="+-------------------------------------------------------------------------+\n"
local string=%-35s
printf "${line}|${string} |${string} |\n${line}" " Client Interface" " Client's IP"
client_files=($(find /etc/wireguard/ -name "*_client" | sort))
client_files=($(find /etc/wireguard/ -name "*_client*" | sort))
ips=($(grep -w "AllowedIPs" ${default_server_if} | awk '{print $3}'))
[ ${#client_files[@]} -ne ${#ips[@]} ] && echo "One or more client interface file is missing in /etc/wireguard" && exit 1
for ((i=0; i<${#ips[@]}; i++)); do