fix: the status gives the number of site-to-site connections set up and established, not each connection by name.
Release / release (push) Successful in 28s
Release / release (push) Successful in 28s
This commit is contained in:
1 parent
d648d294ec
commit
1825e1efb1
3 files changed
+22
-10
No files matched your search
@@ -804,7 +804,7 @@ configuration: no key, identity, subnet, or address but the client's. They show
|
|||||||
|---|---|
|
|---|---|
|
||||||
| `basic` (default) | The overall status (`ok` or `degraded`), the time and the Client IP |
|
| `basic` (default) | The overall status (`ok` or `degraded`), the time and the Client IP |
|
||||||
| `standard` | Also the `vpn-router` version, the `vpn-router-manager` version or that it is not installed, and the number of active services and of services in any other state, without their names |
|
| `standard` | Also the `vpn-router` version, the `vpn-router-manager` version or that it is not installed, and the number of active services and of services in any other state, without their names |
|
||||||
| `full` | Also each service and its state, Docker, and the state of each site-to-site connection, road-warrior, OpenVPN and WireGuard |
|
| `full` | Also each service and its state, Docker, how many site-to-site connections are set up and how many of them are established (`site_to_site`: `connections` and `established`, `null` when swanctl cannot be asked), road-warrior, OpenVPN and WireGuard |
|
||||||
|
|
||||||
The Client IP is the address the request came from: the last entry of `X-Forwarded-For` for a
|
The Client IP is the address the request came from: the last entry of `X-Forwarded-For` for a
|
||||||
request from one of `web.trusted_proxies`, by default the address the request came in on, so
|
request from one of `web.trusted_proxies`, by default the address the request came in on, so
|
||||||
@@ -852,8 +852,9 @@ road-warrior access is configured, of `wg-quick@wg0` when WireGuard is, and of
|
|||||||
OpenVPN clients, from the server's status file, which OpenVPN rewrites every minute; the package version and,
|
OpenVPN clients, from the server's status file, which OpenVPN rewrites every minute; the package version and,
|
||||||
as `manager_version`, the installed version of `vpn-router-manager` (`null`, shown as not installed, without it); whether
|
as `manager_version`, the installed version of `vpn-router-manager` (`null`, shown as not installed, without it); whether
|
||||||
Docker is installed, and when it is, the state of `docker.service` and of `vpn-router-docker`
|
Docker is installed, and when it is, the state of `docker.service` and of `vpn-router-docker`
|
||||||
(the Docker rules), which do not change `status`; as `site_to_site.connections`, whether each
|
(the Docker rules), which do not change `status`; as `site_to_site`, the number of site-to-site
|
||||||
site-to-site connection that is set up is established (`null` when swanctl cannot be asked); the number of connected road-warrior (IPsec P2S) clients; and
|
connections that are set up (`connections`) and of those established (`established`, `null` when
|
||||||
|
swanctl cannot be asked), without their names; the number of connected road-warrior (IPsec P2S) clients; and
|
||||||
the WireGuard peers with the age of their last handshake and their traffic. `status` is `ok` when
|
the WireGuard peers with the age of their last handshake and their traffic. `status` is `ok` when
|
||||||
all these services are active, and `degraded` otherwise.
|
all these services are active, and `degraded` otherwise.
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,12 @@
|
|||||||
|
vpn-router (0.22.1-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
fix: the status gives the number of site-to-site connections set up and established, not each connection by name.
|
||||||
|
|
||||||
|
* site_to_site of the status document is {"connections", "established"},
|
||||||
|
and the status page shows "Site to site: N of M established".
|
||||||
|
|
||||||
|
-- Slawomir Koszewski <slawek@koszewscy.waw.pl> Mon, 02 Nov 2026 18:00:00 +0100
|
||||||
|
|
||||||
vpn-router (0.22.0-1) unstable; urgency=medium
|
vpn-router (0.22.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
feature: pki.extended_key_usages adds custom extended key usages by their OIDs, which templates give by name, and a template's policies put certificate policy OIDs into its certificates.
|
feature: pki.extended_key_usages adds custom extended key usages by their OIDs, which templates give by name, and a template's policies put certificate policy OIDs into its certificates.
|
||||||
|
|||||||
@@ -56,9 +56,9 @@ default the address the call came in on, is the last entry of its X-Forwarded-Fo
|
|||||||
default, the overall status, the time and the client's address (its address as for the rate limit
|
default, the overall status, the time and the client's address (its address as for the rate limit
|
||||||
below); standard also the package version, the installed version of vpn-router-manager
|
below); standard also the package version, the installed version of vpn-router-manager
|
||||||
(manager_version, null when it is not installed) and the number of active and other services; full
|
(manager_version, null when it is not installed) and the number of active and other services; full
|
||||||
whether each service runs, whether Docker is installed, and the state of each site-to-site connection, road-warrior
|
whether each service runs, whether Docker is installed, how many of the site-to-site connections are established
|
||||||
(IPsec P2S), OpenVPN and WireGuard. No configuration data or key is shown, and no address but the
|
(site_to_site: connections and established, null when swanctl cannot be asked), and road-warrior (IPsec P2S), OpenVPN
|
||||||
client's.
|
and WireGuard. No configuration data, key or connection name is shown, and no address but the client's.
|
||||||
|
|
||||||
The service first initializes, without listening: it makes the signing key and the refresh
|
The service first initializes, without listening: it makes the signing key and the refresh
|
||||||
tokens' database (vpnrouter_auth), retrying every INIT_RETRY_SECONDS until both are ready and
|
tokens' database (vpnrouter_auth), retrying every INIT_RETRY_SECONDS until both are ready and
|
||||||
@@ -234,8 +234,9 @@ def collect(state):
|
|||||||
}
|
}
|
||||||
names = state.get('site_to_site')
|
names = state.get('site_to_site')
|
||||||
if isinstance(names, list) and names:
|
if isinstance(names, list) and names:
|
||||||
status['site_to_site'] = {'connections': {name: None if count is None else count > 0
|
counts = established_each(names).values()
|
||||||
for name, count in established_each(names).items()}}
|
status['site_to_site'] = {'connections': len(names),
|
||||||
|
'established': None if None in counts else sum(1 for count in counts if count)}
|
||||||
if state.get('p2s'):
|
if state.get('p2s'):
|
||||||
status['p2s'] = {'clients': established('road-warrior')}
|
status['p2s'] = {'clients': established('road-warrior')}
|
||||||
if state.get('wireguard'):
|
if state.get('wireguard'):
|
||||||
@@ -401,8 +402,9 @@ def text_of(status):
|
|||||||
docker = status['docker']
|
docker = status['docker']
|
||||||
lines.append('Docker: not installed' if not docker['installed']
|
lines.append('Docker: not installed' if not docker['installed']
|
||||||
else f'Docker: installed, service {docker["service"]}, rules {docker["rules"]}')
|
else f'Docker: installed, service {docker["service"]}, rules {docker["rules"]}')
|
||||||
for name, value in status.get('site_to_site', {}).get('connections', {}).items():
|
if 'site_to_site' in status:
|
||||||
lines.append(f'Site to site {name}: {"unknown" if value is None else "established" if value else "not established"}')
|
established, connections = status['site_to_site']['established'], status['site_to_site']['connections']
|
||||||
|
lines.append(f'Site to site: {"unknown" if established is None else established} of {connections} established')
|
||||||
if 'p2s' in status:
|
if 'p2s' in status:
|
||||||
clients = status['p2s']['clients']
|
clients = status['p2s']['clients']
|
||||||
lines.append(f'Road-warrior (IPsec P2S): {"unknown" if clients is None else f"{clients} connected"}')
|
lines.append(f'Road-warrior (IPsec P2S): {"unknown" if clients is None else f"{clients} connected"}')
|
||||||
|
|||||||
Reference in new issue
Block a user