Commit Graph

3028 Commits

Author SHA1 Message Date
Dietmar Maurer
08e45e3573 src/bin/proxmox-backup-proxy.rs: implement unpriviledged server
We want to run the public server as user www-data. Requests needing
root priviledges needs to be proxied to the proxmox-backup.service, which
now listens to 127.0.0.1:82.
2019-01-28 13:29:58 +01:00
Dietmar Maurer
42e06fc5ca RpcEnvironment: implement set_user() and get_user() 2019-01-27 10:52:26 +01:00
Dietmar Maurer
23db39488f RpcEnvironment: add environment type enum RpcEnvironmentType 2019-01-27 10:33:42 +01:00
Dietmar Maurer
084ccdd590 also pass rpcenv to async handlers 2019-01-27 10:18:52 +01:00
Dietmar Maurer
a0a545c720 move rpc environment implementation to separate files 2019-01-26 15:08:02 +01:00
Dietmar Maurer
32f3db27bd api: pass RpcEnvirnment to api handlers 2019-01-26 14:50:37 +01:00
Dietmar Maurer
b1be01218a server/rest.rs: fake login cookie 2019-01-23 12:49:10 +01:00
Dietmar Maurer
c643065864 rename api3 back to api2
There is no real need to change the path, so using api2 we can reuse
all helpers (like tools from proxmox widget toolkit).
2019-01-22 12:10:38 +01:00
Dietmar Maurer
e35404deb7 remove crate tokio-codec (seems to be part of tokio now) 2019-01-20 14:28:06 +01:00
Dietmar Maurer
85722a8492 api/router.rs: rename ApiUploadMethod to ApiAsyncMethod
We can use this for uploads and downloads ...
2019-01-19 16:42:43 +01:00
Dietmar Maurer
6e219aefd3 api3/admin/datastore/upload_catar.rs: verify content type ("application/x-proxmox-backup-catar") 2019-01-17 12:43:29 +01:00
Dietmar Maurer
90e1d858e0 api/router.rs: return Result in upload handler 2019-01-17 12:03:38 +01:00
Dietmar Maurer
148b327e63 server/rest.rs: correctly pass query/url parameters 2019-01-16 13:58:36 +01:00
Dietmar Maurer
c36fa61287 api3/admin/datastore/upload_catar.rs: implement upload future 2019-01-15 11:38:26 +01:00
Dietmar Maurer
c1582dcf39 api/router.rs: allow different types of api methods
Added a prototype for file/backup uploads.
2019-01-14 12:26:04 +01:00
Wolfgang Bumiller
ac1397dedb rest: rename utf-8-checked 'bytes' to 'utf8'
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-01-08 14:22:43 +01:00
Wolfgang Bumiller
3cd4bb8a63 rest: don't copy the body
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-01-08 14:21:54 +01:00
Dietmar Maurer
2ad4db5d13 simplify formatter code 2018-12-05 18:22:56 +01:00
Dietmar Maurer
53acf7490b add output formatter 2018-12-05 12:43:22 +01:00
Dietmar Maurer
0f30b2b4c4 move src/api/server.rs -> src/server/rest.rs 2018-12-05 10:16:23 +01:00
Dietmar Maurer
fc45b741cb start the GUI 2018-12-04 17:53:10 +01:00
Dietmar Maurer
185f4301dc set content type for static file download 2018-12-02 11:00:52 +01:00
Dietmar Maurer
4892b32829 fix file download, listen to 0.0.0.0 2018-12-01 15:21:25 +01:00
Dietmar Maurer
b53007523d remove www/pbs-index.html.tt, hardcode into rust for now 2018-12-01 13:37:49 +01:00
Dietmar Maurer
dd4b1a797b router: no need to use Fn (fn also works for static closures) 2018-11-16 11:12:00 +01:00
Dietmar Maurer
1716112285 handle uri parameters correctly 2018-11-16 09:15:33 +01:00
Dietmar Maurer
5106bbc70e allow closure handlers 2018-11-15 17:47:59 +01:00
Dietmar Maurer
1ac1f7fd24 cleanup module names 2018-11-15 17:07:10 +01:00