Coder Social home page Coder Social logo

my-network / ipvpn Goto Github PK

View Code? Open in Web Editor NEW
35.0 8.0 11.0 619 KB

[WIP] Easy-to-use decentralized secure overlay private network (for any device)

License: GNU General Public License v3.0

Go 99.92% Makefile 0.08%
wireguard golang ipfs vpn linux macos autodiscovery dht kademlia mesh p2p automation easy-to-use decentralized secure nat android windows

ipvpn's Introduction

Intro

The parent project is mynet. This module is responsible for creating a VPN through all required devices. It could be used as a separate solution (on a server, for example), but it was supposed to use mynet on desktops

Architecture

We use:

  • IPFS. It's used as:
    • Node discovery (using their DHT).
    • Fallback connector (when it's impossible to connect nodes directly).
    • STUN-replacement (tools to pass-trough a NAT).
    • Messenger (to send notification among nodes).
  • WireGuard. It's used as the VPN implementation. If OS doesn't support WireGuard then we detect it and use an userspace implementation.

An ipvpn node is also a full ipfs node, so it consumes some traffic background.

NAT traversal

Used techniques:

Requirements

Run:

  • Linux or MacOS only, yet

Build:

  • Linux or MacOS only, yet
  • Go>=1.13

Quick start

Just run on all your nodes (the sample commands):

# install
GO111MODULE=on go get github.com/my-network/ipvpn/cmd/ipvpnd
sudo mkdir /var/run/wireguard
sudo chown $UID /var/run/wireguard
sudo setcap cap_net_raw,cap_net_admin+ep `go env GOPATH`/bin/ipvpnd

# configure
mkdir -p "$HOME/.ipvpn"
echo "my_unique_network_name_here" > "$HOME/.ipvpn/network_id.txt"
echo "my_password_here" > "$HOME/.ipvpn/password_new.txt"

# run
`go env GOPATH`/bin/ipvpnd

# in other terminal, check:
ip a show dev ipvpn_direct
ip a show dev ipvpn_tunnel
ping -c 5 10.197.202.1
ping -c 5 10.197.203.1
  • my_unique_network_here should be replaced by a name of you virtual private network
  • my_password_here should be replaced by some secret string

That's it. If my_unique_network_here and my_password_here will match through all of your nodes then they will build an overlay network automatically.

Similar projects

ipvpn's People

Contributors

xaionaro 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ipvpn's Issues

panic: qtls.ConnectionState not compatible with tls.ConnectionState

OS: ubuntu 20.04
golang: go version go1.16.3 linux/amd64

terminal log

chchang@hqdc039:~/Downloads/ipvpn$ `go env GOPATH`/bin/ipvpnd
panic: qtls.ConnectionState not compatible with tls.ConnectionState

goroutine 1 [running]:
github.com/lucas-clemente/quic-go/internal/handshake.init.0()
	/home/chchang/go/pkg/mod/github.com/lucas-clemente/[email protected]/internal/handshake/unsafe.go:17 +0x12e
chchang@hqdc039:~/Downloads/ipvpn$ 

any suggestions ??

Regarding documentation - what does this command do??

In the README documentation it says in the "install section"

install

GO111MODULE=on go get github.com/my-network/ipvpn/cmd/ipvpnd

After some searches I found that the Documentation of the above command is incorrect as it should be least 2 lines:

GO111MODULE=on
go get github.com/my-network/ipvpn/cmd/ipvpnd

Those not normally GO users might not know that and any attempt to executed the command as documented would fail.

is IPVPN alive somewhere else? I'd like to try it out but Quick Start commands fail on Ubuntu 20.04

I know IPFS has improved alot in the last 2 years and I was curious how IPVPN worked using IPFS to help auto-build its
mesh VPN.

$ GO111MODULE=on go get github.com/my-network/ipvpn/cmd/ipvpnd
go get: github.com/my-network/ipvpn@none updating to
github.com/my-network/[email protected] requires
github.com/ipfs/[email protected] requires
github.com/golangci/[email protected] requires
github.com/go-critic/[email protected]: invalid pseudo-version: does not match version-control timestamp (expected 20190526074819)

Reduce CPU consumption

If it is used governor powersave (cpufreq-set -g powersave) then ipvpnd consumes 30% of a core. Which is way too much.

This works? Where are you taking it?

I like the concept. Each node connects to only other nodes with the same name and password. Please give directions for installation and testing in Windows.

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.