this post was submitted on 24 Aug 2023
23 points (100.0% liked)

Android

27282 readers
230 users here now

DROID DOES

Welcome to the droidymcdroidface-iest, Lemmyest (Lemmiest), test, bestest, phoniest, pluckiest, snarkiest, and spiciest Android community on Lemmy (Do not respond)! Here you can participate in amazing discussions and events relating to all things Android.

The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:

Rules


1. All posts must be relevant to Android devices/operating system.


2. Posts cannot be illegal or NSFW material.


3. No spam, self promotion, or upvote farming. Sources engaging in these behavior will be added to the Blacklist.


4. Non-whitelisted bots will be banned.


5. Engage respectfully: Harassment, flamebaiting, bad faith engagement, or agenda posting will result in your posts being removed. Excessive violations will result in temporary or permanent ban, depending on severity.


6. Memes are not allowed to be posts, but are allowed in the comments.


7. Posts from clickbait sources are heavily discouraged. Please de-clickbait titles if it needs to be submitted.


8. Submission statements of any length composed of your own thoughts inside the post text field are mandatory for any microblog posts, and are optional but recommended for article/image/video posts.


Community Resources:


We are Android girls*,

In our Lemmy.world.

The back is plastic,

It's fantastic.

*Well, not just girls: people of all gender identities are welcomed here.


Our Partner Communities:

[email protected]


founded 1 year ago
MODERATORS
23
Per app/URL VPN settings (lemmy.dbzer0.com)
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 

I have two VPNs. One for privacy (e.g. general browsing) and one to reach my home NAS (e.g. to reach my selfhosted image backups). Is there a way to set the system up so that when I use applications X, Y and Z, it should use the privacy one, and if I use A, B or C, it should use the private one?

top 6 comments
sorted by: hot top controversial new old
[–] [email protected] 10 points 1 year ago

Yes! In Android use work profiles. You can use the f Droid app shelter to do this.

Then set a different VPN for your work profile, and a different VPN for your main profile. Any work profile app will use the work profile VPN

[–] [email protected] 5 points 1 year ago (1 children)

If you have Tasker, you can do that. Not sure if you are using Wireguard, but that makes it simpler to integrate IMHO with it. With it, you set a condition basically if App XYZ is open then use VPN ABC Otherwise, If app XYZ is not open, then use BCA VPN.

[–] [email protected] 1 points 1 year ago (1 children)

The private one is using Wireguard, buuut I'd also like for it to work even when the apps are backgrounded.

I'm beginning to think that the cleverer solution would be to set something up in my home Linux environment to make the routing decisions and then just have an always on VPN home.

It just seems like it should be a solved problem on my mobile OS already.

[–] [email protected] 1 points 1 year ago

With Linux, you need to have the awareness of what is running on your phone 24/7 and AFAIK, there's nothing like that except maybe Home Assistant, but that's pushing it. I have a buddy which has an always on VPN which he uses 100% of the time at home, never any issues with him. As for the phone, I have Wireguard for when I am not connected to my WiFi, and then disconnect when I'm back on my WiFi network. This way, I am certain to be on my home network 99.99% of the time. I use Tasker for that.

With that said, you will need an automation of sorts on the Android to be 100% sure you are on your appropriate VPN. Whether through Tasker, Macrodroid or a few other apps.

[–] [email protected] 3 points 1 year ago

You might consider a more elegant approach to accomplish your goals.

For example, I run Tailscale on all of my devices. They are accessible to each other (at all times) through the encrypted "Tailnet" while each has its own public internet provider (my home ISP, my cellular provider, my VPS host, etc).

They all route their DNS requests through my home server which is running Adguard (for DNS ad blocking on every device). If I wanted I could route all their traffic (not just DNS) through the home server, and I could have the home server's internet-facing interface connect through a commercial VPN to then hide all that egress traffic, across all my devices.

[–] [email protected] 1 points 1 year ago

You could connect to your privacy VPN from your home server, then set up your home VPN to route all external traffic through the privacy VPN. From your phone, your home VPN is now both your home and privacy VPN.

Trying to do it on a per-app basis, you will very likely end up with whichever app is in the background trying to use the wrong connection.