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

[FEATURE] - Autoconnect on specific network (blacklist/blocklist) #573

Open
EmberHeartshine opened this issue Feb 9, 2025 · 6 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@EmberHeartshine
Copy link

Is your feature request related to a problem? Please describe.
At the moment, wgtunnel auto-connects on every wifi network except ones on a specific allowlist.

Describe the solution you'd like
I'd like the ability to invert that: autoconnect only on networks I specify (blocklist)

Describe alternatives you've considered
At the moment, the only way for me to do that is a clunky workaround in Tasker that uses the first-party WG app.

Additional context
Sometimes VPNs are used to obfuscate traffic on specific networks known to perform packet snooping, but I don't want to be always on a VPN with a new network and have to add every single trusted one.

@EmberHeartshine EmberHeartshine added the enhancement New feature or request label Feb 9, 2025
@zaneschepke
Copy link
Owner

Hello! There is a way to do this with wildcards enabled.

Basically, you would add "*" as a trusted network which would mark all networks as trusted. You would then add your wifi names that you wish to tunnel on with a leading "!" to mark them as not trusted.

Keep in mind that certain special characters (if present in the name of your wifi names) will need to be escaped with a leading "" wild using this feature. If you have any questions, please check out the link to the docs.

If you run into any issues getting this working, let me know and I will reopen this ticket! Thanks!

@EmberHeartshine
Copy link
Author

Excellent, this is exactly what I wanted. Perhaps a small note in the documentation or a little line saying that wildcards and negative matches are allowed would help.

Thanks.

@EmberHeartshine
Copy link
Author

Upon further testing, this does not appear to work. I have the wildcard plus a few specific networks but the networks not on the list (which should match the wildcard) still get auto-connected on.

@zaneschepke zaneschepke reopened this Feb 17, 2025
@zaneschepke
Copy link
Owner

Alright, I'll take a look and see if I can reproduce.

@zaneschepke
Copy link
Owner

Image

So you have something that looks like this and any special characters are escaped?

@EmberHeartshine
Copy link
Author

Correct, though none of the SSIDs in question have special characters.

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

No branches or pull requests

2 participants