Implement cmdrun config parameter

This commit is contained in:
eleksir
2025-05-19 12:19:25 +03:00
parent 757fb5e57e
commit 32d865e24e
7 changed files with 315 additions and 15 deletions

View File

@@ -70,7 +70,7 @@ func (c *MyConfig) UpdateVPNStatus() {
func (c *MyConfig) VPNTCPCheck() bool {
conn, err := net.DialTimeout(
"tcp",
fmt.Sprintf("%s:%d", c.Vpn.TCPCheck.Host, c.Vpn.TCPCheck.Port),
fmt.Sprintf("%s:%d", c.Vpn.TCPCheck.Host, c.Vpn.TCPCheck.Port), //nolint: hostport
time.Second*time.Duration(c.Vpn.TCPCheck.Timeout),
)