[Support] binhex - qBittorrentVPN


Recommended Posts

10 minutes ago, Tomahawk51 said:

Hi, hoping to get some VPN help.  I use OctaneVPN, working on the deprecated rTorrentVPN docker and trying to move to either DelugeVPN or QBittorrentVPN.

 

My VPN provider's OVPN file wasn't working, so I asked them to help and they gave me an update that include "tls-cipher "DEFAULT:@SECLEVEL=0". I get this in teh logs though:

Is there something I can do to edit "--data-ciphers" to get things going?  Again, this is working on the old rTorrent docker...just trying to migrate.


Thanks!

tell your vpn provider you tried the option they suggested and the above is the error you now see.

Link to comment

[SOLVED]
I found the resolution in another thread pointing to the github instructions, question #24, instruction to add the webUI port to VPN container's VPN_INPUT_PORTS variable.

I have another container (Nicotine+} routed through binhexQBT. The logs indicate it is successfully connecting to the web and logging in fine. However I'm unable to access the webui using SERVERIP:PORT. I have the port added to the BinhexVPN container and removed from the Nicotine template.

Sent from my Pixel 5 using Tapatalk
 

Edited by VelcroBP
added resolution to my issue
Link to comment

Hello.

 

I updated my unraid server to 6.12 and I am unable to access my instance of rutorrent. It has been deprecated by the developer. It used to give me a prompt for webgui but it is no longer there. Every other docker has a webgui option. 

 

How can I bring over everything from rutorrent to qbittorrent? 

 

EDIT: Solved for now! Can access rutorrent after trying all the ports. Still need to know how to convert from rutorrent to qbittorrent. 

Edited by urbanracer34
partial fix found
Link to comment

Downloading Wireguard on router and unRAID container using other VPN causing issues?

I set up Wireguard on my router to access my server while traveling and so far it is working as expected. however nothing seems to be downloading with qbt-VPN. the container is set up using AirVPN config. it is running and the AirVPN ip is showing with ifconfig. It has Internet access when testing with speedtest-cli. However all downloads added since I setup the Wireguard and left are immediately stalling with no connections. A test of the port forward on AirVPN shows "Connection Refused: 111".

Is there something I'm missing that would prevent traffic to or from the container because of the router's Wireguard?

Sent from my Pixel 5 using Tapatalk

Link to comment

Any tip on how to use this with Cloudfare Tunnel? Both the tunnel and the docker container are running on the same network. I keep getting this error in the Cloudfare Tunnel log:

 

2023-06-18T12:37:55Z ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp xxx.18.0.xx:80: connect: connection refused" connIndex=3 dest=https://qbt.xtu.icu/favicon.ico event=0 ip=198.41.200.43 type=http

 

Heimdall docker works fine with the following (it's the first one):

Screenshot_6.png.a39ebb93bed7fa9cbb1860610f9cfc3a.png

 

 

 

EDIT: Fixed my problem 30 seconds after making this post by adding:

:8080

at the end of my service URL in Cloudflare.

Edited by plantsandbinary
Link to comment

Hello forum:)

 

I´ve had a problem for some time now.. And i hope you can help me..

