wireguard android don't prefer IPV6 endpoint

Jérémy Prego jeremy at pregonetwork.net
Sun Jan 3 16:58:54 CET 2021


hello Harsh,

> The WireGuard Android client is designed to prefer IPv4 over IPv6 as
> of now
why did you make this choice? is there a known bug with ipv6? I think it
would be useful to put an option in the wireguard application, so that
we can choose.

if I want to use an ipv6 tunnel, do I have another solution than to
create 2 tunels, one in ipv6 only, and another in ipv4 in order to be
able to use ipv6 when available and ipv4 when the place where i am has
no ipv6?

I did not manage to add 2 endpoint in a single tunnel to put an endpoint
only ipv6 and another endpoint ipv4 / ipv6 to bypass the problem

thanks,

Jerem
Le 03/01/2021 à 14:48, Harsh Shandilya a écrit :
> Hey Jérémy,
>
> On 2021-01-02 08:27, Jérémy Prego wrote:
>> I confirm the same problem in wifi
>>
>> Le 27/12/2020 à 07:02, Jérémy Prego a écrit :
>>> hello,
>>>
>>> I've always encountered a bug with android wireguard when using an ipv4
>>> / ipv6 endpoint.
>>>
>>> I tested with two phones:
>>> Huawei p10 lite android 8.0 emui 8
>>> Xiaomi poco m3 android 10.0 miui 12
>>>
>>> When i'm in LTE (not yet been able to test in wifi), wireguard connects
>>> to the endpoint in ipv4 and not in ipv6, and i don't understand why it
>>> is doing that.
>
> The WireGuard Android client is designed to prefer IPv4 over IPv6 as
> of now
> (https://git.zx2c4.com/wireguard-android/tree/tunnel/src/main/java/com/wireguard/config/InetEndpoint.java#n97).
> This may or may not change in the future, and we'll announce here if
> it does.
>
>>> However, chrome, for example, does use ipv6 by default and not ipv4.
>>>
>>> My phone does recover an ipv6 in 2a01: cb1a ........ / 64 and not an
>>> ipv6 type fc00 / fd00 / fe80 ...
>>> I also specify that if I only have an AAAA record, the tunnel works
>>> fine
>>> in ipv6. but suddenly, I can no longer connect to wifi which only
>>> have ipv4.
>>>
>>> I would like wireguard to favor ipv6 when it is available, and
>>> otherwise
>>> switch to ipv4.
>>>
>>> Is it possible ?
>>>
>>> Thanks,
>>>
>>> Jerem
>
> Cheers,
> Harsh



More information about the WireGuard mailing list