commit f42d70980918b05fc958709ae97833b1f22fc573
parent dc9ce9c26f862eca79fb50d3262297443dca7953
Author: Marcel <MTRNord@users.noreply.github.com>
Date: Tue, 1 Dec 2015 00:48:58 +0100
Merge pull request #1 from MTRNord/develop
Develop
Diffstat:
11 files changed, 85 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -0,0 +1 @@
+upload.sh
diff --git a/fastd_network_connect/Makefile b/fastd_network_connect/Makefile
@@ -0,0 +1,33 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=fastd-network-connect
+PKG_VERSION:=0.1
+
+PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/fastd-network-connect
+ SECTION:=net
+ CATEGORY:=Fastd
+ TITLE:=Fastd Network Connector
+ DEPENDS:=+gluon-core +fastd
+endef
+
+define Build/Prepare
+ mkdir -p $(PKG_BUILD_DIR)
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Package/fastd-network-connect/install
+ $(CP) ./src/cron/* $(1)/lib/gluon/cron
+ $(CP) ./src/etc/fastd/* $(1)/etc/fastd
+endef
+
+$(eval $(call BuildPackage,fastd-network-connect))
+
diff --git a/fastd_network_connect/src/config-mode/controller/admin/fastd_network_connect.lua b/fastd_network_connect/src/config-mode/controller/admin/fastd_network_connect.lua
@@ -0,0 +1,3 @@
+function index()
+ entry({"admin", "fastd_network_connect"}, cbi("admin/fastd_network_connect"), _("Fastd Connection of 2 Networks"), 10)
+end
diff --git a/fastd_network_connect/src/config-mode/i18n/de.po b/fastd_network_connect/src/config-mode/i18n/de.po
diff --git a/fastd_network_connect/src/config-mode/i18n/en.po b/fastd_network_connect/src/config-mode/i18n/en.po
diff --git a/fastd_network_connect/src/config-mode/i18n/fastd_network_connect.pot b/fastd_network_connect/src/config-mode/i18n/fastd_network_connect.pot
diff --git a/fastd_network_connect/src/config-mode/model/cbi/admin/fastd_network_connect.lua b/fastd_network_connect/src/config-mode/model/cbi/admin/fastd_network_connect.lua
@@ -0,0 +1,32 @@
+local f, s, o, ssid
+local uci = luci.model.uci.cursor()
+local config = 'wireless'
+
+f = SimpleForm("wifi", translate("Private WLAN"))
+f.template = "admin/expertmode"
+
+s = f:section(SimpleSection, nil, translate(
+ 'Your node can additionally extend your private network by bridging the WAN interface '
+ .. 'with a separate WLAN. This feature is completely independent of the mesh functionality. '
+ .. 'Please note that the private WLAN and meshing on the WAN interface should not be enabled '
+ .. 'at the same time.'
+))
+
+o = s:option(Flag, "enabled", translate("Enabled"))
+o.default = (ssid and not uci:get_bool(config, primary_iface, "disabled")) and o.enabled or o.disabled
+o.rmempty = false
+
+o = s:option(Value, "ssid", translate("Name (SSID)"))
+o:depends("enabled", '1')
+o.default = ssid
+
+o = s:option(Value, "key", translate("Key"), translate("8-63 characters"))
+o:depends("enabled", '1')
+o.datatype = "wpakey"
+o.default = uci:get(config, primary_iface, "key")
+
+function f.handle(self, state, data)
+
+end
+
+return f
diff --git a/fastd_network_connect/src/cron/net_conn_vpn b/fastd_network_connect/src/cron/net_conn_vpn
@@ -0,0 +1 @@
+@reboot fastd -c /etc/fastd/net_conn_vpn.conf -d
diff --git a/fastd_network_connect/src/etc/fastd/net_conn_vpn.conf b/fastd_network_connect/src/etc/fastd/net_conn_vpn.conf
@@ -0,0 +1,14 @@
+log to syslog as "fastd-NetConnVPN" level error;
+interface "NetConnVPN";
+method "salsa2012+gmac";
+bind any:13337;
+hide ip addresses yes;
+hide mac addresses yes;
+include "secret.conf";
+mtu 1280;
+status socket "/var/run/fastd-status.NetConnVPN.sock";
+include peers from "peers";
+on up "
+ ip link set up dev $INTERFACE
+ batctl -m br-wan if add $INTERFACE
+";
diff --git a/fastd_network_connect/src/etc/fastd/peer/.gitkeep b/fastd_network_connect/src/etc/fastd/peer/.gitkeep
diff --git a/fastd_network_connect/src/etc/fastd/secret.conf b/fastd_network_connect/src/etc/fastd/secret.conf
@@ -0,0 +1 @@
+secret "";