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

企业级应用中都为后端服务配置反向代理,例如常见的 nginx ,还有 LVS/F5 等。
总结
正向代理需要客户端来配置,一般来说我们会通过浏览器或者操作系统提供的工具或者界面来配置。这个时候,代理对客户端不是透明的,客户端需要知道代理的地址并且手动配置。配置了代理,浏览器在发送请求的时候会对报文做特殊的修改。
反向代理对客户端是透明的,也就是说客户端一般不知道代理的存在,认为自己是直接和服务器通信。我们大部分访问的网站就是反向代理服务器,反向代理服务器会转发到真正的服务器,一般在反向代理这一层实现负载均衡和高可用的功能。而且这里也可以看到,客户端是不会知道真正服务器端的 ip 地址和端口的,这在一定程度上起到了安全保护的作用
边栏推荐
- 测试必备工具-Postman实战教程
- flutter报错 -- The argument type ‘Function‘ can‘t be assigned to the parameter type ‘void Function()?‘
- Open3d point cloud color rendering
- 【动态规划】路径dp:931. Minimum Falling Path Sum
- laravel+redis 生成订单号-当天从1开始自增
- Service grid ASM year end summary: how do end users use the service grid?
- Service grid ASM year end summary: how do end users use the service grid?
- [Qt5 basic \u 1] starting from 0, Mr. Detian will study with you - Introduction to the window
- Laravel+redis generates an order number - automatically increase from 1 on the same day
- 【模拟】922. Sort Array By Parity II
猜你喜欢

Complete software development process

Uniapp official component clicking item is invalid, solution

测试必备工具-Postman实战教程

Basic knowledge 3 - standard unit library

工作6年,来盘点一下职场人混迹职场的黄金法则

小程序中实现excel数据的批量导入

Neo4j installation, operation, project construction and function realization

Call the classic architecture and build the model based on the classic

Looksrare team's "cash out" caused disturbance

日志 logrus第三方库的使用
随机推荐
Strictmode jamming and leakage detection -strictmode principle (2)
Zero of DC learning notes -- overview and basic process introduction
孙宇晨接受瑞士媒体Bilan采访:熊市不会持续太久
KS009基于SSH实现宠物管理系统
Qt5 mvc: revealing the secrets of data visualization
一站式洞察行业热点,飞瓜数据B站新功能「流量大盘」上线!
[simulation] 922 Sort Array By Parity II
Use of typora
Construction and beautification of personal blog
neo4j安装、运行以及项目的构建和功能实现
1500w播放下还藏着什么热点?B站2个未来趋势你不得错过
PHP crawls data through third-party plug-ins
TypeError: can‘t convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to
php将二维数组元素转为键值对
测试必备工具-Postman实战教程
迪赛智慧数——其他图表(平行坐标图):2021年应届专业就业情况
图的连通性基础
农产品换房?“变相”购房补贴!
C# 自定义并动态切换光标
With regard to the white box test, you have to master these skills~