Conversation
- Document iPhone direct profiles using `make up-ready PROFILE_MODE=iphone`. - Update port table and environment variables to distinguish obfuscation vs plain modes. - Add WG_FRONTDOOR_RATE_LIMIT_PPS and clarify WG_FRONTDOOR_DISPATCH_TASK_LIMIT. - Remove incomplete comment in peer.conf and fix whitespace in Makefile.
… non-direct modes - Add `ensure_private_config_mode()` to gracefully handle chmod permission errors - Only generate direct peer config when profile mode is iphone/linux-direct - Prevent overwriting resolved config files in shim modes - Refactor Rust SessionKey to use Arc<str> to reduce cloning
- Change `WIRELESS_ALERTS_LEDGER` to store timestamps in UTC by using `CAST(SYS_EXTRACT_UTC(:NEW.DETECTED_AT) AS TIMESTAMP)`. - Make `WIRELESS_CHANNELS` primary key RELY to support reliable foreign keys. - Add deduplication logic in `record_scan_request_batch` to avoid conflicts before upsert. - Update documentation with required Oracle grants for fine-grained audit and VPD policies, noting that the baseline fails without them. - Add `.metals/` to `.gitignore`.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughChangesWireGuard profile handling
WireGuard packet datapath
PostgreSQL batch ingestion
Oracle schema contracts
Repository support
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 31b45a891d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| tokio::select! { | ||
| _ = context.shutdown.cancelled() => break, | ||
| recv = context.listen_socket.recv_from(&mut lease) => { | ||
| recv = context.listen_socket.recv_from(&mut lease[packet_start..]) => { |
There was a problem hiding this comment.
Avoid truncating shim datagrams before encoding
When obfuscation reserves any headroom (packet_start > 0, e.g. magic-byte or framed mode), this receives into a buffer that is shorter than max_datagram_bytes. A local WireGuard datagram whose size is between max_datagram_bytes - packet_start + 1 and max_datagram_bytes will be truncated by UDP receive and then encoded/forwarded as if it were complete; the old path read the full configured buffer and would reject oversized encoded packets instead of corrupting them. Use a backing buffer large enough for headroom plus the configured plaintext receive size, or read the full datagram before deciding whether to drop it.
Useful? React with 👍 / 👎.
| _ = shutdown.cancelled() => break, | ||
| _ = session.shutdown.cancelled() => break, | ||
| recv = session.upstream_socket.recv(&mut buf) => { | ||
| recv = session.upstream_socket.recv(&mut buf[packet_start..]) => { |
There was a problem hiding this comment.
Avoid truncating relay replies before encoding
For obfuscated relay replies, packet_start is nonzero, so this shrinks the receive buffer used for the internal WireGuard socket. Any kernel reply that fits the configured max_datagram_bytes but not max_datagram_bytes - packet_start is truncated by UDP receive and then sent onward as a valid encoded packet; previously it was read into the full buffer and could fail the encode size check rather than forwarding corrupted bytes. Keep the receive capacity at the plaintext maximum and reserve extra headroom in the backing storage.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/wg_shim_sections/sessions.rs (1)
380-433: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick winKeep obfuscation headroom consistent for live sessions
run_shimsizespacket_startfrom the reloaded config, while existing sessions keep their originalsession.config. If a SIGHUP changes obfuscation in a way that reduces headroom, those sessions can start dropping packets withPacketTooLarge. Either keep obfuscation out of live reloads or close/recreate sessions when that setting changes.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/wg_shim_sections/sessions.rs` around lines 380 - 433, Update run_shim and the live configuration/session lifecycle so obfuscation headroom remains consistent for existing sessions: either exclude obfuscation from reloadable configuration, or detect an obfuscation change and close/recreate affected sessions before packet processing. Ensure packet_start and each session.config.obfuscation cannot diverge after SIGHUP, preventing PacketTooLarge drops.
🧹 Nitpick comments (3)
ops/src/sslproxy_ops/commands/up_ready/model.py (1)
51-52: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
desired_obfuscation_valueis duplicated across two files with no single source of truth. Both copies were updated consistently in this PR, but future changes risk silent divergence.
ops/src/sslproxy_ops/commands/up_ready/model.py#L51-L52: Keep this as the canonical definition (it is the model module for theup_readypackage and is already imported bychecks.pyand__init__.py).ops/src/sslproxy_ops/commands/diagnose.py#L33-L34: Remove the local definition and import fromup_ready.modelinstead.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ops/src/sslproxy_ops/commands/up_ready/model.py` around lines 51 - 52, The duplicate desired_obfuscation_value definitions must have a single source of truth. Keep desired_obfuscation_value in ops/src/sslproxy_ops/commands/up_ready/model.py unchanged as the canonical implementation; in ops/src/sslproxy_ops/commands/diagnose.py, remove the local definition and import desired_obfuscation_value from up_ready.model, preserving all existing call sites and behavior.ops/tests/test_up_ready_helpers.py (1)
220-237: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCombine nested
withstatements (Ruff SIM117).🧹 Proposed fix
- with unittest.mock.patch( - "sslproxy_ops.commands.up_ready.checks.repo_root", return_value=root - ): - with self.assertRaises(UpReadyError): - discover_peer_configs(ctx) + with ( + unittest.mock.patch( + "sslproxy_ops.commands.up_ready.checks.repo_root", return_value=root + ), + self.assertRaises(UpReadyError), + ): + discover_peer_configs(ctx)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ops/tests/test_up_ready_helpers.py` around lines 220 - 237, Combine the nested context managers in test_iphone_config_discovery_refuses_obfuscated_fallback into a single with statement while preserving the temporary-directory setup, repo_root patch, and expected UpReadyError assertion.Source: Linters/SAST tools
ops/src/sslproxy_ops/commands/up_ready/__init__.py (1)
46-53: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
iphoneandlinux-shimbranches are now byte-for-byte identical.Both cases set
WG_OBFUSCATION_ENABLED="true",WG_PORT="443",WG_INTERNAL_PORT="51820", and callactivate_obfuscation_key_env_fallback(). If a future change adjusts ports/obfuscation for one profile, it's easy to forget the other since nothing ties them together syntactically.♻️ Merge the duplicate match arms
- case "iphone": - # Preserve the established shim endpoint while exposing the - # boringtun listener on the separate direct-client port. - os.environ["WG_OBFUSCATION_ENABLED"] = "true" - os.environ["WG_PORT"] = "443" - os.environ["WG_INTERNAL_PORT"] = "51820" - activate_obfuscation_key_env_fallback() - case "linux-direct": - os.environ["WG_OBFUSCATION_ENABLED"] = "false" - os.environ["WG_PORT"] = "443" - os.environ["WG_INTERNAL_PORT"] = "51820" - case "linux-shim": - os.environ["WG_OBFUSCATION_ENABLED"] = "true" - os.environ["WG_PORT"] = "443" - os.environ["WG_INTERNAL_PORT"] = "51820" - activate_obfuscation_key_env_fallback() + case "iphone" | "linux-shim": + # iPhone keeps server-side obfuscation on the shim endpoint while + # also exposing the boringtun listener on the direct-client port. + os.environ["WG_OBFUSCATION_ENABLED"] = "true" + os.environ["WG_PORT"] = "443" + os.environ["WG_INTERNAL_PORT"] = "51820" + activate_obfuscation_key_env_fallback() + case "linux-direct": + os.environ["WG_OBFUSCATION_ENABLED"] = "false" + os.environ["WG_PORT"] = "443" + os.environ["WG_INTERNAL_PORT"] = "51820"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ops/src/sslproxy_ops/commands/up_ready/__init__.py` around lines 46 - 53, Merge the identical "iphone" and "linux-shim" match arms in the command dispatch so both profiles share one branch containing the existing environment assignments and activate_obfuscation_key_env_fallback() call. Preserve the current behavior for each profile while removing the duplicated implementation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@sql/functions/054_coordinator_record_scan_request_batch_deduplicate.sql`:
- Around line 92-181: Consolidate the duplicate deduplication pipeline by making
the wireless-frame upsert consume the existing deduplicated CTE from the shared
WITH statement, using a frame_upserts CTE or equivalent and forcing its
execution from the final SELECT. Apply this restructuring in
sql/functions/054_coordinator_record_scan_request_batch_deduplicate.sql lines
92-181 and mirror the identical change in sql/postgres.source.sql lines
6147-6329; both sites must have the wireless upsert reference deduplicated
rather than independently unnesting and filtering requests.
In `@sql/oracle.sql`:
- Line 607: Update CAPTURED_AT in sql/oracle.sql at lines 607-607 to default to
UTC using SYS_EXTRACT_UTC, matching DETECTED_AT normalization; apply the same
change to sql/oracle/tables/022_wireless_alerts_ledger.sql at lines 27-27 so
both DDL definitions remain consistent.
In `@src/bin/wg-udp-frontdoor.rs`:
- Around line 1006-1012: Update the receive loop in run_listener so
socket.recv_from(&mut buf).await errors are handled locally instead of
propagated with ?. Log the receive error using the same approach as the shim
receive loop, then continue listening for subsequent packets while preserving
the existing rate-limiting and packet-processing flow.
---
Outside diff comments:
In `@src/wg_shim_sections/sessions.rs`:
- Around line 380-433: Update run_shim and the live configuration/session
lifecycle so obfuscation headroom remains consistent for existing sessions:
either exclude obfuscation from reloadable configuration, or detect an
obfuscation change and close/recreate affected sessions before packet
processing. Ensure packet_start and each session.config.obfuscation cannot
diverge after SIGHUP, preventing PacketTooLarge drops.
---
Nitpick comments:
In `@ops/src/sslproxy_ops/commands/up_ready/__init__.py`:
- Around line 46-53: Merge the identical "iphone" and "linux-shim" match arms in
the command dispatch so both profiles share one branch containing the existing
environment assignments and activate_obfuscation_key_env_fallback() call.
Preserve the current behavior for each profile while removing the duplicated
implementation.
In `@ops/src/sslproxy_ops/commands/up_ready/model.py`:
- Around line 51-52: The duplicate desired_obfuscation_value definitions must
have a single source of truth. Keep desired_obfuscation_value in
ops/src/sslproxy_ops/commands/up_ready/model.py unchanged as the canonical
implementation; in ops/src/sslproxy_ops/commands/diagnose.py, remove the local
definition and import desired_obfuscation_value from up_ready.model, preserving
all existing call sites and behavior.
In `@ops/tests/test_up_ready_helpers.py`:
- Around line 220-237: Combine the nested context managers in
test_iphone_config_discovery_refuses_obfuscated_fallback into a single with
statement while preserving the temporary-directory setup, repo_root patch, and
expected UpReadyError assertion.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9cc4d292-fcc9-4fcb-8d93-cc42f37b855f
📒 Files selected for processing (33)
.gitignoreMakefileREADME.mdconfig/templates/peer.confdocker-compose.yamldocs/runbook.mdops-memory.mdops/src/sslproxy_ops/commands/diagnose.pyops/src/sslproxy_ops/commands/up_ready/__init__.pyops/src/sslproxy_ops/commands/up_ready/checks.pyops/src/sslproxy_ops/commands/up_ready/model.pyops/src/sslproxy_ops/commands/up_ready/peers.pyops/tests/test_up_ready_helpers.pyservices/zig-coordinator/src/test/java/com/sslproxy/coordinator/oracle/OracleSchemaContractTest.javaservices/zig-coordinator/src/test/java/com/sslproxy/coordinator/service/SqlFunctionContractTest.javasql/functions/054_coordinator_record_scan_request_batch_deduplicate.sqlsql/oracle.sqlsql/oracle/tables/018_wireless_channels.sqlsql/oracle/tables/022_wireless_alerts_ledger.sqlsql/oracle/triggers/001_wireless_alerts_ledger_trg.sqlsql/postgres.source.sqlsql/postgres.sqlsrc/bin/wg-udp-frontdoor.rssrc/wg_packet_obfuscation_sections/encode_decode.rssrc/wg_packet_obfuscation_sections/types.rssrc/wg_packet_obfuscation_tests.rssrc/wg_relay_sections/runtime.rssrc/wg_relay_sections/session_io.rssrc/wg_shim_sections/config_metrics.rssrc/wg_shim_sections/runtime.rssrc/wg_shim_sections/sessions.rssrc/wg_shim_test_sections/unit.rstests/wireguard_template.rs
💤 Files with no reviewable changes (2)
- config/templates/peer.conf
- Makefile
| deduplicated as ( | ||
| select distinct on (valid.dedupe_key) valid.* | ||
| from valid | ||
| order by valid.dedupe_key, valid.input_ordinality desc | ||
| ), | ||
| upserted as ( | ||
| insert into sync_events ( | ||
| dedupe_key, | ||
| stream_name, | ||
| observed_at, | ||
| payload_ref, | ||
| payload, | ||
| payload_sha256, | ||
| status, | ||
| attempt_count, | ||
| last_error, | ||
| producer, | ||
| event_kind, | ||
| created_at, | ||
| updated_at | ||
| ) | ||
| select dedupe_key, | ||
| stream_name, | ||
| observed_at, | ||
| payload_ref, | ||
| payload, | ||
| payload_sha256, | ||
| 'pending', | ||
| 0, | ||
| null, | ||
| 'ssl-proxy', | ||
| nullif(payload->>'type', ''), | ||
| now(), | ||
| now() | ||
| from deduplicated | ||
| on conflict (dedupe_key) | ||
| do update set | ||
| observed_at = excluded.observed_at, | ||
| payload_ref = excluded.payload_ref, | ||
| payload = coalesce(excluded.payload, sync_events.payload), | ||
| payload_sha256 = excluded.payload_sha256, | ||
| producer = excluded.producer, | ||
| event_kind = coalesce(excluded.event_kind, sync_events.event_kind), | ||
| status = case | ||
| when sync_events.status in ('pending', 'failed') then 'pending' | ||
| else sync_events.status | ||
| end, | ||
| last_error = case | ||
| when sync_events.status in ('pending', 'failed') then null | ||
| else sync_events.last_error | ||
| end, | ||
| updated_at = now() | ||
| returning 1 | ||
| ) | ||
| select count(*) into v_recorded_count from upserted; | ||
|
|
||
| perform coordinator.upsert_wireless_frame_from_payload( | ||
| deduplicated.dedupe_key, | ||
| deduplicated.stream_name, | ||
| deduplicated.payload | ||
| ) | ||
| from ( | ||
| select distinct on (raw.dedupe_key) | ||
| raw.dedupe_key, | ||
| raw.stream_name, | ||
| raw.payload | ||
| from ( | ||
| select raw.request, | ||
| raw.payload, | ||
| raw.input_ordinality, | ||
| raw.request->>'stream_name' as stream_name, | ||
| raw.request->>'dedupe_key' as dedupe_key | ||
| from unnest(p_requests, p_payloads, p_payload_sha256s) | ||
| with ordinality as raw(request, payload, payload_sha256, input_ordinality) | ||
| ) raw | ||
| join ( | ||
| select distinct btrim(configured.stream_name) as stream_name | ||
| from unnest(p_stream_names) as configured(stream_name) | ||
| where btrim(configured.stream_name) <> '' | ||
| ) configured_streams on configured_streams.stream_name = raw.stream_name | ||
| left join sync_event_tombstones tombstone | ||
| on tombstone.dedupe_key = raw.dedupe_key | ||
| and tombstone.stream_name = raw.stream_name | ||
| and tombstone.expires_at > now() | ||
| where raw.dedupe_key is not null | ||
| and tombstone.dedupe_key is null | ||
| and coordinator.safe_timestamptz(raw.request->>'observed_at') is not null | ||
| order by raw.dedupe_key, raw.input_ordinality desc | ||
| ) deduplicated | ||
| where deduplicated.stream_name = 'wireless.audit'; |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift
Deduplication pipeline is implemented twice within the same function, and duplicated again in the aggregate file. The sync_events dedup (deduplicated CTE) and the wireless-frame dedup (independent subquery) recompute the identical unnest/ordinality → configured_streams → tombstone-join → safe_timestamptz pipeline separately; a future edit to one path without the other will silently desync sync_events from wireless_frames.
sql/functions/054_coordinator_record_scan_request_batch_deduplicate.sql#L92-L181: fold the wireless-frame upsert into the samewithstatement asdeduplicated/upserted(e.g. via aframe_upsertsCTE referencingdeduplicateddirectly, forced to execute via the finalselect), so both actions consume one dedup pass.sql/postgres.source.sql#L6147-L6329: apply the identical restructuring here to keep the aggregate reference in sync with the split file, per the repo's alignment requirement forsql/postgres.sql/sql/postgres.source.sql.
📍 Affects 2 files
sql/functions/054_coordinator_record_scan_request_batch_deduplicate.sql#L92-L181(this comment)sql/postgres.source.sql#L6147-L6329
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@sql/functions/054_coordinator_record_scan_request_batch_deduplicate.sql`
around lines 92 - 181, Consolidate the duplicate deduplication pipeline by
making the wireless-frame upsert consume the existing deduplicated CTE from the
shared WITH statement, using a frame_upserts CTE or equivalent and forcing its
execution from the final SELECT. Apply this restructuring in
sql/functions/054_coordinator_record_scan_request_batch_deduplicate.sql lines
92-181 and mirror the identical change in sql/postgres.source.sql lines
6147-6329; both sites must have the wireless upsert reference deduplicated
rather than independently unnesting and filtering requests.
Source: Coding guidelines
| ACKNOWLEDGED NUMBER(1,0) NOT NULL, | ||
| LEDGER_ACTION VARCHAR2(16) NOT NULL, | ||
| CAPTURED_AT TIMESTAMP WITH TIME ZONE DEFAULT (SYSTIMESTAMP AT TIME ZONE 'America/New_York') NOT NULL, | ||
| CAPTURED_AT TIMESTAMP DEFAULT (CAST(SYSTIMESTAMP AT TIME ZONE 'America/New_York' AS TIMESTAMP)) NOT NULL, |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
CAPTURED_AT default stores America/New_York local time, not UTC — inconsistent with DETECTED_AT UTC normalization. The shared root cause is the default expression CAST(SYSTIMESTAMP AT TIME ZONE 'America/New_York' AS TIMESTAMP), which converts the system timestamp to America/New_York local time and then drops the timezone, producing a naive non-UTC value. Meanwhile DETECTED_AT is stored as UTC via CAST(SYS_EXTRACT_UTC(:NEW.DETECTED_AT) AS TIMESTAMP). Two naive-TIMESTAMP columns in the same ledger table with different timezone conventions will cause incorrect cross-column comparisons and time arithmetic, and this contradicts the PR's stated goal of normalizing ledger timestamps to UTC.
sql/oracle.sql#L607-L607: Change the default toCAST(SYS_EXTRACT_UTC(SYSTIMESTAMP) AS TIMESTAMP)for UTC consistency, or document the mixed convention if America/New_York local time is intentional forCAPTURED_AT.sql/oracle/tables/022_wireless_alerts_ledger.sql#L27-L27: Apply the same default change to keep the table-file DDL aligned withsql/oracle.sql.
📍 Affects 2 files
sql/oracle.sql#L607-L607(this comment)sql/oracle/tables/022_wireless_alerts_ledger.sql#L27-L27
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@sql/oracle.sql` at line 607, Update CAPTURED_AT in sql/oracle.sql at lines
607-607 to default to UTC using SYS_EXTRACT_UTC, matching DETECTED_AT
normalization; apply the same change to
sql/oracle/tables/022_wireless_alerts_ledger.sql at lines 27-27 so both DDL
definitions remain consistent.
| loop { | ||
| let (len, client_addr) = socket.recv_from(&mut buf).await?; | ||
| let permit = match dispatch_semaphore.clone().try_acquire_owned() { | ||
| Ok(permit) => permit, | ||
| Err(_) => { | ||
| if !state.rate_limiter.allow(client_addr).await { | ||
| state.stats.record_rate_limited_drop(); | ||
| debug!(%client_addr, listener = %listener_name, "dropping rate-limited packet"); | ||
| continue; | ||
| } |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Inspect the relevant file around the cited lines.
FILE="src/bin/wg-udp-frontdoor.rs"
if [ -f "$FILE" ]; then
wc -l "$FILE"
sed -n '960,1045p' "$FILE" | cat -n
fi
# Find all recv_from usages and related error handling.
rg -n "recv_from|rate_limiter.allow|shutdown|graceful|listener" src/bin/wg-udp-frontdoor.rs src -g '!target' -g '!node_modules' || trueRepository: zlovtnik/ssl-proxy
Length of output: 50374
🏁 Script executed:
#!/bin/bash
set -euo pipefail
FILE="src/bin/wg-udp-frontdoor.rs"
if [ -f "$FILE" ]; then
wc -l "$FILE"
sed -n '960,1045p' "$FILE" | cat -n
fi
rg -n "recv_from|rate_limiter.allow|shutdown|graceful|listener" src/bin/wg-udp-frontdoor.rs src -g '!target' -g '!node_modules' || trueRepository: zlovtnik/ssl-proxy
Length of output: 50374
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Read the shim receive loop that the comment references.
sed -n '360,395p' src/wg_shim_sections/sessions.rs | cat -n
# Inspect the frontdoor listener shutdown/error handling around the caller.
sed -n '630,650p' src/bin/wg-udp-frontdoor.rs | cat -nRepository: zlovtnik/ssl-proxy
Length of output: 2635
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Inspect how listener task failures are handled by the frontdoor runtime.
sed -n '630,690p' src/bin/wg-udp-frontdoor.rs | cat -n
# Inspect the listener runner and any shutdown token usage nearby.
sed -n '950,1035p' src/bin/wg-udp-frontdoor.rs | cat -nRepository: zlovtnik/ssl-proxy
Length of output: 6452
Handle recv_from errors without taking down the frontdoor src/bin/wg-udp-frontdoor.rs:1007
socket.recv_from(&mut buf).await? bubbles out of run_listener, and the supervisor exits the whole process on any listener task failure. If this socket can hit transient errors, log and continue like the shim receive loop instead of dropping the service.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/bin/wg-udp-frontdoor.rs` around lines 1006 - 1012, Update the receive
loop in run_listener so socket.recv_from(&mut buf).await errors are handled
locally instead of propagated with ?. Log the receive error using the same
approach as the shim receive loop, then continue listening for subsequent
packets while preserving the existing rate-limiting and packet-processing flow.
…r configs - Add ensure_server_key_material() to generate server key pair when missing. - Update peer config rendering to accept server_public_key parameter and replace placeholder. - Clarify secret management docs regarding repair command behavior.
Summary by CodeRabbit