WireGuard mesh peers as backup internet uplinks via mwan3 failover.
CLI (wgctl) uplink commands:
- uplink list/add/remove/status/test - Manage peer uplinks
- uplink failover enable/disable - Toggle automatic failover
- uplink priority/offer/withdraw - Priority and mesh advertising
Uplink Library (/usr/lib/wireguard-dashboard/uplink.sh):
- Gossip protocol integration via secubox-p2p
- WireGuard interface creation with IP allocation (172.31.x.x/16)
- mwan3 failover integration
- Connectivity testing and latency measurement
RPCD Backend (9 new methods):
- Read: uplink_status, uplinks
- Write: add_uplink, remove_uplink, test_uplink, offer_uplink,
withdraw_uplink, set_uplink_priority, set_uplink_failover
UCI Config (/etc/config/wireguard_uplink):
- Global settings: auto_failover, failover_threshold, ping_interval
- Provider settings: offering state, bandwidth/latency advertisement
- Per-uplink config: interface, peer_pubkey, endpoint, priority
Phase 2 pending: LuCI dashboard integration
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
36 lines
1017 B
Plaintext
36 lines
1017 B
Plaintext
# SecuBox WireGuard Uplink Configuration
|
|
# Reverse MWAN failover via mesh peers
|
|
|
|
# Global settings
|
|
config settings 'main'
|
|
option enabled '1'
|
|
option auto_failover '1'
|
|
option failover_threshold '3'
|
|
option ping_interval '10'
|
|
option ping_targets '8.8.8.8 1.1.1.1'
|
|
option max_uplinks '5'
|
|
option prefer_local '1'
|
|
|
|
# Local provider settings (when offering uplink to others)
|
|
config provider 'local'
|
|
option offering '0'
|
|
option public_key ''
|
|
option private_key ''
|
|
option endpoint ''
|
|
option listen_port '51821'
|
|
option bandwidth '100'
|
|
option latency '10'
|
|
|
|
# Example uplink configuration (commented out)
|
|
# config uplink 'wgup0'
|
|
# option interface 'wgup0'
|
|
# option peer_pubkey 'PEER_PUBLIC_KEY_HERE'
|
|
# option endpoint '192.168.1.1:51821'
|
|
# option local_pubkey 'LOCAL_PUBLIC_KEY_HERE'
|
|
# option enabled '1'
|
|
# option priority '10'
|
|
# option weight '1'
|
|
# option created '1709312345'
|
|
# option last_seen '1709312345'
|
|
# option status 'active'
|