diff --git a/doc/src/code/index.rst b/doc/src/code/index.rst index 4dbae9c1..41f9b963 100644 --- a/doc/src/code/index.rst +++ b/doc/src/code/index.rst @@ -51,7 +51,6 @@ according to the URL scheme. "1" -> "13" [arrowhead="empty", arrowtail="none"]; "2" -> "13" [arrowhead="empty", arrowtail="none"]; "3" -> "6" [arrowhead="empty", arrowtail="none"]; - "3" -> "10" [arrowhead="empty", arrowtail="none"]; "4" -> "6" [arrowhead="empty", arrowtail="none"]; "4" -> "10" [arrowhead="empty", arrowtail="none"]; "5" -> "12" [arrowhead="empty", arrowtail="none"]; diff --git a/doc/src/man/linkchecker.rst b/doc/src/man/linkchecker.rst index 641ce2e7..e0138b47 100644 --- a/doc/src/man/linkchecker.rst +++ b/doc/src/man/linkchecker.rst @@ -325,9 +325,9 @@ and one to all URLs starting with **https://example.org/**: PROXY SUPPORT ------------- -To use a proxy on Unix or Windows set the :envvar:`http_proxy`, :envvar:`https_proxy` or -:envvar:`ftp_proxy` environment variables to the proxy URL. The URL should be of -the form +To use a proxy on Unix or Windows set the :envvar:`http_proxy` or +:envvar:`https_proxy` environment variables to the proxy URL. The URL should be +of the form **http://**\ [*user*\ **:**\ *pass*\ **@**]\ *host*\ [**:**\ *port*]. LinkChecker also detects manual proxy settings of Internet Explorer under Windows systems, and GNOME or KDE on Linux systems. On a Mac use diff --git a/doc/upgrading.txt b/doc/upgrading.txt index 7f5ad463..4c77f1da 100644 --- a/doc/upgrading.txt +++ b/doc/upgrading.txt @@ -5,6 +5,8 @@ Migrating from 10.0 to 10.x If installing from source and application translations are needed the Python polib package is required to be installed before LinkChecker is installed. +The environment variable ftp_proxy is no longer supported. + Migrating from 9.x to 10.0 -------------------------- Python 3.6 or newer is required. diff --git a/linkcheck/checker/ftpurl.py b/linkcheck/checker/ftpurl.py index 2d6844a3..c368ae94 100644 --- a/linkcheck/checker/ftpurl.py +++ b/linkcheck/checker/ftpurl.py @@ -21,11 +21,11 @@ import ftplib from io import StringIO from .. import log, LOG_CHECK, LinkCheckerError, mimeutil -from . import proxysupport, httpurl, internpaturl, get_index_html +from . import internpaturl, get_index_html from .const import WARN_FTP_MISSING_SLASH -class FtpUrl(internpaturl.InternPatternUrl, proxysupport.ProxySupport): +class FtpUrl(internpaturl.InternPatternUrl): """ Url link with ftp scheme. """ @@ -43,25 +43,8 @@ class FtpUrl(internpaturl.InternPatternUrl, proxysupport.ProxySupport): def check_connection(self): """ - In case of proxy, delegate to HttpUrl. Else check in this - order: login, changing directory, list the file. + Check in this order: login, changing directory, list the file. """ - # proxy support (we support only http) - self.set_proxy(self.aggregate.config["proxy"].get(self.scheme)) - if self.proxy: - # using a (HTTP) proxy - http = httpurl.HttpUrl( - self.base_url, - self.recursion_level, - self.aggregate, - parent_url=self.parent_url, - base_ref=self.base_ref, - line=self.line, - column=self.column, - name=self.name, - ) - http.build_url() - return http.check() self.login() self.negotiate_encoding() self.filename = self.cwd() diff --git a/linkcheck/configuration/__init__.py b/linkcheck/configuration/__init__.py index 4bb8175a..df808f52 100644 --- a/linkcheck/configuration/__init__.py +++ b/linkcheck/configuration/__init__.py @@ -333,10 +333,6 @@ class Configuration(dict): http_proxy = get_gnome_proxy() or get_kde_http_proxy() if http_proxy: self["proxy"]["http"] = http_proxy - if "ftp" not in self["proxy"]: - ftp_proxy = get_gnome_proxy(protocol="FTP") or get_kde_ftp_proxy() - if ftp_proxy: - self["proxy"]["ftp"] = ftp_proxy def sanitize_plugins(self): """Ensure each plugin is configurable.""" @@ -482,15 +478,6 @@ def get_kde_http_proxy(): log.debug(LOG_CHECK, "error getting HTTP proxy from KDE: %s", msg) -def get_kde_ftp_proxy(): - """Return host:port for KDE HTTP proxy if found, else None.""" - try: - data = read_kioslaverc() - return data.get("ftp_proxy") - except Exception as msg: - log.debug(LOG_CHECK, "error getting FTP proxy from KDE: %s", msg) - - # The following KDE functions are largely ported and ajusted from # Google Chromium: # http://src.chromium.org/viewvc/chrome/trunk/src/net/proxy/proxy_config_service_linux.cc?revision=HEAD&view=markup @@ -610,8 +597,6 @@ def add_kde_setting(key, value, data): add_kde_proxy("http_proxy", value, data) elif key == "httpsProxy": add_kde_proxy("https_proxy", value, data) - elif key == "ftpProxy": - add_kde_proxy("ftp_proxy", value, data) elif key == "ReversedException": if value == "true": value = True @@ -650,13 +635,13 @@ def resolve_kde_settings(data): if "mode" not in data: return if data["mode"] == "indirect": - for key in ("http_proxy", "https_proxy", "ftp_proxy"): + for key in ("http_proxy", "https_proxy"): if key in data: resolve_indirect(data, key) if "ignore_hosts" in data: resolve_indirect(data, "ignore_hosts", splithosts=True) elif data["mode"] != "manual": # unsupported config - for key in ("http_proxy", "https_proxy", "ftp_proxy"): + for key in ("http_proxy", "https_proxy"): if key in data: del data[key] diff --git a/linkcheck/director/console.py b/linkcheck/director/console.py index 9ad8dbc5..7f7da8f2 100644 --- a/linkcheck/director/console.py +++ b/linkcheck/director/console.py @@ -105,7 +105,7 @@ def print_env_info(key, out=stderr): def print_proxy_info(out=stderr): """Print proxy info.""" - for key in ("http_proxy", "ftp_proxy", "no_proxy"): + for key in ("http_proxy", "no_proxy"): print_env_info(key, out=out)