Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Http request bind laddr #24

Merged
merged 2 commits into from
Sep 28, 2020
Merged

Conversation

fAuernigg
Copy link
Contributor

Bind socket to local address allows us to use specific network interfaces for http requests (e.g. for a VPN).
This is used by a baresip http request module. We could make a PR for this module for baresip if required.

tcp_connect_bind binds to a local address before connecting.
@alfredh
Copy link
Contributor

alfredh commented Sep 27, 2020

please fix the ccheck error:

./src/http/client.c:449: line is too wide (84 - max 79)
206

@fAuernigg fAuernigg force-pushed the http_request_bind_laddr branch from f7a4518 to fa1d6b2 Compare September 27, 2020 11:43
@fAuernigg fAuernigg force-pushed the http_request_bind_laddr branch 2 times, most recently from ca4f0fe to 79477b7 Compare September 27, 2020 20:39
Set laddr and laddr6 with http_client_set_laddr, http_client_set_laddr6
to bind http requests to a local ip address.

http_request selects between laddr and laddr6 after the address family
of the server address was detected.
@fAuernigg fAuernigg force-pushed the http_request_bind_laddr branch from 79477b7 to fad6a8b Compare September 27, 2020 21:14
@alfredh
Copy link
Contributor

alfredh commented Sep 28, 2020

ok to merge to master

@sreimers sreimers merged commit 2dcf85d into baresip:master Sep 28, 2020
wip-sync pushed a commit to NetBSD/pkgsrc-wip that referenced this pull request Nov 28, 2020
= libre Changelog

== [v1.1.0] - 2020-10-04

=== Added

- tls: functions to get the certificate issuer and subject [#18]
- uri: Added path field to struct uri and its decode to uri_decode [#22]
- tcp: add tcp_connect_bind [#24]
- http: support bind to laddr in http_request [#24]
- sipreg: support Cisco REGISTER keep-alives [#19]
- sip: websocket support [#26]

=== Fixed

- tls/openssl: fix X509_NAME win32/wincrypt.h conflict
- dns: listen on IPv4 and IPv6 socket [#27]
- main: fix/optimize windows file descriptors [#25]

=== Contributors (many thanks)

- Alfred E. Heggestad
- Christian Spielberger
- Christoph Huber
- Franz Auernigg
- Juha Heinanen
- Sebastian Reimers

== [v1.0.0] - 2020-09-08

=== Added

- sip: add trace
- sdp: sdp_media_disabled API function [#2]
- tls: add tls_set_selfsigned_rsa [#6]
- tls: add functions to verify server cert, purpose and hostname [#10]
- http: client should set SNI [#10]
- http: client should use tls functions to verify server certs, purpose
  and hostname [#10]
- sipreg: add proxy expires field and get function [#13]
- sipreg: make re-register interval configurable [#13]

=== Changed

- debian: Automatic cleanup after building debian package

=== Fixed

- Set SDK path (SYSROOT) using xcrun (fix building on macOS 10.14)
- tcp: close socket on windows if connection is aborted or reset [#1]
- rtmp: Fix URL path parsing (creytiv#245)
- ice: various fixes [baresip/baresip#925]
- openssl/tls: replace deprecated openssl 1.1.0 functions [#5]

=== Contributors (many thanks)

- Alfred E. Heggestad
- Christian Spielberger
- Christoph Huber
- Franz Auernigg
- juha-h
- Juha Heinanen
- Richard Aas
- Sebastian Reimers

[#25]: baresip/re#25
[#27]: baresip/re#27
[#26]: baresip/re#26
[#19]: baresip/re#19
[#24]: baresip/re#24
[#22]: baresip/re#22
[#18]: baresip/re#18
[#13]: baresip/re#13
[#10]: baresip/re#10
[#6]: baresip/re#6
[#5]: baresip/re#5
[#2]: baresip/re#2
[#1]: baresip/re#1

[v1.0.0]: baresip/re@v0.6.1...v1.0.0
[v1.1.0]: baresip/re@v1.0.0...v1.1.0
[Unreleased]: baresip/re@v1.1.0...HEAD
@fAuernigg fAuernigg deleted the http_request_bind_laddr branch September 21, 2022 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants