当前位置:网站首页>正向代理和反向代理快速理解
正向代理和反向代理快速理解
2022-07-01 01:01:00 【御剑长歌】
正向代理(Forward Proxy)
正向代理是指用户利用代理服务器访问目标服务器
代理服务器面向用户
常见情景
加速访问
像游戏加速器,各种代理软件,就是利用正向代理的原理。例如访问 GitHub, 原本的网络访问速度会比较慢,通过国外的代理服务器就可以达到加速的目的。代理访问
软件开发中,对接了一些服务,服务设置了 ip 白名单,只能通过特定 ip 去访问服务,这时通过代理的方式就可以从本地请求,方便开发与测试。
反向代理
正向代理代理的是用户,而反向代理则相反,代理对象是目标服务器,是指服务端利用代理服务器给用户提供服务。
和正向代理相比,二者都是利用代理服务器实现的,不过反向代理的主语是服务端,所以说反向代理对于用户来说是透明的,在用户的视野里,代理服务器便是目标服务器。

企业级应用中都为后端服务配置反向代理,例如常见的 nginx ,还有 LVS/F5 等。
总结
正向代理需要客户端来配置,一般来说我们会通过浏览器或者操作系统提供的工具或者界面来配置。这个时候,代理对客户端不是透明的,客户端需要知道代理的地址并且手动配置。配置了代理,浏览器在发送请求的时候会对报文做特殊的修改。
反向代理对客户端是透明的,也就是说客户端一般不知道代理的存在,认为自己是直接和服务器通信。我们大部分访问的网站就是反向代理服务器,反向代理服务器会转发到真正的服务器,一般在反向代理这一层实现负载均衡和高可用的功能。而且这里也可以看到,客户端是不会知道真正服务器端的 ip 地址和端口的,这在一定程度上起到了安全保护的作用
边栏推荐
- [Qt5 basic \u 1] starting from 0, Mr. Detian will study with you - Introduction to the window
- PHP通过第三方插件爬取数据
- Using recyclerreview to show banner is very simple
- Basic knowledge II - Basic definitions related to sta
- 图灵奖得主LeCun指明AI未来的出路在于自主学习,这家公司已踏上征途
- Microbiological health, why is food microbiological testing important
- 【Qt5-基础篇_1】从0开始,德天老师和你一起学习——窗口简介
- 关于白盒测试,这些技巧你得游刃有余~
- Working for eight years as a programmer, but with a salary of three years after graduation, it's too late to be enlightened again
- Compile and install oh my Zsh
猜你喜欢

远程办公如何保持高效协同,实现项目稳定增长 |社区征文

3dsmax plug-in development traversal node object and object acquisition and inode transformation matrix description

Microbiological health, why is food microbiological testing important

Introduction and principle analysis of cluster and LVS

Digital IC design process summary

Exploration and practice of "flow batch integration" in JD

【qt5-tab标签精讲】Tab标签及内容分层解析

未来的 Web3会带来什么?

Use of typora

Necessary tools for testing - postman practical tutorial
随机推荐
3dsmax插件开发遍历节点对象和Object获取及INode变换矩阵说明
Laravel+redis generates an order number - automatically increase from 1 on the same day
laravel 事件 & 监听
Composants de la grille de données portatifs
Connectivity basis of Graphs
工作八年的程序员,却拿着毕业三年的工资,再不开窍就真晚了...
生意和投资的思考
【模拟】922. Sort Array By Parity II
一站式洞察行业热点,飞瓜数据B站新功能「流量大盘」上线!
流批一体在京东的探索与实践
TypeError: Argument ‘angle‘ can not be treated as a double
Some items of OCR
laravel 事件 & 订阅
Sun Yuchen told Swiss media Bilan that the bear market will not last long
为什么要搭建个人博客
小程序中实现excel数据的批量导入
微研所,微生物检验中常用的生化反应
Microbiological health, why is food microbiological testing important
MFC TCP communication server client demo notes vs2019
[stack] 921 Minimum Add to Make Parentheses Valid