manager

package
v0.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2026 License: AGPL-3.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DiscoverStageMDNS     = "mdns"
	DiscoverStageScanning = "scanning"
	DiscoverStageProbing  = "probing"
	DiscoverStageFound    = "found"
	DiscoverStageFailed   = "failed"
)

Discovery stages reported to the caller so the UI can show progress.

Variables

View Source
var ErrAccountInvalid = errors.New("account invalid")
View Source
var ErrCertificateResetRequired = errors.New("certificate reset required")

ErrCertificateResetRequired marks an Apple ID installation that stopped because the account holds as many signing certificates as Apple allows and revoking one was not authorized. The engine revoked nothing; a user has to pick a certificate on the install page first.

View Source
var ErrDeviceUnreachable = errors.New("device is unreachable: check that the device is online and, for Tailscale, that its client is connected")

ErrDeviceUnreachable is returned when every dial in the port scan timed out without a single response. A reachable host answers at least one port (an open port accepts, a closed port refuses/RSTs), so a range where nothing ever answers means the address is not responding at all — for example a Tailscale peer whose client is not connected. Reporting this instead of "port not found" tells the user the real cause: the device is offline, not that its service moved.

View Source
var ErrPairingPortNotFound = errors.New("manual pairing port not found")

ErrPairingPortNotFound is returned when no port answers allowsPairSetup.

View Source
var ErrTunnelPortNotFound = errors.New("manual tunnel port not found: the iPhone must be connected to Wi-Fi for the connection to work")

ErrTunnelPortNotFound is returned when no port answers allowsIncomingTunnelConnections. iOS only exposes the local developer and lockdown services while an 802.11 Wi-Fi link is active (cellular data does not count), so a battery of correct dials can still find nothing on a device that left Wi-Fi; the message says so, because that is the usual cause when the address itself is reachable.

Functions

func CheckAfcServiceStatus

func CheckAfcServiceStatus(udid string) error

func CheckDeviceStatus added in v0.2.5

func CheckDeviceStatus(udid string) error

func CleanUploadTempFiles added in v0.6.0

func CleanUploadTempFiles(files ...string)

CleanUploadTempFiles removes the given upload temp files without needing an InstallManager instance. Paths outside the upload temp directory are skipped.

func DeleteAccountDevice added in v0.3.0

func DeleteAccountDevice(email, deviceID string) error

func DeleteManualDevice added in v0.8.0

func DeleteManualDevice(udid string) error

DeleteManualDevice removes a manually added device: its pairing files (<udid>.json and <udid>.plist) and its in-memory entry.

func ExportCertificate added in v0.3.0

func ExportCertificate(email, password string) ([]byte, error)

func GetAccountDevices added in v0.3.0

func GetAccountDevices(email string) ([]model.AccountDevice, error)

func GetAppleAccounts added in v0.3.0

func GetAppleAccounts() (*model.Accounts, error)

func GetCertificates added in v0.3.0

func GetCertificates(email string) ([]model.Certificate, error)

func GetDeviceByID

func GetDeviceByID(id string) (*model.Device, bool)

func GetDeviceByUDID added in v0.3.0

func GetDeviceByUDID(udid string) (*model.Device, bool)

func GetDeviceDetail added in v0.4.0

func GetDeviceDetail(id string) (*model.Device, bool)

func GetDeviceInfo added in v0.3.0

func GetDeviceInfo(dev *model.Device) (*model.DeviceInfo, error)

GetDeviceInfo queries the device for its lockdown values, including the hardware UniqueDeviceID.

func GetDevices

func GetDevices() ([]model.Device, error)

func GetRunEnvs added in v0.3.0

func GetRunEnvs() []string

func ImportCertificate added in v0.3.0

func ImportCertificate(email, password string, p12 []byte) error

func ImportPairingFile added in v0.3.0

func ImportPairingFile(ip string, port string, manual bool, data []byte) error

func IsManualDeviceAddr added in v0.8.0

func IsManualDeviceAddr(ip string) bool

IsManualDeviceAddr reports whether ip is an address a manually added device may use: a private LAN IPv4 or the CGNAT range mesh VPNs assign. Manual entry triggers a full-range TCP scan, so rejecting public addresses keeps the portal from being turned into a scanner for arbitrary hosts.

func LogoutAppleAccount added in v0.3.0

func LogoutAppleAccount(email string) error

func ManualPortNeedsResolve added in v0.8.0

func ManualPortNeedsResolve(dev *model.Device) bool

