cfdf515228
- .claude/CLAUDE.md - .claude/commands/subagentes.md - .claude/rules/INDEX.md - .mcp.json - bash/functions/cybersecurity/analyze_dns.md - bash/functions/cybersecurity/audit_http_headers.md - bash/functions/cybersecurity/audit_ssh_config.md - bash/functions/cybersecurity/check_firewall.md - bash/functions/cybersecurity/detect_suspicious_users.md - bash/functions/cybersecurity/encrypt_file.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.4 KiB
2.4 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | params | output | tested | tests | test_file_path | file_path | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| win_portproxy_remove | function | ps | infra | 1.0.0 | impure | win_portproxy_remove -ListenPort <int> [-ListenAddr <string>] | Elimina una regla de port proxy v4tov4 de netsh identificada por ListenAddr:ListenPort. Si la regla no existe, termina con éxito sin hacer nada (idempotente). Requiere privilegios de Administrador. |
|
false | error_go_core |
|
Void - elimina regla de port proxy, idempotente (no falla si no existe) | false | powershell/functions/infra/win_portproxy_remove.ps1 |
Uso
# Eliminar portproxy en puerto 9222 (listenaddr por defecto: 0.0.0.0)
.\win_portproxy_remove.ps1 -ListenPort 9222
# Con listenaddr explícito
.\win_portproxy_remove.ps1 -ListenAddr 0.0.0.0 -ListenPort 9222
# Desde WSL2
powershell.exe -ExecutionPolicy Bypass -File win_portproxy_remove.ps1 -ListenPort 9222
Parametros
| Parametro | Tipo | Obligatorio | Default | Descripcion |
|---|---|---|---|---|
-ListenPort |
int | si | — | Puerto de escucha de la regla a eliminar (1-65535) |
-ListenAddr |
string | no | 0.0.0.0 |
Dirección IP de escucha de la regla a eliminar |
Notas
- Requiere ejecutarse como Administrador en Windows.
- Idempotente: si la regla no existe, sale con exit code 0 y mensaje informativo.
- Complementa
win_portproxy_addpara teardown limpio. - La regla se identifica por la combinación
listenaddress:listenport— debe coincidir exactamente con la usada enwin_portproxy_add. - Retorna exit code 0 si tuvo éxito (o la regla no existía), 1 si hubo error.
Teardown completo WSL2 → Chrome CDP
# 1. Eliminar portproxy
powershell.exe -ExecutionPolicy Bypass -File win_portproxy_remove.ps1 -ListenPort 9222
# 2. Eliminar regla de firewall
powershell.exe -ExecutionPolicy Bypass -File win_firewall_remove_rule.ps1 -Name "CDP-9222"