Skip to content

Commit 0eb2d6e

Browse files
committed
release: v1.6.0
PiTun can be the router. On a box with two or more physical ports it takes the ISP uplink, hands out addresses, does NAT, and can serve the WiFi itself. Gateway mode is untouched and stays the default — nothing changes for an existing install unless the mode is switched on deliberately. Three betas of hardware testing went into this, and the box earned every one of them. The reboot alone found three faults no amount of reading would have: a reconcile that asked for hardware before the firmware had finished loading, gave up without cleaning up, and never tried again. Publishing the panel on the uplink opened SSH and not the panel, because one is a host service and the other a container reached through a chain whose policy is drop. The LAN address ended up on both the bridge and its member. A PPPoE uplink would have hung on every large transfer for want of an MSS clamp, found by building a concentrator out of a veth pair because the protocol cannot be tested remotely. Also here: the connection-lifetime policy for xray, which nothing set before, and the discovery that install.sh had been producing boxes with no panel at all since v1.5.2 — an unconditional `listen 443 ssl` against a certificate nobody generated. Verified on hardware: reboot restores router mode unattended, a client on the LAN resolves, pings and pulls a megabyte through NAT, wired and wireless share one segment, and the update path preserves the database and brings the router back by itself.
1 parent 94a013b commit 0eb2d6e

3 files changed

Lines changed: 78 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,82 @@ All notable user-facing changes to PiTun. Full per-release detail lives in the
44
[GitHub Releases](https://github.com/DaveBugg/PiTun/releases); this file is the
55
committed summary.
66

7+
## v1.6.0 — 2026-08-14
8+
9+
**PiTun can be the router.** On a box with two or more physical ports it takes
10+
the ISP uplink, hands out addresses, does NAT, and can serve the WiFi itself.
11+
Gateway mode is untouched and remains the default: nothing changes for an
12+
existing install unless the mode is switched on deliberately.
13+
14+
Three betas of hardware testing went into this. Everything below was run on a
15+
real box, not reasoned about — the reboot alone found three faults that no
16+
amount of reading would have.
17+
18+
### Router mode
19+
20+
**Where:** Settings → Router. Offered only when the box actually has two or
21+
more physical NICs, and never switched on automatically.
22+
23+
- **DHCP for the LAN**, with pool, lease time and per-device reserved
24+
addresses assigned from the Devices page. PiTun advertises itself as the
25+
resolver, so routing rules and the DNS query log cover devices that never
26+
opted in to anything.
27+
- **A LAN of several ports.** Sockets and the radio are bridged into one
28+
segment — same subnet, one DHCP scope, clients on either side see each
29+
other.
30+
- **WAN in the shapes an ISP link comes in**: DHCP (what providers call IPoE),
31+
static, **PPPoE**, VLAN tagging, MAC cloning. With PPPoE or a VLAN the
32+
traffic leaves on a different interface than the port the cable is in, and
33+
NAT, the firewall and the counters follow it.
34+
- **WiFi access point**, gated on a capability probe: plenty of adapters can
35+
only join networks, not create them, and discovering that when hostapd
36+
refuses to start means the working setup is already dismantled.
37+
- **Commit-confirm watchdog.** Router mode has no fallback — PiTun *is* the
38+
router — so an apply that breaks the network would leave nobody able to undo
39+
it. The box reverts to gateway unless a human confirms, and an unconfirmed
40+
apply never survives a reboot.
41+
- **The uplink accepts nothing new from the internet.** One blanket rule
42+
rather than a list of ports to close. The panel, SSH and xray's inbounds all
43+
bind `0.0.0.0` — they stay reachable over the LAN and invisible from
44+
outside. Two exceptions keep the link working: DHCP replies, which arrive as
45+
NEW rather than RELATED, and the ICMP that PMTU discovery needs.
46+
- **Optional access from the uplink**, off by default, for a PiTun that sits
47+
behind another router — that "WAN" is your own network. Refused outright if
48+
the uplink address turns out to be public.
49+
- **Uplink diagnosis** built on nftables counters, because the rules a WAN
50+
depends on fail silently.
51+
52+
### Also in this release
53+
54+
- **Connection-lifetime policy for Xray**, for the box's own instance and every
55+
registered panel. Xray's `connIdle` of 300 s kills an idle *pooled*
56+
connection, so the next request on that socket hangs — the "works, then it
57+
doesn't" that SDK and agent clients hit — and the half-close timers cut long
58+
streaming answers. Nothing set any of it before. Panels are patched, never
59+
overwritten, and **Apply to all panels** pushes a change to the fleet.
60+
- **The installer produced a box with no panel at all.** `nginx.conf` has
61+
carried an unconditional `listen 443 ssl` since v1.5.2 while `install.sh`
62+
generated no certificate, so nginx aborted — taking port 80 with it, since
63+
it is the only service publishing either. Every one-liner install since
64+
v1.5.2 landed that way.
65+
- **A network card present but unusable is now named as such** — "no adapters
66+
found" is the wrong thing to say about hardware sitting on the PCI bus.
67+
- Searchable country picker for the WiFi regulatory domain, with flags and
68+
localised names.
69+
70+
### Upgrading
71+
72+
Standard update path, verified from v1.6.0-beta.2 through to this release: the
73+
database is backed up first, migrations run, and a box in router mode brings
74+
itself back without help. Ships migrations **023–025**, all additive. Nothing
75+
about router mode activates until you choose it.
76+
77+
**Secrets:** the WiFi passphrase and the PPPoE password are write-only — set
78+
but never returned, and redacted from configuration backups unless secrets are
79+
explicitly included.
80+
81+
**Full diff:** https://github.com/DaveBugg/PiTun/compare/v1.5.3...v1.6.0
82+
783
## v1.6.0-beta.3 — 2026-08-14
884

985
**Beta — what a reboot found.** beta.2 had run on hardware but had never been

backend/app/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# OpenAPI metadata, `/health` response, and `/system/status` so the
66
# frontend can display it next to the xray version. Bump this on each
77
# release — frontend keeps its own version in `frontend/package.json`.
8-
APP_VERSION = "1.6.0-beta.3"
8+
APP_VERSION = "1.6.0"
99

1010

1111
class Settings(BaseSettings):

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "pitun-frontend",
33
"private": true,
4-
"version": "1.6.0-beta.3",
4+
"version": "1.6.0",
55
"license": "BSD-3-Clause",
66
"type": "module",
77
"scripts": {

0 commit comments

Comments
 (0)