Here Export Command is used to set Proxy Environment Variables in Linux Servers.
Syntax:
export "http_proxy=http://username:password@proxy.example.com:port_no/"
export "https_proxy=https://username:password@proxy.example.com:port_no/"
Note : If password contains Reserved charecters, need to replace with respective percent-encoding.
Reserved characters and Percent-encoding
! - %21
# - %23
$ - %24
& - %26
' - %27
( - %28
) - %29
* - %2A
+ - %2B
, - %2C
/ - %2F
: - %3A
; - %3B
= - %3D
? - %3F
@ - %40
[ - %5B
] - %5D
Check the proxy server settings by running env command.
[root@puppetlabs ~]# env | grep -i proxy
If we want to remove proxy variables. Run unset command.
[root@puppetlabs ~]# unset http_proxy
[root@puppetlabs ~]# unset https_proxy
Syntax:
export "http_proxy=http://username:password@proxy.example.com:port_no/"
export "https_proxy=https://username:password@proxy.example.com:port_no/"
Note : If password contains Reserved charecters, need to replace with respective percent-encoding.
Reserved characters and Percent-encoding
! - %21
# - %23
$ - %24
& - %26
' - %27
( - %28
) - %29
* - %2A
+ - %2B
, - %2C
/ - %2F
: - %3A
; - %3B
= - %3D
? - %3F
@ - %40
[ - %5B
] - %5D
Check the proxy server settings by running env command.
[root@puppetlabs ~]# env | grep -i proxy
If we want to remove proxy variables. Run unset command.
[root@puppetlabs ~]# unset http_proxy
[root@puppetlabs ~]# unset https_proxy