Commit graph

226 commits

Author SHA1 Message Date
Jo-Philipp Wich
2ae74b909b luci-proto-wireguard: configuration import improvements
- Reword texts in import dialogs for better clarity, use different
   descriptions for full import and peer import

 - Allow importing configurations without [Peer] section

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-07-23 20:24:09 +02:00
Jo-Philipp Wich
4d6642b636 luci-proto-ncm: rename service option to mode
Package luci-proto-ncm depends on comgt-ncm which uses an option
called 'mode' to set the radiomode of the modem. There is no option
'service' in the comgt-ncm scripts.

Suggested-by: breenstorm <49235337+breenstorm@users.noreply.github.com>
[fix commit subject, add commit message, rebase onto master branch]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-07-23 13:18:03 +02:00
Jo-Philipp Wich
340183786e luci-proto-wireguard: gracefully deal with missing uci configs
The /etc/config/ddns in particular might not be present on the system,
don't fail if it is absent.

Fixes: #5838
Fixes: 9ba20645b0 ("luci-proto-wireguard: rewrite protocol handler")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-06-21 00:07:48 +02:00
Jo-Philipp Wich
4769bf11aa luci-proto-wireguard: grant uci read access to system and ddns config
The configuration export requires access to /e/c/system and /e/c/ddns for
external hostname hints.

Fixes: #5838
Fixes: 9ba20645b0 ("luci-proto-wireguard: rewrite protocol handler")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-06-20 23:58:07 +02:00
Jo-Philipp Wich
9ba20645b0 luci-proto-wireguard: rewrite protocol handler
This commit rewrites large chunks of the WireGuard protocol handler in order
to simplify the process of importing and exporting configuration. The major
changes are:

1) The wireguard interface configuration tab (General Settings) gained an
   import assistant which allows dragging or pasting a native WireGuard
   configuration file in order to import required settrings into uci

2) The peer configuration tab gained a similar import assistant which allows
   importing the settings for a WireGuard peer from an existing native
   WireGuard configuration file

3) The QR code export feature has been rewritten to make the resulting codes
   actually useful for importing into a WireGuard client application.
   Additionally the plaintext native WireGuard configuration is displayed
   to allow copy-pasting it for use on a Linux or OS X system

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-05-17 15:45:20 +02:00
Florian Eckert
60137e9c5a
Merge pull request #5698 from onemarcfifty/luci-ptoto-batadv
luci-proto-batman-adv: LuCI Support for the batman-adv protocol
2022-04-16 13:37:40 +02:00
Marc Ahlgrim
0a762fd671 luci-proto-batman-adv: add luci-proto-batman-adv
This commit adds support
for the batadv and the batadv_hardif protocols
to LuCI

Signed-off-by: Marc Ahlgrim <marc@onemarcfifty.com>
2022-04-14 15:08:09 +02:00
Florian Eckert
7206d8fd6a luci-proto-wireguard: adjust MTU range from 0-8940
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-04-14 11:59:56 +02:00
Florian Eckert
ddd04a719f luci-proto-wireguard: remove MTU limit
fixes #5737

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-04-12 10:32:25 +02:00
Lukas Voegl
b6925a1227 luci-proto-wireguard: add generate psk button
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2022-03-18 14:47:44 +01:00
Florian Eckert
6ada502dde
Merge pull request #5642 from hgl/xfrm
luci-proto-xfrm: add luci xfrm support
2022-01-22 16:10:47 +01:00
Matthew Hagan
37253b5693 luci-proto-ipip: add nohostroute configurable
Add configurable to explicitly disable creation of route to the peer
address.

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2022-01-19 23:09:00 +00:00
Matthew Hagan
f62b36ee38 luci-proto-ipip: explicitly set df to optional
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2022-01-19 23:04:37 +00:00
Glen Huang
9b02d5b776 luci-proto-xfrm: add xfrm proto support
Signed-off-by: Glen Huang <heyhgl@gmail.com>
2022-01-19 22:35:33 +08:00
Jo-Philipp Wich
ff4f52983e
Merge pull request #5540 from jow-/wireguard-peer-gridsection
Implement nested grid section support and use it for wireguard peer config
2021-12-02 10:54:36 +01:00
Florian Eckert
a1723c2272
Merge pull request #5400 from systemcrash/wg_pubkey
luci-proto-wireguard: display interface public key
2021-11-30 14:10:19 +01:00
Jo-Philipp Wich
f2445a862e luci-proto-wireguard: turn peer configuration into grid view
Turn the list of configured peers into a grid section in order to improve
the overview of the configuration form.

