Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 43 lines (40 sloc) 2.305 kb
2339918f » dlundquist
2012-03-07 Fabulous ASCII art diagram and overview explanation
1
2
accc463f » dlundquist
2012-04-26 Updating docs
3 +---------------+
4 |Config: |
5 | config_file |
6 | username |
7 +---------------+
8 | \----------\
9 v |
10 +-----------+ v
2339918f » dlundquist
2012-03-07 Fabulous ASCII art diagram and overview explanation
11 |Listener: |+ +-------+ +------------+
12 | socket || |Table: |+ |Backend: |+
13 | protocol ||--has one-->| name ||--has many->| hostname* ||+
14 +-----------+| +-------+| | address |||
15 +-----------+ +-------+ | port |||
16 ^ +------------+||
accc463f » dlundquist
2012-04-26 Updating docs
17 | +-------------+ +------------+|
18 | |Connection: |+ +------------+
19 | | state ||+ ^
2339918f » dlundquist
2012-03-07 Fabulous ASCII art diagram and overview explanation
20 \-referneces--| listener ||| |
21 | client ||| |
22 | socket ||| |
23 | buffer ||| |
24 | server |||--selected from---/
25 | socket |||
26 | buffer |||
27 +-------------+||
28 +-------------+|
29 +-------------+
30
31 Listeners are listening service ports, each has an associated address, port
32 and protocol and socket. When an incomming connection is accepted on the
33 socket, a new connection object is created. The first packet is inspect
34 and the hostname is extracted from the TLS Client Hello or HTTP Request
35 (depending on protocol selected). The listen's table is consulted for backend
accc463f » dlundquist
2012-04-26 Updating docs
36 maching the requested hostnamer, this match may be simple maching strings or
37 regular expressions. A second server connection is established to the address
38 and port specified by the backend, and the initial packet is forwarded to over
2339918f » dlundquist
2012-03-07 Fabulous ASCII art diagram and overview explanation
39 this second socket. Form this point on, when a packet is received from either
40 the client or server, its contents is buffered and sent through the other
accc463f » dlundquist
2012-04-26 Updating docs
41 socket. When either the client or server closes the socket, the buffer to
42 the other socket is sent and the connection is closed. After both sockets
43 have been closed the connection is removed.
2339918f » dlundquist
2012-03-07 Fabulous ASCII art diagram and overview explanation
44
Something went wrong with that request. Please try again.