androidLib

package
v0.0.0-...-5ec896d Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpenWalletSuccess = iota
	PasswordError
	WalletError
	WalletSaveError
	NoWallet
)
View Source
const (
	WalletFile = "wallet.json"
)

Variables

View Source
var TunInst *tun2Pipe.Tun2Pipe = nil
View Source
var VpnInst *proxy.VpnProxy = nil

Functions

func AdvertiseList

func AdvertiseList() []byte

func AndroidApkVersion

func AndroidApkVersion() (ver string, err error)

func CloseWallet

func CloseWallet()

func ImportWallet

func ImportWallet(data, auth string) int32

func ImportWalletPrivate

func ImportWalletPrivate(data, auth string) (string, error)

func InitSystem

func InitSystem(bypassIPs, baseDir string) error

func InputPacket

func InputPacket(data []byte) error

func IsEmptyWallet

func IsEmptyWallet() bool

func IsGlobalMode

func IsGlobalMode() bool

func IsWalletOpen

func IsWalletOpen() bool

func MinerPort

func MinerPort(addr string) int32

func NewWallet

func NewWallet(auth string) (string, error)

func OpenWallet

func OpenWallet(auth string) error

func RefreshHostByAddr

func RefreshHostByAddr(addr string) string

func SetGlobalModel

func SetGlobalModel(g bool)

func StartVPN

func StartVPN(srvAddr, minerAddr string, d VpnDelegate) error

func StopVpn

func StopVpn()

func SyncServerList

func SyncServerList() []byte

func TestPing

func TestPing(mid string) []byte

func WalletJson

func WalletJson() string

Types

type AndroidAPP

type AndroidAPP struct {
	IpCache map[string]string

	WPath string
	// contains filtered or unexported fields
}

func (*AndroidAPP) ServiceClosed

func (d *AndroidAPP) ServiceClosed()

func (*AndroidAPP) Write

func (d *AndroidAPP) Write(p []byte) (n int, err error)

type PingResult

type PingResult struct {
	IP   string  `json:"ip"`
	Ping float32 `json:"ping"`
}

type VpnDelegate

type VpnDelegate interface {
	ByPass(fd int32) bool
	io.Writer
	VpnClosed()
}

Jump to

Keyboard shortcuts

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