ManualPortNeedsResolve reports whether the next PrepareManualDevice call will probe for a manual device's tunnel port (missing or older than the cache TTL). Used to show a probe prompt before the potentially slow discovery.

func PrepareManualDevice added in v0.8.0

func PrepareManualDevice(ctx context.Context, dev *model.Device) error

PrepareManualDevice resolves the dynamic tunnel port of a manual device so that installs, refreshes and screenshots can reach it over RSD. It is a no-op for mDNS-discovered devices.

func ReleaseUploadTempFiles added in v0.6.0

func ReleaseUploadTempFiles(paths ...string)

ReleaseUploadTempFiles drops the ownership marks of ReserveUploadTempFiles, letting stale-file sweeps remove the files again.

func ReloadDevices

func ReloadDevices()

func ReloadManualDevices added in v0.8.0

func ReloadManualDevices()

ReloadManualDevices rebuilds the manual-device list from the pairing files.

func RemoveAnisette added in v0.8.2

func RemoveAnisette(email string) error

RemoveAnisette deletes an account's Anisette data directory through the engine. It is used for data left behind by an account that no longer exists in the account list: there is no account to re-login for, so the leftover data is deleted outright instead of reset.

func ReserveUploadTempFiles added in v0.6.0

func ReserveUploadTempFiles(paths ...string)

ReserveUploadTempFiles marks upload temp files as owned by a queued or running installation so that stale-file sweeps keep them. Remote URLs and unresolvable paths are ignored.

func ResetAnisette added in v0.7.3

func ResetAnisette(email string) error

ResetAnisette drops the Anisette provisioning data of a single account through the engine, so a new device identity is generated the next time that account is used. Anisette state is provisioned per account, so the engine needs the account to know which state to discard. The command is local, so it needs no working directory or proxy environment.

func RevokeCertificate added in v0.3.0

func RevokeCertificate(email string, serialNumber string) error

func ScanDevices

func ScanDevices()

func ScanServices added in v0.3.0

func ScanServices(ctx context.Context, callback func(serviceType string, name string, host string, address string, port uint16, txt [][]byte)) error

func ScanWirelessDevices added in v0.3.0

func ScanWirelessDevices(ctx context.Context, timeout time.Duration) ([]model.Device, error)

func ScreenshotDataBase64 added in v0.4.3

func ScreenshotDataBase64(png []byte) string

ScreenshotDataBase64 returns the base64 encoding of the screenshot bytes.

func ScreenshotFilename added in v0.6.0

func ScreenshotFilename(now time.Time) string

ScreenshotFilename builds the filename offered when a screenshot is downloaded as an attachment.

func SetAnisetteServer added in v0.7.4

func SetAnisetteServer(server string) error

SetAnisetteServer points the engine at an anisette server. An empty URL restores the engine default.

func SetDeviceConnectedCallback added in v0.3.0

func SetDeviceConnectedCallback(callback func(device model.Device))

SetDeviceConnectedCallback Set the callback function for device connection (exported function)

func SetDeviceDisconnectedCallback added in v0.3.0

func SetDeviceDisconnectedCallback(callback func(device model.Device))

SetDeviceDisconnectedCallback Set the callback function for device disconnection (exported function)

func StartDeviceManager

func StartDeviceManager()

func StopDeviceManager added in v0.3.0

func StopDeviceManager()

func UploadTempFileReserved added in v0.6.0

func UploadTempFileReserved(path string) bool

UploadTempFileReserved reports whether the upload temp file at path is owned by a queued or running installation and must be kept by stale-file sweeps.

func WarmManualDevicePort added in v0.8.0

func WarmManualDevicePort(ip string)

WarmManualDevicePort resolves a manual device's tunnel port in the background after its pairing completes, so the first install does not pay for the full-range scan. Failures are logged only; the install page resolves the port on demand.

Types

type AccountManager added in v0.3.0

type AccountManager struct{}

func (*AccountManager) DeleteAccountDevice added in v0.3.0

func (am *AccountManager) DeleteAccountDevice(email, deviceID string) error

func (*AccountManager) GetAccountDevices added in v0.3.0

func (am *AccountManager) GetAccountDevices(email string) ([]model.AccountDevice, error)

func (*AccountManager) GetAccounts added in v0.3.0

func (am *AccountManager) GetAccounts() (*model.Accounts, error)

GetAccounts reads account file and returns simplified account info. The accounts.json may be an array or an object; normalize both to a slice.

func (*AccountManager) LogoutAccount added in v0.3.0

