mobile

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2018 License: Unlicense Imports: 10 Imported by: 0

README

Mobile API

This package is a mobile API for the dnsproxy.

We are using gomobile to build mobile bindings as it is explained in the documentation.

How to build

You will need go v1.11 or newer.

$ export ANDROID_HOME=PATH_TO_ANDROID_SDK
$ make clean
$ make

TODO

There is a known issue with gomobile not supporting go modules. Unfortunately, until this issue is resolved, we have to use a complicated make file

  • Android library build
  • iOS library build
  • Update the build script once go modules support is added to gomobile

Documentation

Overview

Package mobile contains a simple mobile API for github.com/AdguardTeam/dnsproxy

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Verbose      bool   // true if verbose output is enabled
	LogOutput    string // Path to the log file
	ListenAddr   string // IP address to listen to
	ListenPort   int    // Port to listen to
	BootstrapDNS string // Bootstrap DNS (i.e. 8.8.8.8:53)
	Fallback     string // Fallback resolver that will be used if the main one is not available (i.e. 1.1.1.1:53)
	Upstreams    string // A list of upstream resolvers (each on a new line)
	Timeout      int    // Default timeout for all resolvers (milliseconds)
}

Config is the DNS proxy configuration which uses only the subset of types that is supported by gomobile

type DNSProxy

type DNSProxy struct {
	Config *Config // Proxy configuration

	sync.RWMutex
	// contains filtered or unexported fields
}

DNSProxy represents a proxy with it's configuration

func (*DNSProxy) Addr

func (d *DNSProxy) Addr() string

Addr gets the address proxy is currently listening to

func (*DNSProxy) Start

func (d *DNSProxy) Start() error

Start starts the DNS proxy

func (*DNSProxy) Stop

func (d *DNSProxy) Stop() error

Stop stops the DNS proxy

Jump to

Keyboard shortcuts

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