Compare commits
827 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d5c504de36 | |||
| 8dffc4db46 | |||
| 42c8c70609 | |||
| d76a94e8e4 | |||
| 31972b5f84 | |||
| 8e813f33ec | |||
| 3f9858c4c1 | |||
| c8aeaaf823 | |||
| ff5a1c7509 | |||
| 82cf328217 | |||
| 6e120262bb | |||
| 077f35d340 | |||
| e4da5f77c6 | |||
| b10eb4ce30 | |||
| 958e3c6964 | |||
| 4dee0d6f46 | |||
| 1942248a09 | |||
| 19ab088892 | |||
| 1825373013 | |||
| 1166cc29dd | |||
| d1405a9674 | |||
| 9c8fe8c685 | |||
| 49384e3a19 | |||
| 17fdea7d84 | |||
| 3e91596048 | |||
| b4161bad75 | |||
| 1e6fc3f143 | |||
| 3442a4c8a8 | |||
| 853ed1e681 | |||
| 19ad6631f6 | |||
| ba59eee1c2 | |||
| 19bc0bdf8d | |||
| ba4e584f7f | |||
| d4eed4a687 | |||
| ccd81d1de3 | |||
| 35e4c35099 | |||
| 3fac1b465c | |||
| a532874ac1 | |||
| 45cea25e08 | |||
| 0370665a93 | |||
| 1321684c4a | |||
| 1b7da8a834 | |||
| f58571abbb | |||
| 53757e625a | |||
| 2d5ef6ef6b | |||
| a2fbee6225 | |||
| 90ab157ed0 | |||
| ef436a1f8d | |||
| 1ee35daf75 | |||
| 321bbcca24 | |||
| 2326db3515 | |||
| 2579a91dab | |||
| e2a9e55ce5 | |||
| e0c11e55c0 | |||
| abd2f5e81b | |||
| b2d85e8794 | |||
| d07b6a12e6 | |||
| 2159fd54ce | |||
| dc65fadb2b | |||
| 875d0609dd | |||
| 0de5e7e817 | |||
| ae1f4e1b0a | |||
| 70a0f000c8 | |||
| 2743eb8ea4 | |||
| 42303a7703 | |||
| d835abb644 | |||
| 0ecab34713 | |||
| 89e906ce13 | |||
| f3e7191995 | |||
| 87b6ecedb6 | |||
| 97b158bb46 | |||
| 0c3bac4acf | |||
| f02b6456b6 | |||
| 623346a79d | |||
| 264e40ea71 | |||
| 5e0125656e | |||
| 88e1f79bb5 | |||
| 396a47f032 | |||
| 87f4f27c95 | |||
| 8eee7356df | |||
| a42a686be8 | |||
| 5aa51bb984 | |||
| 9b92df795d | |||
| 66ba6ff2a6 | |||
| f7f903334d | |||
| 42d659a381 | |||
| 6241567a04 | |||
| 6036603c79 | |||
| 0b3f6131cc | |||
| 3c3e15085a | |||
| 9f60154705 | |||
| 19cbb45eba | |||
| aad1030058 | |||
| ee4b983a50 | |||
| 5a2df5af96 | |||
| 7ad8b6699b | |||
| 30ab971071 | |||
| 2012b56319 | |||
| c2b479aee4 | |||
| 188297ab1b | |||
| 869e343631 | |||
| c326115b5f | |||
| ef4cd6e03a | |||
| 8ac39a06c2 | |||
| 823b8a1a15 | |||
| 468d8b9a29 | |||
| ae216753f5 | |||
| 4cd7fc7059 | |||
| c70b47638c | |||
| a96af60852 | |||
| b03ac3daa7 | |||
| a7b13d74c2 | |||
| e7e16e3758 | |||
| 73f88a4816 | |||
| 2dadbac31d | |||
| ad0552b421 | |||
| c1addcea20 | |||
| 247e017334 | |||
| 8355baf861 | |||
| d3d6957b0a | |||
| d483b1ccc5 | |||
| 0dc4778c15 | |||
| a22f1b850a | |||
| 0564209def | |||
| bea031ad2d | |||
| 042540a82e | |||
| b15230ab1f | |||
| 916652ed8c | |||
| 063286f038 | |||
| 78e2326a37 | |||
| 23f21b3a40 | |||
| 9433695222 | |||
| c957de60db | |||
| d105cb7255 | |||
| 1af7e5ec55 | |||
| 7e539f0e4a | |||
| c47ebc0504 | |||
| 29118fb7cd | |||
| 0ec546fa63 | |||
| 4861b97bf8 | |||
| bc8093faf1 | |||
| 97933d72f9 | |||
| 554edbf84c | |||
| 650a97c836 | |||
| ff24b10507 | |||
| 7cbd5a5bbf | |||
| f55cff054c | |||
| a6dd100eb6 | |||
| 8b4b17083d | |||
| 7dafca91d4 | |||
| 8dfc166033 | |||
| 6f70ddef8c | |||
| 809e3c9d4e | |||
| e6a86b0097 | |||
| c12f916a94 | |||
| 2c9a2e1ac0 | |||
| 99b25fb97e | |||
| ab5f9e1105 | |||
| a867fa311d | |||
| 5461968282 | |||
| a5af85057f | |||
| 79c349ff66 | |||
| ced0e4517d | |||
| d0c9c01d63 | |||
| 04400ec31e | |||
| 85785d3568 | |||
| 8c5814307b | |||
| e2d4b1e3b1 | |||
| 550e094efe | |||
| 94533e7e71 | |||
| 5cb9bbbc89 | |||
| f7da80f4c0 | |||
| 64d095ec5e | |||
| 5c6caf150e | |||
| 43c09bb0ff | |||
| 93dbad2f41 | |||
| a1e23efd99 | |||
| cd4b8af445 | |||
| 3c2470e942 | |||
| de3a1aab1b | |||
| 0149f93721 | |||
| 8daba3e92f | |||
| 8127bfbdbf | |||
| 7cb9a97025 | |||
| a2fa115e38 | |||
| b8be645121 | |||
| 456ffbe062 | |||
| 5cdd8ba0c5 | |||
| 1e2d499794 | |||
| 144c9af8c7 | |||
| b7d56880ff | |||
| 20d55be54f | |||
| 920ee5d636 | |||
| 1cb4700ac1 | |||
| 46de03bcc4 | |||
| 8b96d4f0ab | |||
| 48042e2b59 | |||
| b2d6f92d47 | |||
| 063a7fc830 | |||
| 0c12822567 | |||
| 38f0ac840b | |||
| 8db4fd740d | |||
| 456ab796b3 | |||
| 2fbc5b04a3 | |||
| 5c2aa39196 | |||
| 513bda8fe7 | |||
| 48b4e4bb2f | |||
| e7cb217e5f | |||
| a672645225 | |||
| 3428b5b457 | |||
| 15eabf7c66 | |||
| 8df6b549ac | |||
| 39a896ea20 | |||
| acc6c680d4 | |||
| 3fd9f7cff8 | |||
| a672329501 | |||
| 5f119688a3 | |||
| dbf7cc7cac | |||
| 6198a8284e | |||
| f0547dd9cc | |||
| fbc2b6fe2a | |||
| 2e3059dad6 | |||
| c00668f174 | |||
| 55b74becdc | |||
| d2ca41c59d | |||
| 4df1f413a4 | |||
| 3937d6d5de | |||
| 9d2667bba3 | |||
| 803f063d64 | |||
| f323d54c18 | |||
| ad3fad44e5 | |||
| fc975a5156 | |||
| 064e5dfef5 | |||
| 6a3a24f724 | |||
| 8bdc7a11ef | |||
| 2d2602f0f8 | |||
| 095d6d827f | |||
| c810c612de | |||
| dbcfd527b8 | |||
| 117c79c855 | |||
| 8b083e8e26 | |||
| 32f805aa3f | |||
| 50ec6ecd9f | |||
| d3834ff7f7 | |||
| 64d8420cee | |||
| 796cf757d4 | |||
| 4bb4f65d48 | |||
| 5b916ec5a9 | |||
| c5e43c7fbf | |||
| 807dfc6635 | |||
| 4e1a2dcdba | |||
| 843e53e83a | |||
| 5f911e6fb4 | |||
| 6c42cd62df | |||
| a4a4954344 | |||
| 5d20081fca | |||
| f46abedd1a | |||
| 0548e480b4 | |||
| 6b9455f6ea | |||
| 17108a52a3 | |||
| 47ebc77458 | |||
| 87e57dea56 | |||
| 24b4c02d9f | |||
| f2a3e16a1c | |||
| 6530a6d8e9 | |||
| b741d79ba7 | |||
| eeda3ca4ec | |||
| 992f91bb8a | |||
| 2f3ad231c7 | |||
| 6e41d3c6df | |||
| f57f3f3c9a | |||
| 34fda42766 | |||
| a9536f4091 | |||
| 7770ad3ca7 | |||
| 02b3373f51 | |||
| 5153af0618 | |||
| d50c3a00a5 | |||
| 4618c2c081 | |||
| 34d78085c8 | |||
| 0381b73635 | |||
| 2e88529e3d | |||
| 84e3f61902 | |||
| 9623493aee | |||
| e5ad7d2fe4 | |||
| 940179ffe5 | |||
| f7b27a527b | |||
| caac7dc1bf | |||
| a0f815534b | |||
| 928c2c5cb4 | |||
| ddc8b65f8a | |||
| 0b67659efa | |||
| 0601d9cad9 | |||
| a1b6ebd9f5 | |||
| b8eedaab51 | |||
| 0afc3252c6 | |||
| 685f1bc502 | |||
| 3e642dd638 | |||
| 22ad68e43e | |||
| 1dd86807fd | |||
| 96747bda89 | |||
| e15514dd4f | |||
| 7556ee2c06 | |||
| 992a902590 | |||
| 100f12e7c1 | |||
| 3de66a5873 | |||
| 49360188f5 | |||
| 35c48ba846 | |||
| 1ad4262086 | |||
| b633694f74 | |||
| ab16bd7bcf | |||
| 1080ab5cb2 | |||
| a2845ddafe | |||
| c968b64b51 | |||
| 12833dc6da | |||
| 8c4f2a9f2d | |||
| 9a6b6cfb2d | |||
| b28ca5f27d | |||
| 92f187bf91 | |||
| 9f1f4b44ca | |||
| b00d46105b | |||
| 7d6ccd4ce6 | |||
| b5371421e1 | |||
| 07d305c54e | |||
| 78c525f47a | |||
| 978a881372 | |||
| ee733b04f3 | |||
| 0d8ef226c1 | |||
| feca07558e | |||
| 0de15af10e | |||
| d4bc92f562 | |||
| a1439689dd | |||
| 63126c75fa | |||
| 940302a825 | |||
| 9c374f849b | |||
| 2fa4d0e11b | |||
| d7796e1459 | |||
| 759361d9f6 | |||
| b2529c250a | |||
| 8a7712ec42 | |||
| 9609cfb33a | |||
| 1fe7c60f36 | |||
| f1339f0711 | |||
| b3f56cea81 | |||
| 9bd702d60f | |||
| c8b42626a9 | |||
| 4ef15507d9 | |||
| 8a4b3a4db6 | |||
| 8bce9ca9b7 | |||
| 5574037b73 | |||
| d1ca9aee39 | |||
| f850ca5cb7 | |||
| 4ee01cad4b | |||
| 5518b45219 | |||
| 0279907ca9 | |||
| 5fe481ffed | |||
| c7cc15d8d0 | |||
| 22416badcf | |||
| ef0d77f1d6 | |||
| 1d4af8c74e | |||
| ec9492c933 | |||
| fa03ae885f | |||
| ea98aaf856 | |||
| 794d16bdaa | |||
| a3ac56f849 | |||
| 6130f37336 | |||
| 6b6fef5ccc | |||
| 83df7e1b20 | |||
| a18310e04a | |||
| dd7f9176fa | |||
| d5fbc24c96 | |||
| d765f9c2c3 | |||
| 21fd5de139 | |||
| 42f22c110c | |||
| 9822c5a72a | |||
| 452a395525 | |||
| 80d81c34bb | |||
| b9353326f5 | |||
| 3ffc64f129 | |||
| e869517bb1 | |||
| 90f4bf35e9 | |||
| 80d6fe0298 | |||
| e017fe96d5 | |||
| e7ac0198ab | |||
| 927a51cda7 | |||
| 615dc1ed83 | |||
| 20de618568 | |||
| 7451f1b7b4 | |||
| 5814b0ab6a | |||
| 5a5450070a | |||
| 19ec9992be | |||
| b55880b43c | |||
| 6a7af7e6c4 | |||
| a8171375a8 | |||
| de33c7d521 | |||
| ff372800bd | |||
| aac05b7faf | |||
| 61e5a42ef7 | |||
| 19f2f6d730 | |||
| dce17062a3 | |||
| dcb0743cbe | |||
| 644fd6f1bb | |||
| 94ee8f8c78 | |||
| 53a8963fc4 | |||
| 56ab7065ac | |||
| 1e8394b3c4 | |||
| 01f26c1a79 | |||
| 8c27010396 | |||
| 35e7f4b59c | |||
| d08516a72d | |||
| 479cc1fa0f | |||
| 3c636406af | |||
| 578f1432a0 | |||
| f403c85f0a | |||
| db25c7e426 | |||
| 98b67534cb | |||
| 09d3cf08f3 | |||
| 9b3d32811f | |||
| 26d391ea96 | |||
| c044996014 | |||
| 34b04968b2 | |||
| c44a3f2673 | |||
| e46adcd1da | |||
| d1506f26ab | |||
| 23194d13d2 | |||
| 131dec892d | |||
| c2e6105aff | |||
| f5202f596d | |||
| 3bf8859ff9 | |||
| 9a905e83f7 | |||
| 4b9df95721 | |||
| e14f51ef7e | |||
| 5d49ce17a6 | |||
| e5753d2b26 | |||
| e9e3103938 | |||
| 44188975ca | |||
| 3f8d4e78d8 | |||
| 1c01a3b1ac | |||
| a5c40255c7 | |||
| 6080bd83b5 | |||
| 8cb9d8bb32 | |||
| 3c613e40bf | |||
| 7fed9e2324 | |||
| afe7aab751 | |||
| accd4776cb | |||
| 6aabab866c | |||
| 4981a41a0a | |||
| 9daced06e4 | |||
| 8299065eb2 | |||
| 67549d54a3 | |||
| c0690d888e | |||
| ed9fd097e9 | |||
| 3c8de8279b | |||
| 6d8ce34e4a | |||
| 7c7df3bdde | |||
| d9767d1011 | |||
| 136dfbbea0 | |||
| 7c8a1e06af | |||
| 296e7da865 | |||
| 0f84db322a | |||
| 70ca59d96f | |||
| 0669493d9b | |||
| ef38125277 | |||
| 4107e7f77c | |||
| f3c6b85827 | |||
| cf31ab6ecd | |||
| 76a4506a62 | |||
| c16f805df6 | |||
| 7ad8b42609 | |||
| b139dfdfee | |||
| 72c559bf10 | |||
| 9b6a813c6f | |||
| 0830d81b3d | |||
| 3ed64003d3 | |||
| 6f1e707c2f | |||
| 300efe5367 | |||
| 375ce6ca7e | |||
| 8eff09a607 | |||
| 0885def533 | |||
| 48b1bc3185 | |||
| 99533fabf4 | |||
| 88a1c7a96a | |||
| 38ac6e575b | |||
| 51010fdea3 | |||
| 9b6704c39b | |||
| 8de0718650 | |||
| 10b1355c2c | |||
| ec56af6a8e | |||
| 0549eb04d7 | |||
| dd49c692b1 | |||
| 024360ac65 | |||
| c2f04e41f3 | |||
| b8d2c6ef5a | |||
| a7b4a132cd | |||
| 94c9057a12 | |||
| e7bc32d38f | |||
| a8d0520ec5 | |||
| 63d13f4c27 | |||
| 0c8d37033a | |||
| fd604e2869 | |||
| 990057be0d | |||
| d65ebdcb0f | |||
| cd7252b864 | |||
| 284f9d3a94 | |||
| 98f26c2bf7 | |||
| d7db6a56d3 | |||
| 8389c026fa | |||
| 6cb5b37c23 | |||
| 058c2a4abb | |||
| 839a7d271b | |||
| d53c5d45cf | |||
| be4fa6f0d7 | |||
| deced2492f | |||
| 0eb6567eb8 | |||
| 2c40d50435 | |||
| 5c5c54bbd7 | |||
| 772e14cc3d | |||
| a2802647f2 | |||
| 79b2db0987 | |||
| 9cbbcc3bea | |||
| f4571af3c5 | |||
| 5808589cf8 | |||
| 48e4d9a84d | |||
| 5ee1abde46 | |||
| aca1c69f32 | |||
| 19f71e7d68 | |||
| 7583b547c2 | |||
| f67201eaa9 | |||
| ba7129b67f | |||
| 0642e2910e | |||
| e5968f2444 | |||
| 1bbdbcbbaf | |||
| 5a85e9a91f | |||
| 20342a5cc9 | |||
| 4259327fbf | |||
| 9cdd0920a4 | |||
| feb52889c1 | |||
| 70ef1a3717 | |||
| b13712a430 | |||
| 8e350d4c60 | |||
| 824d9ba4ff | |||
| 5da98d3d12 | |||
| a77faafdf7 | |||
| 61f4dab638 | |||
| 66fd3954c7 | |||
| 772e2270c4 | |||
| 2955dfa5c0 | |||
| 48e9c1d42f | |||
| 044b7d0de4 | |||
| a969248744 | |||
| 7d046e607d | |||
| ee77bd11c9 | |||
| 821021e66f | |||
| 68bd5a6c67 | |||
| e49e69de88 | |||
| a3f9ad17c0 | |||
| b943691d18 | |||
| bc051ee678 | |||
| c7a2d1af23 | |||
| 93fbb31273 | |||
| b4eb6f7ea4 | |||
| 00ff6f0b50 | |||
| 324042f956 | |||
| e466d03ec5 | |||
| 89ba09f872 | |||
| a322c46ca4 | |||
| 0915a3e2d9 | |||
| 07eceaf72f | |||
| 0e1396e177 | |||
| e59f21984f | |||
| 8c508acd32 | |||
| 26e7af7675 | |||
| 2fadf53dea | |||
| 2b58ce4d5e | |||
| 9755bacc55 | |||
| 8b16ce0c5d | |||
| 20e6d7931e | |||
| c908d00c62 | |||
| 55b49699eb | |||
| 91fe291341 | |||
| eec6bbb598 | |||
| d2243fa1c2 | |||
| 6e7dd7c1c4 | |||
| e40e15287b | |||
| 800969b9cc | |||
| 5917068add | |||
| 9b14d62830 | |||
| 25503a688b | |||
| 868adc6cee | |||
| 528e30f3dc | |||
| cc42d20e67 | |||
| d189470539 | |||
| 6fdd9f91fa | |||
| 69c2d12fcd | |||
| 174e4a2c79 | |||
| 847ab20a63 | |||
| 09c32a5555 | |||
| 220c943642 | |||
| e5d709c34f | |||
| 1e359a3b8e | |||
| dbff6358db | |||
| d5c05a0cdd | |||
| 1d24d2a84c | |||
| d35dac2de8 | |||
| 01141f77e2 | |||
| 56f765a15a | |||
| 639b7f4b38 | |||
| babda3acd1 | |||
| 197b72cad0 | |||
| 1910c7081b | |||
| eda0fc80b0 | |||
| f6e5356109 | |||
| 11da25b4c0 | |||
| 2599032581 | |||
| ed58d60e84 | |||
| a126e76eef | |||
| c472dfe807 | |||
| c883f13bf8 | |||
| b320f0b326 | |||
| 9812120ed6 | |||
| 9ebd3b0315 | |||
| 24afa12be2 | |||
| 310689312c | |||
| e7f4bc44e7 | |||
| 165937f88b | |||
| a5d81de62b | |||
| ba2b3494cf | |||
| 1944415371 | |||
| 4130fdda1c | |||
| e4ef4c43bd | |||
| afdf639d9b | |||
| f2d6b9a5dd | |||
| e3b61baf11 | |||
| 20732860cf | |||
| 7f14ab8a54 | |||
| 87d4c5b0fd | |||
| 0f58f82e52 | |||
| 16b73a2030 | |||
| a32954785d | |||
| 2789fc299f | |||
| 0257ecba0b | |||
| 17fc64b1fe | |||
| fbc818b5f3 | |||
| a4292795d1 | |||
| 529e16c0c7 | |||
| e1adc1456f | |||
| f1f4a88ae3 | |||
| 8fdbb0f442 | |||
| 9efb1b29df | |||
| 2c07f5f121 | |||
| 953f6fdcf2 | |||
| d66e384137 | |||
| 80bf70502f | |||
| 7f6cf26617 | |||
| c9cf39bb76 | |||
| 93afb646ca | |||
| 4b358acbde | |||
| b97dbc8149 | |||
| e1292ae922 | |||
| 3e812b5530 | |||
| b1e268bf63 | |||
| 887c4608b4 | |||
| 49e33cfd57 | |||
| 842733caa3 | |||
| b6b56fdba8 | |||
| 8163d5e52f | |||
| 7aca0aee13 | |||
| 39fc34ef26 | |||
| be06339bd7 | |||
| 00c1047734 | |||
| a6c54ada50 | |||
| 8803c6755b | |||
| cdab9df5c1 | |||
| 75b8c1d9e9 | |||
| 557fb7d97b | |||
| bb85e58008 | |||
| b8c1375f4f | |||
| a96f6f33df | |||
| a55061a2cd | |||
| e6d3dd926c | |||
| 95dc089943 | |||
| dafef923f0 | |||
| 5095a701eb | |||
| a157484105 | |||
| 0e4bf4414c | |||
| 0a2a9d66e1 | |||
| c4ff5d0621 | |||
| ff1391694d | |||
| 368ae4e89d | |||
| a539c092f5 | |||
| dbf44e6204 | |||
| 448b029c17 | |||
| f06082ce82 | |||
| 272763bdc3 | |||
| 1dd2dfc684 | |||
| b5cb76cd7d | |||
| 4f7161ae9e | |||
| f3d184e06d | |||
| 12404cc9a0 | |||
| 0eabdec559 | |||
| 8646837035 | |||
| a164c6adb5 | |||
| 7de2c01418 | |||
| 7f11076f45 | |||
| 3f32aab8bd | |||
| 275e706ee5 | |||
| 7608a7cb18 | |||
| e6293e3015 | |||
| a44bc0a4fc | |||
| a2221b0903 | |||
| 6ab4111182 | |||
| 8fb044b61d | |||
| 06ec35e1e7 | |||
| e94b08827c | |||
| 5d1ab3be67 | |||
| 383b29ce21 | |||
| 85c9e0f4c6 | |||
| 7e3c105d78 | |||
| 6a3f1f40f9 | |||
| b33c660c3e | |||
| cd04e04d34 | |||
| 7dfbed0186 | |||
| 3dbefc8d84 | |||
| 077b385c0f | |||
| 3f203966d4 | |||
| 0ab8b23de4 | |||
| a18787efcb | |||
| 68465270bf | |||
| b88eb08ec2 | |||
| 8995b5e874 | |||
| 9fe4c67aa0 | |||
| d6e2a10e59 | |||
| 03c7dbc357 | |||
| 27f33038a9 | |||
| 57b0957d3e | |||
| 2174ececd1 | |||
| a61b38b4d3 | |||
| ea84ebdda7 | |||
| a972ea51aa | |||
| f89a4f4481 | |||
| 0e07ca6bd3 | |||
| aaba9f2f80 | |||
| 0ba70330db | |||
| bb55ec4cfe | |||
| 90f8b46c84 | |||
| 51b34131d2 | |||
| 06374dc5ea | |||
| 151c1fc157 | |||
| 696b09f508 | |||
| 270fe60c1d | |||
| 50a224c9f6 | |||
| 2efe5877a4 | |||
| c1de6d9621 | |||
| 2ae2717a5b | |||
| 0a25dc5730 | |||
| 1d6d6e6796 | |||
| 4e8b79deca | |||
| 0ddc4362a0 | |||
| 9d423e3443 | |||
| 1c3d3d57a4 | |||
| edbfe53d1a | |||
| 81c1044bae | |||
| 3777d73c50 | |||
| 9365e9afdf | |||
| 9d738285ab | |||
| c7de64cc02 | |||
| 149e3f4d72 | |||
| f1ba3bc5ab | |||
| cea123f5b0 | |||
| 927414dbaf | |||
| 2ac16fd1cb | |||
| 59c64e4633 | |||
| 74924cff88 | |||
| f0328a8912 | |||
| afc1b5cca6 | |||
| b0ca64b2ff | |||
| d8e5aa17f3 | |||
| 9002b0c4b1 | |||
| 33eaaf2e6b | |||
| bdb15e16af | |||
| 0ec491bf3e | |||
| 389d03e699 | |||
| e2210d247a | |||
| 586a60ab96 | |||
| 104b369fdd | |||
| c96b8cbad1 | |||
| f16176e927 | |||
| 0c5a8d56c9 | |||
| 7428512222 | |||
| 759a9b2dbf | |||
| 1ed23317cb | |||
| 9b55f1f29c | |||
| 5d26426074 | |||
| 39ff53f2ba | |||
| 96d264d15f | |||
| 6c23951d74 | |||
| 6ea8a927a3 | |||
| 4d0b4929c5 | |||
| d6c8964380 | |||
| ed25eed31e | |||
| 6fdcc8c07c | |||
| f82925dbcb | |||
| 71e22bc328 | |||
| e86b29c03a | |||
| 672e866897 | |||
| 80ecb3c5d2 | |||
| 134e27feb6 | |||
| 524ab50df7 | |||
| 8cd32d35e2 | |||
| 307e5d1b50 | |||
| ff66a5cf97 | |||
| dcf6cdab9b | |||
| 2649bfbd25 | |||
| 3eab3ba4b5 | |||
| 975b4ab395 | |||
| c40ee037da | |||
| 719ab3b265 | |||
| ad45c0d654 | |||
| 7d7a052f5f | |||
| aafa4bf145 | |||
| baa0adf529 | |||
| fdd005a3ec | |||
| ed48b22f7f | |||
| a7bfb80547 | |||
| 0710c61909 | |||
| 85dcb06014 | |||
| c880c5e6bb | |||
| 22f5acd0ff |
77
.drone.yml
Normal file
77
.drone.yml
Normal file
@@ -0,0 +1,77 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: web_build
|
||||
image: node:23
|
||||
volumes:
|
||||
- name: web_app
|
||||
path: /tmp/web_build
|
||||
commands:
|
||||
- cd virtweb_frontend
|
||||
- npm install
|
||||
- npm run lint
|
||||
- npm run build
|
||||
- mv dist /tmp/web_build
|
||||
|
||||
- name: backend_check
|
||||
image: rust
|
||||
volumes:
|
||||
- name: rust_registry
|
||||
path: /usr/local/cargo/registry
|
||||
commands:
|
||||
- apt update && apt install -y libvirt-dev
|
||||
- rustup component add clippy
|
||||
- cd virtweb_backend
|
||||
- cargo clippy -- -D warnings
|
||||
- cargo clippy --examples -- -D warnings
|
||||
- cargo test
|
||||
|
||||
- name: backend_compile
|
||||
image: rust
|
||||
volumes:
|
||||
- name: rust_registry
|
||||
path: /usr/local/cargo/registry
|
||||
- name: web_app
|
||||
path: /tmp/web_build
|
||||
- name: release
|
||||
path: /tmp/release
|
||||
depends_on:
|
||||
- backend_check
|
||||
- web_build
|
||||
commands:
|
||||
- apt update && apt install -y libvirt-dev
|
||||
- cd virtweb_backend
|
||||
- mv /tmp/web_build/dist static
|
||||
- cargo build --release
|
||||
- cargo build --release --example api_curl
|
||||
- ls -lah target/release/virtweb_backend target/release/examples/api_curl
|
||||
- cp target/release/virtweb_backend target/release/examples/api_curl /tmp/release
|
||||
|
||||
- name: gitea_release
|
||||
image: plugins/gitea-release
|
||||
depends_on:
|
||||
- backend_compile
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
volumes:
|
||||
- name: release
|
||||
path: /tmp/release
|
||||
environment:
|
||||
PLUGIN_API_KEY:
|
||||
from_secret: API_KEY
|
||||
settings:
|
||||
base_url: https://gitea.communiquons.org
|
||||
files: /tmp/release/*
|
||||
checksum: sha512
|
||||
|
||||
volumes:
|
||||
- name: rust_registry
|
||||
temp: {}
|
||||
- name: web_app
|
||||
temp: {}
|
||||
- name: release
|
||||
temp: {}
|
||||
674
LICENSE
Normal file
674
LICENSE
Normal file
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
19
README.md
19
README.md
@@ -1,8 +1,23 @@
|
||||
# VirtWEB
|
||||
WIP project
|
||||
Open Source Web interface for LibVirt. Simplify the management of VM.
|
||||
|
||||
## Setup for dev
|
||||
Please refer to this guide: [virtweb_docs/SETUP_DEV.md](virtweb_docs/SETUP_DEV.md)
|
||||
|
||||
## Production requirements
|
||||
Please refer to this guide: [virtweb_docs/SETUP_PROD.md](virtweb_docs/SETUP_PROD.md)
|
||||
Please refer to this guide: [virtweb_docs/SETUP_PROD.md](virtweb_docs/SETUP_PROD.md)
|
||||
|
||||
## Features
|
||||
* Only Qemu / KVM is supported!
|
||||
* Basic auth / OpenID auth
|
||||
* Create, update & delete VM
|
||||
* noVNC control of VMs
|
||||
* Start, stop, suspend, resume, reset & kill VMs
|
||||
* Create, update & delete networks
|
||||
* Start & stop networks
|
||||
* Create, update & delete network filters
|
||||
* Upload ISO for easy VM installation
|
||||
* API tokens for system interconnection
|
||||
|
||||
## Screenshot
|
||||

|
||||
|
||||
3
renovate.json
Normal file
3
renovate.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": ["local>renovate/presets"]
|
||||
}
|
||||
3166
virtweb_backend/Cargo.lock
generated
3166
virtweb_backend/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,47 +1,49 @@
|
||||
[package]
|
||||
name = "virtweb_backend"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.19"
|
||||
env_logger = "0.10.1"
|
||||
clap = { version = "4.4.11", features = ["derive", "env"] }
|
||||
light-openid = { version = "1.0.1", features = ["crypto-wrapper"] }
|
||||
lazy_static = "1.4.0"
|
||||
actix = "0.13.1"
|
||||
actix-web = "4"
|
||||
log = "0.4.29"
|
||||
env_logger = "0.11.8"
|
||||
clap = { version = "4.5.56", features = ["derive", "env"] }
|
||||
light-openid = { version = "1.0.4", features = ["crypto-wrapper"] }
|
||||
lazy_static = "1.5.0"
|
||||
actix = "0.13.5"
|
||||
actix-web = "4.12.1"
|
||||
actix-remote-ip = "0.1.0"
|
||||
actix-session = { version = "0.8.0", features = ["cookie-session"] }
|
||||
actix-identity = "0.6.0"
|
||||
actix-cors = "0.6.5"
|
||||
actix-files = "0.6.2"
|
||||
actix-web-actors = "4.2.0"
|
||||
actix-http = "3.4.0"
|
||||
serde = { version = "1.0.193", features = ["derive"] }
|
||||
serde_json = "1.0.108"
|
||||
serde-xml-rs = "0.6.0"
|
||||
quick-xml = { version = "0.31.0", features = ["serialize", "overlapped-lists"] }
|
||||
futures-util = "0.3.28"
|
||||
anyhow = "1.0.75"
|
||||
actix-multipart = "0.6.1"
|
||||
tempfile = "3.8.1"
|
||||
reqwest = { version = "0.11.23", features = ["stream"] }
|
||||
url = "2.5.0"
|
||||
virt = "0.3.1"
|
||||
sysinfo = { version = "0.29.11", features = ["serde"] }
|
||||
uuid = { version = "1.6.1", features = ["v4", "serde"] }
|
||||
lazy-regex = "3.1.0"
|
||||
thiserror = "1.0.51"
|
||||
image = "0.24.7"
|
||||
rand = "0.8.5"
|
||||
bytes = "1.5.0"
|
||||
tokio = "1.35.0"
|
||||
futures = "0.3.29"
|
||||
ipnetwork = "0.20.0"
|
||||
num = "0.4.1"
|
||||
rust-embed = { version = "8.1.0" }
|
||||
mime_guess = "2.0.4"
|
||||
actix-session = { version = "0.10.1", features = ["cookie-session"] }
|
||||
actix-identity = "0.8.0"
|
||||
actix-cors = "0.7.1"
|
||||
actix-files = "0.6.10"
|
||||
actix-ws = "0.3.1"
|
||||
actix-http = "3.11.2"
|
||||
serde = { version = "1.0.219", features = ["derive"] }
|
||||
serde_json = "1.0.149"
|
||||
serde_yml = "0.0.12"
|
||||
quick-xml = { version = "0.38.4", features = ["serialize", "overlapped-lists"] }
|
||||
futures-util = "0.3.31"
|
||||
anyhow = "1.0.101"
|
||||
actix-multipart = "0.7.2"
|
||||
tempfile = "3.20.0"
|
||||
reqwest = { version = "0.12.28", features = ["stream"] }
|
||||
url = "2.5.8"
|
||||
virt = "0.4.3"
|
||||
sysinfo = { version = "0.36.1", features = ["serde"] }
|
||||
uuid = { version = "1.17.0", features = ["v4", "serde"] }
|
||||
lazy-regex = "3.4.2"
|
||||
thiserror = "2.0.18"
|
||||
image = "0.25.9"
|
||||
rand = "0.9.2"
|
||||
tokio = { version = "1.49.0", features = ["rt", "time", "macros"] }
|
||||
futures = "0.3.31"
|
||||
ipnetwork = { version = "0.21.1", features = ["serde"] }
|
||||
num = "0.4.3"
|
||||
rust-embed = { version = "8.7.2", features = ["mime-guess"] }
|
||||
dotenvy = "0.15.7"
|
||||
nix = { version = "0.30.1", features = ["net"] }
|
||||
basic-jwt = "0.3.0"
|
||||
zip = "4.3.0"
|
||||
chrono = "0.4.43"
|
||||
86
virtweb_backend/assets/img/debian.svg
Normal file
86
virtweb_backend/assets/img/debian.svg
Normal file
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 10.0, SVG Export Plug-In . SVG Version: 3.0.0 Build 77) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
|
||||
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
|
||||
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
|
||||
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
|
||||
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
|
||||
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
|
||||
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
|
||||
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
|
||||
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
|
||||
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
|
||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||
]>
|
||||
<svg
|
||||
xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;" i:viewOrigin="262 450" i:rulerOrigin="0 0" i:pageBounds="0 792 612 0"
|
||||
xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
|
||||
width="87.041" height="108.445" viewBox="0 0 87.041 108.445" overflow="visible" enable-background="new 0 0 87.041 108.445"
|
||||
xml:space="preserve">
|
||||
<metadata>
|
||||
<variableSets xmlns="&ns_vars;">
|
||||
<variableSet varSetName="binding1" locked="none">
|
||||
<variables></variables>
|
||||
<v:sampleDataSets xmlns="&ns_custom;" xmlns:v="&ns_vars;"></v:sampleDataSets>
|
||||
</variableSet>
|
||||
</variableSets>
|
||||
<sfw xmlns="&ns_sfw;">
|
||||
<slices></slices>
|
||||
<sliceSourceBounds y="341.555" x="262" width="87.041" height="108.445" bottomLeftOrigin="true"></sliceSourceBounds>
|
||||
</sfw>
|
||||
</metadata>
|
||||
<g id="Layer_1" i:layer="yes" i:dimmedPercent="50" i:rgbTrio="#4F008000FFFF">
|
||||
<g>
|
||||
<path i:knockout="Off" fill="#A80030" d="M51.986,57.297c-1.797,0.025,0.34,0.926,2.686,1.287
|
||||
c0.648-0.506,1.236-1.018,1.76-1.516C54.971,57.426,53.484,57.434,51.986,57.297"/>
|
||||
<path i:knockout="Off" fill="#A80030" d="M61.631,54.893c1.07-1.477,1.85-3.094,2.125-4.766c-0.24,1.192-0.887,2.221-1.496,3.307
|
||||
c-3.359,2.115-0.316-1.256-0.002-2.537C58.646,55.443,61.762,53.623,61.631,54.893"/>
|
||||
<path i:knockout="Off" fill="#A80030" d="M65.191,45.629c0.217-3.236-0.637-2.213-0.924-0.978
|
||||
C64.602,44.825,64.867,46.932,65.191,45.629"/>
|
||||
<path i:knockout="Off" fill="#A80030" d="M45.172,1.399c0.959,0.172,2.072,0.304,1.916,0.533
|
||||
C48.137,1.702,48.375,1.49,45.172,1.399"/>
|
||||
<path i:knockout="Off" fill="#A80030" d="M47.088,1.932l-0.678,0.14l0.631-0.056L47.088,1.932"/>
|
||||
<path i:knockout="Off" fill="#A80030" d="M76.992,46.856c0.107,2.906-0.85,4.316-1.713,6.812l-1.553,0.776
|
||||
c-1.271,2.468,0.123,1.567-0.787,3.53c-1.984,1.764-6.021,5.52-7.313,5.863c-0.943-0.021,0.639-1.113,0.846-1.541
|
||||
c-2.656,1.824-2.131,2.738-6.193,3.846l-0.119-0.264c-10.018,4.713-23.934-4.627-23.751-17.371
|
||||
c-0.107,0.809-0.304,0.607-0.526,0.934c-0.517-6.557,3.028-13.143,9.007-15.832c5.848-2.895,12.704-1.707,16.893,2.197
|
||||
c-2.301-3.014-6.881-6.209-12.309-5.91c-5.317,0.084-10.291,3.463-11.951,7.131c-2.724,1.715-3.04,6.611-4.227,7.507
|
||||
C31.699,56.271,36.3,61.342,44.083,67.307c1.225,0.826,0.345,0.951,0.511,1.58c-2.586-1.211-4.954-3.039-6.901-5.277
|
||||
c1.033,1.512,2.148,2.982,3.589,4.137c-2.438-0.826-5.695-5.908-6.646-6.115c4.203,7.525,17.052,13.197,23.78,10.383
|
||||
c-3.113,0.115-7.068,0.064-10.566-1.229c-1.469-0.756-3.467-2.322-3.11-2.615c9.182,3.43,18.667,2.598,26.612-3.771
|
||||
c2.021-1.574,4.229-4.252,4.867-4.289c-0.961,1.445,0.164,0.695-0.574,1.971c2.014-3.248-0.875-1.322,2.082-5.609l1.092,1.504
|
||||
c-0.406-2.696,3.348-5.97,2.967-10.234c0.861-1.304,0.961,1.403,0.047,4.403c1.268-3.328,0.334-3.863,0.66-6.609
|
||||
c0.352,0.923,0.814,1.904,1.051,2.878c-0.826-3.216,0.848-5.416,1.262-7.285c-0.408-0.181-1.275,1.422-1.473-2.377
|
||||
c0.029-1.65,0.459-0.865,0.625-1.271c-0.324-0.186-1.174-1.451-1.691-3.877c0.375-0.57,1.002,1.478,1.512,1.562
|
||||
c-0.328-1.929-0.893-3.4-0.916-4.88c-1.49-3.114-0.527,0.415-1.736-1.337c-1.586-4.947,1.316-1.148,1.512-3.396
|
||||
c2.404,3.483,3.775,8.881,4.404,11.117c-0.48-2.726-1.256-5.367-2.203-7.922c0.73,0.307-1.176-5.609,0.949-1.691
|
||||
c-2.27-8.352-9.715-16.156-16.564-19.818c0.838,0.767,1.896,1.73,1.516,1.881c-3.406-2.028-2.807-2.186-3.295-3.043
|
||||
c-2.775-1.129-2.957,0.091-4.795,0.002c-5.23-2.774-6.238-2.479-11.051-4.217l0.219,1.023c-3.465-1.154-4.037,0.438-7.782,0.004
|
||||
c-0.228-0.178,1.2-0.644,2.375-0.815c-3.35,0.442-3.193-0.66-6.471,0.122c0.808-0.567,1.662-0.942,2.524-1.424
|
||||
c-2.732,0.166-6.522,1.59-5.352,0.295c-4.456,1.988-12.37,4.779-16.811,8.943l-0.14-0.933c-2.035,2.443-8.874,7.296-9.419,10.46
|
||||
l-0.544,0.127c-1.059,1.793-1.744,3.825-2.584,5.67c-1.385,2.36-2.03,0.908-1.833,1.278c-2.724,5.523-4.077,10.164-5.246,13.97
|
||||
c0.833,1.245,0.02,7.495,0.335,12.497c-1.368,24.704,17.338,48.69,37.785,54.228c2.997,1.072,7.454,1.031,11.245,1.141
|
||||
c-4.473-1.279-5.051-0.678-9.408-2.197c-3.143-1.48-3.832-3.17-6.058-5.102l0.881,1.557c-4.366-1.545-2.539-1.912-6.091-3.037
|
||||
l0.941-1.229c-1.415-0.107-3.748-2.385-4.386-3.646l-1.548,0.061c-1.86-2.295-2.851-3.949-2.779-5.23l-0.5,0.891
|
||||
c-0.567-0.973-6.843-8.607-3.587-6.83c-0.605-0.553-1.409-0.9-2.281-2.484l0.663-0.758c-1.567-2.016-2.884-4.6-2.784-5.461
|
||||
c0.836,1.129,1.416,1.34,1.99,1.533c-3.957-9.818-4.179-0.541-7.176-9.994l0.634-0.051c-0.486-0.732-0.781-1.527-1.172-2.307
|
||||
l0.276-2.75C4.667,58.121,6.719,47.409,7.13,41.534c0.285-2.389,2.378-4.932,3.97-8.92l-0.97-0.167
|
||||
c1.854-3.234,10.586-12.988,14.63-12.486c1.959-2.461-0.389-0.009-0.772-0.629c4.303-4.453,5.656-3.146,8.56-3.947
|
||||
c3.132-1.859-2.688,0.725-1.203-0.709c5.414-1.383,3.837-3.144,10.9-3.846c0.745,0.424-1.729,0.655-2.35,1.205
|
||||
c4.511-2.207,14.275-1.705,20.617,1.225c7.359,3.439,15.627,13.605,15.953,23.17l0.371,0.1
|
||||
c-0.188,3.802,0.582,8.199-0.752,12.238L76.992,46.856"/>
|
||||
<path i:knockout="Off" fill="#A80030" d="M32.372,59.764l-0.252,1.26c1.181,1.604,2.118,3.342,3.626,4.596
|
||||
C34.661,63.502,33.855,62.627,32.372,59.764"/>
|
||||
<path i:knockout="Off" fill="#A80030" d="M35.164,59.654c-0.625-0.691-0.995-1.523-1.409-2.352
|
||||
c0.396,1.457,1.207,2.709,1.962,3.982L35.164,59.654"/>
|
||||
<path i:knockout="Off" fill="#A80030" d="M84.568,48.916l-0.264,0.662c-0.484,3.438-1.529,6.84-3.131,9.994
|
||||
C82.943,56.244,84.088,52.604,84.568,48.916"/>
|
||||
<path i:knockout="Off" fill="#A80030" d="M45.527,0.537C46.742,0.092,48.514,0.293,49.803,0c-1.68,0.141-3.352,0.225-5.003,0.438
|
||||
L45.527,0.537"/>
|
||||
<path i:knockout="Off" fill="#A80030" d="M2.872,23.219c0.28,2.592-1.95,3.598,0.494,1.889
|
||||
C4.676,22.157,2.854,24.293,2.872,23.219"/>
|
||||
<path i:knockout="Off" fill="#A80030" d="M0,35.215c0.563-1.728,0.665-2.766,0.88-3.766C-0.676,33.438,0.164,33.862,0,35.215"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.7 KiB |
BIN
virtweb_backend/assets/img/kvm.png
Normal file
BIN
virtweb_backend/assets/img/kvm.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 194 KiB |
8
virtweb_backend/assets/img/ubuntu.svg
Normal file
8
virtweb_backend/assets/img/ubuntu.svg
Normal file
@@ -0,0 +1,8 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100">
|
||||
<circle fill="#f47421" cy="50" cx="50" r="45"/>
|
||||
<circle fill="none" stroke="#ffffff" stroke-width="8.55" cx="50" cy="50" r="21.825"/>
|
||||
<g id="friend"><circle fill="#f47421" cx="19.4" cy="50" r="8.4376"/>
|
||||
<path stroke="#f47421" stroke-width="3.2378" d="M67,50H77"/>
|
||||
<circle fill="#ffffff" cx="19.4" cy="50" r="6.00745"/></g>
|
||||
<use xlink:href="#friend" transform="rotate(120,50,50)"/>
|
||||
<use xlink:href="#friend" transform="rotate(240,50,50)"/></svg>
|
||||
|
After Width: | Height: | Size: 550 B |
1
virtweb_backend/assets/img/windows.svg
Normal file
1
virtweb_backend/assets/img/windows.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="88" width="88" xmlns:v="https://vecta.io/nano"><path d="M0 12.402l35.687-4.86.016 34.423-35.67.203zm35.67 33.529l.028 34.453L.028 75.48.026 45.7zm4.326-39.025L87.314 0v41.527l-47.318.376zm47.329 39.349l-.011 41.34-47.318-6.678-.066-34.739z" fill="#00adef"/></svg>
|
||||
|
After Width: | Height: | Size: 311 B |
47
virtweb_backend/assets/iso_catalog.json
Normal file
47
virtweb_backend/assets/iso_catalog.json
Normal file
@@ -0,0 +1,47 @@
|
||||
[
|
||||
{
|
||||
"name": "Ubuntu releases",
|
||||
"url": "https://releases.ubuntu.com",
|
||||
"image": "/assets/img/ubuntu.svg"
|
||||
},
|
||||
{
|
||||
"name": "Old ubuntu releases",
|
||||
"url": "https://old-releases.ubuntu.com/releases/",
|
||||
"image": "/assets/img/ubuntu.svg"
|
||||
},
|
||||
{
|
||||
"name": "Current Debian releases (amd64)",
|
||||
"url": "https://cdimage.debian.org/mirror/cdimage/release/current/amd64/iso-dvd/",
|
||||
"image": "/assets/img/debian.svg"
|
||||
},
|
||||
{
|
||||
"name": "Old Debian releases",
|
||||
"url": "https://cdimage.debian.org/mirror/cdimage/archive/",
|
||||
"image": "/assets/img/debian.svg"
|
||||
},
|
||||
{
|
||||
"name": "Latest stable Virtio driver",
|
||||
"url": "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso",
|
||||
"image": "/assets/img/kvm.png"
|
||||
},
|
||||
{
|
||||
"name": "Windows server 2025",
|
||||
"url": "https://www.microsoft.com/en-us/evalcenter/download-windows-server-2025",
|
||||
"image": "/assets/img/windows.svg"
|
||||
},
|
||||
{
|
||||
"name": "Windows server 2022",
|
||||
"url": "https://www.microsoft.com/en-us/evalcenter/download-windows-server-2022",
|
||||
"image": "/assets/img/windows.svg"
|
||||
},
|
||||
{
|
||||
"name": "Windows 11",
|
||||
"url": "https://www.microsoft.com/en-us/software-download/windows11",
|
||||
"image": "/assets/img/windows.svg"
|
||||
},
|
||||
{
|
||||
"name": "Windows 11 Iot Enterprise LTSC 2024",
|
||||
"url": "https://www.microsoft.com/en-us/evalcenter/download-windows-11-iot-enterprise-ltsc-eval",
|
||||
"image": "/assets/img/windows.svg"
|
||||
}
|
||||
]
|
||||
@@ -1,9 +1,8 @@
|
||||
services:
|
||||
oidc:
|
||||
image: qlik/simple-oidc-provider
|
||||
environment:
|
||||
- REDIRECTS=http://localhost:3000/oidc_cb
|
||||
- PORT=9001
|
||||
image: dexidp/dex
|
||||
ports:
|
||||
- 9001:9001
|
||||
|
||||
- 9001:9001
|
||||
volumes:
|
||||
- ./docker/dex:/conf:ro
|
||||
command: [ "dex", "serve", "/conf/dex.config.yaml" ]
|
||||
27
virtweb_backend/docker/dex/dex.config.yaml
Normal file
27
virtweb_backend/docker/dex/dex.config.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
issuer: http://127.0.0.1:9001/dex
|
||||
|
||||
storage:
|
||||
type: memory
|
||||
|
||||
web:
|
||||
http: 0.0.0.0:9001
|
||||
|
||||
oauth2:
|
||||
# Automate some clicking
|
||||
# Note: this might actually make some tests pass that otherwise wouldn't.
|
||||
skipApprovalScreen: false
|
||||
|
||||
connectors:
|
||||
# Note: this might actually make some tests pass that otherwise wouldn't.
|
||||
- type: mockCallback
|
||||
id: mock
|
||||
name: Example
|
||||
|
||||
# Basic OP test suite requires two clients.
|
||||
staticClients:
|
||||
- id: foo
|
||||
secret: bar
|
||||
redirectURIs:
|
||||
- http://localhost:3000/oidc_cb
|
||||
- http://localhost:5173/oidc_cb
|
||||
name: Project
|
||||
67
virtweb_backend/examples/api_curl.rs
Normal file
67
virtweb_backend/examples/api_curl.rs
Normal file
@@ -0,0 +1,67 @@
|
||||
use basic_jwt::JWTPrivateKey;
|
||||
use clap::Parser;
|
||||
use std::os::unix::prelude::CommandExt;
|
||||
use std::process::Command;
|
||||
use std::str::FromStr;
|
||||
use virtweb_backend::api_tokens::TokenVerb;
|
||||
use virtweb_backend::extractors::api_auth_extractor::TokenClaims;
|
||||
use virtweb_backend::utils::time_utils::time;
|
||||
|
||||
/// cURL wrapper to query Virtweb backend API
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(version, about, long_about = None)]
|
||||
struct Args {
|
||||
/// URL of VirtWeb
|
||||
#[arg(short('u'), long, env, default_value = "http://localhost:8000")]
|
||||
virtweb_url: String,
|
||||
|
||||
/// Token ID
|
||||
#[arg(short('i'), long, env)]
|
||||
token_id: String,
|
||||
|
||||
/// Token private key
|
||||
#[arg(short('t'), long, env)]
|
||||
token_key: String,
|
||||
|
||||
/// Request verb
|
||||
#[arg(short('X'), long, default_value = "GET")]
|
||||
verb: String,
|
||||
|
||||
/// Request URI
|
||||
uri: String,
|
||||
|
||||
/// Command line arguments to pass to cURL
|
||||
#[clap(trailing_var_arg = true, allow_hyphen_values = true)]
|
||||
run: Vec<String>,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let args = Args::parse();
|
||||
|
||||
let full_url = format!("{}{}", args.virtweb_url, args.uri);
|
||||
log::debug!("Full URL: {full_url}");
|
||||
|
||||
let key = JWTPrivateKey::ES384 {
|
||||
r#priv: args.token_key,
|
||||
};
|
||||
let claims = TokenClaims {
|
||||
sub: args.token_id.to_string(),
|
||||
iat: time() as usize,
|
||||
exp: time() as usize + 50,
|
||||
verb: TokenVerb::from_str(&args.verb).expect("Invalid request verb!"),
|
||||
path: args.uri,
|
||||
nonce: uuid::Uuid::new_v4().to_string(),
|
||||
};
|
||||
|
||||
let jwt = key.sign_jwt(&claims).expect("Failed to sign JWT!");
|
||||
|
||||
let err = Command::new("curl")
|
||||
.args(["-X", &args.verb])
|
||||
.args(["-H", &format!("x-token-id: {}", args.token_id)])
|
||||
.args(["-H", &format!("x-token-content: {jwt}")])
|
||||
.args(args.run)
|
||||
.arg(full_url)
|
||||
.exec();
|
||||
|
||||
panic!("Failed to run cURL! {err}")
|
||||
}
|
||||
@@ -7,8 +7,9 @@ use crate::libvirt_rest_structures::hypervisor::*;
|
||||
use crate::libvirt_rest_structures::net::*;
|
||||
use crate::libvirt_rest_structures::nw_filter::{NetworkFilter, NetworkFilterName};
|
||||
use crate::libvirt_rest_structures::vm::*;
|
||||
use crate::nat::nat_lib;
|
||||
use actix::{Actor, Context, Handler, Message};
|
||||
use image::ImageOutputFormat;
|
||||
use image::ImageFormat;
|
||||
use std::io::Cursor;
|
||||
use virt::connect::Connect;
|
||||
use virt::domain::Domain;
|
||||
@@ -26,11 +27,8 @@ impl LibVirtActor {
|
||||
/// Connect to hypervisor
|
||||
pub async fn connect() -> anyhow::Result<Self> {
|
||||
let hypervisor_uri = AppConfig::get().hypervisor_uri.as_deref().unwrap_or("");
|
||||
log::info!(
|
||||
"Will connect to hypvervisor at address '{}'",
|
||||
hypervisor_uri
|
||||
);
|
||||
let conn = Connect::open(hypervisor_uri)?;
|
||||
log::info!("Will connect to hypvervisor at address '{hypervisor_uri}'",);
|
||||
let conn = Connect::open(Some(hypervisor_uri))?;
|
||||
|
||||
Ok(Self { m: conn })
|
||||
}
|
||||
@@ -101,7 +99,7 @@ impl Handler<GetDomainXMLReq> for LibVirtActor {
|
||||
log::debug!("Get domain XML:\n{}", msg.0.as_string());
|
||||
let domain = Domain::lookup_by_uuid_string(&self.m, &msg.0.as_string())?;
|
||||
let xml = domain.get_xml_desc(VIR_DOMAIN_XML_SECURE)?;
|
||||
log::debug!("XML = {}", xml);
|
||||
log::debug!("XML = {xml}");
|
||||
DomainXML::parse_xml(&xml)
|
||||
}
|
||||
}
|
||||
@@ -130,7 +128,7 @@ impl Handler<DefineDomainReq> for LibVirtActor {
|
||||
fn handle(&mut self, mut msg: DefineDomainReq, _ctx: &mut Self::Context) -> Self::Result {
|
||||
let xml = msg.1.as_xml()?;
|
||||
|
||||
log::debug!("Define domain:\n{}", xml);
|
||||
log::debug!("Define domain:\n{xml}");
|
||||
let domain = Domain::define_xml(&self.m, &xml)?;
|
||||
let uuid = XMLUuid::parse_from_str(&domain.get_uuid_string()?)?;
|
||||
|
||||
@@ -181,6 +179,13 @@ impl Handler<DeleteDomainReq> for LibVirtActor {
|
||||
false => sys::VIR_DOMAIN_UNDEFINE_NVRAM,
|
||||
})?;
|
||||
|
||||
// Delete associated cloud init disk
|
||||
let cloud_init_disk = AppConfig::get().cloud_init_disk_path_for_vm(&domain_name);
|
||||
if cloud_init_disk.exists() {
|
||||
std::fs::remove_file(cloud_init_disk)?;
|
||||
}
|
||||
|
||||
// If requested, delete block storage associated with the VM
|
||||
if !msg.keep_files {
|
||||
log::info!("Delete storage associated with the domain");
|
||||
let path = AppConfig::get().vm_storage_path(msg.id);
|
||||
@@ -336,7 +341,7 @@ impl Handler<ScreenshotDomainReq> for LibVirtActor {
|
||||
|
||||
let image = image::load_from_memory(&screen_out)?;
|
||||
let mut png_out = Cursor::new(Vec::new());
|
||||
image.write_to(&mut png_out, ImageOutputFormat::Png)?;
|
||||
image.write_to(&mut png_out, ImageFormat::Png)?;
|
||||
|
||||
Ok(png_out.into_inner())
|
||||
}
|
||||
@@ -395,6 +400,9 @@ impl Handler<DefineNetwork> for LibVirtActor {
|
||||
let network = Network::define_xml(&self.m, &network_xml)?;
|
||||
let uuid = XMLUuid::parse_from_str(&network.get_uuid_string()?)?;
|
||||
|
||||
// Save NAT definition
|
||||
nat_lib::save_nat_def(&msg.0)?;
|
||||
|
||||
// Save a copy of the source definition
|
||||
msg.0.uuid = Some(uuid);
|
||||
let json = serde_json::to_string(&msg.0)?;
|
||||
@@ -435,7 +443,7 @@ impl Handler<GetNetworkXMLReq> for LibVirtActor {
|
||||
log::debug!("Get network XML:\n{}", msg.0.as_string());
|
||||
let network = Network::lookup_by_uuid_string(&self.m, &msg.0.as_string())?;
|
||||
let xml = network.get_xml_desc(0)?;
|
||||
log::debug!("XML = {}", xml);
|
||||
log::debug!("XML = {xml}");
|
||||
NetworkXML::parse_xml(&xml)
|
||||
}
|
||||
}
|
||||
@@ -464,9 +472,12 @@ impl Handler<DeleteNetwork> for LibVirtActor {
|
||||
fn handle(&mut self, msg: DeleteNetwork, _ctx: &mut Self::Context) -> Self::Result {
|
||||
log::debug!("Delete network: {}\n", msg.0.as_string());
|
||||
let network = Network::lookup_by_uuid_string(&self.m, &msg.0.as_string())?;
|
||||
let network_name = network.get_name()?;
|
||||
let network_name = NetworkName(network.get_name()?);
|
||||
network.undefine()?;
|
||||
|
||||
// Remove NAT definition, if any
|
||||
nat_lib::remove_nat_def(&network_name)?;
|
||||
|
||||
// Remove backup definition
|
||||
let backup_definition = AppConfig::get().net_definition_path(&network_name);
|
||||
if backup_definition.exists() {
|
||||
@@ -588,7 +599,7 @@ impl Handler<GetNWFilterXMLReq> for LibVirtActor {
|
||||
log::debug!("Get network filter XML:\n{}", msg.0.as_string());
|
||||
let filter = NWFilter::lookup_by_uuid_string(&self.m, &msg.0.as_string())?;
|
||||
let xml = filter.get_xml_desc(0)?;
|
||||
log::debug!("XML = {}", xml);
|
||||
log::debug!("XML = {xml}");
|
||||
NetworkFilterXML::parse_xml(xml)
|
||||
}
|
||||
}
|
||||
@@ -603,7 +614,7 @@ impl Handler<DefineNWFilterReq> for LibVirtActor {
|
||||
fn handle(&mut self, mut msg: DefineNWFilterReq, _ctx: &mut Self::Context) -> Self::Result {
|
||||
let xml = msg.1.into_xml()?;
|
||||
|
||||
log::debug!("Define network filter:\n{}", xml);
|
||||
log::debug!("Define network filter:\n{xml}");
|
||||
let filter = NWFilter::define_xml(&self.m, &xml)?;
|
||||
let uuid = XMLUuid::parse_from_str(&filter.get_uuid_string()?)?;
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
pub mod libvirt_actor;
|
||||
pub mod vnc_actor;
|
||||
pub mod vnc_handler;
|
||||
pub mod vnc_tokens_actor;
|
||||
|
||||
@@ -1,209 +0,0 @@
|
||||
use actix::{Actor, ActorContext, AsyncContext, Handler, StreamHandler};
|
||||
use actix_http::ws::Item;
|
||||
use actix_web_actors::ws;
|
||||
use actix_web_actors::ws::Message;
|
||||
use bytes::Bytes;
|
||||
use image::EncodableLayout;
|
||||
use std::path::Path;
|
||||
use std::time::{Duration, Instant};
|
||||
use tokio::io::{AsyncReadExt, AsyncWriteExt};
|
||||
use tokio::net::unix::{OwnedReadHalf, OwnedWriteHalf};
|
||||
use tokio::net::UnixStream;
|
||||
|
||||
/// How often heartbeat pings are sent
|
||||
const HEARTBEAT_INTERVAL: Duration = Duration::from_secs(5);
|
||||
|
||||
/// How long before lack of client response causes a timeout
|
||||
const CLIENT_TIMEOUT: Duration = Duration::from_secs(20);
|
||||
|
||||
#[derive(thiserror::Error, Debug)]
|
||||
enum VNCError {
|
||||
#[error("Socket file does not exists!")]
|
||||
SocketDoesNotExists,
|
||||
}
|
||||
|
||||
pub struct VNCActor {
|
||||
/// Qemu -> WS
|
||||
read_half: Option<OwnedReadHalf>,
|
||||
|
||||
/// WS -> Qemu
|
||||
write_half: OwnedWriteHalf,
|
||||
|
||||
// Client must respond to ping at a specific interval, otherwise we drop connection
|
||||
hb: Instant,
|
||||
}
|
||||
|
||||
impl VNCActor {
|
||||
pub async fn new(socket_path: &str) -> anyhow::Result<Self> {
|
||||
let socket_path = Path::new(socket_path);
|
||||
|
||||
if !socket_path.exists() {
|
||||
return Err(VNCError::SocketDoesNotExists.into());
|
||||
}
|
||||
|
||||
let socket = UnixStream::connect(socket_path).await?;
|
||||
let (read_half, write_half) = socket.into_split();
|
||||
|
||||
Ok(Self {
|
||||
read_half: Some(read_half),
|
||||
write_half,
|
||||
hb: Instant::now(),
|
||||
})
|
||||
}
|
||||
|
||||
/// helper method that sends ping to client every second.
|
||||
///
|
||||
/// also this method checks heartbeats from client
|
||||
fn hb(&self, ctx: &mut ws::WebsocketContext<Self>) {
|
||||
ctx.run_interval(HEARTBEAT_INTERVAL, |act, ctx| {
|
||||
// check client heartbeats
|
||||
if Instant::now().duration_since(act.hb) > CLIENT_TIMEOUT {
|
||||
// heartbeat timed out
|
||||
log::warn!("WebSocket Client heartbeat failed, disconnecting!");
|
||||
ctx.stop();
|
||||
return;
|
||||
}
|
||||
|
||||
ctx.ping(b"");
|
||||
});
|
||||
}
|
||||
|
||||
fn send_to_socket(&mut self, bytes: Bytes, ctx: &mut ws::WebsocketContext<Self>) {
|
||||
log::trace!("Received {} bytes for VNC socket", bytes.len());
|
||||
|
||||
if let Err(e) = futures::executor::block_on(self.write_half.write(bytes.as_bytes())) {
|
||||
log::error!("Failed to relay bytes to VNC socket {e}");
|
||||
ctx.close(None);
|
||||
}
|
||||
}
|
||||
|
||||
fn start_qemu_to_ws_end(&mut self, ctx: &mut ws::WebsocketContext<Self>) {
|
||||
let mut read_half = self.read_half.take().unwrap();
|
||||
let addr = ctx.address();
|
||||
let future = async move {
|
||||
let mut buff: [u8; 5000] = [0; 5000];
|
||||
loop {
|
||||
match read_half.read(&mut buff).await {
|
||||
Ok(mut l) => {
|
||||
if l == 0 {
|
||||
log::warn!("Got empty read!");
|
||||
|
||||
// Ugly hack made to wait for next byte
|
||||
let mut one_byte_buff: [u8; 1] = [0; 1];
|
||||
match read_half.read_exact(&mut one_byte_buff).await {
|
||||
Ok(b) => {
|
||||
if b == 0 {
|
||||
log::error!("Did not get a byte !");
|
||||
let _ = addr.send(CloseWebSocketReq).await;
|
||||
break;
|
||||
}
|
||||
buff[0] = one_byte_buff[0];
|
||||
l = 1;
|
||||
}
|
||||
Err(e) => {
|
||||
log::error!("Failed to read 1 BYTE from remote socket. Stopping now... {:?}", e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let to_send = SendBytesReq(Vec::from(&buff[0..l]));
|
||||
if let Err(e) = addr.send(to_send).await {
|
||||
log::error!("Failed to send to websocket. Stopping now... {:?}", e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
log::error!("Failed to read from remote socket. Stopping now... {:?}", e);
|
||||
break;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
log::info!("Exited read loop");
|
||||
};
|
||||
|
||||
tokio::spawn(future);
|
||||
}
|
||||
}
|
||||
|
||||
impl Actor for VNCActor {
|
||||
type Context = ws::WebsocketContext<Self>;
|
||||
|
||||
fn started(&mut self, ctx: &mut Self::Context) {
|
||||
self.hb(ctx);
|
||||
self.start_qemu_to_ws_end(ctx);
|
||||
}
|
||||
}
|
||||
|
||||
impl StreamHandler<Result<Message, ws::ProtocolError>> for VNCActor {
|
||||
fn handle(&mut self, msg: Result<Message, ws::ProtocolError>, ctx: &mut Self::Context) {
|
||||
match msg {
|
||||
Ok(Message::Ping(msg)) => ctx.pong(&msg),
|
||||
|
||||
Ok(Message::Text(_text)) => {
|
||||
log::error!("Received unexpected text on VNC WebSocket!");
|
||||
}
|
||||
|
||||
Ok(Message::Binary(bin)) => {
|
||||
log::info!("Forward {} bytes to VNC server", bin.len());
|
||||
self.send_to_socket(bin, ctx);
|
||||
}
|
||||
|
||||
Ok(Message::Continuation(msg)) => match msg {
|
||||
Item::FirstText(_) => {
|
||||
log::error!("Received unexpected split text!");
|
||||
ctx.close(None);
|
||||
}
|
||||
Item::FirstBinary(bin) | Item::Continue(bin) | Item::Last(bin) => {
|
||||
self.send_to_socket(bin, ctx);
|
||||
}
|
||||
},
|
||||
|
||||
Ok(Message::Pong(_)) => {
|
||||
log::trace!("Received PONG message");
|
||||
self.hb = Instant::now();
|
||||
}
|
||||
|
||||
Ok(Message::Close(r)) => {
|
||||
log::info!("WebSocket closed. Reason={r:?}");
|
||||
ctx.close(r);
|
||||
}
|
||||
|
||||
Ok(Message::Nop) => {
|
||||
log::debug!("Received Nop message")
|
||||
}
|
||||
|
||||
Err(e) => {
|
||||
log::error!("WebSocket protocol error! {e}");
|
||||
ctx.close(None)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(actix::Message)]
|
||||
#[rtype(result = "()")]
|
||||
pub struct SendBytesReq(Vec<u8>);
|
||||
|
||||
impl Handler<SendBytesReq> for VNCActor {
|
||||
type Result = ();
|
||||
|
||||
fn handle(&mut self, msg: SendBytesReq, ctx: &mut Self::Context) -> Self::Result {
|
||||
log::trace!("Send {} bytes to WS", msg.0.len());
|
||||
ctx.binary(msg.0);
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(actix::Message)]
|
||||
#[rtype(result = "()")]
|
||||
pub struct CloseWebSocketReq;
|
||||
|
||||
impl Handler<CloseWebSocketReq> for VNCActor {
|
||||
type Result = ();
|
||||
|
||||
fn handle(&mut self, _msg: CloseWebSocketReq, ctx: &mut Self::Context) -> Self::Result {
|
||||
log::trace!("Close websocket, because VNC socket has terminated");
|
||||
ctx.close(None);
|
||||
}
|
||||
}
|
||||
129
virtweb_backend/src/actors/vnc_handler.rs
Normal file
129
virtweb_backend/src/actors/vnc_handler.rs
Normal file
@@ -0,0 +1,129 @@
|
||||
use actix_http::ws::Message;
|
||||
use futures_util::StreamExt as _;
|
||||
use std::time::{Duration, Instant};
|
||||
use tokio::io::{AsyncReadExt, AsyncWriteExt};
|
||||
use tokio::net::UnixStream;
|
||||
use tokio::select;
|
||||
use tokio::time::interval;
|
||||
|
||||
/// How often heartbeat pings are sent
|
||||
const HEARTBEAT_INTERVAL: Duration = Duration::from_secs(5);
|
||||
|
||||
/// How long before lack of client response causes a timeout
|
||||
const CLIENT_TIMEOUT: Duration = Duration::from_secs(20);
|
||||
|
||||
/// Broadcast text & binary messages received from a client, respond to ping messages, and monitor
|
||||
/// connection health to detect network issues and free up resources.
|
||||
pub async fn handle(
|
||||
mut session: actix_ws::Session,
|
||||
mut msg_stream: actix_ws::MessageStream,
|
||||
mut socket: UnixStream,
|
||||
) {
|
||||
log::info!("Connected to websocket");
|
||||
|
||||
let mut last_heartbeat = Instant::now();
|
||||
let mut interval = interval(HEARTBEAT_INTERVAL);
|
||||
|
||||
let mut buf_socket = [0u8; 1024];
|
||||
|
||||
let reason = loop {
|
||||
// waits for either `msg_stream` to receive a message from the client, the broadcast channel
|
||||
// to send a message, or the heartbeat interval timer to tick, yielding the value of
|
||||
// whichever one is ready first
|
||||
select! {
|
||||
|
||||
// heartbeat interval ticked
|
||||
_tick = interval.tick() => {
|
||||
// if no heartbeat ping/pong received recently, close the connection
|
||||
if Instant::now().duration_since(last_heartbeat) > CLIENT_TIMEOUT {
|
||||
log::info!(
|
||||
"client has not sent heartbeat in over {CLIENT_TIMEOUT:?}; disconnecting"
|
||||
);
|
||||
|
||||
break None;
|
||||
}
|
||||
|
||||
// send heartbeat ping
|
||||
let _ = session.ping(b"").await;
|
||||
}
|
||||
|
||||
msg = msg_stream.next() => {
|
||||
let msg = match msg {
|
||||
// received message from WebSocket client
|
||||
Some(Ok(msg)) => msg,
|
||||
|
||||
// client WebSocket stream error
|
||||
Some(Err(err)) => {
|
||||
log::error!("{err}");
|
||||
break None;
|
||||
}
|
||||
|
||||
// client WebSocket stream ended
|
||||
None => break None
|
||||
};
|
||||
|
||||
log::debug!("msg: {msg:?}");
|
||||
|
||||
match msg {
|
||||
Message::Text(_) => {
|
||||
log::error!("Received unexpected text on VNC WebSocket!");
|
||||
}
|
||||
|
||||
Message::Binary(bin) => {
|
||||
log::info!("Forward {} bytes to VNC server", bin.len());
|
||||
if let Err(e) = socket.write(&bin).await {
|
||||
log::error!("Failed to relay bytes to VNC socket {e}");
|
||||
break None;
|
||||
}
|
||||
}
|
||||
|
||||
Message::Close(reason) => {
|
||||
break reason;
|
||||
}
|
||||
|
||||
Message::Ping(bytes) => {
|
||||
last_heartbeat = Instant::now();
|
||||
let _ = session.pong(&bytes).await;
|
||||
}
|
||||
|
||||
Message::Pong(_) => {
|
||||
last_heartbeat = Instant::now();
|
||||
}
|
||||
|
||||
Message::Continuation(_) => {
|
||||
log::warn!("no support for continuation frames");
|
||||
}
|
||||
|
||||
// no-op; ignore
|
||||
Message::Nop => {}
|
||||
};
|
||||
}
|
||||
|
||||
// Forward socket packet to WS client
|
||||
count = socket.read(&mut buf_socket) => {
|
||||
let count = match count {
|
||||
Ok(count) => count,
|
||||
Err(e) => {
|
||||
log::error!("[VNC] Failed to read from upstream! {e}");
|
||||
break None;
|
||||
}
|
||||
};
|
||||
|
||||
if count == 0 {
|
||||
log::warn!("[VNC] infinite loop (upstream), closing connection");
|
||||
break None;
|
||||
}
|
||||
|
||||
if let Err(e)=session.binary(buf_socket[0..count].to_vec()).await{
|
||||
log::error!("[VNC] Failed to forward messages to upstream, will close connection! {e}");
|
||||
break None
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// attempt to close connection gracefully
|
||||
let _ = session.close(reason).await;
|
||||
|
||||
log::info!("Disconnected from websocket");
|
||||
}
|
||||
299
virtweb_backend/src/api_tokens.rs
Normal file
299
virtweb_backend/src/api_tokens.rs
Normal file
@@ -0,0 +1,299 @@
|
||||
//! # API tokens management
|
||||
|
||||
use crate::app_config::AppConfig;
|
||||
use crate::constants;
|
||||
use crate::utils::time_utils::time;
|
||||
use actix_http::Method;
|
||||
use basic_jwt::{JWTPrivateKey, JWTPublicKey};
|
||||
use std::path::Path;
|
||||
use std::str::FromStr;
|
||||
|
||||
#[derive(serde::Serialize, serde::Deserialize, Clone, Copy, Debug)]
|
||||
pub struct TokenID(pub uuid::Uuid);
|
||||
|
||||
impl TokenID {
|
||||
/// Parse a string as a token id
|
||||
pub fn parse(t: &str) -> anyhow::Result<Self> {
|
||||
Ok(Self(uuid::Uuid::parse_str(t)?))
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, Eq, PartialEq)]
|
||||
pub struct TokenRight {
|
||||
verb: TokenVerb,
|
||||
path: String,
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
|
||||
pub struct TokenRights(Vec<TokenRight>);
|
||||
|
||||
impl TokenRights {
|
||||
pub fn check_error(&self) -> Option<&'static str> {
|
||||
for r in &self.0 {
|
||||
if !r.path.starts_with("/api/") {
|
||||
return Some("All API rights shall start with /api/");
|
||||
}
|
||||
|
||||
if r.path.len() > constants::API_TOKEN_RIGHT_PATH_MAX_LENGTH {
|
||||
return Some("An API path shall not exceed maximum URL size!");
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
pub fn contains(&self, verb: TokenVerb, path: &str) -> bool {
|
||||
let req_path_split = path.split('/').collect::<Vec<_>>();
|
||||
|
||||
'root: for r in &self.0 {
|
||||
if r.verb != verb {
|
||||
continue 'root;
|
||||
}
|
||||
|
||||
let mut last_idx = 0;
|
||||
for (idx, part) in r.path.split('/').enumerate() {
|
||||
if idx >= req_path_split.len() {
|
||||
continue 'root;
|
||||
}
|
||||
|
||||
if part != "*" && part != req_path_split[idx] {
|
||||
continue 'root;
|
||||
}
|
||||
|
||||
last_idx = idx;
|
||||
}
|
||||
|
||||
// Check we visited the whole path
|
||||
if last_idx + 1 == req_path_split.len() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
|
||||
pub struct Token {
|
||||
pub id: TokenID,
|
||||
pub name: String,
|
||||
pub description: String,
|
||||
created: u64,
|
||||
updated: u64,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub pub_key: Option<JWTPublicKey>,
|
||||
pub rights: TokenRights,
|
||||
pub last_used: u64,
|
||||
pub ip_restriction: Option<ipnetwork::IpNetwork>,
|
||||
pub max_inactivity: Option<u64>,
|
||||
}
|
||||
|
||||
impl Token {
|
||||
/// Turn the token into a JSON string
|
||||
fn save(&self) -> anyhow::Result<()> {
|
||||
let json = serde_json::to_string(self)?;
|
||||
|
||||
std::fs::write(AppConfig::get().api_token_definition_path(self.id), json)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Load token information from a file
|
||||
fn load_from_file(path: &Path) -> anyhow::Result<Self> {
|
||||
Ok(serde_json::from_str(&std::fs::read_to_string(path)?)?)
|
||||
}
|
||||
|
||||
/// Check whether a token is expired or not
|
||||
pub fn is_expired(&self) -> bool {
|
||||
if let Some(max_inactivity) = self.max_inactivity
|
||||
&& max_inactivity + self.last_used < time()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
false
|
||||
}
|
||||
|
||||
/// Check whether last_used shall be updated or not
|
||||
pub fn should_update_last_activity(&self) -> bool {
|
||||
self.last_used + 3600 < time()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, Copy, Eq, PartialEq)]
|
||||
pub enum TokenVerb {
|
||||
GET,
|
||||
POST,
|
||||
PUT,
|
||||
PATCH,
|
||||
DELETE,
|
||||
}
|
||||
|
||||
impl TokenVerb {
|
||||
pub fn as_method(&self) -> Method {
|
||||
match self {
|
||||
TokenVerb::GET => Method::GET,
|
||||
TokenVerb::POST => Method::POST,
|
||||
TokenVerb::PUT => Method::PUT,
|
||||
TokenVerb::PATCH => Method::PATCH,
|
||||
TokenVerb::DELETE => Method::DELETE,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl FromStr for TokenVerb {
|
||||
type Err = ();
|
||||
|
||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||
match s {
|
||||
"GET" => Ok(TokenVerb::GET),
|
||||
"POST" => Ok(TokenVerb::POST),
|
||||
"PUT" => Ok(TokenVerb::PUT),
|
||||
"PATCH" => Ok(TokenVerb::PATCH),
|
||||
"DELETE" => Ok(TokenVerb::DELETE),
|
||||
_ => Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Structure used to create a token
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
|
||||
pub struct NewToken {
|
||||
pub name: String,
|
||||
pub description: String,
|
||||
pub rights: TokenRights,
|
||||
pub ip_restriction: Option<ipnetwork::IpNetwork>,
|
||||
pub max_inactivity: Option<u64>,
|
||||
}
|
||||
|
||||
impl NewToken {
|
||||
/// Check for error in token
|
||||
pub fn check_error(&self) -> Option<&'static str> {
|
||||
if self.name.len() < constants::API_TOKEN_NAME_MIN_LENGTH {
|
||||
return Some("Name is too short!");
|
||||
}
|
||||
|
||||
if self.name.len() > constants::API_TOKEN_NAME_MAX_LENGTH {
|
||||