ends article branch

This commit is contained in:
2025-09-12 13:53:32 +06:00
parent f94bba14a1
commit 7909ec619e
5 changed files with 58 additions and 34 deletions

View File

@@ -287,7 +287,12 @@ func (pk *PortKnocker) knockTarget(target Target, verbose bool) error {
for i, port := range target.Ports {
if verbose {
fmt.Printf(" Отправка пакета на %s:%d (%s)\n", target.Host, port, protocol)
if target.Gateway != "" {
fmt.Printf(" Отправка пакета на %s:%d (%s) через шлюз %s\n", target.Host, port, protocol, target.Gateway)
} else {
fmt.Printf(" Отправка пакета на %s:%d (%s)\n", target.Host, port, protocol)
}
}
if err := pk.sendPacket(target.Host, port, protocol, target.WaitConnection, timeout, target.Gateway); err != nil {