Skip to content

Commit

Permalink
Merge pull request #15552 from Dentrax/shadowsocks-rust
Browse files Browse the repository at this point in the history
add shadowsocks-rust
  • Loading branch information
mamccorm authored Mar 21, 2024
2 parents 52633c6 + 6bdcadb commit 63798c3
Showing 1 changed file with 96 additions and 0 deletions.
96 changes: 96 additions & 0 deletions shadowsocks-rust.yaml
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

0 comments on commit 63798c3

Please sign in to comment.