mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-10 04:29:54 +00:00
Remove warnings, more Debian stuff, remove obsolete ui/ stuff.
This commit is contained in:
parent
62b64d39ab
commit
0ca764968a
4
debian/changelog
vendored
4
debian/changelog
vendored
@ -1,5 +1,5 @@
|
||||
zerotier-one (1.1.5) UNRELEASED; urgency=medium
|
||||
|
||||
* Initial release. (Closes: #XXXXXX)
|
||||
* Development package -- first clean Debian packaging test.
|
||||
|
||||
-- root <root@linux-mercury-debian> Wed, 08 Jun 2016 10:05:01 -0700
|
||||
-- Adam Ierymenko <adam.ierymenko@zerotier.com> Wed, 08 Jun 2016 10:05:01 -0700
|
||||
|
3
debian/control
vendored
3
debian/control
vendored
@ -10,7 +10,8 @@ Homepage: https://www.zerotier.com/
|
||||
|
||||
Package: zerotier-one
|
||||
Architecture: any
|
||||
Depends: libhttp-parser2.1, liblz4-1, libnatpmp1
|
||||
Depends: ${shlibs:Depends}, libhttp-parser2.1, liblz4-1, libnatpmp1
|
||||
Homepage: https://www.zerotier.com/
|
||||
Description: ZeroTier network virtualization service
|
||||
ZeroTier One lets you join ZeroTier virtual networks and
|
||||
have them appear as tun/tap ports on your system. See
|
||||
|
7
debian/rules
vendored
7
debian/rules
vendored
@ -1,3 +1,10 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
CFLAGS=-O3 -fstack-protector-strong
|
||||
CXXFLAGS=-O3 -fstack-protector-strong
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_build:
|
||||
make ZT_USE_MINIUPNPC=1 -j 2
|
||||
|
@ -30,7 +30,7 @@ endif
|
||||
#UNAME_M=$(shell $(CC) -dumpmachine | cut -d '-' -f 1)
|
||||
|
||||
INCLUDES?=
|
||||
DEFS?=
|
||||
DEFS?=-D_FORTIFY_SOURCE=2
|
||||
LDLIBS?=
|
||||
DESTDIR?=
|
||||
|
||||
@ -89,17 +89,17 @@ ifeq ($(ZT_DEBUG),1)
|
||||
DEFS+=-DZT_TRACE
|
||||
CFLAGS+=-Wall -g -pthread $(INCLUDES) $(DEFS)
|
||||
CXXFLAGS+=-Wall -g -pthread $(INCLUDES) $(DEFS)
|
||||
LDFLAGS=-ldl
|
||||
LDFLAGS=
|
||||
STRIP?=echo
|
||||
# The following line enables optimization for the crypto code, since
|
||||
# C25519 in particular is almost UNUSABLE in -O0 even on a 3ghz box!
|
||||
ext/lz4/lz4.o node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CFLAGS = -Wall -O2 -g -pthread $(INCLUDES) $(DEFS)
|
||||
else
|
||||
CFLAGS?=-O3 -fstack-protector
|
||||
CFLAGS?=-O3 -fstack-protector-strong
|
||||
CFLAGS+=-Wall -fPIE -fvisibility=hidden -pthread $(INCLUDES) -DNDEBUG $(DEFS)
|
||||
CXXFLAGS?=-O3 -fstack-protector
|
||||
CXXFLAGS?=-O3 -fstack-protector-strong
|
||||
CXXFLAGS+=-Wall -Wreorder -fPIE -fvisibility=hidden -fno-rtti -pthread $(INCLUDES) -DNDEBUG $(DEFS)
|
||||
LDFLAGS=-ldl -pie -Wl,-z,relro,-z,now
|
||||
LDFLAGS=-pie -Wl,-z,relro,-z,now
|
||||
STRIP?=strip
|
||||
STRIP+=--strip-all
|
||||
endif
|
||||
@ -142,7 +142,7 @@ manpages: FORCE
|
||||
cd doc ; ./build.sh
|
||||
|
||||
clean: FORCE
|
||||
rm -rf *.so *.o netcon/*.a node/*.o controller/*.o osdep/*.o service/*.o ext/http-parser/*.o ext/lz4/*.o ext/json-parser/*.o ext/miniupnpc/*.o ext/libnatpmp/*.o $(OBJS) zerotier-one zerotier-idtool zerotier-cli zerotier-selftest zerotier-netcon-service build-* ZeroTierOneInstaller-* *.deb *.rpm .depend netcon/.depend doc/*.1 doc/*.2 doc/*.8
|
||||
rm -rf *.so *.o netcon/*.a node/*.o controller/*.o osdep/*.o service/*.o ext/http-parser/*.o ext/lz4/*.o ext/json-parser/*.o ext/miniupnpc/*.o ext/libnatpmp/*.o $(OBJS) zerotier-one zerotier-idtool zerotier-cli zerotier-selftest zerotier-netcon-service build-* ZeroTierOneInstaller-* *.deb *.rpm .depend netcon/.depend doc/*.1 doc/*.2 doc/*.8 debian/zerotier-one* debian/files
|
||||
find netcon -type f \( -name '*.o' -o -name '*.so' -o -name '*.1.0' -o -name 'zerotier-one' -o -name 'zerotier-cli' -o -name 'zerotier-netcon-service' \) -delete
|
||||
find netcon/docker-test -name "zerotier-intercept" -type f -delete
|
||||
|
||||
@ -193,4 +193,7 @@ uninstall: FORCE
|
||||
rm -f $(DESTDIR)/usr/share/man/man1/zerotier-idtool.1.gz
|
||||
rm -f $(DESTDIR)/usr/share/man/man1/zerotier-cli.1.gz
|
||||
|
||||
debian: distclean
|
||||
debuild -I -i -us -uc
|
||||
|
||||
FORCE:
|
||||
|
@ -172,7 +172,7 @@ LinuxEthernetTap::LinuxEthernetTap(
|
||||
// Set close-on-exec so that devices cannot persist if we fork/exec for update
|
||||
::fcntl(_fd,F_SETFD,fcntl(_fd,F_GETFD) | FD_CLOEXEC);
|
||||
|
||||
::pipe(_shutdownSignalPipe);
|
||||
(void)::pipe(_shutdownSignalPipe);
|
||||
|
||||
devmap[nwids] = _dev;
|
||||
OSUtils::writeFile((_homePath + ZT_PATH_SEPARATOR_S + "devicemap").c_str(),devmap.toString());
|
||||
@ -182,7 +182,7 @@ LinuxEthernetTap::LinuxEthernetTap(
|
||||
|
||||
LinuxEthernetTap::~LinuxEthernetTap()
|
||||
{
|
||||
::write(_shutdownSignalPipe[1],"\0",1); // causes thread to exit
|
||||
(void)::write(_shutdownSignalPipe[1],"\0",1); // causes thread to exit
|
||||
Thread::join(_thread);
|
||||
::close(_fd);
|
||||
::close(_shutdownSignalPipe[0]);
|
||||
@ -307,7 +307,7 @@ void LinuxEthernetTap::put(const MAC &from,const MAC &to,unsigned int etherType,
|
||||
*((uint16_t *)(putBuf + 12)) = htons((uint16_t)etherType);
|
||||
memcpy(putBuf + 14,data,len);
|
||||
len += 14;
|
||||
::write(_fd,putBuf,len);
|
||||
(void)::write(_fd,putBuf,len);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ public:
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
::send(_whackSendSocket,(const char *)this,1,0);
|
||||
#else
|
||||
::write(_whackSendSocket,(PhySocket *)this,1);
|
||||
(void)::write(_whackSendSocket,(PhySocket *)this,1);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -871,7 +871,7 @@ public:
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
::recv(_whackReceiveSocket,tmp,16,0);
|
||||
#else
|
||||
::read(_whackReceiveSocket,tmp,16);
|
||||
(void)::read(_whackReceiveSocket,tmp,16);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1,6 +0,0 @@
|
||||
all:
|
||||
mkdir -p build
|
||||
jsx --target es3 -x jsx . ./build
|
||||
rm -f ztui.min.js
|
||||
minify build/*.js >>ztui.min.js
|
||||
rm -rf build
|
10
ui/README.md
10
ui/README.md
@ -1,10 +0,0 @@
|
||||
ZeroTier HTML5 UI
|
||||
======
|
||||
|
||||
This is the new (as of 1.0.3) ZeroTier One UI. It's implemented in HTML5 and React.
|
||||
|
||||
If you make changes to the .jsx files, type 'make'. You will need NodeJS, react-tools, and minify installed and available in your path.
|
||||
|
||||
For this to work, these files must be installed in the 'ui' subfolder of the ZeroTier home path. For development it's nice to symlink this to the 'ui' folder in your working directory. If the 'ui' subfolder is not present, the UI static files will not be served by the embedded web server.
|
||||
|
||||
Packaging for Mac and Windows is accomplished by way of the wrappers in ext/. For Mac this is done with a modified version of MacGap. Windows uses a custom project that embeds a web view.
|
@ -1,74 +0,0 @@
|
||||
var ZeroTierNetwork = React.createClass({
|
||||
getInitialState: function() {
|
||||
return {};
|
||||
},
|
||||
|
||||
leaveNetwork: function(event) {
|
||||
Ajax.call({
|
||||
url: 'network/'+this.props.nwid+'?auth='+this.props.authToken,
|
||||
cache: false,
|
||||
type: 'DELETE',
|
||||
success: function(data) {
|
||||
if (this.props.onNetworkDeleted)
|
||||
this.props.onNetworkDeleted(this.props.nwid);
|
||||
}.bind(this),
|
||||
error: function(error) {
|
||||
}.bind(this)
|
||||
});
|
||||
event.preventDefault();
|
||||
},
|
||||
|
||||
render: function() {
|
||||
return (
|
||||
<div className="zeroTierNetwork">
|
||||
<div className="networkInfo">
|
||||
<span className="networkId">{this.props.nwid}</span>
|
||||
<span className="networkName">{this.props.name}</span>
|
||||
</div>
|
||||
<div className="networkProps">
|
||||
<div className="row">
|
||||
<div className="name">Status</div>
|
||||
<div className="value">{this.props['status']}</div>
|
||||
</div>
|
||||
<div className="row">
|
||||
<div className="name">Type</div>
|
||||
<div className="value">{this.props['type']}</div>
|
||||
</div>
|
||||
<div className="row">
|
||||
<div className="name">MAC</div>
|
||||
<div className="value zeroTierAddress">{this.props['mac']}</div>
|
||||
</div>
|
||||
<div className="row">
|
||||
<div className="name">MTU</div>
|
||||
<div className="value">{this.props['mtu']}</div>
|
||||
</div>
|
||||
<div className="row">
|
||||
<div className="name">Broadcast</div>
|
||||
<div className="value">{(this.props['broadcastEnabled']) ? 'ENABLED' : 'DISABLED'}</div>
|
||||
</div>
|
||||
<div className="row">
|
||||
<div className="name">Bridging</div>
|
||||
<div className="value">{(this.props['bridge']) ? 'ACTIVE' : 'DISABLED'}</div>
|
||||
</div>
|
||||
<div className="row">
|
||||
<div className="name">Device</div>
|
||||
<div className="value">{(this.props['portDeviceName']) ? this.props['portDeviceName'] : '(none)'}</div>
|
||||
</div>
|
||||
<div className="row">
|
||||
<div className="name">Managed IPs</div>
|
||||
<div className="value ipList">
|
||||
{
|
||||
this.props['assignedAddresses'].map(function(ipAssignment) {
|
||||
return (
|
||||
<div key={ipAssignment} className="ipAddress">{ipAssignment}</div>
|
||||
);
|
||||
})
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" className="leaveNetworkButton" onClick={this.leaveNetwork}>Leave Network</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
@ -1,158 +0,0 @@
|
||||
var ZeroTierNode = React.createClass({
|
||||
getInitialState: function() {
|
||||
return {
|
||||
address: '----------',
|
||||
online: false,
|
||||
version: '_._._',
|
||||
_networks: [],
|
||||
_peers: []
|
||||
};
|
||||
},
|
||||
|
||||
ago: function(ms) {
|
||||
if (ms > 0) {
|
||||
var tmp = Math.round((Date.now() - ms) / 1000);
|
||||
return ((tmp > 0) ? tmp : 0);
|
||||
} else return 0;
|
||||
},
|
||||
|
||||
updatePeers: function() {
|
||||
Ajax.call({
|
||||
url: 'peer?auth='+this.props.authToken,
|
||||
cache: false,
|
||||
type: 'GET',
|
||||
success: function(data) {
|
||||
if (data) {
|
||||
var pl = JSON.parse(data);
|
||||
if (Array.isArray(pl)) {
|
||||
this.setState({_peers: pl});
|
||||
}
|
||||
}
|
||||
}.bind(this),
|
||||
error: function() {
|
||||
}.bind(this)
|
||||
});
|
||||
},
|
||||
updateNetworks: function() {
|
||||
Ajax.call({
|
||||
url: 'network?auth='+this.props.authToken,
|
||||
cache: false,
|
||||
type: 'GET',
|
||||
success: function(data) {
|
||||
if (data) {
|
||||
var nwl = JSON.parse(data);
|
||||
if (Array.isArray(nwl)) {
|
||||
this.setState({_networks: nwl});
|
||||
}
|
||||
}
|
||||
}.bind(this),
|
||||
error: function() {
|
||||
}.bind(this)
|
||||
});
|
||||
},
|
||||
updateAll: function() {
|
||||
Ajax.call({
|
||||
url: 'status?auth='+this.props.authToken,
|
||||
cache: false,
|
||||
type: 'GET',
|
||||
success: function(data) {
|
||||
this.alertedToFailure = false;
|
||||
if (data) {
|
||||
var status = JSON.parse(data);
|
||||
this.setState(status);
|
||||
document.title = 'ZeroTier One [' + status.address + ']';
|
||||
}
|
||||
this.updateNetworks();
|
||||
this.updatePeers();
|
||||
}.bind(this),
|
||||
error: function() {
|
||||
this.setState(this.getInitialState());
|
||||
if (!this.alertedToFailure) {
|
||||
this.alertedToFailure = true;
|
||||
alert('Authorization token invalid or ZeroTier One service not running.');
|
||||
}
|
||||
}.bind(this)
|
||||
});
|
||||
},
|
||||
joinNetwork: function(event) {
|
||||
event.preventDefault();
|
||||
if ((this.networkToJoin)&&(this.networkToJoin.length === 16)) {
|
||||
Ajax.call({
|
||||
url: 'network/'+this.networkToJoin+'?auth='+this.props.authToken,
|
||||
cache: false,
|
||||
type: 'POST',
|
||||
success: function(data) {
|
||||
this.networkToJoin = '';
|
||||
if (this.networkInputElement)
|
||||
this.networkInputElement.value = '';
|
||||
this.updateNetworks();
|
||||
}.bind(this),
|
||||
error: function() {
|
||||
}.bind(this)
|
||||
});
|
||||
} else {
|
||||
alert('To join a network, enter its 16-digit network ID.');
|
||||
}
|
||||
},
|
||||
handleNetworkIdEntry: function(event) {
|
||||
this.networkInputElement = event.target;
|
||||
var nid = this.networkInputElement.value;
|
||||
if (nid) {
|
||||
nid = nid.toLowerCase();
|
||||
var nnid = '';
|
||||
for(var i=0;((i<nid.length)&&(i<16));++i) {
|
||||
if ("0123456789abcdef".indexOf(nid.charAt(i)) >= 0)
|
||||
nnid += nid.charAt(i);
|
||||
}
|
||||
this.networkToJoin = nnid;
|
||||
this.networkInputElement.value = nnid;
|
||||
} else {
|
||||
this.networkToJoin = '';
|
||||
this.networkInputElement.value = '';
|
||||
}
|
||||
},
|
||||
|
||||
handleNetworkDelete: function(nwid) {
|
||||
var networks = [];
|
||||
for(var i=0;i<this.state._networks.length;++i) {
|
||||
if (this.state._networks[i].nwid !== nwid)
|
||||
networks.push(this.state._networks[i]);
|
||||
}
|
||||
this.setState({_networks: networks});
|
||||
},
|
||||
|
||||
componentDidMount: function() {
|
||||
this.updateAll();
|
||||
this.updateIntervalId = setInterval(this.updateAll,2500);
|
||||
},
|
||||
componentWillUnmount: function() {
|
||||
clearInterval(this.updateIntervalId);
|
||||
},
|
||||
render: function() {
|
||||
return (
|
||||
<div className="zeroTierNode">
|
||||
<div className="middle"><div className="middleCell">
|
||||
<div className="middleScroll">
|
||||
<div className="networks" key="_networks">
|
||||
{
|
||||
this.state._networks.map(function(network) {
|
||||
network['authToken'] = this.props.authToken;
|
||||
network['onNetworkDeleted'] = this.handleNetworkDelete;
|
||||
return React.createElement('div',{className: 'network',key: network.nwid},React.createElement(ZeroTierNetwork,network));
|
||||
}.bind(this))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div></div>
|
||||
<div className="bottom">
|
||||
<div className="left">
|
||||
<span className="statusLine"><span className="zeroTierAddress">{this.state.address}</span> {this.state.online ? (this.state.tcpFallbackActive ? 'TUNNELED' : 'ONLINE') : 'OFFLINE'} {this.state.version}</span>
|
||||
</div>
|
||||
<div className="right">
|
||||
<form onSubmit={this.joinNetwork}><input type="text" maxlength="16" placeholder="[ Network ID ]" onChange={this.handleNetworkIdEntry} size="16"/><button type="button" onClick={this.joinNetwork}>Join</button></form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
@ -1,58 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>ZeroTier One</title>
|
||||
<link rel="stylesheet" href="zerotier.css">
|
||||
<script src="simpleajax.min.js"></script>
|
||||
<!-- <script src="https://fb.me/react-0.13.2.js"></script> -->
|
||||
<script src="react.min.js"></script>
|
||||
<script src="ztui.min.js"></script>
|
||||
</head>
|
||||
<body><div style="width: 100%; height: 100%;" id="main"></div></body>
|
||||
<script src="main.js"></script>
|
||||
<script>
|
||||
/* Windows hacks */
|
||||
function isIE() {
|
||||
var myNav = navigator.userAgent.toLowerCase();
|
||||
return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;
|
||||
}
|
||||
var ieVersion = isIE();
|
||||
function resizeMiddleScrollClasses() {
|
||||
var elems = document.getElementsByTagName('*'), i;
|
||||
for (i in elems) {
|
||||
if ((' ' + elems[i].className + ' ').indexOf(' middleScroll ') > -1) {
|
||||
elems[i].style.height = (document.body.clientHeight - (elems[i].parentNode.parentNode.previousElementSibling.clientHeight + elems[i].parentNode.parentNode.nextElementSibling.clientHeight)) + "px";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ieVersion !== false) {
|
||||
if (ieVersion < 7) {
|
||||
alert("Upgrade Internet Explorer on your system to use this interface. (detected version: " + ieVersion + ")");
|
||||
} else {
|
||||
resizeMiddleScrollClasses();
|
||||
window.onresize = resizeMiddleScrollClasses;
|
||||
}
|
||||
}
|
||||
|
||||
/* MacGap hacks */
|
||||
if (typeof macgap !== 'undefined') {
|
||||
if (macgap.menu) {
|
||||
var tmp = macgap.menu.getItem("Help");
|
||||
if (tmp)
|
||||
tmp.remove();
|
||||
tmp = macgap.menu.getItem("Format");
|
||||
if (tmp)
|
||||
tmp.remove();
|
||||
tmp = macgap.menu.getItem("View");
|
||||
if (tmp)
|
||||
tmp.remove();
|
||||
tmp = macgap.menu.getItem("File");
|
||||
if (tmp)
|
||||
tmp.remove();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</html>
|
51
ui/main.js
51
ui/main.js
@ -1,51 +0,0 @@
|
||||
/*
|
||||
* ZeroTier One - Network Virtualization Everywhere
|
||||
* Copyright (C) 2011-2015 ZeroTier, Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* --
|
||||
*
|
||||
* ZeroTier may be used and distributed under the terms of the GPLv3, which
|
||||
* are available at: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
*
|
||||
* If you would like to embed ZeroTier into a commercial application or
|
||||
* redistribute it in a modified binary form, please contact ZeroTier Networks
|
||||
* LLC. Start here: http://www.zerotier.com/
|
||||
*/
|
||||
|
||||
function getUrlParameter(parameter)
|
||||
{
|
||||
var currLocation = window.location.search;
|
||||
if (currLocation.indexOf('?') < 0)
|
||||
return '';
|
||||
var parArr = currLocation.split("?")[1].split("&");
|
||||
for(var i = 0; i < parArr.length; i++){
|
||||
parr = parArr[i].split("=");
|
||||
if (parr[0] == parameter) {
|
||||
return decodeURIComponent(parr[1]);
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
var ztAuthToken = getUrlParameter('authToken');
|
||||
if ((!ztAuthToken)||(ztAuthToken.length <= 0)) {
|
||||
ztAuthToken = prompt('No authToken specified in URL. Enter token from\nauthtoken.secret to authorize.');
|
||||
}
|
||||
|
||||
React.render(
|
||||
React.createElement(ZeroTierNode, {authToken: ztAuthToken}),
|
||||
document.getElementById('main')
|
||||
);
|
15
ui/react.min.js
vendored
15
ui/react.min.js
vendored
File diff suppressed because one or more lines are too long
2
ui/simpleajax.min.js
vendored
2
ui/simpleajax.min.js
vendored
@ -1,2 +0,0 @@
|
||||
/** SimpleAjax v1.0.1 - MIT license - https://github.com/freelancephp/SimpleAjax */
|
||||
(function(window){var SimpleAjax=window.SimpleAjax={xhr:null,settings:{url:"",type:"GET",dataType:"text",async:true,cache:true,data:null,contentType:"application/x-www-form-urlencoded",success:null,error:null,complete:null,accepts:{text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"}},call:function(a){var b=this,c=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),d=function(a,b){var c={};for(var d in a)c[d]=typeof b[d]=="undefined"?a[d]:b[d];return c}(this.settings,a),e=function(){if(c.readyState==4){if(c.status>=200&&c.status<300||c.status===304){var a=d.dataType=="xml"?c.responseXML:c.responseText;if(d.dataType=="json")a=b.parseJSON(a);if(b.isFunction(d.success))d.success.call(d,a,c.status,c)}else{if(b.isFunction(d.error))d.error.call(d,c,c.status)}if(b.isFunction(d.complete))d.complete.call(d,c,c.status)}};this.xhr=c;if(!d.cache)d.url+=(d.url.indexOf("?")>-1?"&":"?")+"_nocache="+(new Date).getTime();if(d.data){if(d.type=="GET"){d.url+=(d.url.indexOf("?")>-1?"&":"?")+this.param(d.data);d.data=null}else{d.data=this.param(d.data)}}c.open(d.type,d.url,d.async);c.setRequestHeader("Content-type",d.contentType);if(d.dataType&&d.accepts[d.dataType])c.setRequestHeader("Accept",d.accepts[d.dataType]);if(d.async){c.onreadystatechange=e;c.send(d.data)}else{c.send(d.data);e()}return this},get:function(a,b,c){if(this.isFunction(b)){c=b;b=null}return this.call({url:a,type:"GET",data:b,success:c})},post:function(a,b,c){if(this.isFunction(b)){c=b;b=null}return this.call({url:a,type:"POST",data:b,success:c})},load:function(a,b,c,d){if(typeof a=="string")a=document.getElementById(a);return this.call({url:b,type:c?"POST":"GET",data:c||null,complete:d||null,success:function(b){try{a.innerHTML=b}catch(c){var d=document.createElement("div");d.innerHTML=b;while(a.firstChild)a.removeChild(a.firstChild);for(var e=0,f=d.childNodes.length;e<f;e++)a.appendChild(d.childNodes[e])}}})},param:function(a){var b=[];for(var c in a){b.push(encodeURIComponent(c)+"="+encodeURIComponent(a[c]))}return b.join("&")},parseJSON:function(data){if(typeof data!=="string"||!data)return null;return eval("("+this.trim(data)+")")},trim:function(a){return a.replace(/^\s+/,"").replace(/\s+$/,"")},isFunction:function(a){return Object.prototype.toString.call(a)==="[object Function]"}};if(!window.Ajax){window.Ajax=SimpleAjax}})(window)
|
199
ui/zerotier.css
199
ui/zerotier.css
@ -1,199 +0,0 @@
|
||||
/* Dark blue-grey: #234447
|
||||
* Light blue-grey: #91a2a3
|
||||
* Light yellow: #ffffcc
|
||||
* Orange: #ffb354 */
|
||||
|
||||
html,body {
|
||||
font-family: "Helvetica Neue","Lucida Sans Unicode",sans-serif;
|
||||
font-size: 12pt;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.zeroTierAddress {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.zeroTierNode {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: table;
|
||||
}
|
||||
|
||||
.zeroTierNode > .middle {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
display: table-row;
|
||||
}
|
||||
.zeroTierNode > .middle > .middleCell {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: table-cell;
|
||||
border-bottom: 1px solid #cfcfcf;
|
||||
}
|
||||
.zeroTierNode > .middle > .middleCell > .middleScroll {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
overflow: scroll;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
background: #dddddd;
|
||||
}
|
||||
.zeroTierNode > .middle > .middleCell > .middleScroll > .networks {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0 0 0.25rem 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
text-align: left;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.zeroTierNode > .middle > .middleCell > .middleScroll > .networks > .network {
|
||||
display: block;
|
||||
border-top: 0.12rem solid #dddddd;
|
||||
border-bottom: 0.12rem solid #dddddd;
|
||||
padding: 0.25rem;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.zeroTierNode > .bottom {
|
||||
font-size: 12pt;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
display: table-row;
|
||||
color: #000000;
|
||||
background: #dfdfdf;
|
||||
}
|
||||
.zeroTierNode > .bottom > .left {
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
float: left;
|
||||
padding: 0 0 0 0.5rem;
|
||||
font-size: 12pt;
|
||||
height: 100%;
|
||||
}
|
||||
.zeroTierNode > .bottom > .left > .statusLine {
|
||||
font-family: monospace;
|
||||
white-space: nowrap;
|
||||
font-size: 11pt;
|
||||
height: 100%;
|
||||
}
|
||||
.zeroTierNode > .bottom > .right {
|
||||
text-align: right;
|
||||
height: 100%;
|
||||
white-space: nowrap;
|
||||
float: right;
|
||||
font-size: 12pt;
|
||||
background: #ffffff;
|
||||
}
|
||||
.zeroTierNode > .bottom > .right form {
|
||||
height: 100%;
|
||||
}
|
||||
.zeroTierNode > .bottom > .right input {
|
||||
font-family: monospace;
|
||||
font-size: 12pt;
|
||||
background: #ffffff;
|
||||
color: #000000;
|
||||
outline: none;
|
||||
outline-style: none;
|
||||
box-shadow: 0;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0 0.25rem 0 0.25rem;
|
||||
display: inline;
|
||||
height: 100%;
|
||||
}
|
||||
.zeroTierNode > .bottom > .right button {
|
||||
display: inline-block;
|
||||
font-size: 12pt;
|
||||
background: #ffb354;
|
||||
border: 1px solid #ffb354;
|
||||
color: #000000;
|
||||
margin: 0;
|
||||
padding: 0.05rem 0.75rem 0.05rem 0.75rem;
|
||||
outline: none;
|
||||
outline-style: none;
|
||||
height: 100%;
|
||||
}
|
||||
.zeroTierNode > .bottom > .right button:hover {
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
outline-style: none;
|
||||
border: 1px solid #000000;
|
||||
}
|
||||
|
||||
.zeroTierNetwork {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: inline-block;
|
||||
text-align: right;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.zeroTierNetwork .networkInfo {
|
||||
padding: 0 0 0.25rem 0;
|
||||
text-align: left;
|
||||
font-size: 12pt;
|
||||
}
|
||||
.zeroTierNetwork .networkInfo .networkId {
|
||||
font-size: 11pt;
|
||||
font-family: monospace;
|
||||
color: #000000;
|
||||
}
|
||||
.zeroTierNetwork .networkInfo .networkName {
|
||||
padding: 0 0 0 1rem;
|
||||
float: right;
|
||||
font-size: 12pt;
|
||||
}
|
||||
.zeroTierNetwork .networkProps {
|
||||
width: 100%;
|
||||
display: table;
|
||||
padding: 0;
|
||||
margin: 0 auto 0 auto;
|
||||
border-top: 1px solid #999999;
|
||||
border-bottom: 1px solid #999999;
|
||||
}
|
||||
.zeroTierNetwork .networkProps > .row {
|
||||
display: table-row;
|
||||
}
|
||||
.zeroTierNetwork .networkProps > .row > .name {
|
||||
display: table-cell;
|
||||
font-size: 10pt;
|
||||
padding: 0.1rem 0.5rem 0.1rem 0.5rem;
|
||||
}
|
||||
.zeroTierNetwork .networkProps > .row > .value {
|
||||
font-size: 10pt;
|
||||
display: table-cell;
|
||||
padding: 0.1rem 0.5rem 0.1rem 0.5rem;
|
||||
background: #eeeeee;
|
||||
}
|
||||
.zeroTierNetwork .ipList {
|
||||
}
|
||||
.zeroTierNetwork .ipAddress {
|
||||
font-family: monospace;
|
||||
font-size: 10pt;
|
||||
}
|
||||
.zeroTierNetwork .leaveNetworkButton {
|
||||
padding: 0.25rem 0.5rem 0.25rem 0.5rem;
|
||||
margin: 0.25rem 0 0 0;
|
||||
font-size: 9pt;
|
||||
background: #ffffff;
|
||||
outline: none;
|
||||
background: #ffb354;
|
||||
border: 1px solid #ffb354;
|
||||
cursor: pointer;
|
||||
}
|
||||
.zeroTierNetwork .leaveNetworkButton:hover {
|
||||
border: 1px solid #000000;
|
||||
}
|
1
ui/ztui.min.js
vendored
1
ui/ztui.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user