Commit graph

14 commits

Author SHA1 Message Date
Francesco Cogno
923b70c4b7 migrated to std::future 2019-12-01 19:42:47 +01:00
Francesco Cogno
4612afe684 release v3.2.1 2019-11-08 09:34:17 +01:00
Maximilian Bosch
9a54a8f424
Strip link-local zone ids from IPv6 socket addrs
This is a fairly ugly hack to temporarily work around the issue #10.
Until now Rust doesn't support so-called zone-ids[1] in link-local IPv6
socket-addresses and has a pending RFC on this topic. As I'm
encountering this issue on one of my machines I decided to work around
this issue (for now) by removing the zone-id from the IPv6 address.

This won't harm any other cases as `regex.replace_all` simply returns
the input if the regex doesn't match:

```
>> extern crate regex;
>> let re = regex::Regex::new(r"^\[(?P<ip>[A-Fa-f0-9:]+)%(.*)\]:(?P<port>[0-9]+)$");
>> let rs = re.replace_all("fairly unrelated stuff", "[$ip]:$port");
>> rs
"fairly unrelated stuff"
```

Please note that (1) this regex isn't RFC-compliant[2] and is just a
heuristic to remove zone-ids that currently break this exporter and
(2) this is something that probably shouldn't be merged as-is. I mainly
pushed this since I needed a workaround for this issue (and others
probably too), but it may be better to wait for proper support from the
language.

[1] https://tools.ietf.org/html/rfc4007#section-11
2019-11-02 19:48:16 +01:00
Francesco Cogno
067136de45
swapped rx-tx 2019-09-25 20:22:27 +02:00
Francesco Cogno
5e0f111bd9 Export remote information behind optional flag 2019-07-31 15:24:52 +02:00
Maximilian Bosch
691aa809b0
Expose remote_ip and remote_port for each WireGuard peer 2019-07-21 18:32:21 +02:00
Francesco Cogno
1b40335280
Label split option 2019-07-11 15:31:25 +02:00
Francesco Cogno
c987073210
Replaced local_ip + local_port with allowed_ips 2019-07-09 17:55:03 +02:00
Francesco Cogno
ee164d2f73 Exported boilerplate to external crate 2019-06-09 20:09:06 +02:00
Maximilian Bosch
1b4a7a2df1
Parse strings using std::net to support peers with IPv6 addresses
Also alter datatype for ports to `u16` as tcp port numbers are unsigned
16bit integers.
2019-06-02 22:06:27 +02:00
Francesco Cogno
3680ceb0ec
modified output 2019-05-31 13:20:01 +02:00
Francesco Cogno
a12ecb50fb Corrected wrong method 2019-05-20 10:21:32 +02:00
Francesco Cogno
82188d1494
before live test 2019-05-20 10:09:02 +02:00
Francesco Cogno
143a450778
Initial commit 2019-04-23 23:06:35 +02:00