-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.go
More file actions
49 lines (44 loc) · 1.62 KB
/
Copy pathconstants.go
File metadata and controls
49 lines (44 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package main
import "time"
// File and directory permissions
const (
// FilePermissions is the standard permission for config files (owner read/write only)
FilePermissions = 0600
// DirPermissions is the standard permission for config directories (owner rwx only)
DirPermissions = 0700
)
// Buffer sizes
const (
// BufferSize is the standard buffer size for PTY I/O
BufferSize = 4096
)
// SSH defaults
const (
// DefaultSSHPort is the standard SSH port
DefaultSSHPort = 22
// AlternativeSSHPort is a common alternative SSH port
AlternativeSSHPort = 2222
)
// Timeout constants
const (
// UploadTimeout is the maximum time to wait for a file upload
UploadTimeout = 5 * time.Minute
// PairingTimeout is the maximum time to wait for pairing completion
PairingTimeout = 5 * time.Minute
// HTTPClientTimeout is the timeout for HTTP requests to the relay
HTTPClientTimeout = 30 * time.Second
// ReconnectDelay is the delay between WebSocket reconnection attempts
ReconnectDelay = 2 * time.Second
// RelayConnectDelay is the delay between relay connection retries
RelayConnectDelay = 5 * time.Second
// PingInterval is the interval for WebSocket keepalive pings
PingInterval = 10 * time.Second
// PairingPollInterval is the interval for polling pairing status
PairingPollInterval = 2 * time.Second
// UploadCleanupInterval is the interval for cleaning up abandoned uploads
UploadCleanupInterval = 1 * time.Minute
// SSHConnectTimeout is the timeout for SSH connection checks
SSHConnectTimeout = time.Second
// SSHQuickCheckTimeout is the timeout for quick SSH availability checks
SSHQuickCheckTimeout = 500 * time.Millisecond
)