The yxorp Reference Manual

This is the yxorp Reference Manual, version 1.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 15:54:32 2024 GMT+0.

Table of Contents


1 Systems

The main system appears first, followed by any subsystem dependency.


1.1 yxorp

A reverse proxy server that supports WebSocket, HTTP, HTTPS,
HTTP to HTTPS redirecting, port and host forwarding configuration using a real programming language, HTTP header and body manipulation (also using a real programming language).

Author

Charles Jackson <>

License

AGPL3

Version

1.1

Dependencies
  • binding-arrows (system).
  • chipz (system).
  • chunga (system).
  • cl+ssl (system).
  • flexi-streams (system).
  • rutils (system).
  • salza2 (system).
  • smart-buffer (system).
  • str (system).
  • trivial-garbage (system).
  • usocket (system).
  • usocket-server (system).
Source

yxorp.asd.

Child Components

2 Files

Files are sorted by type and then listed depth-first from the systems components trees.


2.1 Lisp


2.1.1 yxorp/yxorp.asd

Source

yxorp.asd.

Parent Component

yxorp (system).

ASDF Systems

yxorp.


2.1.2 yxorp/package.lisp

Source

yxorp.asd.

Parent Component

yxorp (system).

Packages

2.1.3 yxorp/smart-buffer-stream.lisp

Dependency

package.lisp (file).

Source

yxorp.asd.

Parent Component

yxorp (system).

Public Interface
Internals

2.1.4 yxorp/threads.lisp

Dependency

smart-buffer-stream.lisp (file).

Source

yxorp.asd.

Parent Component

yxorp (system).

Public Interface
Internals

2.1.5 yxorp/coding.lisp

Dependency

threads.lisp (file).

Source

yxorp.asd.

Parent Component

yxorp (system).

Internals

2.1.6 yxorp/config.lisp

Dependency

coding.lisp (file).

Source

yxorp.asd.

Parent Component

yxorp (system).

Public Interface
Internals

2.1.7 yxorp/utils.lisp

Dependency

config.lisp (file).

Source

yxorp.asd.

Parent Component

yxorp (system).

Public Interface
Internals

2.1.8 yxorp/main.lisp

Dependency

utils.lisp (file).

Source

yxorp.asd.

Parent Component

yxorp (system).

Public Interface
Internals

3 Packages

Packages are listed by definition order.


3.1 yxorp

Source

package.lisp.

Use List

common-lisp.

Used By List

yxorp-config.

Public Interface
Internals

3.2 yxorp-config

Source

package.lisp.

Use List
  • binding-arrows.
  • common-lisp.
  • yxorp.

4 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


4.1 Public Interface


4.1.1 Special variables

Special Variable: *headers*
Package

yxorp.

Source

utils.lisp.

Special Variable: *integer-headers*
Package

yxorp.

Source

utils.lisp.

Special Variable: *request-headers*
Package

yxorp.

Source

utils.lisp.

Special Variable: *response-headers*
Package

yxorp.

Source

utils.lisp.

Special Variable: *suppress-errors*
Package

yxorp.

Source

main.lisp.


4.1.2 Ordinary functions

Function: config (&key port destinator request-filter response-filter ssl)
Package

yxorp.

Source

config.lisp.

Function: extract-charset ()
Package

yxorp.

Source

utils.lisp.

Function: header (name &optional headers)
Package

yxorp.

Source

utils.lisp.

Function: (setf header) (name)
Package

yxorp.

Source

utils.lisp.

Function: map-threads (function)
Package

yxorp.

Source

threads.lisp.

Function: read-config (file)
Package

yxorp.

Source

config.lisp.

Function: read-headers (stream)
Package

yxorp.

Source

utils.lisp.

Function: ssl-config (&key certificate key password redirect-port redirect-to)
Package

yxorp.

Source

config.lisp.

Function: start (config)
Package

yxorp.

Source

main.lisp.

Function: stop ()
Package

yxorp.

Source

main.lisp.

Function: track-thread (thread)
Package

yxorp.

Source

threads.lisp.

Function: websocket-p ()
Package

yxorp.

Source

utils.lisp.

Function: write-body-and-headers (body stream)
Package

yxorp.

Source

utils.lisp.

Function: write-headers (stream)
Package

yxorp.

Source

utils.lisp.


4.1.3 Generic functions

Generic Reader: port (object)
Package

yxorp.

Methods
Reader Method: port ((destination destination))

automatically generated reader method

Source

config.lisp.

Target Slot

port.


4.1.4 Standalone methods

Method: print-object ((obj destination) out)
Source

config.lisp.

