chiark / gitweb /
new config definition
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 2 Apr 2017 16:56:52 +0000 (17:56 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 2 Apr 2017 16:56:52 +0000 (17:56 +0100)
README.config
hippotat/__init__.py
sgo-demo.cfg
simple.cfg

index 4c0a43ea752f6918ac007c82cd8e0c99a4042473..fc2bbf808a1e4e955835c872df95499e21ef7129 100644 (file)
@@ -3,31 +3,39 @@
 Sections
 
   [<servername> - <clientaddr>]
-  [<clientaddr>]
-  [<servername>]   usually [SERVER]
+  [<client>]
+  [<servername>]      usually [SERVER]
   [DEFAULT]
 
-Keys are looked up in that order.  <servername> must not
-be a valid IPv4 or IPv6 address.
+Keys are looked up in that order.
+<client> is the client's virtual address.
+<servername> must not look like an address.
 
 Exceptional settings:
 
   server
-
      Specifies <servername>.
      Is looked up in [SERVER] and [DEFAULT] only.
      If not specified there, it is SERVER.
 
+     Used by server to select the appropriate parts of the
+     rest of the configuration.  Ignored by the client.
+
   password
+     Looked up in the usual way, but used by client and server to
+     determine which possible peerings to try to set up, and which to
+     ignore.
 
-     Looked up in the usual way, but used by client to
-     determine its own <clientaddr>s.
+     We define the sets of putative clients and servers, as follows:
+     all those, for which there is any section (even an empty one)
+     whose name is based on <client> or <servername> (as applicable).
 
-     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.
+     The server queue packets for, and accept requests from, each
+     putative client for which the config search yields a password.
 
-     On the server: clients with no password are ignored.
+     Each client will create a local interface, and try to communicate
+     with the server, for each possible pair (putative server,
+     putative client) for which the config search yields a password.
 
 Capped settings:
 
index 60b779f1dcb3253bbe4b9011a1c671004c7d6483..8563834b5aca1ff16b48561d7bdba61f0034b9c1 100644 (file)
@@ -97,44 +97,42 @@ class LogNotBoringTwisted:
 
 defcfg = '''
 [DEFAULT]
-#[<client>] overrides
-max_batch_down = 65536           # used by server, subject to [limits]
-max_queue_time = 10              # used by server, subject to [limits]
-target_requests_outstanding = 3  # must match; subject to [limits] on server
-http_timeout = 30                # used by both } must be
-http_timeout_grace = 5           # used by both }  compatible
-max_requests_outstanding = 4     # used by client
-max_batch_up = 4000              # used by client
-http_retry = 5                   # used by client
+max_batch_down = 65536
+max_queue_time = 10
+target_requests_outstanding = 3
+http_timeout = 30
+http_timeout_grace = 5
+max_requests_outstanding = 6
+max_batch_up = 4000
+http_retry = 5
 
 #[server] or [<client>] overrides
 ipif = userv root ipif %(local)s,%(peer)s,%(mtu)s,slip %(rnets)s
-# extra interpolations:  %(local)s        %(peer)s          %(rnet)s
-#  obtained   on server  [virtual]server  [virtual]relay    [virtual]network
-#      from   on client  <client>         [virtual]server   [virtual]routes
 
-[virtual]
+# relating to virtual network
 mtu = 1500
-routes = ''
-# network = <prefix>/<len>  # mandatory for server
-# server  = <ipaddr>   # used by both, default is computed from `network'
-# relay   = <ipaddr>   # used by server, default from `network' and `server'
-#  default server is first host in network
-#  default relay is first host which is not server
 
 [server]
-# addrs = 127.0.0.1 ::1    # mandatory for server
-port = 80                  # used by server
-# url              # used by client; default from first `addrs' and `port'
+# addrs = 127.0.0.1 ::1
+port = 80
+# url
+
+# relating to virtual network
+routes = ''
+vnetwork = 172.24.230.192
+# network = <prefix>/<len>
+# server  = <ipaddr>
+# relay   = <ipaddr>
+
 
 # [<client-ip4-or-ipv6-address>]
 # password = <password>    # used by both, must match
 
 [limits]
-max_batch_down = 262144           # used by server
-max_queue_time = 121              # used by server
-http_timeout = 121                # used by server
-target_requests_outstanding = 10  # used by server
+max_batch_down = 262144
+max_queue_time = 121
+http_timeout = 121
+target_requests_outstanding = 10
 '''
 
 # these need to be defined here so that they can be imported by import *
index 91815b7b7ba9c7ce51b9938527b9e2136a8d08d1..58f2eba28af4dbc21a17cdbdaf7e20bfebca1a79 100644 (file)
@@ -17,16 +17,26 @@ addrs
 addrs
 # port
 # mtu
-# limits eg max_batch_down=65536
+# limits eg
+max_batch_down = 65536
 
 [192.0.2.4]
-# adjusts eg http_timeout = 15
+# adjusts eg
+http_timeout = 15
+# ^ applies to all servers
+
+[davenant 192.0.2.4]
+# adjusts eg
+max_batch_down = 32768
+
 
 # -- in   chiark:master.cfg
-[server]
+[SERVER]
 server = chiark
 
-# -- in   chiark:passwords.d/192.0.2.4
-# -- in   zealot:passwords.d/chiark
-[192.0.2.4]
-password sesame
+# -- in   passwords.d/chiark-192.0.2.4   (on zealot and chiark)
+[chiark 192.0.2.4]
+password = sesame
+
+# zealot knows it's 192.0.2.4 because that's the only client
+# for which it has a password
index fe86d16eb114b0ad24b581dc3332e80729b01d79..854f20eb4b12153fb7f74913151318b080e4d717 100644 (file)
@@ -1,6 +1,5 @@
 [SERVER]
-addrs = 203.0.113.46 2001:db8::4:cafe
-vnetwork = 192.0.2.0/24
+addrs = 203.0.113.46
 
-[192.0.2.6]
+[172.24.230.195]
 password = sesame