From 58edc132c54b2d88696f5913a2d71dd3b023423b Mon Sep 17 00:00:00 2001 From: winlin Date: Sun, 7 Apr 2024 15:11:37 +0800 Subject: [PATCH] Rename SRS Stack to Oryx. v5.14.15 1. Rename SRS Stack to Oryx. 2. Rename SRS_STACK to ORYX. 3. Rename srs-stack to oryx. 4. Rename srs_stack to oryx. 5. Keep /usr/local/srs-stack --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/workflows/api-release.yml | 24 +- .github/workflows/focal.yml | 18 +- .github/workflows/nginx-hls-cdn.yml | 36 +- .github/workflows/pullrequest.yml | 72 ++-- .github/workflows/release.yml | 70 ++-- .github/workflows/test-online.yml | 34 +- .github/workflows/test.yml | 114 +++--- .gitignore | 2 + CONTRIBUTING.md | 4 +- DEVELOPER.md | 332 +++++++++--------- Dockerfile | 4 +- Makefile | 2 +- README.md | 39 +- SECURITY.md | 2 +- auto/focal.sh | 2 +- auto/pub.sh | 6 +- mgmt/bootstrap | 22 +- platform/bootstrap | 2 +- .../containers/conf/srs.release-local.conf | 2 +- platform/containers/conf/srs.release-mac.conf | 2 +- platform/containers/conf/srs.release.conf | 2 +- platform/report.go | 2 +- platform/service.go | 2 +- platform/srs-errors.go | 2 +- platform/srs-hooks.go | 4 +- platform/utils.go | 22 +- releases/main.go | 2 +- releases/version.go | 4 +- scripts/lightsail.sh | 18 +- scripts/nginx-hls-cdn/Dockerfile.http | 2 +- scripts/nginx-hls-cdn/Dockerfile.https | 6 +- scripts/nginx-hls-cdn/README.md | 40 +-- .../nginx.edge.http.conf.template | 4 +- .../nginx.edge.https.conf.template | 8 +- scripts/setup-aapanel/auto/zip.sh | 10 +- scripts/setup-aapanel/do_install.sh | 26 +- scripts/setup-aapanel/do_setup.sh | 30 +- scripts/setup-aapanel/index.html | 130 +++---- scripts/setup-aapanel/info.json | 10 +- scripts/setup-aapanel/init.d.sh | 12 +- .../{srs_stack_main.py => oryx_main.py} | 24 +- scripts/setup-aapanel/setup.sh | 6 +- scripts/setup-bt/auto/zip.sh | 10 +- scripts/setup-bt/do_install.sh | 26 +- scripts/setup-bt/do_setup.sh | 30 +- scripts/setup-bt/index.html | 128 +++---- scripts/setup-bt/info.json | 10 +- scripts/setup-bt/init.d.sh | 12 +- .../{srs_stack_main.py => oryx_main.py} | 24 +- scripts/setup-bt/setup.sh | 6 +- scripts/setup-droplet/scripts/01-srs.sh | 24 +- scripts/setup-droplet/scripts/02-ufw-srs.sh | 4 +- scripts/setup-lighthouse/build.sh | 8 +- scripts/setup-lighthouse/setup_lighthouse.sh | 26 +- scripts/setup-ubuntu/build.sh | 8 +- scripts/setup-ubuntu/init.d.sh | 12 +- scripts/setup-ubuntu/install.sh | 22 +- scripts/setup-ubuntu/uninstall.sh | 16 +- scripts/tools/bt_api_create_site.py | 2 +- scripts/tools/bt_tools.py | 2 +- scripts/tools/local-test-all.sh | 60 ++-- scripts/tools/secret.sh | 16 +- test/Makefile | 8 +- test/main_test.go | 14 +- ui/public/index.html | 4 +- ui/public/manifest.json | 4 +- ui/src/components/TutorialsButton.js | 10 +- ui/src/pages/Contact.js | 8 +- ui/src/pages/Footer.js | 6 +- ui/src/pages/Navigator.js | 2 +- ui/src/pages/Popouts.js | 2 +- ui/src/pages/ScenarioCamera.js | 4 +- ui/src/pages/ScenarioLive.js | 4 +- ui/src/pages/ScenarioRecord.js | 8 +- ui/src/pages/ScenarioSource.js | 8 +- ui/src/pages/ScenarioSrt.js | 2 +- ui/src/pages/ScenarioTranscode.js | 12 +- ui/src/pages/ScenarioVLive.js | 4 +- ui/src/resources/locale.json | 34 +- ui/src/utils.js | 6 +- .../{srs-stack.service => oryx.service} | 0 82 files changed, 875 insertions(+), 868 deletions(-) rename scripts/setup-aapanel/{srs_stack_main.py => oryx_main.py} (89%) rename scripts/setup-bt/{srs_stack_main.py => oryx_main.py} (89%) rename usr/lib/systemd/system/{srs-stack.service => oryx.service} (100%) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index e3a20658..4ab80a3a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -11,7 +11,7 @@ assignees: '' A clear and concise description of what the bug is. **Version** -Desribe your SRS Stack version here. +Desribe your Oryx version here. **To Reproduce** Steps to reproduce the behavior: diff --git a/.github/workflows/api-release.yml b/.github/workflows/api-release.yml index c3ae61ac..03686f96 100644 --- a/.github/workflows/api-release.yml +++ b/.github/workflows/api-release.yml @@ -44,8 +44,8 @@ jobs: # Build SRS image - name: Build SRS docker image run: | - echo "Release ossrs/srs-stack:$SRS_TAG" - docker build --tag ossrs/srs-stack:$SRS_TAG -f releases/Dockerfile . + echo "Release ossrs/oryx:$SRS_TAG" + docker build --tag ossrs/oryx:$SRS_TAG -f releases/Dockerfile . # Create main images for Docker - name: Login to docker hub uses: docker/login-action@v2 @@ -54,8 +54,8 @@ jobs: password: "${{ secrets.DOCKER_PASSWORD }}" - name: Push to Docker hub run: | - docker tag ossrs/srs-stack:$SRS_TAG ossrs/srs-stack:$SRS_MAJOR - docker push --all-tags ossrs/srs-stack + docker tag ossrs/oryx:$SRS_TAG ossrs/oryx:$SRS_MAJOR + docker push --all-tags ossrs/oryx runs-on: ubuntu-20.04 aliyun: @@ -74,13 +74,13 @@ jobs: registry: registry.cn-hangzhou.aliyuncs.com username: "${{ secrets.ACR_USERNAME }}" password: "${{ secrets.ACR_PASSWORD }}" - - name: Docker alias images for ossrs/srs-stack + - name: Docker alias images for ossrs/oryx uses: akhilerm/tag-push-action@v2.1.0 with: - src: ossrs/srs-stack:${{ env.SRS_TAG }} + src: ossrs/oryx:${{ env.SRS_TAG }} dst: | - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:${{ env.SRS_TAG }} - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:${{ env.SRS_MAJOR }} + registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:${{ env.SRS_TAG }} + registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:${{ env.SRS_MAJOR }} runs-on: ubuntu-20.04 deploy: @@ -121,14 +121,14 @@ jobs: export SRS_DROPLET_PIP=$(ifconfig eth0 |grep 'inet ' |awk '{print $2}') echo "SRS_DROPLET_PIP=$SRS_DROPLET_PIP" # - # Restart SRS Stack release + # Restart Oryx release cat << END > /root/restart_docs-stack.sh - # See https://github.com/ossrs/srs-stack - docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$SRS_MAJOR + # See https://github.com/ossrs/oryx + docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:$SRS_MAJOR docker rm -f docs-cloudversion || sleep 1 docker run -d -it --restart always --privileged --name docs-cloudversion -p 8101:9000 \\ --log-driver=json-file --log-opt=max-size=500m --log-opt=max-file=3 \\ - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$SRS_MAJOR + registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:$SRS_MAJOR END bash /root/restart_docs-stack.sh # diff --git a/.github/workflows/focal.yml b/.github/workflows/focal.yml index 9a524607..07c4d2fc 100644 --- a/.github/workflows/focal.yml +++ b/.github/workflows/focal.yml @@ -56,16 +56,16 @@ jobs: password: "${{ secrets.DOCKER_PASSWORD }}" - name: Build SRS docker image run: | - echo "Release ossrs/srs-stack:$SRS_TAG" + echo "Release ossrs/oryx:$SRS_TAG" docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64/v8 \ --output "type=image,push=true" \ - --tag ossrs/srs-stack:$SRS_TAG -f focal/Dockerfile . - - name: Docker alias images for ossrs/srs-stack + --tag ossrs/oryx:$SRS_TAG -f focal/Dockerfile . + - name: Docker alias images for ossrs/oryx uses: akhilerm/tag-push-action@v2.1.0 with: - src: ossrs/srs-stack:${{ env.SRS_TAG }} + src: ossrs/oryx:${{ env.SRS_TAG }} dst: | - ossrs/srs-stack:${{ env.SRS_MAJOR }} + ossrs/oryx:${{ env.SRS_MAJOR }} runs-on: ubuntu-20.04 aliyun: @@ -84,11 +84,11 @@ jobs: registry: registry.cn-hangzhou.aliyuncs.com username: "${{ secrets.ACR_USERNAME }}" password: "${{ secrets.ACR_PASSWORD }}" - - name: Docker alias images for ossrs/srs-stack + - name: Docker alias images for ossrs/oryx uses: akhilerm/tag-push-action@v2.1.0 with: - src: ossrs/srs-stack:${{ env.SRS_TAG }} + src: ossrs/oryx:${{ env.SRS_TAG }} dst: | - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:${{ env.SRS_TAG }} - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:${{ env.SRS_MAJOR }} + registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:${{ env.SRS_TAG }} + registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:${{ env.SRS_MAJOR }} runs-on: ubuntu-20.04 diff --git a/.github/workflows/nginx-hls-cdn.yml b/.github/workflows/nginx-hls-cdn.yml index b9c9f189..d763b908 100644 --- a/.github/workflows/nginx-hls-cdn.yml +++ b/.github/workflows/nginx-hls-cdn.yml @@ -43,34 +43,34 @@ jobs: password: "${{ secrets.DOCKER_PASSWORD }}" - name: Build HTTP docker image run: | - echo "Release ossrs/srs-stack:$SRS_MAJOR_HTTP-$SRS_VERSION" + echo "Release ossrs/oryx:$SRS_MAJOR_HTTP-$SRS_VERSION" docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64/v8 \ --output "type=image,push=true" \ - --tag ossrs/srs-stack:$SRS_MAJOR_HTTP \ + --tag ossrs/oryx:$SRS_MAJOR_HTTP \ -f scripts/nginx-hls-cdn/Dockerfile.http \ scripts/nginx-hls-cdn - name: Alias HTTP docker image uses: akhilerm/tag-push-action@v2.1.0 with: - src: ossrs/srs-stack:${{ env.SRS_MAJOR_HTTP }} + src: ossrs/oryx:${{ env.SRS_MAJOR_HTTP }} dst: | - ossrs/srs-stack:${{ env.SRS_MAJOR_HTTP }}-${{ env.SRS_VERSION }} - ossrs/srs-stack:nginx-hls-cdn-${{ env.SRS_VERSION }} - ossrs/srs-stack:nginx-hls-cdn + ossrs/oryx:${{ env.SRS_MAJOR_HTTP }}-${{ env.SRS_VERSION }} + ossrs/oryx:nginx-hls-cdn-${{ env.SRS_VERSION }} + ossrs/oryx:nginx-hls-cdn - name: Build HTTPS docker image run: | - echo "Release ossrs/srs-stack:$SRS_MAJOR_HTTPS-$SRS_VERSION" + echo "Release ossrs/oryx:$SRS_MAJOR_HTTPS-$SRS_VERSION" docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64/v8 \ --output "type=image,push=true" \ - --tag ossrs/srs-stack:$SRS_MAJOR_HTTPS \ + --tag ossrs/oryx:$SRS_MAJOR_HTTPS \ -f scripts/nginx-hls-cdn/Dockerfile.https \ scripts/nginx-hls-cdn - name: Alias HTTPS docker image uses: akhilerm/tag-push-action@v2.1.0 with: - src: ossrs/srs-stack:${{ env.SRS_MAJOR_HTTPS }} + src: ossrs/oryx:${{ env.SRS_MAJOR_HTTPS }} dst: | - ossrs/srs-stack:${{ env.SRS_MAJOR_HTTPS }}-${{ env.SRS_VERSION }} + ossrs/oryx:${{ env.SRS_MAJOR_HTTPS }}-${{ env.SRS_VERSION }} runs-on: ubuntu-20.04 aliyun: @@ -92,17 +92,17 @@ jobs: - name: Alias HTTP docker images uses: akhilerm/tag-push-action@v2.1.0 with: - src: ossrs/srs-stack:${{ env.SRS_MAJOR_HTTP }} + src: ossrs/oryx:${{ env.SRS_MAJOR_HTTP }} dst: | - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:${{ env.SRS_MAJOR_HTTP }} - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:${{ env.SRS_MAJOR_HTTP }}-${{ env.SRS_VERSION }} - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:nginx-hls-cdn-${{ env.SRS_VERSION }} - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:nginx-hls-cdn + registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:${{ env.SRS_MAJOR_HTTP }} + registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:${{ env.SRS_MAJOR_HTTP }}-${{ env.SRS_VERSION }} + registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:nginx-hls-cdn-${{ env.SRS_VERSION }} + registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:nginx-hls-cdn - name: Alias HTTPS docker images uses: akhilerm/tag-push-action@v2.1.0 with: - src: ossrs/srs-stack:${{ env.SRS_MAJOR_HTTPS }} + src: ossrs/oryx:${{ env.SRS_MAJOR_HTTPS }} dst: | - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:${{ env.SRS_MAJOR_HTTPS }} - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:${{ env.SRS_MAJOR_HTTPS }}-${{ env.SRS_VERSION }} + registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:${{ env.SRS_MAJOR_HTTPS }} + registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:${{ env.SRS_MAJOR_HTTPS }}-${{ env.SRS_VERSION }} runs-on: ubuntu-20.04 diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index d3d4687c..64b95d83 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -107,22 +107,22 @@ jobs: - name: Run test for platform image run: | docker load -i platform.tar - docker tag platform ossrs/srs-stack:5 + docker tag platform ossrs/oryx:5 docker run --rm -d -p 2022:2022 -p 2443:2443 -p 1935:1935 \ - -p 8000:8000/udp -p 10080:10080/udp --name srs-stack \ - -v /data:/data -e REACT_APP_LOCALE=zh ossrs/srs-stack:5 + -p 8000:8000/udp -p 10080:10080/udp --name oryx \ + -v /data:/data -e REACT_APP_LOCALE=zh ossrs/oryx:5 - name: Check and Test service run: | # We will handle the error by ourselves. set +e # Record all logs. - docker logs -f srs-stack >docker.log 2>&1 & pid_docker=$! + docker logs -f oryx >docker.log 2>&1 & pid_docker=$! echo "Wait for service ready." && make -j -C test && bash scripts/tools/secret.sh --output test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ -srs-log=true -wait-ready=true -init-password=true -init-self-signed-cert=true \ -check-api-secret=true -test.run TestSystem_Empty && @@ -131,25 +131,25 @@ jobs: echo "Test HTTP service." && bash scripts/tools/secret.sh --output test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true -no-media-test && echo "Test HTTPS service." && bash scripts/tools/secret.sh --output test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint https://localhost:2443 \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint https://localhost:2443 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true -no-media-test && echo "Run media test with retry" && bash scripts/tools/secret.sh --output test/.env && - ./scripts/tools/failed-retry.sh 3 ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ + ./scripts/tools/failed-retry.sh 3 ./test/oryx.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true -test.run WithStream ret=$?; echo "Test result: $ret" echo "Stop service" - docker stop srs-stack + docker stop oryx kill $pid_docker 2>/dev/null echo "Log of docker.log" && cat docker.log @@ -179,22 +179,22 @@ jobs: - name: Run test for platform image run: | docker load -i platform.tar - docker tag platform ossrs/srs-stack:5 + docker tag platform ossrs/oryx:5 docker run --rm -d -p 2022:2022 -p 2443:2443 -p 1935:1935 \ - -p 8000:8000/udp -p 10080:10080/udp --name srs-stack \ - -v /data:/data -e REACT_APP_LOCALE=en ossrs/srs-stack:5 + -p 8000:8000/udp -p 10080:10080/udp --name oryx \ + -v /data:/data -e REACT_APP_LOCALE=en ossrs/oryx:5 - name: Check and Test service run: | # We will handle the error by ourselves. set +e # Record all logs. - docker logs -f srs-stack >docker.log 2>&1 & pid_docker=$! + docker logs -f oryx >docker.log 2>&1 & pid_docker=$! echo "Wait for service ready." && make -j -C test && bash scripts/tools/secret.sh --output test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ -srs-log=true -wait-ready=true -init-password=true -init-self-signed-cert=true \ -check-api-secret=true -test.run TestSystem_Empty && @@ -203,25 +203,25 @@ jobs: echo "Test HTTP service." && bash scripts/tools/secret.sh --output test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true -no-media-test && echo "Test HTTPS service." && bash scripts/tools/secret.sh --output test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint https://localhost:2443 \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint https://localhost:2443 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true -no-media-test && echo "Run media test with retry" && bash scripts/tools/secret.sh --output test/.env && - ./scripts/tools/failed-retry.sh 3 ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ + ./scripts/tools/failed-retry.sh 3 ./test/oryx.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true -test.run WithStream ret=$?; echo "Test result: $ret" echo "Stop service" - docker stop srs-stack + docker stop oryx kill $pid_docker 2>/dev/null echo "Log of docker.log" && cat docker.log @@ -260,8 +260,8 @@ jobs: - name: Load platform image run: | docker load -i platform.tar - docker tag platform:latest ossrs/srs-stack:$SRS_TAG - docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$SRS_TAG + docker tag platform:latest ossrs/oryx:$SRS_TAG + docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:$SRS_TAG docker images - name: Build package run: | @@ -270,7 +270,7 @@ jobs: du -sh $(pwd)/build/* - name: Install package run: | - sudo bash build/srs_stack/scripts/setup-ubuntu/install.sh --verbose + sudo bash build/oryx/scripts/setup-ubuntu/install.sh --verbose echo "" && echo "/usr/local/srs-stack/" && du -sh /usr/local/srs-stack/* echo "" && ls -lha /data /data/config - name: Check and Test service @@ -279,12 +279,12 @@ jobs: set +e # Record all logs. - journalctl -u srs-stack -f >journalctl.log 2>&1 & pid_journalctl=$! + journalctl -u oryx -f >journalctl.log 2>&1 & pid_journalctl=$! echo "Wait for service ready." && make -j -C test && bash scripts/tools/secret.sh --output test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ -srs-log=true -wait-ready=true -init-password=true -init-self-signed-cert=true \ -check-api-secret=true -test.run TestSystem_Empty && @@ -293,25 +293,25 @@ jobs: echo "Test HTTP service." && bash scripts/tools/secret.sh --output test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true -no-media-test && echo "Test HTTPS service." && bash scripts/tools/secret.sh --output test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint https://localhost:2443 \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint https://localhost:2443 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true -no-media-test && echo "Run media test with retry" && bash scripts/tools/secret.sh --output test/.env && - ./scripts/tools/failed-retry.sh 3 ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ + ./scripts/tools/failed-retry.sh 3 ./test/oryx.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true -test.run WithStream ret=$?; echo "Test result: $ret" echo "Stop service" - sudo systemctl stop srs-stack + sudo systemctl stop oryx kill $pid_journalctl 2>/dev/null echo "Log of journalctl.log" && cat journalctl.log @@ -349,8 +349,8 @@ jobs: - name: Load platform image run: | docker load -i platform.tar - docker tag platform:latest ossrs/srs-stack:$SRS_TAG - docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$SRS_TAG + docker tag platform:latest ossrs/oryx:$SRS_TAG + docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:$SRS_TAG docker images - name: Build package run: | @@ -359,7 +359,7 @@ jobs: du -sh $(pwd)/build/* - name: Install package run: | - sudo bash build/srs_stack/scripts/setup-ubuntu/install.sh --verbose + sudo bash build/oryx/scripts/setup-ubuntu/install.sh --verbose echo "" && echo "/usr/local/srs-stack/" && du -sh /usr/local/srs-stack/* echo "" && ls -lha /data /data/config - name: Check and Test service @@ -368,12 +368,12 @@ jobs: set +e # Record all logs. - journalctl -u srs-stack -f >journalctl.log 2>&1 & pid_journalctl=$! + journalctl -u oryx -f >journalctl.log 2>&1 & pid_journalctl=$! echo "Wait for service ready." && make -j -C test && bash scripts/tools/secret.sh --output test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ -srs-log=true -wait-ready=true -init-password=true -init-self-signed-cert=true \ -check-api-secret=true -test.run TestSystem_Empty && @@ -382,25 +382,25 @@ jobs: echo "Test HTTP service." && bash scripts/tools/secret.sh --output test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true -no-media-test && echo "Test HTTPS service." && bash scripts/tools/secret.sh --output test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint https://localhost:2443 \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint https://localhost:2443 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true -no-media-test && echo "Run media test with retry" && bash scripts/tools/secret.sh --output test/.env && - ./scripts/tools/failed-retry.sh 3 ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ + ./scripts/tools/failed-retry.sh 3 ./test/oryx.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true -test.run WithStream ret=$?; echo "Test result: $ret" echo "Stop service" - sudo systemctl stop srs-stack + sudo systemctl stop oryx kill $pid_journalctl 2>/dev/null echo "Log of journalctl.log" && cat journalctl.log diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 89b9baad..eaf6332c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -101,19 +101,19 @@ jobs: cd ui && make build-cn -j && make build-en -j - name: Build SRS docker image run: | - echo "Release ossrs/srs-stack:$SRS_TAG" + echo "Release ossrs/oryx:$SRS_TAG" docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64/v8 \ --output "type=image,push=true" --build-arg MAKEARGS=build-no-ui \ - --tag ossrs/srs-stack:$SRS_TAG -f Dockerfile . - - name: Docker alias images for ossrs/srs-stack + --tag ossrs/oryx:$SRS_TAG -f Dockerfile . + - name: Docker alias images for ossrs/oryx uses: akhilerm/tag-push-action@v2.1.0 with: - src: ossrs/srs-stack:${{ env.SRS_TAG }} + src: ossrs/oryx:${{ env.SRS_TAG }} dst: | - ossrs/srs-stack:${{ env.SRS_XYZ }} + ossrs/oryx:${{ env.SRS_XYZ }} # TODO: FIXME: If stable release, update it. - #ossrs/srs-stack:${{ env.SRS_MAJOR }} - #ossrs/srs-stack:v${{ env.SRS_MAJOR }} + #ossrs/oryx:${{ env.SRS_MAJOR }} + #ossrs/oryx:v${{ env.SRS_MAJOR }} runs-on: ubuntu-20.04 aliyun: @@ -133,16 +133,16 @@ jobs: registry: registry.cn-hangzhou.aliyuncs.com username: "${{ secrets.ACR_USERNAME }}" password: "${{ secrets.ACR_PASSWORD }}" - - name: Docker alias images for ossrs/srs-stack + - name: Docker alias images for ossrs/oryx uses: akhilerm/tag-push-action@v2.1.0 with: - src: ossrs/srs-stack:${{ env.SRS_TAG }} + src: ossrs/oryx:${{ env.SRS_TAG }} dst: | - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:${{ env.SRS_TAG }} - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:${{ env.SRS_XYZ }} + registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:${{ env.SRS_TAG }} + registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:${{ env.SRS_XYZ }} # TODO: FIXME: If stable release, update it. - #registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:${{ env.SRS_MAJOR }} - #registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:v${{ env.SRS_MAJOR }} + #registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:${{ env.SRS_MAJOR }} + #registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:v${{ env.SRS_MAJOR }} runs-on: ubuntu-20.04 draft: @@ -186,34 +186,34 @@ jobs: # Create source tar for release. Note that it's for OpenWRT package srs-server, so the filename MUST be # srs-server-xxx.tar.gz, because the package is named srs-server. # Generate variables like: - # SRS_BT_SOURCE_FILE=srs_stack.zip + # SRS_BT_SOURCE_FILE=oryx.zip # SRS_BT_SOURCE_MD5=83e38700a80a26e30b2df054e69956e5 - # SRS_SOURCE_PATH=/tmp/srs_stack-asserts/*.zip + # SRS_SOURCE_PATH=/tmp/oryx-asserts/*.zip - name: Create source tar.gz run: | # # For BT - bash scripts/setup-bt/auto/zip.sh --output /tmp/zip-for-bt && SRS_BT_SOURCE_FILE=bt-srs_stack.zip && + bash scripts/setup-bt/auto/zip.sh --output /tmp/zip-for-bt && SRS_BT_SOURCE_FILE=bt-oryx.zip && echo "SRS_BT_SOURCE_FILE=${SRS_BT_SOURCE_FILE}" >> $GITHUB_ENV && echo "SRS_BT_SOURCE_MD5=$(md5sum /tmp/zip-for-bt/${SRS_BT_SOURCE_FILE}| awk '{print $1}')" >> $GITHUB_ENV # # For aaPanel - bash scripts/setup-aapanel/auto/zip.sh --output /tmp/zip-for-aapanel && SRS_AAPANEL_SOURCE_FILE=aapanel-srs_stack.zip && + bash scripts/setup-aapanel/auto/zip.sh --output /tmp/zip-for-aapanel && SRS_AAPANEL_SOURCE_FILE=aapanel-oryx.zip && echo "SRS_AAPANEL_SOURCE_FILE=${SRS_AAPANEL_SOURCE_FILE}" >> $GITHUB_ENV && echo "SRS_AAPANEL_SOURCE_MD5=$(md5sum /tmp/zip-for-aapanel/${SRS_AAPANEL_SOURCE_FILE}| awk '{print $1}')" >> $GITHUB_ENV # # For Ubuntu script: zh - bash scripts/setup-ubuntu/build.sh --output /tmp/zip-for-ubuntu --language zh && SRS_UBUNTU_ZH_SOURCE_FILE=linux-srs_stack-zh.tar.gz && + bash scripts/setup-ubuntu/build.sh --output /tmp/zip-for-ubuntu --language zh && SRS_UBUNTU_ZH_SOURCE_FILE=linux-oryx-zh.tar.gz && echo "SRS_UBUNTU_ZH_SOURCE_FILE=${SRS_UBUNTU_ZH_SOURCE_FILE}" >> $GITHUB_ENV && echo "SRS_UBUNTU_ZH_SOURCE_FILE_MD5=$(md5sum /tmp/zip-for-ubuntu/${SRS_UBUNTU_ZH_SOURCE_FILE}| awk '{print $1}')" >> $GITHUB_ENV # # For Ubuntu script: en - bash scripts/setup-ubuntu/build.sh --output /tmp/zip-for-ubuntu --language en && SRS_UBUNTU_EN_SOURCE_FILE=linux-srs_stack-en.tar.gz && + bash scripts/setup-ubuntu/build.sh --output /tmp/zip-for-ubuntu --language en && SRS_UBUNTU_EN_SOURCE_FILE=linux-oryx-en.tar.gz && echo "SRS_UBUNTU_EN_SOURCE_FILE=${SRS_UBUNTU_EN_SOURCE_FILE}" >> $GITHUB_ENV && echo "SRS_UBUNTU_EN_SOURCE_FILE_MD5=$(md5sum /tmp/zip-for-ubuntu/${SRS_UBUNTU_EN_SOURCE_FILE}| awk '{print $1}')" >> $GITHUB_ENV # echo "Gather asserts" - SRS_SOURCE_PATH=/tmp/srs_stack-asserts && rm -rf $SRS_SOURCE_PATH && mkdir -p $SRS_SOURCE_PATH && + SRS_SOURCE_PATH=/tmp/oryx-asserts && rm -rf $SRS_SOURCE_PATH && mkdir -p $SRS_SOURCE_PATH && mv /tmp/zip-for-bt/${SRS_BT_SOURCE_FILE} $SRS_SOURCE_PATH && mv /tmp/zip-for-aapanel/${SRS_AAPANEL_SOURCE_FILE} $SRS_SOURCE_PATH && mv /tmp/zip-for-ubuntu/${SRS_UBUNTU_ZH_SOURCE_FILE} $SRS_SOURCE_PATH && @@ -240,31 +240,31 @@ jobs: with: allowUpdates: true tag: ${{ github.ref }} - name: Release SRS Stack ${{ env.SRS_TAG }} + name: Release Oryx ${{ env.SRS_TAG }} body: | - [${{ github.event.head_commit.message }}](https://github.com/ossrs/srs-stack/commit/${{ github.sha }}) + [${{ github.event.head_commit.message }}](https://github.com/ossrs/oryx/commit/${{ github.sha }}) ## English - * [docker pull ossrs/srs-stack:${{ env.SRS_TAG }}](https://ossrs.io/lts/en-us/docs/v5/doc/getting-started-stack#docker) + * [docker pull ossrs/oryx:${{ env.SRS_TAG }}](https://ossrs.io/lts/en-us/docs/v5/doc/getting-started-stack#docker) * [DigitalOcean](https://marketplace.digitalocean.com/apps/srs): [Tutorial](https://blog.ossrs.io/how-to-setup-a-video-streaming-service-by-1-click-e9fe6f314ac6) - * Ubuntu Script: ${{ env.SRS_UBUNTU_EN_SOURCE_FILE_MD5 }} [${{ env.SRS_UBUNTU_EN_SOURCE_FILE }}](https://github.com/ossrs/srs-stack/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_UBUNTU_EN_SOURCE_FILE }}) - * [aaPanel](https://aapanel.com) Plugin: ${{ env.SRS_AAPANEL_SOURCE_MD5 }} [${{ env.SRS_AAPANEL_SOURCE_FILE }}](https://github.com/ossrs/srs-stack/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_AAPANEL_SOURCE_FILE }}) - * [Changelog](https://ossrs.io/lts/en-us/faq-srs-stack#changelog) - * [Features](https://ossrs.io/lts/en-us/faq-srs-stack#features) + * Ubuntu Script: ${{ env.SRS_UBUNTU_EN_SOURCE_FILE_MD5 }} [${{ env.SRS_UBUNTU_EN_SOURCE_FILE }}](https://github.com/ossrs/oryx/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_UBUNTU_EN_SOURCE_FILE }}) + * [aaPanel](https://aapanel.com) Plugin: ${{ env.SRS_AAPANEL_SOURCE_MD5 }} [${{ env.SRS_AAPANEL_SOURCE_FILE }}](https://github.com/ossrs/oryx/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_AAPANEL_SOURCE_FILE }}) + * [Changelog](https://ossrs.io/lts/en-us/faq-oryx#changelog) + * [Features](https://ossrs.io/lts/en-us/faq-oryx#features) ## Chinese - * [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:${{ env.SRS_TAG }}](https://ossrs.net/lts/zh-cn/docs/v5/doc/getting-started-stack#docker) + * [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:${{ env.SRS_TAG }}](https://ossrs.net/lts/zh-cn/docs/v5/doc/getting-started-stack#docker) * [Lighthouse](https://mp.weixin.qq.com/s/fWmdkw-2AoFD_pEmE_EIkA): [Tutorial](https://www.bilibili.com/video/BV1844y1L7dL) - * Ubuntu Script: ${{ env.SRS_UBUNTU_ZH_SOURCE_FILE_MD5 }} [${{ env.SRS_UBUNTU_ZH_SOURCE_FILE }}](https://gitee.com/ossrs/srs-stack/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_UBUNTU_ZH_SOURCE_FILE }}) - * [BT](https://bt.cn) Plugin: ${{ env.SRS_BT_SOURCE_MD5 }} [${{ env.SRS_BT_SOURCE_FILE }}](https://gitee.com/ossrs/srs-stack/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_BT_SOURCE_FILE }}) - * [aaPanel](https://aapanel.com) Plugin: ${{ env.SRS_AAPANEL_SOURCE_MD5 }} [${{ env.SRS_AAPANEL_SOURCE_FILE }}](https://gitee.com/ossrs/srs-stack/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_AAPANEL_SOURCE_FILE }}) - * [Changelog](https://ossrs.net/lts/zh-cn/faq-srs-stack#changelog) - * [Features](https://ossrs.net/lts/zh-cn/faq-srs-stack#features) + * Ubuntu Script: ${{ env.SRS_UBUNTU_ZH_SOURCE_FILE_MD5 }} [${{ env.SRS_UBUNTU_ZH_SOURCE_FILE }}](https://gitee.com/ossrs/oryx/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_UBUNTU_ZH_SOURCE_FILE }}) + * [BT](https://bt.cn) Plugin: ${{ env.SRS_BT_SOURCE_MD5 }} [${{ env.SRS_BT_SOURCE_FILE }}](https://gitee.com/ossrs/oryx/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_BT_SOURCE_FILE }}) + * [aaPanel](https://aapanel.com) Plugin: ${{ env.SRS_AAPANEL_SOURCE_MD5 }} [${{ env.SRS_AAPANEL_SOURCE_FILE }}](https://gitee.com/ossrs/oryx/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_AAPANEL_SOURCE_FILE }}) + * [Changelog](https://ossrs.net/lts/zh-cn/faq-oryx#changelog) + * [Features](https://ossrs.net/lts/zh-cn/faq-oryx#features) # TODO: FIXME: If stable release, update it. ## English - #* [docker pull ossrs/srs-stack:5](https://ossrs.io/lts/en-us/docs/v5/doc/getting-started-stack#docker) + #* [docker pull ossrs/oryx:5](https://ossrs.io/lts/en-us/docs/v5/doc/getting-started-stack#docker) ## Chinese - #* [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:5](https://ossrs.net/lts/zh-cn/docs/v5/doc/getting-started-stack#docker) + #* [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:5](https://ossrs.net/lts/zh-cn/docs/v5/doc/getting-started-stack#docker) draft: false # TODO: FIXME: If stable release, update it. prerelease: true diff --git a/.github/workflows/test-online.yml b/.github/workflows/test-online.yml index e9a97f84..029b699b 100644 --- a/.github/workflows/test-online.yml +++ b/.github/workflows/test-online.yml @@ -116,9 +116,9 @@ jobs: # All files in provision will be uploaded to server. mkdir -p provision provision/test - cp test/srs-stack.test test/source.200kbps.768x320.flv provision/test/ + cp test/oryx.test test/source.200kbps.768x320.flv provision/test/ cp scripts/tools/failed-retry.sh provision/ - cp build/linux-srs_stack-en.tar.gz platform/containers/conf/nginx.conf \ + cp build/linux-oryx-en.tar.gz platform/containers/conf/nginx.conf \ scripts/tools/secret.sh provision/ - name: Copy file via ssh key uses: appleboy/scp-action@v0.1.4 @@ -254,13 +254,13 @@ jobs: tar xf platform.tar.gz docker load -i platform.tar fi - docker tag platform:latest ossrs/srs-stack:$SRS_TAG - docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$SRS_TAG + docker tag platform:latest ossrs/oryx:$SRS_TAG + docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:$SRS_TAG docker image prune -f docker images - tar xf linux-srs_stack-en.tar.gz - bash srs_stack/scripts/setup-ubuntu/install.sh + tar xf linux-oryx-en.tar.gz + bash oryx/scripts/setup-ubuntu/install.sh # Setup journald to write logs. sed -i 's/#Storage=auto/Storage=volatile/g' /etc/systemd/journald.conf @@ -283,16 +283,16 @@ jobs: set +e # Record all logs. - journalctl -u srs-stack -f >srs.log 2>&1 & pid_srs=$! + journalctl -u oryx -f >srs.log 2>&1 & pid_srs=$! journalctl -u nginx -f >nginx.log 2>&1 & pid_nginx=$! # Restart the service, might fail because journald restarted. - systemctl restart srs-stack nginx - systemctl status srs-stack nginx + systemctl restart oryx nginx + systemctl status oryx nginx echo "Wait for service ready." && bash secret.sh >./test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://$SRS_DOMAIN.ossrs.io \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint http://$SRS_DOMAIN.ossrs.io \ -srs-log=true -wait-ready=true -init-password=true -check-api-secret=true -init-self-signed-cert=true \ -test.run TestSystem_Empty -no-bilibili-test=true && @@ -301,38 +301,38 @@ jobs: echo "Test HTTP API with self-signed cert." && bash secret.sh >./test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -wait-ready -endpoint http://$SRS_DOMAIN.ossrs.io \ + ./test/oryx.test -test.timeout=1h -test.v -wait-ready -endpoint http://$SRS_DOMAIN.ossrs.io \ -srs-log=true -wait-ready=true -init-password=false -check-api-secret=true -no-media-test \ -no-bilibili-test=true && echo "Test HTTPS API with self-signed cert." && bash secret.sh >./test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -wait-ready -endpoint https://$SRS_DOMAIN.ossrs.io \ + ./test/oryx.test -test.timeout=1h -test.v -wait-ready -endpoint https://$SRS_DOMAIN.ossrs.io \ -srs-log=true -wait-ready=true -init-password=false -check-api-secret=true -no-media-test \ -no-bilibili-test=true && echo "Request CERT from letsencrypt." && bash secret.sh >./test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://$SRS_DOMAIN.ossrs.io \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint http://$SRS_DOMAIN.ossrs.io \ -srs-log=true -wait-ready=true -init-password=false -check-api-secret=true -domain-lets-encrypt=$SRS_DOMAIN.ossrs.io \ -test.run TestApi_LetsEncryptUpdateCert -no-media-test \ -no-bilibili-test=true && echo "Test HTTPS API with letsencrypt cert." && bash secret.sh >./test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -wait-ready -endpoint https://$SRS_DOMAIN.ossrs.io \ + ./test/oryx.test -test.timeout=1h -test.v -wait-ready -endpoint https://$SRS_DOMAIN.ossrs.io \ -srs-log=true -wait-ready=true -init-password=false -check-api-secret=true -https-insecure-verify \ -no-media-test -no-bilibili-test=true && echo "Run media test with retry" && bash secret.sh >./test/.env && - ./failed-retry.sh 5 ./test/srs-stack.test -test.timeout=1h -test.v -wait-ready -endpoint http://$SRS_DOMAIN.ossrs.io \ + ./failed-retry.sh 5 ./test/oryx.test -test.timeout=1h -test.v -wait-ready -endpoint http://$SRS_DOMAIN.ossrs.io \ -srs-log=true -wait-ready=true -init-password=false -check-api-secret=true -test.run WithStream \ -no-bilibili-test=true ret=$?; echo "Test result: $ret" echo "Stop service" - sudo systemctl stop srs-stack + sudo systemctl stop oryx kill $pid_srs 2>/dev/null kill $pid_nginx 2>/dev/null echo "Log of srs.log" && cat srs.log @@ -403,7 +403,7 @@ jobs: echo "Test done normally." else echo "Start service for debugging" - sudo systemctl start srs-stack + sudo systemctl start oryx echo "Dispose in 60s..." for ((i=60; i>0; i--)); do diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7979a2f6..8ccd1862 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,10 +74,10 @@ jobs: - name: Run test for platform image run: | docker load -i platform.tar - docker tag platform ossrs/srs-stack:5 + docker tag platform ossrs/oryx:5 docker run --rm -d -p 2022:2022 -p 2443:2443 -p 1935:1935 \ - -p 8000:8000/udp -p 10080:10080/udp --name srs-stack \ - -v /data:/data -e REACT_APP_LOCALE=en ossrs/srs-stack:5 + -p 8000:8000/udp -p 10080:10080/udp --name oryx \ + -v /data:/data -e REACT_APP_LOCALE=en ossrs/oryx:5 - name: Check and Test service env: SRS_OPENAI_KEY: ${{ secrets.SRS_OPENAI_KEY }} @@ -86,12 +86,12 @@ jobs: set +e # Record all logs. - docker logs -f srs-stack >docker.log 2>&1 & pid_docker=$! + docker logs -f oryx >docker.log 2>&1 & pid_docker=$! echo "Wait for service ready." && make -j -C test && bash scripts/tools/secret.sh --output test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ -srs-log=true -wait-ready=true -init-password=true -init-self-signed-cert=true \ -check-api-secret=true -test.run TestSystem_Empty && @@ -100,25 +100,25 @@ jobs: echo "Test HTTP service." && bash scripts/tools/secret.sh --output test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true -no-media-test && echo "Test HTTPS service." && bash scripts/tools/secret.sh --output test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint https://localhost:2443 \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint https://localhost:2443 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true -no-media-test && echo "Run media test with retry" && bash scripts/tools/secret.sh --output test/.env && - ./scripts/tools/failed-retry.sh 3 ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ + ./scripts/tools/failed-retry.sh 3 ./test/oryx.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true -test.run WithStream ret=$?; echo "Test result: $ret" echo "Stop service" - docker stop srs-stack + docker stop oryx kill $pid_docker 2>/dev/null echo "Log of docker.log" && cat docker.log @@ -186,7 +186,7 @@ jobs: # Note that we must mount the /data to allow test to read the MGMT_PASSWORD in /data/config/.env docker run -v /data:/data -p 80:80 -p 443:443 -p 7800:7800 \ -p 2022:2022 -p 1935:1935 -p 8000:8000/udp -p 10080:10080/udp \ - -v $(pwd)/build/srs_stack:/www/server/panel/plugin/srs_stack \ + -v $(pwd)/build/oryx:/www/server/panel/plugin/oryx \ -v $HOME/.bt/userInfo.json:/www/server/panel/data/userInfo.json \ -v $HOME/.bt/api.json:/www/server/panel/config/api.json -e BT_KEY=$BT_KEY \ --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro \ @@ -214,38 +214,38 @@ jobs: docker exec bt docker load -i platform.tar echo "Import platform image to BT ok." - docker exec bt docker tag platform:latest ossrs/srs-stack:$SRS_TAG - docker exec bt docker tag platform:latest ossrs/srs-stack:$SRS_MAJOR - docker exec bt docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$SRS_TAG - docker exec bt docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$SRS_MAJOR + docker exec bt docker tag platform:latest ossrs/oryx:$SRS_TAG + docker exec bt docker tag platform:latest ossrs/oryx:$SRS_MAJOR + docker exec bt docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:$SRS_TAG + docker exec bt docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:$SRS_MAJOR echo "Tag platform image to BT ok." docker exec bt docker images - - name: Install SRS Stack plugin + - name: Install Oryx plugin run: | - docker exec bt bash /www/server/panel/plugin/srs_stack/install.sh install - echo "Install SRS Stack plugin ok." + docker exec bt bash /www/server/panel/plugin/oryx/install.sh install + echo "Install Oryx plugin ok." - docker exec bt python3 /www/server/panel/plugin/srs_stack/bt_api_create_site.py - docker exec bt python3 /www/server/panel/plugin/srs_stack/bt_api_setup_site.py + docker exec bt python3 /www/server/panel/plugin/oryx/bt_api_create_site.py + docker exec bt python3 /www/server/panel/plugin/oryx/bt_api_setup_site.py echo "Create SRS site ok." - docker exec bt bash /www/server/panel/plugin/srs_stack/setup.sh \ - --r0 /tmp/srs_stack_install.r0 --nginx /www/server/nginx/logs/nginx.pid \ + docker exec bt bash /www/server/panel/plugin/oryx/setup.sh \ + --r0 /tmp/oryx_install.r0 --nginx /www/server/nginx/logs/nginx.pid \ --www /www/wwwroot --site srs.stack.local - echo "Setup SRS Stack plugin ok." + echo "Setup Oryx plugin ok." echo "Setup the dns lookup for domain" PIP=$(docker exec bt ifconfig eth0 |grep 'inet ' |awk '{print $2}') && docker exec bt bash -c "echo '$PIP srs.stack.local' >> /etc/hosts" && docker exec bt cat /etc/hosts && echo OK && - docker exec bt docker exec srs-stack bash -c "echo '$PIP srs.stack.local' >> /etc/hosts" && - docker exec bt docker exec srs-stack cat /etc/hosts + docker exec bt docker exec oryx bash -c "echo '$PIP srs.stack.local' >> /etc/hosts" && + docker exec bt docker exec oryx cat /etc/hosts set +e - docker exec bt systemctl status srs-stack - docker exec bt journalctl -u srs-stack - docker exec bt docker logs srs-stack + docker exec bt systemctl status oryx + docker exec bt journalctl -u oryx + docker exec bt docker logs oryx - name: Check and Test service env: SRS_OPENAI_KEY: ${{ secrets.SRS_OPENAI_KEY }} @@ -254,12 +254,12 @@ jobs: set +e # Record all logs. - docker exec bt journalctl -u srs-stack -f >journalctl.log 2>&1 & + docker exec bt journalctl -u oryx -f >journalctl.log 2>&1 & echo "Wait for service ready." && make -j -C test && bash scripts/tools/secret.sh --output test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://srs.stack.local:80 \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint http://srs.stack.local:80 \ -srs-log=true -wait-ready=true -init-password=true -init-self-signed-cert=true \ -check-api-secret=true -test.run TestSystem_Empty && @@ -268,25 +268,25 @@ jobs: echo "Test HTTP service." && bash scripts/tools/secret.sh --output test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://srs.stack.local:80 \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint http://srs.stack.local:80 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true -no-media-test && echo "Test HTTPS service." && bash scripts/tools/secret.sh --output test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint https://srs.stack.local:443 \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint https://srs.stack.local:443 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true -no-media-test && echo "Run media test with retry" && bash scripts/tools/secret.sh --output test/.env && - ./scripts/tools/failed-retry.sh 3 ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://srs.stack.local:80 \ + ./scripts/tools/failed-retry.sh 3 ./test/oryx.test -test.timeout=1h -test.v -endpoint http://srs.stack.local:80 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true -test.run WithStream ret=$?; echo "Test result: $ret" echo "Stop service" - docker exec bt systemctl stop srs-stack + docker exec bt systemctl stop oryx docker stop bt echo "Log of journalctl.log" && cat journalctl.log @@ -352,7 +352,7 @@ jobs: # Note that we must mount the /data to allow test to read the MGMT_PASSWORD in /data/config/.env docker run -v /data:/data -p 80:80 -p 443:443 -p 7800:7800 \ -p 2022:2022 -p 1935:1935 -p 8000:8000/udp -p 10080:10080/udp \ - -v $(pwd)/build/srs_stack:/www/server/panel/plugin/srs_stack \ + -v $(pwd)/build/oryx:/www/server/panel/plugin/oryx \ -v $HOME/.aapanel/api.json:/www/server/panel/config/api.json -e BT_KEY=$AAPANEL_KEY \ --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro \ -d --rm -v $(pwd):/g -w /g --name=aapanel ossrs/aapanel-plugin-dev:1 @@ -379,38 +379,38 @@ jobs: docker exec aapanel docker load -i platform.tar echo "Import platform image to aaPanel ok." - docker exec aapanel docker tag platform:latest ossrs/srs-stack:$SRS_TAG - docker exec aapanel docker tag platform:latest ossrs/srs-stack:$SRS_MAJOR - docker exec aapanel docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$SRS_TAG - docker exec aapanel docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$SRS_MAJOR + docker exec aapanel docker tag platform:latest ossrs/oryx:$SRS_TAG + docker exec aapanel docker tag platform:latest ossrs/oryx:$SRS_MAJOR + docker exec aapanel docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:$SRS_TAG + docker exec aapanel docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:$SRS_MAJOR echo "Tag platform image to aaPanel ok." docker exec aapanel docker images - - name: Install SRS Stack plugin + - name: Install Oryx plugin run: | - docker exec aapanel bash /www/server/panel/plugin/srs_stack/install.sh install - echo "Install SRS Stack plugin ok." + docker exec aapanel bash /www/server/panel/plugin/oryx/install.sh install + echo "Install Oryx plugin ok." - docker exec aapanel python3 /www/server/panel/plugin/srs_stack/bt_api_create_site.py - docker exec aapanel python3 /www/server/panel/plugin/srs_stack/bt_api_setup_site.py + docker exec aapanel python3 /www/server/panel/plugin/oryx/bt_api_create_site.py + docker exec aapanel python3 /www/server/panel/plugin/oryx/bt_api_setup_site.py echo "Create SRS site ok." - docker exec aapanel bash /www/server/panel/plugin/srs_stack/setup.sh \ - --r0 /tmp/srs_stack_install.r0 --nginx /www/server/nginx/logs/nginx.pid \ + docker exec aapanel bash /www/server/panel/plugin/oryx/setup.sh \ + --r0 /tmp/oryx_install.r0 --nginx /www/server/nginx/logs/nginx.pid \ --www /www/wwwroot --site srs.stack.local - echo "Setup SRS Stack plugin ok." + echo "Setup Oryx plugin ok." echo "Setup the dns lookup for domain" PIP=$(docker exec aapanel ifconfig eth0 |grep 'inet ' |awk '{print $2}') && docker exec aapanel bash -c "echo '$PIP srs.stack.local' >> /etc/hosts" && docker exec aapanel cat /etc/hosts && echo OK && - docker exec aapanel docker exec srs-stack bash -c "echo '$PIP srs.stack.local' >> /etc/hosts" && - docker exec aapanel docker exec srs-stack cat /etc/hosts + docker exec aapanel docker exec oryx bash -c "echo '$PIP srs.stack.local' >> /etc/hosts" && + docker exec aapanel docker exec oryx cat /etc/hosts set +e - docker exec aapanel systemctl status srs-stack - docker exec aapanel journalctl -u srs-stack - docker exec aapanel docker logs srs-stack + docker exec aapanel systemctl status oryx + docker exec aapanel journalctl -u oryx + docker exec aapanel docker logs oryx - name: Check and Test service env: SRS_OPENAI_KEY: ${{ secrets.SRS_OPENAI_KEY }} @@ -419,12 +419,12 @@ jobs: set +e # Record all logs. - docker exec aapanel journalctl -u srs-stack -f >journalctl.log 2>&1 & + docker exec aapanel journalctl -u oryx -f >journalctl.log 2>&1 & echo "Wait for service ready." && make -j -C test && bash scripts/tools/secret.sh --output test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://srs.stack.local:80 \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint http://srs.stack.local:80 \ -srs-log=true -wait-ready=true -init-password=true -init-self-signed-cert=true \ -check-api-secret=true -test.run TestSystem_Empty && @@ -433,25 +433,25 @@ jobs: echo "Test HTTP service." && bash scripts/tools/secret.sh --output test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://srs.stack.local:80 \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint http://srs.stack.local:80 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true -no-media-test && echo "Test HTTPS service." && bash scripts/tools/secret.sh --output test/.env && - ./test/srs-stack.test -test.timeout=1h -test.v -endpoint https://srs.stack.local:443 \ + ./test/oryx.test -test.timeout=1h -test.v -endpoint https://srs.stack.local:443 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true -no-media-test && echo "Run media test with retry" && bash scripts/tools/secret.sh --output test/.env && - ./scripts/tools/failed-retry.sh 3 ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://srs.stack.local:80 \ + ./scripts/tools/failed-retry.sh 3 ./test/oryx.test -test.timeout=1h -test.v -endpoint http://srs.stack.local:80 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true -test.run WithStream ret=$?; echo "Test result: $ret" echo "Stop service" - docker exec aapanel systemctl stop srs-stack + docker exec aapanel systemctl stop oryx docker stop aapanel echo "Log of journalctl.log" && cat journalctl.log diff --git a/.gitignore b/.gitignore index 21f18587..7a21e1de 100644 --- a/.gitignore +++ b/.gitignore @@ -130,6 +130,8 @@ t.md /*.tar /*.gz /srs-stack2 +/oryx +/test/oryx.test /test/srs-stack.test __pycache__ *.flv diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 162489e1..4ec21151 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ -Welome to contribute to SRS Stack! +Welome to contribute to Oryx! -1. Please start from fixing some [Issues: good first issue](https://github.com/ossrs/srs-stack/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22). +1. Please start from fixing some [Issues: good first issue](https://github.com/ossrs/oryx/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22). 1. Please [setup your email](https://github.com/ossrs/srs/wiki/HowToFilePR#setup-your-email) before contributing, this is important. 1. Then follow the [guide](https://github.com/ossrs/srs/wiki/HowToFilePR) to file a PR. 1. We will review your PR ASAP. diff --git a/DEVELOPER.md b/DEVELOPER.md index 2530755b..d640ba29 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -65,15 +65,15 @@ Start a container: ```bash docker stop redis 2>/dev/null || echo ok && docker rm -f redis srs 2>/dev/null && -docker run --rm -it --name srs-stack -v $HOME/data:/data \ +docker run --rm -it --name oryx -v $HOME/data:/data \ -p 2022:2022 -p 2443:2443 -p 1935:1935 -p 8000:8000/udp -p 10080:10080/udp \ -p 80:2022 -p 443:2443 -e CANDIDATE=$(ifconfig en0 |grep 'inet ' |awk '{print $2}') \ platform ``` -Access [http://localhost/mgmt](http://localhost/mgmt) to manage SRS Stack. +Access [http://localhost/mgmt](http://localhost/mgmt) to manage Oryx. -Or [http://srs.stack.local/mgmt](http://srs.stack.local/mgmt) to test SRS Stack with domain. +Or [http://srs.stack.local/mgmt](http://srs.stack.local/mgmt) to test Oryx with domain. To update the platform in docker: @@ -85,7 +85,7 @@ Start a container with the new platform: ```bash docker stop redis 2>/dev/null || echo ok && docker rm -f redis srs 2>/dev/null && -docker run --rm -it --name srs-stack -v $HOME/data:/data \ +docker run --rm -it --name oryx -v $HOME/data:/data \ -p 2022:2022 -p 2443:2443 -p 1935:1935 -p 8000:8000/udp -p 10080:10080/udp \ -p 80:2022 -p 443:2443 -e CANDIDATE=$(ifconfig en0 |grep 'inet ' |awk '{print $2}') \ -v $(pwd)/platform/platform:/usr/local/srs-stack/platform/platform \ @@ -132,8 +132,8 @@ Enter the docker container: ```bash version=$(bash scripts/version.sh) && docker exec -it script docker load -i platform.tar && -docker exec -it script docker tag platform:latest ossrs/srs-stack:$version && -docker exec -it script docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$version && +docker exec -it script docker tag platform:latest ossrs/oryx:$version && +docker exec -it script docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:$version && docker exec -it script docker images ``` @@ -141,25 +141,25 @@ Test the build script, in the docker container: ```bash docker exec -it script rm -f /data/config/.env && -docker exec -it script bash build/srs_stack/scripts/setup-ubuntu/uninstall.sh 2>/dev/null || echo OK && +docker exec -it script bash build/oryx/scripts/setup-ubuntu/uninstall.sh 2>/dev/null || echo OK && bash scripts/setup-ubuntu/build.sh --output $(pwd)/build --extract && -docker exec -it script bash build/srs_stack/scripts/setup-ubuntu/install.sh --verbose +docker exec -it script bash build/oryx/scripts/setup-ubuntu/install.sh --verbose ``` Run test for script: ```bash -rm -f test/srs-stack.test && +rm -f test/oryx.test && docker exec -it script make -j -C test && bash scripts/tools/secret.sh --output test/.env && -docker exec -it script ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ +docker exec -it script ./test/oryx.test -test.timeout=1h -test.v -endpoint http://localhost:2022 \ -srs-log=true -wait-ready=true -init-password=true -check-api-secret=true -init-self-signed-cert=true \ -test.run TestSystem_Empty && bash scripts/tools/secret.sh --output test/.env && -docker exec -it script ./test/srs-stack.test -test.timeout=1h -test.v -wait-ready -endpoint http://localhost:2022 \ +docker exec -it script ./test/oryx.test -test.timeout=1h -test.v -wait-ready -endpoint http://localhost:2022 \ -srs-log=true -wait-ready=true -init-password=false -check-api-secret=true \ -test.parallel 3 && -docker exec -it script ./test/srs-stack.test -test.timeout=1h -test.v -wait-ready -endpoint https://localhost:2443 \ +docker exec -it script ./test/oryx.test -test.timeout=1h -test.v -wait-ready -endpoint https://localhost:2443 \ -srs-log=true -wait-ready=true -init-password=false -check-api-secret=true \ -test.parallel 3 ``` @@ -177,7 +177,7 @@ docker rm -f bt aapanel 2>/dev/null && AAPANEL_KEY=$(cat $HOME/.bt/api.json |awk -F token_crypt '{print $2}' |cut -d'"' -f3) && docker run -p 80:80 -p 443:443 -p 7800:7800 -p 1935:1935 -p 8000:8000/udp -p 10080:10080/udp \ --env CANDIDATE=$(ifconfig en0 |grep 'inet ' |awk '{print $2}') \ - -v $(pwd)/build/srs_stack:/www/server/panel/plugin/srs_stack \ + -v $(pwd)/build/oryx:/www/server/panel/plugin/oryx \ -v $HOME/.bt/api.json:/www/server/panel/config/api.json -e BT_KEY=$AAPANEL_KEY \ --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:rw --cgroupns=host \ -d --rm -it -v $(pwd):/g -w /g --name=aapanel ossrs/aapanel-plugin-dev:1 @@ -202,10 +202,10 @@ Enter the docker container: version=$(bash scripts/version.sh) && major=$(echo $version |awk -F '.' '{print $1}' |sed 's/v//g') && docker exec -it aapanel docker load -i platform.tar && -docker exec -it aapanel docker tag platform:latest ossrs/srs-stack:$version && -docker exec -it aapanel docker tag platform:latest ossrs/srs-stack:$major && -docker exec -it aapanel docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$version && -docker exec -it aapanel docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$major && +docker exec -it aapanel docker tag platform:latest ossrs/oryx:$version && +docker exec -it aapanel docker tag platform:latest ossrs/oryx:$major && +docker exec -it aapanel docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:$version && +docker exec -it aapanel docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:$major && docker exec -it aapanel docker images ``` @@ -213,19 +213,19 @@ Next, build the aaPanel plugin and install it: ```bash docker exec -it aapanel rm -f /data/config/.env && -docker exec -it aapanel bash /www/server/panel/plugin/srs_stack/install.sh uninstall 2>/dev/null || echo OK && +docker exec -it aapanel bash /www/server/panel/plugin/oryx/install.sh uninstall 2>/dev/null || echo OK && bash scripts/setup-aapanel/auto/zip.sh --output $(pwd)/build --extract && -docker exec -it aapanel bash /www/server/panel/plugin/srs_stack/install.sh install +docker exec -it aapanel bash /www/server/panel/plugin/oryx/install.sh install ``` You can use aaPanel panel to install the plugin, or by command: ```bash -docker exec -it aapanel python3 /www/server/panel/plugin/srs_stack/bt_api_remove_site.py && -docker exec -it aapanel python3 /www/server/panel/plugin/srs_stack/bt_api_create_site.py && -docker exec -it aapanel python3 /www/server/panel/plugin/srs_stack/bt_api_setup_site.py && -docker exec -it aapanel bash /www/server/panel/plugin/srs_stack/setup.sh \ - --r0 /tmp/srs_stack_install.r0 --nginx /www/server/nginx/logs/nginx.pid \ +docker exec -it aapanel python3 /www/server/panel/plugin/oryx/bt_api_remove_site.py && +docker exec -it aapanel python3 /www/server/panel/plugin/oryx/bt_api_create_site.py && +docker exec -it aapanel python3 /www/server/panel/plugin/oryx/bt_api_setup_site.py && +docker exec -it aapanel bash /www/server/panel/plugin/oryx/setup.sh \ + --r0 /tmp/oryx_install.r0 --nginx /www/server/nginx/logs/nginx.pid \ --www /www/wwwroot --site srs.stack.local ``` @@ -235,26 +235,26 @@ Setup the dns lookup for domain `srs.stack.local`: PIP=$(docker exec -it aapanel ifconfig eth0 |grep 'inet ' |awk '{print $2}') && docker exec -it aapanel bash -c "echo '$PIP srs.stack.local' >> /etc/hosts" && docker exec -it aapanel cat /etc/hosts && echo OK && -docker exec -it aapanel docker exec -it srs-stack bash -c "echo '$PIP srs.stack.local' >> /etc/hosts" && -docker exec -it aapanel docker exec -it srs-stack cat /etc/hosts +docker exec -it aapanel docker exec -it oryx bash -c "echo '$PIP srs.stack.local' >> /etc/hosts" && +docker exec -it aapanel docker exec -it oryx cat /etc/hosts ``` > Note: We add host `srs.stack.local` to the ip of eth0, because we need to access it in the -> srs-stack docker in docker. +> oryx docker in docker. Run test for aaPanel: ```bash -rm -f test/srs-stack.test && +rm -f test/oryx.test && docker exec -it aapanel make -j -C test && bash scripts/tools/secret.sh --output test/.env && -docker exec -it aapanel ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://srs.stack.local:80 \ +docker exec -it aapanel ./test/oryx.test -test.timeout=1h -test.v -endpoint http://srs.stack.local:80 \ -srs-log=true -wait-ready=true -init-password=true -check-api-secret=true -init-self-signed-cert=true \ -test.run TestSystem_Empty && bash scripts/tools/secret.sh --output test/.env && -docker exec -it aapanel ./test/srs-stack.test -test.timeout=1h -test.v -wait-ready -endpoint http://srs.stack.local:80 \ +docker exec -it aapanel ./test/oryx.test -test.timeout=1h -test.v -wait-ready -endpoint http://srs.stack.local:80 \ -srs-log=true -wait-ready=true -init-password=false -check-api-secret=true \ -test.parallel 3 && -docker exec -it aapanel ./test/srs-stack.test -test.timeout=1h -test.v -wait-ready -endpoint https://srs.stack.local:443 \ +docker exec -it aapanel ./test/oryx.test -test.timeout=1h -test.v -wait-ready -endpoint https://srs.stack.local:443 \ -srs-log=true -wait-ready=true -init-password=false -check-api-secret=true \ -test.parallel 3 ``` @@ -263,8 +263,8 @@ Open [http://localhost:7800/srsstack](http://localhost:7800/srsstack) to install > Note: Or you can use `docker exec -it aapanel bt default` to show the login info. -In the [application store](http://localhost:7800/soft), there is a `srs_stack` plugin. After test, you can install the plugin -`build/aapanel-srs_stack.zip` to production aaPanel panel. +In the [application store](http://localhost:7800/soft), there is a `oryx` plugin. After test, you can install the plugin +`build/aapanel-oryx.zip` to production aaPanel panel. ## Develop the BT Plugin @@ -277,7 +277,7 @@ docker rm -f bt aapanel 2>/dev/null && BT_KEY=$(cat $HOME/.bt/api.json |awk -F token_crypt '{print $2}' |cut -d'"' -f3) && docker run -p 80:80 -p 443:443 -p 7800:7800 -p 1935:1935 -p 8000:8000/udp -p 10080:10080/udp \ --env CANDIDATE=$(ifconfig en0 |grep 'inet ' |awk '{print $2}') \ - -v $(pwd)/build/srs_stack:/www/server/panel/plugin/srs_stack \ + -v $(pwd)/build/oryx:/www/server/panel/plugin/oryx \ -v $HOME/.bt/userInfo.json:/www/server/panel/data/userInfo.json \ -v $HOME/.bt/api.json:/www/server/panel/config/api.json -e BT_KEY=$BT_KEY \ --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:rw --cgroupns=host \ @@ -306,30 +306,30 @@ Enter the docker container: version=$(bash scripts/version.sh) && major=$(echo $version |awk -F '.' '{print $1}' |sed 's/v//g') && docker exec -it bt docker load -i platform.tar && -docker exec -it bt docker tag platform:latest ossrs/srs-stack:$version && -docker exec -it bt docker tag platform:latest ossrs/srs-stack:$major && -docker exec -it bt docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$version && -docker exec -it bt docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$major && +docker exec -it bt docker tag platform:latest ossrs/oryx:$version && +docker exec -it bt docker tag platform:latest ossrs/oryx:$major && +docker exec -it bt docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:$version && +docker exec -it bt docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:$major && docker exec -it bt docker images ``` Next, build the BT plugin and install it: ```bash -docker exec -it bt bash /www/server/panel/plugin/srs_stack/install.sh uninstall 2>/dev/null || echo OK && +docker exec -it bt bash /www/server/panel/plugin/oryx/install.sh uninstall 2>/dev/null || echo OK && docker exec -it bt rm -f /data/config/.env && bash scripts/setup-bt/auto/zip.sh --output $(pwd)/build --extract && -docker exec -it bt bash /www/server/panel/plugin/srs_stack/install.sh install +docker exec -it bt bash /www/server/panel/plugin/oryx/install.sh install ``` You can use BT panel to install the plugin, or by command: ```bash -docker exec -it bt python3 /www/server/panel/plugin/srs_stack/bt_api_remove_site.py && -docker exec -it bt python3 /www/server/panel/plugin/srs_stack/bt_api_create_site.py && -docker exec -it bt python3 /www/server/panel/plugin/srs_stack/bt_api_setup_site.py && -docker exec -it bt bash /www/server/panel/plugin/srs_stack/setup.sh \ - --r0 /tmp/srs_stack_install.r0 --nginx /www/server/nginx/logs/nginx.pid \ +docker exec -it bt python3 /www/server/panel/plugin/oryx/bt_api_remove_site.py && +docker exec -it bt python3 /www/server/panel/plugin/oryx/bt_api_create_site.py && +docker exec -it bt python3 /www/server/panel/plugin/oryx/bt_api_setup_site.py && +docker exec -it bt bash /www/server/panel/plugin/oryx/setup.sh \ + --r0 /tmp/oryx_install.r0 --nginx /www/server/nginx/logs/nginx.pid \ --www /www/wwwroot --site srs.stack.local ``` @@ -339,26 +339,26 @@ Setup the dns lookup for domain `srs.stack.local`: PIP=$(docker exec -it bt ifconfig eth0 |grep 'inet ' |awk '{print $2}') && docker exec -it bt bash -c "echo '$PIP srs.stack.local' >> /etc/hosts" && docker exec -it bt cat /etc/hosts && echo OK && -docker exec -it bt docker exec -it srs-stack bash -c "echo '$PIP srs.stack.local' >> /etc/hosts" && -docker exec -it bt docker exec -it srs-stack cat /etc/hosts +docker exec -it bt docker exec -it oryx bash -c "echo '$PIP srs.stack.local' >> /etc/hosts" && +docker exec -it bt docker exec -it oryx cat /etc/hosts ``` > Note: We add host `srs.stack.local` to the ip of eth0, because we need to access it in the -> srs-stack docker in docker. +> oryx docker in docker. Run test for BT: ```bash -rm -f test/srs-stack.test && +rm -f test/oryx.test && docker exec -it bt make -j -C test && bash scripts/tools/secret.sh --output test/.env && -docker exec -it bt ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://srs.stack.local:80 \ +docker exec -it bt ./test/oryx.test -test.timeout=1h -test.v -endpoint http://srs.stack.local:80 \ -srs-log=true -wait-ready=true -init-password=true -check-api-secret=true -init-self-signed-cert=true \ -test.run TestSystem_Empty && bash scripts/tools/secret.sh --output test/.env && -docker exec -it bt ./test/srs-stack.test -test.timeout=1h -test.v -wait-ready -endpoint http://srs.stack.local:80 \ +docker exec -it bt ./test/oryx.test -test.timeout=1h -test.v -wait-ready -endpoint http://srs.stack.local:80 \ -srs-log=true -wait-ready=true -init-password=false -check-api-secret=true \ -test.parallel 3 && -docker exec -it bt ./test/srs-stack.test -test.timeout=1h -test.v -wait-ready -endpoint https://srs.stack.local:443 \ +docker exec -it bt ./test/oryx.test -test.timeout=1h -test.v -wait-ready -endpoint https://srs.stack.local:443 \ -srs-log=true -wait-ready=true -init-password=false -check-api-secret=true \ -test.parallel 3 ``` @@ -367,8 +367,8 @@ Open [http://localhost:7800/srsstack](http://localhost:7800/srsstack) to install > Note: Or you can use `docker exec -it bt bt default` to show the login info. -In the [application store](http://localhost:7800/soft), there is a `srs_stack` plugin. After test, you can install the plugin -`build/bt-srs_stack.zip` to production BT panel. +In the [application store](http://localhost:7800/soft), there is a `oryx` plugin. After test, you can install the plugin +`build/bt-oryx.zip` to production BT panel. ## Develop the Droplet Image @@ -399,9 +399,9 @@ Please check the [snapshot](https://cloud.digitalocean.com/images/snapshots/drop ```bash IMAGE=$(doctl compute snapshot list --context market --format ID --no-header) && sshkey=$(doctl compute ssh-key list --context market --no-header |grep srs |awk '{print $1}') && -doctl compute droplet create srs-stack-test --context market --image $IMAGE \ +doctl compute droplet create oryx-test --context market --image $IMAGE \ --region sgp1 --size s-2vcpu-2gb --ssh-keys $sshkey --wait && -SRS_DROPLET_EIP=$(doctl compute droplet get srs-stack-test --context market --format PublicIPv4 --no-header) +SRS_DROPLET_EIP=$(doctl compute droplet get oryx-test --context market --format PublicIPv4 --no-header) ``` Prepare test environment: @@ -413,7 +413,7 @@ cp ~/git/srs/trunk/doc/source.200kbps.768x320.flv test/ && scp ./test/source.200kbps.768x320.flv root@$SRS_DROPLET_EIP:/data/upload/ && docker run --rm -it -v $(pwd):/g -w /g -e CGO_ENABLED=0 -e GOOS=linux -e GOARCH=amd64 \ ossrs/srs:ubuntu20 make -C test clean default && -scp ./test/srs-stack.test ./test/source.200kbps.768x320.flv root@$SRS_DROPLET_EIP:~/test/ && +scp ./test/oryx.test ./test/source.200kbps.768x320.flv root@$SRS_DROPLET_EIP:~/test/ && scp ./scripts/tools/secret.sh root@$SRS_DROPLET_EIP:~/scripts/tools && ssh root@$SRS_DROPLET_EIP docker run --rm -v /usr/bin:/g ossrs/srs:tools \ cp /usr/local/bin/ffmpeg /usr/local/bin/ffprobe /g/ @@ -426,11 +426,11 @@ Test the droplet instance: ```bash ssh root@$SRS_DROPLET_EIP bash scripts/tools/secret.sh --output test/.env && -ssh root@$SRS_DROPLET_EIP ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://$SRS_DROPLET_EIP:2022 \ +ssh root@$SRS_DROPLET_EIP ./test/oryx.test -test.timeout=1h -test.v -endpoint http://$SRS_DROPLET_EIP:2022 \ -srs-log=true -wait-ready=true -init-password=true -check-api-secret=true -init-self-signed-cert=true \ -test.run TestSystem_Empty && sleep 3 && ssh root@$SRS_DROPLET_EIP bash scripts/tools/secret.sh --output test/.env && -ssh root@$SRS_DROPLET_EIP ./test/srs-stack.test -test.timeout=1h -test.v -wait-ready -endpoint http://$SRS_DROPLET_EIP:2022 \ +ssh root@$SRS_DROPLET_EIP ./test/oryx.test -test.timeout=1h -test.v -wait-ready -endpoint http://$SRS_DROPLET_EIP:2022 \ -endpoint-rtmp rtmp://$SRS_DROPLET_EIP -endpoint-http http://$SRS_DROPLET_EIP -endpoint-srt srt://$SRS_DROPLET_EIP:10080 \ -srs-log=true -wait-ready=true -init-password=false -check-api-secret=true \ -test.parallel 1 @@ -439,7 +439,7 @@ ssh root@$SRS_DROPLET_EIP ./test/srs-stack.test -test.timeout=1h -test.v -wait-r Remove the droplet instance: ```bash -doctl compute droplet delete srs-stack-test --context market --force +doctl compute droplet delete oryx-test --context market --force ``` After submit to [marketplace](https://cloud.digitalocean.com/vendorportal/624145d53da4ad68de259945/10/edit), cleanup the snapshot: @@ -505,7 +505,7 @@ $sshCmd ubuntu@$(cat .tmp/lh-ip2.txt) sudo chmod 777 /data/upload && cp ~/git/srs/trunk/doc/source.200kbps.768x320.flv test/ && $scpCmd test/source.200kbps.768x320.flv ubuntu@$(cat .tmp/lh-ip2.txt):/data/upload/ && docker run --rm -it -v $(pwd):/g -w /g ossrs/srs:ubuntu20 make -C test clean default && -$scpCmd ./test/srs-stack.test ./test/source.200kbps.768x320.flv ubuntu@$(cat .tmp/lh-ip2.txt):~/test/ && +$scpCmd ./test/oryx.test ./test/source.200kbps.768x320.flv ubuntu@$(cat .tmp/lh-ip2.txt):~/test/ && $scpCmd ./scripts/tools/secret.sh ubuntu@$(cat .tmp/lh-ip2.txt):~/scripts/tools && $sshCmd ubuntu@$(cat .tmp/lh-ip2.txt) sudo docker run --rm -v /usr/bin:/g \ registry.cn-hangzhou.aliyuncs.com/ossrs/srs:tools \ @@ -516,15 +516,15 @@ Test the CVM instance: ```bash $sshCmd ubuntu@$(cat .tmp/lh-ip2.txt) sudo bash scripts/tools/secret.sh --output test/.env && -$sshCmd ubuntu@$(cat .tmp/lh-ip2.txt) ./test/srs-stack.test -test.timeout=1h -test.v -endpoint http://$(cat .tmp/lh-ip2.txt):2022 \ +$sshCmd ubuntu@$(cat .tmp/lh-ip2.txt) ./test/oryx.test -test.timeout=1h -test.v -endpoint http://$(cat .tmp/lh-ip2.txt):2022 \ -srs-log=true -wait-ready=true -init-password=true -check-api-secret=true -init-self-signed-cert=true \ -test.run TestSystem_Empty && $sshCmd ubuntu@$(cat .tmp/lh-ip2.txt) sudo bash scripts/tools/secret.sh --output test/.env && -$sshCmd ubuntu@$(cat .tmp/lh-ip2.txt) ./test/srs-stack.test -test.timeout=1h -test.v -wait-ready -endpoint http://$(cat .tmp/lh-ip2.txt):2022 \ +$sshCmd ubuntu@$(cat .tmp/lh-ip2.txt) ./test/oryx.test -test.timeout=1h -test.v -wait-ready -endpoint http://$(cat .tmp/lh-ip2.txt):2022 \ -endpoint-rtmp rtmp://$(cat .tmp/lh-ip2.txt) -endpoint-http http://$(cat .tmp/lh-ip2.txt) -endpoint-srt srt://$(cat .tmp/lh-ip2.txt):10080 \ -srs-log=true -wait-ready=true -init-password=false -check-api-secret=true \ -test.parallel 3 && -ssh ubuntu@$(cat .tmp/lh-ip2.txt) ./test/srs-stack.test -test.timeout=1h -test.v -wait-ready -endpoint https://$(cat .tmp/lh-ip2.txt):2443 \ +ssh ubuntu@$(cat .tmp/lh-ip2.txt) ./test/oryx.test -test.timeout=1h -test.v -wait-ready -endpoint https://$(cat .tmp/lh-ip2.txt):2443 \ -endpoint-rtmp rtmp://$(cat .tmp/lh-ip2.txt) -endpoint-http https://$(cat .tmp/lh-ip2.txt) -endpoint-srt srt://$(cat .tmp/lh-ip2.txt):10080 \ -srs-log=true -wait-ready=true -init-password=false -check-api-secret=true \ -test.parallel 3 @@ -585,8 +585,8 @@ scp platform.tar.gz root@$LNAME.$LDOMAIN:~ && ssh root@$LNAME.$LDOMAIN tar xf platform.tar.gz && version=$(bash scripts/version.sh) && ssh root@$LNAME.$LDOMAIN docker load -i platform.tar && -ssh root@$LNAME.$LDOMAIN docker tag platform:latest ossrs/srs-stack:$version && -ssh root@$LNAME.$LDOMAIN docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$version && +ssh root@$LNAME.$LDOMAIN docker tag platform:latest ossrs/oryx:$version && +ssh root@$LNAME.$LDOMAIN docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:$version && ssh root@$LNAME.$LDOMAIN docker image prune -f && ssh root@$LNAME.$LDOMAIN docker images ``` @@ -594,11 +594,11 @@ ssh root@$LNAME.$LDOMAIN docker images Next, build the BT plugin and install it: ```bash -ssh root@$LNAME.$LDOMAIN bash /www/server/panel/plugin/srs_stack/install.sh uninstall 2>/dev/null || echo OK && +ssh root@$LNAME.$LDOMAIN bash /www/server/panel/plugin/oryx/install.sh uninstall 2>/dev/null || echo OK && bash scripts/setup-bt/auto/zip.sh --output $(pwd)/build --extract && -scp build/bt-srs_stack.zip root@$LNAME.$LDOMAIN:~ && -ssh root@$LNAME.$LDOMAIN unzip -q bt-srs_stack.zip -d /www/server/panel/plugin && -ssh root@$LNAME.$LDOMAIN bash /www/server/panel/plugin/srs_stack/install.sh install +scp build/bt-oryx.zip root@$LNAME.$LDOMAIN:~ && +ssh root@$LNAME.$LDOMAIN unzip -q bt-oryx.zip -d /www/server/panel/plugin && +ssh root@$LNAME.$LDOMAIN bash /www/server/panel/plugin/oryx/install.sh install ``` On the server, setup the `.bashrc`: @@ -611,20 +611,20 @@ export PYTHONIOENCODING=UTF-8 You can use BT panel to install the plugin, or by command: ```bash -ssh root@$LNAME.$LDOMAIN python3 /www/server/panel/plugin/srs_stack/bt_api_remove_site.py && -ssh root@$LNAME.$LDOMAIN DOMAIN=$LNAME.$LDOMAIN python3 /www/server/panel/plugin/srs_stack/bt_api_create_site.py && -ssh root@$LNAME.$LDOMAIN python3 /www/server/panel/plugin/srs_stack/bt_api_setup_site.py && -ssh root@$LNAME.$LDOMAIN bash /www/server/panel/plugin/srs_stack/setup.sh \ - --r0 /tmp/srs_stack_install.r0 --nginx /www/server/nginx/logs/nginx.pid \ +ssh root@$LNAME.$LDOMAIN python3 /www/server/panel/plugin/oryx/bt_api_remove_site.py && +ssh root@$LNAME.$LDOMAIN DOMAIN=$LNAME.$LDOMAIN python3 /www/server/panel/plugin/oryx/bt_api_create_site.py && +ssh root@$LNAME.$LDOMAIN python3 /www/server/panel/plugin/oryx/bt_api_setup_site.py && +ssh root@$LNAME.$LDOMAIN bash /www/server/panel/plugin/oryx/setup.sh \ + --r0 /tmp/oryx_install.r0 --nginx /www/server/nginx/logs/nginx.pid \ --www /www/wwwroot --site srs.stack.local ``` Cleanup, remove the files and domain: ```bash -ssh root@$LNAME.$LDOMAIN rm -f platform.tar* bt-srs_stack.zip 2>/dev/null && -ssh root@$LNAME.$LDOMAIN python3 /www/server/panel/plugin/srs_stack/bt_api_remove_site.py && -ssh root@$LNAME.$LDOMAIN bash /www/server/panel/plugin/srs_stack/install.sh uninstall 2>/dev/null || echo OK && +ssh root@$LNAME.$LDOMAIN rm -f platform.tar* bt-oryx.zip 2>/dev/null && +ssh root@$LNAME.$LDOMAIN python3 /www/server/panel/plugin/oryx/bt_api_remove_site.py && +ssh root@$LNAME.$LDOMAIN bash /www/server/panel/plugin/oryx/install.sh uninstall 2>/dev/null || echo OK && domains=$(doctl compute domain records ls $LDOMAIN --no-header |grep $LNAME) && echo "Cleanup domains: $domains" && doctl compute domain records delete $LDOMAIN $(echo $domains |awk '{print $1}') -f ``` @@ -638,7 +638,7 @@ doctl compute droplet ls |grep lego ## Develop the NGINX HLS CDN -Run SRS Stack by previous steps, such as [Develop All in macOS](#develop-all-in-macos), publish stream +Run Oryx by previous steps, such as [Develop All in macOS](#develop-all-in-macos), publish stream and there should be a HLS stream: * [http://localhost:2022/live/livestream.m3u8](http://localhost:2022/tools/player.html?url=http://localhost:2022/live/livestream.m3u8) @@ -648,18 +648,18 @@ Build the image of nginx: ```bash docker rm -f nginx 2>/dev/null && docker rmi scripts/nginx-hls-cdn 2>/dev/null || echo OK && -docker build -t ossrs/srs-stack:nginx-hls-cdn scripts/nginx-hls-cdn +docker build -t ossrs/oryx:nginx-hls-cdn scripts/nginx-hls-cdn ``` -> Note: The official image is build by [workflow](https://github.com/ossrs/srs-stack/actions/runs/5970907929) +> Note: The official image is build by [workflow](https://github.com/ossrs/oryx/actions/runs/5970907929) > which is triggered manually. If you want to use NGINX as proxy, run by docker: ```bash -SRS_STACK_SERVER=$(ifconfig en0 |grep 'inet ' |awk '{print $2}') && -docker run --rm -it -p 80:80 --name nginx -e SRS_STACK_SERVER=${SRS_STACK_SERVER}:2022 \ - ossrs/srs-stack:nginx-hls-cdn +ORYX_SERVER=$(ifconfig en0 |grep 'inet ' |awk '{print $2}') && +docker run --rm -it -p 80:80 --name nginx -e ORYX_SERVER=${ORYX_SERVER}:2022 \ + ossrs/oryx:nginx-hls-cdn ``` There should be a new HLS stream, cached by NGINX: @@ -680,12 +680,12 @@ docker run --rm -d ossrs/srs:sb ./objs/sb_hls_load \ -c 100 -r http://host.docker.internal/live/livestream.m3u8 ``` -The load should be taken by NGINX, not the SRS Stack. +The load should be taken by NGINX, not the Oryx. ## Product the NGINX HLS CDN -Install SRS Stack by BT or aaPanel or docker, assume the domain is `bt.ossrs.net`, publish -a RTMP stream to SRS Stack: +Install Oryx by BT or aaPanel or docker, assume the domain is `bt.ossrs.net`, publish +a RTMP stream to Oryx: ```bash ffmpeg -re -i ~/git/srs/trunk/doc/source.flv -c copy \ @@ -720,11 +720,11 @@ location / { Start a NGINX HLS Edge server: ```bash -docker rm -f srs-stack-nginx01 || echo OK && +docker rm -f oryx-nginx01 || echo OK && PIP=$(ifconfig eth0 |grep 'inet ' |awk '{print $2}') && -docker run --rm -it -e SRS_STACK_SERVER=$PIP:2022 \ - -p 23080:80 --name srs-stack-nginx01 -d \ - ossrs/srs-stack:nginx-hls-cdn +docker run --rm -it -e ORYX_SERVER=$PIP:2022 \ + -p 23080:80 --name oryx-nginx01 -d \ + ossrs/oryx:nginx-hls-cdn ``` Open the [http://bt2.ossrs.net/live/livestream.m3u8](http://bt.ossrs.net/tools/player.html?url=http://bt2.ossrs.net/live/livestream.m3u8) @@ -743,31 +743,31 @@ Be aware that the cache will store the CORS headers as well. This means that if and obtain HLS without CORS, it will remain without CORS even when a request includes an Origin header that necessitates CORS. -## Use HELM to Install SRS Stack +## Use HELM to Install Oryx Install [HELM](https://helm.sh/docs/intro/install/) and [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/), -then add repo of SRS Stack: +then add repo of Oryx: ```bash helm repo add srs http://helm.ossrs.io/stable ``` -Install the latest SRS Stack: +Install the latest Oryx: ```bash -helm install srs srs/srs-stack +helm install srs srs/oryx ``` Or, install from file: ```bash -helm install srs ~/git/srs-helm/stable/srs-stack-1.0.5.tgz +helm install srs ~/git/srs-helm/stable/oryx-1.0.6.tgz ``` Or, setup the persistence directory: ```bash -helm install srs ~/git/srs-helm/stable/srs-stack-1.0.5.tgz \ +helm install srs ~/git/srs-helm/stable/oryx-1.0.6.tgz \ --set persistence.path=$HOME/data ``` @@ -793,29 +793,29 @@ Run testcase in Goland. ## Update SRS Demo Environment -To update the demo for SRS Stack, for bt.ossrs.net: +To update the demo for Oryx, for bt.ossrs.net: ```bash -IMAGE=$(ssh root@ossrs.net docker images |grep srs-stack |grep v5 |awk '{print $1":"$2}' |head -n 1) && +IMAGE=$(ssh root@ossrs.net docker images |grep oryx |grep v5 |awk '{print $1":"$2}' |head -n 1) && docker build -t $IMAGE -f Dockerfile . && docker save $IMAGE |gzip > t.tar.gz && scp t.tar.gz root@ossrs.net:~/ && ssh root@ossrs.net docker load -i t.tar.gz && -ssh root@ossrs.net docker stop srs-stack && -sleep 3 && ssh root@ossrs.net docker rm -f srs-stack && +ssh root@ossrs.net docker stop oryx && +sleep 3 && ssh root@ossrs.net docker rm -f oryx && ssh root@ossrs.net docker image prune -f ``` For bt.ossrs.io: ```bash -IMAGE=$(ssh root@ossrs.io docker images |grep srs-stack |grep v5 |awk '{print $1":"$2}' |head -n 1) && +IMAGE=$(ssh root@ossrs.io docker images |grep oryx |grep v5 |awk '{print $1":"$2}' |head -n 1) && docker build -t $IMAGE -f Dockerfile . && docker save $IMAGE |gzip > t.tar.gz && scp t.tar.gz root@ossrs.io:~/ && ssh root@ossrs.io docker load -i t.tar.gz && -ssh root@ossrs.io docker stop srs-stack && -sleep 3 && ssh root@ossrs.io docker rm -f srs-stack && +ssh root@ossrs.io docker stop oryx && +sleep 3 && ssh root@ossrs.io docker rm -f oryx && ssh root@ossrs.io docker image prune -f ``` @@ -825,8 +825,8 @@ The SRS container is configured by environment variables, which loads the `/data file. To build a test image: ```bash -docker rmi srs-stack-env 2>/dev/null || echo OK && -docker build -t srs-stack-env -f Dockerfile . +docker rmi oryx-env 2>/dev/null || echo OK && +docker build -t oryx-env -f Dockerfile . ``` Setup the logging to file: @@ -835,13 +835,13 @@ Setup the logging to file: echo 'SRS_LOG_TANK=file' > $HOME/data/config/.srs.env ``` -Run SRS Stack by docker: +Run Oryx by docker: ```bash docker run --rm -it -p 2022:2022 -p 2443:2443 -p 1935:1935 \ - -p 8000:8000/udp -p 10080:10080/udp --name srs-stack \ + -p 8000:8000/udp -p 10080:10080/udp --name oryx \ --env CANDIDATE=$(ifconfig en0 |grep 'inet ' |awk '{print $2}') \ - -v $HOME/data:/data srs-stack-env + -v $HOME/data:/data oryx-env ``` Note that the logs should be written to file, there is no log `write log to console`, instead there @@ -849,17 +849,17 @@ should be a log like `you can check log by`. ## WebRTC Candidate -SRS Stack follows the rules for WebRTC candidate, see [CANDIDATE](https://ossrs.io/lts/en-us/docs/v5/doc/webrtc#config-candidate), +Oryx follows the rules for WebRTC candidate, see [CANDIDATE](https://ossrs.io/lts/en-us/docs/v5/doc/webrtc#config-candidate), but also has extra improvements for we can do more after proxy the API. 1. Disable `use_auto_detect_network_ip` and `api_as_candidates` in SRS config. 1. Always use `?eip=xxx` and ignore any other config, if user force to use the specified IP. -1. If `NAME_LOOKUP` (default is `on`) isn't `off`, try to resolve the candidate from `Host` of HTTP API by SRS Stack. - 1. If access SRS Stack by `localhost` for debugging or run in localhost. - 1. If `PLATFORM_DOCKER` is `off`, such as directly run in host, not in docker, use the private ip of SRS Stack. - 1. If not set `CANDIDATE`, use `127.0.0.1` for OBS WHIP or native client to access SRS Stack by localhost. - 1. Use `Host` if it's a valid IP address, for example, to access SRS Stack by public ip address. - 1. Use DNS lookup if `Host` is a domain, for example, to access SRS Stack by domain name. +1. If `NAME_LOOKUP` (default is `on`) isn't `off`, try to resolve the candidate from `Host` of HTTP API by Oryx. + 1. If access Oryx by `localhost` for debugging or run in localhost. + 1. If `PLATFORM_DOCKER` is `off`, such as directly run in host, not in docker, use the private ip of Oryx. + 1. If not set `CANDIDATE`, use `127.0.0.1` for OBS WHIP or native client to access Oryx by localhost. + 1. Use `Host` if it's a valid IP address, for example, to access Oryx by public ip address. + 1. Use DNS lookup if `Host` is a domain, for example, to access Oryx by domain name. 1. If no candidate, use docker IP address discovered by SRS. > Note: Client can also set the header `X-Real-Host` to set the candidate. @@ -1137,11 +1137,11 @@ Generally we follow this guide except for some legacy code. ## Changelog -The following are the update records for the SRS Stack server. +The following are the update records for the Oryx server. * v5.14: * Merge features and bugfix from releases. v5.14.1 - * Dubbing: Support VoD dubbing for multiple languages. [v5.14.2](https://github.com/ossrs/srs-stack/releases/tag/v5.14.2) + * Dubbing: Support VoD dubbing for multiple languages. [v5.14.2](https://github.com/ossrs/oryx/releases/tag/v5.14.2) * Dubbing: Support disable translation, rephrase, or tts. v5.14.3 * Dubbing: Highlight the currently playing group. v5.14.3 * NGINX: Support set the m3u8 and ts expire. v5.14.3 @@ -1149,15 +1149,16 @@ The following are the update records for the SRS Stack server. * HLS: Use fast cache for HLS config. v5.14.4 * Transcript: Support set the force_style for overlay subtitle. v5.14.5 * Transcript: Use Whisper response without LF. (#163). v5.14.5 - * Token: Fix bug for Bearer token while initializing. [v5.14.6](https://github.com/ossrs/srs-stack/releases/tag/v5.14.6) + * Token: Fix bug for Bearer token while initializing. [v5.14.6](https://github.com/ossrs/oryx/releases/tag/v5.14.6) * Room: Enable dictation mode for AI-Talk. v5.14.7 * Dubbing: Refine download button with comments. v5.14.8 * Room: AI-Talk support post processing. v5.14.9 * Website: Support setting title for popout. v5.14.10 - * Transcript: Support set the video codec parameters. [v5.14.11](https://github.com/ossrs/srs-stack/releases/tag/v5.14.11) + * Transcript: Support set the video codec parameters. [v5.14.11](https://github.com/ossrs/oryx/releases/tag/v5.14.11) * Transcript: Support subtitle with WebVTT format. v5.14.12 * Transcript: Fix overlay transcoding parameters parsing bug. v5.14.13 * Use port 80/443 by default in README. v5.14.14 + * Rename project to Oryx. v5.14.15 * v5.13: * Fix bug for vlive and transcript. v5.13.1 * Support AWS Lightsail install script. v5.13.2 @@ -1167,7 +1168,7 @@ The following are the update records for the SRS Stack server. * Switch to fluid max width. v5.13.6 * HLS: Support low latency mode about 5s. v5.13.7 * RTSP: Rebuild the URL with escaped user info. v5.13.8 - * VLive: Support SRT URL filter. [v5.13.9](https://github.com/ossrs/srs-stack/releases/tag/v5.13.9) + * VLive: Support SRT URL filter. [v5.13.9](https://github.com/ossrs/oryx/releases/tag/v5.13.9) * FFmpeg: Monitor and restart FFmpeg if stuck. v5.13.10 * Room: Support live room secret with stream URL. v5.13.11 * Camera: Support IP Camera streaming scenario. v5.13.12 @@ -1182,95 +1183,96 @@ The following are the update records for the SRS Stack server. * Room: AI-Talk allow disable ASR/TTS, enable text. v5.13.19 * Room: AI-Talk support dictation mode. v5.13.20 * FFmpeg: Restart if time and speed abnormal. v5.13.21 - * Transcript: Fix panic bug for sync goroutines. [v5.13.21](https://github.com/ossrs/srs-stack/releases/tag/v5.13.21) + * Transcript: Fix panic bug for sync goroutines. [v5.13.21](https://github.com/ossrs/oryx/releases/tag/v5.13.21) * Support OpenAI organization for billing. v5.13.22 - * Room: Fix the empty room UI sort and secret bug. [v5.13.23](https://github.com/ossrs/srs-stack/releases/tag/v5.13.23) + * Room: Fix the empty room UI sort and secret bug. [v5.13.23](https://github.com/ossrs/oryx/releases/tag/v5.13.23) * FFmpeg: Fix restart bug for abnormal speed. v5.13.24 * FFmpeg: Fix bug for output SRT protocol. v5.13.25 * FFmpeg: Support ingest SRT protocol. v5.13.26 - * VLive: Fix the re bug for file. [v5.13.27](https://github.com/ossrs/srs-stack/releases/tag/v5.13.27) - * Release stable version and support debugging. [v5.13.28](https://github.com/ossrs/srs-stack/releases/tag/v5.13.28) + * VLive: Fix the re bug for file. [v5.13.27](https://github.com/ossrs/oryx/releases/tag/v5.13.27) + * Release stable version and support debugging. [v5.13.28](https://github.com/ossrs/oryx/releases/tag/v5.13.28) * HLS: Set m3u8 expire time to 1s for LLHLS. v5.13.29 * Transcript: Support set the force_style for overlay subtitle. v5.13.30 * Transcript: Use Whisper response without LF. (#163). v5.13.31 - * Token: Fix bug for Bearer token while initializing. [v5.13.32](https://github.com/ossrs/srs-stack/releases/tag/v5.13.32) + * Token: Fix bug for Bearer token while initializing. [v5.13.32](https://github.com/ossrs/oryx/releases/tag/v5.13.32) * Room: Refine stat for AI-Talk. v5.13.33 + * Rename Oryx to Oryx. [v5.13.34](https://github.com/ossrs/oryx/releases/tag/v5.13.34) * v5.12 * Refine local variable name conf to config. v5.12.1 * Add forced exit on timeout for program termination. v5.12.1 - * Transcript: Support convert live speech to text by whisper. [v5.12.2](https://github.com/ossrs/srs-stack/releases/tag/v5.12.2) + * Transcript: Support convert live speech to text by whisper. [v5.12.2](https://github.com/ossrs/oryx/releases/tag/v5.12.2) * Transcript: Update base image for FFmpeg subtitles. v5.12.3 * Transcript: Limit all queue base on overlay. v5.12.4 - * Transcript: Allow work without active stream. [v5.12.5](https://github.com/ossrs/srs-stack/releases/tag/v5.12.5) + * Transcript: Allow work without active stream. [v5.12.5](https://github.com/ossrs/oryx/releases/tag/v5.12.5) * Transcript: Support testing connection to OpenAI service. v5.12.6 * Filter locale value. v5.12.6 - * Transcript: Add test case for OpenAI. [v5.12.7](https://github.com/ossrs/srs-stack/releases/tag/v5.12.7) + * Transcript: Add test case for OpenAI. [v5.12.7](https://github.com/ossrs/oryx/releases/tag/v5.12.7) * Transcript: Use m4a and 30kbps bitrate to make ASR faster. v5.12.8 * Hooks: Support callback on_record_begin and on_record_end. v5.12.9 * VLive: Fix ffprobe RTSP bug, always use TCP transport. v5.12.10 * Confirm when user logout. v5.12.11 * Record: Support glob filters to match stream. v5.12.11 - * Transcript: Show detail error if exceeded quota. [v5.12.12](https://github.com/ossrs/srs-stack/releases/tag/v5.12.12) + * Transcript: Show detail error if exceeded quota. [v5.12.12](https://github.com/ossrs/oryx/releases/tag/v5.12.12) * Record: Support finish record task quickly after stream unpublished. v5.12.13 * Record: Support post-processing to cp file for S3. v5.12.14 - * Transcript: Support clear the subtitle of segment in fixing queue. [v5.12.15](https://github.com/ossrs/srs-stack/releases/tag/v5.12.15) + * Transcript: Support clear the subtitle of segment in fixing queue. [v5.12.15](https://github.com/ossrs/oryx/releases/tag/v5.12.15) * VLive: Fix bug for url with query string. v5.12.16 - * Transcript: Check the base url for OpenAI. [v5.12.17](https://github.com/ossrs/srs-stack/releases/tag/v5.12.17) + * Transcript: Check the base url for OpenAI. [v5.12.17](https://github.com/ossrs/oryx/releases/tag/v5.12.17) * HLS: Support low latency mode about 5s. v5.12.18 * RTSP: Rebuild the URL with escaped user info. v5.12.19 * VLive: Fix rebuild URL bug. v5.12.20 - * HLS: Fix LL HLS setting bug. [v5.12.21](https://github.com/ossrs/srs-stack/releases/tag/v5.12.21) + * HLS: Fix LL HLS setting bug. [v5.12.21](https://github.com/ossrs/oryx/releases/tag/v5.12.21) * VLive: Support SRT URL filter. v5.12.22 - * HLS: Set m3u8 expire time to 1s for LLHLS. [v5.12.22](https://github.com/ossrs/srs-stack/releases/tag/v5.12.22) + * HLS: Set m3u8 expire time to 1s for LLHLS. [v5.12.22](https://github.com/ossrs/oryx/releases/tag/v5.12.22) * v5.11 * VLive: Decrease the latency for virtual live. v5.11.1 * Live: Refine multiple language. v5.11.2 - * Hooks: Support HTTP Callback and test. [v5.11.3](https://github.com/ossrs/srs-stack/releases/tag/v5.11.3) + * Hooks: Support HTTP Callback and test. [v5.11.3](https://github.com/ossrs/oryx/releases/tag/v5.11.3) * HELM: Support resolve name to ip for rtc. v5.11.4 - * HELM: Disable NAME_LOOKUP by default. [v5.11.5](https://github.com/ossrs/srs-stack/releases/tag/v5.11.5) + * HELM: Disable NAME_LOOKUP by default. [v5.11.5](https://github.com/ossrs/oryx/releases/tag/v5.11.5) * Refine env variable for bool. v5.11.7 * RTC: Refine WHIP player and enable NAME_LOOKUP by default. v5.11.8 * RTC: Update WHIP and WHEP player. v5.11.9 * RTC: Resolve candidate for lo and docker. v5.11.10 - * RTC: Refine test and tutorial for WHIP/WHEP. [v5.11.10](https://github.com/ossrs/srs-stack/releases/tag/v5.11.10) + * RTC: Refine test and tutorial for WHIP/WHEP. [v5.11.10](https://github.com/ossrs/oryx/releases/tag/v5.11.10) * Refine player open speed. v5.11.11 * HTTPS: Check dashboard and ssl domain. v5.11.12 * API: Add curl and jQuery example. v5.11.12 * API: Allow CORS by default. v5.11.13 - * API: Remove duplicated CORS headers. [v5.11.14](https://github.com/ossrs/srs-stack/releases/tag/v5.11.14) + * API: Remove duplicated CORS headers. [v5.11.14](https://github.com/ossrs/oryx/releases/tag/v5.11.14) * Support expose ports for multiple containers. v5.11.15 * HTTPS: Check dashboard hostname and port. v5.11.15 * Error when eslint fail. v5.11.16 * Use upx to make binary smaller. v5.11.16 - * Refine transcode test case. [v5.11.17](https://github.com/ossrs/srs-stack/releases/tag/v5.11.17) + * Refine transcode test case. [v5.11.17](https://github.com/ossrs/oryx/releases/tag/v5.11.17) * HTTPS: Enable self-signed certificate by default. v5.11.18 * HLS: Nginx HLS CDN support HTTPS. v5.11.19 * Refine scenarios with discouraged and deprecated. v5.11.20 * Transcode: Refine stream compare algorithm. v5.11.21 * Hooks: Support callback self-sign HTTPS URL. v5.11.22 - * Fix utest fail. [v5.11.23](https://github.com/ossrs/srs-stack/releases/tag/v5.11.23) - * VLive: Fix ffprobe RTSP bug, always use TCP transport. [v5.11.24](https://github.com/ossrs/srs-stack/releases/tag/v5.11.24) + * Fix utest fail. [v5.11.23](https://github.com/ossrs/oryx/releases/tag/v5.11.23) + * VLive: Fix ffprobe RTSP bug, always use TCP transport. [v5.11.24](https://github.com/ossrs/oryx/releases/tag/v5.11.24) * v5.10 * Refine README. v5.10.1 * Refine DO and droplet release script. v5.10.2 * VLive: Fix bug of link. v5.10.2 * Record: Fix bug of change record directory. v5.10.2 (#133) - * Streaming: Add SRT streaming. [v5.10.2](https://github.com/ossrs/srs-stack/releases/tag/v5.10.2) + * Streaming: Add SRT streaming. [v5.10.2](https://github.com/ossrs/oryx/releases/tag/v5.10.2) * Streaming: Add OBS SRT streaming. v5.10.3 * Fix lighthouse script bug. v5.10.4 * VLive: Support forward stream. v5.10.5 * VLive: Cleanup temporary file when uploading. v5.10.6 - * VLive: Use TCP transport when pull RTSP stream. [v5.10.7](https://github.com/ossrs/srs-stack/releases/tag/v5.10.7) + * VLive: Use TCP transport when pull RTSP stream. [v5.10.7](https://github.com/ossrs/oryx/releases/tag/v5.10.7) * Refine statistic and report data. v5.10.8 - * Support file picker with language. [v5.10.9](https://github.com/ossrs/srs-stack/releases/tag/v5.10.9) + * Support file picker with language. [v5.10.9](https://github.com/ossrs/oryx/releases/tag/v5.10.9) * Report language. v5.10.10 - * Transcode: Support live stream transcoding. [v5.10.11](https://github.com/ossrs/srs-stack/releases/tag/v5.10.11) + * Transcode: Support live stream transcoding. [v5.10.11](https://github.com/ossrs/oryx/releases/tag/v5.10.11) * Transcode: Fix param bug. v5.10.12 * Fix default stream name bug. v5.10.13 * Update doc. v5.10.14 - * New stable release. [v5.10.15](https://github.com/ossrs/srs-stack/releases/tag/v5.10.15) + * New stable release. [v5.10.15](https://github.com/ossrs/oryx/releases/tag/v5.10.15) * Fix js missing bug. v5.10.16 - * Support docker images for helm. [v5.10.17](https://github.com/ossrs/srs-stack/releases/tag/v5.10.17) + * Support docker images for helm. [v5.10.17](https://github.com/ossrs/oryx/releases/tag/v5.10.17) * Use WHIP and WHEP for RTC. v5.10.18 * Transcode: Refine stream compare algorithm. v5.10.19 * v5.9 @@ -1285,25 +1287,25 @@ The following are the update records for the SRS Stack server. * Add test for virtual live. v5.9.10 * Add test for record. v5.9.11 * Add test for forward. v5.9.12 - * Refine test to transmux to mp4. [v5.9.13](https://github.com/ossrs/srs-stack/releases/tag/v5.9.13) + * Refine test to transmux to mp4. [v5.9.13](https://github.com/ossrs/oryx/releases/tag/v5.9.13) * Upgrade jquery and mpegtsjs. v5.9.14 - * Support authentication for SRS HTTP API. [v5.9.15](https://github.com/ossrs/srs-stack/releases/tag/v5.9.15) + * Support authentication for SRS HTTP API. [v5.9.15](https://github.com/ossrs/oryx/releases/tag/v5.9.15) * Don't expose 1985 API port. v5.9.16 * Load environment variables from /data/config/.srs.env. v5.9.17 * Change guide to use $HOME/data as home. v5.9.18 - * Translate forward to English. [v5.9.19](https://github.com/ossrs/srs-stack/releases/tag/v5.9.19) + * Translate forward to English. [v5.9.19](https://github.com/ossrs/oryx/releases/tag/v5.9.19) * Refine record, dvr, and vod files. v5.9.20 - * Translate record to English. [v5.9.21](https://github.com/ossrs/srs-stack/releases/tag/v5.9.21) + * Translate record to English. [v5.9.21](https://github.com/ossrs/oryx/releases/tag/v5.9.21) * Refine virtual live files. v5.9.22 * Translate virtual live to English. v5.9.23 * Support always open tabs. v5.9.24 - * Remove record and vlive group. [v5.9.25](https://github.com/ossrs/srs-stack/releases/tag/v5.9.25) + * Remove record and vlive group. [v5.9.25](https://github.com/ossrs/oryx/releases/tag/v5.9.25) * Refine project description. v5.9.26 - * Refine DO and droplet release script. [v5.9.27](https://github.com/ossrs/srs-stack/releases/tag/v5.9.27) + * Refine DO and droplet release script. [v5.9.27](https://github.com/ossrs/oryx/releases/tag/v5.9.27) * Fix bug, release stable version. v5.9.28 * VLive: Fix bug of link. v5.9.28 * Record: Fix bug of change record directory. v5.9.28 (#133) - * Streaming: Add SRT streaming. [v5.9.28](https://github.com/ossrs/srs-stack/releases/tag/v5.9.28) + * Streaming: Add SRT streaming. [v5.9.28](https://github.com/ossrs/oryx/releases/tag/v5.9.28) * Fix lighthouse HTTPS bug. v5.9.29 * v5.8 * Always dispose DO VM and domain for test. v1.0.306 @@ -1313,7 +1315,7 @@ The following are the update records for the SRS Stack server. * Support High Performance HLS mode. v1.0.307 * Show current config for settings. v1.0.307 * Switch MIT to AGPL License. v1.0.307 - * Use one version strategy. [v5.8.20](https://github.com/ossrs/srs-stack/releases/tag/v5.8.20) + * Use one version strategy. [v5.8.20](https://github.com/ossrs/oryx/releases/tag/v5.8.20) * Always check test result. v5.8.21 * SRT: Enable srt in default vhost. v5.8.22 * Add utest for HP HLS. v5.8.23 @@ -1325,27 +1327,27 @@ The following are the update records for the SRS Stack server. * Fix Failed to execute 'insertBefore' on 'Node'. v5.8.26 * Eliminate unused callback events. v5.8.26 * Add docker for nginx HLS CDN. v5.8.27 - * Update SRS Stack architecture. v5.8.27 + * Update Oryx architecture. v5.8.27 * Use DO droplet s-1vcpu-1gb for auto test. v5.8.28 - * Use default context when restore hphls. [v5.8.28](https://github.com/ossrs/srs-stack/releases/tag/v5.8.28) + * Use default context when restore hphls. [v5.8.28](https://github.com/ossrs/oryx/releases/tag/v5.8.28) * Support remote test. v5.8.29 - * Enable CORS and timestamp in HLS. [v5.8.30](https://github.com/ossrs/srs-stack/releases/tag/v5.8.30) - * Release stable version. [v5.8.31](https://github.com/ossrs/srs-stack/releases/tag/v5.8.31) + * Enable CORS and timestamp in HLS. [v5.8.30](https://github.com/ossrs/oryx/releases/tag/v5.8.30) + * Release stable version. [v5.8.31](https://github.com/ossrs/oryx/releases/tag/v5.8.31) * v5.7 * Refine DigitalOcean droplet image. v1.0.302 * Support local test all script. v1.0.302 * Rewrite script for lighthouse. v1.0.303 * Set nginx max body to 100GB. v1.0.303 * Use LEGO instead of certbot. v1.0.304 - * Rename SRS Cloud to SRS Stack. v1.0.304 + * Rename SRS Cloud to Oryx. v1.0.304 * Support HTTPS by SSL file. v1.0.305 * Support reload nginx for SSL. v1.0.305 * Support request SSL from letsencrypt. v1.0.305 * Support work with bt/aaPanel ssl. v1.0.305 * Support self-sign certificate by default. v1.0.305 * Query configured SSL cert. v1.0.305 - * 2023.08.13: Support test online environment. [v5.7.19](https://github.com/ossrs/srs-stack/releases/tag/publication-v5.7.19) - * 2023.08.20: Fix the BT and aaPanel filename issue. [v5.7.20](https://github.com/ossrs/srs-stack/releases/tag/publication-v5.7.20) + * 2023.08.13: Support test online environment. [v5.7.19](https://github.com/ossrs/oryx/releases/tag/publication-v5.7.19) + * 2023.08.20: Fix the BT and aaPanel filename issue. [v5.7.20](https://github.com/ossrs/oryx/releases/tag/publication-v5.7.20) * 2023.08.06, v1.0.301, v5.7.18 * Simplify startup script, fix bug, adjust directory to `/data` top-level directory. v1.0.296 * Improve message prompts, script comments, and log output. v1.0.297 @@ -1385,7 +1387,7 @@ The following are the update records for the SRS Stack server. * 2022.11.20, v1.0.256, major version update, experience improvement, Release 4.6 * Proxy root site resources, such as favicon.ico * Support [SrsPlayer](https://wordpress.org/plugins/srs-player) WebRTC push stream shortcode. - * Support [local recording](https://github.com/ossrs/srs-stack/issues/42), recording to SRS Stack local disk. + * Support [local recording](https://github.com/ossrs/oryx/issues/42), recording to Oryx local disk. * Support deleting local recording files and tasks. * Support local recording as MP4 files and downloads. * Support local recording directory as a soft link, storing recorded content on other disks. @@ -1422,13 +1424,13 @@ The following are the update records for the SRS Stack server. * Change `filing` to `website`, can set home page redirection and footer filing number. * Improve NGINX configuration file structure, centralize configuration in `containers` directory. * Support setting simple load balancing, randomly selecting a backend NGINX for HLS distribution. - * Containers work in an independent `srs-stack` network. + * Containers work in an independent `oryx` network. * Add `System > Tools` option. * Use Redis container, not dependent on host Redis service. * 2022.04.06, v1.0.200, major version update, multi-language, Release 4.4 * Support Chinese and English bilingual. * Support DigitalOcean image, see [SRS Droplet](https://marketplace.digitalocean.com/apps/srs). - * Support OpenAPI to get push stream key, see [#19](https://github.com/ossrs/srs-stack/pull/19). + * Support OpenAPI to get push stream key, see [#19](https://github.com/ossrs/oryx/pull/19). * Improve container image update script. * Support using NGINX to distribute HLS, see [#2989](https://github.com/ossrs/srs/issues/2989#nginx-direclty-serve-hls). * Improve VoD storage and service detection. diff --git a/Dockerfile b/Dockerfile index f90c8e99..45128628 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,9 +52,9 @@ RUN echo "Before UPX for $TARGETARCH" && \ # http://releases.ubuntu.com/focal/ #FROM ${ARCH}ubuntu:focal AS dist -FROM ${ARCH}ossrs/srs-stack:focal-1 AS dist +FROM ${ARCH}ossrs/oryx:focal-1 AS dist -# Expose ports @see https://github.com/ossrs/srs-stack/blob/main/DEVELOPER.md#docker-allocated-ports +# Expose ports @see https://github.com/ossrs/oryx/blob/main/DEVELOPER.md#docker-allocated-ports EXPOSE 2022 2443 1935 8080 5060 9000 8000/udp 10080/udp # Copy files from build. diff --git a/Makefile b/Makefile index cadc0e34..f57f9076 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ else rm -rf $(__REAL_INSTALL)/platform/containers/objs/* rm -rf $(__REAL_INSTALL)/platform/containers/data/* cp -rf usr $(__REAL_INSTALL)/usr - sed -i "s|/usr/local/srs-stack|$(PREFIX)|g" $(__REAL_INSTALL)/usr/lib/systemd/system/srs-stack.service + sed -i "s|/usr/local/srs-stack|$(PREFIX)|g" $(__REAL_INSTALL)/usr/lib/systemd/system/oryx.service endif uninstall: diff --git a/README.md b/README.md index 0c17b0c9..21c5d8a7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# SRS-Stack +# ORYXY [![](https://img.shields.io/twitter/follow/srs_server?style=social)](https://twitter.com/srs_server) [![](https://badgen.net/discord/members/bQUPDRqy79)](https://discord.gg/bQUPDRqy79) @@ -6,26 +6,29 @@ [![](https://ossrs.net/wiki/images/do-btn-srs-125x20.svg)](https://marketplace.digitalocean.com/apps/srs) [![](https://opencollective.com/srs-server/tiers/badge.svg)](https://opencollective.com/srs-server) -SRS Stack is an all-in-one, out-of-the-box, and open-source video solution for creating online video -services, including live streaming and WebRTC, on the cloud or through self-hosting. +Oryx(SRS Stack), is an all-in-one, out-of-the-box, and open-source video solution for creating +online video services, including live streaming and WebRTC, on the cloud or through self-hosting. -SRS Stack makes it easy for you to create an online video service. It is made using Go, Reactjs, SRS, +> Note: We renamed the project from Oryx to Oryx, because we only need a new name for AI assistant to identify +> Oryx and SRS media server. AI assistant is confused with SRS and Oryx. + +Oryx makes it easy for you to create an online video service. It is made using Go, Reactjs, SRS, FFmpeg, and WebRTC. It supports protocols like RTMP, WebRTC, HLS, HTTP-FLV, and SRT. It offers features like authentication, streaming on multiple platforms, recording, transcoding, virtual live events, automatic HTTPS, and an easy-to-use HTTP Open API. -[![](https://ossrs.io/lts/en-us/img/SRS-Stack-5-sd.png?v=1)](https://ossrs.io/lts/en-us/img/SRS-Stack-5-hd.png) +[![](https://ossrs.io/lts/en-us/img/Oryx-5-sd.png?v=1)](https://ossrs.io/lts/en-us/img/Oryx-5-hd.png) -> Note: For more details on the SRS Stack, please visit the following [link](https://www.figma.com/file/Ju5h2DZeJMzUtx5k7D0Oak/SRS-Stack). +> Note: For more details on the Oryx, please visit the following [link](https://www.figma.com/file/Ju5h2DZeJMzUtx5k7D0Oak/Oryx). ## Usage -Run srs-stack in one docker, then open http://localhost in browser: +Run Oryx in one docker, then open http://localhost in browser: ```bash -docker run --restart always -d -it --name srs-stack -v $HOME/data:/data \ +docker run --restart always -d -it --name oryx -v $HOME/data:/data \ -p 80:2022 -p 443:2443 -p 1935:1935 -p 8000:8000/udp -p 10080:10080/udp \ - ossrs/srs-stack:5 + ossrs/oryx:5 ``` > Important: Remember to mount the `/data` volume to avoid losing data when the container restarts. For instance, @@ -36,18 +39,18 @@ docker run --restart always -d -it --name srs-stack -v $HOME/data:/data \ > a public IP (e.g., https://136.12.117.13), or a domain (e.g., https://your-domain.com). To set up HTTPS, > refer to [this post](https://blog.ossrs.io/how-to-secure-srs-with-lets-encrypt-by-1-click-cb618777639f). -> Note: In China, use `registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:5` to accelerate the Docker pull process +> Note: In China, use `registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:5` to accelerate the Docker pull process > and ensure the proper language is set. -The ports used for SRS Stack: +The ports used for Oryx: * `80/tcp`: The HTTP port, you can also use `2022` instead, such as `-p 2022:2022` etc. * `443/tcp`: The HTTPS port, you can also use `2443` instead, such as `-p 2443:2443` etc. -* `1935/tcp`: The RTMP port, to support publish stream by RTMP to SRS Stack. +* `1935/tcp`: The RTMP port, to support publish stream by RTMP to Oryx. * `8000/udp`: The WebRTC UDP port, to transport WebRTC media data like RTP packets. * `10080/udp`: The SRT UDP port, to support publish stream via SRT protocol. -You have the option to modify the volumes for srs-stack and direct them to different directories. +You have the option to modify the volumes for Oryx and direct them to different directories. * `/data` The global data directory. * `.well-known` The directory for Let's Encrypt ACME challenge. @@ -91,19 +94,19 @@ your own high-quality streaming and RTC platforms to support your businesses. ## FAQ -1. [English FAQ](https://ossrs.io/lts/en-us/faq-srs-stack) -1. [中文 FAQ](https://ossrs.net/lts/zh-cn/faq-srs-stack) +1. [English FAQ](https://ossrs.io/lts/en-us/faq-oryx) +1. [中文 FAQ](https://ossrs.net/lts/zh-cn/faq-oryx) ## Tutorials - [x] Getting Started: [Blog](https://blog.ossrs.io/how-to-setup-a-video-streaming-service-by-1-click-e9fe6f314ac6), [EN](https://ossrs.io/lts/en-us/docs/v6/doc/getting-started-stack), [CN](https://ossrs.net/lts/zh-cn/docs/v5/doc/getting-started-stack). - [x] Support WordPress Plugin: [Blog](https://blog.ossrs.io/publish-your-srs-livestream-through-wordpress-ec18dfae7d6f), [EN](https://ossrs.io/lts/en-us/blog/WordPress-Plugin), [CN](https://ossrs.net/lts/zh-cn/blog/WordPress-Plugin) or [WordPress Plugin](https://wordpress.org/plugins/srs-player). -- [x] Support Automatic HTTPS: [Blog](https://blog.ossrs.io/how-to-secure-srs-with-lets-encrypt-by-1-click-cb618777639f), [EN](https://ossrs.io/lts/en-us/blog/SRS-Stack-Tutorial), [CN](https://ossrs.net/lts/zh-cn/blog/SRS-Stack-HTTPS). +- [x] Support Automatic HTTPS: [Blog](https://blog.ossrs.io/how-to-secure-srs-with-lets-encrypt-by-1-click-cb618777639f), [EN](https://ossrs.io/lts/en-us/blog/Oryx-Tutorial), [CN](https://ossrs.net/lts/zh-cn/blog/Oryx-HTTPS). - [x] Support aaPanel to install on any linux: [Blog](https://blog.ossrs.io/how-to-setup-a-video-streaming-service-by-aapanel-9748ae754c8c), [EN](https://ossrs.io/lts/en-us/blog/BT-aaPanel), [CN](https://ossrs.net/lts/zh-cn/blog/BT-aaPanel). - [x] Support DVR to local disk: [Blog](https://blog.ossrs.io/how-to-record-live-streaming-to-mp4-file-2aa792c35b25), [EN](https://ossrs.io/lts/en-us/blog/Record-Live-Streaming), [CN](https://mp.weixin.qq.com/s/axN_TPo-Gk_H7CbdqUud6g). - [x] Support Virtual Live Streaming: [CN](https://mp.weixin.qq.com/s/I0Kmxtc24txpngO-PiR_tQ). - [x] Support Stream IP Camera: [Blog](https://blog.ossrs.io/easily-stream-your-rtsp-ip-camera-to-youtube-twitch-or-facebook-c078db917149), [EN](http://ossrs.io/lts/en-us/blog/Stream-IP-Camera-Events), [CN](https://ossrs.net/lts/zh-cn/blog/Stream-IP-Camera-Events). -- [x] Support build small [HLS deliver CDN](https://github.com/ossrs/srs-stack/tree/main/scripts/nginx-hls-cdn) by Nginx. +- [x] Support build small [HLS deliver CDN](https://github.com/ossrs/oryx/tree/main/scripts/nginx-hls-cdn) by Nginx. - [x] Support Live Streaming: [CN](https://mp.weixin.qq.com/s/AKqVWIdk3SBD-6uiTMliyA). - [x] Support Realtime SRT Streaming: [CN](https://mp.weixin.qq.com/s/HQb3gLRyJHHu56pnyHerxA). - [x] Support DVR to Tencent Cloud Storage or VoD: [CN](https://mp.weixin.qq.com/s/UXR5EBKZ-LnthwKN_rlIjg). @@ -156,7 +159,7 @@ The features that we're developing: ## License -SRS Stack is an open-source project, licensed under the [AGPL-3.0-or-later](https://spdx.org/licenses/AGPL-3.0-or-later.html) license. +Oryx is an open-source project, licensed under the [AGPL-3.0-or-later](https://spdx.org/licenses/AGPL-3.0-or-later.html) license. ## Developer diff --git a/SECURITY.md b/SECURITY.md index 5e03dc42..849e9661 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -3,6 +3,6 @@ We appreciate work to discover security vulnerabilities, but as SRS is entirely volunteer driven, so we might not be able to respond to issues in time. -Please click [here](https://github.com/ossrs/srs-stack/security/advisories) to report a vulnerability. +Please click [here](https://github.com/ossrs/oryx/security/advisories) to report a vulnerability. diff --git a/auto/focal.sh b/auto/focal.sh index 02dc9635..c530675b 100755 --- a/auto/focal.sh +++ b/auto/focal.sh @@ -69,5 +69,5 @@ git tag $TAG && git push origin $TAG && git push gitee $TAG echo "Publish OK: $TAG" echo "publish $TAG ok" -echo " Please test it after https://github.com/ossrs/srs-stack/actions/workflows/focal.yml done" +echo " Please test it after https://github.com/ossrs/oryx/actions/workflows/focal.yml done" diff --git a/auto/pub.sh b/auto/pub.sh index 9af8ea93..8e95652d 100755 --- a/auto/pub.sh +++ b/auto/pub.sh @@ -111,7 +111,7 @@ echo "Publish OK: $TAG" echo -e "\n\n" echo "Publication ok, please visit" -echo " Please test it after https://github.com/ossrs/srs-stack/actions/workflows/release.yml done" -echo " Download bt-srs_stack.zip from https://github.com/ossrs/srs-stack/releases" +echo " Please test it after https://github.com/ossrs/oryx/actions/workflows/release.yml done" +echo " Download bt-oryx.zip from https://github.com/ossrs/oryx/releases" echo " Then submit it to https://www.bt.cn/developer/details.html?id=600801805" -echo " Finally, update release at https://gitee.com/ossrs/srs-stack/releases/new" +echo " Finally, update release at https://gitee.com/ossrs/oryx/releases/new" diff --git a/mgmt/bootstrap b/mgmt/bootstrap index 4a7b885c..62ea0eec 100755 --- a/mgmt/bootstrap +++ b/mgmt/bootstrap @@ -9,7 +9,7 @@ cd ${WORK_DIR} DATA_HOME=/data WELL_KNOWN=${DATA_HOME}/.well-known -IMAGE=ossrs/srs-stack:5 +IMAGE=ossrs/oryx:5 MGMT_PORT=2022 HTTPS_PORT=2443 RTMP_PORT=1935 @@ -22,29 +22,29 @@ echo -n ", RTC_PORT=${RTC_PORT}, SRT_PORT=${SRT_PORT}, NGINX_RELOAD=${NGINX_RELO echo ", HTTPS_PORT=${HTTPS_PORT}, EXTRA_PARAMS=${EXTRA_PARAMS}" echo "Force to stop platform container" -docker rm -f srs-stack 2>/dev/null +docker rm -f oryx 2>/dev/null echo "Start platform container" CMD="docker run -v ${DATA_HOME}:/data -v ${WELL_KNOWN}:/data/.well-known ${EXTRA_PARAMS} -p ${MGMT_PORT}:2022/tcp -p ${HTTPS_PORT}:2443/tcp -p ${RTMP_PORT}:1935/tcp -p ${RTC_PORT}:8000/udp -p ${SRT_PORT}:10080/udp --log-driver=json-file --log-opt=max-size=1g --log-opt=max-file=3 - --restart no -it --name srs-stack --detach + --restart no -it --name oryx --detach ${IMAGE}" echo $CMD && $CMD if [[ $? -ne 0 ]]; then echo "Start platform container failed"; exit 1; fi echo "Start platform container ok" # Show all logs of container. -docker logs -f srs-stack & +docker logs -f oryx & function handle_signals() { echo "Signal $1 received. Cleaning up and exiting..." - ID=$(docker ps --filter "name=srs-stack" --format "{{.ID}}") + ID=$(docker ps --filter "name=oryx" --format "{{.ID}}") if [[ ! -z $ID ]]; then - docker stop srs-stack - docker rm -f srs-stack 2>/dev/null + docker stop oryx + docker rm -f oryx 2>/dev/null fi exit 0 @@ -66,15 +66,15 @@ function do_reload() { } while true; do - ID=$(docker ps --filter "name=srs-stack" --format "{{.ID}}") + ID=$(docker ps --filter "name=oryx" --format "{{.ID}}") if [[ -z $ID ]]; then echo "Platform container not found" - docker stop srs-stack 2>/dev/null - docker rm -f srs-stack 2>/dev/null + docker stop oryx 2>/dev/null + docker rm -f oryx 2>/dev/null exit 1 fi - docker ps -a --filter "name=srs-stack" --format "{{.Names}} {{.ID}} {{.Ports}}" + docker ps -a --filter "name=oryx" --format "{{.Names}} {{.ID}} {{.Ports}}" for (( i=0; i<3; i++ )); do do_reload sleep 1 diff --git a/platform/bootstrap b/platform/bootstrap index 804d20be..b509cf1b 100755 --- a/platform/bootstrap +++ b/platform/bootstrap @@ -8,7 +8,7 @@ echo "BASH_SOURCE=${BASH_SOURCE}, REALPATH=${REALPATH}, SCRIPT_DIR=${SCRIPT_DIR} cd ${WORK_DIR} APP_ARGS=$@ -echo "Run srs-stack with args: ${APP_ARGS}, WORK_DIR:${WORK_DIR}" +echo "Run oryx with args: ${APP_ARGS}, WORK_DIR:${WORK_DIR}" # Start redis. bash auto/start_redis diff --git a/platform/containers/conf/srs.release-local.conf b/platform/containers/conf/srs.release-local.conf index ff5e4b1e..d3db3539 100644 --- a/platform/containers/conf/srs.release-local.conf +++ b/platform/containers/conf/srs.release-local.conf @@ -27,7 +27,7 @@ rtc_server { listen 8000; # UDP port # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#config-candidate candidate $CANDIDATE; - # Disable for SRS Stack. + # Disable for Oryx. use_auto_detect_network_ip off; api_as_candidates off; } diff --git a/platform/containers/conf/srs.release-mac.conf b/platform/containers/conf/srs.release-mac.conf index c84d9a88..d48e8c4a 100644 --- a/platform/containers/conf/srs.release-mac.conf +++ b/platform/containers/conf/srs.release-mac.conf @@ -27,7 +27,7 @@ rtc_server { listen 8000; # UDP port # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#config-candidate candidate $CANDIDATE; - # Disable for SRS Stack. + # Disable for Oryx. use_auto_detect_network_ip off; api_as_candidates off; } diff --git a/platform/containers/conf/srs.release.conf b/platform/containers/conf/srs.release.conf index b5f76ad6..e16cc921 100644 --- a/platform/containers/conf/srs.release.conf +++ b/platform/containers/conf/srs.release.conf @@ -28,7 +28,7 @@ rtc_server { listen 8000; # UDP port # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#config-candidate candidate $CANDIDATE; - # Disable for SRS Stack. + # Disable for Oryx. use_auto_detect_network_ip off; api_as_candidates off; } diff --git a/platform/report.go b/platform/report.go index d41f07f5..2ab33c44 100644 --- a/platform/report.go +++ b/platform/report.go @@ -21,7 +21,7 @@ import ( "github.com/go-redis/redis/v8" ) -// queryLatestVersion is to query the latest and stable version from SRS Stack API. +// queryLatestVersion is to query the latest and stable version from Oryx API. func queryLatestVersion(ctx context.Context) (*Versions, error) { // Request release api with params. params := make(map[string]string) diff --git a/platform/service.go b/platform/service.go index e5e952ec..017184be 100644 --- a/platform/service.go +++ b/platform/service.go @@ -210,7 +210,7 @@ func (v *httpService) Run(ctx context.Context) error { } func handleHTTPService(ctx context.Context, handler *http.ServeMux) error { - ohttp.Server = fmt.Sprintf("srs-stack/%v", version) + ohttp.Server = fmt.Sprintf("Oryx/%v", version) if err := callbackWorker.Handle(ctx, handler); err != nil { return errors.Wrapf(err, "handle callback") diff --git a/platform/srs-errors.go b/platform/srs-errors.go index bd509f1d..aa80a509 100644 --- a/platform/srs-errors.go +++ b/platform/srs-errors.go @@ -5,7 +5,7 @@ // package main -// General error code for SRS Stack, it uses 100~999 for all errors. +// General error code for Oryx, it uses 100~999 for all errors. type SrsStackError int // Error code for callback, 100 ~ 200. diff --git a/platform/srs-hooks.go b/platform/srs-hooks.go index 7006a1ec..ff713498 100644 --- a/platform/srs-hooks.go +++ b/platform/srs-hooks.go @@ -33,7 +33,7 @@ import ( type SrsAction string const ( - // The actions for SRS server and SRS Stack. + // The actions for SRS server and Oryx. // The publish action. SrsActionOnPublish SrsAction = "on_publish" // The unpublish action. @@ -519,7 +519,7 @@ func handleHooksService(ctx context.Context, handler *http.ServeMux) error { request := vod.NewCreateSubAppIdRequest() request.Name = common.StringPtr(vodAppName) - request.Description = common.StringPtr("Application VoD for srs-stack") + request.Description = common.StringPtr("Application VoD for Oryx") if response, err := vodClient.CreateSubAppIdWithContext(ctx, request); err != nil { return errors.Wrapf(err, "create vod appid") diff --git a/platform/utils.go b/platform/utils.go index bb5278a7..9db42d3f 100644 --- a/platform/utils.go +++ b/platform/utils.go @@ -33,7 +33,7 @@ import ( "github.com/golang-jwt/jwt/v4" ) -// Versions is latest and stable version from SRS Stack API. +// Versions is latest and stable version from Oryx API. type Versions struct { Version string `json:"version"` Stable string `json:"stable"` @@ -48,7 +48,7 @@ func (v Versions) String() string { // TODO: FIXME: Should be merged to mgmt. type Config struct { IsDarwin bool - // Current working directory, at xxx/srs-stack/platform. + // Current working directory, at xxx/oryx/platform or xxx/srs-stack/platform. Pwd string Cloud string @@ -60,7 +60,7 @@ type Config struct { ipv4 net.IP Iface string - // The latest and stable version from SRS Stack API. + // The latest and stable version from Oryx API. Versions Versions } @@ -347,13 +347,13 @@ var dirUploadPath = path.Join(".", "upload") var dirVLivePath = path.Join(".", "vlive") var dirDubbingPath = path.Join(".", "dub") -// For SRS Stack to use the files. +// For Oryx to use the files. const serverDataDirectory = "/data" -// The video files allowed to use by SRS Stack. +// The video files allowed to use by Oryx. var serverAllowVideoFiles []string = []string{".mp4", ".flv", ".ts"} -// The audio files allowed to use by SRS Stack. +// The audio files allowed to use by Oryx. var serverAllowAudioFiles []string = []string{".mp3", ".aac", ".m4a"} // rdb is a global redis client object. @@ -525,7 +525,7 @@ func srsGenerateConfig(ctx context.Context) error { // Build the config for SRS. if true { confLines := []string{ - "# !!! Important: This file is produced and maintained by the SRS Stack, please never modify it.", + "# !!! Important: This file is produced and maintained by the Oryx, please never modify it.", } confLines = append(confLines, "", "") @@ -542,7 +542,7 @@ func srsGenerateConfig(ctx context.Context) error { } if true { confLines := []string{ - "# !!! Important: This file is produced and maintained by the SRS Stack, please never modify it.", + "# !!! Important: This file is produced and maintained by the Oryx, please never modify it.", } confLines = append(confLines, hlsConf...) confLines = append(confLines, "", "") @@ -690,7 +690,7 @@ func nginxGenerateConfig(ctx context.Context) error { // Build the config for NGINX. if true { confLines := []string{ - "# !!! Important: This file is produced and maintained by the SRS Stack, please never modify it.", + "# !!! Important: This file is produced and maintained by the Oryx, please never modify it.", } confLines = append(confLines, "", "") @@ -707,7 +707,7 @@ func nginxGenerateConfig(ctx context.Context) error { } if true { confLines := []string{ - "# !!! Important: This file is produced and maintained by the SRS Stack, please never modify it.", + "# !!! Important: This file is produced and maintained by the Oryx, please never modify it.", } confLines = append(confLines, uploadLimit...) confLines = append(confLines, sslConf...) @@ -742,7 +742,7 @@ func nginxGenerateConfig(ctx context.Context) error { return errors.Wrapf(err, "open file %v", fileName) } else { defer f.Close() - msg := fmt.Sprintf("SRS Stack reload Nginx at %v\n", time.Now().Format(time.RFC3339)) + msg := fmt.Sprintf("Oryx reload Nginx at %v\n", time.Now().Format(time.RFC3339)) if _, err = f.Write([]byte(msg)); err != nil { return errors.Wrapf(err, "write file %v", fileName) } diff --git a/releases/main.go b/releases/main.go index a12d02cd..75f912fd 100644 --- a/releases/main.go +++ b/releases/main.go @@ -33,7 +33,7 @@ func main() { API: api, } - w.Header().Set("Server", fmt.Sprintf("srs-stack/%v", api)) + w.Header().Set("Server", fmt.Sprintf("Oryx/%v", api)) b,err := json.Marshal(res) if err != nil { diff --git a/releases/version.go b/releases/version.go index e0e1d25e..86bb50e7 100644 --- a/releases/version.go +++ b/releases/version.go @@ -6,11 +6,11 @@ package main // Note that we don't use the version from API anymore. -// The latest version of SRS Stack. +// The latest version of Oryx. const latest = "v1.0.307" // Note that we don't use the version from API anymore. -// The api service version of SRS Stack. +// The api service version of Oryx. const api = "v1.0.374" // Note that we don't use the version from API anymore. diff --git a/scripts/lightsail.sh b/scripts/lightsail.sh index 7faec745..1f32d556 100644 --- a/scripts/lightsail.sh +++ b/scripts/lightsail.sh @@ -4,16 +4,16 @@ sudo apt-get update -y && sudo apt-get install -y curl docker.io if [[ $? -ne 0 ]]; then echo "Install curl failed."; exit 1; fi -rm -f linux-srs_stack-en.tar.gz && -curl -O -fsSL https://github.com/ossrs/srs-stack/releases/latest/download/linux-srs_stack-en.tar.gz -if [[ $? -ne 0 ]]; then echo "Download srs-stack failed."; exit 1; fi +rm -f linux-oryx-en.tar.gz && +curl -O -fsSL https://github.com/ossrs/oryx/releases/latest/download/linux-oryx-en.tar.gz +if [[ $? -ne 0 ]]; then echo "Download oryx failed."; exit 1; fi -tar xf linux-srs_stack-en.tar.gz -if [[ $? -ne 0 ]]; then echo "Unpack srs-stack failed."; exit 1; fi +tar xf linux-oryx-en.tar.gz +if [[ $? -ne 0 ]]; then echo "Unpack oryx failed."; exit 1; fi -sed -i 's|MGMT_PORT=2022|MGMT_PORT=80|g' srs_stack/mgmt/bootstrap && -sed -i 's|HTTPS_PORT=2443|HTTPS_PORT=443|g' srs_stack/mgmt/bootstrap +sed -i 's|MGMT_PORT=2022|MGMT_PORT=80|g' oryx/mgmt/bootstrap && +sed -i 's|HTTPS_PORT=2443|HTTPS_PORT=443|g' oryx/mgmt/bootstrap if [[ $? -ne 0 ]]; then echo "Update bootstrap failed."; exit 1; fi -sudo bash srs_stack/scripts/setup-ubuntu/install.sh -if [[ $? -ne 0 ]]; then echo "Install srs-stack failed."; exit 1; fi +sudo bash oryx/scripts/setup-ubuntu/install.sh +if [[ $? -ne 0 ]]; then echo "Install oryx failed."; exit 1; fi diff --git a/scripts/nginx-hls-cdn/Dockerfile.http b/scripts/nginx-hls-cdn/Dockerfile.http index a47451a4..f0dad2ee 100644 --- a/scripts/nginx-hls-cdn/Dockerfile.http +++ b/scripts/nginx-hls-cdn/Dockerfile.http @@ -3,7 +3,7 @@ ARG ARCH FROM ${ARCH}nginx:latest AS dist # The environment variables for template. -ENV SRS_STACK_SERVER=127.0.0.1:2022 \ +ENV ORYX_SERVER=127.0.0.1:2022 \ SRS_M3U8_EXPIRE=10 SRS_TS_EXPIRE=3600 ADD nginx.edge.http.conf.template /etc/nginx/templates/default.conf.template diff --git a/scripts/nginx-hls-cdn/Dockerfile.https b/scripts/nginx-hls-cdn/Dockerfile.https index 47f4a1cd..dd410699 100644 --- a/scripts/nginx-hls-cdn/Dockerfile.https +++ b/scripts/nginx-hls-cdn/Dockerfile.https @@ -3,9 +3,9 @@ ARG ARCH FROM ${ARCH}nginx:latest AS dist # The environment variables for template. -ENV SRS_STACK_SERVER=127.0.0.1:2022 \ - SRS_STACK_SSL_KEY=/data/config/nginx.key \ - SRS_STACK_SSL_CRT=/data/config/nginx.crt \ +ENV ORYX_SERVER=127.0.0.1:2022 \ + ORYX_SSL_KEY=/data/config/nginx.key \ + ORYX_SSL_CRT=/data/config/nginx.crt \ SRS_M3U8_EXPIRE=10 SRS_TS_EXPIRE=3600 ADD nginx.edge.https.conf.template /etc/nginx/templates/default.conf.template diff --git a/scripts/nginx-hls-cdn/README.md b/scripts/nginx-hls-cdn/README.md index 88465734..afa9f163 100644 --- a/scripts/nginx-hls-cdn/README.md +++ b/scripts/nginx-hls-cdn/README.md @@ -1,6 +1,6 @@ # NGINX-HLS-CDN -Construct a small CDN for HLS streaming using NGINX and SRS Stack. +Construct a small CDN for HLS streaming using NGINX and Oryx. ![](./nginx-hls-cdn-01.png) @@ -9,13 +9,13 @@ Construct a small CDN for HLS streaming using NGINX and SRS Stack. > Note: To utilize SRS, kindly refer to [Nginx for HLS](https://ossrs.io/lts/en-us/docs/v5/doc/nginx-for-hls) > for additional details. You can still follow this guide by proceeding directly to set up an NGINX server. -## Step 1: Create a VPS for SRS Stack +## Step 1: Create a VPS for Oryx Create a Digital Ocean droplet, or use another VPS: ```bash sshkey=$(doctl compute ssh-key list --no-header |grep srs |awk '{print $1}') && -doctl compute droplet create srs-stack --image ubuntu-20-04-x64 \ +doctl compute droplet create oryx --image ubuntu-20-04-x64 \ --region sgp1 --size s-2vcpu-2gb --ssh-keys $sshkey --wait ``` @@ -25,20 +25,20 @@ You will receive an internet IP address, for example, `128.199.114.145`. Log in ```bash apt-get update -y && apt-get install -y docker.io curl net-tools ffmpeg pcp && -docker run --rm --name srs-stack -d -v $HOME/data:/data \ +docker run --rm --name oryx -d -v $HOME/data:/data \ -p 2022:2022 -p 2443:2443 -p 1935:1935/tcp -p 8000:8000/udp -p 10080:10080/udp \ - ossrs/srs-stack:5 + ossrs/oryx:5 ``` -After installation, you can access SRS Stack at [http://128.199.114.145:2022](http://128.199.114.145:2022). -Please configure the SRS Stack using the web console. +After installation, you can access Oryx at [http://128.199.114.145:2022](http://128.199.114.145:2022). +Please configure the Oryx using the web console. Open `System > HLS > Delivery HLS in High Performance mode` and click the `Submit` button. This will enable high-performance HLS and allow NGINX to cache the m3u8 and ts files. ![](./nginx-hls-cdn-02.png) -Then you can publish a stream to SRS Stack, for example, to use ffmpeg to push a stream: +Then you can publish a stream to Oryx, for example, to use ffmpeg to push a stream: ```bash ffmpeg -re -i ~/git/srs/trunk/doc/source.flv -c copy -f flv \ @@ -55,24 +55,24 @@ Create a Digital Ocean droplet, or use another VPS: ```bash sshkey=$(doctl compute ssh-key list --no-header |grep srs |awk '{print $1}') && -doctl compute droplet create srs-stack-nginx01 --image ubuntu-20-04-x64 \ +doctl compute droplet create oryx-nginx01 --image ubuntu-20-04-x64 \ --region sgp1 --size s-4vcpu-8gb --ssh-keys $sshkey --wait ``` > Note: You can also access [DO Droplets](https://cloud.digitalocean.com/droplets) to create a new droplet. -> Note: We create a VPS with `4CPU 8GB` and `160GB` disk, because the load is larger than SRS Stack. +> Note: We create a VPS with `4CPU 8GB` and `160GB` disk, because the load is larger than Oryx. You will receive an internet IP address, for example, `128.199.93.163`. Log in and run: ```bash apt-get update -y && apt-get install -y docker.io curl net-tools ffmpeg pcp && -docker run --rm -it --name srs-stack-nginx01 -d \ - -p 80:80 -e SRS_STACK_SERVER=128.199.114.145:2022 \ - ossrs/srs-stack:nginx-hls-cdn-http +docker run --rm -it --name oryx-nginx01 -d \ + -p 80:80 -e ORYX_SERVER=128.199.114.145:2022 \ + ossrs/oryx:nginx-hls-cdn-http ``` -> Note: Please replace the IP `128.199.114.145` with your SRS Stack. +> Note: Please replace the IP `128.199.114.145` with your Oryx. A HLS stream should be available at [http://128.199.93.163/live/livestream.m3u8](http://128.199.114.145:2022/tools/player.html?url=http://128.199.93.163/live/livestream.m3u8), and now you got an Nginx server that supports HLS stream. @@ -108,9 +108,9 @@ Check the bandwidth by dstat: dstat -Nlo,eth0,eth1 ``` -All network traffic will be handled and transmitted by nginx01 instead of the SRS Stack. This structure +All network traffic will be handled and transmitted by nginx01 instead of the Oryx. This structure allows for the expansion and addition of more NGINX servers to accommodate more viewers, potentially -supporting thousands or even millions. Since the SRS Stack only needs to serve the NGINX servers, the +supporting thousands or even millions. Since the Oryx only needs to serve the NGINX servers, the load will consistently remain low. ## (Optional) Step 4: Setup HTTPS for Nginx Edge Server @@ -126,13 +126,13 @@ openssl req -new -x509 -key nginx.key -out nginx.crt -days 3650 -subj "/CN=nginx Start Nginx with SSL certificate file: ```bash -docker run --rm -it --name srs-stack-nginx01 -d \ - -p 80:80 -e SRS_STACK_SERVER=128.199.114.145:2022 \ +docker run --rm -it --name oryx-nginx01 -d \ + -p 80:80 -e ORYX_SERVER=128.199.114.145:2022 \ -p 443:443 -v $(pwd)/nginx.key:/data/config/nginx.key -v $(pwd)/nginx.crt:/data/config/nginx.crt \ - ossrs/srs-stack:nginx-hls-cdn-https + ossrs/oryx:nginx-hls-cdn-https ``` -> Note: Please set the `SRS_STACK_SERVER` by replacing the IP `128.199.114.145` with your SRS Stack. +> Note: Please set the `ORYX_SERVER` by replacing the IP `128.199.114.145` with your Oryx. > Note: Set the `SRS_M3U8_EXPIRE` to your SRS `hls_fragment` which is the TS duration, or the expired time to refresh the m3u8. Default value is 10 seconds. diff --git a/scripts/nginx-hls-cdn/nginx.edge.http.conf.template b/scripts/nginx-hls-cdn/nginx.edge.http.conf.template index 4e0e99aa..1a0c2eba 100644 --- a/scripts/nginx-hls-cdn/nginx.edge.http.conf.template +++ b/scripts/nginx-hls-cdn/nginx.edge.http.conf.template @@ -14,7 +14,7 @@ server { location ~ /.+/.*\.(m3u8)$ { proxy_set_header Host $host; - proxy_pass http://${SRS_STACK_SERVER}$request_uri; + proxy_pass http://${ORYX_SERVER}$request_uri; proxy_cache srs_cache; proxy_cache_key $scheme$proxy_host$uri$args; @@ -24,7 +24,7 @@ server { location ~ /.+/.*\.(ts)$ { proxy_set_header Host $host; - proxy_pass http://${SRS_STACK_SERVER}$request_uri; + proxy_pass http://${ORYX_SERVER}$request_uri; proxy_cache srs_cache; proxy_cache_key $scheme$proxy_host$uri; diff --git a/scripts/nginx-hls-cdn/nginx.edge.https.conf.template b/scripts/nginx-hls-cdn/nginx.edge.https.conf.template index 48e313d6..a8d43ac9 100644 --- a/scripts/nginx-hls-cdn/nginx.edge.https.conf.template +++ b/scripts/nginx-hls-cdn/nginx.edge.https.conf.template @@ -8,8 +8,8 @@ server { listen 443 ssl default_server; listen [::]:443 ssl default_server; - ssl_certificate ${SRS_STACK_SSL_CRT}; - ssl_certificate_key ${SRS_STACK_SSL_KEY}; + ssl_certificate ${ORYX_SSL_CRT}; + ssl_certificate_key ${ORYX_SSL_KEY}; ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3; add_header Strict-Transport-Security "max-age=0"; ssl_session_cache shared:SSL:10m; @@ -23,7 +23,7 @@ server { location ~ /.+/.*\.(m3u8)$ { proxy_set_header Host $host; - proxy_pass http://${SRS_STACK_SERVER}$request_uri; + proxy_pass http://${ORYX_SERVER}$request_uri; proxy_cache srs_cache; proxy_cache_key $scheme$proxy_host$uri$args; @@ -33,7 +33,7 @@ server { location ~ /.+/.*\.(ts)$ { proxy_set_header Host $host; - proxy_pass http://${SRS_STACK_SERVER}$request_uri; + proxy_pass http://${ORYX_SERVER}$request_uri; proxy_cache srs_cache; proxy_cache_key $scheme$proxy_host$uri; diff --git a/scripts/setup-aapanel/auto/zip.sh b/scripts/setup-aapanel/auto/zip.sh index a84f8819..f9575b06 100755 --- a/scripts/setup-aapanel/auto/zip.sh +++ b/scripts/setup-aapanel/auto/zip.sh @@ -35,7 +35,7 @@ fi OUTPUT=$(cd ${WORK_DIR} && mkdir -p ${OUTPUT} && cd ${OUTPUT} && pwd) echo "Install with options: VERSION=${VERSION}, OUTPUT=${OUTPUT}, EXTRACT=${EXTRACT}" -TMP_DIR="/tmp/srs-stack-$(date +%s)" && TARGET_DIR="${TMP_DIR}/srs_stack" && mkdir -p ${TARGET_DIR} +TMP_DIR="/tmp/oryx-$(date +%s)" && TARGET_DIR="${TMP_DIR}/oryx" && mkdir -p ${TARGET_DIR} ret=$?; if [[ 0 -ne ${ret} ]]; then echo "mkdir ${TARGET_DIR} failed, ret=$ret"; exit $ret; fi echo "Create tmp dir ${TARGET_DIR}" @@ -51,13 +51,13 @@ if [[ $? -ne 0 ]]; then echo "Copy files failed"; exit 1; fi # For aaPanel, should never use .env, because it will be removed when install. cat << END > $TARGET_DIR/config LANGUAGE=en -IMAGE=ossrs/srs-stack:${VERSION} +IMAGE=ossrs/oryx:${VERSION} END if [[ $? -ne 0 ]]; then echo "Generate config failed"; exit 1; fi echo "Generate config to $TARGET_DIR/config" -INSTALL_FILE=aapanel-srs_stack.zip -(cd $TMP_DIR/ && zip -q -r $INSTALL_FILE srs_stack) && +INSTALL_FILE=aapanel-oryx.zip +(cd $TMP_DIR/ && zip -q -r $INSTALL_FILE oryx) && echo "Zip generated at $TMP_DIR/$INSTALL_FILE" if [[ $? -ne 0 ]]; then echo "Zip plugin failed"; exit 1; fi @@ -67,7 +67,7 @@ ret=$?; if [[ 0 -ne ${ret} ]]; then echo "mv failed, ret=$ret"; exit $ret; fi echo "Move $INSTALL_FILE to ${OUTPUT}" if [[ $EXTRACT == yes ]]; then - if [[ -d $OUTPUT/srs_stack ]]; then rm -rf $OUTPUT/srs_stack/*; fi && + if [[ -d $OUTPUT/oryx ]]; then rm -rf $OUTPUT/oryx/*; fi && (cd ${OUTPUT} && unzip -q $INSTALL_FILE) ret=$?; if [[ 0 -ne ${ret} ]]; then echo "tar failed, ret=$ret"; exit $ret; fi echo "Extract $INSTALL_FILE to ${OUTPUT}" diff --git a/scripts/setup-aapanel/do_install.sh b/scripts/setup-aapanel/do_install.sh index 507a77dd..435cef34 100644 --- a/scripts/setup-aapanel/do_install.sh +++ b/scripts/setup-aapanel/do_install.sh @@ -3,7 +3,7 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH -install_path=/www/server/panel/plugin/srs_stack +install_path=/www/server/panel/plugin/oryx SRS_HOME=/usr/local/srs-stack DATA_HOME=/data @@ -36,12 +36,12 @@ Install() { chmod +x $install_path/mgmt/bootstrap if [[ $? -ne 0 ]]; then echo "Set mgmt bootstrap permission failed"; exit 1; fi - # Move srs-stack to its home. - echo "Link srs-stack to $SRS_HOME" + # Move oryx to its home. + echo "Link oryx to $SRS_HOME" rm -rf $SRS_HOME && mkdir $SRS_HOME && ln -sf $install_path/mgmt $SRS_HOME/mgmt && ln -sf $install_path/usr $SRS_HOME/usr - if [[ $? -ne 0 ]]; then echo "Link srs-stack failed"; exit 1; fi + if [[ $? -ne 0 ]]; then echo "Link oryx failed"; exit 1; fi # Create global data directory. echo "Create data and config file" @@ -63,26 +63,26 @@ Install() { update_sysctl net.core.wmem_default 16777216 # Now, we're ready to install by BT. - echo 'Wait for srs-stack plugin ready...'; sleep 1.3; + echo 'Wait for oryx plugin ready...'; sleep 1.3; touch ${install_path}/.bt_ready echo 'Install OK' } Uninstall() { - if [[ -f /etc/init.d/srs_stack ]]; then /etc/init.d/srs_stack stop; fi - echo "Stop srs-stack service ok" + if [[ -f /etc/init.d/oryx ]]; then /etc/init.d/oryx stop; fi + echo "Stop oryx service ok" - INIT_D=/etc/init.d/srs_stack && rm -f $INIT_D + INIT_D=/etc/init.d/oryx && rm -f $INIT_D echo "Remove init.d script $INIT_D ok" - if [[ -f /usr/lib/systemd/system/srs-stack.service ]]; then - systemctl disable srs-stack - rm -f /usr/lib/systemd/system/srs-stack.service + if [[ -f /usr/lib/systemd/system/oryx.service ]]; then + systemctl disable oryx + rm -f /usr/lib/systemd/system/oryx.service systemctl daemon-reload systemctl reset-failed fi - echo "Remove srs-stack.service ok" + echo "Remove oryx.service ok" INSTALL_HOME=/usr/local/srs-stack rm -rf $INSTALL_HOME @@ -99,7 +99,7 @@ Uninstall() { rmdir $install_path 2>/dev/null echo "Remove plugin path $install_path ok" - LOGS=$(ls /tmp/srs_stack_install.* 2>/dev/null) + LOGS=$(ls /tmp/oryx_install.* 2>/dev/null) if [[ ! -z $LOGS ]]; then rm -f $LOGS; fi echo "Remove install flag files $LOGS ok" } diff --git a/scripts/setup-aapanel/do_setup.sh b/scripts/setup-aapanel/do_setup.sh index ccf93824..d1a43fe9 100644 --- a/scripts/setup-aapanel/do_setup.sh +++ b/scripts/setup-aapanel/do_setup.sh @@ -1,16 +1,16 @@ #!/bin/bash -# Install srs-stack, for example: -# bash /www/server/panel/plugin/srs_stack/setup.sh --r0 /tmp/srs_stack_install.r0 --nginx /www/server/nginx/logs/nginx.pid --www /www/wwwroot --site srs.stack.local +# Install oryx, for example: +# bash /www/server/panel/plugin/oryx/setup.sh --r0 /tmp/oryx_install.r0 --nginx /www/server/nginx/logs/nginx.pid --www /www/wwwroot --site srs.stack.local # If ok, we will create systemctl service at: -# /usr/lib/systemd/system/srs-stack.service +# /usr/lib/systemd/system/oryx.service HELP=no R0_FILE= NGINX_PID= WWW_HOME= SITE_NAME= -install_path=/www/server/panel/plugin/srs_stack +install_path=/www/server/panel/plugin/oryx SRS_HOME=/usr/local/srs-stack DATA_HOME=/data @@ -19,7 +19,7 @@ VERBOSE=no LANGUAGE=en REGISTRY=auto REGION=auto -IMAGE=ossrs/srs-stack:5 +IMAGE=ossrs/oryx:5 # Allow use config to override the default values. # For aaPanel, should never use .env, because it will be removed when install. @@ -99,7 +99,7 @@ if [[ $? -ne 0 ]]; then echo "Cache docker images failed"; exit 1; fi # If install ok, the directory should exists. if [[ ! -d ${SRS_HOME} || ! -d ${SRS_HOME}/mgmt ]]; then - echo "Install srs-stack failed"; exit 1; + echo "Install oryx failed"; exit 1; fi # Link the www root to container. @@ -111,18 +111,18 @@ fi #if [[ $? -ne 0 ]]; then echo "Link www root failed"; exit 1; fi # Create init.d script. -rm -f /etc/init.d/srs_stack && -cp $install_path/init.d.sh /etc/init.d/srs_stack && -chmod +x /etc/init.d/srs_stack +rm -f /etc/init.d/oryx && +cp $install_path/init.d.sh /etc/init.d/oryx && +chmod +x /etc/init.d/oryx if [[ $? -ne 0 ]]; then echo "Setup init.d script failed"; exit 1; fi -# Create srs-stack service, and the credential file. +# Create oryx service, and the credential file. # Remark: Never start the service, because the IP will change for new machine created. cd ${SRS_HOME} && -cp -f usr/lib/systemd/system/srs-stack.service /usr/lib/systemd/system/srs-stack.service && -systemctl daemon-reload && systemctl enable srs-stack -if [[ $? -ne 0 ]]; then echo "Install srs-stack failed"; exit 1; fi +cp -f usr/lib/systemd/system/oryx.service /usr/lib/systemd/system/oryx.service && +systemctl daemon-reload && systemctl enable oryx +if [[ $? -ne 0 ]]; then echo "Install oryx failed"; exit 1; fi -/etc/init.d/srs_stack restart srs-stack -if [[ $? -ne 0 ]]; then echo "Start srs-stack failed"; exit 1; fi +/etc/init.d/oryx restart oryx +if [[ $? -ne 0 ]]; then echo "Start oryx failed"; exit 1; fi diff --git a/scripts/setup-aapanel/index.html b/scripts/setup-aapanel/index.html index 4b4a2219..b4827589 100644 --- a/scripts/setup-aapanel/index.html +++ b/scripts/setup-aapanel/index.html @@ -35,13 +35,13 @@

