Coder Social home page Coder Social logo

mudler / edgevpn Goto Github PK

View Code? Open in Web Editor NEW
567.0 20.0 82.0 7.39 MB

:sailboat: The immutable, decentralized, statically built p2p VPN without any central server and automatic discovery! Create decentralized introspectable tunnels over p2p with shared tokens

Home Page: https://mudler.github.io/edgevpn

License: Apache License 2.0

Go 70.38% Shell 1.01% HTML 28.39% Dockerfile 0.22%
networking vpn nat tunnel golang golang-library blockchain libp2p p2p holepunch

edgevpn's Introduction


logo
EdgeVPN

Create Decentralized private networks

license go report card


Fully Decentralized. Immutable. Portable. Easy to use Statically compiled VPN and a reverse proxy over p2p.
VPN - Reverse Proxy - Send files securely over p2p - Blockchain

EdgeVPN uses libp2p to build private decentralized networks that can be accessed via shared secrets.

It can:

  • Create a VPN : Secure VPN between p2p peers

    • Automatically assign IPs to nodes
    • Embedded tiny DNS server to resolve internal/external IPs
    • Create trusted zones to prevent network access if token is leaked
  • Act as a reverse Proxy : Share a tcp service like you would do with ngrok. EdgeVPN let expose TCP services to the p2p network nodes without establishing a VPN connection: creates reverse proxy and tunnels traffic into the p2p network.

  • Send files via p2p : Send files over p2p between nodes without establishing a VPN connection.

  • Be used as a library: Plug a distributed p2p ledger easily in your golang code!

See the documentation.

πŸ“· Screenshots

Dashboard (Dark mode) Dashboard (Light mode)
Screenshot 2021-10-31 at 00-12-16 EdgeVPN - Machines index Screenshot 2021-10-31 at 23-03-26 EdgeVPN - Machines index
DNS Machine index
Screenshot 2021-10-31 at 23-03-44 EdgeVPN - Services index Screenshot 2021-10-31 at 23-03-59 EdgeVPN - Files index
Services Blockchain index
Screenshot 2021-10-31 at 23-04-12 EdgeVPN - Users connected Screenshot 2021-10-31 at 23-04-20 EdgeVPN - Blockchain index

πŸ†• GUI

A Desktop GUI application (alpha) for Linux is available here

Dashboard Connections index
edgevpn-gui-2 edgevpn-3
edgevpn-gui

Kubernetes

Check out c3os for seeing EdgeVPN in action with Kubernetes!

πŸƒ Installation

Download the precompiled static release in the releases page. You can either install it in your system or just run it.

πŸ’» Usage

EdgeVPN works by generating tokens (or a configuration file) that can be shared between different machines, hosts or peers to access to a decentralized secured network between them.

Every token is unique and identifies the network, no central server setup, or specifying hosts ip is required.

To generate a config run:

# Generate a new config file and use it later as EDGEVPNCONFIG
$ edgevpn -g > config.yaml

OR to generate a portable token:

$ EDGEVPNTOKEN=$(edgevpn -g -b)

Note, tokens are config merely encoded in base64, so this is equivalent:

$ EDGEVPNTOKEN=$(edgevpn -g | tee config.yaml | base64 -w0)

All edgevpn commands implies that you either specify a EDGEVPNTOKEN (or --token as parameter) or a EDGEVPNCONFIG as this is the way for edgevpn to establish a network between the nodes.

The configuration file is the network definition and allows you to connect over to your peers securely.

Warning Exposing this file or passing-it by is equivalent to give full control to the network.

πŸ“‘ As a VPN

To start the VPN, simply run edgevpn without any argument.

An example of running edgevpn on multiple hosts:

# on Node A
$ EDGEVPNTOKEN=.. edgevpn --address 10.1.0.11/24
# on Node B
$ EDGEVPNTOKEN=.. edgevpn --address 10.1.0.12/24
# on Node C ...
$ EDGEVPNTOKEN=.. edgevpn --address 10.1.0.13/24
...

... and that's it! the --address is a virtual unique IP for each node, and it is actually the ip where the node will be reachable to from the vpn. You can assign IPs freely to the nodes of the network, while you can override the default edgevpn0 interface with IFACE (or --interface)

Note: It might take up time to build the connection between nodes. Wait at least 5 mins, it depends on the network behind the hosts.

❓ Is it for me?

EdgeVPN makes VPN decentralization a first strong requirement.

Its main use is for edge and low-end devices and especially for development.

The decentralized approach has few cons:

  • The underlying network is chatty. It uses a Gossip protocol for synchronizing the routing table and p2p. Every blockchain message is broadcasted to all peers, while the traffic is to the host only.
  • Might be not suited for low latency workload.

Keep that in mind before using it for your prod networks!

But it has a strong pro: it just works everywhere libp2p works!

❓ Why?

First of all it's my first experiment with libp2p. Second, I always wanted a more "open" ngrok alternative, but I always prefer to have "less infra" as possible to maintain. That's why building something like this on top of libp2p makes sense.

⚠️ Warning!

I'm not a security expert, and this software didn't went through a full security audit, so don't use and rely on it for sensible traffic and not even for production environment! I did this mostly for fun while I was experimenting with libp2p.

Example use case: network-decentralized k3s test cluster

Let's see a practical example, you are developing something for kubernetes and you want to try a multi-node setup, but you have machines available that are only behind NAT (pity!) and you would really like to leverage HW.

If you are not really interested in network performance (again, that's for development purposes only!) then you could use edgevpn + k3s in this way:

  1. Generate edgevpn config: edgevpn -g > vpn.yaml

  2. Start the vpn:

    on node A: sudo IFACE=edgevpn0 ADDRESS=10.1.0.3/24 EDGEVPNCONFIG=vpn.yml edgevpn

    on node B: sudo IFACE=edgevpn0 ADDRESS=10.1.0.4/24 EDGEVPNCONFIG=vpm.yml edgevpn

  3. Start k3s:

    on node A: k3s server --flannel-iface=edgevpn0

    on node B: K3S_URL=https://10.1.0.3:6443 K3S_TOKEN=xx k3s agent --flannel-iface=edgevpn0 --node-ip 10.1.0.4

We have used flannel here, but other CNI should work as well.

πŸ““ As a library

EdgeVPN can be used as a library. It is very portable and offers a functional interface.

To join a node in a network from a token, without starting the vpn:

import (
    node "github.com/mudler/edgevpn/pkg/node"
)

e := node.New(
    node.Logger(l),
    node.LogLevel(log.LevelInfo),
    node.MaxMessageSize(2 << 20),
    node.FromBase64( mDNSEnabled, DHTEnabled, token ),
    // ....
  )

e.Start(ctx)

or to start a VPN:

import (
    vpn "github.com/mudler/edgevpn/pkg/vpn"
    node "github.com/mudler/edgevpn/pkg/node"
)

opts, err := vpn.Register(vpnOpts...)
if err != nil {
	return err
}

e := edgevpn.New(append(o, opts...)...)

e.Start(ctx)

πŸ§‘β€πŸ’» Projects using EdgeVPN

  • Kairos - creates Kubernetes clusters with K3s automatically using EdgeVPN networks

🐜 Contribution

You can improve this project by contributing in following ways:

  • report bugs
  • fix issues
  • request features
  • asking questions (just open an issue)

and any other way if not mentioned here.

πŸ““ Credits

πŸ““ Troubleshooting

If during bootstrap you see messages like:

edgevpn[3679]:             * [/ip4/104.131.131.82/tcp/4001] failed to negotiate stream multiplexer: context deadline exceeded     

or

edgevpn[9971]: 2021/12/16 20:56:34 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size for details.

or generally experiencing poor network performance, it is recommended to increase the maximum buffer size by running:

sysctl -w net.core.rmem_max=2500000

πŸ““ TODO

  • VPN
  • Send and receive files via p2p
  • Expose remote/local services via p2p tunnelling
  • Store arbitrary data on the blockchain
  • Allow to persist blockchain on disk

πŸ““ LICENSE

Apache License v2.

edgevpn  Copyright (C) 2021 Ettore Di Giacinto
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions.

edgevpn's People

Contributors

benjisho avatar dukzcry avatar mauromorales avatar mudler avatar omahs avatar oz123 avatar renovate[bot] avatar tomtom5152 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

edgevpn's Issues

EdgeVPN proxy does not work.

For the public network node:
EDGEVPNCONFIG=./config.yaml ./edgevpn

{"level":"INFO","time":"2024-03-28T17:03:07.275+0800","caller":"node/node.go:172","message":" Node ID: 12D3KooWRUZM7ggbvmd5DQuAXkcxBXvwbMm7kWgMfaED4jwUNP3Z"}
/ip6/::1/udp/41864/quic-v1]"}
{"level":"INFO","time":"2024-03-28T17:03:07.283+0800","caller":"discovery/dht.go:104","message":" Bootstrapping DHT"}
For client A in the local network:
EDGEVPNCONFIG=./config.yaml ./edgevpn --address 10.1.0.14/24 --autorelay --autorelay-static-peer 12D3KooWRUZM7ggbvmd5DQuAXkcxBXvwbMm7kWgMfaED4jwUNP3Z
For client B in the local network:
EDGEVPNCONFIG=./config.yaml ./edgevpn --address 10.1.0.13/24 --autorelay --autorelay-static-peer 12D3KooWRUZM7ggbvmd5DQuAXkcxBXvwbMm7kWgMfaED4jwUNP3Z
Yet, when trying to ping client B from client A:
^Croot@armbian:~/edgevpn# ping 10.1.0.14
PING 10.1.0.14 (10.1.0.14): 56 data bytes timeout

panic: runtime error: invalid memory address or nil pointer dereference

./edgevpn api

command throws out some error.
another issue, it is fine (not always) to create a NIC on a physical Ubuntu box, but not on a vm and rasberry PI.

EDGEVPNTOKEN=$EDGEVPNTOKEN ./edgevpn --address 10.1.0.11/24

root@ostella-18:/box/vpn/edgevpn# ./edgevpn
INFO edgevpn Copyright (C) 2021-2022 Ettore Di Giacinto
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions.
INFO Version: commit:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xd0767f]

goroutine 1 [running]:
github.com/mudler/edgevpn/pkg/blockchain.(*Ledger).newGenesis(0xc000960d50)
github.com/mudler/edgevpn/pkg/blockchain/ledger.go:60 +0x15f
github.com/mudler/edgevpn/pkg/blockchain.New(...)
github.com/mudler/edgevpn/pkg/blockchain/ledger.go:52
github.com/mudler/edgevpn/pkg/node.(*Node).Ledger(0xc0002c0fc0)
github.com/mudler/edgevpn/pkg/node/node.go:85 +0x17a
github.com/mudler/edgevpn/pkg/node.(*Node).Start(0xc0002c0fc0, {0x152baf0, 0xc000146350})
github.com/mudler/edgevpn/pkg/node/node.go:92 +0x46
github.com/mudler/edgevpn/cmd.Main.func1(0xc0002be840)
github.com/mudler/edgevpn/cmd/main.go:196 +0xbaf
github.com/urfave/cli.HandleAction({0xefd3a0, 0x14033e0}, 0xc0002c0e00)
github.com/urfave/[email protected]/app.go:524 +0xa8
github.com/urfave/cli.(*App).Run(0xc0002c0e00, {0xc0001181e0, 0x1, 0x1})
github.com/urfave/[email protected]/app.go:286 +0x625
main.main()
github.com/mudler/edgevpn/main.go:50 +0x5a5

