Commit graph

20 commits

Author SHA1 Message Date
Andras Timar
0002fdfd6c fix license headers
Change-Id: I8623770b32d278a45357dc7f757fabfadd2b4af7
2020-10-01 11:56:43 +02:00
Michael Meeks
36a4b5ad05 Proxy: dump ProxyProtocolHandler state separately
Somewhat inelegant - nasty extra header & dynamic cast.

Change-Id: Id18b2f7831ece3b971290e799c5df182429aa2a0
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95448
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-06-04 15:49:46 +02:00
Ashod Nakashian
d06ad733c5 wsd: improved RequestDetails parsing and documentation
...with support for properly extracting the different
fields with unit-test.

URIs are quite complex and varied. For historic reasons
they have all been treated without distinction, which
makes support for all variants difficult. RequestDetails
encapsulates this complexity, and now it is almost
completely documented both descriptively and functionally
(via extensive unit-tests).

Parsing of the URIs is now more structured by having
named fields instead of relying on knowing which
token should contain which field, which is error-prone
and very opaque.

Change-Id: I68d07c2e00baf43f0ade97d20f62691ffb3bf576
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95292
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-06-02 20:04:48 +02:00
Ashod Nakashian
4a8937d0d1 wsd: performance improvements
Change-Id: I137dc67b4231df1cd23a9dce72e6b12dc1bf364e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95343
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-06-02 20:01:39 +02:00
Ashod Nakashian
224ef08c7f wsd: single-char string literals -> char
More readable and typically more efficient.

Change-Id: I9bd5bfc91f4ac255bb8ae0987708fb8b56b398f8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95285
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-06-02 01:31:26 +02:00
Michael Meeks
e600721abe Proxy: use much more obscure session IDs.
Change-Id: I1220216b88aaa3c9a0bc58ed5bf4b20b4214d997
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94090
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-05-13 02:01:59 +02:00
Michael Meeks
99d6282dde Proxy: re-arrange URL structure & document it better.
Also implement 'close' during browser unload.

Change-Id: Ie2072c14cf863876c633b3371b86016367ad4992
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94089
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-05-13 00:53:36 +02:00
Michael Meeks
34fc7fb6b7 Proxy: move requestDetails closer to ProxyProtocol.
Change-Id: I07c00ea1dad15fd70b658a04f722cbd516fd5c18
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94088
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-05-13 00:53:24 +02:00
Michael Meeks
2cbf6d12a0 Proxy: only accept request from localhost.
Also - add net.proxy_prefix setting to enable this.

Change-Id: I87f5aab2316c053ea1bc8cc177e4a54ba0455697
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93682
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-05-08 18:05:14 +02:00
Michael Meeks
90b6216427 Proxy: send 200 back when there is no queue.
Keep errors for errors.

Change-Id: I6f93bf90e21e68b66fc3d1532ae3db2f2431fca5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93655
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-05-07 18:03:57 +02:00
Michael Meeks
18c4301a1f Proxy: re-factor proxy handling into ServerURL and cleanup copy/paste.
Also adds ServiceRoot handling for clipboard.

Change-Id: I7bc6591130fcc7d693e59ab8561fb9e99f4e93d5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93578
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-05-06 23:12:12 +02:00
Michael Meeks
b4feecde2d Proxy: marshal message serial too.
Change-Id: I23a28fe052062a0b98bbb2828b71ab8de6f1459c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92816
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-04-24 20:42:05 +02:00
Michael Meeks
6e7977bbb8 Proxy: improve debugging and connection handling.
Change-Id: I1d48c4ec7fb80eaab1aabc83b0c210b7cf138ef2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92815
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-04-24 19:55:00 +02:00
Michael Meeks
d334785dce Proxy: don't leave out sockets lingering around for the !flush case.
Change-Id: I13ad123a6c3a068a676eae5e509367e727e9ac06
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92814
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-04-24 16:45:50 +02:00
Michael Meeks
01519bdc64 Proxy: improve debugging & naming.
Change-Id: Ifba669a33855a67c9a4e968db42ef1a2cb301d63
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92813
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-04-24 16:44:55 +02:00
Michael Meeks
b3d2e03b39 Proxy: ensure dumpState dumps via the MessageHandlerInterface too.
Change-Id: If514e2359188d56bbf7ddef6e04f9d8bf5c50910
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92812
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-04-24 16:43:22 +02:00
Michael Meeks
8c98b5930f Proxy: poll for output space if we need waking.
Change-Id: I18a5e71bd3342eea7992672d9be1f5518ea008e3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92810
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-04-24 16:12:01 +02:00
Michael Meeks
c28fff4cfa Proxy: open four wait sockets concurrently.
Change-Id: I08b85677be528b7aa77272a8527c9bacf3f7c336
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92809
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-04-24 15:58:42 +02:00
Michael Meeks
fdc062b488 Proxy protocol bits.
For now very silly: [T|B] + hex length + \n + content + \n

Change-Id: I256b834a23cca975a705da2c569887665ac6be02
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92806
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-04-24 13:57:49 +02:00
Michael Meeks
bf0662bda1 Proxy websocket prototype.
Try to read/write avoiding a websocket.

Change-Id: I382039fa88f1030a63df1e47f687df2ee5a6055b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92805
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-04-24 13:09:09 +02:00