zaneschepke / wgtunnel

An alternative Android client app for WireGuard VPN
https://zaneschepke.com/wgtunnel-docs
MIT License
818 stars 44 forks source link

Round bracket in WiFi name disturbs trusted network identification #363

Open jkrwdf opened 1 week ago

jkrwdf commented 1 week ago

Describe the bug Since the update to version 3.5.2, my home network was no longer recognized as trusted and the auto-tunnel kicked in. My home network is named

FOOBAR (5 GHz)

I believe the bug happens because with the new version, wildcard support based on regex was implemented, and the round brackets have a meaning there.

Experiment: When I change my trusted network entry in WG tunnel to either

FOOBAR* FOOBAR \(5 GHz\)

it works again.

Smartphone (please complete the following information):

zaneschepke commented 1 week ago

Hello! Thanks for reporting this. I'll look into a fix for this.

Scorpoon commented 1 week ago

Thanks to OP for the hint with escaping the special characters xD I could've thought about it myself because I often do it in C# 😂

@zaneschepke I guess you could handle it by defining your own matching pattern (f.e. instead of "!" the end user has to use "((!))") and before evaluating the wildcard escape the normally used ones for example with " \" (excluding own matching pattern) and after that replace "((!))" again with "!". Just my first thought about how it could be handled without confusing the end user too much.