HelloZeroNet / HelloZeroNet/ZeroNet
[issue] Zeronet ignores tor = always if started through systemd
- 主要语言
- JavaScript
- 星标
- 18.8k
- 派生
- 2.3k
- PR 合并指标
- 30 天内没有已合并 PR
描述
### Step 1: Please describe your environment
* ZeroNet version: 0.6.2 (3408)
* Operating system: Raspbian Stretch
* Web browser: Waterfox 56.1.0
* Tor status: always
* Opened port: no
* Special configuration:
### Step 2: Describe the problem:
If I start zeronet by a systemd unit on bootup, it doesn't connect to Tor.
#### Steps to reproduce:
1. create a zeronet.service file at /lib/systemd/system/
2. put in this
```
[Unit]
Description=Zeronet daemon
Wants=tor.service
After=network.target tor.service
[Service]
EnvironmentFile=/home/pi/ZeroNet-master/zeronet.conf
ExecStart=/home/pi/ZeroNet-master/zeronet.py --tor always
User=
TimeoutStopSec=30min
[Install]
WantedBy=multi-user.target
```
3. execute
```
sudo systemctl daemon-reload
sudo systemctl enable zeronet.service
sudo reboot
```
#### Observed Results:
It displays this

error message in the top right corner but it's working fine. It just connects to the zeronet without tor and. The errorlog states:
```
[2018-04-14 15:57:15,386] WARNING TorManager Tor controller connect error: error: [Errno 111] Connection refused in TorManager.py line 170 > _socket2.py line 228
[2018-04-14 15:57:15,386] INFO TorManager Starting self-bundled Tor, due to Tor proxy port 127.0.0.1:9050 check error: No connection
```
#### Expected Results:
Zeronet shouldn't establish any connection when Tor isn't reachable and should try to reconnect to Tor if it wasn't available during the initialization.
贡献指南
这个仓库没有索引到贡献指南
调研方向
从 TorManager.py 第 170 行附近以及由 systemd 单元调用的 zeronet.py 启动路径开始。使用提供的服务配置重现启动时的故障,然后跟踪 Tor 可用性的处理逻辑。完成的标准是:Tor 不可用时,ZeroNet 不回退到非 Tor 连接,并在 Tor 恢复可访问后重试。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- networking, security
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100