• Stars
    star
    146
  • Rank 252,769 (Top 5 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created over 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Combine internet connections, increase your download speed

dispatch

A SOCKS proxy that balances traffic between network interfaces.

Should work on macOS, Windows, and Linux. Only tested on macOS for now.

This is a Rust rewrite of dispatch-proxy, originally written in CoffeeScript and targeting Node.js.

Quick links

Installation

From pre-built binaries

You can download pre-built binaries for macOS, Windows, and Linux from the releases page.

From crates.io

You'll need Rust version 1.51.0 or later. You can use rustup to install the latest version of the Rust compiler toolchain.

cargo install dispatch-proxy

Rationale

You often find yourself with multiple unused internet connections—be it 5G mobile hotspot or a free Wi-Fi network—that your system won't let you use alongside your primary one.

For instance, my first student residence used to provide me with cabled and wireless internet accesses. Both were separately capped at a bandwidth 1,200kB/s. My 3G mobile internet access provided me with an additional 400kB/s. Combining all of these with dispatch and a download manager resulted in a 2,800kB/s effective bandwidth!

Use cases

The possibilities are endless:

  • Use it with a download manager or a BitTorrent client, combining multiple connections' bandwidth when downloading single files;
  • Combine as many interfaces as you have access to into a single load-balanced interface;
  • Run different apps on separate interfaces with multiple proxies (e.g. for balancing download/upload);
  • Create a hotspot proxy at home that connects through Ethernet and your 5G card for all your mobile devices;
  • etc.

Usage

$ dispatch

  dispatch 0.1.0
  A proxy that balances traffic between multiple internet connections

  USAGE:
      dispatch [FLAGS] <SUBCOMMAND>

  FLAGS:
      -d, --debug      Write debug logs to stdout instead of a file
      -h, --help       Prints help information
      -V, --version    Prints version information

  SUBCOMMANDS:
      help     Prints this message or the help of the given subcommand(s)
      list     Lists all available network interfaces
      start    Starts the SOCKS proxy server
$ dispatch start -h

  dispatch-start 0.1.0
  Starts the SOCKS proxy server

  USAGE:
      dispatch start [OPTIONS] <addresses>...

  FLAGS:
      -h, --help       Prints help information
      -V, --version    Prints version information

  OPTIONS:
          --ip <ip>        Which IP to accept connections from [default: 127.0.0.1]
          --port <port>    Which port to listen to for connections [default: 1080]

  ARGS:
      <addresses>...    The network interface IP addresses to dispatch to, in the form of <address>[@priority]

Examples

$ dispatch list

Lists all available network interfaces.

$ dispatch start 10.0.0.0 fdaa:bbcc:ddee:0:1:2:3:4

Dispatch incoming connections to local addresses 10.0.0.0 and fdaa:bbcc:ddee:0:1:2:3:4.

$ dispatch start 10.0.0.0@7 10.0.0.1@3

Dispatch incoming connections to 10.0.0.0 7 times out of 10 and to 10.0.0.1 3 times out of 10.

How It Works

Whenever the SOCKS proxy server receives an connection request to an address or domain, it selects one of the provided local addresses using the Weighted Round Robin algorithm. All further connection traffic will then go through the interface corresponding to the selected local address.

Beware: If the requested address or domain resolves to an IPv4 (resp. IPv6) address, an IPv4 (resp. IPv6) local address must be provided.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

More Repositories

1

dispatch-proxy

Combine internet connections, increase your download speed
CoffeeScript
3,467
star
2

facebook-sixth-sense

A Chrome extension that lets you know when your friends start writing to you on Facebook
475
star
3

react-list-view

Infinite list view component
JavaScript
61
star
4

rn-pokevision

React Native app leveraging the GoRadar API in order to display all the Pokémon around you
JavaScript
42
star
5

webpack-externals-plugin

Provides more powerful externals configuration options to webpack.
JavaScript
24
star
6

socksv5

SOCKS v4a and v5 basic building blocks to build your own async SOCKS application
Rust
17
star
7

react-side-context

Experiment with subscription-based context for React
JavaScript
14
star
8

react-europe-hackathon-boilerplate

Boilerplate for the second challenge of the React Europe Hackathon
Objective-C
14
star
9

curve-intersection

Bezier curve intersection algorithm and utilities.
JavaScript
13
star
10

catalyst-proxy

A proxy that accelerates requests via multipart downloading
CoffeeScript
7
star
11

socks-handler

A SOCKS4a/SOCKS5 server implementation
CoffeeScript
6
star
12

esp-front

2D visualization environment for a physics simulation
JavaScript
4
star
13

webpack-vendor-chunk-plugin

Removes the runtime code from a webpack chunk.
JavaScript
4
star
14

node-dxt

Bindings for the squish DXT compression/decompression library
C++
4
star
15

webpack-dedupe

JavaScript
4
star
16

amf-struct

AMF0/AMF3 serializer and deserializer for NodeJS
CoffeeScript
3
star
17

image-website

TypeScript
3
star
18

multisource-stream

CoffeeScript
3
star
19

introspect-extension

A Chrome extension that provides insights as to how your messages on social media might be perceived.
JavaScript
2
star
20

boids

Boids simulation in Rust, running in the browser with WebAssembly
Rust
2
star
21

binary-struct

Pack/unpack binary structures
CoffeeScript
1
star
22

webpack-simple-server

Simple webpack server for serving a directory of entries
JavaScript
1
star
23

dvirt

An experiment in trying to make the smallest possible Docker image
Rust
1
star
24

BetterWorkout

Better workout data field for Garmin watches
Monkey C
1
star