Home / Function/ handleProxyProtocol() — netty Function Reference

handleProxyProtocol() — netty Function Reference

Architecture documentation for the handleProxyProtocol() function in HttpProxyServer.java from the netty codebase.

Function java Buffer Allocators calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  91005a3a_7b43_4ee7_4384_456793529f8a["handleProxyProtocol()"]
  9524a40e_7347_772c_235c_c78f441b7632["HttpIntermediaryHandler"]
  91005a3a_7b43_4ee7_4384_456793529f8a -->|defined in| 9524a40e_7347_772c_235c_c78f441b7632
  0b96569d_afe9_bbb8_48b0_efef32f1bdac["handleProxyProtocol()"]
  0b96569d_afe9_bbb8_48b0_efef32f1bdac -->|calls| 91005a3a_7b43_4ee7_4384_456793529f8a
  0b96569d_afe9_bbb8_48b0_efef32f1bdac["handleProxyProtocol()"]
  91005a3a_7b43_4ee7_4384_456793529f8a -->|calls| 0b96569d_afe9_bbb8_48b0_efef32f1bdac
  53be49a0_9a3d_011c_81ec_41cafe0e8353["authenticate()"]
  91005a3a_7b43_4ee7_4384_456793529f8a -->|calls| 53be49a0_9a3d_011c_81ec_41cafe0e8353
  style 91005a3a_7b43_4ee7_4384_456793529f8a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler-proxy/src/test/java/io/netty/handler/proxy/HttpProxyServer.java lines 111–130

        @Override
        protected boolean handleProxyProtocol(ChannelHandlerContext ctx, Object msg) throws Exception {
            FullHttpRequest req = (FullHttpRequest) msg;
            FullHttpResponse res;
            if (!authenticate(ctx, req)) {
                res = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.UNAUTHORIZED);
                res.headers().set(HttpHeaderNames.CONTENT_LENGTH, 0);
            } else {
                res = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK);
                String uri = req.uri();
                int lastColonPos = uri.lastIndexOf(':');
                assertThat(lastColonPos).isGreaterThan(0);
                intermediaryDestination = SocketUtils.socketAddress(
                        uri.substring(0, lastColonPos), Integer.parseInt(uri.substring(lastColonPos + 1)));
            }

            ctx.write(res);
            ctx.pipeline().get(HttpServerCodec.class).removeOutboundHandler();
            return true;
        }

Domain

Subdomains

Frequently Asked Questions

What does handleProxyProtocol() do?
handleProxyProtocol() is a function in the netty codebase, defined in handler-proxy/src/test/java/io/netty/handler/proxy/HttpProxyServer.java.
Where is handleProxyProtocol() defined?
handleProxyProtocol() is defined in handler-proxy/src/test/java/io/netty/handler/proxy/HttpProxyServer.java at line 111.
What does handleProxyProtocol() call?
handleProxyProtocol() calls 2 function(s): authenticate, handleProxyProtocol.
What calls handleProxyProtocol()?
handleProxyProtocol() is called by 1 function(s): handleProxyProtocol.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free