Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 43 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,29 @@ jobs:
python-version: '3.11'
cache: pip
- run: python -m pip install --upgrade pip
- run: python -m pip install -e ".[dev]"
- run: python -m pip install -e ".[dev,gui]"
- run: python -m pip check
- name: Integration tests
run: |
set +e
python -m coverage run --branch --source=src -m pytest -p no:cacheprovider 2>&1 | tee test-output.log
python -m coverage run --branch --source=src -m pytest -p no:cacheprovider --junitxml=pytest.xml 2>&1 | tee test-output.log
status=${PIPESTATUS[0]}
if [ "$status" -ne 0 ]; then
grep -E 'FAIL:|ERROR:|FAILED|AssertionError|ModuleNotFoundError|AttributeError|OSError|Ran [0-9]+ tests' test-output.log | tail -10 | while IFS= read -r line; do
echo "::error title=Test output::$line"
done
fi
exit "$status"
- name: Preserve test diagnostics
if: always()
uses: actions/upload-artifact@v4
with:
name: tests-linux-${{ github.sha }}
path: |
pytest.xml
test-output.log
if-no-files-found: warn
retention-days: 14
- name: Branch coverage gate
run: |
python -m coverage report --precision=4 --fail-under=60
Expand Down Expand Up @@ -67,3 +77,34 @@ jobs:
path: coverage.xml
if-no-files-found: error
retention-days: 14

windows-tests:
runs-on: windows-2022
timeout-minutes: 30
env:
LANCTL_GUI_BROWSER_TESTS: '1'
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- run: python -m pip install --upgrade pip
- run: python -m pip install -e ".[dev,gui]"
- name: Browser regression runtime (uses runner Microsoft Edge)
run: python -m pip install playwright==1.63.0
- run: python -m pip check
- name: Native Windows regression tests
run: python -m pytest -q -p no:cacheprovider --junitxml=pytest.xml
- name: Preserve Windows test diagnostics
if: always()
uses: actions/upload-artifact@v4
with:
name: tests-windows-${{ matrix.python-version }}-${{ github.sha }}
path: pytest.xml
if-no-files-found: warn
retention-days: 14
44 changes: 38 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ name: Build release artifacts
on:
push:
tags: ['v[0-9]+.[0-9]+.[0-9]+*']
branches: ['stable/**']
branches: ['stable/**', 'experimental-gui']
workflow_dispatch:
inputs:
version:
description: Version without v prefix
required: true
default: 0.3.3
default: 0.3.4-alpha.1

permissions:
contents: read
Expand All @@ -19,7 +19,7 @@ env:

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
cancel-in-progress: ${{ github.ref == 'refs/heads/experimental-gui' }}