@@ -49,20 +49,20 @@
Domain: - * Access the SRS Stack console through the domain name, please see here + * Access the Oryx console through the domain name, please see here

- +
-

SRS Stack Dashboard

-

Attention!!! Please set domain name by DNS or hosts, please see here

+

Oryx Dashboard

+

Attention!!! Please set domain name by DNS or hosts, please see here

@@ -71,12 +71,12 @@ diff --git a/scripts/setup-aapanel/info.json b/scripts/setup-aapanel/info.json index 28397c08..a3a4e576 100644 --- a/scripts/setup-aapanel/info.json +++ b/scripts/setup-aapanel/info.json @@ -1,9 +1,9 @@ { - "title": "SRS Stack", - "name": "srs_stack", - "ps": "SRS Stack is an all-in-one, out-of-the-box, and open-source video solution for creating online video services, including live streaming and WebRTC, on the cloud or through self-hosting. Built with SRS, FFmpeg, and WebRTC, it supports various protocols and offers features like authentication, multi-platform streaming, recording, transcoding, virtual live events, AI transcription, AI assistant, Video Dubbing, automatic HTTPS, and HTTP Open API.", + "title": "Oryx", + "name": "oryx", + "ps": "Oryx(SRS Stack) is an all-in-one, out-of-the-box, and open-source video solution for creating online video services, including live streaming and WebRTC, on the cloud or through self-hosting. Built with SRS, FFmpeg, and WebRTC, it supports various protocols and offers features like authentication, multi-platform streaming, recording, transcoding, virtual live events, AI transcription, AI assistant, Video Dubbing, automatic HTTPS, and HTTP Open API.", "versions": "5.14.11", - "checks": "/www/server/panel/plugin/srs_stack", + "checks": "/www/server/panel/plugin/oryx", "author": "Winlin", - "home": "https://github.com/ossrs/srs-stack" + "home": "https://github.com/ossrs/oryx" } \ No newline at end of file diff --git a/scripts/setup-aapanel/init.d.sh b/scripts/setup-aapanel/init.d.sh index 0388434c..766f5aa6 100644 --- a/scripts/setup-aapanel/init.d.sh +++ b/scripts/setup-aapanel/init.d.sh @@ -1,27 +1,27 @@ #!/bin/bash ### BEGIN INIT INFO -# Provides: ossrs(srs-stack) +# Provides: ossrs(oryx) # Required-Start: $all # Required-Stop: $all # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 -# Short-Description: ossrs(srs-stack) -# Description: https://github.com/ossrs/srs-stack +# Short-Description: ossrs(oryx) +# Description: https://github.com/ossrs/oryx ### END INIT INFO SRS_HOME=/usr/local/srs-stack start() { - systemctl start srs-stack.service + systemctl start oryx.service } stop() { - systemctl stop srs-stack.service + systemctl stop oryx.service } status() { - systemctl status srs-stack.service + systemctl status oryx.service } menu() { diff --git a/scripts/setup-aapanel/srs_stack_main.py b/scripts/setup-aapanel/oryx_main.py similarity index 89% rename from scripts/setup-aapanel/srs_stack_main.py rename to scripts/setup-aapanel/oryx_main.py index 3e10ea34..247f90f1 100644 --- a/scripts/setup-aapanel/srs_stack_main.py +++ b/scripts/setup-aapanel/oryx_main.py @@ -13,20 +13,20 @@ import bt_tools print(f"bt_tools version: {bt_tools.version()}") -class srs_stack_main: +class oryx_main: # Normally the plugin is at: - # /www/server/panel/plugin/srs_stack + # /www/server/panel/plugin/oryx # Other paths are: # public.get_setup_path() is /www/server # public.get_panel_path() is /www/server/panel # public.get_site_path() is /www/wwwroot # public.get_vhost_path() is /www/server/panel/vhost - __plugin_path = "{}/panel/plugin/srs_stack".format(public.get_setup_path()) - __srs_service = "/usr/lib/systemd/system/srs-stack.service" + __plugin_path = "{}/panel/plugin/oryx".format(public.get_setup_path()) + __srs_service = "/usr/lib/systemd/system/oryx.service" __srs_home = '/usr/local/srs-stack' - __r0_file = '/tmp/srs_stack_install.r0' - __firewall = '/tmp/srs_stack_install.fw' - __log_file = '/tmp/srs_stack_install.log' + __r0_file = '/tmp/oryx_install.r0' + __firewall = '/tmp/oryx_install.fw' + __log_file = '/tmp/oryx_install.log' __ready_file = '{}/.bt_ready'.format(__plugin_path) __site = 'srs.stack.local' @@ -101,7 +101,7 @@ def installSrs(self, args): return public.returnMsg(False, 'not nginx, but {}'.format(public.GetWebServer())) srs = public.ExecShell('ls {} >/dev/null 2>&1 && echo -n ok'.format(self.__srs_service))[0] - running = public.ExecShell('ps aux |grep -v grep |grep srs_stack |grep setup >/dev/null 2>&1 && echo -n ok')[0] + running = public.ExecShell('ps aux |grep -v grep |grep oryx |grep setup >/dev/null 2>&1 && echo -n ok')[0] [tail, wc] = ['', 0] r0 = public.ExecShell('ls {} >/dev/null 2>&1 && echo -n failed'.format(self.__r0_file))[0] @@ -110,7 +110,7 @@ def installSrs(self, args): plugin=self.__plugin_path, r0=self.__r0_file, nginx=nginx, www=public.get_site_path(), site=self.__site, log=self.__log_file, )) - elif os.path.exists('/tmp/srs_stack_install.log'): + elif os.path.exists('/tmp/oryx_install.log'): tail = public.ExecShell('sed -n "{start},{end}p" {log}'.format( start=args.start, end=args.end, log=self.__log_file, ))[0] @@ -120,7 +120,7 @@ def installSrs(self, args): def querySrs(self, args): srs = public.ExecShell('ls {} >/dev/null 2>&1 && echo -n ok'.format(self.__srs_service))[0] - running = public.ExecShell('ps aux |grep -v grep |grep srs_stack |grep setup >/dev/null 2>&1 && echo -n ok')[0] + running = public.ExecShell('ps aux |grep -v grep |grep oryx |grep setup >/dev/null 2>&1 && echo -n ok')[0] r0 = public.ExecShell('ls {} >/dev/null 2>&1 && echo -n failed'.format(self.__r0_file))[0] tail = public.ExecShell('tail {}'.format(self.__log_file))[0] @@ -134,7 +134,7 @@ def cleanupIntall(self, args): # If not set site_created. def createSrsSite(self, args): if 'domain' not in args or args.domain == '': - self.__trace(f"Error: Empty SRS Stack domain.") + self.__trace(f"Error: Empty Oryx domain.") return public.returnMsg(False, 'invalid domain') site = panelSite().AddSite(Params( @@ -190,7 +190,7 @@ def setupFirewall(self, args): })) def querySrsService(self, args): - ok = public.ExecShell('systemctl status srs-stack.service >/dev/null 2>&1 && echo -n ok')[0] + ok = public.ExecShell('systemctl status oryx.service >/dev/null 2>&1 && echo -n ok')[0] return public.returnMsg(True, json.dumps({'active': ok})) def __discover_path(self, general_path): diff --git a/scripts/setup-aapanel/setup.sh b/scripts/setup-aapanel/setup.sh index 2505187f..05778d6f 100644 --- a/scripts/setup-aapanel/setup.sh +++ b/scripts/setup-aapanel/setup.sh @@ -33,15 +33,15 @@ if [[ -z $R0_FILE ]]; then echo "No r0 file"; exit 1; fi bash do_setup.sh $ARGS && echo "Execute OK" r0=$?; if [[ $r0 -ne 0 ]]; then # Rollback the install. - systemctl disable srs-stack >/dev/null 2>&1 - rm -f /usr/lib/systemd/system/srs-stack.service + systemctl disable oryx >/dev/null 2>&1 + rm -f /usr/lib/systemd/system/oryx.service echo "Execute failed" echo "R0=$r0" > $R0_FILE echo "TS=$(date +%s)" >> $R0_FILE echo "DATE=\"$(date)\"" >> $R0_FILE echo "ARGS=\"bash $0 $ARGS\"" >> $R0_FILE - echo "DESC=\"srs-stack install script\"" >> $R0_FILE + echo "DESC=\"oryx install script\"" >> $R0_FILE exit 1 fi diff --git a/scripts/setup-bt/auto/zip.sh b/scripts/setup-bt/auto/zip.sh index 4a685663..f6543946 100755 --- a/scripts/setup-bt/auto/zip.sh +++ b/scripts/setup-bt/auto/zip.sh @@ -35,7 +35,7 @@ fi OUTPUT=$(cd ${WORK_DIR} && mkdir -p ${OUTPUT} && cd ${OUTPUT} && pwd) echo "Install with options: VERSION=${VERSION}, OUTPUT=${OUTPUT}, EXTRACT=${EXTRACT}" -TMP_DIR="/tmp/srs-stack-$(date +%s)" && TARGET_DIR="${TMP_DIR}/srs_stack" && mkdir -p ${TARGET_DIR} +TMP_DIR="/tmp/oryx-$(date +%s)" && TARGET_DIR="${TMP_DIR}/oryx" && mkdir -p ${TARGET_DIR} ret=$?; if [[ 0 -ne ${ret} ]]; then echo "mkdir ${TARGET_DIR} failed, ret=$ret"; exit $ret; fi echo "Create tmp dir ${TARGET_DIR}" @@ -51,13 +51,13 @@ if [[ $? -ne 0 ]]; then echo "Copy files failed"; exit 1; fi # For BT, should never use .env, because it will be removed when install. cat << END > $TARGET_DIR/config LANGUAGE=zh -IMAGE=ossrs/srs-stack:${VERSION} +IMAGE=ossrs/oryx:${VERSION} END if [[ $? -ne 0 ]]; then echo "Generate config failed"; exit 1; fi echo "Generate config to $TARGET_DIR/config" -INSTALL_FILE=bt-srs_stack.zip -(cd $TMP_DIR/ && zip -q -r $INSTALL_FILE srs_stack) && +INSTALL_FILE=bt-oryx.zip +(cd $TMP_DIR/ && zip -q -r $INSTALL_FILE oryx) && echo "Zip generated at $TMP_DIR/$INSTALL_FILE" if [[ $? -ne 0 ]]; then echo "Zip plugin failed"; exit 1; fi @@ -67,7 +67,7 @@ ret=$?; if [[ 0 -ne ${ret} ]]; then echo "mv failed, ret=$ret"; exit $ret; fi echo "Move $INSTALL_FILE to ${OUTPUT}" if [[ $EXTRACT == yes ]]; then - if [[ -d $OUTPUT/srs_stack ]]; then rm -rf $OUTPUT/srs_stack/*; fi && + if [[ -d $OUTPUT/oryx ]]; then rm -rf $OUTPUT/oryx/*; fi && (cd ${OUTPUT} && unzip -q $INSTALL_FILE) ret=$?; if [[ 0 -ne ${ret} ]]; then echo "tar failed, ret=$ret"; exit $ret; fi echo "Extract $INSTALL_FILE to ${OUTPUT}" diff --git a/scripts/setup-bt/do_install.sh b/scripts/setup-bt/do_install.sh index 507a77dd..435cef34 100644 --- a/scripts/setup-bt/do_install.sh +++ b/scripts/setup-bt/do_install.sh @@ -3,7 +3,7 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH -install_path=/www/server/panel/plugin/srs_stack +install_path=/www/server/panel/plugin/oryx SRS_HOME=/usr/local/srs-stack DATA_HOME=/data @@ -36,12 +36,12 @@ Install() { chmod +x $install_path/mgmt/bootstrap if [[ $? -ne 0 ]]; then echo "Set mgmt bootstrap permission failed"; exit 1; fi - # Move srs-stack to its home. - echo "Link srs-stack to $SRS_HOME" + # Move oryx to its home. + echo "Link oryx to $SRS_HOME" rm -rf $SRS_HOME && mkdir $SRS_HOME && ln -sf $install_path/mgmt $SRS_HOME/mgmt && ln -sf $install_path/usr $SRS_HOME/usr - if [[ $? -ne 0 ]]; then echo "Link srs-stack failed"; exit 1; fi + if [[ $? -ne 0 ]]; then echo "Link oryx failed"; exit 1; fi # Create global data directory. echo "Create data and config file" @@ -63,26 +63,26 @@ Install() { update_sysctl net.core.wmem_default 16777216 # Now, we're ready to install by BT. - echo 'Wait for srs-stack plugin ready...'; sleep 1.3; + echo 'Wait for oryx plugin ready...'; sleep 1.3; touch ${install_path}/.bt_ready echo 'Install OK' } Uninstall() { - if [[ -f /etc/init.d/srs_stack ]]; then /etc/init.d/srs_stack stop; fi - echo "Stop srs-stack service ok" + if [[ -f /etc/init.d/oryx ]]; then /etc/init.d/oryx stop; fi + echo "Stop oryx service ok" - INIT_D=/etc/init.d/srs_stack && rm -f $INIT_D + INIT_D=/etc/init.d/oryx && rm -f $INIT_D echo "Remove init.d script $INIT_D ok" - if [[ -f /usr/lib/systemd/system/srs-stack.service ]]; then - systemctl disable srs-stack - rm -f /usr/lib/systemd/system/srs-stack.service + if [[ -f /usr/lib/systemd/system/oryx.service ]]; then + systemctl disable oryx + rm -f /usr/lib/systemd/system/oryx.service systemctl daemon-reload systemctl reset-failed fi - echo "Remove srs-stack.service ok" + echo "Remove oryx.service ok" INSTALL_HOME=/usr/local/srs-stack rm -rf $INSTALL_HOME @@ -99,7 +99,7 @@ Uninstall() { rmdir $install_path 2>/dev/null echo "Remove plugin path $install_path ok" - LOGS=$(ls /tmp/srs_stack_install.* 2>/dev/null) + LOGS=$(ls /tmp/oryx_install.* 2>/dev/null) if [[ ! -z $LOGS ]]; then rm -f $LOGS; fi echo "Remove install flag files $LOGS ok" } diff --git a/scripts/setup-bt/do_setup.sh b/scripts/setup-bt/do_setup.sh index c637cdcd..55c92259 100644 --- a/scripts/setup-bt/do_setup.sh +++ b/scripts/setup-bt/do_setup.sh @@ -1,16 +1,16 @@ #!/bin/bash -# Install srs-stack, for example: -# bash /www/server/panel/plugin/srs_stack/setup.sh --r0 /tmp/srs_stack_install.r0 --nginx /www/server/nginx/logs/nginx.pid --www /www/wwwroot --site srs.stack.local +# Install oryx, for example: +# bash /www/server/panel/plugin/oryx/setup.sh --r0 /tmp/oryx_install.r0 --nginx /www/server/nginx/logs/nginx.pid --www /www/wwwroot --site srs.stack.local # If ok, we will create systemctl service at: -# /usr/lib/systemd/system/srs-stack.service +# /usr/lib/systemd/system/oryx.service HELP=no R0_FILE= NGINX_PID= WWW_HOME= SITE_NAME= -install_path=/www/server/panel/plugin/srs_stack +install_path=/www/server/panel/plugin/oryx SRS_HOME=/usr/local/srs-stack DATA_HOME=/data @@ -19,7 +19,7 @@ VERBOSE=no LANGUAGE=zh REGISTRY=auto REGION=auto -IMAGE=ossrs/srs-stack:5 +IMAGE=ossrs/oryx:5 # Allow use config to override the default values. # For BT, should never use .env, because it will be removed when install. @@ -99,7 +99,7 @@ if [[ $? -ne 0 ]]; then echo "Cache docker images failed"; exit 1; fi # If install ok, the directory should exists. if [[ ! -d ${SRS_HOME} || ! -d ${SRS_HOME}/mgmt ]]; then - echo "Install srs-stack failed"; exit 1; + echo "Install oryx failed"; exit 1; fi # Link the www root to container. @@ -111,18 +111,18 @@ fi #if [[ $? -ne 0 ]]; then echo "Link www root failed"; exit 1; fi # Create init.d script. -rm -f /etc/init.d/srs_stack && -cp $install_path/init.d.sh /etc/init.d/srs_stack && -chmod +x /etc/init.d/srs_stack +rm -f /etc/init.d/oryx && +cp $install_path/init.d.sh /etc/init.d/oryx && +chmod +x /etc/init.d/oryx if [[ $? -ne 0 ]]; then echo "Setup init.d script failed"; exit 1; fi -# Create srs-stack service, and the credential file. +# Create oryx service, and the credential file. # Remark: Never start the service, because the IP will change for new machine created. cd ${SRS_HOME} && -cp -f usr/lib/systemd/system/srs-stack.service /usr/lib/systemd/system/srs-stack.service && -systemctl daemon-reload && systemctl enable srs-stack -if [[ $? -ne 0 ]]; then echo "Install srs-stack failed"; exit 1; fi +cp -f usr/lib/systemd/system/oryx.service /usr/lib/systemd/system/oryx.service && +systemctl daemon-reload && systemctl enable oryx +if [[ $? -ne 0 ]]; then echo "Install oryx failed"; exit 1; fi -/etc/init.d/srs_stack restart srs-stack -if [[ $? -ne 0 ]]; then echo "Start srs-stack failed"; exit 1; fi +/etc/init.d/oryx restart oryx +if [[ $? -ne 0 ]]; then echo "Start oryx failed"; exit 1; fi diff --git a/scripts/setup-bt/index.html b/scripts/setup-bt/index.html index 5e05ffda..0c37393e 100644 --- a/scripts/setup-bt/index.html +++ b/scripts/setup-bt/index.html @@ -35,13 +35,13 @@