Method: stream-write-byte ((stream smart-buffer-stream) byte)
Package

sb-gray.

Source

smart-buffer-stream.lisp.

Method: stream-write-char ((stream smart-buffer-stream) char)
Package

sb-gray.

Source

smart-buffer-stream.lisp.

Method: stream-write-sequence ((stream smart-buffer-stream) sequence start end &key &allow-other-keys)
Package

trivial-gray-streams.

Source

smart-buffer-stream.lisp.

Method: stream-write-string ((stream smart-buffer-stream) string &optional start end)
Package

sb-gray.

Source

smart-buffer-stream.lisp.


4.1.5 Structures

Structure: config
Package

yxorp.

Source

config.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: port
Type

yxorp:port

Initform

8080

Readers

config-port.

Writers

This slot is read-only.

Slot: destinator
Type

(or (function nil yxorp::destination-specifier) symbol)

Initform

(lambda nil 8081)

Readers

config-destinator.

Writers

This slot is read-only.

Slot: request-filter
Readers

config-request-filter.

Writers

This slot is read-only.

Slot: response-filter
Readers

config-response-filter.

Writers

This slot is read-only.

Slot: ssl
Type

(or yxorp:ssl-config null)

Readers

config-ssl.

Writers

This slot is read-only.

Structure: ssl-config
Package

yxorp.

Source

config.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: certificate
Type

(or pathname string)

Initform

"cert.pem"

Readers

ssl-config-certificate.

Writers

This slot is read-only.

Slot: key
Type

(or pathname string)

Initform

"key.pem"

Readers

ssl-config-key.

Writers

This slot is read-only.

Slot: password
Type

(or string null)

Readers

ssl-config-password.

Writers

This slot is read-only.

Slot: redirect-port
Type

(or yxorp:port null)

Readers

ssl-config-redirect-port.

Writers

This slot is read-only.

Slot: redirect-to
Type

yxorp:port

Initform

443

Readers

ssl-config-redirect-to.

Writers

This slot is read-only.


4.1.6 Classes

Class: destination
Package

yxorp.

Source

config.lisp.

Direct methods
Direct slots
Slot: protocol
Type

yxorp::protocol

Initform

:http

Initargs

:protocol

Readers

protocol.

Writers

This slot is read-only.

Slot: host
Type

string

Initform

"127.0.0.1"

Initargs

:host

Readers

host.

Writers

This slot is read-only.

Slot: port
Type

(or null yxorp:port)

Initargs

:port

Readers

port.

Writers

This slot is read-only.


4.1.7 Types

Type: port ()
Package

yxorp.

Source

config.lisp.


4.2 Internals


4.2.1 Special variables

Special Variable: *threads*
Package

yxorp.

Source

threads.lisp.

Special Variable: *threads*-lock
Package

yxorp.

Source

threads.lisp.

Special Variable: +crlf+
Package

yxorp.

Source

utils.lisp.


4.2.2 Macros

Macro: with-socket-handler-case (stream &body body)
Package

yxorp.

Source

main.lisp.


4.2.3 Ordinary functions

Function: %parse-request-headers (string)
Package

yxorp.

Source

utils.lisp.

Function: %parse-response-headers (string)
Package

yxorp.

Source

utils.lisp.

Function: apply-decoding (stream encoding)
Package

yxorp.

Source

coding.lisp.

Function: apply-decodings (stream decodings)
Package

yxorp.

Source

coding.lisp.

Function: apply-encoding (stream encoding)
Package

yxorp.

Source

coding.lisp.

Function: apply-encodings (stream encodings)
Package

yxorp.

Source

coding.lisp.

Function: chunkify (stream)
Package

yxorp.

Source

coding.lisp.

Reader: config-destinator (instance)
Package

yxorp.

Source

config.lisp.

Target Slot

destinator.

Function: config-p (object)
Package

yxorp.

Source

config.lisp.

Reader: config-port (instance)
Package

yxorp.

Source

config.lisp.

Target Slot

port.

Reader: config-request-filter (instance)
Package

yxorp.

Source

config.lisp.

Target Slot

request-filter.

Reader: config-response-filter (instance)
Package

yxorp.

Source

config.lisp.

Target Slot

response-filter.

Reader: config-ssl (instance)
Package

yxorp.

Source

config.lisp.

Target Slot

ssl.

Function: copy-config (instance)
Package

yxorp.

Source

config.lisp.

Function: copy-ssl-config (instance)
Package

yxorp.

Source

config.lisp.

Function: copy-stream-to-stream (in out length)
Package

yxorp.

Source

utils.lisp.

