[test] websocket should be determined in runtime.

This commit is contained in:
YinMo19
2025-04-23 09:00:29 +08:00
parent b1dd3bb9c8
commit 4ff800a8be
2 changed files with 4 additions and 11 deletions

View File

@@ -116,11 +116,7 @@ pub async fn connect_tcp_local<
) -> ResultType<Stream> {
let target_str = target.to_string();
// if target_str.starts_with("ws://") || target_str.starts_with("wss://") {
// Ok(Stream::WebSocket(
// websocket::WsFramedStream::new(target_str, local, None, ms_timeout).await?,
// ))
if true {
if target_str.starts_with("ws://") || target_str.starts_with("wss://") {
Ok(Stream::WebSocket(
websocket::WsFramedStream::new(target_str, local, None, ms_timeout).await?,
))