Version 0.6.1 throws an error while parsing configuration file with regrex patterns.
Jan 13 12:26:32 ubuntu sniproxy[85382]: error parsing /etc/sniproxy.conf at 1932 near:
Jan 13 12:26:32 ubuntu systemd[1]: sniproxy.service: Main process exited, code=exited, status=1/FAILURE
Jan 13 12:26:32 ubuntu sniproxy[85382]: Unable to load /etc/sniproxy.conf
Jan 13 12:26:32 ubuntu sniproxy[85382]: Usage: sniproxy [-c <config>] [-f] [-n <max file descriptor limit>] [-V]
Jan 13 12:26:32 ubuntu sniproxy[85382]: 1912 234
Jan 13 12:26:32 ubuntu systemd[1]: sniproxy.service: Failed with result 'exit-code'.
Jan 13 12:26:32 ubuntu sniproxy[85382]: 1916 .*ai\.com$ *
Jan 13 12:26:32 ubuntu sniproxy[85382]: 1933 .*chatgpt\.com$ *
Jan 13 12:26:32 ubuntu sniproxy[85382]: 1955 }
Jan 13 12:26:32 ubuntu sniproxy[85382]: 1957 (null)
/etc/sniproxy.conf:
table {
.*ai\.com$ *
.*chatgpt\.com$ *
}
Version 0.6.1 works fine.
I guess the version in title is wrong? I start to get this very same error on 0.7.0 while 0.6.1 was working fine.
I guess the version in title is wrong? I start to get this very same error on 0.7.0 while 0.6.1 was working fine.
On 0.7.0, if you compiled it yourself, you must put '--enable-dns' in configure or it won't build with dns support, so names in config will fail. On 0.6.1, I don't see a reason.
I see. Thanks.
I have opened https://gitlab.archlinux.org/archlinux/packaging/packages/sniproxy/-/issues/2 at Arch Linux for this.
Could you please confirm which version version of libpcre you build against? Did you include --enable-dns when you ran configure?
I'm not able to reproduce this on Debian 13 with libpcre2:
dustin@m3-debian13:~/src/sniproxy/tests$ ./config_test
# Config loaded from ../sniproxy.conf
username nobody
pidfile /var/run/sniproxy.pid
resolver {
nameserver 127.0.0.1
search example.com
mode ipv6_first
}
listener 0.0.0.0:443 {
protocol tls
table https_hosts
}
listener [::]:80 {
protocol http
table http_hosts
fallback localhost:8080
source 192.0.2.10
}
table {
.*ai.com$ *
.*chatgpt.com$ *
}
dustin@m3-debian13:~/src/sniproxy/tests$