SwiftNIO local proxy, intercept HTTP request params

I'm using default example (from swiftNIO repository https://github.com/apple/swift-nio-examples/tree/main/connect-proxy) of SwiftNIO connect proxy. Working in PacketTunnelProvider extension.

In proxy I have excess to headers and for HTTPS requests I can get HOST and PORT, without GET params.

Is it possible to get excess to params? What way it should be?

I also see applications like proxyman, which can show GET request with params, but only after installing root certificate for device and this way is not good for me.

I'm using default example (from swiftNIO repository https://github.com/apple/swift-nio-examples/tree/main/connect-proxy) of SwiftNIO connect proxy. Working in PacketTunnelProvider extension.

Using a proxy server in a Network Extension to route traffic from the device through a packet tunnel is not a recommended use case here. If you need to claim traffic, just claim the app or routes that you need to send through the tunnel instead of building a proxy server into your network extension to reroute this traffic.

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com

Could you elaborate on that? What do you mean by "claim the app or routes that you need"?

I want to use PacketTunnelProvider to basically log all in- or outgoing network packets. Any pointers in the right direction are very welcome :)

I want to use PacketTunnelProvider to basically log all in- or outgoing network packets.

The packet tunnel provider infrastructure was designed to allow developers to create VPN clients. Using it ‘off label’ — for example, to build a debugging tool — is not something we support. See TN3120 Expected use cases for Network Extension packet tunnel providers.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thank you for your reply and the useful information.

I ended up creating a new thread https://developer.apple.com/forums/thread/716813. Any help would be very welcome :).

SwiftNIO local proxy, intercept HTTP request params
 
 
Q