首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >理解CoAP代理

理解CoAP代理
EN

Stack Overflow用户
提问于 2019-12-23 10:16:39
回答 1查看 1.3K关注 0票数 1

根据CoAP规范RFC7252 5.7节,存在两种类型的CoAP代理,即正向代理和反向代理。与此定义正交的代理可以是CoAP或HTTP代理。

根据这些定义,我有以下问题:

  1. 这些代理类型(前向代理、反向代理、CoAP-CoAP和HTTP)必须使用的用例是什么?
  2. 这些用例中的代理究竟是什么?
  3. 为了完成任务,每个代理需要CoAP消息的哪一部分?(我假设代理会查看一些CoAP选项?)
  4. 代理在哪里运行?在边界路由器上?

很好,如果有人能够提供除上述问题的答案之外,还有良好的尊敬和例子。

EN

回答 1

Stack Overflow用户

发布于 2019-12-23 11:00:07

  1. 代理时间的一些用例是:
代码语言:javascript
复制
- Forward proxies: Escaping a restrictive firewall (eg. because outgoing connections are blocked unless they go through a proxy); a special case thereof is accessing resources on CoAP from within a browser, when a CoAP-over-WebSocket server is used as a forward proxy.
- Reverse proxies: Roughly the same as for forward proxies but in the reverse direction (ie. if the server is in a firewalled network, there can be a reverse proxy running on the firewall that lets requests in selectively). Additionally, reverse proxies can be used for load balancing on the unconstrained server side.
- HTTP-CoAP-proxies: Accessing CoAP devices from programming environments that don't have good CoAP support (eg. if your monitoring system supports polling a HTTP server, a H-C proxy easily allows monitoring your CoAP servers).
- CoAP-HTTP proxies: Making services on the big web available to constrained devices (eg. querying a weather forecast). This is often of limited use as those web services don't use data formats suitable for a constrained device.

  1. 这在不同的情况下几乎不一样;除了明显的(来回转换CoAP和HTTP的交叉代理)之外,正代理和反向代理只在它们对带有代理-*选项(通常是代理-方案)集的消息(前向代理)或没有(反向代理)的消息作出反应时才有区别。
  2. 所有的代理都需要检查完整的信息。所有标题字段和查看所有选项)。大多数标题字段(令牌、消息ID、mtype在某种程度上)和几个选项(例如。逐个观察.服务器对它们进行操作,并为转发的请求创建新值。如果消息中有任何内容,代理将需要理解,但不能理解(即。未知代理-不安全选项),它拒绝转发。
  3. 这完全取决于应用程序,但在大多数常见示例中,这将是某种边界路由器;可以是6LoWPAN场景中的6LBR,也可以是更大设置的防火墙。在端点与CoAP世界其他部分之间路由的情况下,服务器通常运行在同时服务于使用套接字的web应用程序的同一台机器上。
票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59453545

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档