1.diff (5447B)
1 diff --git a/.gitignore b/.gitignore 2 new file mode 100644 3 index 0000000..612bb3c 4 --- /dev/null 5 +++ b/.gitignore 6 @@ -0,0 +1 @@ 7 +upload.sh 8 diff --git a/README.md b/README.md 9 index d554ba7..1fd0849 100644 10 --- a/README.md 11 +++ b/README.md 12 @@ -1,12 +1,12 @@ 13 -# Description 14 +Description 15 +============ 16 My own Package Repo for gluon 17 18 -## How to use 19 -Add 20 - 21 -GLUON_SITE_FEEDS="mtrnord-gluon_packages" 22 -PACKAGES_MTRNORD-GLUON_PACKAGES_REPO=https://github.com/MTRNord/mtrnord-gluon_packages.git 23 -PACKAGES_MTRNORD-GLUON_PACKAGES_COMMIT=### 24 - 25 +How to use 26 +============ 27 +Add<br><br> 28 +GLUON_SITE_FEEDS="mtrnord-gluon-packages"<br> 29 +PACKAGES_MTRNORD-GLUON-PACKAGES_REPO=https://github.com/MTRNord/mtrnord-gluon_packages.git<br> 30 +PACKAGES_MTRNORD-GLUON-PACKAGES_COMMIT=###<br><br> 31 to a file named ``modules`` in the site directory. 32 than add the file to your ``site.mk`` 33 diff --git a/fastd_network_connect/Makefile b/fastd_network_connect/Makefile 34 new file mode 100644 35 index 0000000..0b1712a 36 --- /dev/null 37 +++ b/fastd_network_connect/Makefile 38 @@ -0,0 +1,33 @@ 39 +include $(TOPDIR)/rules.mk 40 + 41 +PKG_NAME:=fastd-network-connect 42 +PKG_VERSION:=0.1 43 + 44 +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) 45 + 46 +include $(INCLUDE_DIR)/package.mk 47 + 48 +define Package/fastd-network-connect 49 + SECTION:=net 50 + CATEGORY:=Fastd 51 + TITLE:=Fastd Network Connector 52 + DEPENDS:=+gluon-core +fastd 53 +endef 54 + 55 +define Build/Prepare 56 + mkdir -p $(PKG_BUILD_DIR) 57 +endef 58 + 59 +define Build/Configure 60 +endef 61 + 62 +define Build/Compile 63 +endef 64 + 65 +define Package/fastd-network-connect/install 66 + $(CP) ./src/cron/* $(1)/lib/gluon/cron 67 + $(CP) ./src/etc/fastd/* $(1)/etc/fastd 68 +endef 69 + 70 +$(eval $(call BuildPackage,fastd-network-connect)) 71 + 72 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 73 new file mode 100644 74 index 0000000..a6a56e4 75 --- /dev/null 76 +++ b/fastd_network_connect/src/config-mode/controller/admin/fastd_network_connect.lua 77 @@ -0,0 +1,3 @@ 78 +function index() 79 + entry({"admin", "fastd_network_connect"}, cbi("admin/fastd_network_connect"), _("Fastd Connection of 2 Networks"), 10) 80 +end 81 diff --git a/fastd_network_connect/src/config-mode/i18n/de.po b/fastd_network_connect/src/config-mode/i18n/de.po 82 new file mode 100644 83 index 0000000..e69de29 84 diff --git a/fastd_network_connect/src/config-mode/i18n/en.po b/fastd_network_connect/src/config-mode/i18n/en.po 85 new file mode 100644 86 index 0000000..e69de29 87 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 88 new file mode 100644 89 index 0000000..e69de29 90 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 91 new file mode 100644 92 index 0000000..b213b99 93 --- /dev/null 94 +++ b/fastd_network_connect/src/config-mode/model/cbi/admin/fastd_network_connect.lua 95 @@ -0,0 +1,32 @@ 96 +local f, s, o, ssid 97 +local uci = luci.model.uci.cursor() 98 +local config = 'wireless' 99 + 100 +f = SimpleForm("wifi", translate("Private WLAN")) 101 +f.template = "admin/expertmode" 102 + 103 +s = f:section(SimpleSection, nil, translate( 104 + 'Your node can additionally extend your private network by bridging the WAN interface ' 105 + .. 'with a separate WLAN. This feature is completely independent of the mesh functionality. ' 106 + .. 'Please note that the private WLAN and meshing on the WAN interface should not be enabled ' 107 + .. 'at the same time.' 108 +)) 109 + 110 +o = s:option(Flag, "enabled", translate("Enabled")) 111 +o.default = (ssid and not uci:get_bool(config, primary_iface, "disabled")) and o.enabled or o.disabled 112 +o.rmempty = false 113 + 114 +o = s:option(Value, "ssid", translate("Name (SSID)")) 115 +o:depends("enabled", '1') 116 +o.default = ssid 117 + 118 +o = s:option(Value, "key", translate("Key"), translate("8-63 characters")) 119 +o:depends("enabled", '1') 120 +o.datatype = "wpakey" 121 +o.default = uci:get(config, primary_iface, "key") 122 + 123 +function f.handle(self, state, data) 124 + 125 +end 126 + 127 +return f 128 diff --git a/fastd_network_connect/src/cron/net_conn_vpn b/fastd_network_connect/src/cron/net_conn_vpn 129 new file mode 100644 130 index 0000000..c80515f 131 --- /dev/null 132 +++ b/fastd_network_connect/src/cron/net_conn_vpn 133 @@ -0,0 +1 @@ 134 +@reboot fastd -c /etc/fastd/net_conn_vpn.conf -d 135 diff --git a/fastd_network_connect/src/etc/fastd/net_conn_vpn.conf b/fastd_network_connect/src/etc/fastd/net_conn_vpn.conf 136 new file mode 100644 137 index 0000000..22188dd 138 --- /dev/null 139 +++ b/fastd_network_connect/src/etc/fastd/net_conn_vpn.conf 140 @@ -0,0 +1,14 @@ 141 +log to syslog as "fastd-NetConnVPN" level error; 142 +interface "NetConnVPN"; 143 +method "salsa2012+gmac"; 144 +bind any:13337; 145 +hide ip addresses yes; 146 +hide mac addresses yes; 147 +include "secret.conf"; 148 +mtu 1280; 149 +status socket "/var/run/fastd-status.NetConnVPN.sock"; 150 +include peers from "peers"; 151 +on up " 152 + ip link set up dev $INTERFACE 153 + batctl -m br-wan if add $INTERFACE 154 +"; 155 diff --git a/fastd_network_connect/src/etc/fastd/peer/.gitkeep b/fastd_network_connect/src/etc/fastd/peer/.gitkeep 156 new file mode 100644 157 index 0000000..e69de29 158 diff --git a/fastd_network_connect/src/etc/fastd/secret.conf b/fastd_network_connect/src/etc/fastd/secret.conf 159 new file mode 100644 160 index 0000000..cfff728 161 --- /dev/null 162 +++ b/fastd_network_connect/src/etc/fastd/secret.conf 163 @@ -0,0 +1 @@ 164 +secret "";