Fixes: #5489
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-11-22 09:43:29 +01:00
Jo-Philipp Wich
f58ae7635c luci-proto-wireguard: fix QR code generation markup
The custom code generation markup lacked a required CSS class.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-11-21 23:40:21 +01:00
Robert Walli
aaa2b3dd2b luci-proto-wireguard: add option to disable peer-section
Submitted-by: Robert Walli <12079858+rwalli@users.noreply.github.com>
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-11-17 16:38:20 +01:00
Paul Dee
8a9dbe39d5 luci-proto-wireguard: display interface public key
Signed-off-by: Paul Dee <itsascambutmailmeanyway@gmail.com>
2021-11-11 01:31:43 +01:00
Jo-Philipp Wich
44445a8097 luci-proto-wireguard: fix potential shell injection vulnerabilities
The `luci.wireguard.generateQrCode` UBUS method allows injecting
arbitrary shell code by not sanitizing the `privkey` and `allowed_ips`
arguments before concatenating them into shell command expressions.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-10-08 20:27:13 +02:00
Jo-Philipp Wich
01ecb1ac8a luci-proto-wireguard: fix markup not valid for XHTML
Fixes: #5407
Fixes: 03d615f62c ("luci-proto-wireguard: add more options to qr code")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-10-07 16:19:30 +02:00
Florian Eckert
fc8a0b4d51
Merge pull request #5403 from lvoegl/luci-app-wireguard-fix-parsing
luci-app-wireguard: fix allowed_ip parsing
2021-10-01 17:06:33 +02:00
lvoegl
193abe7221 luci-app-wireguard: fix allowed_ip parsing
Signed-off-by: lvoegl <lvoegl@tdt.de>
2021-10-01 15:31:38 +02:00
Florian Eckert
88d7cc1261 luci-proto-wireguard: fix luci.wireguard rpcd dependency
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-09-30 12:46:15 +02:00
Florian Eckert
9d560c46cc luci-app-wireguard: fix dependency
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-09-26 13:50:46 +02:00
lvoegl
03d615f62c luci-proto-wireguard: add more options to qr code
Signed-off-by: lvoegl <lvoegl@tdt.de>
2021-09-17 14:22:54 +02:00
lvoegl
8530232f51 luci-proto-wireguard: client qr code generation
Signed-off-by: lvoegl <lvoegl@tdt.de>
2021-09-17 14:15:56 +02:00
lvoegl
d98935c45b luci-app-wireguard: merge app and proto rpcd
Signed-off-by: lvoegl <lvoegl@tdt.de>
2021-09-17 14:15:56 +02:00
Keith Irwin
092109c905
#5307 Made AllowedIPs optional
Signed-off-by: Keith Irwin <git@ki9.us>
2021-08-28 23:34:31 -06:00
Jo-Philipp Wich
5ff3ef7cbb protocols: make APN option optional again
Fixes: #5284
Fixes: 1661ac6bf8 ("luci-proto-ncm: add APN and PIN validation")
Fixes: 114dc38dc2 ("luci-proto-qmi: add APN and PIN validation")
Fixes: 6a8ad40b05 ("luci-proto-3g: add APN and PIN validation")
Fixes: ebb676ef7b ("luci-proto-modemmanager: add APN and PIN validation")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-08-19 08:59:17 +02:00
Jo-Philipp Wich
3d2a2ec1fa
Merge pull request #5190 from TDT-AG/pr/20210715-proto-bonding
luci-proto-bonding: fix member because of API change
2021-08-09 19:47:23 +02:00
Helge Mader
adaf3feb65 luci-proto-bonding: bugfix xmit_hash_policy dependencies
Signed-off-by: Helge Mader <ma@dev.tdt.de>
2021-07-19 12:37:35 +02:00
Helge Mader
64a066c339 luci-proto-bonding: fix member because of API change
Signed-off-by: Helge Mader <ma@dev.tdt.de>
2021-07-15 11:01:01 +02:00
Nicholas Smith
1661ac6bf8 luci-proto-ncm: add APN and PIN validation
Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
[squash commits, fix whitespace]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-07-13 20:10:04 +02:00
Nicholas Smith
114dc38dc2 luci-proto-qmi: add APN and PIN validation
Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
[squash commits, fix whitespace]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-07-13 20:10:04 +02:00
Nicholas Smith
6a8ad40b05 luci-proto-3g: add APN and PIN validation
Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
[squash commits, fix whitespace]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-07-13 20:10:04 +02:00
Nicholas Smith
ebb676ef7b luci-proto-modemmanager: add APN and PIN validation
Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
[squash commits, fix white space]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-07-13 20:10:04 +02:00
Jo-Philipp Wich
b4c394f2d2 protocols: unify TOS and TTL description strings
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-06-07 13:59:03 +02:00
Jo-Philipp Wich
88b9d84388 treewide: consolidate {IPv4,IPv6,MAC} {address,gateway} spellings
- Turn IPv4-Address into IPv4 address
 - Turn IPv4-Gateway into IPv4 gateway
 - Turn IPv6-Address into IPv6 address
 - Turn IPv6-Gateway into IPv6 gateway
 - Turn MAC-Address into MAC address

