openbullet / OpenBullet2

OpenBullet reinvented
https://docs.openbullet.dev/
MIT License
1.75k stars 467 forks source link

[Bug]: OB2 + VPN + Bad IPv6 address = Error #514

Open WeLoveRuri opened 2 years ago

WeLoveRuri commented 2 years ago

Version of the software

0.1.25 & 0.1.26

Operating system

W10 Pro

Browser / Native

Firefox for Web & Native

What happened?

Interesting thing to know, this issue does not occur in OB1.

**Workaround meanwhile**:
Just put the IPv4 directly as domain in the URL (and ofc write the Host header explicitly) 
so it willwork without trying to query the DNS and getting the IPv6 one.
-Ruri

P.S: This might not always work since some configuration
will block accessing the website directly with the IP Address.

When VPN connection is active DNS returns IPv6 addresses in addition to IPv4. IPv4 addresses are still accessible but IPv6 are not.

The cause of such invalid network configuration is still a mystery that deserves its own separate post.

Some apps work no matter what VPN connection status is.

"But web browser can connect to the same host with or without VPN." True. Browsers may use Happy eyeballs approach attempting to connect using both IPv4 and IPv6 at the same time.

"But my old app has not problems connecting." Also true. Some older and not so old apps use IPv4 protocol by default. Support for IPv6 or IPv4+IPv6 has to be explicitly implemented.

"But it works sometimes". This happens when VPN connections are not reliable. It leads to all sorts of solutions that are mere coincidences.

HttpClient.GetAsync() uses default DNS resolution and can connect using both IPv4 and IPv6 addresses. It does not discriminate and there is no direct way to influence protocol selection. If DNS returns inaccessible address then HttpClient may use that invalid address to connect resulting in timeout.

The best: ask IT to fix IPv6 DNS issues. DNS should not report inaccessible addresses.

Good: implement Happy eyeballs approach. Connect to both IPv6 and IPv4 host addresses using numeric IP instead of automatic resolution using host name.

Source: Stackoverflow comment

Message error OB2 give after the set timeout: **Operation canceled

BOT ENDED AFTER 15119 ms WITH STATUS: ERROR**

Relevant LoliCode if needed

No response

JReming85 commented 2 years ago

Thats not really a OB2 problem but your VPN problem. You should (depending on type) can specify your DNS addresses for your VPN in Network Connections -> VPN/TUN/etc connection -> IPv4 or IPv6 -> Specify DNS

You can also disable IPv6 by unticking the IPv6 checkbox.

As for OB2 it might be a good idea to request DNS override though

WeLoveRuri commented 2 years ago

Thats not really a OB2 problem but your VPN problem. You should (depending on type) can specify your DNS addresses for your VPN in Network Connections -> VPN/TUN/etc connection -> IPv4 or IPv6 -> Specify DNS

You can also disable IPv6 by unticking the IPv6 checkbox.

As for OB2 it might be a good idea to request DNS override though


Sadly. Tried literally all of that + but their dns just always resolve to 4 ip when you use a VPN. 1 ipv6 and 3 ipv4 All the ipv4 work well but their ipv6 ip is just broken and does not work. Even if i change vpn provider, if i untick ipv6 from the vpn app settings and windows network adapter of the vpn. If i try another DNS same thing too. Like the guy said: When VPN connection is active DNS returns IPv6 addresses in addition to IPv4. IPv4 addresses are still accessible but IPv6 are not.

The cause of such invalid network configuration is still a mystery that deserves its own separate post.

Btw OB1 does not have that issue.

openbullet commented 2 years ago

Turns out OB1 does not support IPv6, we just tried. So that's why it's ignoring the IPv6 entries from the DNS query.