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.55k stars 396 forks source link

Idea: Move "source" config option to table stanza #112

Open janeczku opened 10 years ago

janeczku commented 10 years ago

Since the "source" option is related to the upstream connections (client component) and upstreams are defined in the table stanza, it would be more logical to have the source option defined in there, instead of in the listener stanza (server component). This would also prepare for possible future enhancements, like referencing multiple tables in the listener stanza with each having their own "source" setting ...

dlundquist commented 10 years ago

I considered this will fallback addresses too, but decided against it since tables can be shared between listeners. The source address for backend connections definitely could be applied on a per backend server basis (HAProxy does this). Right now tables are a special case in the config parser, before altering them extensively I would like revisit the config parser, and the entire table/backend data model.