功能请求:支持 FreeBSD TUN 设备
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- go
- Domain
- networking, operating-systems
Research direction
No files, tests, or entry points are named. Begin by comparing the existing Linux, macOS, and Windows TUN support with FreeBSD's TUN/TAP device and network-stack requirements. Done means FreeBSD can provide native TUN mode with system-level traffic interception and routing comparable to the supported platforms.
Written by the indexing model from the issue text.
Description
您遇到的问题与哪个功能请求相关?请描述一下。
目前,sing-box 在 Linux、macOS 和 Windows 上提供了强大的 TUN 模式功能,实现了系统级的流量拦截和路由。然而,对于功能强大且轻量级的类 Unix 操作系统 FreeBSD,sing-box 却缺少对其 TUN 模式的支持。这意味着 FreeBSD 用户无法利用 sing-box 的 TUN 模式实现系统级代理、流量管理或高级网络功能,这限制了 sing-box 在更广泛的 Unix 生态系统中的应用。
您希望实现的解决方案是什么?
我建议为 sing-box 添加 FreeBSD TUN 设备支持。这将需要实现 FreeBSD TUN/TAP 设备架构所需的内核级交互和网络栈配置。
您是否考虑过其他替代方案?
虽然可以通过结合 ipfw 或 pf 规则以及 sing-box 的常规代理模式(例如 SOCKS5/HTTP)来重定向流量,但这种方法通常不如原生的 TUN 集成高效和复杂。它也无法提供 TUN 接口所具备的细粒度控制和透明性,尤其对于不原生支持代理的应用来说更是如此。
附加背景
以下是支持 FreeBSD TUN 功能的几个重要原因:
- 轻量级且高效的平台: FreeBSD 以其稳定性、安全性和效率而闻名,是网络服务和嵌入式系统的优秀平台。集成 TUN 模式将在此类资源受限或关键环境中充分发挥 sing-box 的潜力。
- 与 macOS 的架构相似性: 考虑到 sing-box 已经支持 macOS 上的 TUN 模式,其底层网络栈和系统调用接口与 FreeBSD 的 BSD 血统有显著的相似之处。这可能会减少开发工作量,相比于为完全不同的操作系统家族构建支持而言。
- 不断增长的用户群体: FreeBSD 仍然是服务器、防火墙(如 pfSense/OPNsense)和专用网络设备的流行选择。添加 TUN 支持将满足这个忠实的用户群体的需求,使他们能够在目前需要 Linux 或定制解决方案的场景中部署 sing-box。
- 增强的透明度和控制: 原生 TUN 接口提供了一种最透明的方式来捕获和处理所有网络流量,无论应用程序如何。这对于全面的流量管理、策略执行和类似 VPN 的功能至关重要。
- 完善类 Unix 生态系统: 随着对 Linux 和 macOS 的支持,添加 FreeBSD 将显著完善 sing-box 在主要类 Unix 桌面和服务器操作系统中的布局,体现了对更广泛平台的支持承诺。
实施 FreeBSD TUN 设备支持将极大地促进 sing-box 项目的发展,扩大其兼容性,增强其在强大平台上的能力,并吸引新的用户群体。
感谢您考虑此功能请求。
- Dominant language
- Go
- Stars
- 240
- Forks
- 240
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SagerNet/sing-tun
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
gvisor: LinkEndpointFilter.Attach never forwards nil, so GVisor.Close leaks all inbound dispatcher goroutines and fdsPossibly taken @arpitjain099 claimed this 46 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Darwin: utun process UUID headers are parsed as IP payloadPossibly taken @d3pre5s claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
TUN `mixed` stack: TCP never re-injected into tun0 on Linux kernel 7.1 (UDP works, `gvisor` works)Open
Difficulty 4/5 1-2 days Newbie friendliness 45/100
All issues in SagerNet/sing-tun
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/rocketmq-dashboard#7243 ·
Maintainers usually reply within 3 days
-
Missing example coverage: getClockPossibly taken @camunda-sdk-automation claimed this today. Opennew-operations
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
camunda/orchestration-cluster-api-go#75 · 2 comments ·
Maintainers usually reply within 1 day
-
[schema-coverage] elasticstack_kibana_security_entity_store_statusPossibly taken @github-actions claimed this today. Openacceptance-tests phase-coding schema-coverage testing triaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
elastic/terraform-provider-elasticstack#5396 ·
Maintainers usually reply within 1 day
-
Go device SDK: Whisper transcriber keeps buffering and transcribing audio appended after Stop()Possibly taken @apoorvdarshan claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BasedHardware/omi#22770 ·
Maintainers usually reply within 1 day
-
Bug v3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day