What is being proxied?
A client asks a proxy to retrieve or update a resource somewhere else. The proxy is a CoAP endpoint, not just a packet forwarder.
Animate RFC 7252 forward proxies, reverse proxies, cache freshness, Proxy-Uri, Proxy-Scheme, and HTTP/CoAP cross-proxy translation.
Follow a request through a constrained-network proxy. Compare forward proxy requests that carry
Proxy-Uri, reverse proxy namespace mapping, cache hits, ETag revalidation, and HTTP/CoAP
cross-proxy translation.
A forward proxy consumes the proxy option, builds an origin request, and returns the origin response or a cache response.
The client sends a normal CoAP message to the proxy endpoint, but the target resource is carried in a proxy option.
Compare what arrives at the proxy with what is forwarded to the origin. Forward-proxy options are not blindly passed onward.
Cross-proxies map application semantics. CoAP CON/NON message mechanics stay on the CoAP side and are not exposed as HTTP behavior.
The same request can produce a network fetch, a cache hit, a validation request, or a gateway error depending on freshness and proxy support.
Cacheable 2.05 Content response.
Max-Age remaining is reduced before sending cached responses.
Secure URI requests should use DTLS, or equivalent security, to the proxy.
Cache hits avoid waking the constrained sensor for repeat GETs.
Read the flow as a proxy implementer: option parsing, cache lookup, upstream request, response code mapping, and returned Max-Age.
A client asks a proxy to retrieve or update a resource somewhere else. The proxy is a CoAP endpoint, not just a packet forwarder.
It can bridge protocols, hide constrained devices behind a gateway, cache safe responses, and enforce a security boundary.
Watch where the URI is named, whether the proxy contacts the origin, and whether the response code is generated by the origin or proxy.
Proxy-Uri is an absolute URI and takes precedence over Uri-Host, Uri-Port, Uri-Path, and Uri-Query.Proxy-Scheme can construct the absolute URI from split URI options when the target can be expressed that way.Proxy-Uri or Proxy-Scheme; it is not forwarded to the origin server in a normal CoAP-to-CoAP proxy exchange.2.05 Content response to GET is cacheable.Max-Age defaults to 60 seconds if omitted; Max-Age: 0 prevents reuse without revalidation.4.02 Bad Option at the proxy.5.04 Gateway Timeout; an unprocessable origin response maps to 5.02 Bad Gateway.If the client explicitly names the origin in Proxy-Uri, it is using a forward proxy. If the proxy maps its own resource path to an internal server, it is acting as a reverse proxy.
Set cached age lower than Max-Age and step the fresh-cache scenario. Then increase age beyond Max-Age and compare the revalidation scenario.
Use the timeout and unsafe-option scenarios to separate errors generated by the proxy from errors returned by the origin resource.