panic with DHCP

Hi @mudler!
I have an issue I see randomly on peers when using DHCP feature

ноя 26 14:22:35 si-ni-tsin jajykimzibnqvw4b7qwjmxmh8b2142lk-edgevpn[197342]: {"level":"DEBUG","time":"2022-11-26T14:22:35.984+0300","caller":"vpn/dhcp.go:83","message":"12D3KooWBVp3ogQY8itAbmJCLuDt8vaoCMwf8QVetUB4ZAEmPCPP uses 10.0.1.1\n"}
ноя 26 14:22:35 si-ni-tsin jajykimzibnqvw4b7qwjmxmh8b2142lk-edgevpn[197342]: {"level":"DEBUG","time":"2022-11-26T14:22:35.984+0300","caller":"vpn/dhcp.go:83","message":"12D3KooWNVqBVGt63AUq6VoVQZ1hTTdZ7MYyqDAkgGVmEPBoqidG uses 10.0.1.2\n"}
ноя 26 14:22:35 si-ni-tsin jajykimzibnqvw4b7qwjmxmh8b2142lk-edgevpn[197342]: panic: runtime error: index out of range [0] with length 0
ноя 26 14:22:35 si-ni-tsin jajykimzibnqvw4b7qwjmxmh8b2142lk-edgevpn[197342]: goroutine 1 [running]:
ноя 26 14:22:35 si-ni-tsin jajykimzibnqvw4b7qwjmxmh8b2142lk-edgevpn[197342]: github.com/mudler/edgevpn/pkg/utils.Leader({0x285f638, 0x0, 0xc003d256c0?})
ноя 26 14:22:35 si-ni-tsin jajykimzibnqvw4b7qwjmxmh8b2142lk-edgevpn[197342]:         github.com/mudler/edgevpn/pkg/utils/leader.go:28 +0x1a5
ноя 26 14:22:35 si-ni-tsin jajykimzibnqvw4b7qwjmxmh8b2142lk-edgevpn[197342]: github.com/mudler/edgevpn/pkg/vpn.DHCPNetworkService.func1({_, _}, {{0xc00081c3c0, 0x20}, {0xc00081c460, 0x20}, {0x0, 0x0, 0x0}, 0x0, ...}, ...)
ноя 26 14:22:35 si-ni-tsin jajykimzibnqvw4b7qwjmxmh8b2142lk-edgevpn[197342]:         github.com/mudler/edgevpn/pkg/vpn/dhcp.go:99 +0x356
ноя 26 14:22:35 si-ni-tsin jajykimzibnqvw4b7qwjmxmh8b2142lk-edgevpn[197342]: github.com/mudler/edgevpn/pkg/node.(*Node).Start(0xc000aa0000, {0x17cbf70, 0xc0000443e0})
ноя 26 14:22:35 si-ni-tsin jajykimzibnqvw4b7qwjmxmh8b2142lk-edgevpn[197342]:         github.com/mudler/edgevpn/pkg/node/node.go:131 +0x2ba
ноя 26 14:22:35 si-ni-tsin jajykimzibnqvw4b7qwjmxmh8b2142lk-edgevpn[197342]: github.com/mudler/edgevpn/cmd.Main.func1(0xc000856160)
ноя 26 14:22:35 si-ni-tsin jajykimzibnqvw4b7qwjmxmh8b2142lk-edgevpn[197342]:         github.com/mudler/edgevpn/cmd/main.go:221 +0xfae
ноя 26 14:22:35 si-ni-tsin jajykimzibnqvw4b7qwjmxmh8b2142lk-edgevpn[197342]: github.com/urfave/cli.HandleAction({0x1098d20?, 0x1635ab8?}, 0xc000840540?)
ноя 26 14:22:35 si-ni-tsin jajykimzibnqvw4b7qwjmxmh8b2142lk-edgevpn[197342]:         github.com/urfave/[email protected]/app.go:524 +0xa8
ноя 26 14:22:35 si-ni-tsin jajykimzibnqvw4b7qwjmxmh8b2142lk-edgevpn[197342]: github.com/urfave/cli.(*App).Run(0xc000840540, {0xc00003c180, 0x3, 0x3})
ноя 26 14:22:35 si-ni-tsin jajykimzibnqvw4b7qwjmxmh8b2142lk-edgevpn[197342]:         github.com/urfave/[email protected]/app.go:286 +0x7d9
ноя 26 14:22:35 si-ni-tsin jajykimzibnqvw4b7qwjmxmh8b2142lk-edgevpn[197342]: main.main()
ноя 26 14:22:35 si-ni-tsin jajykimzibnqvw4b7qwjmxmh8b2142lk-edgevpn[197342]:         github.com/mudler/edgevpn/main.go:52 +0x785
ноя 26 14:22:36 si-ni-tsin systemd[1]: edgevpn.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
ноя 26 14:22:36 si-ni-tsin systemd[1]: edgevpn.service: Failed with result 'exit-code'.
ноя 26 14:22:36 si-ni-tsin systemd[1]: edgevpn.service: Consumed 13.334s CPU time, received 6.0M IP traffic, sent 13.4M IP traffic.

Android support?

Is there a way to run this on an android phone? I'd love to be able to use this on my phone

Intermittent connection drops with Edgevpn 0.10.0/libp2p 0.18.0-rc5 leaves disconnected peers

After about a 30min of usage, I started to notice constants connection drops by peers node. The issue seems to be persisting as connections doesn't seems to be rebuilt between nodes automatically, leaving peers disconnected. the only workaround is restarting the service.

This seems to be tied with the recent libp2p bump to 0.18.0-rc5. I'm not sure if it's due to rsmngr configuration or either something else. I can't still trace it, but this is what I'm seeing now at a behavioral level:

while opening a bunch of multiple streams to a single connection the connection gets eventually killed and seems the node can't recover and connect to it again.

Although this seems to be an issue even with small streams - where I was previously pushing GBs of traffic just fine between nodes, now doesn't hold even for simple http requests.

@vyzo / @marten-seemann sorry guys to ping you directly again, and don't want to sound annoying either. I'm seeing weird issues with 0.18.0 -rc5 here. I'm not sure if it's due to rsmngr configuration or either something else. I can't still trace it and give some helpful debug information, but this is what I'm seeing now at a behavioral level, the effect is quite noticeable.

Be able to pin keys and routing table

It would be nice to support the use case when we want to have everything defined statically by config file from the CLI, such as:

  • static keypair (pub/priv key) to use to advertize and e2e encrypt packets with libp2p
  • static routing table defined by user config file which is used in place of the one distributed by the ledger

In this way we support both scenarios: dynamic (currently) and statically user-defined. Note this is mostly already achievable by API, but currently the CLI lacks such features.

High memory usage.

I run the following command.
./edgevpn --token xxx --address 10.1.0.1/24

After one day, it will cost 1GB of memory. And the memory is keep going up. Is this normal? Thank you.

bandwith usage

Hey,

Thank you for this project. It works like a charm. I am using it to connect my two computers behind firewalls.

However, is it possible to limit bandwidth usage? For example yesterday, localhost:8080 showed that in 7 hours edgevpn downloaded 1 GB and uploaded 0.8 GB, but i did not use edgevpn for anything useful. Of course, for home computers this is not a problem, but for mobile internet this can be a big deal.

What is the use of such additional data? As i understand the architecture: after five minutes or so my computers are connected directly through tcp hole punching(at least this is how syncthing works in my setup). After that, all other connections are needed to search other computers in the edgevpn network, but it is useless in my setup. May i turn it off?

Required ports

Quick question: other than port 8080 for the web interface, what other ports are required to be open for EdgeVPN to work?

Feature request - Could EdgeVPN be enabled to give the User the option to save a New VPN config/token as a /path/File and a cmd switch to tell Edgevpn to read its config/token from /path/file

Since edgevpn Nodes have to share a common config/token it would be very convenient to:

Add to edgevpn for a User to:

  • Generate a new VPN
  • User clicks a button to save the new VPN confiig/token and specifies where to save it and what to call the file.
  • User SCPs the new config/token file to all of the edgevpn Nodes that need to join that VPN

on each Node

  • For edgevpn-ccli add a command option for edgevpn to read its config/token from a file specified by the User
  • For edgevpn-gui the User selects to IMPORT new VPN and gets an additional option enabling specification of a config/token file

Brian

some bugs on v0.17.0 and v0.18.0

I found some problems with the new version of edgevpn, when I run edgevpn for the first time, it will automatically quit, I have to run it a second time before it can run stably. In addition, edgevpn will crash the network card of some other applications that also use the wintun network card driver. I think there may be some bugs in the wintun related code of edgevpn.

Drop otp fork

Drop fork of otp to handle totps.

As the maintainer of otp creachadair/otp#1 was kind to accept the request and provide it directly in the API, we should just consume that and avoid to use the fork with our changes.

This is also problematic as when using edgevpn as a lib the replace is needed, otherwise breaks compilation.

Example Steps to actually run edgevpn using 3 separate servers

I installed edgevpn binary on 3 separate Ubuntu 22.04 machines.

On one of the machines I was trying to follow the edgevpn Documentation but am unsure of these command examples:

An example of running edgevpn on multiple hosts:

# on Node A
$ EDGEVPNTOKEN=.. edgevpn --address 172.16.1.1/12
# on Node B
$ EDGEVPNTOKEN=.. edgevpn --address 172.16.1.2/12
# on Node C ...
$ EDGEVPNTOKEN=.. edgevpn --address 171.16.1.3/12

I thought I'd just create a simple Bash script called startvpn.sh on each Host that looked something like:

#!/bin/bash
EDGEVPNTOKEN=$(edgevpn -g -b)*
edgevpn --address 172.16.1.1/12 --token=$EDGEVPNTOKEN

But my installvpn.sh script does not to work in starting the VPN!

I then saw another Open Issue with the following example commands for starting Edgevpn & I tried them but using slightly modified command and 172.16.x.x IPs and these worked !

on Host 1

$ sudo ./edgevpn --interface edgevpn0 --config config.yaml --address 172.16.1.1/12 --transient-conn &

on Host 2

$ sudo ./edgevpn --interface edgevpn0 --config config.yaml --address 172.16.1.2/12 --transient-conn &

on Host 3

$ sudo ./edgevpn --interface edgevpn0 --config config.yaml --address 172.16.1.3/12 --transient-conn &

thanks
brian

Is it possible to have access levels?

EdgeVPN sounds great on paper for a project of mine in which servers can be added to a network by third-parties - but I wouldn't want those to be able to access the API, I just want to be able to send and receive network requests to/from them.

Is it possible to prevent joiners from having access to the API?

ERROR: Failed to find any peer in table

Somehow I cannot get this work even locally, perhaps I am missing something trivial:

PCA:

tokyo@tokyo-Z87-DS3H:~/edgevpn$ sudo IFACE=edgevpn0 ADDRESS=10.1.0.3/24 EDGEVPNCONFIG=config.yaml ./edgevpn
INFO edgevpn Copyright (C) 2021-2022 Ettore Di Giacinto
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions.
INFO Version: v0.15.3 commit: 9307c34
INFO Starting EdgeVPN network
INFO Node ID: 12D3KooWJmkQSCRmbUBuRMjSe34Ugx51ZgDGkv2AEX62cf1qodVp
INFO Node Addresses: [/ip4/192.168.1.105/tcp/40471 /ip4/127.0.0.1/tcp/40471 /ip6/::1/tcp/32857]
INFO Bootstrapping DHT
ERROR failed to find any peer in table
2022/08/21 13:13:51 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size for details.