func (am *AccountManager) LogoutAccount(email string) error

type AnisetteAccount added in v0.8.2

type AnisetteAccount struct {
	Email  string `json:"email"`
	Name   string `json:"name"`
	TeamID string `json:"team_id"`
	// Orphan is true when the account is not in the account list (accounts.json).
	// Its data is leftover from a failed or removed login, so it can only be
	// deleted, not reset.
	Orphan bool `json:"orphan"`
}

AnisetteAccount is one account that has Anisette data stored on disk. The engine provisions this data per account, and a failed login can leave data behind for an account that is no longer in the account list, so the engine's anisette list — not the account list — decides which accounts can be reset.

func AnisetteAccounts added in v0.8.2

func AnisetteAccounts() ([]AnisetteAccount, error)

AnisetteAccounts lists the accounts that have Anisette data stored, by asking the engine. Unlike the account list, this includes accounts whose login failed but whose data directory still exists; those are marked orphaned so the caller knows they can only be deleted.

type AnisetteServerState added in v0.7.4

type AnisetteServerState struct {
	Server    string `json:"server"`
	IsDefault bool   `json:"is_default"`
}

AnisetteServerState is the anisette server the engine provisions against, with whether it is the engine default rather than a configured one.

func AnisetteServer added in v0.7.4

func AnisetteServer() (*AnisetteServerState, error)

AnisetteServer returns the anisette server the engine provisions against.

type CertificateManager added in v0.3.0

type CertificateManager struct{}

func (*CertificateManager) ExportCertificate added in v0.3.0

func (m *CertificateManager) ExportCertificate(email, password, path string) (string, error)

func (*CertificateManager) GetCertificates added in v0.3.0

func (m *CertificateManager) GetCertificates(email string) ([]model.Certificate, error)

func (*CertificateManager) ImportCertificate added in v0.3.0

func (m *CertificateManager) ImportCertificate(email, password string, p12 []byte) error

ImportCertificate imports the certificate of the PKCS#12 file p12 for email through the signing engine.

The file is decoded in process and written again as a legacy PKCS#12 file before the engine runs. SideStore's "Export Full (.p12)" stores the private key as a plain keyBag without a MAC, which the engine's reader reports as holding no private key.

password only decodes the input here: the engine is handed the throwaway password of the re-wrapped file, so the password of the user never reaches the command line or the debug log. The input is never written to disk; only the re-wrapped copy is, for the duration of the engine run.

func (*CertificateManager) RevokeCertificate added in v0.3.0

func (m *CertificateManager) RevokeCertificate(email string, serialNumber string) error

type DeviceManager

type DeviceManager struct {
	// contains filtered or unexported fields
}

func (*DeviceManager) AppendProductInfo added in v0.2.5

func (dm *DeviceManager) AppendProductInfo(dev *model.Device, devInfo model.DeviceInfo)

func (*DeviceManager) CheckAfcServiceStatus

func (dm *DeviceManager) CheckAfcServiceStatus(dev *model.Device) error

func (*DeviceManager) CheckDevicePaired added in v0.4.0

func (dm *DeviceManager) CheckDevicePaired(identifier string, authTag string) (*model.RemoteDevice, error)

func (*DeviceManager) CheckDevicePairedContext added in v0.4.8

func (dm *DeviceManager) CheckDevicePairedContext(ctx context.Context, identifier string, authTag string) (*model.RemoteDevice, error)

CheckDevicePairedContext is CheckDevicePaired with a cancellable context: when ctx is cancelled (e.g. the device disconnects), the plumesign subprocess is killed and the goroutine returns promptly.

func (*DeviceManager) DeleteDevice added in v0.3.0

func (dm *DeviceManager) DeleteDevice(id string)

func (*DeviceManager) DeleteDeviceByMacAddr added in v0.3.0

func (dm *DeviceManager) DeleteDeviceByMacAddr(macAddr string)

func (*DeviceManager) DeleteDeviceByServiceName added in v0.4.0

func (dm *DeviceManager) DeleteDeviceByServiceName(serviceName string, conection model.DeviceConnection)

func (*DeviceManager) DeleteDeviceByUDID added in v0.4.0

func (dm *DeviceManager) DeleteDeviceByUDID(udid string)

func (*DeviceManager) GetDeviceByID

func (dm *DeviceManager) GetDeviceByID(id string) (*model.Device, bool)

func (*DeviceManager) GetDeviceByUDID

func (dm *DeviceManager) GetDeviceByUDID(udid string) (*model.Device, bool)

