booster

package module
v0.6.991 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2019 License: AGPL-3.0 Imports: 5 Imported by: 0

README

Booster

GoDoc Build Status Go Report Card

Abstract

While more and more people today have a fast Internet connection, there are plenty of other people that do not. The aim of this project is to create a solution that combines multiple Internet access points (such as Wifi or mobile devices) into one single faster Internet connection, that it is easy to use, and fast to configure.

Highscores

First things first: this section is reserved for the highest download speed that we managed to obtain in our office. Without booster our WIFI's download speed reaches ~34Mbps, but with booster... 🎉

Installation

(Windows is not yet supported)

Binary

Pick your release.

Snap

Get it from the Snap Store
Note: at the moment booster is not able to bind to an interface that points to an Apple device without root privileges. To overcome the issue install the snap as root. You can always inspect the logs using:

snap logs booster -f
From source

First install go, then type this commands into your command line:

git clone https://github.com/booster-proj/booster.git && cd booster # Clone
make test # Test
make # Build

Usage

Recap: when booster spawns, it identifies the network interfaces available in the system that provide an active internet connection. It then starts a proxy server that speaks either socks5 or http. According to some particular strategy (still not configurable), and a set of policies (configurable), the server is able to distribute the incoming network traffic across the network interfaces collected.

Note that booster runs as daemon when installed through snap, otherwise you'll have to start it manually:

bin/booster

Note: get help with the --help flag.

Once started, booster can be remotely controller through its public HTTP Json API. These are some of the routes available (full documentation coming soon):

GET /sources.json
List of used sources
GET /policies.json
List of active policies
DELETE /policies/{id}.json
Remove policy `id`
POST /policies/block.json
-d {"source_id": "", "issuer": "", "reason": ""}
Apply block policy: source `source_id` will no longer be used
POST /policies/sticky.json
-d {"issuer": "", "reason": ""}
Apply sticky policy: once a source receives a connection to a target, the following connections 
to the same target will be assigned to the same source
POST /policies/reserve.json
-d {"source_id": "", "target": "", "issuer": "", "reason": ""}
Apply reserve policy: source `source_id` will only be used for connections to `target`
POST /policies/avoid.json
-d {"source_id": "", "target": "", "issuer": "", "reason": ""}
Apply reserve policy: source `source_id` will not be used for connections to `target`
GET /metrics.json
Forwards the request to a local prometheus api/v1/query endpoint, preserving headers,
query parameters and request body
GET /metrics
List the metrics exposed by the server using prometheus export encoding

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Balancer added in v0.6.97

type Balancer interface {
	Get(ctx context.Context, target string, blacklisted ...core.Source) (core.Source, error)
	Len() int
}

Balancer describes which functionalities must be provided in order to allow booster to get sources.

type Dialer added in v0.6.94

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

Dialer is a core.Dialer implementation, which uses a core.Balancer instance to to retrieve a source to use when it comes to dial a network connection.

func New added in v0.6.1

func New(b Balancer) *Dialer

New returns an instance of a booster dialer.

func (*Dialer) DialContext added in v0.6.94

func (d *Dialer) DialContext(ctx context.Context, network, address string) (conn net.Conn, err error)

DialContext dials a connection using `network` to `address`. The connection returned is dialed through a specific network interface, which is chosen using the dialer's interal balancer provided. If it fails to create a connection using a source, it tries to dial it using another source, until source exhaustion. It that case, only the last error received is returned.

func (*Dialer) Len added in v0.6.94

func (d *Dialer) Len() int

Len returns the number of sources that the dialer as at it's disposal.

func (*Dialer) SetMetricsExporter added in v0.6.94

func (d *Dialer) SetMetricsExporter(exp MetricsExporter)

SetMetricsExporter makes the receiver use exp as metrics exporter.

type MetricsExporter added in v0.6.94

type MetricsExporter interface {
	IncSelectedSource(labels map[string]string)
}

MetricsExporter is an inteface around the IncSelectedSource function, which is used to collect a metric when a source is selected for use.

Directories

Path Synopsis
cmd
Package core provides components useful for containing and retrieving entities, i.e.
Package core provides components useful for containing and retrieving entities, i.e.
Package metrics provides what in prometheus terms is called a metrics exporter.
Package metrics provides what in prometheus terms is called a metrics exporter.
Package remote provides HTTP endpoints to control booster remotely.
Package remote provides HTTP endpoints to control booster remotely.
Package listener provides a functionalities to discover and inspect sources.
Package listener provides a functionalities to discover and inspect sources.
Package store is the main component that orchestrates sources.
Package store is the main component that orchestrates sources.

Jump to

Keyboard shortcuts

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