go_usbmuxd_device

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: MIT Imports: 11 Imported by: 0

README

go-usbmuxd-device

通过 usbmuxd 获取 iOS 设备、连接设备的指定端口

gwda 通过这种方式实现了 WDA 的端口直连。

安装

go get -u github.com/electricbubble/go-usbmuxd-device

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoFindUSBDevice = errors.New("no find match device")

Functions

func Debug

func Debug(b ...bool)

Types

type HTTPProxy added in v0.0.2

type HTTPProxy struct {
	// The transport used to send proxy requests to actual server.
	// If nil, http.DefaultTransport is used.
	Transport  http.RoundTripper
	Credential string
	Debug      bool
}

HTTPProxy is our main struct for proxy releated attributes and methods

func NewUSBHTTPProxy added in v0.0.2

func NewUSBHTTPProxy(usbhub *USBHub) (*HTTPProxy, error)

NewUSBHTTPProxy used to proxy connection to iPhone

func (*HTTPProxy) ServeHTTP added in v0.0.2

func (p *HTTPProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request)

ServeHTTP is the main handler for all requests.

type USBDevice

type USBDevice struct {
	DeviceID        int
	LocationID      int
	ProductID       int
	SerialNumber    string
	ConnectionSpeed int
	ConnectionType  usbmux.ConnectionType
}

type USBHub

type USBHub struct {
}

func NewUSBHub

func NewUSBHub() *USBHub

func (*USBHub) CreateConnect

func (c *USBHub) CreateConnect(devID int, port int) (conn net.Conn, err error)

func (*USBHub) DeviceList

func (c *USBHub) DeviceList() (usbDevices []USBDevice, err error)

Directories

Path Synopsis
examples
ihttpproxy
https://blog.golang.org/examples
https://blog.golang.org/examples

Jump to

Keyboard shortcuts

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