Skip to content

Commit e8ac553

Browse files
committed
v0.2.0: silent-drop handshake authentication
Adds optional ALPN-based handshake authentication: when QUICSSH_AUTH_SECRET is set on both client and server, the client embeds an HMAC-SHA256 token (keyed by the secret and a 30s time window) in the TLS ALPN extension of its Initial packet, and the server inspects each incoming Initial's ClientHello before any response goes on the wire. Unauthenticated connection attempts are silently dropped at the UDP layer — the port appears closed to scanners. Verified by packet capture: zero response packets are sent to clients presenting a wrong or missing token; matching clients see a normal QUIC handshake. Tolerates ±30s clock skew between client and server. Implementation notes: - Bumps quinn 0.10 → 0.11, rustls 0.21 → 0.23, rcgen 0.12 → 0.13. - Uses quinn::Incoming::ignore() for the silent-drop path. ClientHello inspection relies on Incoming::handshake_bytes(), added in a small patch to quinn vendored at vendor/quinn (submodule on the aiguy110/quinn fork; upstream PR quinn-rs/quinn#2644). - Server rotates the valid token set every WINDOW_SECS/2 to keep the current ±1 windows accepted at all times. - When QUICSSH_AUTH_SECRET is unset, behaviour is identical to v0.1.x: no authentication, any client can connect.
1 parent 7b7222a commit e8ac553

10 files changed

Lines changed: 704 additions & 260 deletions

File tree

.github/workflows/lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v4
10+
with:
11+
submodules: recursive
1012
- name: Install latest nightly
1113
uses: actions-rs/toolchain@v1
1214
with:

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ jobs:
8585
steps:
8686
# checkout
8787
- uses: actions/checkout@v4
88+
with:
89+
submodules: recursive
8890

8991
# build raw
9092
- name: Cache cargo & target directories
@@ -93,7 +95,7 @@ jobs:
9395
run: sudo apt-get update --yes && sudo apt-get install --yes musl-tools
9496
if: contains(matrix.platform.target, 'musl')
9597
- name: Build binary
96-
uses: houseabsolute/actions-rust-cross@v0
98+
uses: houseabsolute/actions-rust-cross@v1
9799
with:
98100
command: "build"
99101
target: ${{ matrix.platform.target }}

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "vendor/quinn"]
2+
path = vendor/quinn
3+
url = https://github.com/aiguy110/quinn.git

0 commit comments

Comments
 (0)