搭建一个匿名的暗网站点 – Onion services 实用手册

Tor 是一个由虚拟通道组成的网络环境,可以大幅度提高自己在互联网上的隐私和安全性。Tor 会将流量通过 Tor 网络内的三个随机的服务器(也称节点)发送。链路中的最后一个中继(即“出口节点”)将流量发送到公共互联网。

大致节点架构图如下:

绿色的中间服务器代表了Tor网络中的中继,三个密钥代表用户和每个中继之前的加密层。

Onion services 洋葱服务(以前称为“hidden services”)是只能通过 Tor 网络访问的服务(如网站)。

与非私有网络上的普通服务相比,洋葱服务具有以下几个优势:

  1. 洋葱服务的位置和 IP 地址是隐藏的,使攻击者难以审查它们或识别其运营商。
  2. Tor 用户和洋葱服务之间的所有流量都是端到端加密的,因此您无需担心通过 HTTPS 进行连接。
  3. 洋葱服务地址自动生成,运营商无需购买域名;.onion URL 还帮助 Tor 确保它连接到正确的位置并且连接没有被篡改。

如何访问洋葱服务(Onion services)

访问洋葱服务,需要洋葱浏览器,这里是下载链接 https://www.torproject.org/ (需要翻墙)

就像任何其他网站一样,我们需要知道洋葱服务的地址才能连接到它。洋葱地址是一串 16 位(在 V3 格式中为 56 位),大部分是随机字母和数字,后面跟“.onion”。

当访问使用洋葱服务的网站时,Tor 浏览器将在 URL 栏中显示一个洋葱图标,显示您的连接状态:安全和使用洋葱服务。您可以通过查看电路显示了解有关您正在访问的洋葱站点的更多信息。

Onion-Location 是一个非标准的 HTTP 标头,网站可以使用它来允许对其进行申明。

如何搭建一个洋葱服务(Onion services)

Onion服务其实就是一种特定的方式的部署与请求而已

请求方需要使用 tor browser

响应方 需要使用 tor 的 hidden_service

下面将详细介绍如何把 Tor 部署到服务器,并在洋葱浏览器进行访问,这里大体分为三步:

  1. 搭建 Nginx
  2. 搭建 Tor Services
  3. 访问页面

搭建 Nginx

这里选用的是腾讯云香港的服务器(注意,国内屏蔽了 Tor 服务,所以搭建 Onion Service 服务器本身必须在境外)

安装 Nginx

yum install nginx

配置 Nginx

vim /etc/nginx/nginx.conf

重点是看看 root 目录在哪块,比如我这边默认安装的是  /usr/share/nginx/html

启动 Nginx

service nginx restart

搭建 Tor

安装 Tor (腾讯云默认yum源是有的,如果没有可以用 rpm命令更新源)

yum install tor

配置 Tor

vim /etc/tor/torrc

然后将 conf 文件中的 IP 注释删掉,并更新为自己的

HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 instanceIP:80

启动 Tor

 service tor start

查看 hostname(tor 不同于传统服务搭建,我们可以通过命令行直接查到当前服务唯一生成的 .onion 地址)

cd /var/lib/tor/hidden_service/
cat hostname

验证并访问页面

修改HTML文件,打开浏览器并验证服务状态:

cd /usr/share/nginx/html
vim index.html



170 thoughts on “搭建一个匿名的暗网站点 – Onion services 实用手册”

  • My brother suggested I might like this blog. He was totally right. This put up actually made my day. You can not imagine just how a lot time I had spent for this information! Thanks!

  • In line with my study, after a in foreclosure process home is offered at a sale, it is common to the borrower to still have any remaining balance on the financial loan. There are many loan providers who seek to have all costs and liens paid off by the future buyer. On the other hand, depending on a number of programs, legislation, and state laws and regulations there may be some loans that aren’t easily fixed through the transfer of financial loans. Therefore, the responsibility still rests on the borrower that has acquired his or her property in foreclosure. Thanks for sharing your thinking on this website.

  • Today, taking into consideration the fast life style that everyone leads, credit cards have a huge demand throughout the market. Persons coming from every discipline are using credit card and people who are not using the card have made arrangements to apply for even one. Thanks for discussing your ideas in credit cards.

  • I?ve been exploring for a bit for any high-quality articles or blog posts on this kind of area . Exploring in Yahoo I at last stumbled upon this site. Reading this info So i?m happy to convey that I have a very good uncanny feeling I discovered just what I needed. I most certainly will make sure to do not forget this website and give it a glance on a constant basis.

  • Hi, I do think this is a great site. I stumbledupon it 😉 I am going to come back yet again since i have book marked it. Money and freedom is the greatest way to change, may you be rich and continue to help other people.

  • I have learned a number of important things as a result of your post. I would also like to mention that there may be situation that you will get a loan and never need a cosigner such as a Fed Student Aid Loan. In case you are getting a borrowing arrangement through a traditional banker then you need to be ready to have a cosigner ready to assist you to. The lenders may base their very own decision on the few factors but the biggest will be your credit ratings. There are some loan companies that will in addition look at your job history and come to a decision based on this but in most cases it will be based on on your report.

  • Thanks a bunch for sharing this with all folks you really realize what you are talking about! Bookmarked. Kindly also seek advice from my site =). We could have a link trade contract between us!

  • I’m really impressed with your writing skills as well as with the layout on your weblog. Is this a paid theme or did you modify it yourself? Either way keep up the excellent quality writing, it?s rare to see a nice blog like this one these days..

  • Unquestionably believe that which you said. Your favorite justification appeared to be on the net the simplest thing to be aware of. I say to you, I definitely get irked while people think about worries that they plainly do not know about. You managed to hit the nail upon the top as well as defined out the whole thing without having side-effects , people could take a signal. Will probably be back to get more. Thanks

  • I think other site proprietors should take this web site as an model, very clean and fantastic user genial style and design, let alone the content. You are an expert in this topic!

  • When I originally left a comment I seem to have clicked the -Notify me when new comments are added- checkbox and from now on each time a comment is added I get four emails with the same comment. Is there an easy method you can remove me from that service? Thank you.

  • There are definitely numerous details like that to take into consideration. That is a nice point to deliver up. I supply the ideas above as general inspiration but clearly there are questions like the one you deliver up where a very powerful thing shall be working in trustworthy good faith. I don?t know if greatest practices have emerged around things like that, but I am sure that your job is clearly recognized as a fair game. Both boys and girls really feel the influence of only a moment?s pleasure, for the rest of their lives.

  • Almost all of what you claim is astonishingly legitimate and it makes me wonder the reason why I hadn’t looked at this in this light before. Your piece truly did turn the light on for me as far as this subject goes. Nevertheless there is actually 1 point I am not really too comfy with so while I make an effort to reconcile that with the main theme of the issue, allow me see just what all the rest of your readers have to say.Nicely done.

  • I’m really inspired along with your writing talents and also with the format in your blog. Is this a paid subject or did you customize it yourself? Either way stay up the excellent quality writing, it?s rare to peer a nice weblog like this one nowadays..

发表评论

邮箱地址不会被公开。 必填项已用*标注

15 ÷ = 3