Also remove related duplicate translation entries.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-06-07 12:48:08 +02:00
Jo-Philipp Wich
bc1015f7db luci-proto-wireguard: fix fwmark validation to allow 32 bit values
The iptables mark field is 32 bits wide, which is 4 bytes and so 8 hex
characters. Fix the fwmark validation to allow 8 characters in the hex
string.

Fixes: #5098
Suggested-by: Robert <32970961+differentblue@users.noreply.github.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-06-03 09:51:58 +02:00
Jo-Philipp Wich
96ee6dc8d6 protocols: rename "device" option to "_modem_device"
This is required to resolve clashes with the generic "option device"
referring to netdev names in current netifd versions.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-06-01 15:34:11 +02:00
Rafał Miłecki
79947af064 treewide: drop MAC and MTU from interfaces (protocols)
Those are L2 options that are not part of interfaces (L3), should not be
set there and don't work. Setting MAC and MTU should be done at device
layer (config device) and is supported for basic types already.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-05-28 15:34:41 +02:00
Jo-Philipp Wich
7d49508480 protocols: fix interface.ipv6 vs. device.ipv6 option conflict
Ref: https://forum.openwrt.org/t/pppoe-disable-ipv6/92548
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-29 22:35:46 +02:00
Jo-Philipp Wich
171ef77e89 treewide: remove rendundant proto handler options
The introduction of network device configuration support also implemented
all common, protocol-independent interface options directly in the
interface config view, so drop the redundant option definitions.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-15 11:41:44 +01:00
Ilya Lipnitskiy
98c3d36d45 luci-{app,proto}-wireguard: remove kmod-wireguard
Prepares for 5.10 migration. wireguard-tools will bring in the correct
wireguard kernel module dependency - either kmod-wireguard or
kmod-wireguard-oot.

Depends on https://github.com/openwrt/openwrt/pull/3885

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-27 07:11:37 +02:00
Nicholas Smith
ab7e45cadb luci-proto-modemmanager: add support for specifying signal refresh rate
Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
2021-01-07 22:07:24 +10:00
Florian Eckert
7e2e3ee499
Merge pull request #4542 from mayli/oc-protocol
luci-proto-openconnect: add vpn_procotol support
2020-11-25 10:27:44 +01:00
Sergio E. Nemirowski
0f3f464adc optinal -> optional typo fix
Signed-off-by: Sergio E. Nemirowski <sergio@outerface.net>
2020-11-22 17:35:11 +02:00
Florian Eckert
fa702c0387 luci-proto-qmi: add missing proto default options
This change add the following missing default options.
- defaulroute
- peerdns
- metric

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-11-06 11:51:15 +01:00