From 847070a1568f569aace92219551506f4d829fa69 Mon Sep 17 00:00:00 2001 From: kev Date: Tue, 9 Jul 2019 14:09:16 +0800 Subject: [PATCH] update n2n --- n2n/README.md | 9 +++++++++ n2n/arm/docker-compose.yml | 4 +++- n2n/docker-compose.yml | 26 ++++++++++++++++++++------ 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/n2n/README.md b/n2n/README.md index 82c2601..3e00c93 100644 --- a/n2n/README.md +++ b/n2n/README.md @@ -5,4 +5,13 @@ n2n users to exploit features typical of P2P applications at network instead of application level. +## up and running + +```bash +$ docker-compose up -d + +$ docker-compose exec edge bash +>>> ping 192.168.100.1 +``` + [1]: https://www.ntop.org/products/n2n/ diff --git a/n2n/arm/docker-compose.yml b/n2n/arm/docker-compose.yml index 937dd04..cabeb83 100644 --- a/n2n/arm/docker-compose.yml +++ b/n2n/arm/docker-compose.yml @@ -1,7 +1,9 @@ n2n: image: easypi/n2n-arm entrypoint: ["edge"] - command: ["-dn2n0", "-cEasyPi", "-ksecret", "-m11:22:33:44:55:55", "-a10.1.2.100", "-p50001", "-l1.2.3.4:7654"] + command: ["-dn2n0", "-cmynetwork", "-kmypassword", "-mAA:BB:CC:DD:EE:FF", "-a192.168.100.1", "-p50001", "-lsupernode:7654", "-f"] net: host privileged: true + extra_hosts: + - supernode:1.2.3.4 restart: unless-stopped diff --git a/n2n/docker-compose.yml b/n2n/docker-compose.yml index 555e778..8d93ee5 100644 --- a/n2n/docker-compose.yml +++ b/n2n/docker-compose.yml @@ -1,6 +1,20 @@ -n2n: - image: vimagick/n2n - ports: - - "5645:5645/udp" - - "7654:7654/udp" - restart: unless-stopped +version: '3.5' + +services: + + supernode: + image: vimagick/n2n + ports: + - "5645:5645/udp" + - "7654:7654/udp" + restart: unless-stopped + + edge: + image: vimagick/n2n + entrypoint: ["edge"] + command: ["-dn2n0", "-cmynetwork", "-kmypassword", "-mAA:BB:CC:DD:EE:FF", "-a192.168.100.1", "-p50001", "-lsupernode:7654", "-f"] + devices: + - /dev/net/tun + cap_add: + - NET_ADMIN + restart: unless-stopped