All Projects → norouter → Norouter

norouter / Norouter

Licence: apache-2.0
NoRouter: IP-over-Stdio. The easiest multi-host & multi-cloud networking ever. No root privilege is required.

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to Norouter

Cf Warp
Stars: ✭ 148 (-14.45%)
Mutual labels:  vpn
Flutter vpn
Plugin to access VPN service for Flutter | Flutter 的 VPN 插件
Stars: ✭ 158 (-8.67%)
Mutual labels:  vpn
Reflow
Content-routable socks5 proxy switcher for your entire LAN.
Stars: ✭ 170 (-1.73%)
Mutual labels:  vpn
Dontclickshit
Як не стати кібер-жертвою
Stars: ✭ 149 (-13.87%)
Mutual labels:  vpn
Ovpnmcgen.rb
An OpenVPN iOS Configuration Profile (.mobileconfig) Utility—Configures OpenVPN for use with VPN-on-Demand that are not exposed through Apple Configurator 2.
Stars: ✭ 154 (-10.98%)
Mutual labels:  vpn
Autovpn
Create On Demand Disposable OpenVPN Endpoints on AWS.
Stars: ✭ 1,959 (+1032.37%)
Mutual labels:  vpn
Vpn 2017
Android open source VPN client released on Google Play store.
Stars: ✭ 146 (-15.61%)
Mutual labels:  vpn
Macos Openvpn Server
macOS OpenVPN Server and Client Configuration (OpenVPN, Tunnelblick, PF)
Stars: ✭ 172 (-0.58%)
Mutual labels:  vpn
One Key Ikev2 Vpn
A bash script base on Centos or Ubuntu help you to create IKEV2/L2TP vpn.
Stars: ✭ 1,948 (+1026.01%)
Mutual labels:  vpn
Tizi
✅ ✅ ✅ 梯子 TOP推荐(持续更新) ✅ ✅ ✅ PC梯子,Windows梯子,电脑梯子,国外好用梯子,推荐翻墙梯子软件,海外加速器梯子,国外vpn,科学上网工具,靠谱iPhone/iPad/安卓/Android/Mac/Linux/PC/路由器都可以用的梯子
Stars: ✭ 168 (-2.89%)
Mutual labels:  vpn
Vpngate With Proxy
vpn gate client for linux, be able to connect to open vpn server through proxy
Stars: ✭ 150 (-13.29%)
Mutual labels:  vpn
Subspace
A simple WireGuard VPN server GUI
Stars: ✭ 2,109 (+1119.08%)
Mutual labels:  vpn
Skywire Testnet
Skywire Meshnet and VPN
Stars: ✭ 166 (-4.05%)
Mutual labels:  vpn
Mysterium Vpn
DEPRECATED version of Mysterium dVPN app. Please look at mysterium-vpn-desktop instead.
Stars: ✭ 149 (-13.87%)
Mutual labels:  vpn
Brook
Brook is a cross-platform strong encryption and not detectable proxy. Zero-Configuration. Brook 是一个跨平台的强加密无特征的代理软件. 零配置.
Stars: ✭ 12,694 (+7237.57%)
Mutual labels:  vpn
Tailscale Android
Tailscale Android Client
Stars: ✭ 148 (-14.45%)
Mutual labels:  vpn
Htpc Docker Standup
A simple docker-compose based configuration to stand up a new HTPC w/ Plex, Deluge, Sonarr, Radarr and more!
Stars: ✭ 160 (-7.51%)
Mutual labels:  vpn
Blokada
The official repo for Blokada for Android and iOS.
Stars: ✭ 2,427 (+1302.89%)
Mutual labels:  vpn
Shell
All useful linux shell scripts
Stars: ✭ 171 (-1.16%)
Mutual labels:  vpn
Easy163
安卓端一键解锁网易云音乐,无须 ROOT
Stars: ✭ 2,165 (+1151.45%)
Mutual labels:  vpn

NoRouter banner

NoRouter (IP-over-Stdio) is the easiest multi-host & multi-cloud networking ever:

  • Works with any container, any VM, and any baremetal machine, on anywhere, as long as the shell access is available (e.g. docker exec, kubectl exec, ssh)
  • Omnidirectional port forwarding: Local-to-Remote, Remote-to-Local, and Remote-to-Remote
  • No routing configuration is required
  • No root privilege is required (e.g. sudo, docker run --privileged)
  • No public IP is required
  • Provides several network modes
    • Loopback IP mode (e.g. 127.0.42.101, 127.0.42.102, ...)
    • HTTP proxy mode with built-in name resolver
    • SOCKS4a and SOCKS5 proxy mode with built-in name resolver
  • Easily installable with a single binary, available for Linux, macOS, BSDs, and Windows

Web site: https://norouter.io/


What is NoRouter?

NoRouter implements unprivileged networking by using multiple loopback addresses such as 127.0.42.101 and 127.0.42.102. The hosts in the network are connected by forwarding packets over stdio streams like docker exec, kubectl exec, ssh, and whatever.

Unlike traditional port forwarders such as docker run -p, kubectl port-forward, ssh -L, and ssh -R, NoRouter provides mutual interconnectivity across multiple remote hosts.

overview

NoRouter is mostly expected to be used in a dev environment for running heterogeneous multi-cloud apps.

e.g. An environment that is composed of:

  • A laptop in the living room, for writing codes
  • A baremetal workstation with GPU/FPGA in the office, for running machine-learning workloads
  • ACI (Azure Container Instances) containers, for running other workloads that do not require a complete Kubernetes cluster
  • EKS (Amazon Elastic Kubernetes Service) pods, for workloads that heavily access Amazon S3 buckets
  • GKE (Google Kubernetes Engine) pods, for running gVisor-armored workloads

