flayer.profiles.vpn¶
flayer.profiles.vpn ¶
Transport-neutral VPN intent, private artifact ownership, and replacement checks.
VpnError ¶
Bases: ContractError
VPN intent or artifact ownership is invalid before any external operation.
VpnDevice
dataclass
¶
VpnDevice(device_id: str, ipv4_address: str | None = None)
VpnRoutes
dataclass
¶
VpnRoutes(mode: str, ipv4_cidrs: tuple[str, ...], dns_servers: tuple[str, ...], ipv6_policy: str)
VpnEndpoint
dataclass
¶
VpnEndpoint(host: str, port: int)
VpnListener
dataclass
¶
VpnListener(transport: str, protocol: str, port: int, source_cidrs: tuple[str, ...])
VpnCapabilities
dataclass
¶
VpnCapabilities(transport: str, network_mode: str, route_modes: tuple[str, ...], ipv4: bool = True, ipv6: bool = False)
Transport-declared traffic scope; an application proxy is not an OS-wide tunnel.
VpnProfile
dataclass
¶
VpnProfile(identity: StackIdentity, devices: tuple[VpnDevice, ...], routes: VpnRoutes, listeners: tuple[VpnListener, ...], schema_version: int = VPN_SCHEMA_VERSION)
Public device and routing intent owned by one exact infrastructure stack.
Fingerprint ¶
Fingerprint() -> str
Hash only public intent for binding prepared artifacts to an exact profile.
Source code in installed/flayer/profiles/vpn.py
303 304 305 306 307 308 | |
PreparedVpnTransport
dataclass
¶
PreparedVpnTransport(profile: VpnProfile, capabilities: VpnCapabilities, server_bundle: ArtifactBundle, device_bundles: tuple[ArtifactBundle, ...])
Sensitive server and client artifacts; preparation is not deployment or health evidence.
server_bundle
class-attribute
instance-attribute
¶
server_bundle: ArtifactBundle = field(repr=False)
device_bundles
class-attribute
instance-attribute
¶
device_bundles: tuple[ArtifactBundle, ...] = field(repr=False)
Fingerprint ¶
Fingerprint() -> str
Bind replacement approval to public intent and exact private payload digests.
Source code in installed/flayer/profiles/vpn.py
421 422 423 424 425 426 427 428 429 430 431 432 433 434 | |
ValidateVpnTransport ¶
ValidateVpnTransport(profile: VpnProfile, capabilities: VpnCapabilities) -> VpnListener
Require the selected implementation to support this exact declared routing intent.
Source code in installed/flayer/profiles/vpn.py
311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 | |
BuildVpnServerBundle ¶
BuildVpnServerBundle(profile: VpnProfile, transport: str, files: tuple[Artifact, ...]) -> ArtifactBundle
Prepare private server bytes for authenticated guest provisioning, never cloud metadata.
Source code in installed/flayer/profiles/vpn.py
353 354 355 356 357 358 359 360 361 | |
BuildVpnDeviceBundle ¶
BuildVpnDeviceBundle(profile: VpnProfile, transport: str, device_id: str, files: tuple[Artifact, ...]) -> ArtifactBundle
Prepare owned client bytes without overwriting or revoking existing credentials.
Source code in installed/flayer/profiles/vpn.py
364 365 366 367 368 369 370 371 372 373 374 375 376 | |
ValidateVpnReplacement ¶
ValidateVpnReplacement(previous: PreparedVpnTransport, replacement: PreparedVpnTransport, *, expected_fingerprint: str) -> None
Require exact old artifact consent; guest revocation and local cleanup remain separate.
Source code in installed/flayer/profiles/vpn.py
437 438 439 440 441 442 443 444 445 446 447 448 449 | |
ParseVpnProfile ¶
ParseVpnProfile(data: Mapping[str, object]) -> VpnProfile
Decode only public VPN intent and reject unknown fields, including inline credentials.
Source code in installed/flayer/profiles/vpn.py
452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 | |
LoadVpnProfile ¶
LoadVpnProfile(path: str | Path) -> VpnProfile
Read a bounded public TOML profile without reading credentials or contacting a provider.
Source code in installed/flayer/profiles/vpn.py
509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 | |