Compare commits

...

7 Commits

Author SHA1 Message Date
angt
d60f28a7fe Update mud 2016-04-05 06:42:03 +00:00
angt
32069eb104 Print tun device on STARTED and STOPPED too 2016-04-04 20:05:33 +00:00
angt
a6adcefc25 Update mud 2016-04-04 16:48:11 +00:00
angt
743b0ee0da Don't check AES-NI 2016-04-01 16:50:04 +00:00
angt
ba06a6fc10 Update mud 2016-04-01 16:37:02 +00:00
Adrien Gallouët
80d4c2814f Update README.md 2016-03-24 18:52:18 +01:00
angt
b0d5007bfb Restore STARTED and STOPPED states 2016-03-24 14:45:15 +00:00
3 changed files with 15 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
# Glorytun
# π₁(Glorytun)=ℤ²
Small, Simple and Stupid VPN over [mud](https://github.com/angt/mud).

2
mud

Submodule mud updated: 11903da862...104bc68266

View File

@@ -279,11 +279,6 @@ int main (int argc, char **argv)
return 1;
}
if (!crypto_aead_aes256gcm_is_available()) {
gt_na("AES-256-GCM");
return 1;
}
if (state_init(statefile))
return 1;
@@ -342,6 +337,7 @@ int main (int argc, char **argv)
fd_set rfds;
FD_ZERO(&rfds);
int started = 0;
unsigned char buf[2048];
while (!gt.quit) {
@@ -364,6 +360,18 @@ int main (int argc, char **argv)
return 1;
}
if (mud_is_up(mud)) {
if (!started) {
state("STARTED", tun_name);
started = 1;
}
} else {
if (started) {
state("STOPPED", tun_name);
started = 0;
}
}
if (FD_ISSET(tun_fd, &rfds)) {
while (1) {
const ssize_t r = tun_read(tun_fd, buf, sizeof(buf));