You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 68760ef
Browse filesBrowse the repository at this point in the historyBrowse files
Release as 2.0.0 and document migration to managed I/O, teardown, and
TLS. Remove close-time flush retries for operations that callers can no
longer start outside the wrapper. Tests use the wrapper APIs instead of
the removed getter.
BREAKING CHANGE: remove SOCKSSocket.socket; use the wrapper APIs and
built-in TLS instead.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
-
## Unreleased
1
+
## 2.0.0
2
2
3
+
-**Breaking:** Remove `SOCKSSocket.socket` so transport operations cannot bypass the wrapper's write queue and lifecycle tracking. Use `destroy()`, `close()`, `write()`, `outputStream`, and `inputStream` instead.
4
+
-**Breaking:** Caller-managed TLS through `SecureSocket.secure(socks.socket)` is no longer supported. Use `SOCKSSocket.create(sslEnabled: true, securityContext: ...)` to negotiate TLS during `connectTo()`.
3
5
- Add `destroy()` to abort without draining output; writes it cuts short fail instead of reporting success (#2). It also ends a connect, TLS handshake or `reconnect()` in flight, and a later `close()` completes normally even when it failed a close that was already draining.
4
6
- Add `closeOnPeerEof` to `create()`; pass `false` to keep writing after the peer half-closes (#3).
5
7
-`close()` now ends a `reconnect()` or TLS handshake in flight instead of being overtaken by the reconnect or waiting for the handshake deadline.
Copy file name to clipboardExpand all lines: README.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,6 +97,25 @@ By default the connection closes once the peer closes its side. Pass `closeOnPee
97
97
98
98
`destroy()` aborts a connection without draining output; pending writes fail, and a connect, TLS handshake or `reconnect()` in flight ends with `SocksCancelledException`. Use `close()` to drain accepted output before closing; it ends a connect or `reconnect()` in flight the same way.
99
99
100
+
## Migrating to 2.0.0
101
+
102
+
`SOCKSSocket.socket` has been removed. All transport operations now go through the wrapper so writes and teardown share the same lifecycle tracking.
| Reading the underlying socket |`socks.inputStream` or `socks.listen(...)`|
111
+
|`SecureSocket.secure(socks.socket, ...)`| Set `sslEnabled: true` and, if needed, `securityContext` on `SOCKSSocket.create(...)`|
112
+
113
+
For an awaited binary write, use `await socks.outputStream.addStream(Stream.value(bytes))`. The output sink accepts one stream at a time. For text, use `await socks.write(text)`. To drain and finish the connection, use `await socks.close()`.
114
+
115
+
Built-in TLS starts during `connectTo()`, after the SOCKS handshake. Upgrading an established plaintext application session to TLS is not exposed by `SOCKSSocket`.
116
+
117
+
`SocksConnection.start` still returns a `ConnectionTask<Socket>` for `HttpClient.connectionFactory`; that separate API is unchanged.
118
+
100
119
## HttpClient Connections
101
120
102
121
`SocksConnection.start` returns a cancellable `ConnectionTask<Socket>` for `HttpClient.connectionFactory`; see `example/http/http_connection.dart`. Pass `tlsHost` for HTTPS. Requires Dart 3.5.
0 commit comments