Thanks to visit codestin.com
Credit goes to github.com

Skip to content

session.http: support SO_BINDTODEVICE on *nix#6862

Merged
bastimeyer merged 1 commit into
streamlink:masterfrom
bastimeyer:session/http/set-interface-6861
Mar 13, 2026
Merged

session.http: support SO_BINDTODEVICE on *nix#6862
bastimeyer merged 1 commit into
streamlink:masterfrom
bastimeyer:session/http/set-interface-6861

Conversation

@bastimeyer

Copy link
Copy Markdown
Member

In addition to binding to IP addresses, allow non-Windows systems to select the network interface by name. Also add support for prefixes, similar to curl's --interface syntax.


Resolves #6861

@Nogesma please check and see if this successfully resolves your issue.

@bastimeyer bastimeyer force-pushed the session/http/set-interface-6861 branch from 3ad03c9 to a5a78fa Compare March 12, 2026 16:51
@bastimeyer

Copy link
Copy Markdown
Member Author

Quick check:
urllib3.connection.HTTPConnection.default_socket_options exists on urllib3==2.0.0, our min version requirement (I previously only checked the latest version).

@Nogesma

Nogesma commented Mar 12, 2026

Copy link
Copy Markdown

Yes this works! Thanks a lot

In addition to binding to IP addresses, allow non-Windows systems
to select the network interface by name. Also add support for prefixes,
similar to curl's --interface syntax.
@bastimeyer bastimeyer force-pushed the session/http/set-interface-6861 branch from a5a78fa to 7855b09 Compare March 12, 2026 18:45
@bastimeyer

Copy link
Copy Markdown
Member Author

Yes this works!

Could you please check with and without the prefixes and report back? I currently don't have more than one network interface set up, so testing it myself is a bit annoying. Thanks.
https://streamlink--6862.org.readthedocs.build/cli.html#cmdoption-interface

@bastimeyer bastimeyer merged commit 7e3af83 into streamlink:master Mar 13, 2026
25 checks passed
@bastimeyer bastimeyer deleted the session/http/set-interface-6861 branch March 13, 2026 09:37
@Nogesma

Nogesma commented Mar 13, 2026

Copy link
Copy Markdown

Yep it all works fine, with the exception of host! with an ip that's valid on two interfaces, where it will just hang after this [plugins.twitch][debug] Getting live HLS streams for .... But this matches the behavior before this PR, and using if! or ifhost! to specify the interface works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

http_session: interface option binds to an ip address instead of a network interface

2 participants