原文
| ||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
![]() |
原始链接: https://news.ycombinator.com/item?id=44003447
这个Hacker News帖子讨论了“oniux”,一个通过Tor重定向网络访问的隔离工具。首条评论指出了潜在的“道德风险”:用户可能错误地认为oniux总是能保护他们,从而忘记使用它或误认Tor浏览器。建议的改进包括自动设置环境变量以指向SOCKS代理,强制像`curl`这样的工具正确路由`.onion`地址。 其他评论者提到了替代方法,例如`torsocks`、使用`iptables`进行选择性Tor路由以及用于浏览器重定向的proxy.pac文件。人们担心潜在的恶意代码可能会检测到未经代理访问`.onion`域的情况。一位评论者提出了`AF_ONION`,以便在套接字级别自动兼容Tor。总体而言,虽然oniux向前迈进了一步,但它并非完美的解决方案,正确的环境配置对于安全使用Tor至关重要。
| ||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
![]() |
- right thing: catch every network access and redirect to Tor
- wrong thing: create the user expectation that (if you remember to prepend "oniux") it'll catch every network access and redirect to Tor
It is essentially moral hazard. What happens when you accidentally forget "oniux"? Or think you've booted up a Tails environment but it's not? Or mistake the Tor Browser window for a Firefox window? You only have to resolve a DNS name _once_ for the world to know you're interested in accessing it.
I like the idea that oniux should not only intercept gethostbyname(), but also always set standard environment variables pointing to its SOCKS proxy. That way curl can do the right thing - refuse to pass .onion names to gethostbyname() - but support automatically passing them on to a proxy. If it's a non-Tor proxy, it should also do the right thing and refuse to resolve .onion addresses, leaving only safe ways forward, which is passing on name resolution to whichever proxy is configured, and the only proxy that will resolve .onion addresses is the Tor proxy.
reply