tor,网,络-CarlZeng

如何从Tor Network里面提取使用Socks5代理呢?How to use the socks5 proxy in Tor Network?

方法 #1:Tor Browser

最简单直接的办法就是在电脑或手机中使用Tor Browser浏览器,这样可以直接使用到符合设计初衷的匿名浏览(同时也意味着*墙)。

手机APP版指导手册:MOBILE TOR https://tb-manual.torproject.org/mobile-tor/#circumvention

手机端设置要点:下载后打开Tor Browser,

设置(右上角的齿轮图标) 》

配置网桥(在Tor网络的页面最下方的扳手图标)》

选中snowflake 并开启‘使用网桥’(2023年3月暂时可用)

点击 “连接” 按钮,并等待3-5分钟,等待页面出现:“私密浏览”,在页面最下方即可输入网址。

各种系统的电脑和手机版:下载 Tor 浏览器 

以下步骤可以查看到Tor Browser中拓展出来的Socks5代理地址,从而用来配置在除了浏览器以外的应用程序中,来实现VPN的效果。

  1. 打开Tor Browser,并等待其成功连接上Tor网络(这样就已实现匿名浏览的效果)

  2. 打开Tor Browser的设置首选项》连接,或者直接输入地址(并且回车):about:preferences#connection

  3. 你需要在连接中选择 snowflake网桥(snowflake bridge)2023年3月,目前这种方式在天朝还是可以正在运作的(能撑多久,未知)

  4. 你需要找到一个合适的网桥,并连接成功。(需要耐心)

  5. 在该页面的最底部,找到‘高级选项’》查看Tor日志,页面会弹出一个新的小窗口,里面的日志信息如下(正常成功连接的时候)

    1. 2023-03-02 15:15:55.247 [NOTICE] New control connection opened from 127.0.0.1.
      2023-03-02 15:15:55.248 [NOTICE] New control connection opened from 127.0.0.1.
      2023-03-02 15:15:55.249 [NOTICE] DisableNetwork is set. Tor will not make or accept non-control network connections. Shutting down all existing connections.
      2023-03-02 15:15:55.252 [NOTICE] Opening Socks listener on 127.0.0.1:9150
      2023-03-02 15:15:55.252 [NOTICE] Opened Socks listener connection (ready) on 127.0.0.1:9150
      2023-03-02 15:15:55.252 [WARN] Cannot find maximum file descriptor, assuming: 256
      2023-03-02 15:15:56.265 [NOTICE] Bootstrapped 1% (conn_pt): Connecting to pluggable transport
      2023-03-02 15:15:56.265 [NOTICE] Bootstrapped 2% (conn_done_pt): Connected to pluggable transport
      2023-03-02 15:15:56.267 [NOTICE] Bootstrapped 10% (conn_done): Connected to a relay
  6. 注意观察这个日志中的 Opening Socks listener on 127.0.0.1:9150;这个就是我们要找的Socks5代理地址。

 如果您无法使用已知的链接来打开下载Tor Browser的话,请发挥您的想象力(施展判断力),比如用搜索引擎搜索一下关键字,条条大路通罗马。

方法 #2(不保证):Clash

1. 手机端,可以使用手机APP: Clash

下载:https://github.com/Kr328/ClashForAndroid/releases
参考文章:最新版 Clash for Android 下载

配置:仅供朋友测试,v我索取

2. 如果是Mac电脑端可以使用:ClashX

3. 如果是Windows电脑端可以使用:Clash for Windows

下载:https://github.com/yichengchen/clashX/releases
参考文章:最新版 ClashX 下载

配置:仅供朋友测试,v我索取

方法 #3(advance):运行 tor

这个方法需要更专业的计算机知识,以下已Mac OSX来举例,简单描述如下(当然首先得先有梯子*墙才能实现):

1.  下载mac.zip

  我把它改名为:OnionVPNWithSpeedControl_mac.zip,解压缩后里面有我们需要用到的工具

  https://github.com/lunu-bounir/onion-vpn

  OnionVPNWithSpeedControl_mac.zip is came from above git of name onion-vpn

  这步有点奇葩,因为从Tor官方下载的最新版expert bunlde 中的 tor 是无法使用的,一运行就退出了,原因未知。已测试:tor-expert-bundle-12.0.3-macos-aarch64.tar.gz,非常尴尬:tor-expert-bundle-12.0.3-macos-aarch64 里面的tor是不能用的。。。