PCB:
yoko@yoko:~/edgevpn$ sudo IFACE=edgevpn0 ADDRESS=10.1.0.4/24 EDGEVPNCONFIG=config.yaml ./edgevpn
INFO edgevpn Copyright (C) 2021-2022 Ettore Di Giacinto
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions.
INFO Version: v0.15.3 commit: 9307c34
INFO Starting EdgeVPN network
INFO Node ID: 12D3KooWGUNFWqw6yHug1vSkrue7bWnQukFaU9oJSYDtukPFLFWj
INFO Node Addresses: [/ip4/192.168.1.106/tcp/34943 /ip4/127.0.0.1/tcp/34943 /ip6/::1/tcp/40675]
INFO Bootstrapping DHT
ERROR failed to find any peer in table
2022/08/21 13:14:07 failed to sufficiently increase receive buffer size (was: 160 kiB, wanted: 2048 kiB, got: 320 kiB). See https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size for details.

Prior to these runs I generated the file config.yaml with "edgevpn -g > config.yaml" on PCA and then sent myself this very same config file to PCB via email and copied it into PCB's edgevpn folder from which I run the program (exactly the same config file sits on both PCs).

Both nodes have been running without further progress over 30 minutes. PCB is a very old 2GB RAM 32 bit machine running Ubuntu 18.04 (Mate), while the config I generated on PCA which is 16GB RAM on a 64 bit Ubuntu 22.04.

I might test this with hyprspace and report back. The motivation to use edgevpn over hyprspace was that you provided 32bit binaries, kudos for that, which I could not get for hyprspace, but I will try compiling the latter manually and will report back if there is a progress.

add bootstrap interface config flag

to work in non-privileged mode it is necessary to disable the interface setup

index 91c1bb0..1e69138 100644
--- a/cmd/util.go
+++ b/cmd/util.go
@@ -48,6 +48,11 @@ var CommonFlags []cli.Flag = []cli.Flag{
                EnvVar: "EDGEVPNMTU",
                Value:  1200,
        },
