diff --git a/debian/changelog b/debian/changelog index 235c694..382ef04 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,16 +1,3 @@ -zerotier-one (1.1.14-nt3) unstable; urgency=medium - - * Clean up authtoken CGI - - -- NAStools 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 Tue, 29 Nov 2016 18:02:28 -0800 - zerotier-one (1.1.14-nt1) unstable; urgency=medium * Initial release diff --git a/debian/install b/debian/install index 703976c..f4ef971 100644 --- a/debian/install +++ b/debian/install @@ -1,10 +1,4 @@ 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 diff --git a/debian/patches/0002-Allow-automatic-retrieval-of-authtoken-from-CGI.patch b/debian/patches/0002-Allow-automatic-retrieval-of-authtoken-from-CGI.patch deleted file mode 100644 index 104c72f..0000000 --- a/debian/patches/0002-Allow-automatic-retrieval-of-authtoken-from-CGI.patch +++ /dev/null @@ -1,27 +0,0 @@ -From: NAStools -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( diff --git a/debian/patches/series b/debian/patches/series index ac8b132..e4a416a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1 @@ 0001-Update-platformDefaultHomePath-for-ReadyNAS-OS.patch -0002-Allow-automatic-retrieval-of-authtoken-from-CGI.patch diff --git a/debian/readynas/authtoken.c b/debian/readynas/authtoken.c deleted file mode 100644 index 5aedb71..0000000 --- a/debian/readynas/authtoken.c +++ /dev/null @@ -1,21 +0,0 @@ -#include -#include - -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; -} diff --git a/debian/readynas/config.xml b/debian/readynas/config.xml index 5491bee..72728f7 100644 --- a/debian/readynas/config.xml +++ b/debian/readynas/config.xml @@ -1,13 +1,13 @@ - 1.1.14-nt3 + 1.1.14-nt1 6.6.0 ZeroTier One NT NAStools 0 - https://localhost/apps/nastools-zerotier-one/ui/ + https://github.com/nastools/zerotierone nastools-zerotier-one - ZeroTier network virtualization service + ZeroTier network virtualization service (CLI only) fvapp-nastools-zerotier-one.service diff --git a/debian/readynas/https.conf b/debian/readynas/https.conf deleted file mode 100644 index dcd1742..0000000 --- a/debian/readynas/https.conf +++ /dev/null @@ -1,21 +0,0 @@ - - LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so - - - LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so - - -ScriptAlias /apps/nastools-zerotier-one/cgi /apps/nastools-zerotier-one/cgi - - - Include "/etc/frontview/apache/Admin_Auth.conf" - - - - - - ProxyPass http://localhost:9993/ - ProxyPassReverse http://localhost:9993/ - - - diff --git a/debian/rules b/debian/rules index 6ce46ff..c34429d 100755 --- a/debian/rules +++ b/debian/rules @@ -3,12 +3,4 @@ %: 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: