Проблема подключения через прокси сервер заключается в некорректном парсинге строк из файла /etc/apt/apt.conf или переменной окружения http_proxy, когда устанавливаемый пароль содержит символ @(0x40) Предусматривается использование в формате Acquire::http::Proxy "http://[user[:pass]@]host[:port]/"; Если в /etc/apt/apt.conf установлены параметры Acquire::http::proxy "test:P@ssw0rd@10.0.5.213:3128/"; или установлена переменная http_proxy=http://test:P@ssw0rd@10.0.5.213:3128/ выдается ошибка # apt-get update Ошибка http://mirror.yandex.ru p9/branch/x86_64 release Could not resolve 'ssw0rd@10.0.5.213' Ошибка http://mirror.yandex.ru p9/branch/x86_64-i586 release Could not resolve 'ssw0rd@10.0.5.213' Замена символа @ на %40, также как использование \@, результата не дает. По аналогии проблема может также касаться записей Acquire::ftp::Proxy "ftp://[user[:pass]@]host[:port]/"; Acquire::rsync::proxy="[user[:pass]@]host[:port]";
В /etc/apt/apt.conf прописано - Acquire::http::proxy "http://test:P@ssw0rd@10.0.5.213:3128/" вместо "test:P@ssw0rd@10.0.5.213:3128/"
apt/apt-pkg/contrib/strutl.cc +1063
ping
(In reply to Andrey Cherepanov from comment #3) > ping проверю и исправлю в ближайшем релизе с HTTPS over http_proxy (хочу сегодня отправить в Sisyphus), спасибо за напоминание!
apt-0.5.15lorg2-alt92 -> sisyphus: Wed Apr 16 2025 Ivan Zakharyaschev <imz@altlinux> 0.5.15lorg2-alt92 - Support encoded usernames and passwords in URIs (incl. http_proxy); it was impossible to have @ there; now one should write %40 (ALT#38277). - Get config values with percent (%) correct in methods (e.g., a password as above in Acquire::http::Proxy). More generally: for correct decoding, do always encode percent (%) when %-encoding strings (in any URIs etc). - Backported the fixes from Debian 0.9.8~3 (IPv6 literals; encode passwords): + properly escape IP-literals (e.g. IPv6 address) in HTTP requests (allows using IPv6 numeric addresses in sources.list) (ALT#34000); + %-encode username and password when writing URIs (doesn't help alone with reading URIs as in the case of http_proxy above, but normalizes output); + include port in shortened URIs (e.g. with apt-cache policy). - testcases: Multiplied http-related ones to test these kinds of connections. - Some HTTP tweaks from Debian: + quote spaces ( ) and plus (+) in filenames (0.9.8~48); + do not send keep-alive (HTTP/1.1 default) (0.9.9.3~4^2).