mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-04 03:42:44 +08:00
feat: 支持 turn 中转,可以远程访问 h264/webrtc #197
This commit is contained in:
25
.github/workflows/build_img.yaml
vendored
25
.github/workflows/build_img.yaml
vendored
@@ -50,6 +50,29 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Inject TURN config (optional)
|
||||
if: ${{ env.TURN_HOST != '' }}
|
||||
run: |
|
||||
mkdir -p configs/kvmd/override.d
|
||||
cat > configs/kvmd/override.d/turn.yaml <<EOF
|
||||
janus:
|
||||
stun:
|
||||
host: ${TURN_HOST}
|
||||
port: ${TURN_PORT}
|
||||
local_ice_servers:
|
||||
- urls:
|
||||
- "stun:${TURN_HOST}:${TURN_PORT}"
|
||||
- "turn:${TURN_HOST}:${TURN_PORT}?transport=udp"
|
||||
- "turn:${TURN_HOST}:${TURN_PORT}?transport=tcp"
|
||||
username: "${TURN_USER}"
|
||||
credential: "${TURN_PASS}"
|
||||
EOF
|
||||
env:
|
||||
TURN_HOST: ${{ secrets.TURN_HOST }}
|
||||
TURN_PORT: ${{ secrets.TURN_PORT }}
|
||||
TURN_USER: ${{ secrets.TURN_USER }}
|
||||
TURN_PASS: ${{ secrets.TURN_PASS }}
|
||||
|
||||
- name: Set build environment
|
||||
id: build_env
|
||||
shell: bash
|
||||
@@ -184,4 +207,4 @@ jobs:
|
||||
if [ "${{ github.event.inputs.create_release }}" = "true" ]; then
|
||||
echo "| **Release** | [${{ env.RELEASE_TAG }}](${{ steps.release.outputs.url }}) |" >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user