I want to send my sonarr through my qbittorrent/delugevpn, with privoxy.. The problem is that it´s not working:(

I thought that maybe the update would fix it but sadly no:(

 

Can you help me?

Do you need any info for how to fix the issue??

 

Best regards...

Link to comment
24 minutes ago, Mattti1912 said:

Hello forum:)

 

I´ve had a problem for some time now.. And i hope you can help me..

I want to send my sonarr through my qbittorrent/delugevpn, with privoxy.. The problem is that it´s not working:(

I thought that maybe the update would fix it but sadly no:(

 

Can you help me?

Do you need any info for how to fix the issue??

 

Best regards...

Why not just connect it directly?

Link to comment
8 hours ago, Mattti1912 said:

Hello forum:)

 

I´ve had a problem for some time now.. And i hope you can help me..

I want to send my sonarr through my qbittorrent/delugevpn, with privoxy.. The problem is that it´s not working:(

I thought that maybe the update would fix it but sadly no:(

 

Can you help me?

Do you need any info for how to fix the issue??

 

Best regards...

 

Check out here, question 27... https://github.com/binhex/documentation/blob/master/docker/faq/vpn.md

 

Link to comment
On 6/15/2023 at 12:19 PM, urbanracer34 said:

Hello.

 

I updated my unraid server to 6.12 and I am unable to access my instance of rutorrent. It has been deprecated by the developer. It used to give me a prompt for webgui but it is no longer there. Every other docker has a webgui option. 

 

How can I bring over everything from rutorrent to qbittorrent? 

 

EDIT: Solved for now! Can access rutorrent after trying all the ports. Still need to know how to convert from rutorrent to qbittorrent. 

I just finished migrating over my torrents from the depreciated binhex rutorrent container. I did have to pip install qbittorrent-api to simplify using the qbittorrent api. I am not a programmer and so my process is super clunky but I was able to migrate about 3.4k torrents successfully. I am not running unraid but I am using the same containers.

 

Rather than downloading the torrent files via "get .torrent" in rutorrent, I downloaded the torrents in the session directory of rtorrent which are named with the hash.  I had a bunch of torrents with custom directories set and without the torrent name added to the path so I could not import all of my torrents and point them at a certain directory.

 

I had manually moved some torrents over so I ended up making a python script to compare the torrents loaded in qbittorrent to those in rtorrent and for those missing, output the torrent name, hash, and save path to a .csv.  Using the csv list of torrents and the torrent files from the rtorrent session directory I made another script to go through the .csv of torrents not in qbittorrent to add them using the save path from rtorrent for each torrent without creating subfolders.

 

To generate the .csv of missing torrents:

import csv
import xmlrpc.client
from qbittorrentapi import Client

# qBittorrent API Configuration
QB_USERNAME = 'USERNAME' #change
QB_PASSWORD = 'PASSWORD' #change
QB_HOST = '192.168.1.123'  # Modify with qbittorrent ip address
QB_PORT = 9081  # Modify qbittorrent iport

# ruTorrent Configuration
RUTORRENT_RPC_URL = 'http://USERNAME:[email protected]:9080/RPC2'  # Modify with your rutorrent credentials

# Connect to qBittorrent
qb_client = Client(host=QB_HOST, port=QB_PORT)
qb_client.auth_log_in(QB_USERNAME, QB_PASSWORD)

# Connect to ruTorrent
ru_client = xmlrpc.client.Server(RUTORRENT_RPC_URL)

# Get list of torrents in qBittorrent
qb_torrents = qb_client.torrents_info()

# Get list of torrents in ruTorrent
ru_torrents = ru_client.download_list("","main")

# Compare the torrents and find missing ones
missing_torrents = []
for ru_torrent in ru_torrents:
    ru_torrent_hash = ru_client.d.get_hash(ru_torrent).lower()
    found = False
    for qb_torrent in qb_torrents:
        if ru_torrent_hash.lower() == qb_torrent['hash'].lower():
            found = True
            break
    if not found:
        ru_torrent_name = ru_client.d.get_name(ru_torrent)
        print("Missing Torrent found! " + ru_torrent_name)
        ru_torrent_path = ru_client.d.get_directory(ru_torrent)
        missing_torrents.append({
            'name': ru_torrent_name,
            'path': ru_torrent_path,
            'hash': ru_torrent_hash
        })

# Export missing torrents to a CSV file
csv_file = 'missing_torrents.csv'
with open(csv_file, 'w', encoding="utf-8", newline='') as file:
    writer = csv.writer(file)
    writer.writerow(['Torrent Name', 'Path', 'Torrent Hash'])
    for torrent in missing_torrents:
        writer.writerow([torrent['name'], torrent['path'], torrent['hash']])

print(f"List of missing torrents exported to {csv_file}")

 

Take the csv and add the torrents to qbittorrent using the downloaded torrent files from the session directory

import qbittorrentapi
import os
import csv

def add_torrent(username, password, url, torrent_file_path, save_path):
    # Connect to the qBittorrent client
    client = qbittorrentapi.Client(host=url, username=username, password=password)
    client.auth_log_in()

    try:
        # Read the .torrent file as binary
        with open(torrent_file_path, 'rb') as file:
            torrent_data = file.read()

        # Set the request parameters
        parameters = {
            'savepath': save_path,
            'paused': True,  # Set all torrents to be added as paused
            'autoTMM': False  # Disable subfolder creation
        }

        # Add the .torrent file
        client.torrents_add(torrent_files=torrent_data, savepath=save_path, category='', parameters=parameters)
        print("Torrent added successfully!")

    except qbittorrentapi.LoginFailed as e:
        print("Authentication failed. Please check your credentials.")
    except Exception as e:
        print(f"Error: {e}")

# Provide your qBittorrent's API URL, username, and password
api_url = 'http://192.168.1.123:9081'  # Replace with your qBittorrent's API URL and port
api_username = 'USERNAME'  # Replace with your qBittorrent's API username
api_password = 'PASSWORD'  # Replace with your qBittorrent's API password

# Provide the path to the CSV file
csv_file_path = 'C:\\Users\\user\\Desktop\\rtorrent\\missing_torrents.csv'  # Replace with the path to your CSV file of missing torrents generated by the previous script

# Read the CSV file and add the torrents
with open(csv_file_path, 'r') as file:
    csv_reader = csv.DictReader(file)
    for row in csv_reader:
        try:
            torrent_file_path = 'C:\\Users\\user\\Desktop\\rtorrent\\session_torrent_files\\' + row['Torrent Hash'].upper() + '.torrent'
            save_path = row['Path']
            add_torrent(api_username, api_password, api_url, torrent_file_path, save_path)
        except Exception as e:
            print(row)
            continue

 

All torrents will be added in as paused. I did a force recheck and once that was done everything was migrated over.  You could modify this to do it all on the server and in a single script with less code but this is what I got to work.

Edited by eske
typo
  • Like 2
Link to comment

I recently had a power outage and ever since that my docker will not allow me to the Web UI site.  Every time I try to get to the Web UI, I am getting a Site cannot be reached, [IP] took too long to respond.  I am running the same port 8080.  I have tried to change this to see if this was causing the issue but it made no difference.  

Link to comment
41 minutes ago, D_gate said:

I recently had a power outage and ever since that my docker will not allow me to the Web UI site.  Every time I try to get to the Web UI, I am getting a Site cannot be reached, [IP] took too long to respond.  I am running the same port 8080.  I have tried to change this to see if this was causing the issue but it made no difference.  

Paste the contents of supervisord.log into your next post. Be sure to redact users and passwords.

Link to comment

Hi there,

I am having an issue where I can not access the webUI when the VPN is enabled (wireguard). When it is turned off I can access the internal ip (192.168.x.x) without issue.I have followed steps 4 and 24 and 25. I am not sure if its iptables or where the issue is.

 

Any advice would be greatly appreciated!

 

 

supervisord.log

Edited by TowerRH
Link to comment
5 hours ago, TowerRH said:

Hi there,

I am having an issue where I can not access the webUI when the VPN is enabled (wireguard). When it is turned off I can access the internal ip (192.168.x.x) without issue.I have followed steps 4 and 24 and 25. I am not sure if its iptables or where the issue is.

 

Any advice would be greatly appreciated!

 

 

supervisord.log 28.86 kB · 3 downloads

LAN_NETWORK=192.168.146.1/24

This is likely your issue.

https://github.com/binhex/documentation/blob/master/docker/faq/vpn.md

Scroll down to Q4.

Link to comment
14 minutes ago, TowerRH said:

Figured it out. I knew I was almost there.

And now I am working as well, with all the messing around I did (due to swapping routers when one died) I messed around with this setting as well.  With the new wireguard file and updating the IP to what it should be I am now working.  

 

Thank you all

Link to comment
On 6/23/2023 at 11:05 AM, eske said:

I just finished migrating over my torrents from the depreciated binhex rutorrent container. I did have to pip install qbittorrent-api to simplify using the qbittorrent api. I am not a programmer and so my process is super clunky but I was able to migrate about 3.4k torrents successfully. I am not running unraid but I am using the same containers.

 

Rather than downloading the torrent files via "get .torrent" in rutorrent, I downloaded the torrents in the session directory of rtorrent which are named with the hash.  I had a bunch of torrents with custom directories set and without the torrent name added to the path so I could not import all of my torrents and point them at a certain directory.

 

I had manually moved some torrents over so I ended up making a python script to compare the torrents loaded in qbittorrent to those in rtorrent and for those missing, output the torrent name, hash, and save path to a .csv.  Using the csv list of torrents and the torrent files from the rtorrent session directory I made another script to go through the .csv of torrents not in qbittorrent to add them using the save path from rtorrent for each torrent without creating subfolders.

 

To generate the .csv of missing torrents:

import csv
import xmlrpc.client
from qbittorrentapi import Client

# qBittorrent API Configuration
QB_USERNAME = 'USERNAME' #change
QB_PASSWORD = 'PASSWORD' #change
QB_HOST = '192.168.1.123'  # Modify with qbittorrent ip address
QB_PORT = 9081  # Modify qbittorrent iport

# ruTorrent Configuration
RUTORRENT_RPC_URL = 'http://USERNAME:[email protected]:9080/RPC2'  # Modify with your rutorrent credentials

# Connect to qBittorrent
qb_client = Client(host=QB_HOST, port=QB_PORT)
qb_client.auth_log_in(QB_USERNAME, QB_PASSWORD)

# Connect to ruTorrent
ru_client = xmlrpc.client.Server(RUTORRENT_RPC_URL)

# Get list of torrents in qBittorrent
qb_torrents = qb_client.torrents_info()

# Get list of torrents in ruTorrent
ru_torrents = ru_client.download_list("","main")

# Compare the torrents and find missing ones
missing_torrents = []
for ru_torrent in ru_torrents:
    ru_torrent_hash = ru_client.d.get_hash(ru_torrent).lower()
    found = False
    for qb_torrent in qb_torrents:
        if ru_torrent_hash.lower() == qb_torrent['hash'].lower():
            found = True
            break
    if not found:
        ru_torrent_name = ru_client.d.get_name(ru_torrent)
        print("Missing Torrent found! " + ru_torrent_name)
        ru_torrent_path = ru_client.d.get_directory(ru_torrent)
        missing_torrents.append({
            'name': ru_torrent_name,
            'path': ru_torrent_path,
            'hash': ru_torrent_hash
        })

# Export missing torrents to a CSV file
csv_file = 'missing_torrents.csv'
with open(csv_file, 'w', encoding="utf-8", newline='') as file:
    writer = csv.writer(file)
    writer.writerow(['Torrent Name', 'Path', 'Torrent Hash'])
    for torrent in missing_torrents:
        writer.writerow([torrent['name'], torrent['path'], torrent['hash']])

print(f"List of missing torrents exported to {csv_file}")

 

Take the csv and add the torrents to qbittorrent using the downloaded torrent files from the session directory

import qbittorrentapi
import os
import csv

def add_torrent(username, password, url, torrent_file_path, save_path):
    # Connect to the qBittorrent client
    client = qbittorrentapi.Client(host=url, username=username, password=password)
    client.auth_log_in()

    try:
        # Read the .torrent file as binary
        with open(torrent_file_path, 'rb') as file:
            torrent_data = file.read()

        # Set the request parameters
        parameters = {
            'savepath': save_path,
            'paused': True,  # Set all torrents to be added as paused
            'autoTMM': False  # Disable subfolder creation
        }

        # Add the .torrent file
        client.torrents_add(torrent_files=torrent_data, savepath=save_path, category='', parameters=parameters)
        print("Torrent added successfully!")

    except qbittorrentapi.LoginFailed as e:
        print("Authentication failed. Please check your credentials.")
    except Exception as e:
        print(f"Error: {e}")

# Provide your qBittorrent's API URL, username, and password
api_url = 'http://192.168.1.123:9081'  # Replace with your qBittorrent's API URL and port
api_username = 'USERNAME'  # Replace with your qBittorrent's API username
api_password = 'PASSWORD'  # Replace with your qBittorrent's API password

# Provide the path to the CSV file
csv_file_path = 'C:\\Users\\user\\Desktop\\rtorrent\\missing_torrents.csv'  # Replace with the path to your CSV file of missing torrents generated by the previous script

# Read the CSV file and add the torrents
with open(csv_file_path, 'r') as file:
    csv_reader = csv.DictReader(file)
    for row in csv_reader:
        try:
            torrent_file_path = 'C:\\Users\\user\\Desktop\\rtorrent\\session_torrent_files\\' + row['Torrent Hash'].upper() + '.torrent'
            save_path = row['Path']
            add_torrent(api_username, api_password, api_url, torrent_file_path, save_path)
        except Exception as e:
            print(row)
            continue

 

All torrents will be added in as paused. I did a force recheck and once that was done everything was migrated over.  You could modify this to do it all on the server and in a single script with less code but this is what I got to work.

 

@eske Thanks for the advice. I am a horrible coder so I really can't use scripts in my environment. 

 

Would just adding the original torrents from rutorrent's session folder, and not the "libtorrent_resume or "rutorrent" ones, to an new instance of an torrent client suffice? 

 

EDIT1: I have all 641 current torrent files ready to go to a new client.

Edited by urbanracer34
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.