package mobile
import "github.com/google/martian/v3/mobile"
Package mobile configures and instantiates a Martian Proxy. This package is a reference implementation of Martian Proxy intended to be cross compiled with gomobile for use on Android and iOS.
Index ¶
Functions ¶
func SetLogLevel ¶
func SetLogLevel(l int)
SetLogLevel sets the Martian log level (Silent = 0, Error, Info, Debug), controlling which Martian log calls are displayed in the console
Types ¶
type Martian ¶
type Martian struct { HARLogging bool TrafficPort int TrafficShaping bool APIPort int APIOverTLS bool BindLocalhost bool Cert string Key string AllowCORS bool RoundTripper *http.Transport // contains filtered or unexported fields }
Martian is a wrapper for the initialized Martian proxy
func NewProxy ¶
func NewProxy() *Martian
NewProxy creates a new Martian struct for configuring and starting a martian.
func (*Martian) EnableCybervillains ¶
func (m *Martian) EnableCybervillains()
EnableCybervillains configures Martian to use the Cybervillians certificate.
func (*Martian) IsStarted ¶
IsStarted returns true if the proxy has finished starting.
func (*Martian) Shutdown ¶
func (m *Martian) Shutdown()
Shutdown tells the Proxy to close. This function returns immediately, though there may still be connection threads hanging around until they time out depending on how the OS manages them.
func (*Martian) Start ¶
func (m *Martian) Start()
Start starts the proxy given the configured values of the Martian struct.
Source Files ¶
- Version
- v3.3.2
- Published
- Mar 14, 2022
- Platform
- windows/amd64
- Imports
- 38 packages
- Last checked
- 4 hours ago –
Tools for package owners.