Ubuntu 代理设置与取消
终端命令行;
设置代理:
export http_proxy=http://172.16.2.16:3199
export https_proxy=http://172.16.2.16:3199
取消代理设置:
unset http_proxy
unset https_proxy
演示:
book@ubuntu:~/pt1416/02-hellogolang/grpcTest/client$ go run client.go
2022/03/30 17:09:01 err where calling sayHello:rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing failed to do connect handshake, response: \"HTTP/1.1 403 Forbidden\\r\\nContent-Length: 333\\r\\nCache-Control: no-cache\\r\\nConnection: keep-alive\\r\\nContent-Type: text/html\\r\\nPragma: no-cache\\r\\n\\r\\n<!DOCTYPE html>\\n<html>\\n\\t<head> <title>COW Proxy</title> </head>\\n\\t<body>\\n\\t\\t<h1>[Error] Forbidden tunnel port</h1>\\n\\t\\t<p>HTTP Request <strong>CONNECT :9000</strong></p> <p>Please contact proxy admin.</p>\\n\\t\\t<hr />\\n\\t\\tGenerated by <i>COW 0.9.8</i> <br />\\n\\t\\tHost <i>it-cowproxy-master</i> <br />\\n\\t\\tWed Mar 30 17:09:01 2022\\n\\t</body>\\n</html>\\n\""
exit status 1
book@ubuntu:~/pt1416/02-hellogolang/grpcTest/client$ unset https_proxy
book@ubuntu:~/pt1416/02-hellogolang/grpcTest/client$ go run client.go
2022/03/30 17:09:54 err where calling sayHello:rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing failed to do connect handshake, response: \"HTTP/1.1 403 Forbidden\\r\\nContent-Length: 333\\r\\nCache-Control: no-cache\\r\\nConnection: keep-alive\\r\\nContent-Type: text/html\\r\\nPragma: no-cache\\r\\n\\r\\n<!DOCTYPE html>\\n<html>\\n\\t<head> <title>COW Proxy</title> </head>\\n\\t<body>\\n\\t\\t<h1>[Error] Forbidden tunnel port</h1>\\n\\t\\t<p>HTTP Request <strong>CONNECT :9000</strong></p> <p>Please contact proxy admin.</p>\\n\\t\\t<hr />\\n\\t\\tGenerated by <i>COW 0.9.8</i> <br />\\n\\t\\tHost <i>it-cowproxy-master</i> <br />\\n\\t\\tWed Mar 30 17:09:54 2022\\n\\t</body>\\n</html>\\n\""
exit status 1
book@ubuntu:~/pt1416/02-hellogolang/grpcTest/client$ unset http_proxy
book@ubuntu:~/pt1416/02-hellogolang/grpcTest/client$ go run client.go
2022/03/30 17:10:00 respond from Server :Hello from the server!
book@ubuntu:~/pt1416/02-hellogolang/grpcTest/client$
Ubuntu 代理设置与取消相关推荐
- 浏览器代理设置和取消代理
网络能够正常访问,但是浏览器打不开,QQ 可以正常上网.可以 ping的通网络.浏览器没有出现报错情况下 第一种 判首先查看浏览器是否开启了代理, (如果是,就取消代理):操作步骤按照箭头点击鼠标 ...
- Ubuntu 代理上网设置
一.Firefox代理上网 这个最简单了,依次点击 edit->preferences-> Advanced->network->settings 在里面填写代理服务器的IP, ...
- git设置和取消代理
git设置和取消代理 转载于 git 设置和取消代理 - 削微寒 - 博客园 # 设置ss git config -global http.proxy 'socks5://127.0.0.1:1080 ...
- Ubuntu下Apache反向代理设置
Apache可通过mod_proxy*.so系列模块很好的实现正向.反向代理功能,亦可通过反向代理实现负载均衡,本文将讲述基于Apache反向代理实现负载均衡的配置方法. 1.环境配置说明: 代理服务 ...
- GitHub 设置和取消代理,加速 git clone
GitHub 设置和取消代理,加速 git clone git 设置代理: git config --global http.proxy http://127.0.0.1:1080 git 取消代理: ...
- ubuntu proxy(代理)设置全局
ubuntu的代理设置好了之后,发现终端的代理没有起作用 可以直接在/etc/enviroment文件中直接加入代理信息: export https_proxy='https://proxy_ip:p ...
- vmware Ubuntu虚拟机设置代理
1.虚拟机设置代理 打开Ubuntu的设置,并点击Network->Network Proxy选择Manual,并填写代理地址. 其中ip可以直接在主机上查看.要用VMware那个IP. 2.V ...
- git配置取消代理_git 设置和取消代理
git 设置和取消代理 # 设置ss git config --global http.proxy 'socks5://127.0.0.1:1080' git config --global http ...
- ubuntu 虚拟机设置全局代理 windows 上网环境
ubuntu 虚拟机设置全局代理 windows 上网环境 背景 准备工作 STEP 1:启用 windows 上代理的"允许来自局域网连接" STEP 2:设置虚拟机为桥接模式 ...
最新文章
- CentOS-7.2、7.5模板机制作
- OPNsense 18.7.X汉化包发布!
- mvc4站点支持.html
- 要学会Python爬虫都需要什么基础呢?
- java链表需要自己编写么_基于java的链表基础操作
- Android开发中activity切换动画的实现
- shell两个时间字符串插值_Shell 脚本速成
- 机器学习中的决策树算法
- Difference between natural join and inner join
- 3)Allegro PCB Router Tutorial自动布线入门
- MATLAB基本语法
- 谷歌开源 ClusterFuzz,自动化查找并修复 bug
- [工具使用]SqlMap
- 带你走进 ERNIE
- C/C++指向指针的指针、指向数组的指针以及存放指针的数组
- 为什么华为a1路由器网速变慢_凭什么网速就比别人快?华为路由 A1 畅享版体验...
- AE基础教程第一阶段——22旋转动画初体验
- springboot曦乐苹果园林管理系统的设计与实现100854
- Python爬虫实现抓取腾讯视频所有电影-源码【实战必学】
- android 游戏 实战打飞机游戏 菜单页面(1)