首页 > 系统相关 >Linux配置代理

Linux配置代理

时间:2023-02-08 15:36:21浏览次数:38  
标签:http 配置 代理 proxyServer export proxy Linux port

临时代理

# http代理 
export http_proxy="http://proxyServer:port/"
export http_proxy="socks4://proxyServer:port/" #协议不同
# https代理
export https_proxy="https:/proxyServer:port/"
# 全局代理
export all_proxy="http://proxyServer:port/"
# ftp代理
export ftp_proxy="http://proxyServer:port/"
# 指定不走代理的域名或者ip
export no_proxy="127.0.0.1,192.168.124.0/16,*.example.com"

永久代理

# 在/etc/profile添加以下内容
# http代理 
export http_proxy="http://proxyServer:port/"
export http_proxy="socks4://proxyServer:port/"
# https代理
export https_proxy="https:/proxyServer:port/"
# 全局代理
export all_proxy="http://proxyServer:port/"
# ftp代理
export ftp_proxy="http://proxyServer:port/"
# 指定不走代理的域名或者ip
export no_proxy="127.0.0.1,192.168.124.0/16,*.example.com"

取消代理(临时取消)

# 取消http代理  
unset http_proxy
# 取消https代理   
unset https_proxy
# 取消ftp代理   
unset ftp_proxy

代理需要用户名密码

# 协议://用户名:密码@代理服务器ip(域名):端口
export http_proxy="http://username:password@proxyServer:port/"

标签:http,配置,代理,proxyServer,export,proxy,Linux,port
From: https://www.cnblogs.com/jruing/p/17101924.html

相关文章

  • vue中eslint的配置
    创建eslint.js文件/或在eslint.js文件中配置以下文件//eslint配置文件module.exports={root:true,env:{node:true},extends:['plugin:vue/e......
  • 使用Android studio配置软件签名,并在车机安装
    系统级APP,可在Androidmanifest.xml中配置属性,并使用系统级签名。1.签名方式1.1bulid.gradle(:app)中添加签名信息 1.2使用Androidstudio单独生成......
  • Linux基础第一章:基础知识与基础命令3
    一、基础命令1、mv命令①mv命令在不改变文件路径时是为改名,如下图。  ②mv命令在改变文件路径的情况下是剪切或移动,如下图。  2、rename命令mv命令在更改文......
  • Linux之Centos7内核版本升级
    参考文档https://blog.csdn.net/carefree2005/article/details/1148198851、内核升级步骤1)、查看可升级版本使用命令yumlistkernel可以查看已安装的内核版本和可以升级......
  • Linux上git pull等操作需要每次都输入用户名和密码等问题
    在linux上拉取项目代码后,发现每次gitpull都需要输入用户名和密码,设置全局的都没有用,终于找到解决方法,直接用以下的命令即可。gitconfig--globalcredential.helpersto......
  • 【Elasticsearch】介绍、使用、配置、中文分词器、Kibana
    Elastic 概述Elastic官网:​​免费且开放的搜索:Elasticsearch、ELK和Kibana的开发者|Elastic​​ Elastic有一条完整的产品线:Elasticsearch、Kibana、Logstash等,前面......
  • Nacos注册中心 (介绍与配置)
    Nacos注册中心和Euraka一样都是注册中心,但Nacos不需要注册Nacos,因为阿里巴巴已经注册在好了。只需要下载安装后打开即可Windows安装开发阶段采用单机安装即可1.1.下......
  • Linux系统运维-服务
    NFS会经常用到,用于在网络上共享存储。我举个例子给伙伴们简单说下NFS共享存储的用法。比如:假如有三台机器A,B,C,它们需要访问同一个目录,目录中都是图片,传统的做法是把这......
  • ruoyi-cloud微服务在Linux中使用docker-compose部署
    ruoyi-cloud微服务docker-compose部署前置说明**在本地安装虚拟机请务必给虚拟机分配足够内存!!!,**否则服务可能会在启动中挂掉分配4G内存我这边是够的,具体需要分配......
  • Linux安装python3
    一、安装依赖环境输入命令:yum-yinstall zlib-develbzip2-developenssl-develncurses-develsqlite-develreadline-develtk-develgdbm-develdb4-devellibpcap-d......