<p>At the first sight, it looks good overall, just few changes that I would suggest:</p>
<ul>
<li>
<p>I think it would be better to name the new core parameter <code>ksr_tcp_accept_haproxy</code> instead of <code>ksr_tcp_accept_proxy</code>. The <code>proxy</code> term is also used in SIP a lot (Kamailio being a proxy itself), so I think using <code>haproxy</code> is more suggestive for the purpose of the parameter.</p>
</li>
<li>
<p>there are couple of local variables when parsing the PROXY header which are not declared at the beginning of a block (or at the beginning of a function). Latest C compilers do not complain about, but we prefer to stay a bit more strict compliant with older specs in order to have it working on some embedded devices or old distros.</p>
</li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/1765#issuecomment-447257718">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZYi2JtV5QloEC7lPZJjZhlBT_lToks5u42ZegaJpZM4ZR-BH">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZaGfg-8fgVMrkrQLwFfDE-eGFUvyks5u42ZegaJpZM4ZR-BH.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@miconda in #1765: At the first sight, it looks good overall, just few changes that I would suggest:\r\n\r\n  * I think it would be better to name the new core parameter `ksr_tcp_accept_haproxy` instead of `ksr_tcp_accept_proxy`. The `proxy` term is also used in SIP a lot (Kamailio being a proxy itself), so I think using `haproxy` is more suggestive for the purpose of the parameter.\r\n\r\n  * there are couple of local variables when parsing the PROXY header which are not declared at the beginning of a block (or at the beginning of a function). Latest C compilers do not complain about, but we prefer to stay a bit more strict compliant with older specs in order to have it working on some embedded devices or old distros."}],"action":{"name":"View Pull Request","url":"https://github.com/kamailio/kamailio/pull/1765#issuecomment-447257718"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/1765#issuecomment-447257718",
"url": "https://github.com/kamailio/kamailio/pull/1765#issuecomment-447257718",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>