feat(client): implement alknet-client crate — AlknetClient, dial methods, error type, SOCKS5 proxy

- Initialize alknet-client crate with Cargo.toml, deps, feature flags
- Implement ClientDialError enum with 5 variants (TlsConfig, Connect, Handshake, NoTransport, Proxy)
- Implement AlknetClient struct with builder methods (with_quinn, with_tcp_tls, with_iroh, with_socks5_proxy)
- Implement dial_quic — QUIC dial via quinn, producing a Connection
- Implement dial_tcp_tls — TCP+TLS dial via tokio-rustls, producing a Connection
- Implement dial_iroh — iroh dial, producing a Connection
- Implement SOCKS5 proxy support — Socks5ProxyConfig, Socks5Credentials, Socks5UdpSocket, proxy integration
- Add into_rustls_config() to TlsClientConfig in alknet-tls
- Add alknet-client to workspace members

Tasks: client/crate-init, client/error-type, client/client-core,
client/dial-quic, client/dial-tcp-tls, client/dial-iroh, client/socks5-proxy
This commit is contained in:
deepseek-v4-pro committed 2026-07-17 12:42:47 +00:00
1 parent b476182d64
commit 82ee37e206
12 files changed
+1013 -8

No files matched your search

Generated
+51 -8
View File
@@ -68,6 +68,24 @@ dependencies = [
"uuid",
]
[[package]]
name = "alknet-client"
version = "0.1.0"
dependencies = [
"alknet-core",
"alknet-tls",
"fast-socks5",
"hex",
"iroh",
"quinn",
"rustls",
"rustls-pki-types",
"thiserror 2.0.18",
"tokio",
"tokio-rustls",
"tracing",
]
[[package]]
name = "alknet-core"
version = "0.1.0"
@@ -1296,6 +1314,21 @@ dependencies = [
"pin-project-lite",
]
[[package]]
name = "fast-socks5"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9545787d8304a71e1bf1b711705070a4c400cce9b332c4a11800627b7c9a2067"
dependencies = [
"anyhow",
"async-trait",
"log",
"socket2 0.5.10",
"thiserror 1.0.69",
"tokio",
"tokio-stream",
]
[[package]]
name = "fastbloom"
version = "0.14.1"
@@ -1834,7 +1867,7 @@ dependencies = [
"libc",
"percent-encoding",
"pin-project-lite",
"socket2",
"socket2 0.6.4",
"tokio",
"tower-service",
"tracing",
@@ -2006,7 +2039,7 @@ version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d40460c0ce33d6ce4b0630ad68ff63d6661961c48b6dba35e5a4d81cfb48222"
dependencies = [
"socket2",
"socket2 0.6.4",
"widestring",
"windows-registry",
"windows-result",
@@ -2595,7 +2628,7 @@ dependencies = [
"objc2-system-configuration",
"pin-project-lite",
"serde",
"socket2",
"socket2 0.6.4",
"time",
"tokio",
"tokio-util",
@@ -2642,7 +2675,7 @@ dependencies = [
"pin-project-lite",
"rustc-hash",
"rustls",
"socket2",
"socket2 0.6.4",
"thiserror 2.0.18",
"tokio",
"tokio-stream",
@@ -2685,7 +2718,7 @@ checksum = "3137a52df66c20090a889828d1c655f21f52294cba64e5c4fbb04fc83eee7c8e"
dependencies = [
"cfg_aliases 0.2.1",
"libc",
"socket2",
"socket2 0.6.4",
"tracing",
"windows-sys 0.61.2",
]
@@ -3213,7 +3246,7 @@ dependencies = [
"quinn-udp",
"rustc-hash",
"rustls",
"socket2",
"socket2 0.6.4",
"thiserror 2.0.18",
"tokio",
"tracing",
@@ -3253,7 +3286,7 @@ dependencies = [
"cfg_aliases 0.2.1",
"libc",
"once_cell",
"socket2",
"socket2 0.6.4",
"tracing",
"windows-sys 0.60.2",
]
@@ -4093,6 +4126,16 @@ version = "1.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90"
[[package]]
name = "socket2"
version = "0.5.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678"
dependencies = [
"libc",
"windows-sys 0.52.0",
]
[[package]]
name = "socket2"
version = "0.6.4"
@@ -4388,7 +4431,7 @@ dependencies = [
"parking_lot",
"pin-project-lite",
"signal-hook-registry",
"socket2",
"socket2 0.6.4",
"tokio-macros",
"windows-sys 0.61.2",
]