📜  qbittorrent 未经授权 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:10.980000             🧑  作者: Mango

代码示例1
I've deployed qbittorent as a Stack using Portainer with the following docker-compose file

---
version: "2.1"
services:
  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent
    container_name: qbittorrent
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Riga
      - WEBUI_PORT=8080
    volumes:
      - /portainer/Files/AppData/Config/qbittorrent:/config
      - /home/owner/Downloads:/downloads
    ports:
      - 6882:6881
      - 6882:6881/udp
      - 8080:8080
    restart: unless-stopped

I then opened the config file in a text editor to add this line WebUI\HostHeaderValidation=false:

sudo nano portainer/Files/AppData/Config/qbittorrent/qBittorrent/qBittorrent.conf 
The full config should look like this:

[AutoRun]
enabled=false
program=

[LegalNotice]
Accepted=true

[Preferences]
Connection\PortRangeMin=6881
Connection\UPnP=false
Downloads\SavePath=/downloads/
Downloads\TempPath=/downloads/incomplete/
Queueing\QueueingEnabled=true
WebUI\Address=*
WebUI\Port=8080
WebUI\ServerDomains=*
WebUI\HostHeaderValidation=false

After this manipulation, the WebUI could be accessed on port 8080