AdguardTeam / AdguardTeam/AdGuardVPNForAndroid

Make Kill Switch work when using AdGuard VPN + AdGuard

未关闭
#110 27 条评论 7 个 reaction 已指派 1 人 已指派给 @aadmitrevskiy 在 GitHub 查看
Enhancement Middle+ Priority: P4 TechAudit
主要语言
没有语言数据
星标
241
派生
24
PR 合并指标
30 天内没有已合并 PR

描述

Here's the problem:

1. The user may set AdGuard as an "Always-on VPN" and "Block connections without VPN" in the settings.
2. However, since AdGuard does not filter AdGuard VPN's traffic, this way we'll basically drop connection to AdGuard VPN backend.

Solving this would be tricky. When the kill switch is enabled, we'll have to route AdGuard VPN traffic via AdGuard, otherwise Android would block it. There's a solution to this that involves rather complicated manual setup. Can we help users with this? Make it a one-tap setting in AG or AG VPN?

### The current solution to this is to follow these steps.

UPD: note that this instruction will only work after https://github.com/AdguardTeam/AdguardForAndroid/issues/3923 is done.

**In the AdGuard VPN app**

1. Go to settings and switch to SOCKS5 mode.
2. It will ask you if you want to disable integration mode. Tap "UNLINK", you don't need it now.
3. Now when you run a VPN, it will connect to the remote VPN server on one side, and run a local SOCKS proxy on port 1080 on the other side.

**In the AdGuard app: make sure all apps are routed via AdGuard**

You need to do this step to make sure that all apps' traffic is routed through AdGuard.
If you don't do this and some apps are excluded from routing, they won't be able to connect to the Internet (that's just how Kill Switch works in Android).

1. Go to Apps Management -> Menu button -> Bulk change.
2. Choose "AdGuard protection", "Enabled", "Apps and browsers", tap "APPLY".
3. Go to Settings -> Advanced -> Low-level settings.
4. Find `pref.excluded.packages` there and remove everything from it.
5. Make sure that DNS filtering is enabled in AdGuard and some encrypted DNS server is in use.

**In the AdGuard app: use AdGuard VPN's SOCKS proxy**

1. Go to settings -> network -> proxy.
2. Add a new Proxy there, choose "SOCKS5", set proxy host to `127.0.0.1` and proxy port to `1080`.
3. Save it and enable the "Proxy" module.

**Now open Android settings**

1. Go to Network & internet -> VPN
2. Tap on "AdGuard" there (NOT AdGuard VPN, it's important)
3. Enable "Always-on VPN" and "Block connections without VPN"

**Now you're all set!**
The traffic of all your apps is now routed through the AdGuard app. AdGuard routes it through AdGuard VPN's proxy and from there it goes through the VPN server of your choice.

You're all set, Kill Switch is now working.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。