dlundquist / sniproxy

Proxies incoming HTTP and TLS connections based on the hostname contained in the initial request of the TCP session.
BSD 2-Clause "Simplified" License
2.57k stars 398 forks source link

Replace PCRE 1 with PCRE 2 #403

Closed loqs closed 8 months ago

loqs commented 8 months ago

Closes https://github.com/dlundquist/sniproxy/issues/392.

loqs commented 8 months ago

Thank you, I took a stab at this keeping libpcre3 support so I didn't break existing users pcre2. Let me know if you want to fix this up and keep libpcre (legacy) support or I should just merge mine.

I think I have resolved the issues with this apart from the fact it does not maintain libpcre3 support. If you want to merge yours I think that would be the best solution as you are more familiar with the code base and have to maintain it. Or I can add libpre3 support back to this.

dlundquist commented 8 months ago

Thank you, I took a stab at this keeping libpcre3 support so I didn't break existing users pcre2. Let me know if you want to fix this up and keep libpcre (legacy) support or I should just merge mine.

I think I have resolved the issues with this apart from the fact it does not maintain libpcre3 support. If you want to merge yours I think that would be the best solution as you are more familiar with the code base and have to maintain it. Or I can add libpre3 support back to this.

I think it is important to maintain support for the legacy pcre library. I appreciate you motivating me to address this, and learn a little more about autoconf along the way.

Your approach of keeping the match data on the backend object is probably more efficient from a memory allocation perspective, but clouds the distinction between configuration and connection state

loqs commented 8 months ago

Resolved by https://github.com/dlundquist/sniproxy/commit/7fdd86c054a21f7ac62343010de20f28645b14d2