mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-04 05:39:57 -05:00
Torrents over a fail-closed VPN (#1026)
Torrents reach the Internet only through a fail-closed VPN (WireGuard or OpenVPN, any provider), so peers never see a WROLPi's own address. - A network namespace (Pi/Debian) or the vpn container (Docker) with an nftables kill switch; NAT-PMP or fixed port forwarding. - qBittorrent inside it, sandboxed; torrents kept in config/torrents/. - Torrent download form, Torrents page, Share as torrent, nav warning, and VPN settings in both Controller UIs. - Help docs: Torrents, and The VPN for Torrents. QA'd on a Raspberry Pi with a real provider over WireGuard and OpenVPN. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
633b125dc6
commit
2c3300b8b0
80 changed files with 7516 additions and 45 deletions
|
|
@ -22,6 +22,7 @@ import {useOverflowNav} from "../hooks/useOverflowNav";
|
|||
import {defaultNavColor, navBarStyle, useNavColors} from "../themes/navColors";
|
||||
import _ from "lodash";
|
||||
import {BookmarksMenuContents, EDIT_BOOKMARKS_PATH} from "./Bookmarks";
|
||||
import {VPN_SETTINGS_PATH} from "./admin/VpnSection";
|
||||
|
||||
function updateFavicon(colorName) {
|
||||
// Fall back to violet if invalid color
|
||||
|
|
@ -70,6 +71,7 @@ const allLinks = [
|
|||
// menu, and its items are not sections of the app.
|
||||
{text: 'Bookmarks', key: 'bookmarks', bookmarks: true},
|
||||
{text: 'Flasher', to: '/flasher', key: 'flasher'},
|
||||
{text: 'Extension', to: '/extension', key: 'extension'},
|
||||
{to: '/more/statistics', text: 'Statistics', key: 'statistics'},
|
||||
];
|
||||
|
||||
|
|
@ -474,11 +476,25 @@ export function NavBar() {
|
|||
</Tooltip>;
|
||||
}
|
||||
|
||||
// Torrents only reach the Internet through the VPN; while it is not connected they are stopped. Shown only when
|
||||
// there are torrents, so a WROLPi which does not use them never sees it.
|
||||
const torrents = status && status.torrents;
|
||||
let torrentsIcon;
|
||||
if (torrents && torrents.count > 0 && torrents.vpn_state !== 'connected') {
|
||||
const label = torrents.vpn_state === 'wrol_mode'
|
||||
? 'Torrents are stopped: WROL Mode is on'
|
||||
: 'Torrents are stopped: the VPN is not connected';
|
||||
const icon = <Icon data-testid='torrentsVpnIcon' name='share' size='large'
|
||||
style={{color: colorVar(lowWarningColor)}} label={label}/>;
|
||||
torrentsIcon = <Tooltip label={label}><Link to={VPN_SETTINGS_PATH}>{icon}</Link></Tooltip>;
|
||||
}
|
||||
|
||||
const icons = <React.Fragment>
|
||||
<NavIconWrapper>{apiDownIcon}</NavIconWrapper>
|
||||
<NavIconWrapper>{processingIcon}</NavIconWrapper>
|
||||
<NavIconWrapper>{upgradeIcon}</NavIconWrapper>
|
||||
<NavIconWrapper>{driveHealthIcon}</NavIconWrapper>
|
||||
<NavIconWrapper>{torrentsIcon}</NavIconWrapper>
|
||||
<NavIconWrapper>{powerIcon}</NavIconWrapper>
|
||||
<NavIconWrapper>{warningIcon}</NavIconWrapper>
|
||||
<NavIconWrapper><ShareButton asIcon/></NavIconWrapper>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue