Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable always-on VPN #4

Closed
Veeresh8 opened this issue Jun 27, 2021 · 3 comments
Closed

Disable always-on VPN #4

Veeresh8 opened this issue Jun 27, 2021 · 3 comments

Comments

@Veeresh8
Copy link

Veeresh8 commented Jun 27, 2021

I'm trying to intercept all HTTP requests for my custom AOSP device. This does no have the Settings APK for tweaking n/w related things.

When I connect to my device and invoke "Android device connected via ADB" from my PC I get the below error.
vpn1

Any idea how to resolve this and start intercepting requests?

Logs here
logs.txt

@pimterry
Copy link
Member

Hi @Veeresh8. That error is shown when HTTP Toolkit asks the system to start the VPN, using Android's standard VPN API, and then the request to do so fails immediately, implying the system itself is rejecting it.

I think the relevant bit of your logs there is this:

android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.vpndialogs/com.android.vpndialogs.ConfirmDialog}

This is saying that the system's built-in VPN dialog couldn't be opened. This is being opened by Android itself, not by HTTP Toolkit, so something very odd is happening here. It sounds like your custom AOSP build is missing some core parts of Android's settings, which makes it impossible to start a VPN. Does that sound plausible? Any idea why that's missing?

If you want to use HTTP Toolkit on this device, you'll either need to fix the Android system so that the VPN APIs work correctly, or you'll need to manually configure the device to use your HTTP Toolkit instance using the normal system proxy settings.

Does that all make sense?

@Veeresh8
Copy link
Author

Veeresh8 commented Jul 3, 2021

Agreed on the point where my system is missing Android settings. Any idea how to manually configure proxy settings? I think here too we need access to Android's Settings App right?

@pimterry
Copy link
Member

pimterry commented Jul 5, 2021

Ah, yes. It looks like this is possible via ADB (https://android.stackexchange.com/a/186820/289616):

adb shell settings put global http_proxy <address>:<port>

I haven't tested it, but that looks promising. You might also need to set https_proxy too, I'm not sure but I've seen some mention on that in a couple of places.

Pure curiosity, but why don't you want to install the Android Settings app?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants