Commit Graph

218 Commits

Author SHA1 Message Date
Joe Bryan
c312ff0427 renames u3_proxy_listener to u3_prox, renames relevant functions 2018-06-15 14:16:17 -04:00
Joe Bryan
cbe05913a1 renames loopback and duplex functions, refactors _proxy_write 2018-06-15 14:16:17 -04:00
Joe Bryan
81cf3867d0 checks types in u3_http_ef_that, calculates length for host snprintf 2018-06-15 14:16:17 -04:00
Joe Bryan
ed913d859a prevents length-extension attack on Host/SNI matching 2018-06-15 14:16:17 -04:00
Joe Bryan
378d707c78 null-terminates (and strips port from) Host header 2018-06-15 14:16:17 -04:00
Joe Bryan
03d6469e5f cleans up error handling on proxy reverse listener failures 2018-06-15 14:16:17 -04:00
Joe Bryan
61b8a20b42 adds src tagged union to u3_proxy_conn, refactors connection lifecycle 2018-06-15 14:16:17 -04:00
Joe Bryan
bf041ef80d fixes overly-complicated loopback proxy connect logic 2018-06-15 14:16:17 -04:00
Joe Bryan
a10479abd0 refactors proxy reverse listener callback to be clear that it always closes 2018-06-15 14:16:17 -04:00
Joe Bryan
85f8b10ca7 fixes memory leak on proxy reverse connection failure 2018-06-15 14:16:17 -04:00
Joe Bryan
b59bdb217c fixes use-after-free on proxy reverse connection failure 2018-06-15 14:16:17 -04:00
Joe Bryan
8835510aeb refactors proxy server startup to better handle EADDRINUSE 2018-06-15 14:16:17 -04:00
Joe Bryan
5dfb51b1dd updates SNI parsing to not fail on valid ClientHello without SNI 2018-06-15 14:16:17 -04:00
Joe Bryan
55b7b30329 refactors proxy peek parsing, again 2018-06-15 14:16:17 -04:00
Joe Bryan
12da824716 refactors libuv read_cb error handling, adds _proxy_write() 2018-06-15 14:16:17 -04:00
Joe Bryan
84b1dd7628 connection close debugging, TODO comments 2018-06-15 14:16:17 -04:00
Joe Bryan
52503a2add updates proxy to always allocate 4K buffers on socket read 2018-06-15 14:16:17 -04:00
Joe Bryan
ad424fcbda binds proxies on ports 80/443, or 9090/9443 then ascending 2018-06-15 14:16:17 -04:00
Joe Bryan
06259e2d7d adds SNI parser (commented out pending build decision) 2018-06-15 14:16:17 -04:00
Joe Bryan
fb8b24259a refactors proxy peeking to support multiple reads 2018-06-15 14:16:17 -04:00
Joe Bryan
e2565e4b87 refactors proxy peek parsing 2018-06-15 14:16:17 -04:00
Joe Bryan
40f7e683fc refactors proxy listener startup to support multiple 2018-06-15 14:16:17 -04:00
Joe Bryan
7dcf91e689 removes the upstream/downstream read_cb buffer copies 2018-06-15 14:16:17 -04:00
Joe Bryan
040e162176 checks return code on uv_tcp_connect 2018-06-15 14:16:17 -04:00
Joe Bryan
90603f5bbb copies read_cb buffers before writes 2018-06-15 14:16:17 -04:00
Joe Bryan
eeb0536ab9 wires up reverse proxy notification effect %that
works!
2018-06-15 14:16:17 -04:00
Joe Bryan
9c08361cf8 use domain from -H instead of hardcoding urbit.org 2018-06-15 14:16:17 -04:00
Joe Bryan
f9618b1587 adds client for ship-specific reverse proxy, comments throughout 2018-06-15 14:16:17 -04:00
Joe Bryan
4792466ed5 implements reverse listener and "should-proxy" predicate, refactors loopback 2018-06-15 14:16:17 -04:00
Joe Bryan
2eb44fd326 adds http request parser for host header 2018-06-15 14:16:17 -04:00
Joe Bryan
65ac6dd5e0 refactors loopback proxy and connection structs, corrects close/free lifecycle 2018-06-15 14:16:17 -04:00
Joe Bryan
3c24756d28 looks up the correct loopback port by server struct 2018-06-15 14:16:17 -04:00
Joe Bryan
e1b5ab35cd adds proxy listener and connection structs, refactors loopback proxy 2018-06-15 14:16:17 -04:00
Joe Bryan
c4928a7f3b adds initial, leaky tcp loopback proxy 2018-06-15 14:16:17 -04:00
Keaton Dunsford
41d89f30af Version the bootstrap.urbit.org boot pill URL
This way, between continuity breaches, we can update the old pills,
adding printf's to them that will trigger upon `~zod is not responding`
messages such as urbit/arvo@c83fb6e23e,
telling people to pull the latest Vere. And upon breaches, we
can update these bootstrap links. This is a simple/hacky yet reasonably
effective way to help get more people on the same page as it relates to
handling users running different Veres with breaking changes.
2018-06-08 19:26:29 -07:00
Joe Bryan
cfe3779fc0 updates ames to resolve galaxy addresses asynchronously 2018-05-22 15:05:03 -07:00
Joe Bryan
ad4f76a431 adds state enum to u3_hreq, ignores attempts to send duplicate http responses 2018-05-04 15:49:44 -04:00
Joe Bryan
38f9c546c4
Merge pull request #972 from joemfb/ames-f-n
allows imperial addresses in the absence of -N (fix -F)
2018-04-25 14:45:00 -07:00
Joe Bryan
2b3554a845 refactors _http_req_respond to use the h2o memory pool and defer cleanup
possibly fixing a use after free
2018-04-25 16:14:59 -04:00
Joe Bryan
dcc5eb521d fixes memory leak in ames fuzz-mode canceled requests 2018-04-24 15:28:35 -04:00
Joe Bryan
4466119b2e allows imperial addresses in the absence of -N 2018-04-24 15:27:04 -04:00
Joe Bryan
2a10000a67 fixes improper null-termination in cttp header buffers 2018-04-16 15:14:49 -04:00
Joe Bryan
0588a3c7fd updates "secure server not started" msg to be friendlier 2018-04-11 13:57:14 -07:00
Joe Bryan
3ee0c7605c removes client request debug printf 2018-04-11 12:23:42 -07:00
Joe Bryan
70cb696559 terminates all strings in headers and body buffers 2018-04-10 17:04:21 -07:00
Joe Bryan
a62d59edf0 cleans up http headers, incorporate review feedback 2018-04-10 17:04:21 -07:00
Joe Bryan
05339a771e adds extra newline between headers and body 2018-04-10 12:55:44 -07:00
Joe Bryan
b745cb83bc updates cttp.c to allocate header struct and members separately 2018-04-10 12:55:44 -07:00
Joe Bryan
6c36594f6f Merge branch 'master' into libh2o
* master: (124 commits)
  use compile-time assertion to check for unsigned char
  Don't build libuv in travis if it is now submoduled.
  Rebuild the scripts without PKG_CONFIG_PATH hacks.
  Remove manual PKG_CONFIG_PATH configuration.
  Enable fallback libuv bundle
  Bundle libuv.
  adds a cell check for the sample of the +roll gate
  Add missing flags fixing the markdown parser bug #951
  Revert "Merge pull request #952 from eglaysher/revert-meson"
  Revert "Merge pull request #949 from eglaysher/meson-build-clean"
  Revert "The -C flag was added for exactly this case."
  The -C flag was added for exactly this case.
  Take ownership of the submodule repositories.
  Revert "Revert "Merge pull request #941 from frodwith/runtime-overflows""
  Add legacy meson instructions to README
  Fix new meson version check
  Fix legacy meson version detection.
  Universal meson build.
  change overflow check to short
  do the don trick for jam
  ...
2018-04-09 19:49:40 -07:00
Keaton Dunsford
87e28fb787
Merge pull request #953 from eglaysher/reapply-meson
Reapply meson
2018-04-09 19:14:55 -07:00