@@ -49,20 +49,20 @@
域名: - * 通过域名访问SRS Stack管理后台,操作步骤请看这里 + * 通过域名访问Oryx管理后台,操作步骤请看这里

- +
-

SRS Stack管理面板

-

注意!!! 请设置域名解析或者hosts,操作步骤请看这里

+

Oryx管理面板

+

注意!!! 请设置域名解析或者hosts,操作步骤请看这里

@@ -71,12 +71,12 @@ diff --git a/scripts/setup-bt/info.json b/scripts/setup-bt/info.json index 29f24da5..87b957d5 100644 --- a/scripts/setup-bt/info.json +++ b/scripts/setup-bt/info.json @@ -1,9 +1,9 @@ { - "title": "SRS音视频服务器", - "name": "srs_stack", - "ps": "SRS Stack让你一键拥有自己的视频云解决方案,可以在云上或私有化部署,支持丰富的音视频协议,提供鉴权、私人直播间、多平台转播、录制、转码、虚拟直播、AI字幕、直播间AI助手、视频翻译、自动HTTPS、开放API等丰富功能,基于SRS、FFmpeg和WebRTC构建。", + "title": "Oryx", + "name": "oryx", + "ps": "Oryx(SRS Stack)让你一键拥有自己的视频云解决方案,可以在云上或私有化部署,支持丰富的音视频协议,提供鉴权、私人直播间、多平台转播、录制、转码、虚拟直播、AI字幕、直播间AI助手、视频翻译、自动HTTPS、开放API等丰富功能,基于SRS、FFmpeg和WebRTC构建。", "versions": "5.14.11", - "checks": "/www/server/panel/plugin/srs_stack", + "checks": "/www/server/panel/plugin/oryx", "author": "Winlin", - "home": "https://github.com/ossrs/srs-stack" + "home": "https://github.com/ossrs/oryx" } \ No newline at end of file diff --git a/scripts/setup-bt/init.d.sh b/scripts/setup-bt/init.d.sh index 0388434c..766f5aa6 100644 --- a/scripts/setup-bt/init.d.sh +++ b/scripts/setup-bt/init.d.sh @@ -1,27 +1,27 @@ #!/bin/bash ### BEGIN INIT INFO -# Provides: ossrs(srs-stack) +# Provides: ossrs(oryx) # Required-Start: $all # Required-Stop: $all # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 -# Short-Description: ossrs(srs-stack) -# Description: https://github.com/ossrs/srs-stack +# Short-Description: ossrs(oryx) +# Description: https://github.com/ossrs/oryx ### END INIT INFO SRS_HOME=/usr/local/srs-stack start() { - systemctl start srs-stack.service + systemctl start oryx.service } stop() { - systemctl stop srs-stack.service + systemctl stop oryx.service } status() { - systemctl status srs-stack.service + systemctl status oryx.service } menu() { diff --git a/scripts/setup-bt/srs_stack_main.py b/scripts/setup-bt/oryx_main.py similarity index 89% rename from scripts/setup-bt/srs_stack_main.py rename to scripts/setup-bt/oryx_main.py index 3e10ea34..247f90f1 100644 --- a/scripts/setup-bt/srs_stack_main.py +++ b/scripts/setup-bt/oryx_main.py @@ -13,20 +13,20 @@ import bt_tools print(f"bt_tools version: {bt_tools.version()}") -class srs_stack_main: +class oryx_main: # Normally the plugin is at: - # /www/server/panel/plugin/srs_stack + # /www/server/panel/plugin/oryx # Other paths are: # public.get_setup_path() is /www/server # public.get_panel_path() is /www/server/panel # public.get_site_path() is /www/wwwroot # public.get_vhost_path() is /www/server/panel/vhost - __plugin_path = "{}/panel/plugin/srs_stack".format(public.get_setup_path()) - __srs_service = "/usr/lib/systemd/system/srs-stack.service" + __plugin_path = "{}/panel/plugin/oryx".format(public.get_setup_path()) + __srs_service = "/usr/lib/systemd/system/oryx.service" __srs_home = '/usr/local/srs-stack' - __r0_file = '/tmp/srs_stack_install.r0' - __firewall = '/tmp/srs_stack_install.fw' - __log_file = '/tmp/srs_stack_install.log' + __r0_file = '/tmp/oryx_install.r0' + __firewall = '/tmp/oryx_install.fw' + __log_file = '/tmp/oryx_install.log' __ready_file = '{}/.bt_ready'.format(__plugin_path) __site = 'srs.stack.local' @@ -101,7 +101,7 @@ def installSrs(self, args): return public.returnMsg(False, 'not nginx, but {}'.format(public.GetWebServer())) srs = public.ExecShell('ls {} >/dev/null 2>&1 && echo -n ok'.format(self.__srs_service))[0] - running = public.ExecShell('ps aux |grep -v grep |grep srs_stack |grep setup >/dev/null 2>&1 && echo -n ok')[0] + running = public.ExecShell('ps aux |grep -v grep |grep oryx |grep setup >/dev/null 2>&1 && echo -n ok')[0] [tail, wc] = ['', 0] r0 = public.ExecShell('ls {} >/dev/null 2>&1 && echo -n failed'.format(self.__r0_file))[0] @@ -110,7 +110,7 @@ def installSrs(self, args): plugin=self.__plugin_path, r0=self.__r0_file, nginx=nginx, www=public.get_site_path(), site=self.__site, log=self.__log_file, )) - elif os.path.exists('/tmp/srs_stack_install.log'): + elif os.path.exists('/tmp/oryx_install.log'): tail = public.ExecShell('sed -n "{start},{end}p" {log}'.format( start=args.start, end=args.end, log=self.__log_file, ))[0] @@ -120,7 +120,7 @@ def installSrs(self, args): def querySrs(self, args): srs = public.ExecShell('ls {} >/dev/null 2>&1 && echo -n ok'.format(self.__srs_service))[0] - running = public.ExecShell('ps aux |grep -v grep |grep srs_stack |grep setup >/dev/null 2>&1 && echo -n ok')[0] + running = public.ExecShell('ps aux |grep -v grep |grep oryx |grep setup >/dev/null 2>&1 && echo -n ok')[0] r0 = public.ExecShell('ls {} >/dev/null 2>&1 && echo -n failed'.format(self.__r0_file))[0] tail = public.ExecShell('tail {}'.format(self.__log_file))[0] @@ -134,7 +134,7 @@ def cleanupIntall(self, args): # If not set site_created. def createSrsSite(self, args): if 'domain' not in args or args.domain == '': - self.__trace(f"Error: Empty SRS Stack domain.") + self.__trace(f"Error: Empty Oryx domain.") return public.returnMsg(False, 'invalid domain') site = panelSite().AddSite(Params( @@ -190,7 +190,7 @@ def setupFirewall(self, args): })) def querySrsService(self, args): - ok = public.ExecShell('systemctl status srs-stack.service >/dev/null 2>&1 && echo -n ok')[0] + ok = public.ExecShell('systemctl status oryx.service >/dev/null 2>&1 && echo -n ok')[0] return public.returnMsg(True, json.dumps({'active': ok})) def __discover_path(self, general_path): diff --git a/scripts/setup-bt/setup.sh b/scripts/setup-bt/setup.sh index 2505187f..05778d6f 100644 --- a/scripts/setup-bt/setup.sh +++ b/scripts/setup-bt/setup.sh @@ -33,15 +33,15 @@ if [[ -z $R0_FILE ]]; then echo "No r0 file"; exit 1; fi bash do_setup.sh $ARGS && echo "Execute OK" r0=$?; if [[ $r0 -ne 0 ]]; then # Rollback the install. - systemctl disable srs-stack >/dev/null 2>&1 - rm -f /usr/lib/systemd/system/srs-stack.service + systemctl disable oryx >/dev/null 2>&1 + rm -f /usr/lib/systemd/system/oryx.service echo "Execute failed" echo "R0=$r0" > $R0_FILE echo "TS=$(date +%s)" >> $R0_FILE echo "DATE=\"$(date)\"" >> $R0_FILE echo "ARGS=\"bash $0 $ARGS\"" >> $R0_FILE - echo "DESC=\"srs-stack install script\"" >> $R0_FILE + echo "DESC=\"oryx install script\"" >> $R0_FILE exit 1 fi diff --git a/scripts/setup-droplet/scripts/01-srs.sh b/scripts/setup-droplet/scripts/01-srs.sh index cc07dc0f..54662224 100644 --- a/scripts/setup-droplet/scripts/01-srs.sh +++ b/scripts/setup-droplet/scripts/01-srs.sh @@ -3,23 +3,23 @@ # The main directory. SRS_HOME=/usr/local/srs-stack DATA_HOME=/data -IMAGE_URL=docker.io/ossrs/srs-stack:v${application_version} +IMAGE_URL=docker.io/ossrs/oryx:v${application_version} echo "SRS_HOME=$SRS_HOME, DATA_HOME=$DATA_HOME, IMAGE_URL=$IMAGE_URL" # When droplet created, it might fail as: # gnutls_handshake() failed: The TLS connection was non-properly terminated. # so we try to wait for a while and try later. -SOURCE=/tmp/srs-stack -echo "Install srs-stack at $SOURCE" +SOURCE=/tmp/oryx +echo "Install oryx at $SOURCE" for ((i=0; i<30; i++)); do - cd $(dirname $SOURCE) && rm -rf srs-stack && - git clone -b main --depth 1 https://github.com/ossrs/srs-stack.git && + cd $(dirname $SOURCE) && rm -rf oryx && + git clone -b main --depth 1 https://github.com/ossrs/oryx.git && GIT_DONE=YES if [[ $? -eq 0 ]]; then break; fi echo "Ignore error and try later..."; sleep 3; done if [[ $GIT_DONE != YES ]]; then - echo "Clone srs-stack failed"; exit 1; + echo "Clone oryx failed"; exit 1; fi # Install files to lighthouse directory. @@ -28,7 +28,7 @@ cp -r ${SOURCE}/usr ${SRS_HOME}/usr && cp ${SOURCE}/LICENSE ${SRS_HOME}/LICENSE && cp ${SOURCE}/README.md ${SRS_HOME}/README.md && cp ${SOURCE}/mgmt/bootstrap ${SRS_HOME}/mgmt/bootstrap -if [[ $? -ne 0 ]]; then echo "Copy srs-stack failed"; exit 1; fi +if [[ $? -ne 0 ]]; then echo "Copy oryx failed"; exit 1; fi echo "Start to create data and config files" mkdir -p ${DATA_HOME}/config && touch ${DATA_HOME}/config/.env @@ -70,15 +70,15 @@ else if [[ $? -ne 0 ]]; then echo "Cache docker images failed"; exit 1; fi fi -# Create srs-stack service, and the credential file. +# Create oryx service, and the credential file. # Remark: Never start the service, because the IP will change for new machine created. cd ${SRS_HOME} && -cp -f usr/lib/systemd/system/srs-stack.service /usr/lib/systemd/system/srs-stack.service && -systemctl daemon-reload && systemctl enable srs-stack -if [[ $? -ne 0 ]]; then echo "Install srs-stack failed"; exit 1; fi && +cp -f usr/lib/systemd/system/oryx.service /usr/lib/systemd/system/oryx.service && +systemctl daemon-reload && systemctl enable oryx +if [[ $? -ne 0 ]]; then echo "Install oryx failed"; exit 1; fi && rm -rf $SOURCE -if [[ $? -ne 0 ]]; then echo "Remove srs-stack failed"; exit 1; fi +if [[ $? -ne 0 ]]; then echo "Remove oryx failed"; exit 1; fi echo 'Install OK' diff --git a/scripts/setup-droplet/scripts/02-ufw-srs.sh b/scripts/setup-droplet/scripts/02-ufw-srs.sh index b0bf6217..1116ded0 100755 --- a/scripts/setup-droplet/scripts/02-ufw-srs.sh +++ b/scripts/setup-droplet/scripts/02-ufw-srs.sh @@ -4,7 +4,7 @@ echo "ufw allow ssh" ufw limit ssh -# For Nginx HTTP/HTTPS, also proxy for srs-stack and SRS streaming. +# For Nginx HTTP/HTTPS, also proxy for oryx and SRS streaming. echo "ufw allow HTTP/HTTPS" ufw allow 80 ufw allow 443 @@ -26,7 +26,7 @@ ufw allow 5060/udp # Note that we must expose these port listen at PrivateIP or lo, for container to access it. echo "ufw allow mgmt" -# For srs-stack API. +# For oryx API. ufw allow 2022/tcp # Apply force firewall. diff --git a/scripts/setup-lighthouse/build.sh b/scripts/setup-lighthouse/build.sh index 19ca8463..e38771a6 100644 --- a/scripts/setup-lighthouse/build.sh +++ b/scripts/setup-lighthouse/build.sh @@ -46,7 +46,7 @@ if [[ -z $user ]]; then echo "No user"; exit 1; fi if [[ -z $password ]]; then echo "No password"; exit 1; fi if [[ -z $VERSION ]]; then echo "No VERSION"; exit 1; fi -IMAGE_URL="registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$VERSION" +IMAGE_URL="registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:$VERSION" echo "SOURCE=$SOURCE, ip=$ip, os=$os, user=$user, password=${#password}B, cleanup=$cleanup, VERSION=$VERSION, IMAGE_URL=$IMAGE_URL" sshCmd="sshpass -p $password ssh -o StrictHostKeyChecking=no" @@ -55,7 +55,7 @@ scpCmd="sshpass -p $password scp -o StrictHostKeyChecking=no" $sshCmd -t $user@$ip "hostname" && echo "Check sshpass ok" if [[ $ret -ne 0 ]]; then echo "Check sshpass failed"; echo "See https://stackoverflow.com/a/32258393/17679565"; exit 1; fi -SRS_HOME=/tmp/lighthouse/srs-stack && +SRS_HOME=/tmp/lighthouse/oryx && rm -rf $(dirname $SRS_HOME) && mkdir -p $SRS_HOME && echo "mkdir $SRS_HOME ok" ret=$?; if [[ 0 -ne $ret ]]; then echo "mkdir $SRS_HOME failed, ret=$ret"; exit $ret; fi @@ -68,14 +68,14 @@ cp ${SOURCE}/LICENSE ${SRS_HOME}/LICENSE && cp ${SOURCE}/README.md ${SRS_HOME}/README.md && cp ${SOURCE}/mgmt/bootstrap ${SRS_HOME}/mgmt/bootstrap && cp ${SOURCE}/platform/containers/conf/nginx.conf ${SRS_HOME}/platform/containers/conf/nginx.conf -if [[ $? -ne 0 ]]; then echo "Copy srs-stack failed"; exit 1; fi +if [[ $? -ne 0 ]]; then echo "Copy oryx failed"; exit 1; fi echo "Start to update bootstrap" sed -i '' "s|^IMAGE=.*|IMAGE=${IMAGE_URL}|g" ${SRS_HOME}/mgmt/bootstrap if [[ $? -ne 0 ]]; then echo "Update bootstrap failed"; exit 1; fi echo "Update bootstrap ok" -tgzName=/tmp/lighthouse/srs-stack.zip && +tgzName=/tmp/lighthouse/oryx.zip && (cd $(dirname $tgzName) && rm -f $tgzName && zip -q -r $tgzName $(basename $SRS_HOME)) && echo "Package $tgzName ok" && ls -lh $tgzName if [[ $? -ne 0 ]]; then echo "Package $tgzName failed"; exit 1; fi diff --git a/scripts/setup-lighthouse/setup_lighthouse.sh b/scripts/setup-lighthouse/setup_lighthouse.sh index dcd05ba5..fef1ce97 100755 --- a/scripts/setup-lighthouse/setup_lighthouse.sh +++ b/scripts/setup-lighthouse/setup_lighthouse.sh @@ -28,12 +28,12 @@ cd $WORK_DIR # The main directory. SRS_HOME=/usr/local/srs-stack DATA_HOME=/data -IMAGE_URL=registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:5 +IMAGE_URL=registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:5 SOURCE=$WORK_DIR -mkdir -p /usr/local/lighthouse/softwares/srs-stack && -rm -rf $SRS_HOME && ln -sf /usr/local/lighthouse/softwares/srs-stack $SRS_HOME && -(cd /usr/local/lighthouse/softwares && rm -rf srs-terraform && ln -sf srs-stack srs-terraform) +mkdir -p /usr/local/lighthouse/softwares/oryx && +rm -rf $SRS_HOME && ln -sf /usr/local/lighthouse/softwares/oryx $SRS_HOME && +(cd /usr/local/lighthouse/softwares && rm -rf srs-terraform && ln -sf oryx srs-terraform) ret=$?; if [[ 0 -ne $ret ]]; then echo "Failed to create $SRS_HOME"; exit $ret; fi if [[ $(id -un lighthouse 2>/dev/null) == '' ]]; then @@ -94,7 +94,7 @@ cp -r ${SOURCE}/usr ${SRS_HOME}/usr && cp ${SOURCE}/LICENSE ${SRS_HOME}/LICENSE && cp ${SOURCE}/README.md ${SRS_HOME}/README.md && mkdir -p ${SRS_HOME}/mgmt && cp ${SOURCE}/mgmt/bootstrap ${SRS_HOME}/mgmt/bootstrap -if [[ $? -ne 0 ]]; then echo "Copy srs-stack failed"; exit 1; fi +if [[ $? -ne 0 ]]; then echo "Copy oryx failed"; exit 1; fi ######################################################################################################################## echo "Start to create data and config files" @@ -137,18 +137,18 @@ else if [[ $? -ne 0 ]]; then echo "Cache docker images failed"; exit 1; fi fi -# Create srs-stack service, and the credential file. +# Create oryx service, and the credential file. # Remark: Never start the service, because the IP will change for new machine created. -cp -f ${SRS_HOME}/usr/lib/systemd/system/srs-stack.service /usr/lib/systemd/system/srs-stack.service && -systemctl daemon-reload && systemctl enable srs-stack -if [[ $? -ne 0 ]]; then echo "Install srs-stack failed"; exit 1; fi +cp -f ${SRS_HOME}/usr/lib/systemd/system/oryx.service /usr/lib/systemd/system/oryx.service && +systemctl daemon-reload && systemctl enable oryx +if [[ $? -ne 0 ]]; then echo "Install oryx failed"; exit 1; fi ######################################################################################################################## # Create srs-cloud soft link, to keep compatible with lighthouse HTTPS management. If user user lighthouse to # setup the HTTPS and domain, the lighthouse will create a file like /etc/nginx/init.d/yourdomain.conf, which # includes the file /usr/local/lighthouse/softwares/srs-cloud/mgmt/containers/conf/default.d/proxy.conf, which -# finally proxy to srs-stack. -(cd /usr/local/lighthouse/softwares && rm -rf srs-cloud && ln -sf srs-stack srs-cloud) && +# finally proxy to oryx. +(cd /usr/local/lighthouse/softwares && rm -rf srs-cloud && ln -sf oryx srs-cloud) && mkdir -p /usr/local/lighthouse/softwares/srs-cloud/mgmt/containers/conf/default.d && cat << END > /usr/local/lighthouse/softwares/srs-cloud/mgmt/containers/conf/default.d/proxy.conf location / { @@ -159,11 +159,11 @@ END if [[ $? -ne 0 ]]; then echo "Compatible lighthouse HTTPS failed"; exit 1; fi ######################################################################################################################## -# Note that we keep files as root, because we run srs-stack as root, see https://stackoverflow.com/a/70953525/17679565 +# Note that we keep files as root, because we run oryx as root, see https://stackoverflow.com/a/70953525/17679565 chown lighthouse:lighthouse ${DATA_HOME}/config/.env if [[ $? -ne 0 ]]; then echo "Link files failed"; exit 1; fi rm -rf ~lighthouse/credentials.txt && ln -sf ${DATA_HOME}/config/.env ~lighthouse/credentials.txt if [[ $? -ne 0 ]]; then echo "Link files failed"; exit 1; fi -echo "Install srs-stack ok" +echo "Install oryx ok" diff --git a/scripts/setup-ubuntu/build.sh b/scripts/setup-ubuntu/build.sh index 37e75810..90951a54 100644 --- a/scripts/setup-ubuntu/build.sh +++ b/scripts/setup-ubuntu/build.sh @@ -38,7 +38,7 @@ fi OUTPUT=$(cd ${WORK_DIR} && mkdir -p ${OUTPUT} && cd ${OUTPUT} && pwd) echo "Install with options: LANGUAGE=${LANGUAGE}, VERSION=${VERSION}, EXTRACT=${EXTRACT}, OUTPUT=${OUTPUT}" -TMP_DIR="/tmp/srs_stack-$(date +%s)" && TARGET_DIR="${TMP_DIR}/srs_stack" && +TMP_DIR="/tmp/oryx-$(date +%s)" && TARGET_DIR="${TMP_DIR}/oryx" && mkdir -p ${TARGET_DIR} && cd ${TARGET_DIR} ret=$?; if [[ 0 -ne ${ret} ]]; then echo "mkdir ${TARGET_DIR} failed, ret=$ret"; exit $ret; fi echo "Enter work directory ${TARGET_DIR}" @@ -54,13 +54,13 @@ echo "Copy files to ${TARGET_DIR}" cat << END > ${TARGET_DIR}/scripts/setup-ubuntu/.env LANGUAGE=${LANGUAGE} -IMAGE=ossrs/srs-stack:${VERSION} +IMAGE=ossrs/oryx:${VERSION} END ret=$?; if [[ 0 -ne ${ret} ]]; then echo "write .env failed, ret=$ret"; exit $ret; fi echo "Write .env to ${TARGET_DIR}/scripts/setup-ubuntu/.env" -INSTALL_FILE=linux-srs_stack-${LANGUAGE}.tar.gz -(cd ${TMP_DIR} && tar zcf $INSTALL_FILE srs_stack) && +INSTALL_FILE=linux-oryx-${LANGUAGE}.tar.gz +(cd ${TMP_DIR} && tar zcf $INSTALL_FILE oryx) && ret=$?; if [[ 0 -ne ${ret} ]]; then echo "tar failed, ret=$ret"; exit $ret; fi echo "Tar $INSTALL_FILE" diff --git a/scripts/setup-ubuntu/init.d.sh b/scripts/setup-ubuntu/init.d.sh index 0388434c..766f5aa6 100644 --- a/scripts/setup-ubuntu/init.d.sh +++ b/scripts/setup-ubuntu/init.d.sh @@ -1,27 +1,27 @@ #!/bin/bash ### BEGIN INIT INFO -# Provides: ossrs(srs-stack) +# Provides: ossrs(oryx) # Required-Start: $all # Required-Stop: $all # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 -# Short-Description: ossrs(srs-stack) -# Description: https://github.com/ossrs/srs-stack +# Short-Description: ossrs(oryx) +# Description: https://github.com/ossrs/oryx ### END INIT INFO SRS_HOME=/usr/local/srs-stack start() { - systemctl start srs-stack.service + systemctl start oryx.service } stop() { - systemctl stop srs-stack.service + systemctl stop oryx.service } status() { - systemctl status srs-stack.service + systemctl status oryx.service } menu() { diff --git a/scripts/setup-ubuntu/install.sh b/scripts/setup-ubuntu/install.sh index 3befce28..04fdb6ca 100755 --- a/scripts/setup-ubuntu/install.sh +++ b/scripts/setup-ubuntu/install.sh @@ -15,7 +15,7 @@ VERBOSE=no LANGUAGE=zh REGISTRY=auto REGION=auto -IMAGE=ossrs/srs-stack:5 +IMAGE=ossrs/oryx:5 # Allow use .env to override the default values. if [[ -f ${SCRIPT_DIR}/.env ]]; then source ${SCRIPT_DIR}/.env; fi @@ -162,23 +162,23 @@ fi # If install ok, the directory should exists. if [[ ! -d ${SRS_HOME} ]]; then - echo "Install srs-stack failed"; exit 1; + echo "Install oryx failed"; exit 1; fi # Create init.d script. -rm -f /etc/init.d/srs_stack && -cp ${SCRIPT_DIR}/init.d.sh /etc/init.d/srs_stack && -chmod +x /etc/init.d/srs_stack +rm -f /etc/init.d/oryx && +cp ${SCRIPT_DIR}/init.d.sh /etc/init.d/oryx && +chmod +x /etc/init.d/oryx if [[ $? -ne 0 ]]; then echo "Setup init.d script failed"; exit 1; fi -# Create srs-stack service. +# Create oryx service. # Remark: Never start the service, because the IP will change for new machine created. cd ${SRS_HOME} && -cp -f usr/lib/systemd/system/srs-stack.service /usr/lib/systemd/system/srs-stack.service && -systemctl daemon-reload && systemctl enable srs-stack -if [[ $? -ne 0 ]]; then echo "Install srs-stack failed"; exit 1; fi +cp -f usr/lib/systemd/system/oryx.service /usr/lib/systemd/system/oryx.service && +systemctl daemon-reload && systemctl enable oryx +if [[ $? -ne 0 ]]; then echo "Install oryx failed"; exit 1; fi -/etc/init.d/srs_stack restart srs-stack -if [[ $? -ne 0 ]]; then echo "Start srs-stack failed"; exit 1; fi +/etc/init.d/oryx restart oryx +if [[ $? -ne 0 ]]; then echo "Start oryx failed"; exit 1; fi echo 'Install OK' diff --git a/scripts/setup-ubuntu/uninstall.sh b/scripts/setup-ubuntu/uninstall.sh index c57905bf..11452d8b 100644 --- a/scripts/setup-ubuntu/uninstall.sh +++ b/scripts/setup-ubuntu/uninstall.sh @@ -7,21 +7,21 @@ WORK_DIR=$(cd $(dirname ${REALPATH})/../.. && pwd) echo "BASH_SOURCE=${BASH_SOURCE}, REALPATH=${REALPATH}, SCRIPT_DIR=${SCRIPT_DIR}, WORK_DIR=${WORK_DIR}" cd ${WORK_DIR} -if [[ -f /etc/init.d/srs_stack ]]; then - /etc/init.d/srs_stack stop - echo "Stop srs-stack service ok" +if [[ -f /etc/init.d/oryx ]]; then + /etc/init.d/oryx stop + echo "Stop oryx service ok" fi -INIT_D=/etc/init.d/srs_stack && +INIT_D=/etc/init.d/oryx && rm -f $INIT_D echo "Remove init.d script $INIT_D ok" -if [[ -f /usr/lib/systemd/system/srs-stack.service ]]; then - systemctl disable srs-stack - rm -f /usr/lib/systemd/system/srs-stack.service +if [[ -f /usr/lib/systemd/system/oryx.service ]]; then + systemctl disable oryx + rm -f /usr/lib/systemd/system/oryx.service systemctl daemon-reload systemctl reset-failed - echo "Remove srs-stack.service ok" + echo "Remove oryx.service ok" fi INSTALL_HOME=/usr/local/srs-stack diff --git a/scripts/tools/bt_api_create_site.py b/scripts/tools/bt_api_create_site.py index 63d6e302..38128964 100644 --- a/scripts/tools/bt_api_create_site.py +++ b/scripts/tools/bt_api_create_site.py @@ -27,7 +27,7 @@ 'type': 'PHP', 'version': '00', 'port': 80, - 'ps': 'SRS Stack', + 'ps': 'Oryx', 'ftp': 'false', 'sql': 'false', # For aaPanel. diff --git a/scripts/tools/bt_tools.py b/scripts/tools/bt_tools.py index 510256b4..d8d3f378 100644 --- a/scripts/tools/bt_tools.py +++ b/scripts/tools/bt_tools.py @@ -23,7 +23,7 @@ def setup_site(confData): ] confData = confData.replace('#SSL-START', f"{' '.join(srsConf)}\n #SSL-START") - # Proxy all to SRS Stack. + # Proxy all to Oryx. if confData.find('#SRS-PROXY-START') == -1: srsConf = [ '#SRS-PROXY-START\n', diff --git a/scripts/tools/local-test-all.sh b/scripts/tools/local-test-all.sh index 8b5dcb88..43cc50b1 100755 --- a/scripts/tools/local-test-all.sh +++ b/scripts/tools/local-test-all.sh @@ -76,26 +76,26 @@ if [[ $TARGET == all || $TARGET == script ]]; then echo "Load platform image to docker" && version=$(bash scripts/version.sh) && docker exec -it script docker load -i platform.tar && - docker exec -it script docker tag platform:latest ossrs/srs-stack:$version && - docker exec -it script docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$version && + docker exec -it script docker tag platform:latest ossrs/oryx:$version && + docker exec -it script docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:$version && docker exec -it script docker images ret=$?; if [[ 0 -ne ${ret} ]]; then echo "Load platform image to docker failed, ret=$ret"; exit $ret; fi echo "Setup script installer" && docker exec -it bt rm -f /data/config/.env && - docker exec -it script bash build/srs_stack/scripts/setup-ubuntu/uninstall.sh || echo OK && + docker exec -it script bash build/oryx/scripts/setup-ubuntu/uninstall.sh || echo OK && bash scripts/setup-ubuntu/build.sh --output $(pwd)/build --extract && - docker exec -it script bash build/srs_stack/scripts/setup-ubuntu/install.sh --verbose + docker exec -it script bash build/oryx/scripts/setup-ubuntu/install.sh --verbose ret=$?; if [[ 0 -ne ${ret} ]]; then echo "Setup script installer failed, ret=$ret"; exit $ret; fi echo "Test script installer" && docker exec -it script make -j -C test && bash scripts/tools/secret.sh --output test/.env && - docker exec -it script ./test/srs-stack.test -test.v -endpoint http://localhost:2022 \ + docker exec -it script ./test/oryx.test -test.v -endpoint http://localhost:2022 \ -srs-log=true -wait-ready=true -init-password=true -init-self-signed-cert=true \ -check-api-secret=true && bash scripts/tools/secret.sh --output test/.env && - docker exec -it script ./test/srs-stack.test -test.v -wait-ready -endpoint https://localhost:2443 \ + docker exec -it script ./test/oryx.test -test.v -wait-ready -endpoint https://localhost:2443 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true ret=$?; if [[ 0 -ne ${ret} ]]; then echo "Test script installer failed, ret=$ret"; exit $ret; fi @@ -111,7 +111,7 @@ if [[ $TARGET == all || $TARGET == aapanel ]]; then docker rm -f $CONTAINERS 2>/dev/null || echo 'OK' && AAPANEL_KEY=$(cat $HOME/.bt/api.json |awk -F token_crypt '{print $2}' |cut -d'"' -f3) docker run -p 80:80 -p 7800:7800 \ - -v $(pwd)/build/srs_stack:/www/server/panel/plugin/srs_stack \ + -v $(pwd)/build/oryx:/www/server/panel/plugin/oryx \ -v $HOME/.bt/api.json:/www/server/panel/config/api.json -e BT_KEY=$AAPANEL_KEY \ --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:rw --cgroupns=host \ --add-host srs.stack.local:127.0.0.1 \ @@ -122,35 +122,35 @@ if [[ $TARGET == all || $TARGET == aapanel ]]; then echo "Load platform image to docker" && version=$(bash scripts/version.sh) && docker exec -it aapanel docker load -i platform.tar && - docker exec -it aapanel docker tag platform:latest ossrs/srs-stack:$version && - docker exec -it aapanel docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$version && + docker exec -it aapanel docker tag platform:latest ossrs/oryx:$version && + docker exec -it aapanel docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:$version && docker exec -it aapanel docker images ret=$?; if [[ 0 -ne ${ret} ]]; then echo "Load platform image to docker failed, ret=$ret"; exit $ret; fi echo "Setup aaPanel installer" && docker exec -it aapanel rm -f /data/config/.env && - docker exec -it aapanel bash /www/server/panel/plugin/srs_stack/install.sh uninstall || echo 'OK' && + docker exec -it aapanel bash /www/server/panel/plugin/oryx/install.sh uninstall || echo 'OK' && bash scripts/setup-aapanel/auto/zip.sh --output $(pwd)/build --extract && - docker exec -it aapanel bash /www/server/panel/plugin/srs_stack/install.sh install + docker exec -it aapanel bash /www/server/panel/plugin/oryx/install.sh install ret=$?; if [[ 0 -ne ${ret} ]]; then echo "Setup aaPanel installer failed, ret=$ret"; exit $ret; fi echo "Test aaPanel installer" && - docker exec -it aapanel python3 /www/server/panel/plugin/srs_stack/bt_api_remove_site.py && - docker exec -it aapanel python3 /www/server/panel/plugin/srs_stack/bt_api_create_site.py && - docker exec -it aapanel python3 /www/server/panel/plugin/srs_stack/bt_api_setup_site.py && - docker exec -it aapanel bash /www/server/panel/plugin/srs_stack/setup.sh \ - --r0 /tmp/srs_stack_install.r0 --nginx /www/server/nginx/logs/nginx.pid \ + docker exec -it aapanel python3 /www/server/panel/plugin/oryx/bt_api_remove_site.py && + docker exec -it aapanel python3 /www/server/panel/plugin/oryx/bt_api_create_site.py && + docker exec -it aapanel python3 /www/server/panel/plugin/oryx/bt_api_setup_site.py && + docker exec -it aapanel bash /www/server/panel/plugin/oryx/setup.sh \ + --r0 /tmp/oryx_install.r0 --nginx /www/server/nginx/logs/nginx.pid \ --www /www/wwwroot --site srs.stack.local ret=$?; if [[ 0 -ne ${ret} ]]; then echo "Test aaPanel installer failed, ret=$ret"; exit $ret; fi echo "Test aaPanel installer" && docker exec -it aapanel make -j -C test && bash scripts/tools/secret.sh --output test/.env && - docker exec -it aapanel ./test/srs-stack.test -test.v -endpoint http://srs.stack.local:80 \ + docker exec -it aapanel ./test/oryx.test -test.v -endpoint http://srs.stack.local:80 \ -srs-log=true -wait-ready=true -init-password=true -init-self-signed-cert=true \ -check-api-secret=true && bash scripts/tools/secret.sh --output test/.env && - docker exec -it aapanel ./test/srs-stack.test -test.v -wait-ready -endpoint https://srs.stack.local:443 \ + docker exec -it aapanel ./test/oryx.test -test.v -wait-ready -endpoint https://srs.stack.local:443 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true ret=$?; if [[ 0 -ne ${ret} ]]; then echo "Test aaPanel installer failed, ret=$ret"; exit $ret; fi @@ -166,7 +166,7 @@ if [[ $TARGET == all || $TARGET == bt ]]; then docker rm -f $CONTAINERS 2>/dev/null || echo 'OK' && BT_KEY=$(cat $HOME/.bt/api.json |awk -F token_crypt '{print $2}' |cut -d'"' -f3) docker run -p 80:80 -p 7800:7800 \ - -v $(pwd)/build/srs_stack:/www/server/panel/plugin/srs_stack \ + -v $(pwd)/build/oryx:/www/server/panel/plugin/oryx \ -v $HOME/.bt/userInfo.json:/www/server/panel/data/userInfo.json \ -v $HOME/.bt/api.json:/www/server/panel/config/api.json -e BT_KEY=$BT_KEY \ --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:rw --cgroupns=host \ @@ -178,35 +178,35 @@ if [[ $TARGET == all || $TARGET == bt ]]; then echo "Load platform image to docker" && version=$(bash scripts/version.sh) && docker exec -it bt docker load -i platform.tar && - docker exec -it bt docker tag platform:latest ossrs/srs-stack:$version && - docker exec -it bt docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:$version && + docker exec -it bt docker tag platform:latest ossrs/oryx:$version && + docker exec -it bt docker tag platform:latest registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:$version && docker exec -it bt docker images ret=$?; if [[ 0 -ne ${ret} ]]; then echo "Load platform image to docker failed, ret=$ret"; exit $ret; fi echo "Install bt installer" && docker exec -it bt rm -f /data/config/.env && - docker exec -it bt bash /www/server/panel/plugin/srs_stack/install.sh uninstall || echo 'OK' && + docker exec -it bt bash /www/server/panel/plugin/oryx/install.sh uninstall || echo 'OK' && bash scripts/setup-bt/auto/zip.sh --output $(pwd)/build --extract && - docker exec -it bt bash /www/server/panel/plugin/srs_stack/install.sh install + docker exec -it bt bash /www/server/panel/plugin/oryx/install.sh install ret=$?; if [[ 0 -ne ${ret} ]]; then echo "Setup bt installer failed, ret=$ret"; exit $ret; fi echo "Setup bt installer" && - docker exec -it bt python3 /www/server/panel/plugin/srs_stack/bt_api_remove_site.py && - docker exec -it bt python3 /www/server/panel/plugin/srs_stack/bt_api_create_site.py && - docker exec -it bt python3 /www/server/panel/plugin/srs_stack/bt_api_setup_site.py && - docker exec -it bt bash /www/server/panel/plugin/srs_stack/setup.sh \ - --r0 /tmp/srs_stack_install.r0 --nginx /www/server/nginx/logs/nginx.pid \ + docker exec -it bt python3 /www/server/panel/plugin/oryx/bt_api_remove_site.py && + docker exec -it bt python3 /www/server/panel/plugin/oryx/bt_api_create_site.py && + docker exec -it bt python3 /www/server/panel/plugin/oryx/bt_api_setup_site.py && + docker exec -it bt bash /www/server/panel/plugin/oryx/setup.sh \ + --r0 /tmp/oryx_install.r0 --nginx /www/server/nginx/logs/nginx.pid \ --www /www/wwwroot --site srs.stack.local ret=$?; if [[ 0 -ne ${ret} ]]; then echo "Test bt installer failed, ret=$ret"; exit $ret; fi echo "Test bt installer" && docker exec -it bt make -j -C test && bash scripts/tools/secret.sh --output test/.env && - docker exec -it bt ./test/srs-stack.test -test.v -endpoint http://srs.stack.local:80 \ + docker exec -it bt ./test/oryx.test -test.v -endpoint http://srs.stack.local:80 \ -srs-log=true -wait-ready=true -init-password=true -init-self-signed-cert=true \ -check-api-secret=true && bash scripts/tools/secret.sh --output test/.env && - docker exec -it bt ./test/srs-stack.test -test.v -wait-ready -endpoint https://srs.stack.local:443 \ + docker exec -it bt ./test/oryx.test -test.v -wait-ready -endpoint https://srs.stack.local:443 \ -srs-log=true -wait-ready=true -init-password=false -init-self-signed-cert=false \ -check-api-secret=true ret=$?; if [[ 0 -ne ${ret} ]]; then echo "Test bt installer failed, ret=$ret"; exit $ret; fi diff --git a/scripts/tools/secret.sh b/scripts/tools/secret.sh index ba646aab..0fbdae20 100644 --- a/scripts/tools/secret.sh +++ b/scripts/tools/secret.sh @@ -32,25 +32,25 @@ fi for ((i=0; i<3; i++)); do # Start by docker. - SRS_PLATFORM_SECRET=$(docker exec srs-stack redis-cli hget SRS_PLATFORM_SECRET token 2>/dev/null) - MGMT_PASSWORD=$(docker exec srs-stack bash -c '. /data/config/.env && echo $MGMT_PASSWORD' 2>/dev/null) + SRS_PLATFORM_SECRET=$(docker exec oryx redis-cli hget SRS_PLATFORM_SECRET token 2>/dev/null) + MGMT_PASSWORD=$(docker exec oryx bash -c '. /data/config/.env && echo $MGMT_PASSWORD' 2>/dev/null) # Start by script. if [[ -z $SRS_PLATFORM_SECRET ]]; then - SRS_PLATFORM_SECRET=$(docker exec script docker exec srs-stack redis-cli hget SRS_PLATFORM_SECRET token 2>/dev/null) - MGMT_PASSWORD=$(docker exec script docker exec srs-stack bash -c '. /data/config/.env && echo $MGMT_PASSWORD' 2>/dev/null) + SRS_PLATFORM_SECRET=$(docker exec script docker exec oryx redis-cli hget SRS_PLATFORM_SECRET token 2>/dev/null) + MGMT_PASSWORD=$(docker exec script docker exec oryx bash -c '. /data/config/.env && echo $MGMT_PASSWORD' 2>/dev/null) fi # Start by BT. if [[ -z $SRS_PLATFORM_SECRET ]]; then - SRS_PLATFORM_SECRET=$(docker exec bt docker exec srs-stack redis-cli hget SRS_PLATFORM_SECRET token 2>/dev/null) - MGMT_PASSWORD=$(docker exec bt docker exec srs-stack bash -c '. /data/config/.env && echo $MGMT_PASSWORD' 2>/dev/null) + SRS_PLATFORM_SECRET=$(docker exec bt docker exec oryx redis-cli hget SRS_PLATFORM_SECRET token 2>/dev/null) + MGMT_PASSWORD=$(docker exec bt docker exec oryx bash -c '. /data/config/.env && echo $MGMT_PASSWORD' 2>/dev/null) fi # Start by aaPanel. if [[ -z $SRS_PLATFORM_SECRET ]]; then - SRS_PLATFORM_SECRET=$(docker exec aapanel docker exec srs-stack redis-cli hget SRS_PLATFORM_SECRET token 2>/dev/null) - MGMT_PASSWORD=$(docker exec aapanel docker exec srs-stack bash -c '. /data/config/.env && echo $MGMT_PASSWORD' 2>/dev/null) + SRS_PLATFORM_SECRET=$(docker exec aapanel docker exec oryx redis-cli hget SRS_PLATFORM_SECRET token 2>/dev/null) + MGMT_PASSWORD=$(docker exec aapanel docker exec oryx bash -c '. /data/config/.env && echo $MGMT_PASSWORD' 2>/dev/null) fi # Start by develop. diff --git a/test/Makefile b/test/Makefile index 2dc79f3a..b029830a 100644 --- a/test/Makefile +++ b/test/Makefile @@ -2,10 +2,10 @@ default: build -build: ./srs-stack.test +build: ./oryx.test clean: - rm -f srs-stack.test + rm -f oryx.test -./srs-stack.test: *.go Makefile go.mod - go test -mod=vendor -c -o srs-stack.test . +./oryx.test: *.go Makefile go.mod + go test -mod=vendor -c -o oryx.test . diff --git a/test/main_test.go b/test/main_test.go index f41d6ade..cbdca74d 100644 --- a/test/main_test.go +++ b/test/main_test.go @@ -82,19 +82,19 @@ a=msid:Larix audio a=sendonly ` -// initPassword is used to init the password for SRS Stack. +// initPassword is used to init the password for Oryx. // -// SRS Stack requires initializing and setting up a password by default when the system is initialized. +// Oryx requires initializing and setting up a password by default when the system is initialized. // This password is utilized for logging into the system through the UI and API. Typically, for testing // purposes, we generate a random password and proceed with system initialization. However, when developing // and debugging tests for an already initialized system, there is no need to initialize a new password, // as it has already been established. var initPassword *bool -// systemPassword is the password sued by SRS Stack. +// systemPassword is the password sued by Oryx. // // Users can specify a dedicated password; if not provided, a temporary password will be created to -// initialize the SRS Stack. This password will be used to test the login feature. +// initialize the Oryx. This password will be used to test the login feature. var systemPassword *string // initSelfSignedCert is used to init the self-signed cert for HTTPS. @@ -102,12 +102,12 @@ var systemPassword *string // We should not initialize self-signed certificates by default, as this sets up SSL files for nginx, // making it impossible for BT or aaPanel to configure SSL. Therefore, we disable it by default, and users // can enable it if necessary, such as for testing the HTTPS API. It is important to note that we support -// requesting SSL certificates through BT or aaPanel, or via SRS Stack, all of which share the same -// .well-known web directory and nginx configurations. However, SRS Stack does not rely on the NGINX SSL +// requesting SSL certificates through BT or aaPanel, or via Oryx, all of which share the same +// .well-known web directory and nginx configurations. However, Oryx does not rely on the NGINX SSL // files. // // When this feature is enabled and there are no certificate files (nginx.key and nginx.crt) in the nginx -// directory, SRS Stack will create a self-signed certificate, save it to the nginx SSL file, and then +// directory, Oryx will create a self-signed certificate, save it to the nginx SSL file, and then // generate the nginx configuration in nginx.server.conf. var initSelfSignedCert *bool diff --git a/ui/public/index.html b/ui/public/index.html index be79e838..395ad0d0 100644 --- a/ui/public/index.html +++ b/ui/public/index.html @@ -8,7 +8,7 @@ - SRS Stack + Oryx