6 local-address "172.18.232.9";
7 secnet-address "172.18.232.10";
8 remote-networks "172.18.232.0/28";
10 set netlink(outside) {
11 local-address "172.18.232.1";
12 secnet-address "172.18.232.2";
13 remote-networks "172.18.232.0/28";
16 set ports(inside) {16913 16910}
17 set ports(outside) 16900
30 set pipefp test/$which.netlink
32 file delete $pipefp.$tr
33 exec mkfifo -m600 $pipefp.$tr
34 set netlinkfh($which.$tr) [set fh [open $pipefp.$tr r+]]
35 fconfigure $fh -blocking 0 -buffering none -translation binary
37 fileevent $netlinkfh($which.r) readable [list netlink-readable $which]
38 set fakeuf test/$which.fake-userv
39 set fakeuh [open $fakeuf w 0755]
40 puts $fakeuh "#!/bin/sh
43 cat <&3 3<&- >$pipefp.r &
53 userv-path \"$fakeuf\";
56 buffer sysbuffer(2048);
57 interface \"secnet-test-[string range $which 0 0]\";
62 foreach port $ports($which) {
66 buffer sysbuffer(4096);
72 local-name \"test-example/$which/$which\";
73 local-key rsa-private(\"test-example/$which.key\");
75 append cfg $extra($which)
79 class "info","notice","warning","error","security","fatal";
86 random randomfile("/dev/urandom",no);
87 transform eax-serpent { }, serpent256-cbc { };
88 include test-example/sites.conf
89 sites map(site,vpn/test-example/all-sites);
94 proc spawn-secnet {which} {
96 upvar #0 pids($which) pid
97 set cf test/$which.conf
99 puts $ch [mkconf $which]
101 set argl [list -dvnc $cf]
106 puts -nonewline $netlinkfh($which.t) "\xc0"
109 proc netlink-readable {which} {
111 upvar #0 netlinkfh($which.r) fh
112 read $fh; # empty the buffer
113 switch -exact $which {
116 set ok 1; # what a bodge
125 proc bgerror {message} {
126 global errorInfo errorCode
129 ----------------------------------------
134 ----------------------------------------