Skip to content

feat(socks5): expose proxy-connect failure stage on uvcpp_ws_client #54

Closed

Description

@Antruly

背景

PR #42 给 uvcpp_tcp_client 和 uvcpp_http_client 增加了 socks5_proxy_connect_failed(),用于区分“连代理失败”与“代理拒绝目标”。uvcpp_ws_client 也支持 SOCKS5(src/web/uvcpp_ws_client.h:85),但只转发了 socks5_last_error(),没有对应阶段查询。

uvscope 的 WebSocket 后端代理模式会复用 ws client,需要同样的错误分类。

建议

在 uvcpp_ws_client 上增加只读转发:

bool socks5_proxy_connect_failed() const;

实现直接转发内部 uvcpp_tcp_client 的同名方法,语义与 PR #42 一致。

验收

  • 代理端口关闭时返回 true;
  • 代理已应答但认证失败/目标拒绝时返回 false;
  • 与 tcp/http client 的分类结果一致。

改动很小,建议随 1.8.2 一起。

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions