yuze-vlan-server 0.0.0-stage → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -2
- package/bin/cli.mjs +78 -0
- package/native/licenses/Go-LICENSE +27 -0
- package/native/licenses/Wintun-LICENSE.txt +84 -0
- package/native/licenses/github.com_apernet_hysteria_core_v2-LICENSE.md +7 -0
- package/native/licenses/github.com_apernet_quic-go-LICENSE +21 -0
- package/native/licenses/github.com_juju_ratelimit-LICENSE +191 -0
- package/native/licenses/github.com_klauspost_compress-LICENSE +304 -0
- package/native/licenses/github.com_klauspost_cpuid_v2-LICENSE +22 -0
- package/native/licenses/github.com_miekg_dns-LICENSE +29 -0
- package/native/licenses/github.com_molecule-man_go-brrr-LICENSE +21 -0
- package/native/licenses/github.com_pires_go-proxyproto-LICENSE +201 -0
- package/native/licenses/github.com_quic-go_qpack-LICENSE.md +7 -0
- package/native/licenses/github.com_refraction-networking_utls-LICENSE +27 -0
- package/native/licenses/github.com_songgao_water-LICENSE +27 -0
- package/native/licenses/github.com_stretchr_objx-LICENSE +22 -0
- package/native/licenses/github.com_stretchr_testify-LICENSE +21 -0
- package/native/licenses/github.com_xtls_reality-LICENSE +375 -0
- package/native/licenses/github.com_xtls_xray-core-LICENSE +373 -0
- package/native/licenses/github.com_yuin_gopher-lua-LICENSE +21 -0
- package/native/licenses/go.yaml.in_yaml_v3-LICENSE +50 -0
- package/native/licenses/go4.org_netipx-LICENSE +27 -0
- package/native/licenses/golang.org_x_crypto-LICENSE +27 -0
- package/native/licenses/golang.org_x_crypto_x509roots_fallback-LICENSE +27 -0
- package/native/licenses/golang.org_x_exp-LICENSE +27 -0
- package/native/licenses/golang.org_x_net-LICENSE +27 -0
- package/native/licenses/golang.org_x_sync-LICENSE +27 -0
- package/native/licenses/golang.org_x_sys-LICENSE +27 -0
- package/native/licenses/golang.org_x_text-LICENSE +27 -0
- package/native/licenses/google.golang.org_grpc-LICENSE +202 -0
- package/native/licenses/google.golang.org_protobuf-LICENSE +27 -0
- package/native/licenses/layeh.com_gopher-luar-LICENSE +373 -0
- package/native/linux-arm64/manifest.json +3 -0
- package/native/linux-arm64/release.sig +1 -0
- package/native/linux-arm64/vlan +0 -0
- package/native/linux-x64/manifest.json +3 -0
- package/native/linux-x64/release.sig +1 -0
- package/native/linux-x64/vlan +0 -0
- package/package.json +35 -4
- package/release-key.txt +1 -0
package/README.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
-
#
|
|
1
|
+
# yuze-vlan-server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Yuze VLAN 的**核心服务器**:中继、优先级选路、配置下发、入口管理、版本发布与中控大屏都在这里。只支持全新的 Debian/Ubuntu + systemd(x64 / ARM64),需要 root。
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
apt-get install -y nodejs npm
|
|
7
|
+
npm install -g yuze-vlan-server
|
|
8
|
+
yuze-vlan-server init --config init.json --dry-run
|
|
9
|
+
yuze-vlan-server init --config init.json
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
`init.json` 必填 `domain`、`addresses`(本机公网 IPv4/IPv6)、`siteDirectory`(真实网站目录,含 index.html),以及 `email`(ACME 申请证书,要求域名已指向本机)或 `certificate` + `privateKey`(导入现有证书,域名可以暂不指向本机)。可选:`name`(核心的入口名,默认 `core`)、`ports`(默认 TCP `[443, 64332, 61443]`、UDP `[443]`、跳跃 UDP `60000–65535`)、`hopListen`(默认 47010)、`recoveryPort`(默认 64333)、`network`(默认 `10.20.0.0/16`)、`network6`(默认随机 ULA /64)、`root`(默认 `/opt/yuze-vlan-server`)。ufw 开启时自动放行所需端口。
|
|
13
|
+
|
|
14
|
+
管理凭据写入 `config/admin-credentials.json`(0600);大屏只监听虚拟网地址 `http://10.20.0.1:8000`。
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
yuze-vlan-server status
|
|
18
|
+
yuze-vlan-server upgrade # 换成本包的程序;新版本起不来自动回滚
|
|
19
|
+
yuze-vlan-server register --id NAME --ip 10.20.0.102 # 预注册设备并输出安装文件(含恢复身份)
|
|
20
|
+
yuze-vlan-server fetch --version 2.0.1 # 从 npm 拉取并校验设备端新版本(大屏也能操作)
|
|
21
|
+
yuze-vlan-server rules --id ENTRY # 查看某个入口收到的转发规则
|
|
22
|
+
yuze-vlan-server version
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**入口**:在大屏「入口」里生成入口 Token,到新 VPS 上以 root 执行 `npx yuze-vlan-entry join <Token>`。核心经 SSH(受限账号,只能下发 / 读取 / 清除自己的转发表)管理全部入口,所有入口都转发到核心。
|
package/bin/cli.mjs
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Core server installer and operator commands. The server itself decides
|
|
3
|
+
// everything for clients and entries; this CLI installs, upgrades and wraps
|
|
4
|
+
// the few operator actions that run on the server host.
|
|
5
|
+
import fs from 'node:fs';
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
import crypto from 'node:crypto';
|
|
8
|
+
import {createRequire} from 'node:module';
|
|
9
|
+
import {fileURLToPath} from 'node:url';
|
|
10
|
+
import {spawnSync} from 'node:child_process';
|
|
11
|
+
|
|
12
|
+
const here=path.dirname(fileURLToPath(import.meta.url)),root=path.dirname(here);
|
|
13
|
+
const version=JSON.parse(fs.readFileSync(path.join(root,'package.json'))).version;
|
|
14
|
+
const releaseKey=fs.readFileSync(path.join(root,'release-key.txt'),'utf8').trim();
|
|
15
|
+
const args=process.argv.slice(2),command=args[0];
|
|
16
|
+
const option=(name,fallback)=>{const i=args.indexOf(name);if(i<0)return fallback;if(!args[i+1]||args[i+1].startsWith('--'))throw Error(name+' requires a value');return args[i+1]};
|
|
17
|
+
const serverRoot=option('--root','/opt/yuze-vlan-server'),config=path.join(serverRoot,'config','server.json'),installed=path.join(serverRoot,'bin','vlan');
|
|
18
|
+
const sleep=ms=>new Promise(r=>setTimeout(r,ms));
|
|
19
|
+
function run(program,argv,capture=false){const r=spawnSync(program,argv,{stdio:capture?['ignore','pipe','inherit']:'inherit',encoding:'utf8'});if(r.error)throw r.error;if(r.status!==0)throw Error(program+' '+argv[0]+' exited '+r.status);return r.stdout}
|
|
20
|
+
function rootOnly(){if(process.platform!=='linux')throw Error('The server runs on Linux');if(process.getuid()!==0){run('/usr/bin/sudo',[process.execPath,fileURLToPath(import.meta.url),...args]);process.exit(0)}}
|
|
21
|
+
const arch={x64:'linux-x64',arm64:'linux-arm64'}[process.arch];
|
|
22
|
+
function nativeBinary(){
|
|
23
|
+
if(!arch)throw Error('Unsupported architecture '+process.arch);
|
|
24
|
+
const dir=path.join(root,'native',arch),manifest=JSON.parse(fs.readFileSync(path.join(dir,'manifest.json'))),file=path.join(dir,'vlan');
|
|
25
|
+
if(crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex')!==manifest.vlan)throw Error('artifact digest mismatch: vlan');
|
|
26
|
+
fs.chmodSync(file,0o755);return file;
|
|
27
|
+
}
|
|
28
|
+
const recoveryCli=()=>path.join(path.dirname(createRequire(import.meta.url).resolve('yuze-vlan-recovery/package.json')),'bin','cli.mjs');
|
|
29
|
+
// healthy: the server rewrote its state file after the restart.
|
|
30
|
+
async function healthy(since){
|
|
31
|
+
const state=JSON.parse(fs.readFileSync(config)).dataDir+'/state.json';
|
|
32
|
+
for(let i=0;i<30;i++){await sleep(1000);try{if(fs.statSync(state).mtimeMs>since&&spawnSync('systemctl',['is-active','--quiet','yuze-vlan-server']).status===0)return true}catch{}}
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
try{
|
|
36
|
+
if(command==='version'){
|
|
37
|
+
console.log('Server CLI '+version);
|
|
38
|
+
if(fs.existsSync(installed))console.log('Installed '+run(installed,['version'],true).trim());
|
|
39
|
+
}else if(command==='init'){
|
|
40
|
+
const file=option('--config');if(!file)throw Error('Usage: yuze-vlan-server init --config init.json [--dry-run]');
|
|
41
|
+
const dry=args.includes('--dry-run'),settings=JSON.parse(fs.readFileSync(path.resolve(file)));
|
|
42
|
+
if(!dry)rootOnly();
|
|
43
|
+
// The server pins the same release key the clients are installed with.
|
|
44
|
+
if(settings.releaseKey&&settings.releaseKey!==releaseKey)throw Error('releaseKey differs from this package; omit it');
|
|
45
|
+
const dir=fs.mkdtempSync('/tmp/vlan-init-'),input=path.join(dir,'init.json');
|
|
46
|
+
fs.writeFileSync(input,JSON.stringify({...settings,releaseKey}),{mode:0o600});
|
|
47
|
+
try{run(nativeBinary(),['init','--config',input,...(dry?['--dry-run']:[])])}finally{fs.rmSync(dir,{recursive:true,force:true})}
|
|
48
|
+
if(!dry){
|
|
49
|
+
run(process.execPath,[recoveryCli(),'setup','--profile',path.join(settings.root||serverRoot,'config/recovery.json')]);
|
|
50
|
+
console.log('Core server and recovery server installed. Dashboard credentials: '+path.join(settings.root||serverRoot,'config/admin-credentials.json'));
|
|
51
|
+
}
|
|
52
|
+
}else if(command==='upgrade'){
|
|
53
|
+
// Replace the binary, restart, and roll back if the server does not come up.
|
|
54
|
+
rootOnly();
|
|
55
|
+
const next=nativeBinary(),previous=installed+'.previous';
|
|
56
|
+
run(next,['check','--config',config]);
|
|
57
|
+
fs.copyFileSync(installed,previous);
|
|
58
|
+
const since=Date.now();
|
|
59
|
+
fs.copyFileSync(next,installed+'.next');fs.chmodSync(installed+'.next',0o755);fs.renameSync(installed+'.next',installed);
|
|
60
|
+
run('systemctl',['restart','yuze-vlan-server']);
|
|
61
|
+
if(await healthy(since)){fs.rmSync(previous);console.log('Server upgraded to '+version)}
|
|
62
|
+
else{fs.renameSync(previous,installed);run('systemctl',['restart','yuze-vlan-server']);throw Error('New server did not become healthy; previous binary restored')}
|
|
63
|
+
}else if(command==='status'){
|
|
64
|
+
run('systemctl',['status','yuze-vlan-server','yuze-vlan-recovery','--no-pager','--lines','5']);
|
|
65
|
+
}else if(command==='register'){
|
|
66
|
+
// Pre-register a device with a chosen address and print its setup file.
|
|
67
|
+
rootOnly();
|
|
68
|
+
const id=option('--id'),ip=option('--ip');if(!id||!ip)throw Error('Usage: yuze-vlan-server register --id DEVICE --ip ADDRESS');
|
|
69
|
+
run(installed,['register','--config',config,'--id',id,'--ip',ip]);
|
|
70
|
+
}else if(command==='fetch'){
|
|
71
|
+
rootOnly();
|
|
72
|
+
const v=option('--version');if(!v)throw Error('Usage: yuze-vlan-server fetch --version V');
|
|
73
|
+
run(installed,['fetch','--config',config,'--version',v]);
|
|
74
|
+
}else if(command==='rules'){
|
|
75
|
+
rootOnly();
|
|
76
|
+
run(installed,['rules','--config',config,'--id',option('--id','core')]);
|
|
77
|
+
}else console.log('yuze-vlan-server init --config init.json [--dry-run]\nyuze-vlan-server upgrade\nyuze-vlan-server status\nyuze-vlan-server register --id DEVICE --ip ADDRESS\nyuze-vlan-server fetch --version V\nyuze-vlan-server rules [--id ENTRY]\nyuze-vlan-server version');
|
|
78
|
+
}catch(e){console.error(e.message);process.exitCode=1}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Copyright 2009 The Go Authors.
|
|
2
|
+
|
|
3
|
+
Redistribution and use in source and binary forms, with or without
|
|
4
|
+
modification, are permitted provided that the following conditions are
|
|
5
|
+
met:
|
|
6
|
+
|
|
7
|
+
* Redistributions of source code must retain the above copyright
|
|
8
|
+
notice, this list of conditions and the following disclaimer.
|
|
9
|
+
* Redistributions in binary form must reproduce the above
|
|
10
|
+
copyright notice, this list of conditions and the following disclaimer
|
|
11
|
+
in the documentation and/or other materials provided with the
|
|
12
|
+
distribution.
|
|
13
|
+
* Neither the name of Google LLC nor the names of its
|
|
14
|
+
contributors may be used to endorse or promote products derived from
|
|
15
|
+
this software without specific prior written permission.
|
|
16
|
+
|
|
17
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
18
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
19
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
20
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
21
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
22
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
23
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
24
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
25
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
26
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
27
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
Prebuilt Binaries License
|
|
2
|
+
-------------------------
|
|
3
|
+
|
|
4
|
+
1. DEFINITIONS. "Software" means the precise contents of the "wintun.dll"
|
|
5
|
+
files that are included in the .zip file that contains this document as
|
|
6
|
+
downloaded from wintun.net/builds.
|
|
7
|
+
|
|
8
|
+
2. LICENSE GRANT. WireGuard LLC grants to you a non-exclusive and
|
|
9
|
+
non-transferable right to use Software for lawful purposes under certain
|
|
10
|
+
obligations and limited rights as set forth in this agreement.
|
|
11
|
+
|
|
12
|
+
3. RESTRICTIONS. Software is owned and copyrighted by WireGuard LLC. It is
|
|
13
|
+
licensed, not sold. Title to Software and all associated intellectual
|
|
14
|
+
property rights are retained by WireGuard. You must not:
|
|
15
|
+
a. reverse engineer, decompile, disassemble, extract from, or otherwise
|
|
16
|
+
modify the Software;
|
|
17
|
+
b. modify or create derivative work based upon Software in whole or in
|
|
18
|
+
parts, except insofar as only the API interfaces of the "wintun.h" file
|
|
19
|
+
distributed alongside the Software (the "Permitted API") are used;
|
|
20
|
+
c. remove any proprietary notices, labels, or copyrights from the Software;
|
|
21
|
+
d. resell, redistribute, lease, rent, transfer, sublicense, or otherwise
|
|
22
|
+
transfer rights of the Software without the prior written consent of
|
|
23
|
+
WireGuard LLC, except insofar as the Software is distributed alongside
|
|
24
|
+
other software that uses the Software only via the Permitted API;
|
|
25
|
+
e. use the name of WireGuard LLC, the WireGuard project, the Wintun
|
|
26
|
+
project, or the names of its contributors to endorse or promote products
|
|
27
|
+
derived from the Software without specific prior written consent.
|
|
28
|
+
|
|
29
|
+
4. LIMITED WARRANTY. THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF
|
|
30
|
+
ANY KIND. WIREGUARD LLC HEREBY EXCLUDES AND DISCLAIMS ALL IMPLIED OR
|
|
31
|
+
STATUTORY WARRANTIES, INCLUDING ANY WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
32
|
+
FOR A PARTICULAR PURPOSE, QUALITY, NON-INFRINGEMENT, TITLE, RESULTS,
|
|
33
|
+
EFFORTS, OR QUIET ENJOYMENT. THERE IS NO WARRANTY THAT THE PRODUCT WILL BE
|
|
34
|
+
ERROR-FREE OR WILL FUNCTION WITHOUT INTERRUPTION. YOU ASSUME THE ENTIRE
|
|
35
|
+
RISK FOR THE RESULTS OBTAINED USING THE PRODUCT. TO THE EXTENT THAT
|
|
36
|
+
WIREGUARD LLC MAY NOT DISCLAIM ANY WARRANTY AS A MATTER OF APPLICABLE LAW,
|
|
37
|
+
THE SCOPE AND DURATION OF SUCH WARRANTY WILL BE THE MINIMUM PERMITTED UNDER
|
|
38
|
+
SUCH LAW. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
|
|
39
|
+
WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR
|
|
40
|
+
A PARTICULAR PURPOSE OR NON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO THE
|
|
41
|
+
EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.
|
|
42
|
+
|
|
43
|
+
5. LIMITATION OF LIABILITY. To the extent not prohibited by law, in no event
|
|
44
|
+
WireGuard LLC or any third-party-developer will be liable for any lost
|
|
45
|
+
revenue, profit or data or for special, indirect, consequential, incidental
|
|
46
|
+
or punitive damages, however caused regardless of the theory of liability,
|
|
47
|
+
arising out of or related to the use of or inability to use Software, even
|
|
48
|
+
if WireGuard LLC has been advised of the possibility of such damages.
|
|
49
|
+
Solely you are responsible for determining the appropriateness of using
|
|
50
|
+
Software and accept full responsibility for all risks associated with its
|
|
51
|
+
exercise of rights under this agreement, including but not limited to the
|
|
52
|
+
risks and costs of program errors, compliance with applicable laws, damage
|
|
53
|
+
to or loss of data, programs or equipment, and unavailability or
|
|
54
|
+
interruption of operations. The foregoing limitations will apply even if
|
|
55
|
+
the above stated warranty fails of its essential purpose. You acknowledge,
|
|
56
|
+
that it is in the nature of software that software is complex and not
|
|
57
|
+
completely free of errors. In no event shall WireGuard LLC or any
|
|
58
|
+
third-party-developer be liable to you under any theory for any damages
|
|
59
|
+
suffered by you or any user of Software or for any special, incidental,
|
|
60
|
+
indirect, consequential or similar damages (including without limitation
|
|
61
|
+
damages for loss of business profits, business interruption, loss of
|
|
62
|
+
business information or any other pecuniary loss) arising out of the use or
|
|
63
|
+
inability to use Software, even if WireGuard LLC has been advised of the
|
|
64
|
+
possibility of such damages and regardless of the legal or quitable theory
|
|
65
|
+
(contract, tort, or otherwise) upon which the claim is based.
|
|
66
|
+
|
|
67
|
+
6. TERMINATION. This agreement is affected until terminated. You may
|
|
68
|
+
terminate this agreement at any time. This agreement will terminate
|
|
69
|
+
immediately without notice from WireGuard LLC if you fail to comply with
|
|
70
|
+
the terms and conditions of this agreement. Upon termination, you must
|
|
71
|
+
delete Software and all copies of Software and cease all forms of
|
|
72
|
+
distribution of Software.
|
|
73
|
+
|
|
74
|
+
7. SEVERABILITY. If any provision of this agreement is held to be
|
|
75
|
+
unenforceable, this agreement will remain in effect with the provision
|
|
76
|
+
omitted, unless omission would frustrate the intent of the parties, in
|
|
77
|
+
which case this agreement will immediately terminate.
|
|
78
|
+
|
|
79
|
+
8. RESERVATION OF RIGHTS. All rights not expressly granted in this agreement
|
|
80
|
+
are reserved by WireGuard LLC. For example, WireGuard LLC reserves the
|
|
81
|
+
right at any time to cease development of Software, to alter distribution
|
|
82
|
+
details, features, specifications, capabilities, functions, licensing
|
|
83
|
+
terms, release dates, APIs, ABIs, general availability, or other
|
|
84
|
+
characteristics of the Software.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright 2023 Toby
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016 the quic-go authors & Google, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
All files in this repository are licensed as follows. If you contribute
|
|
2
|
+
to this repository, it is assumed that you license your contribution
|
|
3
|
+
under the same license unless you state otherwise.
|
|
4
|
+
|
|
5
|
+
All files Copyright (C) 2015 Canonical Ltd. unless otherwise specified in the file.
|
|
6
|
+
|
|
7
|
+
This software is licensed under the LGPLv3, included below.
|
|
8
|
+
|
|
9
|
+
As a special exception to the GNU Lesser General Public License version 3
|
|
10
|
+
("LGPL3"), the copyright holders of this Library give you permission to
|
|
11
|
+
convey to a third party a Combined Work that links statically or dynamically
|
|
12
|
+
to this Library without providing any Minimal Corresponding Source or
|
|
13
|
+
Minimal Application Code as set out in 4d or providing the installation
|
|
14
|
+
information set out in section 4e, provided that you comply with the other
|
|
15
|
+
provisions of LGPL3 and provided that you meet, for the Application the
|
|
16
|
+
terms and conditions of the license(s) which apply to the Application.
|
|
17
|
+
|
|
18
|
+
Except as stated in this special exception, the provisions of LGPL3 will
|
|
19
|
+
continue to comply in full to this Library. If you modify this Library, you
|
|
20
|
+
may apply this exception to your version of this Library, but you are not
|
|
21
|
+
obliged to do so. If you do not wish to do so, delete this exception
|
|
22
|
+
statement from your version. This exception does not (and cannot) modify any
|
|
23
|
+
license terms which apply to the Application, with which you must still
|
|
24
|
+
comply.
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
|
28
|
+
Version 3, 29 June 2007
|
|
29
|
+
|
|
30
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
|
31
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
32
|
+
of this license document, but changing it is not allowed.
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
This version of the GNU Lesser General Public License incorporates
|
|
36
|
+
the terms and conditions of version 3 of the GNU General Public
|
|
37
|
+
License, supplemented by the additional permissions listed below.
|
|
38
|
+
|
|
39
|
+
0. Additional Definitions.
|
|
40
|
+
|
|
41
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
42
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
43
|
+
General Public License.
|
|
44
|
+
|
|
45
|
+
"The Library" refers to a covered work governed by this License,
|
|
46
|
+
other than an Application or a Combined Work as defined below.
|
|
47
|
+
|
|
48
|
+
An "Application" is any work that makes use of an interface provided
|
|
49
|
+
by the Library, but which is not otherwise based on the Library.
|
|
50
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
|
51
|
+
of using an interface provided by the Library.
|
|
52
|
+
|
|
53
|
+
A "Combined Work" is a work produced by combining or linking an
|
|
54
|
+
Application with the Library. The particular version of the Library
|
|
55
|
+
with which the Combined Work was made is also called the "Linked
|
|
56
|
+
Version".
|
|
57
|
+
|
|
58
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
|
59
|
+
Corresponding Source for the Combined Work, excluding any source code
|
|
60
|
+
for portions of the Combined Work that, considered in isolation, are
|
|
61
|
+
based on the Application, and not on the Linked Version.
|
|
62
|
+
|
|
63
|
+
The "Corresponding Application Code" for a Combined Work means the
|
|
64
|
+
object code and/or source code for the Application, including any data
|
|
65
|
+
and utility programs needed for reproducing the Combined Work from the
|
|
66
|
+
Application, but excluding the System Libraries of the Combined Work.
|
|
67
|
+
|
|
68
|
+
1. Exception to Section 3 of the GNU GPL.
|
|
69
|
+
|
|
70
|
+
You may convey a covered work under sections 3 and 4 of this License
|
|
71
|
+
without being bound by section 3 of the GNU GPL.
|
|
72
|
+
|
|
73
|
+
2. Conveying Modified Versions.
|
|
74
|
+
|
|
75
|
+
If you modify a copy of the Library, and, in your modifications, a
|
|
76
|
+
facility refers to a function or data to be supplied by an Application
|
|
77
|
+
that uses the facility (other than as an argument passed when the
|
|
78
|
+
facility is invoked), then you may convey a copy of the modified
|
|
79
|
+
version:
|
|
80
|
+
|
|
81
|
+
a) under this License, provided that you make a good faith effort to
|
|
82
|
+
ensure that, in the event an Application does not supply the
|
|
83
|
+
function or data, the facility still operates, and performs
|
|
84
|
+
whatever part of its purpose remains meaningful, or
|
|
85
|
+
|
|
86
|
+
b) under the GNU GPL, with none of the additional permissions of
|
|
87
|
+
this License applicable to that copy.
|
|
88
|
+
|
|
89
|
+
3. Object Code Incorporating Material from Library Header Files.
|
|
90
|
+
|
|
91
|
+
The object code form of an Application may incorporate material from
|
|
92
|
+
a header file that is part of the Library. You may convey such object
|
|
93
|
+
code under terms of your choice, provided that, if the incorporated
|
|
94
|
+
material is not limited to numerical parameters, data structure
|
|
95
|
+
layouts and accessors, or small macros, inline functions and templates
|
|
96
|
+
(ten or fewer lines in length), you do both of the following:
|
|
97
|
+
|
|
98
|
+
a) Give prominent notice with each copy of the object code that the
|
|
99
|
+
Library is used in it and that the Library and its use are
|
|
100
|
+
covered by this License.
|
|
101
|
+
|
|
102
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
103
|
+
document.
|
|
104
|
+
|
|
105
|
+
4. Combined Works.
|
|
106
|
+
|
|
107
|
+
You may convey a Combined Work under terms of your choice that,
|
|
108
|
+
taken together, effectively do not restrict modification of the
|
|
109
|
+
portions of the Library contained in the Combined Work and reverse
|
|
110
|
+
engineering for debugging such modifications, if you also do each of
|
|
111
|
+
the following:
|
|
112
|
+
|
|
113
|
+
a) Give prominent notice with each copy of the Combined Work that
|
|
114
|
+
the Library is used in it and that the Library and its use are
|
|
115
|
+
covered by this License.
|
|
116
|
+
|
|
117
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
118
|
+
document.
|
|
119
|
+
|
|
120
|
+
c) For a Combined Work that displays copyright notices during
|
|
121
|
+
execution, include the copyright notice for the Library among
|
|
122
|
+
these notices, as well as a reference directing the user to the
|
|
123
|
+
copies of the GNU GPL and this license document.
|
|
124
|
+
|
|
125
|
+
d) Do one of the following:
|
|
126
|
+
|
|
127
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
|
128
|
+
License, and the Corresponding Application Code in a form
|
|
129
|
+
suitable for, and under terms that permit, the user to
|
|
130
|
+
recombine or relink the Application with a modified version of
|
|
131
|
+
the Linked Version to produce a modified Combined Work, in the
|
|
132
|
+
manner specified by section 6 of the GNU GPL for conveying
|
|
133
|
+
Corresponding Source.
|
|
134
|
+
|
|
135
|
+
1) Use a suitable shared library mechanism for linking with the
|
|
136
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
|
137
|
+
a copy of the Library already present on the user's computer
|
|
138
|
+
system, and (b) will operate properly with a modified version
|
|
139
|
+
of the Library that is interface-compatible with the Linked
|
|
140
|
+
Version.
|
|
141
|
+
|
|
142
|
+
e) Provide Installation Information, but only if you would otherwise
|
|
143
|
+
be required to provide such information under section 6 of the
|
|
144
|
+
GNU GPL, and only to the extent that such information is
|
|
145
|
+
necessary to install and execute a modified version of the
|
|
146
|
+
Combined Work produced by recombining or relinking the
|
|
147
|
+
Application with a modified version of the Linked Version. (If
|
|
148
|
+
you use option 4d0, the Installation Information must accompany
|
|
149
|
+
the Minimal Corresponding Source and Corresponding Application
|
|
150
|
+
Code. If you use option 4d1, you must provide the Installation
|
|
151
|
+
Information in the manner specified by section 6 of the GNU GPL
|
|
152
|
+
for conveying Corresponding Source.)
|
|
153
|
+
|
|
154
|
+
5. Combined Libraries.
|
|
155
|
+
|
|
156
|
+
You may place library facilities that are a work based on the
|
|
157
|
+
Library side by side in a single library together with other library
|
|
158
|
+
facilities that are not Applications and are not covered by this
|
|
159
|
+
License, and convey such a combined library under terms of your
|
|
160
|
+
choice, if you do both of the following:
|
|
161
|
+
|
|
162
|
+
a) Accompany the combined library with a copy of the same work based
|
|
163
|
+
on the Library, uncombined with any other library facilities,
|
|
164
|
+
conveyed under the terms of this License.
|
|
165
|
+
|
|
166
|
+
b) Give prominent notice with the combined library that part of it
|
|
167
|
+
is a work based on the Library, and explaining where to find the
|
|
168
|
+
accompanying uncombined form of the same work.
|
|
169
|
+
|
|
170
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
|
171
|
+
|
|
172
|
+
The Free Software Foundation may publish revised and/or new versions
|
|
173
|
+
of the GNU Lesser General Public License from time to time. Such new
|
|
174
|
+
versions will be similar in spirit to the present version, but may
|
|
175
|
+
differ in detail to address new problems or concerns.
|
|
176
|
+
|
|
177
|
+
Each version is given a distinguishing version number. If the
|
|
178
|
+
Library as you received it specifies that a certain numbered version
|
|
179
|
+
of the GNU Lesser General Public License "or any later version"
|
|
180
|
+
applies to it, you have the option of following the terms and
|
|
181
|
+
conditions either of that published version or of any later version
|
|
182
|
+
published by the Free Software Foundation. If the Library as you
|
|
183
|
+
received it does not specify a version number of the GNU Lesser
|
|
184
|
+
General Public License, you may choose any version of the GNU Lesser
|
|
185
|
+
General Public License ever published by the Free Software Foundation.
|
|
186
|
+
|
|
187
|
+
If the Library as you received it specifies that a proxy can decide
|
|
188
|
+
whether future versions of the GNU Lesser General Public License shall
|
|
189
|
+
apply, that proxy's public statement of acceptance of any version is
|
|
190
|
+
permanent authorization for you to choose that version for the
|
|
191
|
+
Library.
|