func (*DeviceManager) GetDeviceInfo added in v0.3.0

func (dm *DeviceManager) GetDeviceInfo(dev *model.Device) (*model.DeviceInfo, error)

func (*DeviceManager) GetDevices

func (dm *DeviceManager) GetDevices() []model.Device

func (*DeviceManager) HasCheckedDevice added in v0.4.0

func (dm *DeviceManager) HasCheckedDevice(ip string, port uint16, name string) bool

func (*DeviceManager) PrepareManualDevice added in v0.8.0

func (dm *DeviceManager) PrepareManualDevice(ctx context.Context, dev *model.Device) error

PrepareManualDevice ensures a manual device has a usable _remotepairing tunnel port before an install/refresh/mount. Non-manual devices are a no-op. The port is dynamic, so it is re-probed when missing or older than manualPortTTL. It never retries automatically; callers decide what to do on error.

func (*DeviceManager) ReloadDevices

func (dm *DeviceManager) ReloadDevices()

func (*DeviceManager) ReloadManualDevices added in v0.8.0

func (dm *DeviceManager) ReloadManualDevices()

ReloadManualDevices rebuilds manualDevices from the pairing files. A manual device is one paired by a manually entered IP (json has manual=true and a remotepairing_ip); mDNS-discovered devices are not written here.

func (*DeviceManager) RemoveManualDevice added in v0.8.0

func (dm *DeviceManager) RemoveManualDevice(id string)

RemoveManualDevice drops a manual device from memory (after its pairing files are deleted).

func (*DeviceManager) SaveDevice added in v0.3.0

func (dm *DeviceManager) SaveDevice(dev model.Device)

func (*DeviceManager) Scan

func (dm *DeviceManager) Scan()

func (*DeviceManager) ScanServices added in v0.3.0

func (dm *DeviceManager) ScanServices(ctx context.Context, callback func(serviceType string, name string, host string, address string, port uint16, txt [][]byte)) error

func (*DeviceManager) ScanWirelessDevices added in v0.3.0

func (dm *DeviceManager) ScanWirelessDevices(ctx context.Context, timeout time.Duration) ([]model.Device, error)

func (*DeviceManager) SetOnDeviceConnected added in v0.3.0

func (dm *DeviceManager) SetOnDeviceConnected(callback func(device model.Device))

SetOnDeviceConnected Set the callback function for device connection

func (*DeviceManager) SetOnDeviceDisconnected added in v0.3.0

func (dm *DeviceManager) SetOnDeviceDisconnected(callback func(device model.Device))

SetOnDeviceDisconnected Set the callback function for device disconnection

func (*DeviceManager) Start

func (dm *DeviceManager) Start()

需要依赖socket套接字: /var/run/dbus /var/run/avahi-daemon

func (*DeviceManager) Stop added in v0.3.0

func (dm *DeviceManager) Stop()

Stop Stop the device manager

func (*DeviceManager) WarmManualDevicePort added in v0.8.0

func (dm *DeviceManager) WarmManualDevicePort(ip string)

WarmManualDevicePort resolves a manual device's tunnel port in the background right after its pairing completes, so the install page does not pay for the full-range scan on the first install. It looks the device up by IP (the pairing record that makes the scan possible was just written, and the freshly rebuilt manual entry carries its UDID) and runs the same PrepareManualDevice path a foreground install would use. Failures are only logged: the install page resolves the port on demand anyway.

type DiscoveryProgress added in v0.8.0

type DiscoveryProgress func(stage string, percent int)

DiscoveryProgress reports discovery progress. stage is one of the DiscoverStage* constants; percent (0-100) is only meaningful while scanning.

type ExternalSigning added in v0.6.0

type ExternalSigning struct {
	CertificatePath string
	PrivateKeyPath  string
	ProfilePath     string
	// OutputPath receives the signed IPA; the engine writes it after installing.
	OutputPath string
	// CustomIdentifier is passed as --custom-identifier=<id> when not empty.
	CustomIdentifier string
	// PairingFile is the remote pairing record of an RSD device. Empty selects
	// the device record of the atvloadly data directory.
	PairingFile string
	// HomeDir and TempDir isolate the engine from the Apple ID accounts and
	// from the staging directories of other installations.
	HomeDir string
	TempDir string
}

ExternalSigning is the materialized signing material of an installation in SigningModeExternalCertificate. Every path lives in the private workspace of the installation, except PairingFile.

type InstallManager added in v0.2.1