2. 安装go语言环境

  具体步骤不详细描述了,https://go.dev/dl/ 写得非常详细,十分友好。

3. 下载并编译https://github.com/keroserene/snowflake.git

  git clone打开新的Terminal,切换到client目录下,执行

go get
go build

注意:默认状况下在天朝go get会卡死(我就是遇到这种情况了)报错误:dial tcp 142.251.42.241:443: i/o timeout
这时需要先执行go env -w GOPROXY=https://goproxy.cn
解决方案来源:golang 在下载依赖包的时候出现错误:dial tcp 142.251.42.241:443: i/o timeout

  最后会在client目录下生成一个client的Unix可执行文件。

【可选步骤】4. 自定配置torrc文件,加入已知特定的snowflake bridge

  在client目录下有一个默认的torrc文件,这个就是tor运行起来后,我们希望其遵循的配置文件,里面有默认的snowflake bridge

5. 运行tor

  具体命令参考 […client % /Users/carl/Downloads/OnionVPNWithSpeedControl_mac/assets/tor -f torrc

  类似的日志参考如下:

Mar 03 09:36:49.721 [notice] Tor 0.4.4.6 (git-2a8b789ea6f308d0) running on Darwin with Libevent 2.1.11-stable, OpenSSL 1.1.1i, Zlib 1.2.11, Liblzma N/A, and Libzstd N/A.
Mar 03 09:36:49.721 [notice] Tor can’t help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Mar 03 09:36:49.722 [notice] Read configuration file “/Users/carlzeng/WebstormProjects/snowflake/client/torrc”.
Mar 03 09:36:49.723 [warn] Path for DataDirectory (datadir) is relative and will resolve to /Users/carl/WebstormProjects/snowflake/client/datadir. Is this what you wanted?
Mar 03 09:36:49.724 [notice] Opening Socks listener on 127.0.0.1:0
Mar 03 09:36:49.724 [notice] Socks listener listening on port 62501.
Mar 03 09:36:49.724 [notice] Opened Socks listener on 127.0.0.1:62501
Mar 03 09:36:49.000 [warn] Cannot find maximum file descriptor, assuming: 256
Mar 03 09:36:49.000 [notice] Bootstrapped 0% (starting): Starting
Mar 03 09:36:49.000 [notice] Starting with guard context “bridges”
Mar 03 09:36:49.000 [notice] Delaying directory fetches: No running bridges
Mar 03 09:36:50.000 [notice] Bootstrapped 1% (conn_pt): Connecting to pluggable transport
Mar 03 09:36:50.000 [notice] Bootstrapped 2% (conn_done_pt): Connected to pluggable transport
Mar 03 09:36:50.000 [notice] Bootstrapped 10% (conn_done): Connected to a relay
Mar 03 09:36:56.000 [notice] Managed proxy “./client”: offer created
。。。。
Mar 03 09:41:57.000 [notice] Bootstrapped 100% (done): Done

  慢慢等待1-5分钟,一直等到 Mar 03 09:41:57.000 [notice] Bootstrapped 100% (done): Done

6. 配置应用程序,连接到Socks 127.0.0.1:62501 即可(根据具体的日志信息)

【可选步骤】7. 检测连接状态:https://check.torproject.org/

祝各位:女神节快乐!~

Run a Tor Relay in Docker运行Tor中继节点

  1. 创建和启动docker-compose

    https://gitlab.torproject.org/torproject/anti-censorship/docker-obfs4-bridge/raw/main/docker-compose.yml

    https://gitlab.torproject.org/tpo/anti-censorship/docker-obfs4-bridge/-/raw/main/.env

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# This file assists operators in (re-)deploying an obfs4 bridge Docker
# container. You need the tool 'docker-compose' to use this file. You
# can find it in the Debian package 'docker-compose'.
#
# First, you need to create a configuration file, ".env", in the same directory
# as this file, "docker-compose.yml". Add the following environment variables
# to this configuration file. EMAIL is your email address; OR_PORT is your
# onion routing port; and PT_PORT is your obfs4 port:
#
# EMAIL=you@example.com
# OR_PORT=XXX
# PT_PORT=XXX
#
# If needed, you can also activate there an additional variables processing with:
#
# OBFS4_ENABLE_ADDITIONAL_VARIABLES=1
#
# followed by defining desired torrc entries prefixed with OBFS4V_
# For example:
#
# OBFS4V_AddressDisableIPv6=1
#
# Next, pull the Docker image, by running:
#
# docker-compose pull obfs4-bridge
#
# And finally, to (re-)deploy the container, run:
#
# docker-compose up -d obfs4-bridge

version: "3.4"
services:
obfs4-bridge:
image: thetorproject/obfs4-bridge:latest
networks:
- obfs4_bridge_external_network
environment:
# Exit with an error message if OR_PORT is unset or empty.
- OR_PORT=${OR_PORT:?Env var OR_PORT is not set.}
# Exit with an error message if PT_PORT is unset or empty.
- PT_PORT=${PT_PORT:?Env var PT_PORT is not set.}
# Exit with an error message if EMAIL is unset or empty.
- EMAIL=${EMAIL:?Env var EMAIL is not set.}
# Nickname with default value: "DockerObfs4Bridge"
- NICKNAME=${NICKNAME:-DockerObfs4Bridge}
env_file:
- .env
volumes:
- data:/var/lib/tor
ports:
- ${OR_PORT}:${OR_PORT}
- ${PT_PORT}:${PT_PORT}
restart: unless-stopped

volumes:
data:
name: tor-datadir-${OR_PORT}-${PT_PORT}

networks:
obfs4_bridge_external_network:
1
2
3
4
5
6
7
8
9
10
11
# Set required variables
OR_PORT=9099
PT_PORT=9050
EMAIL=ame@apple.com
# If you want, you could change the nickname of your bridge
#NICKNAME=DockerObfs4Bridge
# If needed, activate additional variables processing
#OBFS4_ENABLE_ADDITIONAL_VARIABLES=1
# and define desired torrc entries prefixed with OBFS4V_
# For example:
#OBFS4V_AddressDisableIPv6=1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
docker-compose up
WARN[0000] /root/obfs4-bridge/docker-compose.yaml: `version` is obsolete
[+] Running 15/15
✔ obfs4-bridge Pulled 39.3s
✔ 04857b38bc21 Pull complete 5.2s
✔ e5bfec8939cb Pull complete 1.6s
✔ 5f68de6710c4 Pull complete 1.8s
✔ b60093912f91 Pull complete 3.2s
✔ ab018a71dd54 Pull complete 5.0s
✔ 3b96c9cd7341 Pull complete 7.1s
✔ 399de59d9384 Pull complete 9.4s
✔ 1fd06b5f7332 Pull complete 6.8s
✔ 9632961b9f45 Pull complete 9.2s
✔ 8887d261ae57 Pull complete 8.7s
✔ 702c64636d8d Pull complete 10.3s
✔ 0c8449df639a Pull complete 10.7s
✔ 5f1156e46d38 Pull complete 11.3s
✔ dbc5b9df9780 Pull complete 12.0s
[+] Running 2/1
✔ Network obfs4-bridge_obfs4_bridge_external_network Created 0.1s
✔ Volume "tor-datadir-9099-9050" C... 0.0s
⠋ Container obfs4-bridge-obfs4-bridge-1 Created 0.0s
Attaching to obfs4-bridge-1
obfs4-bridge-1 | Using NICKNAME=DockerObfs4Bridge, OR_PORT=9099, PT_PORT=9050, and EMAIL=ame@apple.com.
obfs4-bridge-1 | Starting tor.
obfs4-bridge-1 | May 21 04:44:00.842 [notice] Tor 0.4.8.14 running on Linux with Libevent 2.1.12-stable, OpenSSL 3.0.15, Zlib 1.2.13, Liblzma 5.4.1, Libzstd 1.5.4 and Glibc 2.36 as libc.
obfs4-bridge-1 | May 21 04:44:00.842 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://support.torproject.org/faq/staying-anonymous/
obfs4-bridge-1 | May 21 04:44:00.842 [notice] Read configuration file "/etc/tor/torrc".
obfs4-bridge-1 | May 21 04:44:00.843 [notice] Based on detected system memory, MaxMemInQueues is set to 6296 MB. You can override this by setting MaxMemInQueues by hand.
obfs4-bridge-1 | May 21 04:44:00.843 [notice] Opening OR listener on 0.0.0.0:9099
obfs4-bridge-1 | May 21 04:44:00.843 [notice] Opened OR listener connection (ready) on 0.0.0.0:9099
obfs4-bridge-1 | May 21 04:44:00.843 [notice] Opening OR listener on [::]:9099
obfs4-bridge-1 | May 21 04:44:00.843 [notice] Opened OR listener connection (ready) on [::]:9099
obfs4-bridge-1 | May 21 04:44:00.843 [notice] Opening Extended OR listener on 127.0.0.1:0
obfs4-bridge-1 | May 21 04:44:00.843 [notice] Extended OR listener listening on port 44627.
obfs4-bridge-1 | May 21 04:44:00.843 [notice] Opened Extended OR listener connection (ready) on 127.0.0.1:44627
obfs4-bridge-1 | May 21 04:44:00.000 [notice] Parsing GEOIP IPv4 file /usr/share/tor/geoip.
obfs4-bridge-1 | May 21 04:44:00.000 [notice] Parsing GEOIP IPv6 file /usr/share/tor/geoip6.
obfs4-bridge-1 | May 21 04:44:01.000 [notice] Configured to measure statistics. Look for the *-stats files that will first be written to the data directory in 24 hours from now.
obfs4-bridge-1 | May 21 04:44:01.000 [notice] You are running a new relay. Thanks for helping the Tor network! If you wish to know what will happen in the upcoming weeks regarding its usage, have a look at https://blog.torproject.org/lifecycle-of-a-new-relay
obfs4-bridge-1 | May 21 04:44:01.000 [notice] It looks like I need to generate and sign a new medium-term signing key, because I don't have one. To do that, I need to load (or create) the permanent master identity key. If the master identity key was not moved or encrypted with a passphrase, this will be done automatically and no further action is required. Otherwise, provide the necessary data using 'tor --keygen' to do it manually.
obfs4-bridge-1 | May 21 04:44:01.000 [notice] Your Tor server's identity key fingerprint is 'DockerObfs4Bridge F22790FB5078D507920743B6D6'
obfs4-bridge-1 | May 21 04:44:01.000 [notice] Your Tor bridge's hashed identity key fingerprint is 'DockerObfs4Bridge 811EBA87EE1ACE2893140B5AC'
obfs4-bridge-1 | May 21 04:44:01.000 [notice] Your Tor server's identity key ed25519 fingerprint is 'DockerObfs4Bridge YlsH1QKdRNwX70+dDrHQHBoUDDWRMo'
obfs4-bridge-1 | May 21 04:44:01.000 [notice] You can check the status of your bridge relay at https://bridges.torproject.org/status?id=811EBA87EE1ACE2893140
obfs4-bridge-1 | May 21 04:44:01.000 [notice] Bootstrapped 0% (starting): Starting
obfs4-bridge-1 | May 21 04:44:01.000 [notice] Starting with guard context "default"
obfs4-bridge-1 | May 21 04:44:01.000 [notice] Registered server transport 'obfs4' at '[::]:9050'
obfs4-bridge-1 | May 21 04:44:02.000 [notice] Unable to find IPv4 address for ORPort 9099. You might want to specify IPv6Only to it or set an explicit address or set Address.
obfs4-bridge-1 | May 21 04:44:02.000 [notice] Bootstrapped 5% (conn): Connecting to a relay



obfs4-bridge-1 | May 21 04:48:18.000 [warn] Problem bootstrapping. Stuck at 5% (conn): Connecting to a relay. (Connection timed out; TIMEOUT; count 10; recommendation warn; host FA3EC05000800EB7C4 at 94.142.140.158:443)
obfs4-bridge-1 | May 21 04:48:18.000 [warn] 9 connections have failed:
obfs4-bridge-1 | May 21 04:48:18.000 [warn] 9 connections died in state connect()ing with SSL state (No SSL object)
....
  1. NAT设置 端口转发

Internet‘s 9050 至 docker机的9050

Internet‘s 9059 至 docker机的9099

错误排除

Unable to find IPv4 address for ORPort 9099. You might want to specify IPv6Only to it or set an explicit address or set Address.

1
May 22 08:57:23.000 [notice] Unable to find IPv4 address for ORPort 9099. You might want to specify IPv6Only to it or set an explicit address or set Address.

如何指定一个地址?

docker-compse.yml中映射出docker容器中的tor配置文件

/etc/tor/torrc

1
2
obfs4-bridge-1  | May 22 11:57:20.345 [warn] Error parsing ServerTransportListenAddr address 'op.c
arlzeng.com:9092'
1
2
obfs4-bridge-1  | May 21 07:57:46.000 [notice] Unable to find IPv4 address for ORPort 9099. You mi
ght want to specify IPv6Only to it or set an explicit address or set Address.

https://gitlab.torproject.org/tpo/anti-censorship/docker-obfs4-bridge/-/issues/6

1
2
3
Ah yes. It's indeed forwarded.
Good to know it's normal behavior. I saw multiple posts online like this reddit Post as well..
Maybe we should say this message is normal in most cases, especially a machine behind a nat. After all, it confuses me. As if I was doing something wrong.

那么下一步就变成: 如何在proxy下运行这个 tor -f torrc

既然tor的 自己运行成 bridge mode 无法是在代理的情况;

那么能否让整个docker的外网连接都是处于proxy状态下的,

这样它的流量自动走入proxy;

这样成bridge链接到一个relay应该就能成功

或者使用docker 的环境变量

HTTP_PROXY

HTTPS_PROXY

如何在docker-compose.yml中设置这样的环境变量

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
version: "3.4"
services:
obfs4-bridge:
image: thetorproject/obfs4-bridge:latest
networks:
- obfs4_bridge_external_network
environment:
# Exit with an error message if OR_PORT is unset or empty.
- OR_PORT=${OR_PORT:?Env var OR_PORT is not set.}
# Exit with an error message if PT_PORT is unset or empty.
- PT_PORT=${PT_PORT:?Env var PT_PORT is not set.}
# Exit with an error message if EMAIL is unset or empty.
- EMAIL=${EMAIL:?Env var EMAIL is not set.}
# Nickname with default value: "DockerObfs4Bridge"
- NICKNAME=${NICKNAME:-DockerObfs4Bridge}
- HTTP_PROXY=http://192.168.6.116:7890
- HTTPS_PROXY=http://192.168.6.116:7890
env_file:
- .env

....

显然: 这个方案是不靠谱的, 流量被被转发到代理

修改配置文件torrc

1
2
Bridge meek_lite 192.0.2.20:80 url=https://1314488750.rsc.cdn77.org front=www.phpmyadmin.net utls=HelloRandomizedALPN
ClientTransportPlugin meek_lite exec /usr/bin/lyrebird managed
1
docker exec -it obfs4-bridge-obfs4-bridge-1 bash 

进去去找找 lyrebird 这个东西, 在那里具体路径?

1
/usr/bin/lyrebird

思路来源: https://spec.torproject.org/pt-spec/configuration-environment.html

TOR_PT_PROXY

TOR_PT_PROXY=http://198.51.100.3:443

测试:

把这个TOR_PT_PROXY参数设置到.env,重启docker, 无效

下一步 修改torrc来

设置TOR_PT_PROXY 和 ServerTransportPlugin obfs4 exec /usr/bin/lyrebird

​ May 22 14:31:51.242 [warn] Failed to parse/validate config: Unknown option ‘TOR_PT_PROXY’. Failing.

​ 看来torrc 中不能设置TOR_PT_PROXY; 导致整个docker无法启动

​ 修改obfs4 为 meek_lite

也失败了; 错误:

1
2
3
4
5
6
7
8

May 22 14:34:23.000 [notice] Starting with guard context "default"
May 22 14:34:23.000 [warn] Server managed proxy encountered a method error. (meek_lite server not supported)
May 22 14:34:23.000 [warn] Managed proxy '/usr/bin/lyrebird' was spawned successfully, but it didn't launch any pluggable transport listeners!
May 22 14:34:24.000 [notice] Unable to find IPv4 address for ORPort 9099. You might want to specify IPv6Only to it or set an explicit address or set Address.
May 22 14:34:24.000 [notice] Bootstrapped 5% (conn): Connecting to a relay
May 22 14:38:31.000 [warn] Problem bootstrapping. Stuck at 5% (conn): Connecting to a relay. (No route to host; NOROUTE; count 8; recommendation warn; host B6526852EF18FB54BC91437B54055D16FD581898 at 176.198.159.33:9001)
May 22 14:38:31.000 [warn] 7 connections have failed:

/usr/local/bin/start-tor.sh: line 25: /etc/tor/torrc: Permission denied
Starting tor.

My internet connection requires an HTTP or SOCKS Proxy

If you’re using Tor Browser, you can set your proxy’s address, port, and authentication information in the Connection Settings.

If you’re using Tor another way, you can set the proxy information in your torrc file. Check out the HTTPSProxy config option in the manual page. If your proxy requires authentication, see the HTTPSProxyAuthenticator option. Example with authentication:

1
2
HTTPSProxy 10.0.0.1:8080
HTTPSProxyAuthenticator myusername:mypass

本小节思路来源: My internet connection requires an HTTP or SOCKS Proxy

config option in the manual page

修改torrc文件, 添加(改成你本地可用的代理)

HTTPSProxy 127.0.0.1:7890

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/usr/local/bin/start-tor.sh: line 25: /etc/tor/torrc: Permission denied
Starting tor.
May 23 08:10:42.437 [notice] Tor 0.4.8.14 running on Linux with Libevent 2.1.12-stable, OpenSSL 3.0.15, Zlib 1.2.13, Liblzma 5.4.1, Libzstd 1.5.4 and Glibc 2.36 as libc.
May 23 08:10:42.437 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://support.torproject.org/faq/staying-anonymous/
May 23 08:10:42.437 [notice] Read configuration file "/etc/tor/torrc".
May 23 08:10:42.438 [notice] Based on detected system memory, MaxMemInQueues is set to 6296 MB. You can override this by setting MaxMemInQueues by hand.
May 23 08:10:42.439 [notice] Opening OR listener on 0.0.0.0:9099
May 23 08:10:42.439 [notice] Opened OR listener connection (ready) on 0.0.0.0:9099
May 23 08:10:42.439 [notice] Opening OR listener on [::]:9099
May 23 08:10:42.439 [notice] Opened OR listener connection (ready) on [::]:9099
May 23 08:10:42.439 [notice] Opening Extended OR listener on 127.0.0.1:0
May 23 08:10:42.439 [notice] Extended OR listener listening on port 45571.
May 23 08:10:42.439 [notice] Opened Extended OR listener connection (ready) on 127.0.0.1:45571
May 23 08:10:42.000 [notice] Parsing GEOIP IPv4 file /usr/share/tor/geoip.
May 23 08:10:42.000 [notice] Parsing GEOIP IPv6 file /usr/share/tor/geoip6.
May 23 08:10:42.000 [notice] Configured to measure statistics. Look for the *-stats files that will first be written to the data directory in 24 hours from now.
May 23 08:10:43.000 [notice] Your Tor server's identity key fingerprint is 'DockerObfs4Brg2025 BB46A33E093FAB4F48F2F8B433E51E38320DA462'
May 23 08:10:43.000 [notice] Your Tor bridge's hashed identity key fingerprint is 'DockerObfs4Brg2025 20A3E084775ECB102401250C53F8E064D6EDA5FA'
May 23 08:10:43.000 [notice] Your Tor server's identity key ed25519 fingerprint is 'DockerObfs4Brg2025 GExPVxdmowxMdpW3Erl8HQQbdPhyzjxpEqhJJ7BuZEE'
May 23 08:10:43.000 [notice] You can check the status of your bridge relay at https://bridges.torproject.org/status?id=20A3E084775ECB102401250C53F8E064D6EDA5FA
May 23 08:10:43.000 [notice] Bootstrapped 0% (starting): Starting
May 23 08:10:43.000 [notice] Starting with guard context "default"
May 23 08:10:43.000 [warn] Managed proxy '/usr/bin/lyrebird' did not configure the specified outgoing proxy and will be terminated.
May 23 08:10:43.000 [warn] Managed proxy "N/A" process terminated with status code 0
May 23 08:10:44.000 [notice] Unable to find IPv4 address for ORPort 9099. You might want to specify IPv6Only to it or set an explicit address or set Address.
May 23 08:10:44.000 [notice] Bootstrapped 3% (conn_proxy): Connecting to proxy
May 23 08:10:44.000 [notice] Bootstrapped 4% (conn_done_proxy): Connected to proxy
May 23 08:10:44.000 [notice] Bootstrapped 10% (conn_done): Connected to a relay
May 23 08:10:44.000 [notice] Bootstrapped 14% (handshake): Handshaking with a relay
May 23 08:10:44.000 [notice] Bootstrapped 15% (handshake_done): Handshake with a relay done

通过IPTABLES转发docker流量

REDSOCKS

工具连接:https://github.com/darkk/redsocks

This tool allows you to redirect any TCP connection to SOCKS or HTTPS proxy using your firewall, so redirection may be system-wide or network-wide.

这个工具可以通过iptables将所有TCP流量转至它监听的端口下,然后通过代理发出。

https://www.notion.so/REDSOCKS-fb75b0b02b9d4e87867771166ee43731

本小节来源

Run a Tor Relay in Docker

个性化需求沟通 扫客服加V加群: