Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Stefan Agner <stefan@agner.ch>
To: wireguard@lists.zx2c4.com
Subject: Android: TCP connection drop when disabling WiFi
Date: Wed, 04 Jul 2018 23:11:50 +0200	[thread overview]
Message-ID: <fada85c8aea2e15480602784fba3eeeb@agner.ch> (raw)

Hi,

I am using WireGuard for Android v0.0.20180625 with the Go userspace
backend. I am using a WiFi router with OpenWrt as Wireguard endpoint
(WAN/internet address). Wireguard tunnels all traffic through the tunnel
(Allowed IPs 0.0.0.0/0, ::/0). This works as expected: I can connect to
the Internet through the tunnel no matter whether I am locally on the
WiFi or connecting through 4G. Wireguard reconnects seamlessly.

Now what I hope is that my TCP connection stay alive when roaming from
WiFi to 4G. Since Wireguard reconnects automatically and my public IP
through the tunnel stays the same, I would expect that I can have a SSH
connection open while roaming from WiFi to 4G and back. I am using the
SSH client ConnectBot to connect to an (IPv6) server. When changing from
4G to WiFi, the connection stays alive. However, when switching off WiFi
(and hence change back to 4G) ConnectBot immediately reports "Host has
disconnected.".

It seems as if Android somehow drops all TCP connection when WiFi
connection gets lost... Is this a known behavior? Anybody else observes
the same behavior? It seems somewhat unfortunate as I would have hoped
that Wireguard lets me keep sessions open...

Also tried with a second SSH client, so it seems a common behavior. I am
using a Nexus 6P with Stock Android 8.1.0.

--
Stefan

             reply	other threads:[~2018-07-04 21:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-04 21:11 Stefan Agner [this message]
2018-07-04 21:13 ` Jason A. Donenfeld
2018-07-04 22:04   ` Stefan Agner
2018-07-04 23:14   ` Stefan Agner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fada85c8aea2e15480602784fba3eeeb@agner.ch \
    --to=stefan@agner.ch \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).