Writing an apt proxy conf file /etc/apt/apt.conf.d/proxy.conf
as below.
Acquire::http::Proxy "socks5h://127.0.0.1:1080";
Acquire::https::Proxy "socks5h://127.0.0.1:1080";
Acquire::socks::Proxy "socks5h://127.0.0.1:1080";
And the proxy settings will be applied the next time we run apt.
References: https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-set-the-proxy-for-apt-for-ubuntu-18-04/
Ign:1 https://download.docker.com/linux/ubuntu jammy InRelease
Hit:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Ign:1 https://download.docker.com/linux/ubuntu jammy InRelease
Ign:1 https://download.docker.com/linux/ubuntu jammy InRelease
Err:1 https://download.docker.com/linux/ubuntu jammy InRelease
Could not handshake: The TLS connection was non-properly terminated. [IP: 192.168.124.5 10810]