Skip to content

Commit 4ab9d8e

Browse files
committed
[gsoc25] Added Uspot Blog Post
1 parent 1e53f7f commit 4ab9d8e

File tree

3 files changed

+143
-0
lines changed

3 files changed

+143
-0
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
yarn install
4141
pip install -U pip setuptools wheel
4242
pip install -r requirements.txt
43+
pip install -U docstrfmt # remove when openwisp-utils updates this
4344
4445
- name: QA checks
4546
run: ./run-qa-checks
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
GSoC 2025: Enhancing Uspot Captive Portal for OpenWrt
2+
=====================================================
3+
4+
:date: 2025-08-27
5+
:author: Thibaut Varène
6+
:tags: gsoc, uspot, hotspot
7+
:category: gsoc
8+
:lang: en
9+
:image_url: https://openwisp.org/images/blog/gsoc25/uspot-captive-portal-openwrt.png
10+
:image_width: 713
11+
:image_height: 295
12+
13+
.. image:: {static}/images/blog/gsoc25/uspot-captive-portal-openwrt.png
14+
:alt: Google Summer of Code, OpenWISP, Uspot Captive Portal (OpenWrt)
15+
:align: center
16+
17+
Project Goals Summary
18+
---------------------
19+
20+
This GSoC project aims to improve **Uspot**, a relatively new captive
21+
portal for OpenWrt, by implementing critical missing features that are
22+
essential for large-scale deployments. **Uspot** is a promising
23+
replacement for **CoovaChilli**, which is no longer actively developed and
24+
only receives occasional maintenance patches. However, **Uspot** lacks
25+
several important capabilities that **CoovaChilli** provides. This project
26+
will focus on adding the most critical missing features to ensure
27+
**Uspot** can be a viable alternative.
28+
29+
Project Achievements
30+
--------------------
31+
32+
All technically feasible goals of the projects have been implemented,
33+
merged upstream and incorporated into OpenWrt, with one caveat for goal #3
34+
(*Support for RadSec*). In details:
35+
36+
Goal #1 *Traffic Reporting for RADIUS Accounting Interim-Updates* and Goal
37+
#5 *Traffic Consumption Limits* were fully implemented in `#28
38+
<https://github.com/f00b4r0/uspot/pull/28>`__ through the creation of an
39+
ad-hoc `eBPF <https://ebpf.io>`__ module for high performance traffic
40+
accounting.
41+
42+
For RADIUS reporting, the following Attributes are now supported:
43+
44+
::
45+
46+
Acct-Input-Octets
47+
Acct-Input-Gigawords
48+
Acct-Input-Packets
49+
Acct-Output-Octets
50+
Acct-Output-Gigawords
51+
Acct-Output-Packets
52+
53+
For traffic limits, both static configuration and RADIUS-based
54+
configuration are supported. The implemented RADIUS Attributes are:
55+
56+
::
57+
58+
ChilliSpot-Max-Input-Octets
59+
ChilliSpot-Max-Input-Gigawords
60+
ChilliSpot-Max-Output-Octets
61+
ChilliSpot-Max-Output-Gigawords
62+
ChilliSpot-Max-Total-Octets
63+
ChilliSpot-Max-Total-Gigawords
64+
65+
Additionally, an extra configuration parameter ``swapio`` was added to
66+
uspot configuration to enable swapping the Input and Output side of the
67+
above RADIUS attributes.
68+
69+
Furthermore, the Captive Portal API support has been extended to provide
70+
the ``bytes-remaining`` elements, per `RFC8908
71+
<https://www.rfc-editor.org/rfc/rfc8908#name-api-state-structure>`__.
72+
73+
Goal #3 *Support for RadSec (RADIUS over TLS)* has been implemented for
74+
**PSK**-based authentication in `#39
75+
<https://github.com/f00b4r0/uspot/pull/39>`__, with the additional support
76+
of **TCP**, **TLS** and **DTLS** RADIUS connection protocols (on top of
77+
preexisting **UDP**).
78+
79+
Uspot configuration now supports ``auth_secret`` in the form of
80+
``psk@username@hexkey`` for PreShared Key TLS authentication, provided
81+
that the libradcli dependency is built with TLS support enabled (an
82+
OpenWrt fix for this feature has been provided in `#26765
83+
<https://github.com/openwrt/packages/pull/26765>`__).
84+
85+
Goal #4 *Bandwidth Limitation Features* was fully achieved by the addition
86+
of static configuration support to uspot in `be50a66
87+
<https://github.com/f00b4r0/uspot/commit/be50a66b777f518c4becd81bc81e21761af529eb>`__
88+
on top of the preexisting support for RADIUS dynamic configuration.
89+
90+
Goal #2 was already fully supported and only needed some documentation
91+
clarification, which was done as part of the massive **uspot** and
92+
**ratelimit** [#]_ documentation update during this project. Goal #6 is
93+
not technically implementable within uspot, dynamic VLAN assignment must
94+
be done `in the wireless configuration
95+
<https://openwrt.org/docs/guide-user/network/wifi/wireless.security.8021x#x_dynamic_vlans_on_an_openwrt_router>`__
96+
instead.
97+
98+
.. [#] uspot companion software in charge of bandwidth limits:
99+
https://github.com/f00b4r0/ratelimit.
100+
101+
Current state
102+
-------------
103+
104+
All the changes have been thoroughly tested via local and community-driven
105+
feedback. In total, this project resulted in the following changesets:
106+
107+
- **in uspot**: 38 commits, 17 files changed, 781 insertions(+), 208
108+
deletions(-)
109+
- **in ratelimit**: 10 commits, 5 files changed, 135 insertions(+), 20
110+
deletions(-)
111+
112+
All the changes have been merged upstream and pushed to the OpenWrt
113+
packages feeds for releases **23.05** (`#27190
114+
<https://github.com/openwrt/packages/pull/27190>`__), **24.10** (`13158a
115+
<https://github.com/openwrt/packages/commit/e13158a304de860cb6ff6c586c67e0671aa7e9d6>`__)
116+
as well as the **master** branch (`#27181
117+
<https://github.com/openwrt/packages/pull/27181>`__) where they are now
118+
available to all OpenWrt users.
119+
120+
TODO
121+
----
122+
123+
Goal #3 *Support for RadSec (RADIUS over TLS)* could be further extended
124+
by adding support for certificate-based authentication.
125+
126+
Takeaways
127+
---------
128+
129+
The primary takeaway for me was the eBPF experience: getting acquainted
130+
with the particulars of eBPF programming: the specific API, special
131+
constraints on code and compiler checks, specific build recipes, etc; all
132+
this was completely new to me and had a bit of a learning curve. This will
133+
no doubt be useful for future projects.
134+
135+
Thanks
136+
------
137+
138+
I'd like to thank the OpenWISP team, and in particular `Federico Capoano
139+
<https://github.com/nemesifier>`_, for their sponsorship and help in
140+
bringing this project to fruition through testing and constructive
141+
feedback. It's been a pleasure working with them on this project and I
142+
hope this will lead to more collaboration in the future!
56.5 KB
Loading

0 commit comments

Comments
 (0)