-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15552 from Dentrax/shadowsocks-rust
add shadowsocks-rust
- Loading branch information
Showing
1 changed file
with
96 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,96 @@ | ||
package: | ||
name: shadowsocks-rust | ||
version: 1.18.2 | ||
epoch: 0 | ||
description: A Rust port of shadowsocks | ||
copyright: | ||
- license: MIT | ||
|
||
environment: | ||
contents: | ||
packages: | ||
- build-base | ||
- busybox | ||
- ca-certificates-bundle | ||
- glibc-dev | ||
- rust | ||
- rustup | ||
|
||
pipeline: | ||
- uses: git-checkout | ||
with: | ||
repository: https://github.com/shadowsocks/shadowsocks-rust | ||
tag: v${{package.version}} | ||
expected-commit: dcdeca032cad409d1ad133abeafa0270bb32a945 | ||
|
||
- name: Configure | ||
runs: | | ||
rustup override set stable | ||
rustup target add "${{host.triplet.rust}}" | ||
- runs: | | ||
cargo build --target "${{host.triplet.rust}}" --release --features "local-tun local-redir stream-cipher aead-cipher-2022" | ||
mkdir -p "${{targets.destdir}}"/target/release/ | ||
mv target/${{host.triplet.rust}}/release/ss* "${{targets.destdir}}"/target/release/ | ||
install -Dm644 examples/config.json "${{targets.destdir}}"/etc/shadowsocks-rust/config.json | ||
install -Dm755 docker/docker-entrypoint.sh "${{targets.destdir}}"/usr/bin/docker-entrypoint.sh | ||
- uses: strip | ||
|
||
data: | ||
- name: components | ||
items: | ||
sslocal: sslocal | ||
ssmanager: ssmanager | ||
ssserver: ssserver | ||
ssservice: ssservice | ||
ssurl: ssurl | ||
|
||
subpackages: | ||
- range: components | ||
name: "${{package.name}}-${{range.key}}" | ||
pipeline: | ||
- runs: | | ||
mkdir -p "${{targets.subpkgdir}}"/usr/bin/ | ||
install -Dm755 "${{targets.destdir}}"/target/release/${{range.key}} "${{targets.subpkgdir}}"/usr/bin/ | ||
test: | ||
environment: | ||
contents: | ||
packages: | ||
- shadowsocks-rust-sslocal | ||
- shadowsocks-rust-ssmanager | ||
- shadowsocks-rust-ssserver | ||
- shadowsocks-rust-ssservice | ||
- shadowsocks-rust-ssurl | ||
pipeline: | ||
- runs: | | ||
ssservice --version | ||
ssmanager --version | ||
ssurl --version | ||
- runs: | | ||
for bin in sslocal ssserver; do | ||
echo "Starting $bin" | ||
nohup $bin > $bin.out 2> $bin.err < /dev/null & | ||
pid=$! | ||
sleep 3 | ||
if ! (cat $bin.out $bin.err | grep "listening on"); then | ||
echo "Could not find expected 'listening on' log message in '$bin' output!" | ||
cat $bin.out | ||
cat $bin.err | ||
exit 1 | ||
fi | ||
echo "Stopping $bin" | ||
kill $pid | ||
sleep 3 | ||
done | ||
update: | ||
enabled: true | ||
github: | ||
identifier: shadowsocks/shadowsocks-rust | ||
strip-prefix: v |