Accept v4/v6 mixed values in "allow" configuration.

Also fix tests on dualstack environment (which binds ::1 rather than
127.0.0.1).

Please adjust coding styles as you prefer.