-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
885a7d5
commit 4a99432
Showing
1 changed file
with
91 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: JA4+ | ||
on: | ||
push: | ||
branches: ["main"] | ||
paths-ignore: ["*.md", "*.png", "*.svg", "LICENSE-*"] | ||
pull_request: | ||
branches: ["main"] | ||
paths-ignore: ["*.md", "*.png", "*.svg", "LICENSE-*"] | ||
merge_group: | ||
workflow_dispatch: | ||
env: | ||
CARGO_TERM_COLOR: always | ||
RUST_BACKTRACE: 1 | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref_name }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
ja4: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash | ||
env: | ||
HOST: localhost | ||
PORT: 4433 | ||
|
||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- uses: ./.github/actions/rust | ||
with: | ||
components: clippy | ||
tools: cargo-hack | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- id: nss-version | ||
run: echo "minimum=$(cat neqo-crypto/min_version.txt)" >> "$GITHUB_OUTPUT" | ||
|
||
- uses: ./.github/actions/nss | ||
with: | ||
minimum-version: ${{ steps.nss-version.outputs.minimum }} | ||
|
||
- if: runner.os == 'Linux' | ||
run: | | ||
sudo add-apt-repository ppa:wireshark-dev/stable | ||
sudo apt-get update | ||
sudo apt-get install -y --no-install-recommends tshark netcat firefox | ||
- if: runner.os == 'MacOS' | ||
run: brew install tshark netcat firefox | ||
|
||
- run: netcat localhost 12345 & | ||
- run: ps auxww | ||
|
||
- run: | | ||
cargo build --bin neqo-client | ||
PCAP="$(mktemp)" | ||
sudo tshark -i loopback -w "$PCAP" -l host "$HOST" and port "$PORT" & | ||
DUMP=$! | ||
netcat --udp -n "$HOST" "$PORT" & | ||
SERVER=$! | ||
target/debug/neqo-client "https://$HOST:$PORT/$SIZE" | ||
kill $SERVER $DUMP | ||
tshark -r "$PCAP" | ||
read -r JA4 <<<"$(tshark -n -r "$PCAP" -T fields -e tls.handshake.ja4)" | ||
echo "$JA4" | ||
echo "H3_JA4=$JA4" >> "$GITHUB_ENV" | ||
env: | ||
HOST: localhost | ||
PORT: 4433 | ||
- run: | | ||
PCAP="$(mktemp)" | ||
sudo tshark -i loopback -w "$PCAP" -l host "$HOST" and port "$PORT" & | ||
DUMP=$! | ||
netcat --tcp -n "$HOST" "$PORT" & | ||
SERVER=$! | ||
firefox --headless "https://$HOST:$PORT/$SIZE" | ||
kill $SERVER $DUMP | ||
tshark -r "$PCAP" | ||
read -r JA4 <<<"$(tshark -n -r "$PCAP" -T fields -e tls.handshake.ja4)" | ||
echo "$JA4" | ||
echo "H2_JA4=$JA4" >> "$GITHUB_ENV" |