Linux
리눅스 - curl/시스템 웹 프록시 설정
올엠
2024. 2. 23. 14:53
반응형
보통 회사에서는 웹 프록시를 이용해서 정상적으로 웹 서비스 이용이 가능한 경우가 많다.
이를 위해서 시스템에서 제공하는 기본 설정이 바로 http_proxy, https_proxy 환경 변수 이다.
export http_proxy=http://proxy_host:port
export https_proxy=http://proxy_host:port
이 값의 위와 같이 설정하면 된다. 만약 계정 정보가 필요한 경우 아래와 같이 설정하자.
export http_proxy=http://user:pass@proxy_host:port
export https_proxy=http://user:pass@proxy_host:port
/etc/environment 혹은 /etc/profile 에 설정하면, 매번 새로 설정할 필요 없이 유지 된다.

CURL
curl --proxy proxy_host:port asecurity.dev
반응형