Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

SOCKS proxy with tun2proxy | tun2socks fails with Connection refused (os error 111)

未关闭
#4 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
docker, go
领域
networking

调研方向

使用 urnetwork proxy、tun2proxy container 和 Alpine container 重现该设置,然后从 tun2proxy/tun2socks 的 UDP DNS 处理开始。将失败的 DNS 路径与正常工作的 Firefox SOCKS5 路径进行比较,并检查报告的连接被拒绝行为。当附加容器中的 DNS 查询和 TCP 连接能够通过 SOCKS5 代理成功路由时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Summary

When passing a working SOCKS5 proxy (from urnetwork) into tun2proxy or tun2socks, all outbound DNS requests fail with Connection refused (os error 111). The same proxy works fine when tested directly in Firefox.

Steps to Reproduce
1.) Start the urnetwork proxy:

go run . --user-auth <redacted> --password <redacted> --country "United States"

2.) Verify proxy works in Firefox:
Configure Firefox to use 127.0.0.1:9999 as SOCKS5 proxy
Browsing works as expected

3.) Run tun2proxy container:

docker run -it --rm --name tun2proxy --privileged \
  ghcr.io/tun2proxy/tun2proxy-ubuntu:latest \
  --proxy socks5://127.0.0.1:9999

4.) Connect another container through it:

docker run -it --rm --network=container:tun2proxy alpine sh

5.) Inside the Alpine container:

apk update

Actual Behavior

  • Package fetch fails with DNS resolution errors:
WARNING: updating and opening https://dl-cdn.alpinelinux.org/... temporary error (try again later)
  • tun2proxy logs show repeated UDP DNS attempts ending in connection refused:
[INFO  tun2proxy] Beginning #0 UDP 10.0.0.33:46259 -> 8.8.8.8:53
[INFO  tun2proxy] Ending   #0 UDP 10.0.0.33:46259 -> 8.8.8.8:53 with "Connection refused (os error 111)"
  • No corresponding traffic appears in the urnetwork proxy logs.

Expected Behavior

  • DNS queries and TCP connections should be tunneled through the SOCKS5 proxy, allowing the Alpine container to resolve and fetch packages.

Notes

  • Direct SOCKS5 usage in Firefox works fine → proxy itself is healthy.
  • Failure only occurs when traffic is routed through tun2proxy / tun2socks.
  • Issue seems specific to UDP (DNS) handling.
主要语言
Go
星标
10
派生
10
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

urnetwork/proxy 的其他 Issue

查看 urnetwork/proxy 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。