Function: default-protocol-port (protocol)
Package

yxorp.

Source

config.lisp.

Function: destination-secure-p (destination)
Package

yxorp.

Source

config.lisp.

Function: encodingp (thing)
Package

yxorp.

Source

coding.lisp.

Function: extract-encodings-from (header)
Package

yxorp.

Source

utils.lisp.

Function: filter-encodings (headers)
Package

yxorp.

Source

main.lisp.

Function: forward-stream (origin destination)
Package

yxorp.

Source

utils.lisp.

Function: handle-headers-and-body (in out filter)

Read an http body from IN, run it through FILTER, and write headers and it to OUT.

Package

yxorp.

Source

utils.lisp.

Function: http-handler (client server config)
Package

yxorp.

Source

main.lisp.

Function: main ()
Package

yxorp.

Source

main.lisp.

Function: make-destination (destination-specifier)
Package

yxorp.

Source

config.lisp.

Function: make-keyword (name)
Package

yxorp.

Source

utils.lisp.

Function: make-ssl-stream (stream config)
Package

yxorp.

Source

utils.lisp.

Function: parse-header-line (line)
Package

yxorp.

Source

utils.lisp.

Function: parse-request-headers (stream)
Package

yxorp.

Source

utils.lisp.

Function: parse-response-headers (stream)
Package

yxorp.

Source

utils.lisp.

Function: proxy-handler (client config)
Package

yxorp.

Source

main.lisp.

Function: read-sequence* (stream)
Package

yxorp.

Source

utils.lisp.

Function: save-ip (headers)
Package

yxorp.

Source

main.lisp.

Function: serialize-headers (headers)
Package

yxorp.

Source

utils.lisp.

Reader: ssl-config-certificate (instance)
Package

yxorp.

Source

config.lisp.

Target Slot

certificate.

Reader: ssl-config-key (instance)
Package

yxorp.

Source

config.lisp.

Target Slot

key.

Function: ssl-config-p (object)
Package

yxorp.

Source

config.lisp.

Reader: ssl-config-password (instance)
Package

yxorp.

Source

config.lisp.

Target Slot

password.

Reader: ssl-config-redirect-port (instance)
Package

yxorp.

Source

config.lisp.

Target Slot

redirect-port.

Reader: ssl-config-redirect-to (instance)
Package

yxorp.

Source

config.lisp.

Target Slot

redirect-to.

Function: ssl-redirect (client config)
Package

yxorp.

Source

main.lisp.

Function: websocket-handler (client server)
Package

yxorp.

Source

main.lisp.


4.2.4 Generic functions

Generic Reader: host (object)
Package

yxorp.

Methods
Reader Method: host ((destination destination))

automatically generated reader method

Source

config.lisp.

Target Slot

host.

Generic Reader: protocol (object)
Package

yxorp.

Methods
Reader Method: protocol ((destination destination))

automatically generated reader method

Source

config.lisp.

Target Slot

protocol.

Generic Reader: size (object)
Package

yxorp.

Methods
Reader Method: size ((smart-buffer-stream smart-buffer-stream))

automatically generated reader method

Source

smart-buffer-stream.lisp.

Target Slot

size.

Generic Writer: (setf size) (object)
Package

yxorp.

Methods
Writer Method: (setf size) ((smart-buffer-stream smart-buffer-stream))

automatically generated writer method

Source

smart-buffer-stream.lisp.

Target Slot

size.


4.2.5 Classes

Class: smart-buffer-stream
Package

yxorp.

Source

smart-buffer-stream.lisp.

Direct superclasses

fundamental-output-stream.

Direct methods
Direct slots
Slot: smart-buffer
Initform

(error "smart-buffer-stream must have a buffer.")

Initargs

:buffer

Slot: size
Initform

0

Readers

size.

Writers

(setf size).


4.2.6 Types

Type: destination-specifier ()
Package

yxorp.

Source

config.lisp.

Type: encoding ()
Package

yxorp.

Source

coding.lisp.

Type: protocol ()
Package

yxorp.

Source

config.lisp.

Type: secure-protocol ()
Package

yxorp.

Source

config.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
A   C   D   E   F   G   H   M   P   R   S   T   W  
Index Entry  Section

%
%parse-request-headers: Private ordinary functions
%parse-response-headers: Private ordinary functions

