httptoolkit / httptoolkit-android

Automatic Android interception & debugging with HTTP Toolkit, for Android
https://httptoolkit.com
GNU Affero General Public License v3.0
493 stars 77 forks source link

PIN-protect autostart #14

Closed mrbluecoat closed 1 year ago

mrbluecoat commented 1 year ago

Is there a way to PIN-protect autostarting the app so it runs on boot and can't be disabled until a user enters a predefined PIN code (different than native android device lock screen code)? Perhaps a Pro feature? I need to run long uninterrupted proxy sessions.

pimterry commented 1 year ago

No, In general I'm fairly sure it's not even possible to enforce a VPN on the device like this if you wanted to, unless it's a fully managed enterprise device.

There's many mechanisms in Android to stop & start VPN sessions elsewhere - even if the app completely blocked access, you can always disconnect any VPN in two taps from the settings page. It's also not really possible to hide the VPN notification - the persistent notification is a requirement to access the VPN APIs when the app isn't in the foreground.

It is possible to autostart a VPN, but I'm not sure that makes sense for HTTP Toolkit, where the IP & port on the computer may frequently change, HTTP Toolkit might not be running, etc etc. If you're interested in that, you probably want to fork the app to build something custom for your setup specifically.