mirror of
https://github.com/db9979/sshtermy.git
synced 2026-12-05 20:34:07 +01:00
Verbindungsformular: SSH / Telnet / Seriell, Schnittstelle automatisch, Baud und Datenformat. Eigener Telnet-Client (Echo, SGA, NAWS, TTYPE), serielle Konsole über go.bug.st/serial für Windows, macOS und Linux, automatische Anmeldung mit hinterlegtem Benutzer/Passwort, Break-Signal, Schnellverbinden in der Palette. Host-Übersicht und Config-Sicherung laufen auch über Telnet und Konsole. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUhNaT4uTwf1GEbSpbh
32 lines
783 B
Go
32 lines
783 B
Go
// fakeswitch startet den nachgebauten ProCurve aus internal/devfake, z. B. für
|
|
// Screenshots der Host-Übersicht: go run ./tools/dev/fakeswitch 127.0.0.1:2323
|
|
// Mit -telnet lauscht er per Telnet statt SSH (Benutzer/Passwort beliebig).
|
|
package main
|
|
|
|
import (
|
|
"flag"
|
|
"log"
|
|
|
|
"github.com/db9979/sshtermy/internal/devfake"
|
|
)
|
|
|
|
func main() {
|
|
tel := flag.Bool("telnet", false, "Telnet statt SSH")
|
|
flag.Parse()
|
|
addr := "127.0.0.1:2323"
|
|
if flag.NArg() > 0 {
|
|
addr = flag.Arg(0)
|
|
}
|
|
start := devfake.StartSwitch
|
|
if *tel {
|
|
start = devfake.StartTelnetSwitch
|
|
}
|
|
sw, err := start(addr)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
sw.PressAnyKey = true
|
|
log.Printf("Fake-ProCurve auf %s (Telnet: %v, Benutzer/Passwort beliebig, 'vlan <n>' ändert die Config)", sw.Addr, *tel)
|
|
select {}
|
|
}
|