1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
|
If pen is started with the -C option, it can be controlled by connecting
to the control port. Each command is a single line. Pen acts on the
command and then closes the connection.
This is of course meant to be used by an application, but the protocol
is simple enough that it is possible to just telnet into the port and
type the commands manually. This is currently the only way since no
control application has been written yet.
There are obvious security implications which have not been taken into
consideration yet. If pen is running on a dedicated host with no local
users, it is pretty safe to listen to localhost:8888 or some other port
on localhost. SSH or stunnel can then be used to tunnel connections
across a network.
Commands are case sensitive. Available control commands:
ascii
Communication dumps in ascii format (cf option -a).
no ascii
Communication dumps in hex format.
blacklist
Return current blacklist time in seconds.
blacklist T
Set the blacklist time in seconds.
block
Do not make sockets nonblocking.
no block
Make sockets nonblocking.
clients_max
Return max number of clients.
conn_max
Return max number of simultaneous connections.
control
Return address and port where pen listens for control connections.
debug
Return current debug level.
debug N
Set debug level to N.
delayed_forward
Always wait for the next round of the main loop before forwarding
data. Normally pen tries to do that immediately.
no delayed_forward
Try to forward data immediately, to avoid the overhead of copying
it to a temporary buffer and waiting for the next main loop round.
hash
Use a hash on the client IP address for initial server selection.
no hash
Do not use a hash.
http
Add X-Forwarded-For headers to http requests.
no http
Do not add X-Forwarded-For headers.
listen
Return local address and port pen listens to for incoming
client connections.
log
Show where pen is logging, if anywhere.
log FILE
Log to FILE.
mode
Write a summary of the current mode of operation. The listed modes
are block, delayed_forward, hash, roundrobin, stubborn.
no log
Turn off logging.
pid
Return the process id of the running daemon
recent [N]
Shows which clients have connected in the last N seconds
(default 300).
roundrobin
Use round-robin server selection without client tracking
no roundrobin
server N [ address A | port P | max M | hard H | blacklist T ]
Change address, port and/or max connections for server N, or
blacklist it for T seconds.
servers
List address, port and max number of simultaneous connections
for each remote server.
status
Print status information in html format.
stubborn
If the initial server selection is unavailable, close the
client connection without trying another
no stubborn
timeout
Return current connect timeout in seconds.
timeout N
Set connect timeout to N seconds.
web_stats
Return file name of html status reports, if any.
web_stats FILE
Set the name of html status reports.
no web_stats
Do not generate html status reports.
|