Commit Graph

35 Commits

Author SHA1 Message Date
Shuanglei Tao
6db541b2b1 server: add mbedtls support 2020-12-30 00:45:09 +08:00
Shuanglei Tao
4d33dc4a60 cmake: check LWS_WITH_SSL 2020-07-27 07:52:22 +08:00
Bartosz Biłas
31c0dff029 src/http.c: fix checking pss's len member (#385)
len member is a size_t type so it can't be less than 0 by definition.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2020-06-19 10:14:42 +08:00
Shuanglei Tao
70c12e4afa http: fix build with lws 1.7 2020-06-14 00:33:35 +08:00
Shuanglei Tao
c38cdc3fd7 clang-format: udpate ColumnLimit to 100 and reformat code 2020-03-26 01:27:11 +08:00
Daniel Monteiro Basso
398bebf091 Improvements for --base-path usage (#292)
* Trim trailing slashes in --base-path option

* Redirect `/base-path` to `/base-path/`

* Log endpoints if --base-path is provided

* Use predefined token for standard header 'location'
2020-03-25 17:12:33 +08:00
Shuanglei Tao
2fdb4c0c03 src: reformat with clang-format 2020-03-14 17:46:26 +08:00
Shuanglei Tao
b0c4ad97f0 all: use the static keyword on functions 2020-03-11 00:54:39 +08:00
Daniel Monteiro Basso
97260858bf Add -b, --base-path option for reverse proxies (#151) (#281)
* Add -b, --base-path option for reverse proxies (#151)
2020-03-10 09:54:34 +08:00
Shuanglei Tao
6bbe4db775 html: use api to fetch auth token 2020-02-06 17:43:40 +08:00
Shuanglei Tao
463da8352e html: xterm.js 4.4.0 2020-02-05 17:01:55 +08:00
Shuanglei Tao
437e63a39c html: embed gziped version 2020-02-05 16:42:43 +08:00
Rosen Penev
42349f28b3 http: add missing header (#263)
Fixes compilation without deprecated OpenSSL APIs.
2020-01-26 12:51:29 +08:00
Shuanglei Tao
5381d0f825 all: remove pthread 2019-09-15 18:39:30 +08:00
Shuanglei Tao
671427b150 src: fallback to lws_get_peer_addresses on old libwebsockets 2019-09-03 22:29:27 +08:00
Xiang Dai
94817b4eb3 Avoid slow reverse-DNS requests caused by libwebsocket (#222)
* Avoid slow reverse-DNS requests caused by libwebsocket

According to warmcat/libwebsockets#537 and following my own experience, in some circumstances lws_get_peer_addresses can take several seconds to execute a reverse DNS request on a connected peer IP. The effect is that sometimes a websocket connection takes several seconds before it is established.
This PR addresses the described issue by replacing lws_get_peer_addresses with lws_get_peer_simple that completely skips the RDNS request.

Signed-off-by: Xiang Dai <764524258@qq.com>
2019-09-03 13:53:54 +08:00
Shuanglei Tao
9b0166b790 http: handle lws_send_pipe_choked state 2019-06-23 20:10:09 +08:00
Shuanglei Tao
afadc00f54 http: fix libwebsockets 1.7 support 2019-06-23 18:50:30 +08:00
Shuanglei Tao
ae837910da http: add basic auth support back 2019-06-22 18:01:15 +08:00
Shuanglei Tao
c1c82b1a1a http: fix keepalive for lws_serve_http_file 2019-06-22 15:23:24 +08:00
Shuanglei Tao
7901265f52 http: remove hack for old libwebsocket versions 2019-06-22 15:23:24 +08:00
Shuanglei Tao
e3b569160d http: fix keepalive issue 2019-06-15 07:43:18 +08:00
Shuanglei Tao
60a9bf1ab6 http: write index html with buffer 2018-09-01 20:37:18 +08:00
Shuanglei Tao
ac58cde5e6 http: revert change for libwebsockets < 3, fixes #120 2018-09-01 20:05:04 +08:00
Shuanglei Tao
d1d5336af1 http: lws_snprintf -> snprintf
lws_snprintf is not available in libwebsockets 1.7.1
2018-08-18 17:24:57 +08:00
Shuanglei Tao
0f97a69446 libwebsockets 3.0 support 2018-08-18 17:07:41 +08:00
Shuanglei Tao
be91d56904 src: seprate includes from server.h 2018-08-18 09:59:19 +08:00
dohnuts
f6361caa50 Do not try to reuse for lws_serve_http_file, fixes #43
Following documentation it s important to not try to reuse when lws_serve_http_file
return 0 nor to try to reuse the socket.

This fix the issue on openbsd 6.0 ( my current test is with upgraded libwebsocket 2.0.3 instead of 2.0.2 but it shouldnt matter
2017-04-25 20:35:41 +08:00
Shuanglei Tao
3580e80783 Add support for the --max-clients option 2017-04-06 21:45:07 +08:00
Shuanglei Tao
ffdf56e440 Execute command after authentication 2017-02-05 18:06:13 +08:00
Shuanglei Tao
c9ffa8a8d7 Add support for the --index option 2017-01-19 23:40:20 +08:00
Shuanglei Tao
085f6d54db Reformat C source files 2016-12-21 23:10:18 +08:00
Shuanglei Tao
15e2dd96a4 Enable client certificate verification if ssl CA is given 2016-11-23 23:34:56 +08:00
Shuanglei Tao
9174d6116c Implemented authentication for websocket connection 2016-09-25 01:00:34 +08:00
Shuanglei Tao
1f579b491a Move source files to src 2016-09-19 22:20:40 +08:00