【fix】 http代理顺利验证通过

This commit is contained in:
wujiawei
2025-03-22 00:09:18 +08:00
parent 3321e0dd7b
commit 2a98ec0589
10 changed files with 109 additions and 51 deletions

View File

@ -16,7 +16,7 @@ import java.net.URI;
public class HttpProxyServer {
private static final int PORT = 8080;
private static final int PORT = 8001;
public static void main(String[] args) throws Exception {
EventLoopGroup bossGroup = new NioEventLoopGroup();
@ -30,7 +30,8 @@ public class HttpProxyServer {
@Override
public void initChannel(SocketChannel ch) throws Exception {
ch.pipeline().addLast(
new HttpClientCodec(),
// new HttpClientCodec(),
new io.netty.handler.codec.http.HttpRequestDecoder(),
new HttpObjectAggregator(1048576),
new HttpProxyServerHandler()
);