mirror of
https://github.com/teddysun/across.git
synced 2025-04-21 19:39:31 +08:00
Compare commits
3 Commits
3498980131
...
1fa1b9a6a7
Author | SHA1 | Date | |
---|---|---|---|
|
1fa1b9a6a7 | ||
|
23dae9ce5a | ||
|
f1c1b3b69b |
14
bench.sh
14
bench.sh
@ -76,13 +76,21 @@ speed() {
|
|||||||
speed_test '40879' 'Montreal, CA'
|
speed_test '40879' 'Montreal, CA'
|
||||||
speed_test '24215' 'Paris, FR'
|
speed_test '24215' 'Paris, FR'
|
||||||
speed_test '28922' 'Amsterdam, NL'
|
speed_test '28922' 'Amsterdam, NL'
|
||||||
speed_test '24447' 'Shanghai, CN'
|
|
||||||
speed_test '26352' 'Nanjing, CN'
|
|
||||||
speed_test '27594' 'Guangzhou, CN'
|
|
||||||
speed_test '32155' 'Hongkong, CN'
|
speed_test '32155' 'Hongkong, CN'
|
||||||
speed_test '6527' 'Seoul, KR'
|
speed_test '6527' 'Seoul, KR'
|
||||||
speed_test '7311' 'Singapore, SG'
|
speed_test '7311' 'Singapore, SG'
|
||||||
speed_test '21569' 'Tokyo, JP'
|
speed_test '21569' 'Tokyo, JP'
|
||||||
|
speed_test '11342' 'VIETPN, VN'
|
||||||
|
speed_test '11411' 'DTS Telecom, VN'
|
||||||
|
speed_test '13373' 'SPT4, Viet Nam'
|
||||||
|
speed_test '27601' 'Viettel-DN, VN'
|
||||||
|
speed_test '18250' 'CMC Telecom, VN'
|
||||||
|
speed_test '24232' 'TPCOMS-HCM, VN'
|
||||||
|
speed_test '26853' 'Viettel-HCM, VN'
|
||||||
|
speed_test '2515' 'FPT-HCM, VN'
|
||||||
|
speed_test '6106' 'VNPT-NET, VN'
|
||||||
|
speed_test '8158' 'VTC DIGICOM, VN'
|
||||||
|
speed_test '16749' 'Vietnamobile, VN'
|
||||||
}
|
}
|
||||||
|
|
||||||
io_test() {
|
io_test() {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# Supported architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
|
# Supported architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
|
||||||
#
|
#
|
||||||
# Copyright (C) 2022 Teddysun <i@teddysun.com>
|
# Copyright (C) 2022 - 2023 Teddysun <i@teddysun.com>
|
||||||
#
|
#
|
||||||
# Reference URL:
|
# Reference URL:
|
||||||
# https://github.com/apernet/hysteria
|
# https://github.com/apernet/hysteria
|
||||||
@ -23,11 +23,12 @@ echo "git clone https://github.com/apernet/hysteria.git"
|
|||||||
git clone https://github.com/apernet/hysteria.git
|
git clone https://github.com/apernet/hysteria.git
|
||||||
cd hysteria || exit 2
|
cd hysteria || exit 2
|
||||||
|
|
||||||
|
APP_SRC_CMD_PKG="github.com/apernet/hysteria/app/cmd"
|
||||||
VERSION="$(git describe)"
|
VERSION="$(git describe)"
|
||||||
COMMIT="$(git rev-parse HEAD)"
|
COMMIT="$(git rev-parse HEAD)"
|
||||||
TIMESTAMP="$(date "+%F")"
|
TIMESTAMP="$(date "+%F")"
|
||||||
|
|
||||||
LDFLAGS="-s -w -X 'main.appVersion=${VERSION}' -X 'main.appCommit=${COMMIT}' -X 'main.appDate=${TIMESTAMP}' -buildid="
|
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 )
|
ARCHS=( 386 amd64 arm arm64 ppc64le s390x )
|
||||||
ARMS=( 6 7 )
|
ARMS=( 6 7 )
|
||||||
|
|
||||||
@ -35,18 +36,18 @@ for ARCH in ${ARCHS[@]}; do
|
|||||||
if [ "${ARCH}" = "arm" ]; then
|
if [ "${ARCH}" = "arm" ]; then
|
||||||
for V in ${ARMS[@]}; do
|
for V in ${ARMS[@]}; do
|
||||||
echo "Building hysteria_linux_${ARCH}${V}"
|
echo "Building hysteria_linux_${ARCH}${V}"
|
||||||
env CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} GOARM=${V} go build -v -trimpath -ldflags "${LDFLAGS}" -o ${cur_dir}/hysteria_linux_${ARCH}${V} ./app/cmd || exit 1
|
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
|
done
|
||||||
else
|
else
|
||||||
echo "Building hysteria_linux_${ARCH}"
|
echo "Building hysteria_linux_${ARCH}"
|
||||||
env CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -v -trimpath -ldflags "${LDFLAGS}" -o ${cur_dir}/hysteria_linux_${ARCH} ./app/cmd || exit 1
|
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
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
ARCHS=( 386 amd64 )
|
ARCHS=( 386 amd64 )
|
||||||
for ARCH in ${ARCHS[@]}; do
|
for ARCH in ${ARCHS[@]}; do
|
||||||
echo "Building hysteria_windows_${ARCH}.exe"
|
echo "Building hysteria_windows_${ARCH}.exe"
|
||||||
env CGO_ENABLED=0 GOOS=windows GOARCH=${ARCH} go build -v -trimpath -ldflags "${LDFLAGS}" -o ${cur_dir}/hysteria_windows_${ARCH}.exe ./app/cmd
|
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
|
done
|
||||||
|
|
||||||
chmod +x ${cur_dir}/hysteria_*
|
chmod +x ${cur_dir}/hysteria_*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user