chiark / gitweb /
wip new config
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 2 Apr 2017 13:10:41 +0000 (14:10 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 2 Apr 2017 13:10:41 +0000 (14:10 +0100)
README.config [new file with mode: 0644]
simple.cfg [new file with mode: 0644]

diff --git a/README.config b/README.config
new file mode 100644 (file)
index 0000000..4c0a43e
--- /dev/null
@@ -0,0 +1,119 @@
+-*- Fundamental -*-
+
+Sections
+
+  [<servername> - <clientaddr>]
+  [<clientaddr>]
+  [<servername>]   usually [SERVER]
+  [DEFAULT]
+
+Keys are looked up in that order.  <servername> must not
+be a valid IPv4 or IPv6 address.
+
+Exceptional settings:
+
+  server
+
+     Specifies <servername>.
+     Is looked up in [SERVER] and [DEFAULT] only.
+     If not specified there, it is SERVER.
+
+  password
+
+     Looked up in the usual way, but used by client to
+     determine its own <clientaddr>s.
+
+     The client will create a local interface, and try to communicate
+     with the server, for Each (<servername>,<clientaddr>) pair for
+     which the config search yields a password.
+
+     On the server: clients with no password are ignored.
+
+Capped settings:
+
+     Values in <servername> are a cap (maximum) on those from the
+     other sections (including DEFAULT):
+
+  max_batch_down
+     Size limit for response payloads (server only) [65536 bytes]
+
+  max_queue_time
+     Discard downwards packets after this long (server only) [10 s]
+
+  http_timeout
+     (On server) return with empty payload any http request oustanding
+      for this long
+     (On client) give up on any http request outstanding for
+      for this long plus http_timeout_grace
+     Client's effective timeout must be at least server's (checked).
+     [30 s]
+
+  target_requests_outstanding   
+     (On server) whenever number of outstanding requests for
+      a client exceeds this, return oldest with empty payload
+     (On client) try to keep this many requests outstanding.
+     Must match between client and server (checked).  [3]
+
+Ordinary settings, used by client and server:
+
+  ipif
+     Command to run to create and communicate with local network
+     interface.  Passed to sh -c.  Must speak SLIP on stdin/stdout.
+     The following additional interpolations aare substituted:
+                       %(local)s      %(peer)s       %(rnet)s
+          on server    <vaddr>        <vrelay>       <vnetwork>
+          on client    <client>       <vaddr>        <vroutes>
+     ["userv root ipif %(local)s,%(peer)s,%(mtu)s,slip %(rnets)s"]
+
+  addrs
+     Public IP (v4 or v6) address(es) of the server;
+     space-separated.
+     (On server) mandatory; used for bind.  No default.
+     (On client) used only to construct default url.
+
+  vnetwork
+     Private network range (<prefix>/<length>).  Must contain all
+     <client>s.  Must contain <vaddr> and <vrelay>, and used
+     to compute their defaults.  [172.24.230.192/28]
+
+  vaddr
+     Address of server's virtual interface.
+
+  vrelay
+     Virtual point-to-point address used for tunnel routing
+     (does not appear in packets).
+     [first host entry in <vnetwork> other than <vaddr>,
+      so 172.24.230.194]
+
+  port
+     Public port number of the server.  [80]
+     (On server) used for bind.
+     (On client) used only to construct default url.
+
+  mtu
+     Must match exactly.  (checked) [1500 bytes]
+
+Ordinary settings, used by client only:
+
+  http_timeout_grace
+     See http_timeout.  [5 s]
+
+  max_requests_outstanding
+     Client will hold off sending more requests than this to
+     server even if it has data to send.  [6]
+
+  max_batch_up
+     Size limit for request payloads. [4000 bytes]
+
+  http_retry
+     If a request fails, wait this long before considering it
+     "finished" - to limit rate of futile requests.  [5 s]
+
+  url
+     Public url of server.
+     [http://<first-entry-in-addrs>:<port>/]
+
+  vroutes
+     Virtual addresses (in CIDR syntax) to be found at the server
+     end, space-separated.  Routes to those will be created on
+     the client.  [""]
diff --git a/simple.cfg b/simple.cfg
new file mode 100644 (file)
index 0000000..fe86d16
--- /dev/null
@@ -0,0 +1,6 @@
+[SERVER]
+addrs = 203.0.113.46 2001:db8::4:cafe
+vnetwork = 192.0.2.0/24
+
+[192.0.2.6]
+password = sesame