type InstallManager struct {
	ProvisioningProfile *model.MobileProvisioningProfile
	// contains filtered or unexported fields
}

func NewInstallManager added in v0.2.1

func NewInstallManager() *InstallManager

func NewInteractiveInstallManager added in v0.2.1

func NewInteractiveInstallManager() *InstallManager

func (*InstallManager) CleanTempFiles added in v0.2.1

func (t *InstallManager) CleanTempFiles(files ...string)

func (*InstallManager) Close added in v0.2.1

func (t *InstallManager) Close()

func (*InstallManager) ErrorLog added in v0.2.1

func (t *InstallManager) ErrorLog() string

func (*InstallManager) GetMobileProvisionPath added in v0.3.0

func (t *InstallManager) GetMobileProvisionPath() string

func (*InstallManager) IsAccountInvalid added in v0.3.1

func (t *InstallManager) IsAccountInvalid() bool

func (*InstallManager) IsSuccess added in v0.3.1

func (t *InstallManager) IsSuccess() bool

func (*InstallManager) NeedsCertificateReset added in v0.6.3

func (t *InstallManager) NeedsCertificateReset() bool

NeedsCertificateReset reports whether the run stopped because a certificate slot had to be freed and the user never authorized revoking one.

func (*InstallManager) OnOutput added in v0.2.1

func (t *InstallManager) OnOutput(fn func(string))

func (*InstallManager) OutputLog added in v0.2.1

func (t *InstallManager) OutputLog() string

func (*InstallManager) ResetLog added in v0.6.0

func (t *InstallManager) ResetLog()

ResetLog clears the captured output. Apple ID runs reset it at every attempt; external certificate installations reset it once per installation so their SIGNING_REPORT lines and every attempt stay in the task log.

func (*InstallManager) SaveLog added in v0.2.5

func (t *InstallManager) SaveLog(id uint)

func (*InstallManager) Start added in v0.2.1

func (t *InstallManager) Start(ctx context.Context, opts InstallOptions) error

Start signs and installs the IPA once with the signing mode of opts. External certificate failures are *signing.Error values classified from the engine output.

func (*InstallManager) TryStart added in v0.2.1

func (t *InstallManager) TryStart(ctx context.Context, opts InstallOptions) error

func (*InstallManager) Write added in v0.2.1

func (t *InstallManager) Write(p []byte)

func (*InstallManager) WriteLog added in v0.2.1

func (t *InstallManager) WriteLog(msg string)

type InstallOptions added in v0.3.1

type InstallOptions struct {
	UDID       string
	IP         string
	Port       uint16
	Account    string
	IpaPath    string
	CustomName string
	// CustomIdentifier is the main bundle identifier the app is installed
	// under, in both signing modes; empty keeps the bundle identifiers of the
	// IPA. The app is a different app on the device for each identifier.
	CustomIdentifier string
	// CustomIconPath is an image file passed to the engine as --custom-icon.
	// Empty keeps the icons of the IPA. Stored with the installed app so a
	// refresh or source update signs with the same icon.
	CustomIconPath   string
	RemoveExtensions bool
	RefreshMode      bool
	// SigningMode selects how the app is signed; empty means SigningModeAppleID.
	SigningMode model.SigningMode
	// External holds the signing material of SigningModeExternalCertificate.
	External *ExternalSigning
	// RevokeCertificateSerial authorizes the engine to revoke this one
	// certificate when the Apple ID account is at its certificate limit.
	// Apple ID mode only; empty keeps every certificate untouched.
	RevokeCertificateSerial string
}

type LoginManager added in v0.3.0

type LoginManager struct {
	// contains filtered or unexported fields
}

func NewLoginManager added in v0.3.0

func NewLoginManager() *LoginManager

func (*LoginManager) Close added in v0.3.0

func (t *LoginManager) Close()

func (*LoginManager) ErrorLog added in v0.3.0

func (t *LoginManager) ErrorLog() string

func (*LoginManager) OnOutput added in v0.3.0

func (t *LoginManager) OnOutput(fn func(string))

func (*LoginManager) OutputLog added in v0.3.0

func (t *LoginManager) OutputLog() string

func (*LoginManager) Start added in v0.3.0

func (t *LoginManager) Start(ctx context.Context, account, password string) error

func (*LoginManager) Write added in v0.3.0

func (t *LoginManager) Write(p []byte)

type PairManager added in v0.2.1

type PairManager struct {
	// contains filtered or unexported fields
}

func NewPairManager added in v0.2.1

func NewPairManager() *PairManager

func (*PairManager) Close added in v0.2.1

