mirror of https://github.com/dswd/vpncloud.git
Compare commits
No commits in common. "4d992d29c8ceb852c1f1e2304988f34789144c0e" and "7eeed2f6c2820c8f6871a61cb5975eb17ae8b143" have entirely different histories.
4d992d29c8
...
7eeed2f6c2
|
@ -55,7 +55,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cc"
|
name = "cc"
|
||||||
version = "1.0.56"
|
version = "1.0.55"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -206,7 +206,7 @@ version = "0.14.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"cc 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cc 1.0.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -218,7 +218,7 @@ version = "0.16.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"cc 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cc 1.0.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -353,7 +353,7 @@ name = "ring"
|
||||||
version = "0.16.15"
|
version = "0.16.15"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cc 1.0.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"once_cell 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"once_cell 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -674,7 +674,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
name = "vpncloud"
|
name = "vpncloud"
|
||||||
version = "1.4.0"
|
version = "1.4.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cc 1.0.55 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"daemonize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"daemonize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"igd 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"igd 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -807,7 +807,7 @@ dependencies = [
|
||||||
"checksum boxfnonce 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5988cb1d626264ac94100be357308f29ff7cbdd3b36bda27f450a4ee3f713426"
|
"checksum boxfnonce 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5988cb1d626264ac94100be357308f29ff7cbdd3b36bda27f450a4ee3f713426"
|
||||||
"checksum bumpalo 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820"
|
"checksum bumpalo 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820"
|
||||||
"checksum bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1"
|
"checksum bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1"
|
||||||
"checksum cc 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)" = "77c1f1d60091c1b73e2b1f4560ab419204b178e625fa945ded7b660becd2bd46"
|
"checksum cc 1.0.55 (registry+https://github.com/rust-lang/crates.io-index)" = "b1be3409f94d7bdceeb5f5fac551039d9b3f00e25da7a74fc4d33400a0d96368"
|
||||||
"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
|
"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
|
||||||
"checksum clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129"
|
"checksum clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129"
|
||||||
"checksum daemonize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70c24513e34f53b640819f0ac9f705b673fcf4006d7aab8778bee72ebfc89815"
|
"checksum daemonize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70c24513e34f53b640819f0ac9f705b673fcf4006d7aab8778bee72ebfc89815"
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
Due to semantic versioning, any breaking change after 1.0 requires a new major version number.
|
Due to semantic versioning, any breaking change after 1.0 requires a new major version number.
|
||||||
This is a list of breaking changes to do in such a case:
|
This is a list of breaking changes to do in such a case:
|
||||||
|
|
||||||
- Add strong crypto, change network protocol
|
- Change default crypto to AES128
|
||||||
- Negotiate crypto method per peer
|
|
||||||
- Make encryption the default, --unencrypted for no encryption
|
|
||||||
- Remove network-id parameter
|
- Remove network-id parameter
|
||||||
- Remove port config option
|
- Remove port config option
|
|
@ -13,9 +13,9 @@ use super::{
|
||||||
|
|
||||||
use siphasher::sip::SipHasher24;
|
use siphasher::sip::SipHasher24;
|
||||||
use std::{
|
use std::{
|
||||||
cmp::max,
|
|
||||||
hash::{Hash, Hasher},
|
hash::{Hash, Hasher},
|
||||||
net::{IpAddr, Ipv6Addr, SocketAddr}
|
net::{IpAddr, Ipv6Addr, SocketAddr},
|
||||||
|
cmp::max
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -294,43 +294,29 @@ impl Config {
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug, PartialEq, Default)]
|
#[derive(Serialize, Deserialize, Debug, PartialEq, Default)]
|
||||||
pub struct ConfigFile {
|
pub struct ConfigFile {
|
||||||
#[serde(alias = "device-type")]
|
|
||||||
pub device_type: Option<Type>,
|
pub device_type: Option<Type>,
|
||||||
#[serde(alias = "device-name")]
|
|
||||||
pub device_name: Option<String>,
|
pub device_name: Option<String>,
|
||||||
#[serde(alias = "device-path")]
|
|
||||||
pub device_path: Option<String>,
|
pub device_path: Option<String>,
|
||||||
pub ifup: Option<String>,
|
pub ifup: Option<String>,
|
||||||
pub ifdown: Option<String>,
|
pub ifdown: Option<String>,
|
||||||
pub crypto: Option<CryptoMethod>,
|
pub crypto: Option<CryptoMethod>,
|
||||||
#[serde(alias = "shared-key")]
|
|
||||||
pub shared_key: Option<String>,
|
pub shared_key: Option<String>,
|
||||||
pub magic: Option<String>,
|
pub magic: Option<String>,
|
||||||
pub port: Option<u16>,
|
pub port: Option<u16>,
|
||||||
pub listen: Option<String>,
|
pub listen: Option<String>,
|
||||||
pub peers: Option<Vec<String>>,
|
pub peers: Option<Vec<String>>,
|
||||||
#[serde(alias = "peer-timeout")]
|
|
||||||
pub peer_timeout: Option<Duration>,
|
pub peer_timeout: Option<Duration>,
|
||||||
pub keepalive: Option<Duration>,
|
pub keepalive: Option<Duration>,
|
||||||
#[serde(alias = "beacon-store")]
|
|
||||||
pub beacon_store: Option<String>,
|
pub beacon_store: Option<String>,
|
||||||
#[serde(alias = "beacon-load")]
|
|
||||||
pub beacon_load: Option<String>,
|
pub beacon_load: Option<String>,
|
||||||
#[serde(alias = "beacon-interval")]
|
|
||||||
pub beacon_interval: Option<Duration>,
|
pub beacon_interval: Option<Duration>,
|
||||||
pub mode: Option<Mode>,
|
pub mode: Option<Mode>,
|
||||||
#[serde(alias = "dst-timeout")]
|
|
||||||
pub dst_timeout: Option<Duration>,
|
pub dst_timeout: Option<Duration>,
|
||||||
pub subnets: Option<Vec<String>>,
|
pub subnets: Option<Vec<String>>,
|
||||||
#[serde(alias = "port-forwarding")]
|
|
||||||
pub port_forwarding: Option<bool>,
|
pub port_forwarding: Option<bool>,
|
||||||
#[serde(alias = "pid-file")]
|
|
||||||
pub pid_file: Option<String>,
|
pub pid_file: Option<String>,
|
||||||
#[serde(alias = "stats-file")]
|
|
||||||
pub stats_file: Option<String>,
|
pub stats_file: Option<String>,
|
||||||
#[serde(alias = "statsd-server")]
|
|
||||||
pub statsd_server: Option<String>,
|
pub statsd_server: Option<String>,
|
||||||
#[serde(alias = "statsd-prefix")]
|
|
||||||
pub statsd_prefix: Option<String>,
|
pub statsd_prefix: Option<String>,
|
||||||
pub user: Option<String>,
|
pub user: Option<String>,
|
||||||
pub group: Option<String>
|
pub group: Option<String>
|
||||||
|
|
|
@ -48,7 +48,7 @@ vpncloud - Peer-to-peer VPN
|
||||||
*addr:port*. If the node is not started, the connection will be retried
|
*addr:port*. If the node is not started, the connection will be retried
|
||||||
periodically. This parameter can be repeated to connect to multiple peers.
|
periodically. This parameter can be repeated to connect to multiple peers.
|
||||||
|
|
||||||
*-s <subnet>*, *--subnet <subnet>*::
|
*-s <subnet>*, *--subnet <subnet>*:
|
||||||
The local subnets to use. This parameter should be in the form
|
The local subnets to use. This parameter should be in the form
|
||||||
*address/prefixlen* where address is an IPv4 address, an IPv6 address, or a
|
*address/prefixlen* where address is an IPv4 address, an IPv6 address, or a
|
||||||
MAC address. The prefix length is the number of significant front bits that
|
MAC address. The prefix length is the number of significant front bits that
|
||||||
|
@ -142,13 +142,6 @@ vpncloud - Peer-to-peer VPN
|
||||||
If set, periodically write statistics on peers and current traffic to the
|
If set, periodically write statistics on peers and current traffic to the
|
||||||
given file. The file will be periodically overwritten with new data.
|
given file. The file will be periodically overwritten with new data.
|
||||||
|
|
||||||
*--statsd-server <server>*::
|
|
||||||
If set, periodically send statistics on current traffic and some important
|
|
||||||
events to the given statsd server (host:port).
|
|
||||||
|
|
||||||
*--statsd-prefix <prefix>*::
|
|
||||||
Sets the prefix to use for all statsd entries. [default: **vpncloud**]
|
|
||||||
|
|
||||||
*--daemon*::
|
*--daemon*::
|
||||||
Spawn a background process instead of running the process in the foreground.
|
Spawn a background process instead of running the process in the foreground.
|
||||||
If this flag is set, the process will first carry out all the
|
If this flag is set, the process will first carry out all the
|
||||||
|
@ -298,12 +291,10 @@ detailed descriptions of the options.
|
||||||
*dst_timeout*:: Switch table entry timeout in seconds. Same as *--dst-timeout*
|
*dst_timeout*:: Switch table entry timeout in seconds. Same as *--dst-timeout*
|
||||||
*subnets*:: A list of local subnets to use. See *--subnet*
|
*subnets*:: A list of local subnets to use. See *--subnet*
|
||||||
*port_forwarding*:: Whether to activate port forwardig. See *--no-port-forwarding*
|
*port_forwarding*:: Whether to activate port forwardig. See *--no-port-forwarding*
|
||||||
*user*:: The name of a user to run the background process under. Same as *--user*
|
*user*:: The name of a user to run the background process under. See *--user*
|
||||||
*group*:: The name of a group to run the background process under. Same as *--group*
|
*group*:: The name of a group to run the background process under. See *--group*
|
||||||
*pid_file*:: The path of the pid file to create. Same as *--pid-file*
|
*pid_file*:: The path of the pid file to create. See *--pid-file*
|
||||||
*stats_file*:: The path of the statistics file. Same as *--stats-file*
|
*stats_file*:: The path of the statistics file. See *--stats-file*
|
||||||
*statsd_server*:: Server to report statistics to. Same as *--statsd-server*
|
|
||||||
*statsd_prefix*:: Prefix to use when reporting to statsd. Same as *--statsd-prefix*
|
|
||||||
|
|
||||||
=== Example
|
=== Example
|
||||||
|
|
||||||
|
@ -358,31 +349,6 @@ suffix.
|
||||||
The commands are called in separate threads, so even longer running commands
|
The commands are called in separate threads, so even longer running commands
|
||||||
will not block the node.
|
will not block the node.
|
||||||
|
|
||||||
|
|
||||||
== STATSD SUPPORT
|
|
||||||
|
|
||||||
When a statsd server is configured (either via **--statsd-server** or the
|
|
||||||
config option **statsd_server**), VpnCloud sends out the following statistics
|
|
||||||
every minute.
|
|
||||||
|
|
||||||
Gauge values:
|
|
||||||
*peer_count*:: Current number of peers
|
|
||||||
*table_entries*:: Number of routing table / switch table entries
|
|
||||||
|
|
||||||
The following statistics consist of two keys: *.bytes* and *.packets* that hold
|
|
||||||
the values in bytes and packets. All values refer to the traffic during the
|
|
||||||
last minute:
|
|
||||||
*traffic.protocol.inbound*:: Complete incoming traffic with all peers
|
|
||||||
*traffic.protocol.outbound*:: Complete outgoing traffic with all peers
|
|
||||||
*traffic.payload.inbound*:: Incoming payload traffic with all peers
|
|
||||||
*traffic.payload.outbound*:: Outgoing payload traffic with all peers
|
|
||||||
*invalid_protocol_traffic*:: Invalid incoming protocol traffic
|
|
||||||
*dropped_payload*:: Outgoing traffic that could not be routed
|
|
||||||
|
|
||||||
All keys are prefixed by a common prefix. The prefix defaults to *vpncloud* but
|
|
||||||
can be changed via **--statsd-prefix** or the config option **statsd_prefix**.
|
|
||||||
|
|
||||||
|
|
||||||
== NETWORK PROTOCOL
|
== NETWORK PROTOCOL
|
||||||
|
|
||||||
The protocol of VpnCloud is kept as simple as possible to allow other
|
The protocol of VpnCloud is kept as simple as possible to allow other
|
||||||
|
|
Loading…
Reference in New Issue