Skip to Content
bowel

Mesh networks and VPNs

Bowel works alongside Tailscale, WireGuard, ZeroTier, EasyTier and company VPNs: their addresses stay off the proxy nodes. How differs between computers and Android:

  • macOS, Windows, Linux: keep using each one's own client. Bowel finds their networks and DNS by itself, with nothing to set.
  • Android: the system allows one VPN at a time. Bowel carries a Tailscale node of its own, for Tailscale's servers or a self-hosted Headscale; other mesh networks can't run alongside Bowel for now.

WireGuard can also be imported into Bowel as a node, on every system: see WireGuard as a node.

On a computer

Settings › Developer networks shows what Bowel found. Turning off "Keep developer networks direct" leaves all of it alone.

Tailscale and Headscale

Log the Tailscale client in to Headscale, for example:

tailscale up --login-server https://headscale.example.com

Bowel reads the client's state every 20 seconds and sends these direct, in rule, global and direct mode alike:

  • addresses in 100.64.0.0/10 and fd7a:115c:a1e0::/48
  • MagicDNS names: the suffix comes from the client's state, so Headscale's base_domain is treated as ts.net is, with nothing to fill in
  • short host names, as in ssh mybox
  • subnet routes, and the Split DNS domains an admin set

An exit node takes all traffic: see VPNs that take all traffic below. How all this is done is in developer networks.

WireGuard, ZeroTier, EasyTier and company VPNs

Bowel goes by the interface, not the client: it reads the system's routing table, and when a VPN's interface carries routes for only some networks, those networks leave by that interface and stay off the proxy, in rule, global and direct mode alike. Mesh networks and company VPNs that route only the internal network all look like this, so WireGuard, ZeroTier, EasyTier, OpenVPN and company VPNs need no support of their own.

DNS the system splits by domain keeps asking the servers it names: Bowel reads scutil --dns (with /etc/resolver/*) on macOS, the NRPT and the adapters' DNS suffixes on Windows, and systemd-resolved on Linux.

What was found is under Other VPNs and Split DNS in Developer networks. For what wasn't, such as a VPN that gives DNS but no routes, add the domain suffix or network to My internal networks, as corp.example or 10.8.0.0/16; it applies to the system proxy, DNS, rules and TUN at once. For a company VPN that has to see names resolved to recognize its connections, see With a company VPN on, some sites that go direct fail once TUN is on.

VPNs that take all traffic

Some VPNs take all traffic: WireGuard with AllowedIPs of 0.0.0.0/0, Tailscale with an exit node, a company VPN in full tunnel. They and Bowel's TUN both want the default route; Bowel doesn't work around it, and Developer networks warns about it. Keep one of them on, or have the VPN route only its own networks, for WireGuard by setting AllowedIPs to the peers' networks.

On Android

Android has one VPN at a time, so while Bowel is on, the Tailscale, WireGuard, ZeroTier and EasyTier apps can't be. A mesh network has to run inside Bowel:

  • Tailscale and Headscale: the built-in Tailscale node, below.
  • WireGuard: import it as a node, see WireGuard as a node.
  • ZeroTier, EasyTier: not built in yet, so they can't be used alongside Bowel for now.

Built-in Tailscale

Open Settings › Tailscale.

  1. Control server: Headscale's address, such as https://headscale.example.com. http works too, for a Headscale without TLS. Empty is Tailscale's own server.
  2. MagicDNS domain: shown once a control server is set. Fill in the base_domain of Headscale's config, such as tail.example.com. Bowel can't ask the node for it, so it has to be written here; without it the tailnet's devices are reachable only by their 100.x addresses. It can't be the control server's domain or one above it (not example.com for headscale.example.com), or the login page would be sent into the node before it has logged in. Headscale refuses such a base_domain too.
  3. Device name: the name on the tailnet; empty is bowel-android.
  4. Turn on Built-in Tailscale. Bowel's VPN has to be on, and the Tailscale app off.
  5. Log in, either way:
    • In a browser: Log in › Open the login link, and register the device on the server as Headscale's page says.
    • With an auth key: under "Optional: log in without a browser", fill in a key made on the server with headscale preauthkeys create. Hex keys and hskey-auth-… keys both work. The key is used only for the first login, after which Bowel keeps the login, so a one-off key is best.

Once logged in, 100.64.0.0/10, *.ts.net and the names under the MagicDNS domain go through the built-in node in every mode, and everything else as before. Bowel fetches subscriptions that live on the tailnet through it too.

Changing the control server

A node belongs to one control server, so changing it logs out: the node gets a new state folder and the old one is deleted, and the auth key is cleared unless a new one is given with it. Log in again on the new server.

Log out only makes this device forget its login; the control server still lists it, so delete it there if need be (headscale nodes delete).

WireGuard as a node

WireGuard is one of the protocols of Bowel's core, imported like any other node: a wireguard:// or wg:// link, or a type: wireguard node in a Clash config. That suits a WireGuard server at home or on your own machine, on every system alike, and on Android it takes no VPN slot of its own.

To send only some networks through it, such as 192.168.50.0/24 at home, make a route group fixed to the node and add a rule for that network: see Route groups and nodes. WireGuard is UDP only, so as the exit of a composite node its entry has to carry UDP.

Headscale the old way: an imported type: tailscale node

Before the built-in node, Headscale took an imported mihomo node of type: tailscale with control-url and auth-key, a route group fixed to it, and rules of your own for the tailnet's ranges and domains. That works in rule mode only and isn't needed any more; setups made that way keep working.

Such a node leads to the tailnet's devices, and without an exit node it can't reach a test site, so a failed test shows "—" rather than calling it broken, and Auto fastest never picks it for the internet.

View and edit this page on GitHub

On this page