How to set proxy for terminal

Introduction

Sometimes we can’t connect forigen website without proxy, we can set chrome with omega proxy, but for local we can’t use it. This document will introduce how to set proxy in terminate.

Set proxy in terminal

Add the following command in .bashrc or .zshrc file

alias hp="https_proxy=\"http://10.27.7.110:8080\" http_proxy=\"http://10.27.7.110
:8080\""

When you want to run a command need proxy, you should run the following command:

hp shell_command

Test

hp curl cip.cc
Built with Hugo
Theme Stack designed by Jimmy