[SOLVED] Proxy settings GUI does not work in Shell

giovannivl

New Member
Apr 12, 2023
8
1
3
Hi All,

I've already config the url proxy via Datacenter - Options - Proxy, so my CT templates downloads works:

Bash:
downloading http://download.proxmox.com/images/system/ubuntu-22.04-standard_22.04-1_amd64.tar.zst to /var/lib/vz/template/cache/ubuntu-22.04-standard_22.04-1_amd64.tar.zst
--2023-08-09 07:06:33--  http://download.proxmox.com/images/system/ubuntu-22.04-standard_22.04-1_amd64.tar.zst
Resolving <proxy_info> (<proxy_info>)... <proxy_ip>
Connecting to <proxy_info> (<proxy_info>)|<proxy_ip>|:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: 129824858 (124M) [application/octet-stream]
Saving to: '/var/lib/vz/template/cache/ubuntu-22.04-standard_22.04-1_amd64.tar.zst.tmp.1554'

But, inside shell in the same node, I can not get connection, like
Code:
curl -I http://google.com
does not work.

How need I configure http proxy to work in shell-Node, Thanks!
 
Hi,

the shell is a normal system shell, without special configurations. The proxy you set up in the Datacenter options is used automatically for operations performed by PVE services.

If you want to use it yourself in e.g. your curl command above, you need to specify it. Seeman curl for what, there is the -x (or --proxy) for that:
Code:
-x, --proxy [protocol://]host[:port]
    Use the specified proxy.

   The proxy string can be specified with a protocol:// prefix. No protocol specified or http:// 
   will be treated as HTTP proxy. Use socks4://, socks4a://, socks5:// or socks5h:// to request a 
   specific SOCKS version to be used.

   Unix domain sockets are supported for socks proxy. Set localhost for the host part. e.g. 
   socks5h://localhost/path/to/socket.sock

   HTTPS proxy support via https:// protocol prefix was added in 7.52.0 for OpenSSL, GnuTLS and NSS.

Hope this helps!
 
  • Like
Reactions: giovannivl
Hi,

the shell is a normal system shell, without special configurations. The proxy you set up in the Datacenter options is used automatically for operations performed by PVE services.

If you want to use it yourself in e.g. your curl command above, you need to specify it. Seeman curl for what, there is the -x (or --proxy) for that:
Code:
-x, --proxy [protocol://]host[:port]
    Use the specified proxy.

   The proxy string can be specified with a protocol:// prefix. No protocol specified or http://
   will be treated as HTTP proxy. Use socks4://, socks4a://, socks5:// or socks5h:// to request a
   specific SOCKS version to be used.

   Unix domain sockets are supported for socks proxy. Set localhost for the host part. e.g.
   socks5h://localhost/path/to/socket.sock

   HTTPS proxy support via https:// protocol prefix was added in 7.52.0 for OpenSSL, GnuTLS and NSS.

Hope this helps!
Thanks!!! I supposed that configuration works for everything, so I will need read more about every command that I need to use.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!