mirror of
https://github.com/NAStools/zerotierone.git
synced 2025-08-21 13:54:31 -07:00
Compare commits
5 commits
readynas/1
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
fb3e4fb68f | ||
|
784b1b95ff | ||
|
c4546ac7e0 | ||
|
1a24759ef9 | ||
|
dff338ae16 |
8 changed files with 100 additions and 3 deletions
13
debian/changelog
vendored
13
debian/changelog
vendored
|
@ -1,3 +1,16 @@
|
|||
zerotier-one (1.1.14-nt3) unstable; urgency=medium
|
||||
|
||||
* Clean up authtoken CGI
|
||||
|
||||
-- NAStools <dev@nas.tools> Fri, 09 Dec 2016 10:20:55 -0800
|
||||
|
||||
zerotier-one (1.1.14-nt2) unstable; urgency=medium
|
||||
|
||||
* Include UI from macOS client
|
||||
* Configure package to use UI from macOS client
|
||||
|
||||
-- NAStools <dev@nas.tools> Tue, 29 Nov 2016 18:02:28 -0800
|
||||
|
||||
zerotier-one (1.1.14-nt1) unstable; urgency=medium
|
||||
|
||||
* Initial release
|
||||
|
|
6
debian/install
vendored
6
debian/install
vendored
|
@ -1,4 +1,10 @@
|
|||
debian/readynas/config.xml apps/nastools-zerotier-one
|
||||
debian/readynas/fvapp-nastools-zerotier-one.service apps/nastools-zerotier-one
|
||||
debian/readynas/logo.png apps/nastools-zerotier-one
|
||||
debian/readynas/https.conf apps/nastools-zerotier-one
|
||||
debian/readynas/authtoken apps/nastools-zerotier-one/cgi
|
||||
zerotier-one apps/nastools-zerotier-one/sbin
|
||||
ext/installfiles/mac/ui/*.html apps/nastools-zerotier-one/var/ui
|
||||
ext/installfiles/mac/ui/*.js apps/nastools-zerotier-one/var/ui
|
||||
ext/installfiles/mac/ui/*.css apps/nastools-zerotier-one/var/ui
|
||||
ext/installfiles/mac/ui/*.jsx apps/nastools-zerotier-one/var/ui
|
||||
|
|
27
debian/patches/0002-Allow-automatic-retrieval-of-authtoken-from-CGI.patch
vendored
Normal file
27
debian/patches/0002-Allow-automatic-retrieval-of-authtoken-from-CGI.patch
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
From: NAStools <dev@nas.tools>
|
||||
Date: Tue, 29 Nov 2016 17:41:16 -0800
|
||||
Subject: Allow automatic retrieval of authtoken from CGI
|
||||
|
||||
---
|
||||
ext/installfiles/mac/ui/main.js | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ext/installfiles/mac/ui/main.js b/ext/installfiles/mac/ui/main.js
|
||||
index a164712..08d716f 100644
|
||||
--- a/ext/installfiles/mac/ui/main.js
|
||||
+++ b/ext/installfiles/mac/ui/main.js
|
||||
@@ -42,7 +42,13 @@ function getUrlParameter(parameter)
|
||||
|
||||
var ztAuthToken = getUrlParameter('authToken');
|
||||
if ((!ztAuthToken)||(ztAuthToken.length <= 0)) {
|
||||
- ztAuthToken = prompt('No authToken specified in URL. Enter token from\nauthtoken.secret to authorize.');
|
||||
+ xmlhttp = new XMLHttpRequest();
|
||||
+ xmlhttp.open("GET", "/apps/nastools-zerotier-one/cgi/authtoken", false);
|
||||
+ xmlhttp.send();
|
||||
+ ztAuthToken = xmlhttp.responseText;
|
||||
+ if ((!ztAuthToken)||(ztAuthToken.length <= 0)) {
|
||||
+ ztAuthToken = prompt('No authToken specified in URL. Enter token from\nauthtoken.secret to authorize.');
|
||||
+ }
|
||||
}
|
||||
|
||||
React.render(
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
|
@ -1 +1,2 @@
|
|||
0001-Update-platformDefaultHomePath-for-ReadyNAS-OS.patch
|
||||
0002-Allow-automatic-retrieval-of-authtoken-from-CGI.patch
|
||||
|
|
21
debian/readynas/authtoken.c
vendored
Normal file
21
debian/readynas/authtoken.c
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main() {
|
||||
FILE *f;
|
||||
char c[32];
|
||||
|
||||
f=fopen("/apps/nastools-zerotier-one/var/authtoken.secret","r");
|
||||
if(!f)
|
||||
return 1;
|
||||
|
||||
printf("Content-Type: text/plain\n\n");
|
||||
|
||||
size_t ret = fread(c, 1, sizeof(c), f);
|
||||
if(!ret)
|
||||
return 1;
|
||||
fwrite(c, ret, 1, stdout);
|
||||
|
||||
fclose(f);
|
||||
return 0;
|
||||
}
|
6
debian/readynas/config.xml
vendored
6
debian/readynas/config.xml
vendored
|
@ -1,13 +1,13 @@
|
|||
<Application resource-id="nastools-zerotier-one">
|
||||
<Version>1.1.14-nt1</Version>
|
||||
<Version>1.1.14-nt3</Version>
|
||||
<MinFirmwareVer>6.6.0</MinFirmwareVer>
|
||||
<Name>ZeroTier One NT</Name>
|
||||
<Author>NAStools</Author>
|
||||
<RequireReboot>0</RequireReboot>
|
||||
<LaunchURL/>
|
||||
<LaunchURL>https://localhost/apps/nastools-zerotier-one/ui/</LaunchURL>
|
||||
<InfoURL>https://github.com/nastools/zerotierone</InfoURL>
|
||||
<DebianPackage>nastools-zerotier-one</DebianPackage>
|
||||
<Description lang="en-us">ZeroTier network virtualization service (CLI only)</Description>
|
||||
<Description lang="en-us">ZeroTier network virtualization service</Description>
|
||||
<ServiceName>fvapp-nastools-zerotier-one.service</ServiceName>
|
||||
<ConfigURL/>
|
||||
</Application>
|
||||
|
|
21
debian/readynas/https.conf
vendored
Normal file
21
debian/readynas/https.conf
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
<IfModule !mod_proxy.c>
|
||||
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
|
||||
</IfModule>
|
||||
<IfModule !mod_proxy_http.c>
|
||||
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
|
||||
</IfModule>
|
||||
|
||||
ScriptAlias /apps/nastools-zerotier-one/cgi /apps/nastools-zerotier-one/cgi
|
||||
|
||||
<Location /apps/nastools-zerotier-one>
|
||||
Include "/etc/frontview/apache/Admin_Auth.conf"
|
||||
</Location>
|
||||
|
||||
<IfModule mod_proxy.c>
|
||||
<IfModule mod_proxy_http.c>
|
||||
<Location /apps/nastools-zerotier-one/ui/>
|
||||
ProxyPass http://localhost:9993/
|
||||
ProxyPassReverse http://localhost:9993/
|
||||
</Location>
|
||||
</IfModule>
|
||||
</IfModule>
|
8
debian/rules
vendored
8
debian/rules
vendored
|
@ -3,4 +3,12 @@
|
|||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_build:
|
||||
make ZT_USE_MINIUPNPC=1 -j$(nproc)
|
||||
gcc $$(pwd)/debian/readynas/authtoken.c -o $$(pwd)/debian/readynas/authtoken
|
||||
chmod u+s $$(pwd)/debian/readynas/authtoken
|
||||
|
||||
override_dh_fixperms:
|
||||
dh_fixperms -Xauthtoken
|
||||
|
||||
override_dh_auto_install:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue