Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultPort = 53317 DefaultMulticastGroup = "224.0.0.167" ProtocolVersion = "2.1" DefaultSecurityDir = ".localgo_security" DefaultSecurityFile = "context.json" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Alias string `json:"alias"`
Port int `json:"port"`
HttpsEnabled bool `json:"https_enabled"`
MulticastGroup string `json:"multicast_group"`
DeviceModel *string `json:"deviceModel"`
DeviceType model.DeviceType `json:"deviceType"`
SecurityContext *crypto.StoredSecurityContext `json:"-"`
SecurityPath string `json:"-"`
PIN string `json:"-"`
DownloadDir string `json:"-"`
AutoAccept bool `json:"-"`
RandomFingerprint string `json:"-"`
MaxBodySize int64 `json:"-"`
NoClipboard bool `json:"-"` // skip clipboard; save text as a file instead
HistoryFile string `json:"-"` // path to transfer history jsonl file
Quiet bool `json:"-"` // quiet mode - minimal output
ExecHook string `json:"-"` // shell command to run after receiving file
OpenDir bool `json:"-"` // open download directory after transfer
}
func LoadConfig ¶
func (*Config) GetFingerprint ¶ added in v0.4.0
GetFingerprint returns the appropriate fingerprint (certificate hash if HTTPS, random otherwise).
func (*Config) Protocol ¶ added in v0.4.0
func (c *Config) Protocol() model.ProtocolType
Protocol returns the protocol type based on HttpsEnabled.
func (*Config) ToMulticastDto ¶ added in v0.4.0
func (c *Config) ToMulticastDto(download bool) model.MulticastDto
ToMulticastDto creates a MulticastDto from the current configuration.
func (*Config) ToRegisterDto ¶
func (c *Config) ToRegisterDto() model.RegisterDto
ToRegisterDto converts Config to model.RegisterDto for discovery requests
Click to show internal directories.
Click to hide internal directories.