feat: add proxy utility (#288)

Signed-off-by: Harry Li <harrymingh@gmail.com>
Co-authored-by: Dmitry Kovba <dkovba@apple.com>
This commit is contained in:
Harry Li
2025-09-12 11:23:41 -07:00
committed by GitHub
co-authored by Dmitry Kovba
parent 31bfef4a8e
commit 5fbae0e590
10 changed files with 182 additions and 16 deletions
@@ -267,7 +267,6 @@ extension SocketRelay {
)
}
// `buf1` isn't used concurrently.
nonisolated(unsafe) let buf1 = UnsafeMutableBufferPointer<UInt8>.allocate(capacity: Int(getpagesize()))
connSource.setEventHandler {
Self.fdCopyHandler(
@@ -279,7 +278,6 @@ extension SocketRelay {
}
nonisolated(unsafe) let buf2 = UnsafeMutableBufferPointer<UInt8>.allocate(capacity: Int(getpagesize()))
// `buf2` isn't used concurrently.
vsockConnectionSource.setEventHandler {
Self.fdCopyHandler(
buffer: buf2,