Skip to content

Commit

Permalink
add decompression
Browse files Browse the repository at this point in the history
  • Loading branch information
danthe1st committed Mar 8, 2024
1 parent 412cdd3 commit 859a99a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/scripts/verifyExecutable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
./target/https-intercept > intercept.log 2>&1 &
interceptPID="$!"

sleep 2
sleep 3
curl_result="$(curl --connect-to example.com:1337:127.0.0.1 https://example.com:1337 --cacert root.pem -i)"

kill "$interceptPID"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.codec.http.FullHttpRequest;
import io.netty.handler.codec.http.HttpClientCodec;
import io.netty.handler.codec.http.HttpContentDecompressor;
import io.netty.handler.codec.http.HttpObjectAggregator;
import io.netty.handler.ssl.SslHandler;
import org.slf4j.Logger;
Expand Down Expand Up @@ -47,6 +48,7 @@ protected void initChannel(SocketChannel ch) throws Exception {
p.addLast(
new SslHandler(engine),
new HttpClientCodec(), // encode/decode HTTP
new HttpContentDecompressor(),
new HttpObjectAggregator(Integer.MAX_VALUE),
new ResponseHandler(originalClientContext, fullHttpRequest, postForwardMatcher.matchesAsIterable(hostname))
);
Expand Down

0 comments on commit 859a99a

Please sign in to comment.