For production environments, setting up VPNs rather than NoRouter would be the right choice.

Download

The binaries are available at https://github.com/norouter/norouter/releases .

See also Getting Started.

Quick usage

  • Install the norouter binary to all the hosts. Run norouter show-installer to show an installation script.
  • Create a manifest YAML file. Run norouter show-example to show an example manifest.
  • Run norouter <FILE> to start NoRouter with the specified manifest YAML file.

Example 1: Port forwarding across localhost + Docker + Kubernetes + LXD + SSH

Run norouter <FILE> with the following YAML file:

hosts:
# localhost
  local:
    vip: "127.0.42.100"
# Docker & Podman container (docker exec, podman exec)
  docker:
    cmd: "docker exec -i some-container norouter"
    vip: "127.0.42.101"
    ports: ["8080:127.0.0.1:80"]
# Writing /etc/hosts is possible on most Docker and Kubernetes containers
    writeEtcHosts: true
# Kubernetes Pod (kubectl exec)
  kube:
    cmd: "kubectl --context=some-context exec -i some-pod -- norouter"
    vip: "127.0.42.102"
    ports: ["8080:127.0.0.1:80"]
# Writing /etc/hosts is possible on most Docker and Kubernetes containers
    writeEtcHosts: true
# LXD container (lxc exec)
  lxd:
    cmd: "lxc exec some-container -- norouter"
    vip: "127.0.42.103"
    ports: ["8080:127.0.0.1:80"]
# SSH
# If your key has a passphrase, make sure to configure ssh-agent so that NoRouter can login to the remote host automatically.
  ssh:
    cmd: "ssh [email protected] -- norouter"
    vip: "127.0.42.104"
    ports: ["8080:127.0.0.1:80"]

In this example, 127.0.42.101:8080 on each hosts is forwarded to the port 80 of the Docker container.

Try:

$ curl http://127.0.42.101:8080
$ docker exec some-container curl http://127.0.42.101:8080
$ kubectl --context=some-context exec some-pod -- curl http://127.0.42.101:8080
$ lxc exec some-container -- curl http://127.0.42.101:8080
$ ssh [email protected] -- curl http://127.0.42.101:8080

Similarly, 127.0.42.102:8080 is forwarded to the port 80 of the Kubernetes Pod, 127.0.42.103:8080 is forwarderd to the port 80 of the LXD container, and 127.0.42.104:8080 is forwarded to the port 80 of some-ssh-host.example.com.

Example 2: Virtual VPN connection into docker network create networks

This example shows steps to use NoRouter for creating an HTTP proxy that works like a VPN router that connects clients into docker network create networks.

This technique also works with remote Docker, rootless Docker, Docker for Mac, and even with Podman. Read docker as podman for the usage with Podman.

First, create a Docker network named "foo", and create an nginx container named "nginx" there:

$ docker network create foo
$ docker run -d --name nginx --hostname nginx --network foo nginx:alpine

Then, create a "bastion" container in the same network, and install NoRouter into it:

$ docker run -d --name bastion --network foo alpine sleep infinity
$ norouter show-installer | docker exec -i bastion sh

Launch norouter example2.yaml with the following YAML:

hosts:
  local:
    vip: "127.0.42.100"
    http:
      listen: "127.0.0.1:18080"
    loopback:
      disable: true
  bastion:
    cmd: "docker exec -i bastion /root/bin/norouter"
    vip: "127.0.42.101"
routes:
  - via: bastion
    to: ["0.0.0.0/0", "*"]

The "nginx" container can be connected from the host as follows:

$ export http_proxy=http://127.0.0.1:18080
$ curl http://nginx

If you are using Podman, try curl http://nginx.dns.podman rather than curl http://nginx .

Example 3: Virtual VPN connection into Kubernetes networks

Example 2 can be also applied to Kubernetes clusters, just by replacing docker exec with kubectl exec.

$ export http_proxy=http://127.0.0.1:18080
$ curl http://nginx.default.svc.cluster.local

Example 4: Aggregate VPCs of AWS, Azure, and GCP

The following example provides an HTTP proxy that virtually aggregates VPCs of AWS, Azure, and GCP:

hosts:
  local:
    vip: "127.0.42.100"
    http:
      listen: "127.0.0.1:18080"
  aws_bastion:
    cmd: "ssh aws_bastion -- ~/bin/norouter"
    vip: "127.0.42.101"
  azure_bastion:
    cmd: "ssh azure_bastion -- ~/bin/norouter"
    vip: "127.0.42.102"
  gcp_bastion:
    cmd: "ssh gcp_bastion -- ~/bin/norouter"
    vip: "127.0.42.103"
routes:
  - via: aws_bastion
    to:
      - "*.compute.internal"
  - via: azure_bastion
    to:
      - "*.internal.cloudapp.net"
  - via: gcp_bastion
    to:
# Substitute "example-123456" with your own GCP project ID
      - "*.example-123456.internal"

The localhost can access all remote hosts in these networks:

$ export http_proxy=http://127.0.0.1:18080
$ curl http://ip-XXX-XXX-XX-XXX.ap-northeast-1.compute.internal
$ curl http://some-azure-host.internal.cloudapp.net
$ curl http://some-gcp-host.asia-northeast1-b.c.example-123456.internal

Documentation

Installing NoRouter from source

$ make
$ sudo make install

Contributing to NoRouter


NoRouter is licensed under the terms of Apache License, Version 2.0.

Copyright (C) NoRouter authors.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].