func (t *PairManager) Close()

func (*PairManager) ErrorLog added in v0.2.1

func (t *PairManager) ErrorLog() string

func (*PairManager) OnOutput added in v0.2.1

func (t *PairManager) OnOutput(fn func(string))

func (*PairManager) OutputLog added in v0.2.1

func (t *PairManager) OutputLog() string

func (*PairManager) Start added in v0.2.1

func (t *PairManager) Start(ctx context.Context, device model.Device) error

func (*PairManager) Write added in v0.2.1

func (t *PairManager) Write(p []byte)

type PairingServiceInfo added in v0.8.0

type PairingServiceInfo struct {
	Port        uint16
	PairSetup   bool // allowsPairSetup: runs the PIN pairing flow
	Tunnel      bool // allowsIncomingTunnelConnections: install/tunnel port
	Model       string
	DeviceName  string
	ProtocolVer uint64
}

PairingServiceInfo describes one RPPairing endpoint discovered by handshake.

func DiscoverManualPairingPort added in v0.8.0

func DiscoverManualPairingPort(ctx context.Context, ip string, progress DiscoveryProgress) (pairPort uint16, info *PairingServiceInfo, err error)

DiscoverManualPairingPort finds the manual-pairing port for a manually specified IP: mDNS unicast fast path (unless skipped for overlay IPs), then a pipelined ascending scan that stops at the first pair-setup service.

func DiscoverManualTunnelPort added in v0.8.0

func DiscoverManualTunnelPort(ctx context.Context, ip string, progress DiscoveryProgress) (port uint16, info *PairingServiceInfo, err error)

DiscoverManualTunnelPort finds the _remotepairing tunnel port for a manually specified iPhone: mDNS unicast fast path, then a two-stage TCP scan. The tunnel port is where `plumesign check pairing` validates the pairing file.

func ProbePairingService added in v0.8.0

func ProbePairingService(ctx context.Context, ip string, port uint16, timeout time.Duration) (*PairingServiceInfo, error)

ProbePairingService dials one port and performs the RPPairing handshake. A nil error with a non-nil result means the port is an RPPairing service; any other outcome (dial error, wrong magic, timeout) returns an error.

type ScreenshotManager added in v0.4.3

type ScreenshotManager struct {
	// contains filtered or unexported fields
}

ScreenshotManager orchestrates mounting the developer disk image and capturing a screenshot of the target device over an RSD tunnel.

func NewScreenshotManager added in v0.4.3

func NewScreenshotManager() *ScreenshotManager

func (*ScreenshotManager) EnsureMounted added in v0.4.3

func (m *ScreenshotManager) EnsureMounted(ctx context.Context, dev *model.Device) (string, error)

EnsureMounted mounts the personalized developer disk image on the device if it has not been mounted yet in this process. The mount state is shared across all callers, matching the requirement that mount only needs to happen once before the first screenshot.

func (*ScreenshotManager) TakeScreenshot added in v0.4.3

func (m *ScreenshotManager) TakeScreenshot(ctx context.Context, dev *model.Device) ([]byte, error)

TakeScreenshot runs plumesign screenshot, transcodes the resulting PNG into a 1920x1080 (max) JPEG at 80% quality and returns the JPEG bytes. The intermediate PNG file is removed before returning.

type UsbmuxdManager added in v0.4.0

type UsbmuxdManager struct {
	// contains filtered or unexported fields
}

func Usbmuxd added in v0.4.0

func Usbmuxd() *UsbmuxdManager

func (*UsbmuxdManager) Restart added in v0.4.0

func (m *UsbmuxdManager) Restart() error

func (*UsbmuxdManager) TryWaitReady added in v0.4.0

func (m *UsbmuxdManager) TryWaitReady(d time.Duration)

type WebsocketManager added in v0.2.1

type WebsocketManager struct {
	// contains filtered or unexported fields
}

func NewWebsocketManager added in v0.2.1

func NewWebsocketManager(conn *websocket.Conn) *WebsocketManager

func (*WebsocketManager) Cancel added in v0.2.1

func (mgr *WebsocketManager) Cancel()

func (*WebsocketManager) Context added in v0.2.1

func (mgr *WebsocketManager) Context() context.Context

func (*WebsocketManager) ReadMessage added in v0.2.1

func (mgr *WebsocketManager) ReadMessage() (*model.Message, error)

func (*WebsocketManager) WriteMessage added in v0.2.1

func (mgr *WebsocketManager) WriteMessage(msg string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址