Skip to content

feat: add dynamic SOCKS5 forwarding API#154

Merged
vicajilau merged 4 commits intomasterfrom
feat/dynamic-forward-socks5
Mar 26, 2026
Merged

feat: add dynamic SOCKS5 forwarding API#154
vicajilau merged 4 commits intomasterfrom
feat/dynamic-forward-socks5

Conversation

@vicajilau
Copy link
Copy Markdown
Collaborator

Summary

  • add SSHClient.forwardDynamic(...) to provide local dynamic forwarding (ssh -D style)
  • implement SOCKS5 server support for NO AUTH + CONNECT over existing SSH forwarding channels
  • add configurable hardening options via SSHDynamicForwardOptions:
    • handshakeTimeout
    • connectTimeout
    • maxConnections
  • add public dynamic forwarding types in forwarding API surface
  • add platform split implementation (dart:io implementation + unsupported stub for non-io platforms)
  • add runnable example: example/forward_dynamic.dart
  • document usage and quick curl verification in README
  • add changelog entry for dynamic forwarding

Notes

  • Scope intentionally limited to SOCKS5 NO AUTH + CONNECT for MVP.
  • Not available on web runtimes without dart:io.

Validation

  • dart analyze
  • test suite passed (189 passed, 0 failed)

Refs #30

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 25, 2026

Codecov Report

❌ Patch coverage is 96.87500% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.41%. Comparing base (c310497) to head (080d6d4).
⚠️ Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
lib/src/dynamic_forward_io.dart 96.71% 5 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #154      +/-   ##
==========================================
+ Coverage   46.10%   48.41%   +2.30%     
==========================================
  Files          61       63       +2     
  Lines        4880     5040     +160     
==========================================
+ Hits         2250     2440     +190     
+ Misses       2630     2600      -30     
Flag Coverage Δ
unittests 48.41% <96.87%> (+2.30%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
lib/src/dynamic_forward.dart 100.00% <100.00%> (ø)
lib/src/ssh_client.dart 17.66% <100.00%> (+3.54%) ⬆️
lib/src/ssh_forward.dart 72.22% <100.00%> (+72.22%) ⬆️
lib/src/dynamic_forward_io.dart 96.71% <96.71%> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vicajilau vicajilau merged commit a2f57cf into master Mar 26, 2026
3 checks passed
@vicajilau vicajilau deleted the feat/dynamic-forward-socks5 branch March 26, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant