sslh/test.cfg
Björn Ketelaars d57a155bf4 Fix (some) failing tests
Found a couple of failing tests on Alpine Linux and OpenBSD. For the
tests to even run `ip4-localhost` has to be changed to an IP-address
(127.0.0.1). `ip4-localhost` is typically not part of `/etc/hosts`.

Output failing tests:

```
not ok 5
udp: 0
prefix: tls:
listen [1]:
    host: localhost
    port: 9025
flushing deferred data to fd 9
selecting... max_fd=11 num_probing=0
activity on fd8
closing fd 8
closing fd 9
selecting... max_fd=11 num_probing=0
#   Failed test at ./t line 59.
#          got: '1'
#     expected: 'sslh-select: Connect and write nothing'
```

```
not ok 22 - sslh-select:ssh: probe connected correctly
#   Failed test 'sslh-select:ssh: probe connected correctly'
#   at ./t line 59.
#          got: 'regex'
#     expected: 'ssh'
```

```
not ok 68 - sslh-select:ssh: probe connected correctly
#   Failed test 'sslh-select:ssh: probe connected correctly'
#   at ./t line 59.
#          got: 'regex'
#     expected: 'ssh'
```

Diff works around issues causing tests 22 and 68 to fail. As of yet, no
workaround for test 5 has been found.
2021-10-27 19:52:06 +02:00

74 lines
3.0 KiB
INI

# Configuration file for testing (use both by sslh under
# test and the test script `t`)
foreground: true;
inetd: false;
numeric: true;
transparent: false;
timeout: 10; # Probe test writes slowly
pidfile: "/tmp/sslh_test.pid";
syslog_facility: "auth";
# Logging configuration
# Value: 1: stdout; 2: syslog; 3: both
# Defaults should be sensible. Generally, you want *-error
# to be always enabled, to know if something is going wrong.
verbose-config: 3; # print configuration at startup
verbose-config-error: 3; # print configuration errors
verbose-connections: 3; # trace established incoming address to forward address
verbose-connections-error: 3; # connection errors
verbose-connections-try: 3; # connection attempts towards targets
verbose-fd: 3; # file descriptor activity, open/close/whatnot
verbose-packets: 3; # hexdump packets on which probing is done
verbose-probe-info: 3; # what's happening during the probe process
verbose-probe-error: 3; # failures and problems during probing
verbose-system-error: 3; # system call problem, i.e. malloc, fork, failing
verbose-int-error: 3; # internal errors, the kind that should never happen
# List of interfaces on which we should listen
# Options:
listen:
(
{ host: "localhost"; port: "8080"; keepalive: true; },
{ host: "localhost"; port: "8081"; keepalive: true; },
{ host: "127.0.0.1"; is_udp: true; port: "8086"; }
);
protocols:
(
{ name: "ssh"; host: "localhost"; port: "9000"; fork: true; transparent: true; },
{ name: "socks5"; host: "localhost"; port: "9001"; },
{ name: "http"; host: "localhost"; port: "9002"; },
{ name: "tinc"; host: "localhost"; port: "9003"; },
{ name: "openvpn"; host: "localhost"; port: "9004"; },
{ name: "xmpp"; host: "localhost"; port: "9009"; },
{ name: "adb"; host: "localhost"; port: "9010"; },
{ name: "syslog"; host: "localhost"; port: "9013"; },
{ name: "ssh"; host: "127.0.0.1"; is_udp: true; port: "9020";
udp_timeout: 30;
regex_patterns: [ "^foo" ];
},
{ name: "regex"; host: "localhost"; port: "9011";
regex_patterns: [ "^foo", "^bar" ];
minlength: 4;
test_patterns: ( # this is used by the test script, not by sslh
{ pattern: "foo"; result: "ssh"; }, # After timeout
{ pattern: "fooo"; result: "regex"; },
{ pattern: "bar"; result: "ssh"; },
{ pattern: "barr"; result: "regex"; },
{ pattern: "barrrr"; result: "regex"; }
);
},
{ name: "tls"; host: "localhost"; port: "9021"; alpn_protocols: [ "alpn1", "alpn2" ]; sni_hostnames: [ "sni1" ]; },
{ name: "tls"; host: "localhost"; port: "9022"; alpn_protocols: [ "alpn1", "alpn2" ]; sni_hostnames: [ "sni2", "sni3" ]; },
{ name: "tls"; host: "localhost"; port: "9023"; alpn_protocols: [ "alpn3" ]; },
{ name: "tls"; host: "localhost"; port: "9024"; sni_hostnames: [ "sni3" ]; },
{ name: "tls"; host: "localhost"; port: "9025"; },
{ name: "anyprot"; host: "localhost"; port: "9099"; }
);
on_timeout: "ssh";