[sslh] sslh as http multiplexer
Felix Niederwanger
felix at feldspaten.org
Sat Dec 19 11:46:59 UTC 2020
Hi Yves,
thanks for the reply. I played a bit around with your suggestion and was
successful with something like the following:
{ name: "regex"; host: "192.168.0.2"; port: "80"; regex_patterns:
["^(GET|POST|PUT|OPTIONS|DELETE|HEADER) [^ ]* HTTP/[0-9.]*[\r\n]*Host:
host_A.acme"] },
{ name: "regex"; host: "192.168.0.3"; port: "80"; regex_patterns:
["^(GET|POST|PUT|OPTIONS|DELETE|HEADER) [^ ]* HTTP/[0-9.]*[\r\n]*Host:
host_B.acme"] },
I'm posting this here on the mailing list for future references and to
make this solution searchable
Thanks for the help and the amazing project! I wish you a merry
Christmas and a happy new year :-)
Best,
Felix
On 12/16/20 10:15 PM, Yves Rutschle wrote:
> On Wed, Dec 16, 2020 at 05:04:09PM +0100, Felix Niederwanger wrote:
>> { name: "http", host: "192.168.0.2"; port: "80"; hostname:
>> "host_A.acme"; log_level: 0 },
>> { name: "http", host: "192.168.0.3"; port: "80"; hostname:
>> "host_B.acme"; log_level: 0 },
>>
> The later versions of sslh would have complained that
> 'hostname' is not a valid setting. That's the root cause of
> your problem: 'hostname' is not a valid setting.
> `sni_hostname` is, but only for the TLS probe.
>
> What you could easily do is use the regex probe instead,
> like:
>
> { name: "regex"; host: "192.168.0.2"; port: "80"; regex_patterns: ["^(GET|POST).*host_A.acme"] },
> { name: "regex"; host: "192.168.0.3"; port: "80"; regex_patterns: ["^(GET|POST).*host_B.acme"] },
>
>> Is hostname selection not yet included for http
> It's not really planned. I think in many cases, people
> forward HTTP to a Web server (Apache or nginx) which then
> does the reverse proxying at HTTP level.
>
> Y.
>
--
feldspaten.org | PGP: 0x96C6237EE8C57C7C9989AA036E77A590E3F6D71C
Please, https://useplaintext.email/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.rutschle.net/mailman/archives/sslh/attachments/20201219/b33c9e3e/attachment.sig>
More information about the sslh
mailing list