+       &cli.BoolTFlag{
+               Name:   "bootstrap-iface",
+               Usage:  "Setup interface on startup (need privileges)",
+               EnvVar: "BOOTIFACE",
+       },
        &cli.IntFlag{
                Name:   "packet-mtu",
                Usage:  "Specify a mtu",
@@ -326,6 +331,7 @@ func cliToOpts(c *cli.Context) ([]node.Option, []vpn.Option, *logger.Logger) {
                FrameTimeout:      c.String("timeout"),
                ChannelBufferSize: c.Int("channel-buffer-size"),
                InterfaceMTU:      c.Int("mtu"),
+               BootstrapIface:    c.Bool("bootstrap-iface"),
                PacketMTU:         c.Int("packet-mtu"),
                Ledger: config.Ledger{
                        StateDir:         c.String("ledger-state"),
diff --git a/pkg/config/config.go b/pkg/config/config.go
index c24a906..2f5ae91 100644
--- a/pkg/config/config.go
+++ b/pkg/config/config.go
@@ -45,6 +45,7 @@ type Config struct {
        Address                                    string
        Router                                     string
        Interface                                  string
+       BootstrapIface                             bool
        Libp2pLogLevel, LogLevel                   string
        LowProfile, VPNLowProfile                  bool
        Blacklist                                  []string
@@ -178,7 +179,7 @@ func (c Config) ToOpts(l *logger.Logger) ([]node.Option, []vpn.Option, error) {
                vpn.Logger(llger),
                vpn.WithTimeout(c.FrameTimeout),
                vpn.WithInterfaceType(water.TUN),
-               vpn.NetLinkBootstrap(true),
+               vpn.NetLinkBootstrap(c.BootstrapIface),
                vpn.WithChannelBufferSize(c.ChannelBufferSize),
                vpn.WithInterfaceMTU(c.InterfaceMTU),
                vpn.WithPacketMTU(c.PacketMTU),
diff --git a/pkg/vpn/interface.go b/pkg/vpn/interface.go
index afd0718..e969375 100644
--- a/pkg/vpn/interface.go
+++ b/pkg/vpn/interface.go
@@ -25,7 +25,8 @@ import (
 
 func createInterface(c *Config) (*water.Interface, error) {
        config := water.Config{
-               DeviceType: c.DeviceType,
+               DeviceType:             c.DeviceType,
+               PlatformSpecificParams: water.PlatformSpecificParams{Persist: !c.NetLinkBootstrap},
        }
        config.Name = c.InterfaceName
 

Get rid of gosigar/bring back darwin support

The new libp2p update e81901f brought in gosigar, which in turn is not working with darwin. As a workaround I had to disable 65905f5 darwin builds, but previously it was at least building just fine.

This card is to track the regression, and see if we can patch around gosigar to at least make it compatible

poor data transfer speed

Hello
I'm using version 0.25.0 and two servers with Ubuntu 22.04
After establishing a connection between the nodes, I observe a low data transfer speed
I have little experience interacting with libp2p and my tests showed that the speed slowdown does not exceed 15-20% of the channel speed when hosts are connected directly, without relays.
Where the problem could be?

EDGEVPNCONFIG=config.yaml ./edgevpn --address 10.1.0.12/24 --holepunch

Traffic capture using wireshark shows that network packets are sent directly

What blockchain is used?

Is it just a blockchain data structure or does it include PoS or PoW?
What data is stored in the blockchain and why was a blockchain chosen?
How fast does the blockchain grow and can it be deleted?

Program terminates after "timeout: no recent network activity"

sudo IFACE=edgevpn0 ADDRESS=10.1.0.7/24 EDGEVPNCONFIG=config.yaml ./edgevpn --log-level debug

{"level":"INFO","time":"2023-07-16T21:14:35.648+0300","caller":"cmd/util.go:361","message":" \tedgevpn Copyright (C) 2021-2022 Ettore Di Giacinto\nThis program comes with ABSOLUTELY NO WARRANTY.\nThis is free software, and you are welcome to redistribute it\nunder certain conditions."}
{"level":"INFO","time":"2023-07-16T21:14:35.649+0300","caller":"cmd/util.go:363","message":"Version: v0.23.1 commit: 99b768e\n"}
{"level":"INFO","time":"2023-07-16T21:14:35.649+0300","caller":"node/node.go:118","message":" Starting EdgeVPN network"}
{"level":"DEBUG","time":"2023-07-16T21:14:35.663+0300","caller":"node/node.go:154","message":" Generating host data"}
2023/07/16 21:14:35 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Receive-Buffer-Size for details.
{"level":"INFO","time":"2023-07-16T21:14:35.688+0300","caller":"node/node.go:172","message":" Node ID: 12D3KooWMN6g7aXyDS7swwx2hfoPPFbjNpj36NADVJQzehid2Usv"}
{"level":"INFO","time":"2023-07-16T21:14:35.689+0300","caller":"node/node.go:173","message":" Node Addresses: [/ip4/127.0.0.1/tcp/42435 /ip4/127.0.0.1/udp/45993/quic-v1/webtransport/certhash/uEiABXQ05UrrXIJjbgCOsyDb0hsQh03EemayjzahuxjSitw/certhash/uEiD6ANUnuFVQwZU92dFRdYCHgK7weI89InhAybLPYBMJ6g /ip4/127.0.0.1/udp/49236/quic /ip4/127.0.0.1/udp/49236/quic-v1 /ip4/192.168.13.146/tcp/42435 /ip4/192.168.13.146/udp/45993/quic-v1/webtransport/certhash/uEiABXQ05UrrXIJjbgCOsyDb0hsQh03EemayjzahuxjSitw/certhash/uEiD6ANUnuFVQwZU92dFRdYCHgK7weI89InhAybLPYBMJ6g /ip4/192.168.13.146/udp/49236/quic /ip4/192.168.13.146/udp/49236/quic-v1 /ip6/::1/tcp/45349 /ip6/::1/udp/39528/quic-v1/webtransport/certhash/uEiABXQ05UrrXIJjbgCOsyDb0hsQh03EemayjzahuxjSitw/certhash/uEiD6ANUnuFVQwZU92dFRdYCHgK7weI89InhAybLPYBMJ6g /ip6/::1/udp/49235/quic /ip6/::1/udp/49235/quic-v1]"}
{"level":"INFO","time":"2023-07-16T21:14:35.690+0300","caller":"discovery/dht.go:104","message":" Bootstrapping DHT"}
{"level":"DEBUG","time":"2023-07-16T21:14:35.690+0300","caller":"node/node.go:195","message":" Network started"}
{"level":"DEBUG","time":"2023-07-16T21:14:35.902+0300","caller":"discovery/dht.go:149","message":" Connection established with bootstrap node: {QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb: [/dnsaddr/bootstrap.libp2p.io]}"}
{"level":"DEBUG","time":"2023-07-16T21:14:36.115+0300","caller":"discovery/dht.go:149","message":" Connection established with bootstrap node: {QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa: [/dnsaddr/bootstrap.libp2p.io]}"}
{"level":"DEBUG","time":"2023-07-16T21:14:36.165+0300","caller":"discovery/dht.go:149","message":" Connection established with bootstrap node: {QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN: [/dnsaddr/bootstrap.libp2p.io]}"}
{"level":"DEBUG","time":"2023-07-16T21:14:36.566+0300","caller":"discovery/dht.go:149","message":" Connection established with bootstrap node: {QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt: [/dnsaddr/bootstrap.libp2p.io]}"}
{"level":"DEBUG","time":"2023-07-16T21:14:37.520+0300","caller":"discovery/dht.go:149","message":" Connection established with bootstrap node: {QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ: [/ip4/104.131.131.82/tcp/4001]}"}
{"level":"DEBUG","time":"2023-07-16T21:14:37.520+0300","caller":"discovery/dht.go:204","message":" Announcing ourselves..."}
{"level":"DEBUG","time":"2023-07-16T21:14:44.654+0300","caller":"discovery/dht.go:207","message":" Successfully announced!"}
{"level":"DEBUG","time":"2023-07-16T21:14:44.654+0300","caller":"discovery/dht.go:210","message":" Searching for other peers..."}
{"level":"DEBUG","time":"2023-07-16T21:14:44.696+0300","caller":"discovery/dht.go:223","message":" Found peer: {12D3KooWQkcNF85tjvR9hkyp6N33QZdYAQHFLHPzc1PrSX52yNQY: [/ip4/207.246.110.127/tcp/4001/p2p/12D3KooWMPkgD3i4RLWprxSQbSYAVAchJeeYeb5BjF36zAotpZr1/p2p-circuit /ip4/127.0.0.1/udp/32914/quic /ip4/192.168.13.105/udp/32914/quic /ip6/::1/tcp/38221 /ip6/::1/udp/53739/quic /ip4/108.35.98.211/udp/16889/quic-v1/webtransport/certhash/uEiA9YpEMG8QNQEFuNYdZIlIzFSFXFUDyfrO7YJ5z8LN9Jw/certhash/uEiCjBQ78GNIEmxp4PMJcEjRx_NwM1cWkOO84x47Y3SLFug/p2p/12D3KooWNJXFBqbzxesjL6womRwyac5eNwKJzDL7PiHkbyVmaj7z/p2p-circuit /ip4/192.168.13.105/tcp/38851 /ip4/192.168.13.105/udp/32914/quic-v1 /ip4/108.35.98.211/tcp/16889/p2p/12D3KooWNJXFBqbzxesjL6womRwyac5eNwKJzDL7PiHkbyVmaj7z/p2p-circuit /ip4/108.35.98.211/udp/16889/quic-v1/p2p/12D3KooWNJXFBqbzxesjL6womRwyac5eNwKJzDL7PiHkbyVmaj7z/p2p-circuit /ip4/207.246.110.127/udp/4001/quic/p2p/12D3KooWMPkgD3i4RLWprxSQbSYAVAchJeeYeb5BjF36zAotpZr1/p2p-circuit /ip4/127.0.0.1/udp/32914/quic-v1 /ip4/127.0.0.1/udp/51094/quic-v1/webtransport/certhash/uEiBhPaykk2nZApt3bd9sXBDWq30rRuCb3wYUZDkUcnpKMw/certhash/uEiATHCBtdPGcMMWdkf8AEJ13AyZsj0gz5AAy3EbBynW1DA /ip4/192.168.13.105/udp/51094/quic-v1/webtransport/certhash/uEiBhPaykk2nZApt3bd9sXBDWq30rRuCb3wYUZDkUcnpKMw/certhash/uEiATHCBtdPGcMMWdkf8AEJ13AyZsj0gz5AAy3EbBynW1DA /ip6/::1/udp/53739/quic-v1 /ip4/127.0.0.1/tcp/38851 /ip6/::1/udp/59784/quic-v1/webtransport/certhash/uEiBhPaykk2nZApt3bd9sXBDWq30rRuCb3wYUZDkUcnpKMw/certhash/uEiATHCBtdPGcMMWdkf8AEJ13AyZsj0gz5AAy3EbBynW1DA /ip4/207.246.110.127/udp/4001/quic-v1/p2p/12D3KooWMPkgD3i4RLWprxSQbSYAVAchJeeYeb5BjF36zAotpZr1/p2p-circuit]}"}
{"level":"DEBUG","time":"2023-07-16T21:15:07.460+0300","caller":"discovery/dht.go:225","message":" Failed connecting to {12D3KooWQkcNF85tjvR9hkyp6N33QZdYAQHFLHPzc1PrSX52yNQY: [/ip4/207.246.110.127/tcp/4001/p2p/12D3KooWMPkgD3i4RLWprxSQbSYAVAchJeeYeb5BjF36zAotpZr1/p2p-circuit /ip4/127.0.0.1/udp/32914/quic /ip4/192.168.13.105/udp/32914/quic /ip6/::1/tcp/38221 /ip6/::1/udp/53739/quic /ip4/108.35.98.211/udp/16889/quic-v1/webtransport/certhash/uEiA9YpEMG8QNQEFuNYdZIlIzFSFXFUDyfrO7YJ5z8LN9Jw/certhash/uEiCjBQ78GNIEmxp4PMJcEjRx_NwM1cWkOO84x47Y3SLFug/p2p/12D3KooWNJXFBqbzxesjL6womRwyac5eNwKJzDL7PiHkbyVmaj7z/p2p-circuit /ip4/192.168.13.105/tcp/38851 /ip4/192.168.13.105/udp/32914/quic-v1 /ip4/108.35.98.211/tcp/16889/p2p/12D3KooWNJXFBqbzxesjL6womRwyac5eNwKJzDL7PiHkbyVmaj7z/p2p-circuit /ip4/108.35.98.211/udp/16889/quic-v1/p2p/12D3KooWNJXFBqbzxesjL6womRwyac5eNwKJzDL7PiHkbyVmaj7z/p2p-circuit /ip4/207.246.110.127/udp/4001/quic/p2p/12D3KooWMPkgD3i4RLWprxSQbSYAVAchJeeYeb5BjF36zAotpZr1/p2p-circuit /ip4/127.0.0.1/udp/32914/quic-v1 /ip4/127.0.0.1/udp/51094/quic-v1/webtransport/certhash/uEiBhPaykk2nZApt3bd9sXBDWq30rRuCb3wYUZDkUcnpKMw/certhash/uEiATHCBtdPGcMMWdkf8AEJ13AyZsj0gz5AAy3EbBynW1DA /ip4/192.168.13.105/udp/51094/quic-v1/webtransport/certhash/uEiBhPaykk2nZApt3bd9sXBDWq30rRuCb3wYUZDkUcnpKMw/certhash/uEiATHCBtdPGcMMWdkf8AEJ13AyZsj0gz5AAy3EbBynW1DA /ip6/::1/udp/53739/quic-v1 /ip4/127.0.0.1/tcp/38851 /ip6/::1/udp/59784/quic-v1/webtransport/certhash/uEiBhPaykk2nZApt3bd9sXBDWq30rRuCb3wYUZDkUcnpKMw/certhash/uEiATHCBtdPGcMMWdkf8AEJ13AyZsj0gz5AAy3EbBynW1DA /ip4/207.246.110.127/udp/4001/quic-v1/p2p/12D3KooWMPkgD3i4RLWprxSQbSYAVAchJeeYeb5BjF36zAotpZr1/p2p-circuit]}"}
{"level":"DEBUG","time":"2023-07-16T21:15:07.460+0300","caller":"discovery/dht.go:223","message":" Found peer: {12D3KooWGKqjcufab1y5hoh6YbgsvnArgoxHcxgM3fYiS3Pjmqn4: [/ip4/192.168.13.105/udp/51028/quic-v1/webtransport/certhash/uEiAsA3TX4av2nR9fCsA6LIyN1XF4vrX9VJ2BJlW5ZZMmTQ/certhash/uEiCqlloA4Ydo2mTklY_O-wgEIlEkj7d-Skdp1xD1Nx_Z9A /ip4/45.63.86.86/udp/4001/quic/p2p/12D3KooWNtR88ioXqQcuqRYs4WberhAuqXj23MeyAyPjpmLHyqWp/p2p-circuit /ip4/45.32.172.61/udp/4001/quic/p2p/12D3KooWBVb8ke82dS5Hk9FoS5jyQgBwkcnPv6m1Ub7j7ZPhPfVC/p2p-circuit /ip4/192.168.13.105/tcp/39835 /ip4/192.168.13.105/udp/42536/quic /ip6/::1/udp/59577/quic-v1/webtransport/certhash/uEiAsA3TX4av2nR9fCsA6LIyN1XF4vrX9VJ2BJlW5ZZMmTQ/certhash/uEiCqlloA4Ydo2mTklY_O-wgEIlEkj7d-Skdp1xD1Nx_Z9A /ip4/45.63.86.86/tcp/4001/p2p/12D3KooWNtR88ioXqQcuqRYs4WberhAuqXj23MeyAyPjpmLHyqWp/p2p-circuit /ip4/45.32.172.61/tcp/4001/p2p/12D3KooWBVb8ke82dS5Hk9FoS5jyQgBwkcnPv6m1Ub7j7ZPhPfVC/p2p-circuit /ip4/192.168.13.105/udp/42536/quic-v1 /ip6/::1/tcp/45209 /ip4/45.63.86.86/udp/4001/quic-v1/p2p/12D3KooWNtR88ioXqQcuqRYs4WberhAuqXj23MeyAyPjpmLHyqWp/p2p-circuit /ip4/127.0.0.1/tcp/39835 /ip4/127.0.0.1/udp/42536/quic /ip6/::1/udp/33067/quic /ip6/::1/udp/33067/quic-v1 /ip4/45.32.172.61/udp/4001/quic-v1/p2p/12D3KooWBVb8ke82dS5Hk9FoS5jyQgBwkcnPv6m1Ub7j7ZPhPfVC/p2p-circuit /ip4/127.0.0.1/udp/42536/quic-v1 /ip4/127.0.0.1/udp/51028/quic-v1/webtransport/certhash/uEiAsA3TX4av2nR9fCsA6LIyN1XF4vrX9VJ2BJlW5ZZMmTQ/certhash/uEiCqlloA4Ydo2mTklY_O-wgEIlEkj7d-Skdp1xD1Nx_Z9A]}"}

...

{"level":"DEBUG","time":"2023-07-16T23:51:21.685+0300","caller":"discovery/dht.go:223","message":" Found peer: {12D3KooWHD4TCEyafxzda9H3rooNwraPnZFCJfJngHaUktU3NAYA: [/ip4/127.0.0.1/tcp/40061 /ip4/127.0.0.1/udp/35008/quic-v1/webtransport/certhash/uEiBamcm0uMnwHUlB8lotCZ1LaNH8gWqgnZhDI8Ecv8SReg/certhash/uEiDeuCP0iG6_dRw-Omh_8GMGF0k5t_OiyQKkkedKNrjk0Q /ip4/192.168.8.109/tcp/40061 /ip6/::1/udp/43490/quic /ip6/::1/udp/43490/quic-v1 /ip4/104.238.187.126/udp/4001/quic/p2p/12D3KooWF6asfk6suLodGAHqA3KnUKdDEWE7ommSaNdV7tTyvbpe/p2p-circuit /ip4/154.53.60.79/udp/4001/quic/p2p/12D3KooWFy5AxPyrrDxDkgiZxgdLmStkogxUt2M9WsXW16b6kjNN/p2p-circuit /ip4/192.168.8.109/udp/60081/quic-v1 /ip6/::1/tcp/35681 /ip4/154.53.60.79/tcp/4001/p2p/12D3KooWFy5AxPyrrDxDkgiZxgdLmStkogxUt2M9WsXW16b6kjNN/p2p-circuit /ip4/154.53.60.79/udp/4001/quic-v1/p2p/12D3KooWFy5AxPyrrDxDkgiZxgdLmStkogxUt2M9WsXW16b6kjNN/p2p-circuit /ip4/127.0.0.1/udp/60081/quic /ip4/127.0.0.1/udp/60081/quic-v1 /ip4/192.168.8.109/udp/35008/quic-v1/webtransport/certhash/uEiBamcm0uMnwHUlB8lotCZ1LaNH8gWqgnZhDI8Ecv8SReg/certhash/uEiDeuCP0iG6_dRw-Omh_8GMGF0k5t_OiyQKkkedKNrjk0Q /ip6/::1/udp/54679/quic-v1/webtransport/certhash/uEiBamcm0uMnwHUlB8lotCZ1LaNH8gWqgnZhDI8Ecv8SReg/certhash/uEiDeuCP0iG6_dRw-Omh_8GMGF0k5t_OiyQKkkedKNrjk0Q /ip4/104.238.187.126/udp/4001/quic-v1/p2p/12D3KooWF6asfk6suLodGAHqA3KnUKdDEWE7ommSaNdV7tTyvbpe/p2p-circuit /ip4/104.238.187.126/tcp/4001/p2p/12D3KooWF6asfk6suLodGAHqA3KnUKdDEWE7ommSaNdV7tTyvbpe/p2p-circuit /ip4/192.168.8.109/udp/60081/quic]}"}
{"level":"DEBUG","time":"2023-07-16T23:51:30.181+0300","caller":"discovery/dht.go:225","message":" Failed connecting to {12D3KooWHD4TCEyafxzda9H3rooNwraPnZFCJfJngHaUktU3NAYA: [/ip4/127.0.0.1/tcp/40061 /ip4/127.0.0.1/udp/35008/quic-v1/webtransport/certhash/uEiBamcm0uMnwHUlB8lotCZ1LaNH8gWqgnZhDI8Ecv8SReg/certhash/uEiDeuCP0iG6_dRw-Omh_8GMGF0k5t_OiyQKkkedKNrjk0Q /ip4/192.168.8.109/tcp/40061 /ip6/::1/udp/43490/quic /ip6/::1/udp/43490/quic-v1 /ip4/104.238.187.126/udp/4001/quic/p2p/12D3KooWF6asfk6suLodGAHqA3KnUKdDEWE7ommSaNdV7tTyvbpe/p2p-circuit /ip4/154.53.60.79/udp/4001/quic/p2p/12D3KooWFy5AxPyrrDxDkgiZxgdLmStkogxUt2M9WsXW16b6kjNN/p2p-circuit /ip4/192.168.8.109/udp/60081/quic-v1 /ip6/::1/tcp/35681 /ip4/154.53.60.79/tcp/4001/p2p/12D3KooWFy5AxPyrrDxDkgiZxgdLmStkogxUt2M9WsXW16b6kjNN/p2p-circuit /ip4/154.53.60.79/udp/4001/quic-v1/p2p/12D3KooWFy5AxPyrrDxDkgiZxgdLmStkogxUt2M9WsXW16b6kjNN/p2p-circuit /ip4/127.0.0.1/udp/60081/quic /ip4/127.0.0.1/udp/60081/quic-v1 /ip4/192.168.8.109/udp/35008/quic-v1/webtransport/certhash/uEiBamcm0uMnwHUlB8lotCZ1LaNH8gWqgnZhDI8Ecv8SReg/certhash/uEiDeuCP0iG6_dRw-Omh_8GMGF0k5t_OiyQKkkedKNrjk0Q /ip6/::1/udp/54679/quic-v1/webtransport/certhash/uEiBamcm0uMnwHUlB8lotCZ1LaNH8gWqgnZhDI8Ecv8SReg/certhash/uEiDeuCP0iG6_dRw-Omh_8GMGF0k5t_OiyQKkkedKNrjk0Q /ip4/104.238.187.126/udp/4001/quic-v1/p2p/12D3KooWF6asfk6suLodGAHqA3KnUKdDEWE7ommSaNdV7tTyvbpe/p2p-circuit /ip4/104.238.187.126/tcp/4001/p2p/12D3KooWF6asfk6suLodGAHqA3KnUKdDEWE7ommSaNdV7tTyvbpe/p2p-circuit /ip4/192.168.8.109/udp/60081/quic]}"}
{"level":"DEBUG","time":"2023-07-16T23:51:42.448+0300","caller":"discovery/dht.go:204","message":" Announcing ourselves..."}
{"level":"DEBUG","time":"2023-07-16T23:51:46.709+0300","caller":"discovery/dht.go:207","message":" Successfully announced!"}
{"level":"DEBUG","time":"2023-07-16T23:51:46.709+0300","caller":"discovery/dht.go:210","message":" Searching for other peers..."}
{"level":"DEBUG","time":"2023-07-16T23:51:46.768+0300","caller":"discovery/dht.go:223","message":" Found peer: {12D3KooWL7XFd2KPiYbvNJMxjZwqtkbeBSG6rnR8tGUvbJxdJFZj: [/ip4/161.97.103.8/tcp/4001/p2p/12D3KooWNLxpb8ufYRXTvkUB91VPww4k7y1YBaVeEJRjGDX8ocW1/p2p-circuit /ip4/127.0.0.1/tcp/43601 /ip4/127.0.0.1/udp/38462/quic /ip4/192.168.8.109/tcp/43601 /ip6/::1/udp/40329/quic /ip6/::1/udp/59774/quic-v1/webtransport/certhash/uEiAURErl2a5kD81f7qwuGUA5apTE8lzm6ujU0yrdXS0SBw/certhash/uEiBfisE5y3VroKsi5t-ic0OJQXPSqrjqtkfYzWtHe7Ukeg /ip4/127.0.0.1/udp/55473/quic-v1/webtransport/certhash/uEiAURErl2a5kD81f7qwuGUA5apTE8lzm6ujU0yrdXS0SBw/certhash/uEiBfisE5y3VroKsi5t-ic0OJQXPSqrjqtkfYzWtHe7Ukeg /ip4/192.168.8.109/udp/38462/quic-v1 /ip6/::1/tcp/41077 /ip4/192.168.8.109/udp/38462/quic /ip4/54.39.17.76/udp/4001/quic-v1/p2p/12D3KooWLgLY5EpNKg49p2KMCx9mszFoGPFEJ8x44wBdmZwsNEz4/p2p-circuit /ip4/161.97.103.8/udp/4001/quic/p2p/12D3KooWNLxpb8ufYRXTvkUB91VPww4k7y1YBaVeEJRjGDX8ocW1/p2p-circuit /ip4/54.39.17.76/udp/4001/quic/p2p/12D3KooWLgLY5EpNKg49p2KMCx9mszFoGPFEJ8x44wBdmZwsNEz4/p2p-circuit /ip4/54.39.17.76/tcp/4001/p2p/12D3KooWLgLY5EpNKg49p2KMCx9mszFoGPFEJ8x44wBdmZwsNEz4/p2p-circuit /ip4/127.0.0.1/udp/38462/quic-v1 /ip4/192.168.8.109/udp/55473/quic-v1/webtransport/certhash/uEiAURErl2a5kD81f7qwuGUA5apTE8lzm6ujU0yrdXS0SBw/certhash/uEiBfisE5y3VroKsi5t-ic0OJQXPSqrjqtkfYzWtHe7Ukeg /ip6/::1/udp/40329/quic-v1]}"}
{"level":"DEBUG","time":"2023-07-16T23:51:58.851+0300","caller":"discovery/dht.go:225","message":" Failed connecting to {12D3KooWL7XFd2KPiYbvNJMxjZwqtkbeBSG6rnR8tGUvbJxdJFZj: [/ip4/161.97.103.8/tcp/4001/p2p/12D3KooWNLxpb8ufYRXTvkUB91VPww4k7y1YBaVeEJRjGDX8ocW1/p2p-circuit /ip4/127.0.0.1/tcp/43601 /ip4/127.0.0.1/udp/38462/quic /ip4/192.168.8.109/tcp/43601 /ip6/::1/udp/40329/quic /ip6/::1/udp/59774/quic-v1/webtransport/certhash/uEiAURErl2a5kD81f7qwuGUA5apTE8lzm6ujU0yrdXS0SBw/certhash/uEiBfisE5y3VroKsi5t-ic0OJQXPSqrjqtkfYzWtHe7Ukeg /ip4/127.0.0.1/udp/55473/quic-v1/webtransport/certhash/uEiAURErl2a5kD81f7qwuGUA5apTE8lzm6ujU0yrdXS0SBw/certhash/uEiBfisE5y3VroKsi5t-ic0OJQXPSqrjqtkfYzWtHe7Ukeg /ip4/192.168.8.109/udp/38462/quic-v1 /ip6/::1/tcp/41077 /ip4/192.168.8.109/udp/38462/quic /ip4/54.39.17.76/udp/4001/quic-v1/p2p/12D3KooWLgLY5EpNKg49p2KMCx9mszFoGPFEJ8x44wBdmZwsNEz4/p2p-circuit /ip4/161.97.103.8/udp/4001/quic/p2p/12D3KooWNLxpb8ufYRXTvkUB91VPww4k7y1YBaVeEJRjGDX8ocW1/p2p-circuit /ip4/54.39.17.76/udp/4001/quic/p2p/12D3KooWLgLY5EpNKg49p2KMCx9mszFoGPFEJ8x44wBdmZwsNEz4/p2p-circuit /ip4/54.39.17.76/tcp/4001/p2p/12D3KooWLgLY5EpNKg49p2KMCx9mszFoGPFEJ8x44wBdmZwsNEz4/p2p-circuit /ip4/127.0.0.1/udp/38462/quic-v1 /ip4/192.168.8.109/udp/55473/quic-v1/webtransport/certhash/uEiAURErl2a5kD81f7qwuGUA5apTE8lzm6ujU0yrdXS0SBw/certhash/uEiBfisE5y3VroKsi5t-ic0OJQXPSqrjqtkfYzWtHe7Ukeg /ip6/::1/udp/40329/quic-v1]}"}
{"level":"DEBUG","time":"2023-07-16T23:51:58.851+0300","caller":"discovery/dht.go:223","message":" Found peer: {12D3KooWHD4TCEyafxzda9H3rooNwraPnZFCJfJngHaUktU3NAYA: [/ip4/127.0.0.1/udp/60081/quic /ip4/127.0.0.1/udp/60081/quic-v1 /ip4/192.168.8.109/udp/35008/quic-v1/webtransport/certhash/uEiBamcm0uMnwHUlB8lotCZ1LaNH8gWqgnZhDI8Ecv8SReg/certhash/uEiDeuCP0iG6_dRw-Omh_8GMGF0k5t_OiyQKkkedKNrjk0Q /ip6/::1/udp/54679/quic-v1/webtransport/certhash/uEiBamcm0uMnwHUlB8lotCZ1LaNH8gWqgnZhDI8Ecv8SReg/certhash/uEiDeuCP0iG6_dRw-Omh_8GMGF0k5t_OiyQKkkedKNrjk0Q /ip4/104.238.187.126/udp/4001/quic-v1/p2p/12D3KooWF6asfk6suLodGAHqA3KnUKdDEWE7ommSaNdV7tTyvbpe/p2p-circuit /ip4/104.238.187.126/tcp/4001/p2p/12D3KooWF6asfk6suLodGAHqA3KnUKdDEWE7ommSaNdV7tTyvbpe/p2p-circuit /ip4/192.168.8.109/udp/60081/quic /ip4/127.0.0.1/tcp/40061 /ip4/127.0.0.1/udp/35008/quic-v1/webtransport/certhash/uEiBamcm0uMnwHUlB8lotCZ1LaNH8gWqgnZhDI8Ecv8SReg/certhash/uEiDeuCP0iG6_dRw-Omh_8GMGF0k5t_OiyQKkkedKNrjk0Q /ip4/192.168.8.109/tcp/40061 /ip6/::1/udp/43490/quic /ip6/::1/udp/43490/quic-v1 /ip4/104.238.187.126/udp/4001/quic/p2p/12D3KooWF6asfk6suLodGAHqA3KnUKdDEWE7ommSaNdV7tTyvbpe/p2p-circuit /ip4/154.53.60.79/udp/4001/quic/p2p/12D3KooWFy5AxPyrrDxDkgiZxgdLmStkogxUt2M9WsXW16b6kjNN/p2p-circuit /ip4/192.168.8.109/udp/60081/quic-v1 /ip6/::1/tcp/35681 /ip4/154.53.60.79/tcp/4001/p2p/12D3KooWFy5AxPyrrDxDkgiZxgdLmStkogxUt2M9WsXW16b6kjNN/p2p-circuit /ip4/154.53.60.79/udp/4001/quic-v1/p2p/12D3KooWFy5AxPyrrDxDkgiZxgdLmStkogxUt2M9WsXW16b6kjNN/p2p-circuit]}"}
{"level":"DEBUG","time":"2023-07-16T23:52:07.900+0300","caller":"discovery/dht.go:225","message":" Failed connecting to {12D3KooWHD4TCEyafxzda9H3rooNwraPnZFCJfJngHaUktU3NAYA: [/ip4/127.0.0.1/udp/60081/quic /ip4/127.0.0.1/udp/60081/quic-v1 /ip4/192.168.8.109/udp/35008/quic-v1/webtransport/certhash/uEiBamcm0uMnwHUlB8lotCZ1LaNH8gWqgnZhDI8Ecv8SReg/certhash/uEiDeuCP0iG6_dRw-Omh_8GMGF0k5t_OiyQKkkedKNrjk0Q /ip6/::1/udp/54679/quic-v1/webtransport/certhash/uEiBamcm0uMnwHUlB8lotCZ1LaNH8gWqgnZhDI8Ecv8SReg/certhash/uEiDeuCP0iG6_dRw-Omh_8GMGF0k5t_OiyQKkkedKNrjk0Q /ip4/104.238.187.126/udp/4001/quic-v1/p2p/12D3KooWF6asfk6suLodGAHqA3KnUKdDEWE7ommSaNdV7tTyvbpe/p2p-circuit /ip4/104.238.187.126/tcp/4001/p2p/12D3KooWF6asfk6suLodGAHqA3KnUKdDEWE7ommSaNdV7tTyvbpe/p2p-circuit /ip4/192.168.8.109/udp/60081/quic /ip4/127.0.0.1/tcp/40061 /ip4/127.0.0.1/udp/35008/quic-v1/webtransport/certhash/uEiBamcm0uMnwHUlB8lotCZ1LaNH8gWqgnZhDI8Ecv8SReg/certhash/uEiDeuCP0iG6_dRw-Omh_8GMGF0k5t_OiyQKkkedKNrjk0Q /ip4/192.168.8.109/tcp/40061 /ip6/::1/udp/43490/quic /ip6/::1/udp/43490/quic-v1 /ip4/104.238.187.126/udp/4001/quic/p2p/12D3KooWF6asfk6suLodGAHqA3KnUKdDEWE7ommSaNdV7tTyvbpe/p2p-circuit /ip4/154.53.60.79/udp/4001/quic/p2p/12D3KooWFy5AxPyrrDxDkgiZxgdLmStkogxUt2M9WsXW16b6kjNN/p2p-circuit /ip4/192.168.8.109/udp/60081/quic-v1 /ip6/::1/tcp/35681 /ip4/154.53.60.79/tcp/4001/p2p/12D3KooWFy5AxPyrrDxDkgiZxgdLmStkogxUt2M9WsXW16b6kjNN/p2p-circuit /ip4/154.53.60.79/udp/4001/quic-v1/p2p/12D3KooWFy5AxPyrrDxDkgiZxgdLmStkogxUt2M9WsXW16b6kjNN/p2p-circuit]}"}
{"level":"DEBUG","time":"2023-07-17T00:07:37.886+0300","caller":"discovery/dht.go:147","message":" failed to dial QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ:\n * [/ip4/127.0.0.1/tcp/4001] dial tcp4 127.0.0.1:4001: connect: connection refused\n * [/ip4/104.131.131.82/tcp/4001] dial tcp4 0.0.0.0:42435->104.131.131.82:4001: i/o timeout\n * [/ip4/127.0.0.1/udp/4001/quic-v1] timeout: no recent network activity\n * [/ip4/104.131.131.82/udp/4001/quic-v1] timeout: no recent network activity"}
{"level":"DEBUG","time":"2023-07-17T00:07:49.036+0300","caller":"discovery/dht.go:147","message":" failed to dial QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb:\n * [/ip6/2604:1380:4602:5c00::3/tcp/4001] dial tcp6 [2604:1380:4602:5c00::3]:4001: connect: network is unreachable\n * [/ip6/::1/tcp/4001] dial tcp6 [::1]:4001: connect: connection refused\n * [/ip4/127.0.0.1/tcp/8081/ws] failed to WebSocket dial: failed to send handshake request: Get "http://127.0.0.1:8081\": dial tcp 127.0.0.1:8081: connect: connection refused\n * [/ip4/127.0.0.1/tcp/4001] dial tcp4 127.0.0.1:4001: connect: connection refused\n * [/ip6/2604:1380:4602:5c00::3/tcp/443/tls/sni/am6.bootstrap.libp2p.io/ws] failed to WebSocket dial: failed to send handshake request: Get "https://am6.bootstrap.libp2p.io:443\": dial tcp [2604:1380:4602:5c00::3]:443: connect: network is unreachable\n * [/ip6/2604:1380:4602:5c00::3/udp/4001/quic-v1] INTERNAL_ERROR (local): write udp6 [::]:49235->[2604:1380:4602:5c00::3]:4001: sendto: network is unreachable\n * [/ip4/147.75.87.27/tcp/443/tls/sni/am6.bootstrap.libp2p.io/ws] failed to WebSocket dial: failed to send handshake request: Get "https://am6.bootstrap.libp2p.io:443\": dial tcp 147.75.87.27:443: connect: no route to host\n * [/ip4/147.75.87.27/tcp/4001] dial tcp4 147.75.87.27:4001: connect: no route to host\n * [/ip6/::1/udp/4001/quic-v1] timeout: no recent network activity\n * [/ip4/127.0.0.1/udp/4001/quic-v1] timeout: no recent network activity\n * [/ip4/147.75.87.27/udp/4001/quic-v1] timeout: no recent network activity"}
{"level":"DEBUG","time":"2023-07-17T00:07:49.066+0300","caller":"discovery/dht.go:147","message":" failed to dial QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa:\n * [/ip4/127.0.0.1/tcp/4001] dial tcp4 127.0.0.1:4001: connect: connection refused\n * [/ip6/2604:1380:45d2:8100::1/tcp/4001] dial tcp6 [2604:1380:45d2:8100::1]:4001: connect: network is unreachable\n * [/ip6/::1/tcp/4001] dial tcp6 [::1]:4001: connect: connection refused\n * [/ip4/172.17.0.1/udp/4001/quic] context deadline exceeded\n * [/ip4/10.66.201.1/udp/4001/quic] context deadline exceeded\n * [/ip4/172.17.0.1/tcp/4001] dial tcp4 0.0.0.0:42435->172.17.0.1:4001: i/o timeout\n * [/ip4/147.75.198.209/tcp/4001] dial tcp4 0.0.0.0:42435->147.75.198.209:4001: i/o timeout\n * [/ip4/147.75.198.209/udp/4001/quic] timeout: no recent network activity\n * [/ip4/10.66.201.1/tcp/4001] dial tcp4 0.0.0.0:42435->10.66.201.1:4001: i/o timeout\n * [/ip4/127.0.0.1/udp/4001/quic] timeout: no recent network activity"}
{"level":"DEBUG","time":"2023-07-17T00:07:49.075+0300","caller":"discovery/dht.go:147","message":" failed to dial QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN:\n * [/ip6/2604:1380:45e3:6e00::1/tcp/4001] dial tcp6 [2604:1380:45e3:6e00::1]:4001: connect: network is unreachable\n * [/ip4/127.0.0.1/tcp/8081/ws] failed to WebSocket dial: failed to send handshake request: Get "http://127.0.0.1:8081\": dial tcp 127.0.0.1:8081: connect: connection refused\n * [/ip6/::1/tcp/4001] dial tcp6 [::1]:4001: connect: connection refused\n * [/ip4/127.0.0.1/tcp/4001] dial tcp4 127.0.0.1:4001: connect: connection refused\n * [/ip6/2604:1380:45e3:6e00::1/udp/4001/quic-v1] INTERNAL_ERROR (local): write udp6 [::]:49235->[2604:1380:45e3:6e00::1]:4001: sendto: network is unreachable\n * [/ip4/139.178.91.71/tcp/4001] dial tcp4 0.0.0.0:42435->139.178.91.71:4001: i/o timeout\n * [/ip4/127.0.0.1/udp/4001/quic-v1] timeout: no recent network activity\n * [/ip4/139.178.91.71/udp/4001/quic-v1] timeout: no recent network activity\n * [/ip6/::1/udp/4001/quic-v1] timeout: no recent network activity"}
{"level":"DEBUG","time":"2023-07-17T00:08:02.074+0300","caller":"discovery/dht.go:147","message":" failed to dial QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt:\n * [/ip6/2604:1380:40e1:9c00::1/tcp/4001] dial tcp6 [2604:1380:40e1:9c00::1]:4001: connect: network is unreachable\n * [/ip4/127.0.0.1/tcp/8081/ws] failed to WebSocket dial: failed to send handshake request: Get "http://127.0.0.1:8081\": dial tcp 127.0.0.1:8081: connect: connection refused\n * [/ip6/::1/tcp/4001] dial tcp6 [::1]:4001: connect: connection refused\n * [/ip4/127.0.0.1/tcp/4001] dial tcp4 127.0.0.1:4001: connect: connection refused\n * [/ip6/2604:1380:40e1:9c00::1/udp/4001/quic-v1] INTERNAL_ERROR (local): write udp6 [::]:49235->[2604:1380:40e1:9c00::1]:4001: sendto: network is unreachable\n * [/ip4/145.40.118.135/tcp/4001] dial tcp4 0.0.0.0:42435->145.40.118.135:4001: i/o timeout\n * [/ip6/::1/udp/4001/quic-v1] timeout: no recent network activity\n * [/ip4/127.0.0.1/udp/4001/quic-v1] timeout: no recent network activity\n * [/ip4/145.40.118.135/udp/4001/quic-v1] timeout: no recent network activity"}
{"level":"DEBUG","time":"2023-07-17T00:08:02.074+0300","caller":"discovery/dht.go:204","message":" Announcing ourselves..."}
{"level":"DEBUG","time":"2023-07-17T00:08:12.096+0300","caller":"discovery/dht.go:207","message":" Successfully announced!"}
{"level":"DEBUG","time":"2023-07-17T00:08:12.096+0300","caller":"discovery/dht.go:210","message":" Searching for other peers..."}
{"level":"DEBUG","time":"2023-07-17T00:08:22.116+0300","caller":"discovery/dht.go:204","message":" Announcing ourselves..."}
{"level":"DEBUG","time":"2023-07-17T00:08:32.140+0300","caller":"discovery/dht.go:207","message":" Successfully announced!"}
{"level":"DEBUG","time":"2023-07-17T00:08:32.140+0300","caller":"discovery/dht.go:210","message":" Searching for other peers..."}
panic: close of closed channel

goroutine 512334 [running]:
github.com/mudler/edgevpn/pkg/discovery.(*DHT).FindClosePeers.func1.1()
/home/runner/work/edgevpn/edgevpn/pkg/discovery/dht.go:196 +0x1a8
created by github.com/mudler/edgevpn/pkg/discovery.(*DHT).FindClosePeers.func1
/home/runner/work/edgevpn/edgevpn/pkg/discovery/dht.go:160 +0x173
$

How do I open the home network port?

With this application, i can open a home network ports by purchasing a VDS?
I used "Wireguard" in tunnel mode, the problem is that some hosting companies block "Wireguard" when there is a DDoS attack on VDS.

edgeVPN how do I do in tunneling mode?
As far as I understand, when I run Edgevpn on my home computer, other participants connected to Edgevpn will also be able to connect to my Minecraft server?
If I put EdgeVPN on VDS, then I put EdgeVPN on my home computer, then I will make port forwarding to the IP of the home EdgeVPN on VDS - will it work?

For example, EdgeVPN issues ip "10.0.0.5" to VDS \ on the home computer issues IP "10.0.0.6", on VDS I write "iptables -t nat -A PREROUTING -p tcp --dport 25565 -d 193.164.16.243 -j DNAT --to 10.0.0.6:25565" \ thereby the server should be accessible by IP "193.164.16.243"

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
Dockerfile
  • golang 1.22-alpine
github-actions
.github/workflows/build.yml
  • actions/checkout v4
  • actions/setup-go v5
  • goreleaser/goreleaser-action v5
.github/workflows/dependabot_auto.yml
  • dependabot/fetch-metadata v2.1.0
  • actions/checkout v4
.github/workflows/images.yml
  • actions/checkout v4
  • docker/login-action v3
  • docker/build-push-action v5
.github/workflows/pages.yml
  • actions/checkout v4
.github/workflows/release.yml
  • actions/checkout v4
  • actions/setup-go v5
  • goreleaser/goreleaser-action v5
.github/workflows/renovate_bot.yml
  • actions/checkout v4
.github/workflows/test.yml
  • actions/checkout v4
  • actions/setup-go v5
  • actions/upload-artifact v4
  • actions/upload-artifact v4
  • actions/checkout v4
  • actions/setup-go v5
  • actions/download-artifact v4
  • actions/download-artifact v4
  • codecov/codecov-action v4.4.1
  • actions/checkout v4
  • actions/download-artifact v4
  • actions/download-artifact v4
  • actions/checkout v4
  • actions/download-artifact v4
  • actions/download-artifact v4
  • actions/checkout v4
  • actions/download-artifact v4
  • actions/download-artifact v4
gomod
go.mod
  • go 1.21
  • go 1.22.3
  • github.com/Masterminds/sprig/v3 v3.2.3
  • github.com/benbjohnson/clock v1.3.5
  • github.com/c-robinson/iplib v1.0.8
  • github.com/c-robinson/iplib/v2 v2.0.5
  • github.com/cenkalti/backoff/v4 v4.3.0
  • github.com/creachadair/otp v0.4.2
  • github.com/google/gopacket v1.1.19
  • github.com/hashicorp/golang-lru v0.5.4
  • github.com/hashicorp/golang-lru/v2 v2.0.7
  • github.com/ipfs/go-log v1.0.5
  • github.com/ipfs/go-log/v2 v2.5.1
  • github.com/labstack/echo/v4 v4.12.0
  • github.com/libp2p/go-libp2p v0.31.0
  • github.com/libp2p/go-libp2p-kad-dht v0.25.2
  • github.com/libp2p/go-libp2p-pubsub v0.9.3
  • github.com/miekg/dns v1.1.59
  • github.com/mudler/go-processmanager v0.0.0-20230818213616-f204007f963c@f204007f963c
  • github.com/mudler/water v0.0.0-20221010214108-8c7313014ce0@8c7313014ce0
  • github.com/multiformats/go-multiaddr v0.12.4
  • github.com/onsi/ginkgo/v2 v2.18.0
  • github.com/onsi/gomega v1.33.1
  • github.com/peterbourgon/diskv v2.0.1+incompatible
  • github.com/pkg/errors v0.9.1
  • github.com/songgao/packets v0.0.0-20160404182456-549a10cd4091@549a10cd4091
  • github.com/urfave/cli/v2 v2.27.2
  • github.com/vishvananda/netlink v1.1.0
  • go.uber.org/zap v1.27.0
  • golang.org/x/sys v0.20.0
  • golang.zx2c4.com/wireguard/windows v0.5.3
  • gopkg.in/yaml.v2 v2.4.0
  • gopkg.in/yaml.v3 v3.0.1
  • github.com/mudler/gosigar v0.14.3-0.20220502202347-34be910bdaaf@34be910bdaaf
html
api/public/index.html
  • font-awesome 6.5.2@sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==
npm
docs/package.json
  • autoprefixer ^10.4.2
  • postcss-cli ^11.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

Unable to establish VPN: 10.1.1.2 not found in the routing table

I am using v0.16.1 on linux x86-64.

I am attempting to simulate two hosts behind NAT establishing a VPN connection.

I have two separate machines on the same LAN but are prohibited from talking to one other over the LAN. The machines only have internal 192.168.1.0/24 addresses.

I followed the tutorial exactly as written but when trying to ping host2 (edgevpn ip: 10.1.1.2) from host1 (edgevpn ip: 10.1.1.1), I get the error:

{"level":"DEBUG",
 "time":"[date]",
 "caller":"vpn/vpn.go:258",
 "message":"could not handle frame: '10.1.1.2' not found in the routing table\n"}

Invocation:

  • host1: sudo ./edgevpn --interface edgevpn0 --config config.yaml --log-level=DEBUG --address 10.1.1.1/30 --libp2p-log-level=INFO --transient-conn
  • host2: sudo ./edgevpn --interface edgevpn1 --config config.yaml --log-level=DEBUG --address 10.1.1.2/30 --libp2p-log-level=INFO --transient-conn

I have followed the sysctl -w net.core.rmem_max=2500000 step on both machines.

config.yaml was generated with edgevpn -g > config.yaml and is the same on both machines.

The DEBUG messages show that both machines Find Peers:

{"level":"DEBUG",
 "time":"[date]",
 "caller":"discovery/dht.go:229",
 "message":" Found peer: {12D3KooW....: [/ip4/147.189.X.Y/udp/4001/quic/p2p/12D3KooWE.../p2p-circuit ..."}

And even report Connected:

{"level":"DEBUG",
 "time":"[date]",
 "caller":"discovery/dht.go:229",
 "message":" Connected to: {12D3KooW....: [/ip4/147.189.X.Y/udp/4001/quic/p2p/12D3KooWE.../p2p-circuit ..."}

Yet edgevpn complains about the routing table when attempting to ping the other edgevpn IP address.

It works when both edgevpn0 and edgevpn1 are invoked on the same machine (and talk over localhost), but this does not simulate my intention: two hosts behind NAT.

edgevpn has many options that I don't know what they do - do I need to specify any of these?

Crypto Go :we are a research group to help developers build secure applications.

Hi, we are a research group to help developers build secure applications. We designed a cryptographic misuse detector (i.e., CryptoGo) on Go language. We found your great public repository from Github, and several security issues detected by CryptoGo are shown in the following.
Note that the cryptographic algorithms are categorized with two aspects: security strength and security vulnerability based on NIST Special Publication 800-57 and other public publications. Moreover, CryptoGo defined certain rules derived from the APIs of Go cryptographic library and other popular cryptographic misuse detectors. The specific security issues we found are as follows:
(1) Location: pkg/crypto/md5.go:25
Broken rule: MD5 is an insecure algorithm;
(2) Location: pkg/crypto/aes.go:29
Broken rule: Constant key in AES;
We wish the above security issues could truly help you to build a secure application. If you have any concern or suggestion, please feel free to contact us, we are looking forward to your reply. Thanks.

Memleak in v0.9.3-v0.9.4

Seems the bump to libp2p which was reverted here: #10 caused few memleaks, I'm still not sure if it's due to the bump or of something rather we shouldn't do in the code, but seems to occur only on edgevpn versions with the commit above.

After few runs with pprof, seems to happen in aes.newCipher. so my first thoughts are at either something not properly consumed in the streams or either some internal buffer.

10MB 3.87% 24.19% 10MB 3.87% crypto/aes.newCipher and the quic stack in general grows constantly, and can be seen in the pprof files

Starting from:

howing top 20 nodes out of 201                                                                                                                                                                       [245/1512]
      flat  flat%   sum%        cum   cum%                                                                                                                                                                      
      10MB  9.02%  9.02%       10MB  9.02%  github.com/libp2p/go-cidranger.newPrefixTree                                                                                                                        
    7.52MB  6.78% 15.80%     8.52MB  7.68%  github.com/lucas-clemente/quic-go/internal/handshake.newCryptoSetup
    6.50MB  5.87% 21.67%     6.50MB  5.87%  github.com/libp2p/go-libp2p-peerstore/pstoremem.(*memoryAddrBook).addAddrsUnlocked                                                                                  
    5.50MB  4.96% 26.63%     5.50MB  4.96%  crypto/aes.newCipher                                                                                                                                                
    4.52MB  4.07% 30.71%     4.52MB  4.07%  github.com/libp2p/go-libp2p-asn-util.init                                                                                                                           
    3.01MB  2.72% 33.43%     3.01MB  2.72%  bufio.NewReaderSize                                                                                                                                                 
       3MB  2.71% 36.14%        3MB  2.71%  crypto/x509.parseCertificate                                                                                                                                        
       3MB  2.71% 38.84%        3MB  2.71%  github.com/lucas-clemente/quic-go.(*frameSorter).push                                                                                                               
    2.50MB  2.26% 41.10%     6.51MB  5.87%  github.com/lucas-clemente/quic-go.(*session).preSetup                                                                                                               
    2.50MB  2.26% 43.36%     2.50MB  2.26%  runtime.malg                                                                                                                                                        
    2.50MB  2.26% 45.62%     2.50MB  2.26%  crypto/aes.(*aesCipherGCM).NewGCM                                                                                                                                   
    2.50MB  2.26% 47.87%     2.50MB  2.26%  github.com/libp2p/go-libp2p-kad-dht/providers.mkProvKeyFor                                                                                                          
       2MB  1.81% 49.68%        2MB  1.81%  github.com/libp2p/go-yamux/v3.newSession                                                                                                                            
       2MB  1.81% 51.49%    23.02MB 20.77%  github.com/lucas-clemente/quic-go.glob..func3                                                                                                                       
       2MB  1.80% 53.29%        2MB  1.80%  github.com/libp2p/go-libp2p-core/record/pb.(*Envelope).Unmarshal                                                                                                    
       2MB  1.80% 55.10%        2MB  1.80%  github.com/multiformats/go-multiaddr.NewMultiaddrBytes
    1.50MB  1.35% 56.45%     1.50MB  1.35%  runtime.allocm
    1.50MB  1.35% 57.80%     1.50MB  1.35%  github.com/lucas-clemente/quic-go.(*cryptoStreamImpl).Write
    1.50MB  1.35% 59.16%     1.50MB  1.35%  github.com/marten-seemann/qtls-go1-17.(*Conn).readHandshake
    1.50MB  1.35% 60.51%        4MB  3.61%  github.com/lucas-clemente/quic-go.newStream

We went up in about 1 hour or so to:

Showing nodes accounting for 151.65MB, 58.62% of 258.71MB total
Dropped 172 nodes (cum <= 1.29MB)
Showing top 20 nodes out of 254
      flat  flat%   sum%        cum   cum%
   18.04MB  6.97%  6.97%    22.54MB  8.71%  github.com/lucas-clemente/quic-go/internal/handshake.newCryptoSetup
   14.52MB  5.61% 12.59%    25.02MB  9.67%  github.com/lucas-clemente/quic-go.(*session).preSetup
   10.01MB  3.87% 16.46%    11.01MB  4.26%  crypto/x509.parseCertificate
      10MB  3.87% 20.32%       10MB  3.87%  github.com/libp2p/go-libp2p-peerstore/pstoremem.(*memoryAddrBook).addAddrsUnlocked
      10MB  3.87% 24.19%       10MB  3.87%  crypto/aes.newCipher
      10MB  3.87% 28.05%       10MB  3.87%  github.com/libp2p/go-cidranger.newPrefixTree
    9.50MB  3.67% 31.73%     9.50MB  3.67%  github.com/lucas-clemente/quic-go.(*frameSorter).push
    8.51MB  3.29% 35.01%     8.51MB  3.29%  github.com/lucas-clemente/quic-go.(*cryptoStreamImpl).Write
       7MB  2.71% 37.72%    11.50MB  4.45%  github.com/lucas-clemente/quic-go.newStream
    6.01MB  2.32% 40.04%     6.01MB  2.32%  github.com/libp2p/go-yamux/v3.newSession
       6MB  2.32% 42.36%        6MB  2.32%  crypto/aes.(*aesCipherGCM).NewGCM
    5.51MB  2.13% 44.49%     5.51MB  2.13%  github.com/lucas-clemente/quic-go/internal/wire.init.0.func1
    5.50MB  2.13% 46.62%     9.50MB  3.67%  github.com/lucas-clemente/quic-go.(*cryptoStreamImpl).HandleCryptoFrame
       5MB  1.93% 48.55%    70.57MB 27.28%  github.com/lucas-clemente/quic-go.glob..func3
       5MB  1.93% 50.49%        5MB  1.93%  runtime.malg
    4.52MB  1.75% 52.23%     4.52MB  1.75%  bufio.NewReaderSize
    4.52MB  1.75% 53.98%     4.52MB  1.75%  github.com/libp2p/go-libp2p-asn-util.init
    4.50MB  1.74% 55.72%     4.50MB  1.74%  github.com/libp2p/go-libp2p-kad-dht/providers.mkProvKeyFor
       4MB  1.55% 57.26%        4MB  1.55%  github.com/lucas-clemente/quic-go.newOutgoingUniStreamsMap
    3.50MB  1.35% 58.62%        4MB  1.55%  github.com/marten-seemann/qtls-go1-17.(*Conn).readHandshake

here is a previously svg draw, where can be seen that newCipher was just about 6MB.
profile001

By looking at profiles, seems the quic stack is suffering of some memory leak, but can't be sure yet.

To repro, just check out RAM usage in a bunch of hours, you would see it constantly growing. It eventually fills out the whole ram of the node

ping: @marten-seemann @vyzo

Sorry guys for pinging you directly, but before opening an issue upstream want to nail down if it's an issue on my side here, or do you have already an idea what's causing it? Thanks! πŸ™‡

Documenation info about Desktop GUI and also WebUI and API

Its not mentioned in the Documentation but a couple questions:

I assume for "Desktop GUI"

  • a Linux Desktop Environment (DE) needs to be pre-installed whether physical machine, vm or Container environment
  • are there any limitations (example: Wayland or X11) to be aware of
  • is there a preferred DE recommended for some reason

For WebUI and API

  • Can Port number be changed from 8080. If so, where is that configured.
  • Can HTTPS be utilized? If so are there steps documented somewhere.

file commands

β€˜β€™file-receive β€˜β€™ β€˜β€™file-sendβ€˜β€™ How to execute commands under Windows

Memory Usage

I like to keep my devices conected via edgevpn, so ideally created a systemd service and leave it running for as long as possible. I even have it configured to restart on failure. Not sure if this is the intended use for the tool but hopefully it is because I find it very useful this way haha

However, this is the report I get from my system after a couple of days, plus this node is actually not accessible at this point so I had to reboot

mauro@zeno:~/Workspace/kairos$ systemctl status edgevpn.service 
● edgevpn.service - EdgeVPN
     Loaded: loaded (/etc/systemd/system/edgevpn.service; enabled; preset: enabled)
     Active: active (running) since Fri 2024-04-26 12:48:01 CEST; 4 days ago
   Main PID: 1501931 (start-edgevpn.s)
      Tasks: 28 (limit: 76695)
     Memory: 6.5G
        CPU: 4d 17h 7min 54.535s

After rebooting, I can reach the node again and this is how it looks which is a lot less, but I'm not sure if it's a high or low value still.

mauro@zeno:~/Workspace/kairos$ systemctl status edgevpn.service 
● edgevpn.service - EdgeVPN
     Loaded: loaded (/etc/systemd/system/edgevpn.service; enabled; preset: enabled)
     Active: active (running) since Tue 2024-04-30 14:57:06 CEST; 3min 18s ago
   Main PID: 3797958 (start-edgevpn.s)
      Tasks: 26 (limit: 76695)
     Memory: 111.8M
        CPU: 11.196s
edgevpn -v
edgevpn version v0.25.0

Can edgevpn be configured to use a different non-routable network for VPN than 10.x.x.x

In the edgevpn README it says...

An example of running edgevpn on multiple hosts:

# on Node A
$ EDGEVPNTOKEN=.. edgevpn --address 10.1.0.11/24
# on Node B
$ EDGEVPNTOKEN=.. edgevpn --address 10.1.0.12/24
# on Node C ...
$ EDGEVPNTOKEN=.. edgevpn --address 10.1.0.13/24

For instance per IANA these are the choices for non-routable networks:

  • 10.0. 0.0/8 ( Range: 10.0. 0.0 – 10.255. 255.255 ) – Available IPs: 16,777,214.
  • 172.16. 0.0/12 ( Range: 172.16. 0.0 – 172.31. 255.255 ) – Available IPs: 1,048,574.
  • 192.168. 0.0/16 ( Range: 192.168. 0.0 – 192.168. 255.255 ) – Available IPs: 65,534.

Is there a way to configure/tell edgevpn to use 172.16.x.x for its VPN network IPs instead of 10.x.x.x

Support for *BSD?

Just curious if there is any support for OpenBSD, or any other bsd for that matter?

system: cannot reserve inbound connection: resource limit exceeded"

I run the same command as @realbiz21 mentioned in #29.

host1: sudo ./edgevpn --interface edgevpn0 --config config.yaml --log-level=DEBUG --address 10.1.1.1/30 --libp2p-log-level=INFO --transient-conn
host2: sudo ./edgevpn --interface edgevpn1 --config config.yaml --log-level=DEBUG --address 10.1.1.2/30 --libp2p-log-level=INFO --transient-conn

And the two peers behind NAT can not ping each other. But my debug info is as follow:

{"level":"DEBUG","time":"2023-01-02T15:58:20.789+0800","caller":"vpn/vpn.go:258","message":"could not handle frame: '10.1.1.1' not f
ound in the routing table\n"}
2023-01-02T15:58:21.104+0800    INFO    net/identify    identify/id.go:369        failed negotiate identify protocol with peer    {"
peer": "12D3KooWNAsC8qv6f55DScsvcm9n4HEePsuPh7NQL63xYp9KTdb7", "error": "Application error 0x0: conn-19203779: system: cannot reserv
e inbound connection: resource limit exceeded"}

The same error happens in other project like ipfs/kubo#9432 . Thanks for any help.

Trying to run on windows

I am unable to get this working in windows

panic: Error loading wintun.dll DLL: Unable to load library: The specified module could not be found.

goroutine 1 [running]:
golang.zx2c4.com/wintun.(*lazyProc).Addr(...)
        C:/Users/nicks/go/pkg/mod/golang.zx2c4.com/[email protected]/dll.go:60
golang.zx2c4.com/wintun.CreateAdapter({0x10e642f?, 0xc0008c4780?}, {0x10e5817, 0x8}, 0xc000bbe310)
        C:/Users/nicks/go/pkg/mod/golang.zx2c4.com/[email protected]/wintun.go:92 +0x166
golang.zx2c4.com/wireguard/tun.CreateTUNWithRequestedGUID({0x10e642f, 0x8}, 0x0?, 0x0)
        C:/Users/nicks/go/pkg/mod/golang.zx2c4.com/[email protected]/tun/tun_windows.go:73 +0x46
github.com/mudler/water.openDev({0x1073040?, {{0x10e642f?, 0x2346a1c0008?}}})
        C:/Users/nicks/go/pkg/mod/github.com/mudler/[email protected]/syscalls_windows.go:35 +0x9a
github.com/mudler/water.New({0xc000106000?, {{0x10e642f?, 0xc000106000?}}})
        C:/Users/nicks/go/pkg/mod/github.com/mudler/[email protected]/if.go:61 +0xdb
github.com/mudler/edgevpn/pkg/vpn.createInterface(0xff?)
        C:/Users/nicks/Downloads/ITGvpn/EdgeVPN2/edgevpn/pkg/vpn/interface_windows.go:63 +0x28
github.com/mudler/edgevpn/pkg/vpn.VPNNetworkService.func1({_, _}, {{0xc000039a10, 0x2b}, {0xc000039a40, 0x2b}, {0x0, 0x0, 0x0}, 0x0, ...}, ...)
        C:/Users/nicks/Downloads/ITGvpn/EdgeVPN2/edgevpn/pkg/vpn/vpn.go:65 +0x15b
github.com/mudler/edgevpn/pkg/node.(*Node).Start(0xc00047fb00, {0x15e0eb0, 0xc0000404a8})
        C:/Users/nicks/Downloads/ITGvpn/EdgeVPN2/edgevpn/pkg/node/node.go:131 +0x2bb
github.com/mudler/edgevpn/cmd.Main.func1(0xc00027a840)
        C:/Users/nicks/Downloads/ITGvpn/EdgeVPN2/edgevpn/cmd/main.go:221 +0xf2e
github.com/urfave/cli.HandleAction({0xea3ce0?, 0x1454d48?}, 0xc000241a40?)
        C:/Users/nicks/go/pkg/mod/github.com/urfave/[email protected]/app.go:524 +0x50
github.com/urfave/cli.(*App).Run(0xc000241a40, {0xc000050080, 0x7, 0x8})
        C:/Users/nicks/go/pkg/mod/github.com/urfave/[email protected]/app.go:286 +0x7db
main.main()
        C:/Users/nicks/Downloads/ITGvpn/EdgeVPN2/edgevpn/main.go:52 +0x799

Automatic relaying behind NAT for DCUtR

I have two nodes, one node has a public address, and another that does not (behind NAT). The node behind NAT can communicate with the node with a public address, but the node with a public address can't dial back. From testing, it appears edgevpn doesn't handle this, but there are specs documented in libp2p that fix this.

Notably, the libp2p Circuit Relay v2 protocol solves this issue by allowing a node to act as a relay. In addition, the Direct Connection Upgrade through Relay protocol allows this to be upgraded into a direct connection, which has the same benefits as direct node-node communication. Ideally, the node with a public address could also act as a relay, which would allow for the other node behind NAT to negotiate with it to connect. This solution would also allow for more nodes of either type to be added without compromising the performance of the network.

I notice that edgevpn has options to add node addresses, but I'm not sure if this works with the Circuit Relay protocol or DCUtR. Edgevpn should automatically negotiate and run these relays so that nodes can connect indirectly.

To summarize, currently, edgevpn doesn't work at all if one of the nodes is behind NAT, only one node can negotiate with the other, manifesting as the node showing up on the public node's blockchain while the private node is empty. Introducing automatic negotiation using the Circuit Relay protocol and the DCUtR protocols would allow edgevpn to traverse these NAT conditions, and allows it to be used in more use cases, such as bridging personal devices into a Kairos cluster for development and management.

Broken icons in HTML pages

At first, I thought this is my OS, but these are broken also on Android.
@mudler can confirm that his browser also displays broken icons.

image

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.