The `composed` feature's ASSOCIATE egress (ADR-008's composed variant, ADR-009's gate): `composed::direct_egress` — each destination dials through an alktunnels 0.2.0 direct-op channel (`TunnelSession::open_direct`, `Substrate::Udp`), per-target ACL for free, the POC #2 `ComposedEgress` shape ported to the landed seam types. - `Cargo.toml` — `composed = ["dep:alktunnels"]` (alktunnels pinned "0.2.0"; rides `composed` alone, `cargo tree --edges normal` spot-checked); dev-dep for the composed suite. - `src/composed/mod.rs` — the lazy destination→tunnel table (LRU-capped, `DEFAULT_MAX_TUNNELS` = 256), per-tunnel relay tasks draining a shared inbound queue, `SessionOwner` (the owner wrapper shared with the composed accept — the batch-1 review's Sync-bound wrinkle), the readiness contract (real async park; ended relays → association-end `Err`, never a hot `Ok(None)`), framing-once, domain pass-through unresolved (ADR-012), the backpressure bound documented on the constructor. - Two deliberate deviations from the POC shape, documented in the task's Notes: the closed-queue condition is a live-relay count (the egress holds its own `Sender`, so the POC's queue-close arm was unreachable through this surface); the tunnel codec is alktunnels' (`[len]` + payload), not the RFC-framed reader. - `tests/composed-egress.rs` — round-trips per destination → one tunnel each, table reuse, LRU eviction/re-dial, the readiness park, the closed-relay-set `Err`, framing-once through the wire layer, domain pass-through — over a `wire_tunnel_direct` harness topology (the consumer-side shape with the direct op on the producer's serving registry). Verification: `cargo test` + `--all-features` pass (13 suites); `cargo check --features composed --target wasm32-unknown-unknown` clean (the hard gate); clippy `--all-targets --all-features -- -D warnings` clean; `cargo fmt --check` clean; `cargo doc --no-deps` clean.
51 lines
2.2 KiB
TOML
51 lines
2.2 KiB
TOML
[package]
|
|
name = "alksocks"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
rust-version = "1.88"
|
|
license = "MIT OR Apache-2.0"
|
|
description = "SOCKS5 (RFC 1928) proxy protocol over alkcall channels: targeted-forked fast-socks5 typestate core plus producer/consumer sessions. Producer/consumer protocol crate."
|
|
repository = "https://git.alk.dev/alkdev/alksocks"
|
|
keywords = ["socks5", "proxy", "rfc1928", "channels", "alkcall"]
|
|
categories = ["network-programming", "asynchronous"]
|
|
exclude = [".opencode/", "AGENTS.md", "docs/reviews/", "docs/research/", "docs/plans/", "tasks/", "docs/sdd_process.md"]
|
|
|
|
[lib]
|
|
name = "alksocks"
|
|
|
|
[features]
|
|
# Declared empty by design (ADR-009): `local` adds tokio/net when its
|
|
# modules land, `composed` adds the alktunnels dep. The default build
|
|
# is protocol-only and wasm-clean by construction.
|
|
default = []
|
|
local = ["tokio/net"]
|
|
composed = ["dep:alktunnels"]
|
|
|
|
[dependencies]
|
|
# The substrate (convention 11): pinned, bump deliberately, never
|
|
# transitively. First consumption of the 0.8.0 surface.
|
|
alkcall = "0.8.0"
|
|
tokio = { version = "1", default-features = false, features = ["rt", "sync", "io-util", "macros", "time"] }
|
|
# The fork's declared logging seam (rfc1928.md: upstream `log` calls
|
|
# were dropped or re-pointed here); no source file references it yet —
|
|
# the first consumer is expected to be the producer layer's
|
|
# diagnostics (review 001 N-2).
|
|
tracing = "0.1"
|
|
thiserror = "2"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
bytes = "1"
|
|
futures = { version = "0.3", default-features = false, features = ["std"] }
|
|
# The sibling crate (the composed egress's direct-op vehicle — ADR-008/
|
|
# ADR-009): rides `composed` alone. Pinned; bump deliberately
|
|
# (convention 11's deliberate-bump rule applies to siblings too).
|
|
alktunnels = { version = "0.2.0", optional = true }
|
|
|
|
[dev-dependencies]
|
|
tokio = { version = "1", features = ["full", "test-util", "macros"] }
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
# The composed suite's topology (the alktunnels direct-op producer) —
|
|
# dev-only: the test binary gates itself on the `composed` feature
|
|
# (`#![cfg(feature = "composed")]`), the dev-dep keeps it compiling.
|
|
alktunnels = "0.2.0"
|