Giter VIP home page Giter VIP logo

glorytun's Introduction

Hi there ๐Ÿ‘‹

I put a touch of randomness everywhere :)

glorytun's People

Contributors

angt avatar jedisct1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glorytun's Issues

Throughput to less

Hi,

so actually I'm trying to find a solution to bundle 2 connections in the range of 800Mbit in the end. Actually I get a really bad throughput with AES and ChaCha20.

Client:

root@bondingrouter:~# glorytun bench

  bench      aes256gcm
  libsodium  1.0.11

  precision  2^(-10)
  bufsize    65536 bytes
  duration   1 second

------------------------------------------------------------
 2^n       min            avg            max          delta
------------------------------------------------------------
   0     49.29 Mbps     49.42 Mbps     49.51 Mbps  8.75e-03
   1     97.62 Mbps     97.62 Mbps     98.01 Mbps  3.29e-02
   2    194.38 Mbps    194.39 Mbps    195.03 Mbps  1.39e-02
   3    377.57 Mbps    381.62 Mbps    381.87 Mbps  2.41e-01
   4    770.51 Mbps    770.53 Mbps    770.53 Mbps  1.60e-02
   5   1432.62 Mbps   1440.98 Mbps   1440.98 Mbps  1.04e-01
   6   2358.86 Mbps   2372.13 Mbps   2385.08 Mbps  1.35e+00
   7   6132.72 Mbps   6132.72 Mbps   6165.24 Mbps  5.92e+00
   8   7979.00 Mbps   8112.97 Mbps   8112.97 Mbps  7.81e+00
   9   9754.27 Mbps   9795.36 Mbps   9799.62 Mbps  4.26e+00
  10  10826.03 Mbps  10826.03 Mbps  10829.40 Mbps  3.37e+00
  11  11449.07 Mbps  11490.85 Mbps  11550.91 Mbps  3.30e+00
  12  11801.81 Mbps  11801.81 Mbps  11805.90 Mbps  4.09e+00
  13  12041.63 Mbps  12042.88 Mbps  12083.37 Mbps  1.25e+00
  14  12132.29 Mbps  12177.17 Mbps  12190.60 Mbps  7.07e+00
  15  12233.86 Mbps  12234.90 Mbps  12234.90 Mbps  1.04e+00
  16  11988.61 Mbps  12202.87 Mbps  12208.37 Mbps  5.50e+00

Server:

root@AMS-123450:~/MLVPN/src# glorytun bench

  bench      aes256gcm
  libsodium  1.0.11

  precision  2^(-10)
  bufsize    65536 bytes
  duration   1 second

------------------------------------------------------------
 2^n       min            avg            max          delta
------------------------------------------------------------
   0      8.68 Mbps      8.68 Mbps      8.68 Mbps  1.37e-03
   1     17.17 Mbps     17.17 Mbps     17.17 Mbps  4.13e-04
   2     34.09 Mbps     34.09 Mbps     34.09 Mbps  3.37e-04
   3     67.20 Mbps     67.20 Mbps     67.21 Mbps  1.17e-02
   4    133.10 Mbps    133.10 Mbps    133.16 Mbps  6.08e-02
   5    246.12 Mbps    246.14 Mbps    246.14 Mbps  1.10e-02
   6    433.42 Mbps    433.42 Mbps    433.43 Mbps  6.75e-03
   7    802.88 Mbps    802.93 Mbps    802.93 Mbps  5.43e-02
   8    947.08 Mbps    947.08 Mbps    947.22 Mbps  1.44e-01
   9   1055.08 Mbps   1055.10 Mbps   1055.10 Mbps  2.10e-02
  10   1116.01 Mbps   1116.01 Mbps   1116.03 Mbps  1.28e-02
  11   1149.03 Mbps   1149.04 Mbps   1149.04 Mbps  6.32e-03
  12   1166.41 Mbps   1166.43 Mbps   1166.43 Mbps  2.40e-02
  13   1175.18 Mbps   1175.18 Mbps   1175.34 Mbps  1.61e-01
  14   1179.62 Mbps   1179.62 Mbps   1179.67 Mbps  4.72e-02
  15   1181.58 Mbps   1181.62 Mbps   1181.62 Mbps  3.60e-02
  16   1182.71 Mbps   1182.78 Mbps   1182.78 Mbps  7.29e-02

The client is a virtual machine. The server side is a dedicated server with 2 cores but AES enabled. (Intel Avoton C2350).

While benching with iperf3 I get really bad results

root@bondingrouter:~# iperf3 -c 10.0.1.1 -R
Connecting to host 10.0.1.1, port 5201
Reverse mode, remote host 10.0.1.1 is sending
[  4] local 10.0.1.2 port 53852 connected to 10.0.1.1 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  3.94 MBytes  33.1 Mbits/sec
[  4]   1.00-2.00   sec  15.9 MBytes   133 Mbits/sec
[  4]   2.00-3.00   sec  24.4 MBytes   205 Mbits/sec
[  4]   3.00-4.00   sec  25.4 MBytes   213 Mbits/sec
[  4]   4.00-5.00   sec  26.2 MBytes   220 Mbits/sec
[  4]   5.00-6.00   sec  25.2 MBytes   212 Mbits/sec
[  4]   6.00-7.00   sec  25.4 MBytes   213 Mbits/sec
[  4]   6.00-7.00   sec  25.4 MBytes   213 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -

Actually it's just tested with one line which has 500Mbit, but I would say, that still wouldn't hit the 800Mbit with both lines.
Any way to improve that to get around 800Mbit through the tunnel?

Kind regards

Out of order packets with aggregation.

Hi!

For pure gaming I use Glorytun UDP atm.

But Out of order packets with aggregation causes some fluctuating packet loss due to OoO i presume.

Is there any way to deal with this? Latency of all 3 WAN's arent that far apart so that is probably an issue, would adding some send delay to 2nd and 3rd WAN solve this somewhat? So it acts more as failover rather than jittery udp data.

Question about measurement

Hi Angt great work thank you for this.

Happy with results I'm getting on 6 WAN (ADSL over PPPoE/LLC/SNAP 1446 MTU)

I'm wondering if I can squeeze out any more juice? Results look good, but wanted your opinion to see if they were in line with what you would expect.

iperf3 tells me each WAN can do around 5 Mbits/sec download, and 600Kbits/sec upload.

In a perfect world without overhead and clear weather, something like 30Mbit/sec down, and 3600Kbit/sec up.

Aggregated Download

ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 2.92 MBytes 24.5 Mbits/sec
[ 5] 1.00-2.00 sec 3.12 MBytes 26.2 Mbits/sec
[ 5] 2.00-3.00 sec 3.29 MBytes 27.6 Mbits/sec
[ 5] 3.00-4.00 sec 3.32 MBytes 27.9 Mbits/sec
[ 5] 4.00-5.00 sec 3.41 MBytes 28.6 Mbits/sec
[ 5] 5.00-6.00 sec 3.52 MBytes 29.5 Mbits/sec
[ 5] 6.00-7.00 sec 2.89 MBytes 24.3 Mbits/sec
[ 5] 7.00-8.00 sec 3.34 MBytes 28.0 Mbits/sec
[ 5] 8.00-9.00 sec 3.38 MBytes 28.4 Mbits/sec
[ 5] 9.00-10.00 sec 3.21 MBytes 26.9 Mbits/sec


