TOR 洋葱域名用于 Discourse

Hello,

we are having some issues for users to connect to our discourse instance through TOR. Many times, a “Unable to connect” message appears and you have to change several times your identity to connect. We have checked with our upstream hosting provider and they say they dont block tor traffic so we are trying to figure out what it could be. We have generated an onion domain for the platform but, at the same time, we want users to be able to access through a reserved domain with a non-tor browser.

Any suggestions?

Thanks in advance

This means your instance is launched as an onion site, and as such, cannot be viewed or accessed with a non-tor browser.

Onion sites can only be accessed through tor-browsers, but if you want your discourse instance to be accessed outside its onion domain, then you will need to get a premium domain for the ‘surface web’ like a .com,.org, .ly, etc. When you do this, then you can map the domain you bought with your discourse instance through its IP address.

I hope this is clear enough, huh?

Hello,

yes, we have a premium domain configured already. What we want to achieve is that you can access to the platform both through the premium domain (this is what is working) and an onion domain (we have created the onion domain; configured tor on the servers; configured nginx) at the same time. We included in the server_name paramater the onion domain but this doesnt seem to be enough.

Thanks.

Oh,never knew this was what you requested. I had thought in the reverse.

For your present condition, please see this.I hope it explains what you need to do better.

我知道这个帖子已经非常古老了,但我遇到了同样的问题,不得不进行一些调整才能让它正常工作。

问题是,我通过运行 ./launcher logs app 检查后发现,洋葱模板从默认站点复制了大量内容,问题在于其中一些设置是重复的。

我不得不使用 ./launcher enter app 登录到容器中,然后编辑 /etc/nginx/conf.d/onion.conf 文件,删除 proxy_buffer_size 8k; 这一行。

此外,我还需要在 nginx.conf 文件中添加 server_names_hash_bucket_size 64;

这样做之后服务器又恢复正常了,我是通过查看日志找到这个解决方案的。

由于 Tor 项目现已发布关于 Onion-Location 头的文档,我很想了解如何配置 Discourse 以同时提供“表面域名”和洋葱地址。Tor Project | Onion-Location

在我看来,@BryanHR 的调整可以在容器的 YAML 配置中完成。我想 Onion-Location 头也可以以同样的方式添加。

但我似乎记得 Discourse 是与其原始主机绑定的,因此我担心访问 .onion 站点时,资源会通过普通的 HTTP 或 HTTPS 提供,而不会经过 Tor 网络。(例如,原始请求通过 Tor 发出,但 JavaScript 会使用原始域名获取额外的资源)。