mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
Changes in User-Agent
This commit is contained in:
parent
8897001567
commit
ad2a18b3bc
@ -81,7 +81,7 @@ void DNSUpdater::checkPublicIP()
|
|||||||
m_lastIPCheckTime = QDateTime::currentDateTime();
|
m_lastIPCheckTime = QDateTime::currentDateTime();
|
||||||
QNetworkRequest request;
|
QNetworkRequest request;
|
||||||
request.setUrl(QUrl("http://checkip.dyndns.org"));
|
request.setUrl(QUrl("http://checkip.dyndns.org"));
|
||||||
request.setRawHeader("User-Agent", "qBittorrent/" VERSION" chris@qbittorrent.org");
|
request.setRawHeader("User-Agent", "qBittorrent/" VERSION);
|
||||||
manager->get(request);
|
manager->get(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ void DNSUpdater::updateDNSService()
|
|||||||
m_lastIPCheckTime = QDateTime::currentDateTime();
|
m_lastIPCheckTime = QDateTime::currentDateTime();
|
||||||
QNetworkRequest request;
|
QNetworkRequest request;
|
||||||
request.setUrl(getUpdateUrl());
|
request.setUrl(getUpdateUrl());
|
||||||
request.setRawHeader("User-Agent", "qBittorrent/" VERSION" chris@qbittorrent.org");
|
request.setRawHeader("User-Agent", "qBittorrent/" VERSION);
|
||||||
manager->get(request);
|
manager->get(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,9 +85,8 @@ DownloadHandler *DownloadManager::downloadUrl(const QString &url, qint64 limit)
|
|||||||
const QUrl qurl = QUrl::fromEncoded(url.toUtf8());
|
const QUrl qurl = QUrl::fromEncoded(url.toUtf8());
|
||||||
QNetworkRequest request(qurl);
|
QNetworkRequest request(qurl);
|
||||||
|
|
||||||
// Spoof Firefox 3.5 user agent to avoid
|
// Spoof Firefox 38 user agent to avoid web server banning
|
||||||
// Web server banning
|
request.setRawHeader("User-Agent", "Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Firefox/38.0");
|
||||||
request.setRawHeader("User-Agent", "Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5");
|
|
||||||
|
|
||||||
qDebug("Downloading %s...", request.url().toEncoded().data());
|
qDebug("Downloading %s...", request.url().toEncoded().data());
|
||||||
// accept gzip
|
// accept gzip
|
||||||
|
@ -36,7 +36,7 @@ import socks
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
# Some sites blocks default python User-agent
|
# Some sites blocks default python User-agent
|
||||||
user_agent = 'Mozilla/5.0'
|
user_agent = 'Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Firefox/38.0'
|
||||||
headers = {'User-Agent': user_agent}
|
headers = {'User-Agent': user_agent}
|
||||||
# SOCKS5 Proxy support
|
# SOCKS5 Proxy support
|
||||||
if os.environ.has_key("sock_proxy") and len(os.environ["sock_proxy"].strip()) > 0:
|
if os.environ.has_key("sock_proxy") and len(os.environ["sock_proxy"].strip()) > 0:
|
||||||
|
@ -36,7 +36,7 @@ import socks
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
# Some sites blocks default python User-agent
|
# Some sites blocks default python User-agent
|
||||||
user_agent = 'Mozilla/5.0'
|
user_agent = 'Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Firefox/38.0'
|
||||||
headers = {'User-Agent': user_agent}
|
headers = {'User-Agent': user_agent}
|
||||||
# SOCKS5 Proxy support
|
# SOCKS5 Proxy support
|
||||||
if "sock_proxy" in os.environ and len(os.environ["sock_proxy"].strip()) > 0:
|
if "sock_proxy" in os.environ and len(os.environ["sock_proxy"].strip()) > 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user