jobs:
prepare:
Expand All @@ -36,6 +36,18 @@ jobs:
if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
version='${{ inputs.version }}'
stable_branch=false
elif [[ "${GITHUB_REF}" == refs/heads/experimental-gui ]]; then
version="$(python -c "import runpy; print(runpy.run_path('src/lanctl/__init__.py')['__version__'])")"
if [[ ! "$version" =~ -alpha\.[0-9]+$ ]]; then
echo 'experimental-gui requires an alpha version' >&2
exit 1
fi
published_tag="$(git ls-remote --tags origin "refs/tags/v${version}")"
if [[ -n "$published_tag" ]]; then
echo 'This experimental version is already published; increment the alpha version.' >&2
exit 1
fi
stable_branch=false
elif [[ "${GITHUB_REF}" == refs/heads/stable/* ]]; then
version="${GITHUB_REF_NAME#stable/}"
stable_branch=true
Expand All @@ -59,19 +71,29 @@ jobs:
- uses: actions/setup-python@v5
with: {python-version: '3.11', cache: pip}
- run: python -m pip install --upgrade pip
- run: python -m pip install -e ".[dev]" pyinstaller==6.21.0
- run: python -m pip install -e ".[dev,gui]" pyinstaller==6.21.0
- run: python -m pip check
- name: Tests
run: |
set +e
python -m coverage run --branch --source=src -m pytest -p no:cacheprovider 2>&1 | tee test-output.log
python -m coverage run --branch --source=src -m pytest -p no:cacheprovider --junitxml=pytest.xml 2>&1 | tee test-output.log
status=${PIPESTATUS[0]}
if [ "$status" -ne 0 ]; then
grep -E 'FAIL:|ERROR:|FAILED|AssertionError|ModuleNotFoundError|AttributeError|OSError|Ran [0-9]+ tests' test-output.log | tail -10 | while IFS= read -r line; do
echo "::error title=Test output::$line"
done
fi
exit "$status"
- name: Preserve validation diagnostics
if: always()
uses: actions/upload-artifact@v4
with:
name: release-validation-${{ github.sha }}
path: |
pytest.xml
test-output.log
if-no-files-found: warn
retention-days: 14
- name: Coverage gate
run: |
python -m coverage report --precision=4 --fail-under=60
Expand Down Expand Up @@ -168,6 +190,15 @@ jobs:
if ($uninstalled.ExitCode -ne 0) { throw "Clean uninstall failed ($($uninstalled.ExitCode))" }
if (-not (Test-Path -LiteralPath $sentinel)) { throw 'User data was not preserved' }
if (Test-Path -LiteralPath "$install/LANCTL.exe") { throw 'Application files remain' }
- name: Frozen portable GUI smoke
timeout-minutes: 10
shell: pwsh
run: |
$version = '${{ needs.prepare.outputs.version }}'
$portable = Join-Path $env:RUNNER_TEMP 'LANCTL-experimental-gui-smoke'
Expand-Archive -LiteralPath "dist/release/LANCTL-$version-windows-x64-portable.zip" -DestinationPath $portable
python tests/portable_smoke.py $portable
if ($LASTEXITCODE -ne 0) { throw 'Frozen experimental GUI smoke failed' }
- uses: actions/upload-artifact@v4
with:
name: windows-x64
Expand Down Expand Up @@ -259,7 +290,8 @@ jobs:
- uses: softprops/action-gh-release@v2
with:
tag_name: v${{ needs.prepare.outputs.version }}
name: LANCTL ${{ needs.prepare.outputs.version }}
name: ${{ needs.prepare.outputs.stable_branch == 'true' && format('LANCTL {0}', needs.prepare.outputs.version) || format('LANCTL {0} - GUI experimental (NO ESTABLE)', needs.prepare.outputs.version) }}
make_latest: ${{ needs.prepare.outputs.stable_branch == 'true' && 'true' || 'false' }}
target_commitish: ${{ github.sha }}
prerelease: ${{ needs.prepare.outputs.stable_branch != 'true' && contains(needs.prepare.outputs.version, '-') }}
generate_release_notes: true
Expand Down
19 changes: 10 additions & 9 deletions LANCTL.spec
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ datas = collect_data_files("manuf") + [
("bundled/lanctl.lab.network-emulator.lcp", "bundled"),
("bundled/plugin-catalog.json", "bundled"),
("assets/lanctl-icon-v3.png", "assets"),
("assets/launcher-icons", "assets/launcher-icons"),
("assets/device-icons", "assets/device-icons"),
("errorList.txt", "."),
]
Expand Down Expand Up @@ -62,7 +63,7 @@ exe = EXE(
strip=False,
upx=True,
console=True,
icon="assets/lanctl-v3.ico",
icon="assets/launcher-icons/lanctl.ico",
version=VERSION_INFO,
)

Expand Down Expand Up @@ -97,7 +98,7 @@ ip_exe = EXE(
strip=False,
upx=True,
console=True,
icon="assets/lanctl-v3.ico",
icon="assets/launcher-icons/lanip.ico",
version=VERSION_INFO,
)

Expand All @@ -108,12 +109,12 @@ physical_a = Analysis(
["packaging/entrypoints/lanwire_entry.py"],
pathex=[str(SOURCE_ROOT)],
binaries=[],
datas=[],
hiddenimports=collect_submodules("lanctl.apps.wire"),
datas=datas,
hiddenimports=["paramiko", "cryptography"] + collect_runtime_modules(),
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=["PIL", "numpy"],
excludes=LEGACY_GUI_EXCLUDES,
noarchive=False,
optimize=0,
)
Expand All @@ -131,7 +132,7 @@ physical_exe = EXE(
strip=False,
upx=True,
console=True,
icon="assets/lanctl-v3.ico",
icon="assets/launcher-icons/lanwire.ico",
version=VERSION_INFO,
)

Expand Down Expand Up @@ -163,7 +164,7 @@ monitor_exe = EXE(
strip=False,
upx=True,
console=True,
icon="assets/lanctl-v3.ico",
icon="assets/launcher-icons/lanmon.ico",
version=VERSION_INFO,
)

Expand All @@ -180,7 +181,7 @@ rack_pyz = PYZ(rack_a.pure)
rack_exe = EXE(
rack_pyz, rack_a.scripts, rack_a.binaries, rack_a.datas, [], name="lanrack",
debug=False, bootloader_ignore_signals=False, strip=False, upx=True, console=True,
icon="assets/lanctl-v3.ico", version=VERSION_INFO,
icon="assets/launcher-icons/lanrack.ico", version=VERSION_INFO,
)

access_a = Analysis(
Expand All @@ -196,5 +197,5 @@ access_pyz = PYZ(access_a.pure)
access_exe = EXE(
access_pyz, access_a.scripts, access_a.binaries, access_a.datas, [], name="lanaccess",
debug=False, bootloader_ignore_signals=False, strip=False, upx=True, console=True,
icon="assets/lanctl-v3.ico", version=VERSION_INFO,
icon="assets/launcher-icons/lanaccess.ico", version=VERSION_INFO,
)
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# LANCTL
# LANCTL — GUI experimental

> **PROTOTIPO EXPERIMENTAL — NO ES UNA VERSIÓN ESTABLE.**
> Rama `experimental-gui`, versión **0.3.4-alpha.1**. Para pruebas de la GUI en
> Windows x64: [descargas e instrucciones](docs/RELEASE-0.3.4-alpha.1.md).
> La versión estable sigue disponible en [Releases](https://github.com/CctrGy/LANCTL/releases/latest).

Interfaces de los seis launchers: [CLI y TUI](docs/LAUNCHER-INTERFACES.md).

Centro de administración GUI: `lanctl --gui`; consulta [GUI de LANCTL](docs/LANCTL-GUI.md).

Interfaz de escritorio de LANIP: [GUI de LANIP](docs/LANIP-GUI.md).
Se ejecuta con `lanip --gui` y se incluye en los instaladores de Windows de
0.3.3. Linux conserva la distribución CLI/TUI.
Expand All @@ -17,8 +24,8 @@ La [LANCTL Reference](reference/index.html) ofrece un índice web con búsqueda,
sintaxis, opciones y ejemplos de todos los launchers y comandos, además de
proyectos VLF, plugins LCP y el catálogo de documentación.

> Versión actual: **0.3.3**, canal estable. Consulta las
> [notas y limitaciones](docs/RELEASE-0.3.3.md).
> Versión de esta rama: **0.3.4-alpha.1**, GUI experimental, no estable.
> Consulta las [notas de prueba](docs/RELEASE-0.3.4-alpha.1.md).
> Conserva copias de seguridad; no utilices el programa como única fuente de inventario.

### Cambios de 0.3.3
Expand Down Expand Up @@ -414,11 +421,11 @@ plan sin ejecutar). Consulta [repositoryTerminal](repositoryTerminal/README.md)
para requisitos y ejemplos. No cambia la versión ni realiza Git/push.

```powershell
.\scripts\build-windows.ps1 -Version 0.3.3
.\scripts\build-windows.ps1 -Version 0.3.4-alpha.1
```

```sh
./scripts/build-linux.sh 0.3.3
./scripts/build-linux.sh 0.3.4-alpha.1
```

Los builds generan metadatos, `SHA256SUMS.txt` y verifican el conjunto final.
Expand Down Expand Up @@ -474,3 +481,7 @@ archivos de documentación.

Si LANCTL te resulta útil, puedes seguir y apoyar su desarrollo en
[CctrGy Donations](https://cctrgy.github.io/donations.html).

Configuración CLI completa, agrupada por programa y proyecto: [guía de ajustes](docs/CLI-SETTINGS.md).

Interfaces gráficas de LANWIRE, LANRACK, LANACCESS y LANMON: [uso y funciones](docs/LAUNCHER-GUI.md).
Binary file added assets/launcher-icons/lanaccess.ico
Binary file not shown.
Binary file added assets/launcher-icons/lanaccess.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/launcher-icons/lanaccess.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/launcher-icons/lanctl.ico
Binary file not shown.
Binary file added assets/launcher-icons/lanctl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/launcher-icons/lanctl.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/launcher-icons/lanip.ico
Binary file not shown.
Binary file added assets/launcher-icons/lanip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/launcher-icons/lanip.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/launcher-icons/lanmon.ico
Binary file not shown.
Binary file added assets/launcher-icons/lanmon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/launcher-icons/lanmon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/launcher-icons/lanrack.ico
Binary file not shown.
Binary file added assets/launcher-icons/lanrack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/launcher-icons/lanrack.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/launcher-icons/lanwire.ico
Binary file not shown.
Binary file added assets/launcher-icons/lanwire.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/launcher-icons/lanwire.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/launcher-icons/terminal.ico
Binary file not shown.
Binary file added assets/launcher-icons/terminal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/launcher-icons/terminal.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions docs/ACCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,26 @@ un canal confiable. `access status` distingue configuración habilitada de
proceso realmente activo. La recuperación se ejecuta localmente y no existen
cuentas o contraseñas predeterminadas.

## Cuenta inicial desde el instalador de Windows

Setup ofrece **Crear la primera cuenta de acceso remoto del servicio**. Después
de copiar los ejecutables y proteger el directorio de acceso, abre el asistente
`lanaccess remote-setup` con los privilegios de la instalación. Solicita usuario,
contraseña (al menos 12 caracteres) y confirmación directamente en su ventana.
No recibe contraseñas por línea de comandos ni las guarda en archivos temporales.

La cuenta tiene el rol `administrator` de LANACCESS y pertenece al ámbito
`service`, en `ProgramData\LANCTL\access\users.dc`; no crea usuarios de Windows
ni credenciales para dispositivos del inventario. El almacén conserva únicamente
el hash Scrypt. Si ya existen cuentas, las conserva y bloquea una nueva creación
inicial; para administrarlas usa los comandos `access user` con `--scope service`.
Las rutas personalizadas requieren esa administración existente, sin sobrescribir
su configuración desde este asistente.

Crear la cuenta no habilita SSH/HTTPS ni modifica el firewall. Configura después
los endpoints y autenticadores necesarios siguiendo los pasos anteriores. Es
posible omitir o cerrar el asistente; una instalación silenciosa no lo abre.

## Remote Access desde SETTINGS

La pestaña `REMOTE ACCESS` de F12 reúne la IP de escucha, CIDR autorizado,
Expand Down
Loading
Loading