[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 33.4 MBytes 28.0 Mbits/sec 358 sender
[ 5] 0.00-10.00 sec 32.4 MBytes 27.2 Mbits/sec receiver

Aggregated Upload

[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 714 KBytes 5.85 Mbits/sec 85 21.0 KBytes
[ 5] 1.00-2.00 sec 189 KBytes 1.55 Mbits/sec 31 23.6 KBytes
[ 5] 2.00-3.00 sec 378 KBytes 3.10 Mbits/sec 15 22.3 KBytes
[ 5] 3.00-4.00 sec 189 KBytes 1.55 Mbits/sec 16 23.6 KBytes
[ 5] 4.00-5.00 sec 378 KBytes 3.10 Mbits/sec 16 26.2 KBytes
[ 5] 5.00-6.00 sec 378 KBytes 3.10 Mbits/sec 44 26.2 KBytes
[ 5] 6.00-7.00 sec 189 KBytes 1.55 Mbits/sec 62 18.4 KBytes
[ 5] 7.00-8.00 sec 189 KBytes 1.55 Mbits/sec 1 23.6 KBytes
[ 5] 8.00-9.00 sec 378 KBytes 3.10 Mbits/sec 38 22.3 KBytes
[ 5] 9.00-10.00 sec 189 KBytes 1.55 Mbits/sec 23 5.25 KBytes


[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 3.10 MBytes 2.60 Mbits/sec 331 sender
[ 5] 0.00-10.00 sec 2.71 MBytes 2.27 Mbits/sec receiver


	WAN1

Glorytun:

path UP
status: OK

mtu: 1418 bytes
rtt: 31.426 ms
rttvar: 0.568 ms
rate tx: 800000 bytes/sec
rate rx: 6000000 bytes/sec
total tx: 1163489 packets
total rx: 991371 packets

iPerf Download:

[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 634 KBytes 5.20 Mbits/sec
[ 5] 1.00-2.00 sec 621 KBytes 5.09 Mbits/sec
[ 5] 2.00-3.00 sec 618 KBytes 5.06 Mbits/sec
[ 5] 3.00-4.00 sec 618 KBytes 5.06 Mbits/sec
[ 5] 4.00-5.00 sec 615 KBytes 5.04 Mbits/sec
[ 5] 5.00-6.00 sec 615 KBytes 5.04 Mbits/sec
[ 5] 6.00-7.00 sec 565 KBytes 4.63 Mbits/sec
[ 5] 7.00-8.00 sec 618 KBytes 5.06 Mbits/sec
[ 5] 8.00-9.00 sec 618 KBytes 5.06 Mbits/sec
[ 5] 9.00-10.00 sec 617 KBytes 5.05 Mbits/sec


[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 6.25 MBytes 5.24 Mbits/sec 13 sender
[ 5] 0.00-10.00 sec 6.00 MBytes 5.03 Mbits/sec receiver

iPerf Upload:

[ ID] Interval Transfer Bandwidth
[ 5] 0.00-1.00 sec 77.6 KBytes 636 Kbits/sec
[ 5] 1.00-2.00 sec 76.2 KBytes 625 Kbits/sec
[ 5] 2.00-3.00 sec 76.2 KBytes 624 Kbits/sec
[ 5] 3.00-4.00 sec 83.0 KBytes 680 Kbits/sec
[ 5] 4.00-5.00 sec 77.6 KBytes 636 Kbits/sec
[ 5] 5.00-6.00 sec 77.6 KBytes 636 Kbits/sec
[ 5] 6.00-7.00 sec 76.2 KBytes 625 Kbits/sec
[ 5] 7.00-8.00 sec 80.3 KBytes 658 Kbits/sec
[ 5] 8.00-9.00 sec 74.9 KBytes 613 Kbits/sec
[ 5] 9.00-10.00 sec 77.6 KBytes 636 Kbits/sec
[ 5] 10.00-10.11 sec 8.17 KBytes 590 Kbits/sec


[ ID] Interval Transfer Bandwidth
[ 5] 0.00-10.11 sec 0.00 Bytes 0.00 bits/sec sender
[ 5] 0.00-10.11 sec 785 KBytes 636 Kbits/sec receiver


	WAN2

path UP
status: OK

mtu: 1418 bytes
rtt: 32.856 ms
rttvar: 0.501 ms
rate tx: 800000 bytes/sec
rate rx: 6000000 bytes/sec
total tx: 1167588 packets
total rx: 996366 packets

iPerf Download:

[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 5] 0.00-1.00 sec 856 KBytes 7.01 Mbits/sec 0 93.9 KBytes
[ 5] 1.00-2.00 sec 626 KBytes 5.13 Mbits/sec 9 80.3 KBytes
[ 5] 2.00-3.00 sec 626 KBytes 5.13 Mbits/sec 0 92.6 KBytes
[ 5] 3.00-4.00 sec 626 KBytes 5.13 Mbits/sec 4 72.2 KBytes
[ 5] 4.00-5.00 sec 626 KBytes 5.13 Mbits/sec 0 79.0 KBytes
[ 5] 5.00-6.00 sec 626 KBytes 5.13 Mbits/sec 0 80.3 KBytes
[ 5] 6.00-7.00 sec 626 KBytes 5.13 Mbits/sec 0 85.8 KBytes
[ 5] 7.00-8.00 sec 626 KBytes 5.13 Mbits/sec 0 91.2 KBytes
[ 5] 8.00-9.00 sec 599 KBytes 4.91 Mbits/sec 2 74.9 KBytes
[ 5] 9.00-10.00 sec 626 KBytes 5.13 Mbits/sec 0 85.8 KBytes
[ 5] 10.00-10.05 sec 0.00 Bytes 0.00 bits/sec 0 87.1 KBytes


[ ID] Interval Transfer Bandwidth Retr
[ 5] 0.00-10.05 sec 6.31 MBytes 5.27 Mbits/sec 15 sender
[ 5] 0.00-10.05 sec 0.00 Bytes 0.00 bits/sec receiver

iPerf Upload:

[ ID] Interval Transfer Bandwidth
[ 5] 0.00-1.00 sec 69.4 KBytes 569 Kbits/sec
[ 5] 1.00-2.00 sec 76.2 KBytes 625 Kbits/sec
[ 5] 2.00-3.00 sec 77.6 KBytes 636 Kbits/sec
[ 5] 3.00-4.00 sec 77.6 KBytes 635 Kbits/sec
[ 5] 4.00-5.00 sec 79.0 KBytes 647 Kbits/sec
[ 5] 5.00-6.00 sec 76.2 KBytes 625 Kbits/sec
[ 5] 6.00-7.00 sec 77.6 KBytes 636 Kbits/sec
[ 5] 7.00-8.00 sec 77.6 KBytes 636 Kbits/sec
[ 5] 8.00-9.00 sec 74.9 KBytes 613 Kbits/sec
[ 5] 9.00-10.00 sec 77.6 KBytes 636 Kbits/sec
[ 5] 10.00-10.11 sec 8.17 KBytes 595 Kbits/sec


[ ID] Interval Transfer Bandwidth
[ 5] 0.00-10.11 sec 0.00 Bytes 0.00 bits/sec sender
[ 5] 0.00-10.11 sec 772 KBytes 625 Kbits/sec receiver


	WAN3

path UP
status: OK

mtu: 1418 bytes
rtt: 32.753 ms
rttvar: 0.536 ms
rate tx: 800000 bytes/sec
rate rx: 6000000 bytes/sec
total tx: 1165269 packets
total rx: 992853 packets

iPerf Download:

Reverse mode, remote host 172.81.182.185 is sending
[ 5] local 192.168.12.2 port 62258 connected to 172.81.182.185 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 634 KBytes 5.20 Mbits/sec
[ 5] 1.00-2.00 sec 618 KBytes 5.06 Mbits/sec
[ 5] 2.00-3.00 sec 619 KBytes 5.07 Mbits/sec
[ 5] 3.00-4.00 sec 618 KBytes 5.06 Mbits/sec
[ 5] 4.00-5.00 sec 622 KBytes 5.10 Mbits/sec
[ 5] 5.00-6.00 sec 619 KBytes 5.07 Mbits/sec
[ 5] 6.00-7.00 sec 621 KBytes 5.09 Mbits/sec
[ 5] 7.00-8.00 sec 619 KBytes 5.07 Mbits/sec
[ 5] 8.00-9.00 sec 621 KBytes 5.09 Mbits/sec
[ 5] 9.00-10.00 sec 619 KBytes 5.07 Mbits/sec


[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 6.33 MBytes 5.31 Mbits/sec 11 sender
[ 5] 0.00-10.00 sec 6.07 MBytes 5.09 Mbits/sec receiver

iPerf Upload:

[ ID] Interval Transfer Bandwidth
[ 5] 0.00-1.00 sec 80.3 KBytes 658 Kbits/sec
[ 5] 1.00-2.00 sec 74.9 KBytes 613 Kbits/sec
[ 5] 2.00-3.00 sec 83.0 KBytes 680 Kbits/sec
[ 5] 3.00-4.00 sec 81.7 KBytes 669 Kbits/sec
[ 5] 4.00-5.00 sec 83.0 KBytes 680 Kbits/sec
[ 5] 5.00-6.00 sec 81.7 KBytes 669 Kbits/sec
[ 5] 6.00-7.00 sec 81.7 KBytes 669 Kbits/sec
[ 5] 7.00-8.00 sec 81.7 KBytes 669 Kbits/sec
[ 5] 8.00-9.00 sec 83.0 KBytes 680 Kbits/sec
[ 5] 9.00-10.00 sec 83.0 KBytes 680 Kbits/sec
[ 5] 10.00-10.09 sec 8.17 KBytes 728 Kbits/sec


[ ID] Interval Transfer Bandwidth
[ 5] 0.00-10.09 sec 0.00 Bytes 0.00 bits/sec sender
[ 5] 0.00-10.09 sec 822 KBytes 667 Kbits/sec receiver


	WAN4

path UP
status: OK

mtu: 1418 bytes
rtt: 30.477 ms
rttvar: 1.319 ms
rate tx: 800000 bytes/sec
rate rx: 6000000 bytes/sec
total tx: 1169247 packets
total rx: 995681 packets

iPerf Download:
Reverse mode, remote host 172.81.182.185 is sending
[ 5] local 192.168.13.2 port 46222 connected to 172.81.182.185 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 641 KBytes 5.25 Mbits/sec
[ 5] 1.00-2.00 sec 621 KBytes 5.08 Mbits/sec
[ 5] 2.00-3.00 sec 619 KBytes 5.07 Mbits/sec
[ 5] 3.00-4.00 sec 381 KBytes 3.12 Mbits/sec
[ 5] 4.00-5.00 sec 858 KBytes 7.03 Mbits/sec
[ 5] 5.00-6.00 sec 623 KBytes 5.11 Mbits/sec
[ 5] 6.00-7.00 sec 621 KBytes 5.09 Mbits/sec
[ 5] 7.00-8.00 sec 619 KBytes 5.07 Mbits/sec
[ 5] 8.00-9.00 sec 622 KBytes 5.10 Mbits/sec
[ 5] 9.00-10.00 sec 619 KBytes 5.07 Mbits/sec


[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 6.58 MBytes 5.52 Mbits/sec 12 sender
[ 5] 0.00-10.00 sec 6.08 MBytes 5.10 Mbits/sec receiver

iPerf Upload:

[ ID] Interval Transfer Bandwidth
[ 5] 0.00-1.00 sec 76.2 KBytes 624 Kbits/sec
[ 5] 1.00-2.00 sec 80.3 KBytes 658 Kbits/sec
[ 5] 2.00-3.00 sec 76.2 KBytes 624 Kbits/sec
[ 5] 3.00-4.00 sec 80.3 KBytes 658 Kbits/sec
[ 5] 4.00-5.00 sec 77.6 KBytes 636 Kbits/sec
[ 5] 5.00-6.00 sec 76.2 KBytes 625 Kbits/sec
[ 5] 6.00-7.00 sec 79.0 KBytes 647 Kbits/sec
[ 5] 7.00-8.00 sec 77.6 KBytes 636 Kbits/sec
[ 5] 8.00-9.00 sec 76.2 KBytes 624 Kbits/sec
[ 5] 9.00-10.00 sec 77.6 KBytes 636 Kbits/sec
[ 5] 10.00-10.12 sec 9.53 KBytes 636 Kbits/sec


[ ID] Interval Transfer Bandwidth
[ 5] 0.00-10.12 sec 0.00 Bytes 0.00 bits/sec sender
[ 5] 0.00-10.12 sec 787 KBytes 637 Kbits/sec receiver


	WAN5

Glorytun:

path UP
status: OK
mtu: 1418 bytes
rtt: 30.502 ms
rttvar: 0.497 ms
rate tx: 800000 bytes/sec
rate rx: 6000000 bytes/sec
total tx: 1166478 packets
total rx: 995404 packets

iPerf Download:
Reverse mode, remote host 172.81.182.185 is sending
[ 5] local 192.168.14.2 port 54984 connected to 172.81.182.185 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 659 KBytes 5.40 Mbits/sec
[ 5] 1.00-2.00 sec 619 KBytes 5.07 Mbits/sec
[ 5] 2.00-3.00 sec 619 KBytes 5.07 Mbits/sec
[ 5] 3.00-4.00 sec 617 KBytes 5.05 Mbits/sec
[ 5] 4.00-5.00 sec 618 KBytes 5.06 Mbits/sec
[ 5] 5.00-6.00 sec 621 KBytes 5.09 Mbits/sec
[ 5] 6.00-7.00 sec 475 KBytes 3.89 Mbits/sec
[ 5] 7.00-8.00 sec 765 KBytes 6.27 Mbits/sec
[ 5] 8.00-9.00 sec 621 KBytes 5.09 Mbits/sec
[ 5] 9.00-10.00 sec 622 KBytes 5.10 Mbits/sec


[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 6.60 MBytes 5.54 Mbits/sec 14 sender
[ 5] 0.00-10.00 sec 6.09 MBytes 5.11 Mbits/sec receiver

iPerf Upload:

[ ID] Interval Transfer Bandwidth
[ 5] 0.00-1.00 sec 73.5 KBytes 602 Kbits/sec
[ 5] 1.00-2.00 sec 77.6 KBytes 636 Kbits/sec
[ 5] 2.00-3.00 sec 76.2 KBytes 624 Kbits/sec
[ 5] 3.00-4.00 sec 77.6 KBytes 636 Kbits/sec
[ 5] 4.00-5.00 sec 70.8 KBytes 580 Kbits/sec
[ 5] 5.00-6.00 sec 76.2 KBytes 625 Kbits/sec
[ 5] 6.00-7.00 sec 76.2 KBytes 625 Kbits/sec
[ 5] 7.00-8.00 sec 80.3 KBytes 658 Kbits/sec
[ 5] 8.00-9.00 sec 73.5 KBytes 602 Kbits/sec
[ 5] 9.00-10.00 sec 77.6 KBytes 636 Kbits/sec
[ 5] 10.00-10.09 sec 6.81 KBytes 597 Kbits/sec


[ ID] Interval Transfer Bandwidth
[ 5] 0.00-10.09 sec 0.00 Bytes 0.00 bits/sec sender
[ 5] 0.00-10.09 sec 766 KBytes 622 Kbits/sec receiver

iPerf Download:


	WAN6

path UP
status: OK

mtu: 1418 bytes
rtt: 31.646 ms
rttvar: 0.545 ms
rate tx: 800000 bytes/sec
rate rx: 6000000 bytes/sec
total tx: 1166190 packets
total rx: 993286 packets

iPerf Download:

Reverse mode, remote host 172.81.182.185 is sending
[ 5] local 192.168.15.2 port 51882 connected to 172.81.182.185 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 637 KBytes 5.22 Mbits/sec
[ 5] 1.00-2.00 sec 619 KBytes 5.07 Mbits/sec
[ 5] 2.00-3.00 sec 619 KBytes 5.07 Mbits/sec
[ 5] 3.00-4.00 sec 530 KBytes 4.34 Mbits/sec
[ 5] 4.00-5.00 sec 709 KBytes 5.81 Mbits/sec
[ 5] 5.00-6.00 sec 619 KBytes 5.07 Mbits/sec
[ 5] 6.00-7.00 sec 535 KBytes 4.38 Mbits/sec
[ 5] 7.00-8.00 sec 705 KBytes 5.78 Mbits/sec
[ 5] 8.00-9.00 sec 621 KBytes 5.09 Mbits/sec
[ 5] 9.00-10.00 sec 622 KBytes 5.10 Mbits/sec


[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 6.49 MBytes 5.44 Mbits/sec 17 sender
[ 5] 0.00-10.00 sec 6.07 MBytes 5.09 Mbits/sec receiver

iPerf Upload:

[ ID] Interval Transfer Bandwidth
[ 5] 0.00-1.00 sec 79.0 KBytes 647 Kbits/sec
[ 5] 1.00-2.00 sec 74.9 KBytes 613 Kbits/sec
[ 5] 2.00-3.00 sec 80.3 KBytes 658 Kbits/sec
[ 5] 3.00-4.00 sec 74.9 KBytes 613 Kbits/sec
[ 5] 4.00-5.00 sec 76.2 KBytes 624 Kbits/sec
[ 5] 5.00-6.00 sec 77.6 KBytes 636 Kbits/sec
[ 5] 6.00-7.00 sec 77.6 KBytes 636 Kbits/sec
[ 5] 7.00-8.00 sec 79.0 KBytes 647 Kbits/sec
[ 5] 8.00-9.00 sec 76.2 KBytes 625 Kbits/sec
[ 5] 9.00-10.00 sec 73.5 KBytes 602 Kbits/sec
[ 5] 10.00-10.10 sec 8.17 KBytes 641 Kbits/sec


[ ID] Interval Transfer Bandwidth
[ 5] 0.00-10.10 sec 0.00 Bytes 0.00 bits/sec sender
[ 5] 0.00-10.10 sec 777 KBytes 630 Kbits/sec receiver

Zero rx rate on server

Using latest version 0.3.1 to bond 3 4G LTE lines, local and cloud server both minimal Ubuntu 18.04 servers.

Tunnel seems to be starting OK, but when attempting to download a file it quickly slows down to a halt. Then glorytun path on cloud server (IP 11.22.33.44) displays:

path UP
  status:  OK
  bind:    11.22.33.44 port 5000
  public:  11.22.33.44 port 5000
  peer:    12.34.56.78 port 11358
  mtu:     1400 bytes
  rtt:     86.420 ms
  rttvar:  6.151 ms
  rate:    fixed
  beat:    100 ms
  tx:
    rate:  1000000 bytes/sec
    loss:  0 percent
    total: 468 packets
  rx:
    rate:  0 bytes/sec
    loss:  0 percent
    total: 409 packets
path UP
  status:  OK
  bind:    11.22.33.44 port 5000
  public:  11.22.33.44 port 5000
  peer:    23.45.67.89 port 16041
  mtu:     1400 bytes
  rtt:     88.281 ms
  rttvar:  4.608 ms
  rate:    fixed
  beat:    100 ms
  tx:
    rate:  1000000 bytes/sec
    loss:  0 percent
    total: 526 packets
  rx:
    rate:  0 bytes/sec
    loss:  0 percent
    total: 415 packets
path UP
  status:  OK
  bind:    11.22.33.44 port 5000
  public:  11.22.33.44 port 5000
  peer:    34.56.78.90 port 4329
  mtu:     1400 bytes
  rtt:     90.592 ms
  rttvar:  7.641 ms
  rate:    fixed
  beat:    100 ms
  tx:
    rate:  1000000 bytes/sec
    loss:  0 percent
    total: 613 packets
  rx:
    rate:  0 bytes/sec
    loss:  0 percent
    total: 1121 packets

And on local server glorytun path displays:

path UP
  status:  OK
  bind:    192.168.42.10 port 5000
  public:  12.34.56.78 port 11358
  peer:    11.22.33.44 port 5000
  mtu:     1400 bytes
  rtt:     79.871 ms
  rttvar:  6.916 ms
  rate:    fixed
  beat:    100 ms
  tx:
    rate:  2136 bytes/sec
    loss:  0 percent
    total: 379 packets
  rx:
    rate:  1000000 bytes/sec
    loss:  0 percent
    total: 437 packets
path UP
  status:  OK
  bind:    192.168.42.11 port 5000
  public:  23.45.67.89 port 16041
  peer:    11.22.33.44 port 5000
  mtu:     1400 bytes
  rtt:     83.677 ms
  rttvar:  4.887 ms
  rate:    fixed
  beat:    100 ms
  tx:
    rate:  2171 bytes/sec
    loss:  0 percent
    total: 376 packets
  rx:
    rate:  1000000 bytes/sec
    loss:  0 percent
    total: 493 packets
path UP
  status:  OK
  bind:    192.168.42.12 port 5000
  public:  34.56.78.90 port 4329
  peer:    11.22.33.44 port 5000
  mtu:     1400 bytes
  rtt:     92.301 ms
  rttvar:  9.818 ms
  rate:    fixed
  beat:    100 ms
  tx:
    rate:  2223 bytes/sec
    loss:  0 percent
    total: 1081 packets
  rx:
    rate:  1000000 bytes/sec
    loss:  0 percent
    total: 575 packets

Cloud server commands to start the tunnel:

#!/bin/bash
gt=/usr/local/bin/glorytun

ip tuntap add tun0 mode tun
ip addr add 10.80.1.1/30 peer 10.80.1.2/30 dev tun0
ip link set tun0 up
$gt bind dev tun0 keyfile /etc/gt.key &
sleep 2.0

$gt show

ip route add 192.168.1.0/24 via 10.80.1.2

Local server commands to start the tunnel:

#!/bin/bash
nCon=3

gt=/usr/local/bin/glorytun

ip tuntap add tun0 mode tun
ip addr add 10.80.1.2/30 peer 10.80.1.1/30 dev tun0
ip link set tun0 up
$gt bind to 11.22.33.44 dev tun0 keyfile /etc/gt.key &
sleep 2

$gt show

for n in `seq 0 1 $((nCon - 1))`; do
  n0=$(printf "%02d" ${n})
  n1=$((n + 10))

  ip addr add 192.168.42.${n1}/24 dev ens7f${n}
  ip link set ens7f${n} up

  ip route add 192.168.42.${n1} dev ens7f${n} scope link table wl${n0}
  ip route add default via 192.168.42.129 dev ens7f${n} table wl${n0}

  ip rule add pref ${n1} from 192.168.42.${n1} table wl${n0}
  ip rule add pref ${n1} to 192.168.42.${n1} table wl${n0}

  $gt path up 192.168.42.${n1} rate tx 2mbit rx 8mbit
  sleep 2
done

ip route repl default via 10.80.1.1 dev tun0

Cloud server firewall:

root@cloud-server:~# iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
root@cloud-server:~# iptables -t nat -S
-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT
-A POSTROUTING ! -d 11.22.33.44/32 -o ens3 -j SNAT --to-source 11.22.33.44
root@cloud-server:~# iptables -t mangle -S
-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT

Local server firewall:

root@local-server:~# iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
root@local-server:~# iptables -t nat -S
-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT
-A POSTROUTING -o ens7f+ -j MASQUERADE
root@local-server:~# iptables -t mangle -S
-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT

Would be very grateful for a hint where I'm wrong here!

glorytun for windows

thanks for this great tool. just is it possible that you port a client version for windows?

Add AES-128-GCM

Hello,

Thanks for Glorytun, it's wonderful. I'm using it with the OpenMPTCProuter project. Currently, I use the AES-256-GCM encryption but I would like an AES-128-GCM because it's less CPU intensive for an almost unbreakable encryption method by today's computer power.

Best regards

LEDE package and LUCI module

LEDE currently makes it quite easy to set up an OpenVPN or Wireguard VPN by installing the related packages, and LUCI modules (luci-app-wireguard).

Having Glorytun support as well would be dope.

how to setup point to point connection using ip command

Hello, I'm on archlinux and the ifconfig command has been removed ....

So I can't execute :
ifconfig tun0 10.0.1.1 pointopoint 10.0.1.2 up

What's the equivalent using the ip command ?
sudo ip addr add 10.10.10.1 dev tun1
sudo ip link set tun1 up

And then ? This doesn't allow any connection :/

mud zombie process after reboot

root@OpenWrt:~# ps |grep -i glo
6340 root 18008 S {glorytun-udp.sh} /bin/sh /usr/sbin/glorytun-udp.sh glorytun-udp keyfile /tmp/glorytun-udp.key
6368 root 0 Z [glorytun-udp]
19025 root 8520 S grep -i glo

solved by restarting mud client side :/

How to enable debug in glorytun

Hi,

Is there a way to show debug information on Glorytun?

We have a fresh install setup between a local VM and an EC2 instance in AWS where we see random packet drop with just PING going between the two.

Client side:

[root@localhost tunnel]# ping 10.0.1.1
PING 10.0.1.1 (10.0.1.1) 56(84) bytes of data.
64 bytes from 10.0.1.1: icmp_seq=1 ttl=64 time=66.0 ms
64 bytes from 10.0.1.1: icmp_seq=3 ttl=64 time=91.4 ms
64 bytes from 10.0.1.1: icmp_seq=4 ttl=64 time=65.8 ms
64 bytes from 10.0.1.1: icmp_seq=5 ttl=64 time=78.4 ms
64 bytes from 10.0.1.1: icmp_seq=6 ttl=64 time=76.8 ms
64 bytes from 10.0.1.1: icmp_seq=8 ttl=64 time=88.0 ms
64 bytes from 10.0.1.1: icmp_seq=9 ttl=64 time=66.4 ms
64 bytes from 10.0.1.1: icmp_seq=10 ttl=64 time=70.0 ms
64 bytes from 10.0.1.1: icmp_seq=11 ttl=64 time=127 ms
64 bytes from 10.0.1.1: icmp_seq=12 ttl=64 time=67.1 ms
^C
--- 10.0.1.1 ping statistics ---
12 packets transmitted, 10 received, 16% packet loss, time 11017ms

Server side:

13:41:26.135992 IP 10.0.1.2 > 10.0.1.1: ICMP echo request, id 20256, seq 1, length 64
13:41:26.136007 IP 10.0.1.1 > 10.0.1.2: ICMP echo reply, id 20256, seq 1, length 64
13:41:28.164192 IP 10.0.1.2 > 10.0.1.1: ICMP echo request, id 20256, seq 3, length 64
13:41:28.164206 IP 10.0.1.1 > 10.0.1.2: ICMP echo reply, id 20256, seq 3, length 64
13:41:29.141201 IP 10.0.1.2 > 10.0.1.1: ICMP echo request, id 20256, seq 4, length 64
13:41:29.141219 IP 10.0.1.1 > 10.0.1.2: ICMP echo reply, id 20256, seq 4, length 64
13:41:30.155279 IP 10.0.1.2 > 10.0.1.1: ICMP echo request, id 20256, seq 5, length 64
13:41:30.155292 IP 10.0.1.1 > 10.0.1.2: ICMP echo reply, id 20256, seq 5, length 64
13:41:31.155671 IP 10.0.1.2 > 10.0.1.1: ICMP echo request, id 20256, seq 6, length 64
13:41:31.155686 IP 10.0.1.1 > 10.0.1.2: ICMP echo reply, id 20256, seq 6, length 64
13:41:33.169043 IP 10.0.1.2 > 10.0.1.1: ICMP echo request, id 20256, seq 8, length 64
13:41:33.169055 IP 10.0.1.1 > 10.0.1.2: ICMP echo reply, id 20256, seq 8, length 64
13:41:34.149270 IP 10.0.1.2 > 10.0.1.1: ICMP echo request, id 20256, seq 9, length 64
13:41:34.149289 IP 10.0.1.1 > 10.0.1.2: ICMP echo reply, id 20256, seq 9, length 64
13:41:35.154276 IP 10.0.1.2 > 10.0.1.1: ICMP echo request, id 20256, seq 10, length 64
13:41:35.154289 IP 10.0.1.1 > 10.0.1.2: ICMP echo reply, id 20256, seq 10, length 64
13:41:36.213337 IP 10.0.1.2 > 10.0.1.1: ICMP echo request, id 20256, seq 11, length 64
13:41:36.213360 IP 10.0.1.1 > 10.0.1.2: ICMP echo reply, id 20256, seq 11, length 64
13:41:37.155690 IP 10.0.1.2 > 10.0.1.1: ICMP echo request, id 20256, seq 12, length 64
13:41:37.155705 IP 10.0.1.1 > 10.0.1.2: ICMP echo reply, id 20256, seq 12, length 64

Sometimes the client sends everything, the server replies, we see the encrypted reply with tcpdump but glorytun fails to decrypt it:

client side:

[root@localhost tunnel]# ping 10.0.1.1
PING 10.0.1.1 (10.0.1.1) 56(84) bytes of data.
64 bytes from 10.0.1.1: icmp_seq=18 ttl=64 time=71.0 ms
^C
--- 10.0.1.1 ping statistics ---
70 packets transmitted, 1 received, 98% packet loss, time 69010ms
rtt min/avg/max/mdev = 71.074/71.074/71.074/0.000 ms

server side:

<truncated>
13:38:44.948533 IP 10.0.1.1 > 10.0.1.2: ICMP echo reply, id 20223, seq 65, length 64
13:38:45.924772 IP 10.0.1.2 > 10.0.1.1: ICMP echo request, id 20223, seq 66, length 64
13:38:45.924787 IP 10.0.1.1 > 10.0.1.2: ICMP echo reply, id 20223, seq 66, length 64
13:38:46.927813 IP 10.0.1.2 > 10.0.1.1: ICMP echo request, id 20223, seq 67, length 64
13:38:46.927826 IP 10.0.1.1 > 10.0.1.2: ICMP echo reply, id 20223, seq 67, length 64
13:38:47.924402 IP 10.0.1.2 > 10.0.1.1: ICMP echo request, id 20223, seq 68, length 64
13:38:47.924416 IP 10.0.1.1 > 10.0.1.2: ICMP echo reply, id 20223, seq 68, length 64
13:38:48.930502 IP 10.0.1.2 > 10.0.1.1: ICMP echo request, id 20223, seq 69, length 64
13:38:48.930515 IP 10.0.1.1 > 10.0.1.2: ICMP echo reply, id 20223, seq 69, length 64
13:38:49.925581 IP 10.0.1.2 > 10.0.1.1: ICMP echo request, id 20223, seq 70, length 64
13:38:49.925595 IP 10.0.1.1 > 10.0.1.2: ICMP echo reply, id 20223, seq 70, length 64

Abnormal traffic in links

Hi All,

I've tested glorytun on one of my devices with debian 8 (client) and the server is debian 9.
When it gets connected starts to send traffic on both ways saturating the uplinks and creating high latency. I have one LTE (sierra-2-0) + WIFI (ath-1-1-00) interfaces.

Libsodium is 1.0.11-2 on both.

Server:
DEV=tun0
HOST=213.XX.XXX.69
PORT=5000
BIND=0.0.0.0
BIND_PORT=5000
OPTIONS=

Client:
DEV=tun-1-0
HOST=213.XX.XXX.69
PORT=5000
BIND=0.0.0.0
BIND_PORT=5000
OPTIONS=

dstat -n -N sierra-2-0,ath-1-1-00
net/sierra--net/ath-1-1
recv send: recv send
0 0 : 0 0
623k 620k:1514B 3216B
671k 674k: 10k 14k
889k 891k:4602B 6136B
938k 938k: 12k 15k
875k 876k:7630B 10k
848k 850k:9084B 11k
741k 743k: 12k 17k
970k 970k:1514B 3068B
977k 980k:6056B 9360B
792k 793k: 12k 15k
794k 795k:6130B 9827B
825k 825k:9084B 12k
740k 743k: 12k 13k
853k 854k: 10k 14k
861k 861k: 10k 12k
832k 832k: 13k 15k
872k 873k:9084B 11k
768k 766k: 13k 15k
809k 812k:7570B 9204B
853k 854k: 12k 15k
876k 877k: 10k 12k

18:59:20.086038 IP 172.18.100.19.5000 > bbottsv.5000: UDP, length 1472
18:59:20.193015 IP bbottsv.5000 > 172.18.100.19.5000: UDP, length 1472
18:59:20.193525 IP 172.18.100.19.5000 > bbottsv.5000: UDP, length 1472
18:59:20.290387 IP bbottsv.5000 > 172.18.100.19.5000: UDP, length 1472
18:59:20.290854 IP 172.18.100.19.5000 > bbottsv.5000: UDP, length 1472
18:59:20.341563 IP bbottsv.5000 > 172.18.100.19.5000: UDP, length 1472
18:59:20.342000 IP 172.18.100.19.5000 > bbottsv.5000: UDP, length 1472
18:59:20.446314 IP bbottsv.5000 > 172.18.100.19.5000: UDP, length 1472
18:59:20.446763 IP 172.18.100.19.5000 > bbottsv.5000: UDP, length 1472
18:59:20.525617 IP bbottsv.5000 > 172.18.100.19.5000: UDP, length 1472
18:59:20.526087 IP 172.18.100.19.5000 > bbottsv.5000: UDP, length 1472

Kind Regards,
LasiX

in Mini How-To you should add that rate tx and rx values are mandatory settings

I configured everything but did not set rate tx 1mbit tx 20mbit
just executed:
# glorytun path up x.x.x.x
as I assumed there was some default.
But ping did not work.

Then I set an actual TX/RX and then Ping did work
# glorytun path up LOCAL_IPADDR rate tx 1mbit rx 20mbit

So those 2 bandwidth options are required to be set to something.

speedtest / nperf via browser failed

Hi,

When using firefox/chromium-like browser, https://www.speedtest.net (or nperf) failed through
glorytun tunnel (failed to connect).
With Curl (instead of firefox/chromium), no issue, i manage to download through glorytun tunnel.

When i put a proxy (squid with tcp_outgoing_address option) in front of tunnel, i have no issue with any browser.

Do you have an idea please ?

Cannot Add 2nd Path

Thanks for making glorytun available, looks very promising! Still have a problem with adding 2nd path.

Server:

server:~# glorytun bind 0.0.0.0 keyfile /etc/glorytun.key &
server:~# ip addr add 10.80.1.1 peer 10.80.1.2/24 dev tun0
server:~# ip link set dev tun0 up

Client:

client:~# glorytun bind 0.0.0.0 to <SERVER_IP> keyfile /etc/glorytun.key &
client:~# ip addr add 10.80.1.2 peer 10.80.1.1/24 dev tun0
client:~# ip link set dev tun0 up
client:~# glorytun path up 192.168.12.10 rate tx 2mbit rx 8mbit

This works fine, can ping the other side from both sides, though latency is pretty high (> 120ms) and very unsteady. (Latency when connecting directly is some 70ms and more steady.)

When adding 2nd path on client

client:~# glorytun path up 192.168.12.11 rate tx 2mbit rx 8mbit

both pings don't work any more and glorytun path outputs:

client:~# glorytun path
path UP
  status:  OK
  bind:    192.168.12.10 port 5000
  public:  <PUBLIC_IP1> port 4711
  peer:    <SERVER_IP> port 5000
  mtu:     1387 bytes
  rtt:     3978.264 ms
  rttvar:  3174.221 ms
  tx:
    rate:  250000 bytes/sec
    loss:  92 percent
    total: 300 packets
  rx:
    rate:  1000000 bytes/sec
    loss:  0 percent
    total: 93 packets
path UP
  status:  DEGRADED
  bind:    192.168.12.11 port 5000
  public:  - port 0
  peer:    <SERVER_IP> port 5000
  mtu:     1302 bytes
  rtt:     0.000 ms
  rttvar:  0.000 ms
  tx:
    rate:  250000 bytes/sec
    loss:  0 percent
    total: 0 packets
  rx:
    rate:  1000000 bytes/sec
    loss:  0 percent
    total: 0 packets

Both paths have dedicated routing tables:

client:~# ip rule list
0:      from all lookup local 
10:     from 192.168.12.10 lookup wl0 
10:     from all to 192.168.12.10 lookup wl0 
11:     from 192.168.12.11 lookup wl1 
11:     from all to 192.168.12.11 lookup wl1 
32766:  from all lookup main 
32767:  from all lookup default 

client:~# ip route show table wl0
default via 192.168.12.1 dev enusb00 
192.168.12.0/24 dev enusb00 scope link 

client:~# ip route show table wl1
default via 192.168.12.1 dev enusb01 
192.168.12.0/24 dev enusb01 scope link 

and making any of the paths' IP addresses the default gateway for the client makes Internet access available properly.

Using FireHOL for firewalling. Opened port 5000 for both, TCP and UDP, on the server, and traffic from/to the tun device is accepted unrestricted. On the client traffic for the tun devices is permitted freely to/from the LAN device.

Any idea what might make glorytun fail here?

Thanks so much for helping!

Query On Multipathing

I was looking at something to provide a way for multi path udp. I came across Glorytun, But i have few query to confirm:
a) Does it provide the multi-path feature across available multiple interface like Multipath TCP provides?
b) how does it select the interface to be used to establish the tunnel and include in multi path list?

MTU problems

Hi,

I'm using OpenMPTCProuter to aggregate 2 WAN connections which have a MTU of 1500 each.

When I use Glorytun TCP (default on OpenMPTCProuter), tunnel interfaces on both OpenMPTCProuter the VPS have an MTU of 1500, which is correct. Speeds are somewhat good on a site to site OpenVPN UDP with a friend that also have OpenMPTCProuter running.

When I use Glorytun UDP (OpenMPTCProuter uses the latest commit on the VPS and an OpenWRT version on the router), tunnel interfaces on both OpenMPTCProuter and the VPS have an MTU of 1378 (same thing on my friend's install). Speeds are horrible with the OpenVPN UDP tunnel, as it certainly has to fragment packets. I tried to set link-mtu, tun-mtu and mssfix parameters on OpenVPN, but the performance is not good anyway.

When I try to force the MTU on Glorytun UDP with the LuCI interface on OpenMPTCProuter, it does nothing.

When I try to force the MTU of the Glorytun server on the VPS:

# glorytun set mtu 1500
mtu set to 1500
# glorytun show
server gt-udp-tun0:
  pid:       3114
  bind:      0.0.0.0 port 65001
  mtu:       1378
  cipher:    aes256gcm

We can clearly see that it does nothing.

I don't see any reason why Glorytun UDP sets a MTU of 1378 on the interface, and it's too bad because it would be more efficient than Glorytun TCP.

Quastion: MTU configuration for glorytun interface

I need to have tunnel aggregated by multiple Internet connections. But the mandatory requirement for me is MTU for the tunnel interface MUST be about 1524 bytes.

Is it possible to configure MTU of Glorytun? Something like an option "tun-mtu" in OpenVPN.

I must say right away that the TCP MSS configuration for the tunnel interface is not suitable for me. I just need to be able to transfer large IP-packets through the tunnel.

glorytun(mud version) is not pingable

tun devices were up on both server and client sides, and
on server:
ip addr add 192.168.99.1 peer 192.168.99.2 dev gt-tun

on client:
ip addr add 192.168.99.2 peer 192.168.99.1 dev gt-tun

but pinging 192.168.99.1 on client side was stuck

latest glorytun bench is too low!

I use port latest glorytun to openwrt for Qualcomm IPQ4029 CPU (quad core 800Mhz), but I compile it with error ' GCC have no attribute target("+crypto")'. My GCC version is 7.4.0, and IPQ4029 is arm v7 CPU with neon-vfpv4 feature.
So I comment #pragma GCC target("+crypto") in the mud/aegis256/aegis256.c as below"
#ifdef clang
#pragma clang attribute push (attribute((target("crypto"))),apply_to=function)
#ifndef __ARM_FEATURE_CRYPTO
#define __ARM_FEATURE_CRYPTO 1
#endif
//#else
//#pragma GCC target("+crypto")
#endif
Then compile success๏ผŒ below is the result of the bench test.
Openwrt:/root# glorytun-udp bench
cipher: chacha20poly1305

size min mean max

20        13 Mbps        13 Mbps        13 Mbps

150 57 Mbps 57 Mbps 57 Mbps
280 75 Mbps 77 Mbps 77 Mbps
410 86 Mbps 87 Mbps 87 Mbps
540 93 Mbps 94 Mbps 94 Mbps
670 97 Mbps 98 Mbps 98 Mbps
800 101 Mbps 101 Mbps 102 Mbps
930 103 Mbps 103 Mbps 104 Mbps
1060 105 Mbps 105 Mbps 106 Mbps
1190 106 Mbps 107 Mbps 107 Mbps
1320 108 Mbps 109 Mbps 109 Mbps
1450 109 Mbps 110 Mbps 110 Mbps

I think the speed is too low, Is there any way to disable the encryption for me. In fact I don't need encryption but speed is important for me. By the way IPQ4029 have a hardware crypto engine, but I don't know how to use it

Packet loss issues, one WAN affects whole link.

Packet loss issues, one WAN affects whole link.

Sometimes one of my links experience upstream problems causing roughly ~50% packet loss, the whole aggregated link becomes bad quality because glorytun UDP keeps transmitting also over the bad link.

Also replicateable with netem and add artificial packet loss to one of the three WAN interfaces. Anything I can do about this?

What about packet loss tolerance setting/timeout?

Edit: I see at 0.0.98 or something scheduler changed for more
bandwidth, i use bonding more for reliability.

not pingable

I followed steps on wiki, setup server and client.
but I can not ping from client or server.

any idea?

on server
tail -f gt.log
xxx.xxx.xxx.xxx .5000: connected
xxx.xxx.xxx.xxx.5000: connected
xxx.xxx.xxx.xxx.5000: connected
xxx.xxx.xxx.xxx..5000: connected

glorytun  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:192.168.91.2  P-t-P:192.168.91.1  Mask:255.255.255.255
          POINTOPOINT NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:59 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:4956 (4.9 KB)  TX bytes:0 (0.0 B)

client

glorytun  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:192.168.91.1  P-t-P:192.168.91.2  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:227 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 B)  TX bytes:19068 (18.6 KiB)

Mini HowTo ?

I don't get how glorytun work...

what is 10.0.1.1 in the case of server and 10.0.1.2 ?

Where is run the command "glorytun path up <LOCAL_IP> rate tx 1mbit rx 20mbit" on the server?

Backup path?

I see paths can be added with a state of up, backup, and down. I added a path in the backup state, thinking it would only pass traffic when the path in the up state became degraded. This does not seem to be the case though... the backup path seems to act just like the up path. Is this by design? Is there a way to have a backup path that only passe traffic when the path(s) in the up state are degraded?

Any TCP only solution?

My Uni will block all outgoing UDP by default. Anyway to convert UDP to make TCP likes to bypass firewall?

Control Panel Crash but no error info in Ubuntu/Debian

Hello :
I have met a problem about the panel/core crash ...

root@glorytun:~# glorytun path
path: No such file or directory
root@glorytun:~# glorytun show
show: No such file or directory

It happened some hour after one path have been setup everytime .

gt-tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1392

root@glorytun:~# systemctl status glorytun@tun0
โ— [email protected] - Glorytun on tun0
   Loaded: loaded (/lib/systemd/system/[email protected]; disabled; vendor preset: enabled)
   Active: active (running) since Sun 2020-03-22 11:57:09 CST; 8h ago
 Main PID: 30141 (glorytun)
   CGroup: /system.slice/system-glorytun.slice/[email protected]
           โ””โ”€30141 glorytun bind keyfile /etc/glorytun/tun0/key 0.0.0.0 5000 dev gt-tun0

using the lastest version 0.3.3 ...
I have tried debian 9 / ubuntu 16 ...Both of them have problem..
Please help .
And Please recommand a stable OS for glorytun .

Thank you.

path: Invalid argument

no matter what I try I get "path: Invalid argument" when executing the "glorytun path" command, except when I set "dev eth0" in which case I get "path: No such file or directory".

Can't get glorytun to use multiple paths

Hopefully I've just don't something stupid here, but I can't get glorytun to use multiple outbound interfaces. Following the readme I get to where ping works fine, but when I add a second path glorytun creates two connections using a single interface rather than having each connection use the specified interface. If I take down the original interface but leave the other up then glorytun won't failover and packets get dropped. I also don't think it matters which order I add the interfaces in, I think it just uses the one with the lower metric in the routing table.

I'm using a Debian VPS acting as server and a Linksys WRT3200ACM (OpenWrt 18.06.1, glorytun version 4b4a6308e711e6fb614d4886a9887fac040a1d56) acting as client. 192.168.10.2 is an ethernet connection and 192.168.1.249 is an 802.11n client.

root@Mahoro:~# glorytun-udp path dev tun0
path UP
  bind:     192.168.10.2 port 5000
  public:   162.233.10.148 port 5000
  peer:     [Redacted server IP] port 5000
  mtu:      1472 bytes
  rtt:      118.300 ms
  rttvar:   28.076 ms
  upload:   1005 bytes/s (max: 2094)
  download: 1012 bytes/s (max: 3458)
  output:   1337 packets
  input:    603 packets
path UP
  bind:     192.168.1.249 port 5000
  public:   162.233.10.148 port 1024
  peer:     [Redacted server IP] port 5000
  mtu:      1472 bytes
  rtt:      113.877 ms
  rttvar:   27.377 ms
  upload:   2098 bytes/s (max: 2770)
  download: 131 bytes/s (max: 2079)
  output:   1300 packets
  input:    934 packets

Both paths are reported as having the same public IP address, despite being from different ISPs, suggesting two connections from the same interface.

Is this suited for aggregation of two variable speed connections?

I'd like to ask if this program is suitable for aggregation of two connections with variable speed. For example, a cable modem connection and a mobile broadband, or two mobile broadbands from two different carriers? Can I just omit the rate limit thing from the command?

Always degraded path status

Server sequence:

glorytun bind 0.0.0.0 keyfile my_secret_key &
ifconfig tun0 172.25.0.1 pointopoint 172.25.0.2 up

Client sequence:

glorytun bind 0.0.0.0 to x.x.x.x keyfile my_secret_key &
ifconfig tun0 172.25.0.2 pointopoint 172.25.0.1 up
glorytun path up 172.16.0.20
glorytun path up 192.168.2.20

Client has following addresses:
WAN1: 192.168.2.20/24 (gateway is 192.168.2.1)
WAN2: 172.16.0.20/24 (gateway is 172.16.0.1)

glorytun path always shows degraded status on client.

Is it possible to get some hints to getting this work? How is "LOCAL_IPADDR" to be understood with a multi-wan setup?

ip a

2: enp0s20u4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:e0:4c:36:44:69 brd ff:ff:ff:ff:ff:ff
    inet 192.168.178.129/24 brd 192.168.178.255 scope global dynamic noprefixroute enp0s20u4
       valid_lft 4671sec preferred_lft 4671sec
    inet6 fe80::3e11:ccc5:5dd2:7bef/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
40: fb@enp0s20u4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:e0:4c:36:44:69 brd ff:ff:ff:ff:ff:ff
    inet 172.16.0.20/24 brd 172.16.0.255 scope global noprefixroute fb
       valid_lft forever preferred_lft forever
    inet6 fe80::a5ee:8b81:7ec6:c38e/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
41: sph@enp0s20u4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:e0:4c:36:44:69 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.20/24 brd 192.168.2.255 scope global noprefixroute sph
       valid_lft forever preferred_lft forever
    inet6 fe80::56ad:eda:a116:23f7/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

(fb and sph are WAN1/WAN2)

mud client timeout

when restarting mud server side, client failed to re-establish the connection.

timeout parameter on client side seems useless.

glorytun master/stable does not compile on OpenBSD 6.6

Hey.
Seems like this software does not compile on OpenBSD.

Setup: (Might not be complete)

host# pkg_add git gmake libsodium

host$ git clone https://github.com/angt/glorytun --recursive --branch stable
host$ cd glorytun
host$ export CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib"

GNU Make attempt:

host$ gmake
glorytun
In file included from src/bench.c:1:
src/common.h:65:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
void     gt_set_port (struct sockaddr *, uint16_t);
                             ^
src/common.h:66:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
uint16_t gt_get_port (struct sockaddr *);
                             ^
src/common.h:67:46: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
int      gt_toaddr   (char *, size_t, struct sockaddr *);
                                             ^
3 warnings generated.
In file included from src/set.c:1:
src/common.h:65:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
void     gt_set_port (struct sockaddr *, uint16_t);
                             ^
src/common.h:66:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
uint16_t gt_get_port (struct sockaddr *);
                             ^
src/common.h:67:46: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
int      gt_toaddr   (char *, size_t, struct sockaddr *);
                                             ^
3 warnings generated.
In file included from src/keygen.c:1:
src/common.h:65:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
void     gt_set_port (struct sockaddr *, uint16_t);
                             ^
src/common.h:66:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
uint16_t gt_get_port (struct sockaddr *);
                             ^
src/common.h:67:46: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
int      gt_toaddr   (char *, size_t, struct sockaddr *);
                                             ^
3 warnings generated.
In file included from src/main.c:1:
src/common.h:65:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
void     gt_set_port (struct sockaddr *, uint16_t);
                             ^
src/common.h:66:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
uint16_t gt_get_port (struct sockaddr *);
                             ^
src/common.h:67:46: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
int      gt_toaddr   (char *, size_t, struct sockaddr *);
                                             ^
3 warnings generated.
In file included from src/bind.c:1:
src/common.h:65:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
void     gt_set_port (struct sockaddr *, uint16_t);
                             ^
src/common.h:66:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
uint16_t gt_get_port (struct sockaddr *);
                             ^
src/common.h:67:46: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
int      gt_toaddr   (char *, size_t, struct sockaddr *);
                                             ^
src/bind.c:136:17: warning: incompatible pointer types passing 'struct sockaddr *' to parameter of type 'struct sockaddr *' [-Wincompatible-pointer-types]
    gt_set_port((struct sockaddr *)&bind_addr, bind_port);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common.h:65:40: note: passing argument to parameter here
void     gt_set_port (struct sockaddr *, uint16_t);
                                       ^
src/bind.c:137:17: warning: incompatible pointer types passing 'struct sockaddr *' to parameter of type 'struct sockaddr *' [-Wincompatible-pointer-types]
    gt_set_port((struct sockaddr *)&peer_addr, peer_port);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common.h:65:40: note: passing argument to parameter here
void     gt_set_port (struct sockaddr *, uint16_t);
                                       ^
5 warnings generated.
In file included from src/path.c:1:
src/common.h:65:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
void     gt_set_port (struct sockaddr *, uint16_t);
                             ^
src/common.h:66:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
uint16_t gt_get_port (struct sockaddr *);
                             ^
src/common.h:67:46: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
int      gt_toaddr   (char *, size_t, struct sockaddr *);
                                             ^
src/path.c:19:13: warning: incompatible pointer types passing 'struct sockaddr *' to parameter of type 'struct sockaddr *' [-Wincompatible-pointer-types]
            (struct sockaddr *)&path->local_addr);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common.h:67:56: note: passing argument to parameter here
int      gt_toaddr   (char *, size_t, struct sockaddr *);
                                                       ^
src/path.c:21:13: warning: incompatible pointer types passing 'struct sockaddr *' to parameter of type 'struct sockaddr *' [-Wincompatible-pointer-types]
            (struct sockaddr *)&path->r_addr);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common.h:67:56: note: passing argument to parameter here
int      gt_toaddr   (char *, size_t, struct sockaddr *);
                                                       ^
src/path.c:23:13: warning: incompatible pointer types passing 'struct sockaddr *' to parameter of type 'struct sockaddr *' [-Wincompatible-pointer-types]
            (struct sockaddr *)&path->addr);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common.h:67:56: note: passing argument to parameter here
int      gt_toaddr   (char *, size_t, struct sockaddr *);
                                                       ^
src/path.c:63:21: warning: incompatible pointer types passing 'struct sockaddr *' to parameter of type 'struct sockaddr *' [-Wincompatible-pointer-types]
        gt_get_port((struct sockaddr *)&path->local_addr),
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common.h:66:40: note: passing argument to parameter here
uint16_t gt_get_port (struct sockaddr *);
                                       ^
src/path.c:65:21: warning: incompatible pointer types passing 'struct sockaddr *' to parameter of type 'struct sockaddr *' [-Wincompatible-pointer-types]
        gt_get_port((struct sockaddr *)&path->r_addr),
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common.h:66:40: note: passing argument to parameter here
uint16_t gt_get_port (struct sockaddr *);
                                       ^
src/path.c:67:21: warning: incompatible pointer types passing 'struct sockaddr *' to parameter of type 'struct sockaddr *' [-Wincompatible-pointer-types]
        gt_get_port((struct sockaddr *)&path->addr),
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common.h:66:40: note: passing argument to parameter here
uint16_t gt_get_port (struct sockaddr *);
                                       ^
src/path.c:90:27: error: incomplete definition of type 'struct sockaddr_in'
        return ((memcmp(&A->sin_addr, &B->sin_addr, sizeof(A->sin_addr))));
                         ~^
src/path.c:88:16: note: forward declaration of 'struct sockaddr_in'
        struct sockaddr_in *A = (struct sockaddr_in *)a;
               ^
src/path.c:90:41: error: incomplete definition of type 'struct sockaddr_in'
        return ((memcmp(&A->sin_addr, &B->sin_addr, sizeof(A->sin_addr))));
                                       ~^
src/path.c:88:16: note: forward declaration of 'struct sockaddr_in'
        struct sockaddr_in *A = (struct sockaddr_in *)a;
               ^
src/path.c:90:61: error: incomplete definition of type 'struct sockaddr_in'
        return ((memcmp(&A->sin_addr, &B->sin_addr, sizeof(A->sin_addr))));
                                                           ~^
src/path.c:88:16: note: forward declaration of 'struct sockaddr_in'
        struct sockaddr_in *A = (struct sockaddr_in *)a;
               ^
src/path.c:96:27: error: incomplete definition of type 'struct sockaddr_in6'
        return ((memcmp(&A->sin6_addr, &B->sin6_addr, sizeof(A->sin6_addr))));
                         ~^
src/path.c:94:16: note: forward declaration of 'struct sockaddr_in6'
        struct sockaddr_in6 *A = (struct sockaddr_in6 *)a;
               ^
src/path.c:96:42: error: incomplete definition of type 'struct sockaddr_in6'
        return ((memcmp(&A->sin6_addr, &B->sin6_addr, sizeof(A->sin6_addr))));
                                        ~^
src/path.c:94:16: note: forward declaration of 'struct sockaddr_in6'
        struct sockaddr_in6 *A = (struct sockaddr_in6 *)a;
               ^
src/path.c:96:63: error: incomplete definition of type 'struct sockaddr_in6'
        return ((memcmp(&A->sin6_addr, &B->sin6_addr, sizeof(A->sin6_addr))));
                                                             ~^
src/path.c:94:16: note: forward declaration of 'struct sockaddr_in6'
        struct sockaddr_in6 *A = (struct sockaddr_in6 *)a;
               ^
9 warnings and 6 errors generated.
In file included from src/ctl.c:1:
src/common.h:65:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
void     gt_set_port (struct sockaddr *, uint16_t);
                             ^
src/common.h:66:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
uint16_t gt_get_port (struct sockaddr *);
                             ^
src/common.h:67:46: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
int      gt_toaddr   (char *, size_t, struct sockaddr *);
                                             ^
3 warnings generated.
In file included from src/iface.c:1:
src/common.h:65:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
void     gt_set_port (struct sockaddr *, uint16_t);
                             ^
src/common.h:66:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
uint16_t gt_get_port (struct sockaddr *);
                             ^
src/common.h:67:46: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
int      gt_toaddr   (char *, size_t, struct sockaddr *);
                                             ^
3 warnings generated.
In file included from src/common.c:1:
src/common.h:65:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
void     gt_set_port (struct sockaddr *, uint16_t);
                             ^
src/common.h:66:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
uint16_t gt_get_port (struct sockaddr *);
                             ^
src/common.h:67:46: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
int      gt_toaddr   (char *, size_t, struct sockaddr *);
                                             ^
src/common.c:74:20: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
gt_set_port(struct sockaddr *sa, uint16_t port)
                   ^
src/common.c:74:1: error: conflicting types for 'gt_set_port'
gt_set_port(struct sockaddr *sa, uint16_t port)
^
src/common.h:65:10: note: previous declaration is here
void     gt_set_port (struct sockaddr *, uint16_t);
         ^
src/common.c:76:15: error: incomplete definition of type 'struct sockaddr'
    switch (sa->sa_family) {
            ~~^
src/common.c:74:20: note: forward declaration of 'struct sockaddr'
gt_set_port(struct sockaddr *sa, uint16_t port)
                   ^
src/common.c:78:35: error: incomplete definition of type 'struct sockaddr_in'
        ((struct sockaddr_in *)sa)->sin_port = htons(port);
        ~~~~~~~~~~~~~~~~~~~~~~~~~~^
src/common.c:78:18: note: forward declaration of 'struct sockaddr_in'
        ((struct sockaddr_in *)sa)->sin_port = htons(port);
                 ^
src/common.c:81:36: error: incomplete definition of type 'struct sockaddr_in6'
        ((struct sockaddr_in6 *)sa)->sin6_port = htons(port);
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
src/common.c:81:18: note: forward declaration of 'struct sockaddr_in6'
        ((struct sockaddr_in6 *)sa)->sin6_port = htons(port);
                 ^
src/common.c:87:20: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
gt_get_port(struct sockaddr *sa)
                   ^
src/common.c:87:1: error: conflicting types for 'gt_get_port'
gt_get_port(struct sockaddr *sa)
^
src/common.h:66:10: note: previous declaration is here
uint16_t gt_get_port (struct sockaddr *);
         ^
src/common.c:89:15: error: incomplete definition of type 'struct sockaddr'
    switch (sa->sa_family) {
            ~~^
src/common.c:87:20: note: forward declaration of 'struct sockaddr'
gt_get_port(struct sockaddr *sa)
                   ^
src/common.c:91:48: error: incomplete definition of type 'struct sockaddr_in'
        return ntohs(((struct sockaddr_in *)sa)->sin_port);
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~^
/usr/include/sys/endian.h:97:28: note: expanded from macro 'ntohs'
#define ntohs(x)        __htobe16(x)
                                  ^
/usr/include/sys/_endian.h:87:36: note: expanded from macro '__swap16'
        (__uint16_t)(__builtin_constant_p(x) ? __swap16gen(x) : __swap16md(x))
                                          ^
src/common.c:91:31: note: forward declaration of 'struct sockaddr_in'
        return ntohs(((struct sockaddr_in *)sa)->sin_port);
                              ^
src/common.c:91:48: error: incomplete definition of type 'struct sockaddr_in'
        return ntohs(((struct sockaddr_in *)sa)->sin_port);
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~^
/usr/include/sys/endian.h:97:28: note: expanded from macro 'ntohs'
#define ntohs(x)        __htobe16(x)
                                  ^
/usr/include/sys/_endian.h:87:53: note: expanded from macro '__swap16'
        (__uint16_t)(__builtin_constant_p(x) ? __swap16gen(x) : __swap16md(x))
                                                           ^
/usr/include/sys/_endian.h:49:32: note: expanded from macro '__swap16gen'
    (__uint16_t)(((__uint16_t)(x) & 0xffU) << 8 | ((__uint16_t)(x) & 0xff00U) >> 8)
                               ^
src/common.c:91:31: note: forward declaration of 'struct sockaddr_in'
        return ntohs(((struct sockaddr_in *)sa)->sin_port);
                              ^
src/common.c:91:48: error: incomplete definition of type 'struct sockaddr_in'
        return ntohs(((struct sockaddr_in *)sa)->sin_port);
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~^
/usr/include/sys/endian.h:97:28: note: expanded from macro 'ntohs'
#define ntohs(x)        __htobe16(x)
                                  ^
/usr/include/sys/_endian.h:87:53: note: expanded from macro '__swap16'
        (__uint16_t)(__builtin_constant_p(x) ? __swap16gen(x) : __swap16md(x))
                                                           ^
/usr/include/sys/_endian.h:49:65: note: expanded from macro '__swap16gen'
    (__uint16_t)(((__uint16_t)(x) & 0xffU) << 8 | ((__uint16_t)(x) & 0xff00U) >> 8)
                                                                ^
src/common.c:91:31: note: forward declaration of 'struct sockaddr_in'
        return ntohs(((struct sockaddr_in *)sa)->sin_port);
                              ^
src/common.c:91:48: error: incomplete definition of type 'struct sockaddr_in'
        return ntohs(((struct sockaddr_in *)sa)->sin_port);
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~^
/usr/include/sys/endian.h:97:28: note: expanded from macro 'ntohs'
#define ntohs(x)        __htobe16(x)
                                  ^
/usr/include/sys/_endian.h:87:69: note: expanded from macro '__swap16'
        (__uint16_t)(__builtin_constant_p(x) ? __swap16gen(x) : __swap16md(x))
                                                                           ^
src/common.c:91:31: note: forward declaration of 'struct sockaddr_in'
        return ntohs(((struct sockaddr_in *)sa)->sin_port);
                              ^
src/common.c:93:49: error: incomplete definition of type 'struct sockaddr_in6'
        return ntohs(((struct sockaddr_in6 *)sa)->sin6_port);
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/usr/include/sys/endian.h:97:28: note: expanded from macro 'ntohs'
#define ntohs(x)        __htobe16(x)
                                  ^
/usr/include/sys/_endian.h:87:36: note: expanded from macro '__swap16'
        (__uint16_t)(__builtin_constant_p(x) ? __swap16gen(x) : __swap16md(x))
                                          ^
src/common.c:93:31: note: forward declaration of 'struct sockaddr_in6'
        return ntohs(((struct sockaddr_in6 *)sa)->sin6_port);
                              ^
src/common.c:93:49: error: incomplete definition of type 'struct sockaddr_in6'
        return ntohs(((struct sockaddr_in6 *)sa)->sin6_port);
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/usr/include/sys/endian.h:97:28: note: expanded from macro 'ntohs'
#define ntohs(x)        __htobe16(x)
                                  ^
/usr/include/sys/_endian.h:87:53: note: expanded from macro '__swap16'
        (__uint16_t)(__builtin_constant_p(x) ? __swap16gen(x) : __swap16md(x))
                                                           ^
/usr/include/sys/_endian.h:49:32: note: expanded from macro '__swap16gen'
    (__uint16_t)(((__uint16_t)(x) & 0xffU) << 8 | ((__uint16_t)(x) & 0xff00U) >> 8)
                               ^
src/common.c:93:31: note: forward declaration of 'struct sockaddr_in6'
        return ntohs(((struct sockaddr_in6 *)sa)->sin6_port);
                              ^
src/common.c:93:49: error: incomplete definition of type 'struct sockaddr_in6'
        return ntohs(((struct sockaddr_in6 *)sa)->sin6_port);
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/usr/include/sys/endian.h:97:28: note: expanded from macro 'ntohs'
#define ntohs(x)        __htobe16(x)
                                  ^
/usr/include/sys/_endian.h:87:53: note: expanded from macro '__swap16'
        (__uint16_t)(__builtin_constant_p(x) ? __swap16gen(x) : __swap16md(x))
                                                           ^
/usr/include/sys/_endian.h:49:65: note: expanded from macro '__swap16gen'
    (__uint16_t)(((__uint16_t)(x) & 0xffU) << 8 | ((__uint16_t)(x) & 0xff00U) >> 8)
                                                                ^
src/common.c:93:31: note: forward declaration of 'struct sockaddr_in6'
        return ntohs(((struct sockaddr_in6 *)sa)->sin6_port);
                              ^
src/common.c:93:49: error: incomplete definition of type 'struct sockaddr_in6'
        return ntohs(((struct sockaddr_in6 *)sa)->sin6_port);
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/usr/include/sys/endian.h:97:28: note: expanded from macro 'ntohs'
#define ntohs(x)        __htobe16(x)
                                  ^
/usr/include/sys/_endian.h:87:69: note: expanded from macro '__swap16'
        (__uint16_t)(__builtin_constant_p(x) ? __swap16gen(x) : __swap16md(x))
                                                                           ^
src/common.c:93:31: note: forward declaration of 'struct sockaddr_in6'
        return ntohs(((struct sockaddr_in6 *)sa)->sin6_port);
                              ^
src/common.c:100:42: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
gt_toaddr(char *str, size_t size, struct sockaddr *sa)
                                         ^
src/common.c:100:1: error: conflicting types for 'gt_toaddr'
gt_toaddr(char *str, size_t size, struct sockaddr *sa)
^
src/common.h:67:10: note: previous declaration is here
int      gt_toaddr   (char *, size_t, struct sockaddr *);
         ^
src/common.c:105:15: error: incomplete definition of type 'struct sockaddr'
    switch (sa->sa_family) {
            ~~^
src/common.c:100:42: note: forward declaration of 'struct sockaddr'
gt_toaddr(char *str, size_t size, struct sockaddr *sa)
                                         ^
src/common.c:108:44: error: incomplete definition of type 'struct sockaddr_in'
                &((struct sockaddr_in *)sa)->sin_addr, str, (socklen_t)size);
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~^
src/common.c:108:27: note: forward declaration of 'struct sockaddr_in'
                &((struct sockaddr_in *)sa)->sin_addr, str, (socklen_t)size);
                          ^
src/common.c:107:28: error: use of undeclared identifier 'AF_INET'
        return -!inet_ntop(AF_INET,
                           ^
src/common.c:111:45: error: incomplete definition of type 'struct sockaddr_in6'
                &((struct sockaddr_in6 *)sa)->sin6_addr, str, (socklen_t)size);
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
src/common.c:111:27: note: forward declaration of 'struct sockaddr_in6'
                &((struct sockaddr_in6 *)sa)->sin6_addr, str, (socklen_t)size);
                          ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
6 warnings and 20 errors generated.
In file included from src/show.c:1:
src/common.h:65:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
void     gt_set_port (struct sockaddr *, uint16_t);
                             ^
src/common.h:66:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
uint16_t gt_get_port (struct sockaddr *);
                             ^
src/common.h:67:46: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
int      gt_toaddr   (char *, size_t, struct sockaddr *);
                                             ^
src/show.c:22:35: warning: incompatible pointer types passing 'struct sockaddr *' to parameter of type 'struct sockaddr *' [-Wincompatible-pointer-types]
    gt_toaddr(addr, sizeof(addr), (struct sockaddr *)ss);
                                  ^~~~~~~~~~~~~~~~~~~~~
src/common.h:67:56: note: passing argument to parameter here
int      gt_toaddr   (char *, size_t, struct sockaddr *);
                                                       ^
src/show.c:32:24: warning: incompatible pointer types passing 'struct sockaddr *' to parameter of type 'struct sockaddr *' [-Wincompatible-pointer-types]
           gt_get_port((struct sockaddr *)ss));
                       ^~~~~~~~~~~~~~~~~~~~~
src/common.h:66:40: note: passing argument to parameter here
uint16_t gt_get_port (struct sockaddr *);
                                       ^
src/show.c:67:15: warning: incompatible pointer types passing 'struct sockaddr *' to parameter of type 'struct sockaddr *' [-Wincompatible-pointer-types]
              (struct sockaddr *)&res.status.bind);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common.h:67:56: note: passing argument to parameter here
int      gt_toaddr   (char *, size_t, struct sockaddr *);
                                                       ^
src/show.c:70:28: warning: incompatible pointer types passing 'struct sockaddr *' to parameter of type 'struct sockaddr *' [-Wincompatible-pointer-types]
                           (struct sockaddr *)&res.status.peer);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common.h:67:56: note: passing argument to parameter here
int      gt_toaddr   (char *, size_t, struct sockaddr *);
                                                       ^
src/show.c:89:28: warning: incompatible pointer types passing 'struct sockaddr *' to parameter of type 'struct sockaddr *' [-Wincompatible-pointer-types]
               gt_get_port((struct sockaddr *)&res.status.bind),
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common.h:66:40: note: passing argument to parameter here
uint16_t gt_get_port (struct sockaddr *);
                                       ^
src/show.c:109:28: warning: incompatible pointer types passing 'struct sockaddr *' to parameter of type 'struct sockaddr *' [-Wincompatible-pointer-types]
               gt_get_port((struct sockaddr *)&res.status.bind),
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common.h:66:40: note: passing argument to parameter here
uint16_t gt_get_port (struct sockaddr *);
                                       ^
src/show.c:111:28: warning: incompatible pointer types passing 'struct sockaddr *' to parameter of type 'struct sockaddr *' [-Wincompatible-pointer-types]
               gt_get_port((struct sockaddr *)&res.status.peer),
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/common.h:66:40: note: passing argument to parameter here
uint16_t gt_get_port (struct sockaddr *);
                                       ^
10 warnings generated.
In file included from src/tun.c:1:
src/common.h:65:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
void     gt_set_port (struct sockaddr *, uint16_t);
                             ^
src/common.h:66:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
uint16_t gt_get_port (struct sockaddr *);
                             ^
src/common.h:67:46: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
int      gt_toaddr   (char *, size_t, struct sockaddr *);
                                             ^
src/tun.c:141:17: error: use of undeclared identifier 'tmp'
    return open(tmp, O_RDWR);
                ^
3 warnings and 1 error generated.
gmake: *** [Makefile:23: glorytun] Error 1

Meson/Ninja attempt:

host$ meson build
The Meson build system
Version: 0.51.2
Source dir: /home/vifino/src/glorytun-stable
Build dir: /home/vifino/src/glorytun-stable/build
Build type: native build
Project name: glorytun
Project version: 0.3.1
Appending LDFLAGS from environment: '-L/usr/local/lib'
Appending CPPFLAGS from environment: '-I/usr/local/include'
Appending LDFLAGS from environment: '-L/usr/local/lib'
Appending CPPFLAGS from environment: '-I/usr/local/include'
C compiler for the host machine: cc (clang 8.0.1 "OpenBSD clang version 8.0.1 (tags/RELEASE_801/final) (based on LLVM 8.0.1)")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Run-time dependency libsodium found: YES 1.0.18
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency systemd found: NO (tried pkgconfig and cmake)
Build targets in project: 1
Found ninja-1.9.0 at /usr/local/bin/ninja
host$ cd build
host$ ninja
[1/15] Compiling C object 'glorytun@exe/src_common.c.o'.
FAILED: glorytun@exe/src_common.c.o
cc -Iglorytun@exe -I. -I.. -I/usr/local/include -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O2 -g '-DPACKAGE_VERSION="0.3.1"' '-DPACKAGE_NAME="glorytun"' -MD -MQ 'glorytun@exe/src_common.c.o' -MF 'glorytun@exe/src_common.c.o.d' -o 'glorytun@exe/src_common.c.o' -c ../src/common.c
In file included from ../src/common.c:1:
../src/common.h:65:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
void     gt_set_port (struct sockaddr *, uint16_t);
                             ^
../src/common.h:66:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
uint16_t gt_get_port (struct sockaddr *);
                             ^
../src/common.h:67:46: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
int      gt_toaddr   (char *, size_t, struct sockaddr *);
                                             ^
../src/common.c:74:20: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
gt_set_port(struct sockaddr *sa, uint16_t port)
                   ^
../src/common.c:74:1: error: conflicting types for 'gt_set_port'
gt_set_port(struct sockaddr *sa, uint16_t port)
^
../src/common.h:65:10: note: previous declaration is here
void     gt_set_port (struct sockaddr *, uint16_t);
         ^
../src/common.c:76:15: error: incomplete definition of type 'struct sockaddr'
    switch (sa->sa_family) {
            ~~^
../src/common.c:74:20: note: forward declaration of 'struct sockaddr'
gt_set_port(struct sockaddr *sa, uint16_t port)
                   ^
../src/common.c:78:35: error: incomplete definition of type 'struct sockaddr_in'
        ((struct sockaddr_in *)sa)->sin_port = htons(port);
        ~~~~~~~~~~~~~~~~~~~~~~~~~~^
../src/common.c:78:18: note: forward declaration of 'struct sockaddr_in'
        ((struct sockaddr_in *)sa)->sin_port = htons(port);
                 ^
../src/common.c:81:36: error: incomplete definition of type 'struct sockaddr_in6'
        ((struct sockaddr_in6 *)sa)->sin6_port = htons(port);
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
../src/common.c:81:18: note: forward declaration of 'struct sockaddr_in6'
        ((struct sockaddr_in6 *)sa)->sin6_port = htons(port);
                 ^
../src/common.c:87:20: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
gt_get_port(struct sockaddr *sa)
                   ^
../src/common.c:87:1: error: conflicting types for 'gt_get_port'
gt_get_port(struct sockaddr *sa)
^
../src/common.h:66:10: note: previous declaration is here
uint16_t gt_get_port (struct sockaddr *);
         ^
../src/common.c:89:15: error: incomplete definition of type 'struct sockaddr'
    switch (sa->sa_family) {
            ~~^
../src/common.c:87:20: note: forward declaration of 'struct sockaddr'
gt_get_port(struct sockaddr *sa)
                   ^
../src/common.c:91:48: error: incomplete definition of type 'struct sockaddr_in'
        return ntohs(((struct sockaddr_in *)sa)->sin_port);
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~^
/usr/include/sys/endian.h:97:28: note: expanded from macro 'ntohs'
#define ntohs(x)        __htobe16(x)
                                  ^
/usr/include/sys/_endian.h:87:36: note: expanded from macro '__swap16'
        (__uint16_t)(__builtin_constant_p(x) ? __swap16gen(x) : __swap16md(x))
                                          ^
../src/common.c:91:31: note: forward declaration of 'struct sockaddr_in'
        return ntohs(((struct sockaddr_in *)sa)->sin_port);
                              ^
../src/common.c:91:48: error: incomplete definition of type 'struct sockaddr_in'
        return ntohs(((struct sockaddr_in *)sa)->sin_port);
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~^
/usr/include/sys/endian.h:97:28: note: expanded from macro 'ntohs'
#define ntohs(x)        __htobe16(x)
                                  ^
/usr/include/sys/_endian.h:87:53: note: expanded from macro '__swap16'
        (__uint16_t)(__builtin_constant_p(x) ? __swap16gen(x) : __swap16md(x))
                                                           ^
/usr/include/sys/_endian.h:49:32: note: expanded from macro '__swap16gen'
    (__uint16_t)(((__uint16_t)(x) & 0xffU) << 8 | ((__uint16_t)(x) & 0xff00U) >> 8)
                               ^
../src/common.c:91:31: note: forward declaration of 'struct sockaddr_in'
        return ntohs(((struct sockaddr_in *)sa)->sin_port);
                              ^
../src/common.c:91:48: error: incomplete definition of type 'struct sockaddr_in'
        return ntohs(((struct sockaddr_in *)sa)->sin_port);
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~^
/usr/include/sys/endian.h:97:28: note: expanded from macro 'ntohs'
#define ntohs(x)        __htobe16(x)
                                  ^
/usr/include/sys/_endian.h:87:53: note: expanded from macro '__swap16'
        (__uint16_t)(__builtin_constant_p(x) ? __swap16gen(x) : __swap16md(x))
                                                           ^
/usr/include/sys/_endian.h:49:65: note: expanded from macro '__swap16gen'
    (__uint16_t)(((__uint16_t)(x) & 0xffU) << 8 | ((__uint16_t)(x) & 0xff00U) >> 8)
                                                                ^
../src/common.c:91:31: note: forward declaration of 'struct sockaddr_in'
        return ntohs(((struct sockaddr_in *)sa)->sin_port);
                              ^
../src/common.c:91:48: error: incomplete definition of type 'struct sockaddr_in'
        return ntohs(((struct sockaddr_in *)sa)->sin_port);
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~^
/usr/include/sys/endian.h:97:28: note: expanded from macro 'ntohs'
#define ntohs(x)        __htobe16(x)
                                  ^
/usr/include/sys/_endian.h:87:69: note: expanded from macro '__swap16'
        (__uint16_t)(__builtin_constant_p(x) ? __swap16gen(x) : __swap16md(x))
                                                                           ^
../src/common.c:91:31: note: forward declaration of 'struct sockaddr_in'
        return ntohs(((struct sockaddr_in *)sa)->sin_port);
                              ^
../src/common.c:93:49: error: incomplete definition of type 'struct sockaddr_in6'
        return ntohs(((struct sockaddr_in6 *)sa)->sin6_port);
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/usr/include/sys/endian.h:97:28: note: expanded from macro 'ntohs'
#define ntohs(x)        __htobe16(x)
                                  ^
/usr/include/sys/_endian.h:87:36: note: expanded from macro '__swap16'
        (__uint16_t)(__builtin_constant_p(x) ? __swap16gen(x) : __swap16md(x))
                                          ^
../src/common.c:93:31: note: forward declaration of 'struct sockaddr_in6'
        return ntohs(((struct sockaddr_in6 *)sa)->sin6_port);
                              ^
../src/common.c:93:49: error: incomplete definition of type 'struct sockaddr_in6'
        return ntohs(((struct sockaddr_in6 *)sa)->sin6_port);
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/usr/include/sys/endian.h:97:28: note: expanded from macro 'ntohs'
#define ntohs(x)        __htobe16(x)
                                  ^
/usr/include/sys/_endian.h:87:53: note: expanded from macro '__swap16'
        (__uint16_t)(__builtin_constant_p(x) ? __swap16gen(x) : __swap16md(x))
                                                           ^
/usr/include/sys/_endian.h:49:32: note: expanded from macro '__swap16gen'
    (__uint16_t)(((__uint16_t)(x) & 0xffU) << 8 | ((__uint16_t)(x) & 0xff00U) >> 8)
                               ^
../src/common.c:93:31: note: forward declaration of 'struct sockaddr_in6'
        return ntohs(((struct sockaddr_in6 *)sa)->sin6_port);
                              ^
../src/common.c:93:49: error: incomplete definition of type 'struct sockaddr_in6'
        return ntohs(((struct sockaddr_in6 *)sa)->sin6_port);
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/usr/include/sys/endian.h:97:28: note: expanded from macro 'ntohs'
#define ntohs(x)        __htobe16(x)
                                  ^
/usr/include/sys/_endian.h:87:53: note: expanded from macro '__swap16'
        (__uint16_t)(__builtin_constant_p(x) ? __swap16gen(x) : __swap16md(x))
                                                           ^
/usr/include/sys/_endian.h:49:65: note: expanded from macro '__swap16gen'
    (__uint16_t)(((__uint16_t)(x) & 0xffU) << 8 | ((__uint16_t)(x) & 0xff00U) >> 8)
                                                                ^
../src/common.c:93:31: note: forward declaration of 'struct sockaddr_in6'
        return ntohs(((struct sockaddr_in6 *)sa)->sin6_port);
                              ^
../src/common.c:93:49: error: incomplete definition of type 'struct sockaddr_in6'
        return ntohs(((struct sockaddr_in6 *)sa)->sin6_port);
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/usr/include/sys/endian.h:97:28: note: expanded from macro 'ntohs'
#define ntohs(x)        __htobe16(x)
                                  ^
/usr/include/sys/_endian.h:87:69: note: expanded from macro '__swap16'
        (__uint16_t)(__builtin_constant_p(x) ? __swap16gen(x) : __swap16md(x))
                                                                           ^
../src/common.c:93:31: note: forward declaration of 'struct sockaddr_in6'
        return ntohs(((struct sockaddr_in6 *)sa)->sin6_port);
                              ^
../src/common.c:100:42: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
gt_toaddr(char *str, size_t size, struct sockaddr *sa)
                                         ^
../src/common.c:100:1: error: conflicting types for 'gt_toaddr'
gt_toaddr(char *str, size_t size, struct sockaddr *sa)
^
../src/common.h:67:10: note: previous declaration is here
int      gt_toaddr   (char *, size_t, struct sockaddr *);
         ^
../src/common.c:105:15: error: incomplete definition of type 'struct sockaddr'
    switch (sa->sa_family) {
            ~~^
../src/common.c:100:42: note: forward declaration of 'struct sockaddr'
gt_toaddr(char *str, size_t size, struct sockaddr *sa)
                                         ^
../src/common.c:108:44: error: incomplete definition of type 'struct sockaddr_in'
                &((struct sockaddr_in *)sa)->sin_addr, str, (socklen_t)size);
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~^
../src/common.c:108:27: note: forward declaration of 'struct sockaddr_in'
                &((struct sockaddr_in *)sa)->sin_addr, str, (socklen_t)size);
                          ^
../src/common.c:107:28: error: use of undeclared identifier 'AF_INET'
        return -!inet_ntop(AF_INET,
                           ^
../src/common.c:111:45: error: incomplete definition of type 'struct sockaddr_in6'
                &((struct sockaddr_in6 *)sa)->sin6_addr, str, (socklen_t)size);
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
../src/common.c:111:27: note: forward declaration of 'struct sockaddr_in6'
                &((struct sockaddr_in6 *)sa)->sin6_addr, str, (socklen_t)size);
                          ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
6 warnings and 20 errors generated.
[2/15] Compiling C object 'glorytun@exe/src_tun.c.o'.
FAILED: glorytun@exe/src_tun.c.o
cc -Iglorytun@exe -I. -I.. -I/usr/local/include -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O2 -g '-DPACKAGE_VERSION="0.3.1"' '-DPACKAGE_NAME="glorytun"' -MD -MQ 'glorytun@exe/src_tun.c.o' -MF 'glorytun@exe/src_tun.c.o.d' -o 'glorytun@exe/src_tun.c.o' -c ../src/tun.c
In file included from ../src/tun.c:1:
../src/common.h:65:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
void     gt_set_port (struct sockaddr *, uint16_t);
                             ^
../src/common.h:66:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
uint16_t gt_get_port (struct sockaddr *);
                             ^
../src/common.h:67:46: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
int      gt_toaddr   (char *, size_t, struct sockaddr *);
                                             ^
../src/tun.c:141:17: error: use of undeclared identifier 'tmp'
    return open(tmp, O_RDWR);
                ^
3 warnings and 1 error generated.
[3/15] Compiling C object 'glorytun@exe/src_main.c.o'.
In file included from ../src/main.c:1:
../src/common.h:65:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
void     gt_set_port (struct sockaddr *, uint16_t);
                             ^
../src/common.h:66:30: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
uint16_t gt_get_port (struct sockaddr *);
                             ^
../src/common.h:67:46: warning: declaration of 'struct sockaddr' will not be visible outside of this function [-Wvisibility]
int      gt_toaddr   (char *, size_t, struct sockaddr *);
                                             ^
3 warnings generated.
ninja: build stopped: subcommand failed.

Hopefully this is helpful.

Redundant scheduler

Hi!

It would be great to see this (back? i think it once had such mode) in glorytun, maybe as option to choose scheduler?

I use MPTCP for TCP aggregation, almost all high bandwidth transfer go via TCP.

For UDP, almost all data here is time sensitive and for realtime traffic. Since UDP is so little total bandwidth consumption when just using glorytun udp only for udp traffic, a redundant mode make sense. It would give realtime apps 99.99% uptime when dealing with bad links.

Disable encryption

Hi,

Why this request #14 is discarded?

In several scenarios the use of encryption limits the performance. So, have the option for disable it has sense.

Is there any possibility to consider implementing this option?

meson build failed on Debian

The Meson build system
Version: 0.21.0
Source dir: /home/admin/glorytun
Build dir: /home/admin/glorytun/build
Build type: native build

Meson encountered an error in file meson.build, line 14, column 21:
lexer

how to use glorytun

Hi

i try to use glorytun with ubuntu 18 LTS x64 on both client & server (195.245.x.x), and still NO HAVE CONNECT :(

  1. my server use aes but client how i see glorytun output no want use aes and use only chacha20, what i may use chacha20 "cipher" in glorytun server configuration? okey i try version 2.2, 2.1 same things.. i compile, download many pre-compiled version it's all not worked....

  2. tell me please what network interface for run glorytun need to bind on client, i have six ethernet interfaces, 4 lan dhcp in bridge, 2 isp(192.168.1.100 and 192.168.2.100), bridge ip 10.10.10.1, i need run glorytun on bridge or on first isp interface?? please explain

  3. I need to use glorytun multi-path, this is the main thing for what I try to use glorytun, so i have multi nic client configuration how you see with dual isp1, isp2 network connections tell me please path command to add multi path's and control it

P.s. please post the full working configuration for using glorytun with two isp on client and one server, it's very important, your Readme and Wiki is not actual :-(

There may be a issue in the glorytun/src/bind.c.

Hi devs, it may exist underlying memory-leak problem. When I read the file bind.c, I found that it will apply some space by malloc in the line 144. However, when it goes to line 156 and the 'mud' points to null, then the function will return directly not give the 'buf' space back to system. There is also something similar to that in the following lines.

Dynamic rate detection

This is an important feature for LTE links.
Should be delivered in a 0.2.x as the new protocol was designed to do that.

multi cpu/core support

Hello, glorytun currently supports only one core/cpu per process. Which gives me ~220Mbps on 2,1GHz

is a multi-core support introduction planned?

Poblem with mud

Hi
I built glorytun and everything is good and working. Today wanted to test branch mud but it did not work. Does commands in wiki not for "mud" too?!
Thanks

@angt

Add an option to disable encryption?

Hi,

I have been testing glorytun between my laptop and a glinet router (400mhz MIPS atheros), I got 100pc CPU with a throughput of about 2.5MB/sec, which is far from the the 11MB/sec without a tunnel.

Is there a way to disable the encryption? I looked at the code, and there does not seems to be one, but that would be great if you could add such option.

Best,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.