bogdanfinn / tls-client

net/http.Client like HTTP Client with options to select specific client TLS Fingerprints to use for requests.
BSD 4-Clause "Original" or "Old" License
670 stars 133 forks source link

add WithLocalAddr option #52

Closed ta3pks closed 1 year ago

ta3pks commented 1 year ago

Ability to bind to a specific local address

bogdanfinn commented 1 year ago

@NikosEfthias thank you for the PR. In general it looks good to me, but can you maybe give me an example why this option is needed? I mean describe a use case or something like that?

I'm currently not getting it 😆

ta3pks commented 1 year ago

This is needed when one has multiple IP addresses assigned to the same machine. Currently, there is no way to select from which source IP address to send request from, so that's why I created this pr

ta3pks commented 1 year ago

just added it for all the types

ta3pks commented 1 year ago

@bogdanfinn is there any roadblocks preventing this from being merged at the moment?

bogdanfinn commented 1 year ago

@bogdanfinn is there any roadblocks preventing this from being merged at the moment?

@ta3pks sorry was just busy and forgot to look at your changes...