(
(setf header): Public ordinary functions
(setf size): Private generic functions
(setf size): Private generic functions

A
apply-decoding: Private ordinary functions
apply-decodings: Private ordinary functions
apply-encoding: Private ordinary functions
apply-encodings: Private ordinary functions

C
chunkify: Private ordinary functions
config: Public ordinary functions
config-destinator: Private ordinary functions
config-p: Private ordinary functions
config-port: Private ordinary functions
config-request-filter: Private ordinary functions
config-response-filter: Private ordinary functions
config-ssl: Private ordinary functions
copy-config: Private ordinary functions
copy-ssl-config: Private ordinary functions
copy-stream-to-stream: Private ordinary functions

D
default-protocol-port: Private ordinary functions
destination-secure-p: Private ordinary functions

E
encodingp: Private ordinary functions
extract-charset: Public ordinary functions
extract-encodings-from: Private ordinary functions

F
filter-encodings: Private ordinary functions
forward-stream: Private ordinary functions
Function, %parse-request-headers: Private ordinary functions
Function, %parse-response-headers: Private ordinary functions
Function, (setf header): Public ordinary functions
Function, apply-decoding: Private ordinary functions
Function, apply-decodings: Private ordinary functions
Function, apply-encoding: Private ordinary functions
Function, apply-encodings: Private ordinary functions
Function, chunkify: Private ordinary functions
Function, config: Public ordinary functions
Function, config-destinator: Private ordinary functions
Function, config-p: Private ordinary functions
Function, config-port: Private ordinary functions
Function, config-request-filter: Private ordinary functions
Function, config-response-filter: Private ordinary functions
Function, config-ssl: Private ordinary functions
Function, copy-config: Private ordinary functions
Function, copy-ssl-config: Private ordinary functions
Function, copy-stream-to-stream: Private ordinary functions
Function, default-protocol-port: Private ordinary functions
Function, destination-secure-p: Private ordinary functions
Function, encodingp: Private ordinary functions
Function, extract-charset: Public ordinary functions
Function, extract-encodings-from: Private ordinary functions
Function, filter-encodings: Private ordinary functions
Function, forward-stream: Private ordinary functions
Function, handle-headers-and-body: Private ordinary functions
Function, header: Public ordinary functions
Function, http-handler: Private ordinary functions
Function, main: Private ordinary functions
Function, make-destination: Private ordinary functions
Function, make-keyword: Private ordinary functions
Function, make-ssl-stream: Private ordinary functions
Function, map-threads: Public ordinary functions
Function, parse-header-line: Private ordinary functions
Function, parse-request-headers: Private ordinary functions
Function, parse-response-headers: Private ordinary functions
Function, proxy-handler: Private ordinary functions
Function, read-config: Public ordinary functions
Function, read-headers: Public ordinary functions
Function, read-sequence*: Private ordinary functions
Function, save-ip: Private ordinary functions
Function, serialize-headers: Private ordinary functions
Function, ssl-config: Public ordinary functions
Function, ssl-config-certificate: Private ordinary functions
Function, ssl-config-key: Private ordinary functions
Function, ssl-config-p: Private ordinary functions
Function, ssl-config-password: Private ordinary functions
Function, ssl-config-redirect-port: Private ordinary functions
Function, ssl-config-redirect-to: Private ordinary functions
Function, ssl-redirect: Private ordinary functions
Function, start: Public ordinary functions
Function, stop: Public ordinary functions
Function, track-thread: Public ordinary functions
Function, websocket-handler: Private ordinary functions
Function, websocket-p: Public ordinary functions
Function, write-body-and-headers: Public ordinary functions
Function, write-headers: Public ordinary functions

G
Generic Function, (setf size): Private generic functions
Generic Function, host: Private generic functions
Generic Function, port: Public generic functions
Generic Function, protocol: Private generic functions
Generic Function, size: Private generic functions

H
handle-headers-and-body: Private ordinary functions
header: Public ordinary functions
host: Private generic functions
host: Private generic functions
http-handler: Private ordinary functions

M
Macro, with-socket-handler-case: Private macros
main: Private ordinary functions
make-destination: Private ordinary functions
make-keyword: Private ordinary functions
make-ssl-stream: Private ordinary functions
map-threads: Public ordinary functions
Method, (setf size): Private generic functions
Method, host: Private generic functions
Method, port: Public generic functions
Method, print-object: Public standalone methods
Method, protocol: Private generic functions
Method, size: Private generic functions
Method, stream-write-byte: Public standalone methods
Method, stream-write-char: Public standalone methods
Method, stream-write-sequence: Public standalone methods
Method, stream-write-string: Public standalone methods

P
parse-header-line: Private ordinary functions
parse-request-headers: Private ordinary functions
parse-response-headers: Private ordinary functions
port: Public generic functions
port: Public generic functions
print-object: Public standalone methods
protocol: Private generic functions
protocol: Private generic functions
proxy-handler: Private ordinary functions

R
read-config: Public ordinary functions
read-headers: Public ordinary functions
read-sequence*: Private ordinary functions

S
save-ip: Private ordinary functions
serialize-headers: Private ordinary functions
size: Private generic functions
size: Private generic functions
ssl-config: Public ordinary functions
ssl-config-certificate: Private ordinary functions
ssl-config-key: Private ordinary functions
ssl-config-p: Private ordinary functions
ssl-config-password: Private ordinary functions
ssl-config-redirect-port: Private ordinary functions
ssl-config-redirect-to: Private ordinary functions
ssl-redirect: Private ordinary functions
start: Public ordinary functions
stop: Public ordinary functions
stream-write-byte: Public standalone methods
stream-write-char: Public standalone methods
stream-write-sequence: Public standalone methods
stream-write-string: Public standalone methods

T
track-thread: Public ordinary functions

W
websocket-handler: Private ordinary functions
websocket-p: Public ordinary functions
with-socket-handler-case: Private macros
write-body-and-headers: Public ordinary functions
write-headers: Public ordinary functions


A.3 Variables

Jump to:   *   +  
C   D   H   K   P   R   S  
Index Entry  Section

*
*headers*: Public special variables
*integer-headers*: Public special variables
*request-headers*: Public special variables
*response-headers*: Public special variables
*suppress-errors*: Public special variables
*threads*: Private special variables
*threads*-lock: Private special variables

+
+crlf+: Private special variables

C
certificate: Public structures

D
destinator: Public structures

H
host: Public classes

K
key: Public structures

P
password: Public structures
port: Public structures
port: Public classes
protocol: Public classes

R
redirect-port: Public structures
redirect-to: Public structures
request-filter: Public structures
response-filter: Public structures

S
size: Private classes
Slot, certificate: Public structures
Slot, destinator: Public structures
Slot, host: Public classes
Slot, key: Public structures
Slot, password: Public structures
Slot, port: Public structures
Slot, port: Public classes
Slot, protocol: Public classes
Slot, redirect-port: Public structures
Slot, redirect-to: Public structures
Slot, request-filter: Public structures
Slot, response-filter: Public structures
Slot, size: Private classes
Slot, smart-buffer: Private classes
Slot, ssl: Public structures
smart-buffer: Private classes
Special Variable, *headers*: Public special variables
Special Variable, *integer-headers*: Public special variables
Special Variable, *request-headers*: Public special variables
Special Variable, *response-headers*: Public special variables
Special Variable, *suppress-errors*: Public special variables
Special Variable, *threads*: Private special variables
Special Variable, *threads*-lock: Private special variables
Special Variable, +crlf+: Private special variables
ssl: Public structures


A.4 Data types

Jump to:   C   D   E   F   M   P   S   T   U   Y  
Index Entry  Section

C
Class, destination: Public classes
Class, smart-buffer-stream: Private classes
coding.lisp: The yxorp/coding․lisp file
config: Public structures
config.lisp: The yxorp/config․lisp file

D
destination: Public classes
destination-specifier: Private types

E
encoding: Private types

F
File, coding.lisp: The yxorp/coding․lisp file
File, config.lisp: The yxorp/config․lisp file
File, main.lisp: The yxorp/main․lisp file
File, package.lisp: The yxorp/package․lisp file
File, smart-buffer-stream.lisp: The yxorp/smart-buffer-stream․lisp file
File, threads.lisp: The yxorp/threads․lisp file
File, utils.lisp: The yxorp/utils․lisp file
File, yxorp.asd: The yxorp/yxorp․asd file

M
main.lisp: The yxorp/main․lisp file

P
Package, yxorp: The yxorp package
Package, yxorp-config: The yxorp-config package
package.lisp: The yxorp/package․lisp file
port: Public types
protocol: Private types

S
secure-protocol: Private types
smart-buffer-stream: Private classes
smart-buffer-stream.lisp: The yxorp/smart-buffer-stream․lisp file
ssl-config: Public structures
Structure, config: Public structures
Structure, ssl-config: Public structures
System, yxorp: The yxorp system

T
threads.lisp: The yxorp/threads․lisp file
Type, destination-specifier: Private types
Type, encoding: Private types
Type, port: Public types
Type, protocol: Private types
Type, secure-protocol: Private types

U
utils.lisp: The yxorp/utils․lisp file

Y
yxorp: The yxorp system
yxorp: The yxorp package
yxorp-config: The yxorp-config package
yxorp.asd: The yxorp/yxorp․asd file