huin / goupnp

UPnP client library for Go (#golang)
BSD 2-Clause "Simplified" License
430 stars 86 forks source link

Allow http.Client used in discovery to be modified (typically for sec… #57

Closed steve-hellwege-wdc closed 1 year ago

steve-hellwege-wdc commented 1 year ago

…urity reasons)

[why] The importing application may have some specific security requirements that necessitate a change to the http.Client or http.Transport used when fetching the xml from the UPnp server. For example, the importing application may want to restrict localhost calls which could be made by an attack server on the local network.

[how] Create a global HTTPClient which defaults to http.DefaultClient. This allows the importing application to modify this global if it wishes to make changes to the http.Client/http.Transport used when fetching the xml from the UPnP server.

steve-hellwege-wdc commented 1 year ago

@huin ,can you please review/merge this? Thank you.

huin commented 1 year ago

I'll take a look on the weekend, my weeknights are a bit busy.

huin commented 1 year ago

Thanks!