Skip to content

Commit 22a5994

Browse files
committed
Add test to check relaying
1 parent deaef9c commit 22a5994

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,12 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v2
11-
- run: docker build .
11+
- name: Build container
12+
run: |
13+
git_hash=$(git rev-parse --short "$GITHUB_SHA")
14+
docker build . -t quay.io/wire/restund:$git_hash
15+
docker run --network=host --volume $(pwd)/etc/restund.conf:/etc/restund.conf:ro --volume $(pwd)/etc/restund.auth:/etc/restund.auth quay.io/wire/restund:$git_hash &
16+
- name: Test if relaying localhost and friends is blocked
17+
run: |
18+
sudo apt-get update && sudo apt-get install -y coturn
19+
./test.sh

test.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
set -x
3+
! turnutils_uclient 127.0.0.1 -X -u demo -w secret -e 127.0.0.1 || exit 1
4+
! turnutils_uclient 127.0.0.1 -X -u demo -w secret -e 127.0.0.2 || exit 1
5+
! turnutils_uclient 127.0.0.1 -X -u demo -w secret -e 255.255.255.255 || exit 1
6+
! turnutils_uclient 127.0.0.1 -X -u demo -w secret -e 169.254.0.1 || exit 1
7+
! turnutils_uclient 127.0.0.1 -X -u demo -w secret -e 0.0.0.0 || exit 1
8+
! turnutils_uclient 127.0.0.1 -X -u demo -w secret -e "::1" || exit 1
9+
! turnutils_uclient 127.0.0.1 -X -u demo -w secret -e "::" || exit 1
10+
! turnutils_uclient 127.0.0.1 -X -u demo -w secret -e "fe80::" || exit 1
11+
12+

0 commit comments

Comments
 (0)