Skip to content

Commit 1a1866a

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 1a1866a

10 files changed

Lines changed: 709 additions & 262 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: 8 additions & 3 deletions
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 }}
@@ -123,7 +125,9 @@ jobs:
123125
uses: actions/upload-artifact@v4
124126
with:
125127
name: deb+${{ matrix.platform.target }}
126-
path: "target/${{matrix.platform.target}}/debian/*.deb"
128+
path: |
129+
target/${{matrix.platform.target}}/debian/*.deb
130+
target/debian/*.deb
127131
if: matrix.const.as_r && contains(matrix.platform.target, 'linux')
128132

129133
# build rpm
@@ -169,11 +173,12 @@ jobs:
169173
if: matrix.const.is_t
170174
# publish tar + deb + rpm
171175
- name: Publish GitHub release artifacts
172-
uses: softprops/action-gh-release@v1
176+
uses: softprops/action-gh-release@v3
173177
with:
174178
draft: true
175179
files: |
176180
quicssh-*
177181
target/${{ matrix.platform.target }}/debian/*.deb
178182
target/${{ matrix.platform.target }}/generate-rpm/*.rpm
183+
target/debian/*.deb
179184
if: matrix.const.is_r && matrix.const.toolchain == 'stable'

.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)