-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from c410-f3r/misc
Add support for compression
- Loading branch information
Showing
97 changed files
with
7,371 additions
and
3,680 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,39 +6,58 @@ on: | |
- main | ||
|
||
jobs: | ||
autobahn: | ||
autobahn-fuzzingclient: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
override: true | ||
profile: minimal | ||
toolchain: nightly-2023-08-01 | ||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- run: .scripts/autobahn.sh ci | ||
|
||
# fuzz: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - uses: actions-rs/toolchain@v1 | ||
# with: | ||
# override: true | ||
# profile: minimal | ||
# toolchain: nightly-2023-08-01 | ||
# - uses: actions-rs/[email protected] | ||
# with: | ||
# crate: cargo-fuzz | ||
# use-tool-cache: true | ||
# | ||
# - run: .scripts/fuzz.sh | ||
- run: .scripts/autobahn-fuzzingclient.sh ci | ||
strategy: | ||
fail-fast: true | ||
|
||
autobahn-fuzzingserver: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
override: true | ||
profile: minimal | ||
toolchain: nightly-2023-08-01 | ||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- run: .scripts/autobahn-fuzzingserver.sh ci | ||
strategy: | ||
fail-fast: true | ||
|
||
fuzz: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
override: true | ||
profile: minimal | ||
toolchain: nightly-2023-08-01 | ||
- uses: actions-rs/[email protected] | ||
with: | ||
crate: cargo-fuzz | ||
use-tool-cache: true | ||
|
||
- run: .scripts/fuzz.sh | ||
strategy: | ||
fail-fast: true | ||
|
||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
components: clippy, rustfmt | ||
|
@@ -47,4 +66,6 @@ jobs: | |
toolchain: nightly-2023-08-01 | ||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- run: .scripts/wtx.sh | ||
- run: .scripts/internal-tests.sh | ||
strategy: | ||
fail-fast: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
.vscode | ||
**/*.rs.bk | ||
**/artifacts | ||
**/Cargo.lock | ||
**/corpus | ||
**/target | ||
**/target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
set -euxo pipefail | ||
|
||
ARG=${1:-""} | ||
if [ "$ARG" != "ci" ]; then | ||
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT | ||
fi; | ||
|
||
## fuzzingclient | ||
|
||
RUSTFLAGS='-C target-cpu=native' cargo build --bin autobahn-server --features flate2,tokio,web-socket-handshake --release | ||
RUSTFLAGS='-C target-cpu=native' cargo run --bin autobahn-server --features flate2,tokio,web-socket-handshake --release & cargo_pid=$! | ||
mkdir -p .scripts/autobahn/reports/fuzzingclient | ||
podman run \ | ||
-v .scripts/autobahn/fuzzingclient-min.json:/fuzzingclient.json:ro \ | ||
-v .scripts/autobahn:/autobahn \ | ||
--name fuzzingclient \ | ||
--net=host \ | ||
--rm \ | ||
docker.io/crossbario/autobahn-testsuite:0.8.2 wstest -m fuzzingclient -s fuzzingclient.json | ||
podman rm --force --ignore fuzzingclient | ||
kill -9 $cargo_pid | ||
|
||
if [ $(grep -ci "failed" .scripts/autobahn/reports/fuzzingclient/index.json) -gt 0 ] | ||
then | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
set -euxo pipefail | ||
|
||
ARG=${1:-""} | ||
if [ "$ARG" != "ci" ]; then | ||
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT | ||
fi; | ||
|
||
RUSTFLAGS='-C target-cpu=native' cargo build --bin autobahn-client --features flate2,tokio,web-socket-handshake --release | ||
mkdir -p .scripts/autobahn/reports/fuzzingserver | ||
podman run \ | ||
-d \ | ||
-p 9080:9080 \ | ||
-v .scripts/autobahn/fuzzingserver-min.json:/fuzzingserver.json:ro \ | ||
-v .scripts/autobahn:/autobahn \ | ||
--name fuzzingserver \ | ||
--net=host \ | ||
docker.io/crossbario/autobahn-testsuite:0.8.2 wstest -m fuzzingserver -s fuzzingserver.json | ||
sleep 5 | ||
RUSTFLAGS='-C target-cpu=native' cargo run --bin autobahn-client --features flate2,tokio,web-socket-handshake --release -- 127.0.0.1:9080 | ||
podman rm --force --ignore fuzzingserver | ||
|
||
if [ $(grep -ci "failed" .scripts/autobahn/reports/fuzzingserver/index.json) -gt 0 ] | ||
then | ||
exit 1 | ||
fi |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"cases": [ | ||
"1.*", | ||
"2.*", | ||
"3.*", | ||
"4.*", | ||
"5.*", | ||
"6.*", | ||
"7.*", | ||
"8.*", | ||
"9.*", | ||
"10.*", | ||
"12.1.1", | ||
"12.2.1", | ||
"12.3.1", | ||
"12.4.1", | ||
"12.5.1", | ||
"13.1.1", | ||
"13.2.1", | ||
"13.3.1", | ||
"13.4.1", | ||
"13.5.1", | ||
"13.6.1", | ||
"13.7.1" | ||
], | ||
"exclude-agent-cases": {}, | ||
"exclude-cases": [], | ||
"outdir": "/autobahn/reports/fuzzingclient", | ||
"servers": [ | ||
{ | ||
"agent": "wtx", | ||
"url": "ws://127.0.0.1:8080" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"cases": [ | ||
"1.*", | ||
"2.*", | ||
"3.*", | ||
"4.*", | ||
"5.*", | ||
"6.*", | ||
"7.*", | ||
"8.*", | ||
"9.*", | ||
"10.*", | ||
"12.1.1", | ||
"12.2.1", | ||
"12.3.1", | ||
"12.4.1", | ||
"12.5.1", | ||
"13.1.1", | ||
"13.2.1", | ||
"13.3.1", | ||
"13.4.1", | ||
"13.5.1", | ||
"13.6.1", | ||
"13.7.1" | ||
], | ||
"exclude-agent-cases": {}, | ||
"exclude-cases": [], | ||
"outdir": "/autobahn/reports/fuzzingserver", | ||
"url": "ws://127.0.0.1:9080" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# https://stackoverflow.com/questions/76049656/unexpected-notvalidforname-with-rusts-tonic-with-tls | ||
|
||
openssl req -newkey rsa:2048 -nodes -subj "/C=FI/CN=vahid" -keyout key.pem -out key.csr | ||
openssl x509 -signkey key.pem -in key.csr -req -days 365 -out cert.pem | ||
openssl req -x509 -sha256 -nodes -subj "/C=FI/CN=vahid" -days 1825 -newkey rsa:2048 -keyout root-ca.key -out root-ca.crt | ||
cat <<'EOF' >> localhost.ext | ||
authorityKeyIdentifier=keyid,issuer | ||
basicConstraints=CA:FALSE | ||
subjectAltName = @alt_names | ||
[alt_names] | ||
DNS.1 = server | ||
IP.1 = 127.0.0.1 | ||
EOF | ||
openssl x509 -req -CA root-ca.crt -CAkey root-ca.key -in key.csr -out cert.pem -days 365 -CAcreateserial -extfile localhost.ext | ||
rm localhost.ext | ||
rm key.csr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.