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

Support binding to a source address. #518

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

miracle2k
Copy link
Contributor

I want to set the source ip address for a request. I see that there is a TODO in the code. This seems to work for me, which seems almost too easy. Is there something else?

@njsmith
Copy link
Member

njsmith commented May 5, 2018

There's also an open issue at #275, which has a bit more discussion of the subtleties here. This works in simple cases, but it forces a choice of IPv4/IPv6 (whichever one you use as the source), and there's some problem around picking a port given that we might be making multiple connections... let's move the discussion there.

@codecov
Copy link

codecov bot commented May 8, 2018

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00000%. Comparing base (5ca9662) to head (f7583d7).

Additional details and impacted files
@@               Coverage Diff               @@
##                 main         #518   +/-   ##
===============================================
  Coverage   100.00000%   100.00000%           
===============================================
  Files             124          124           
  Lines           18460        18460           
  Branches         1216         1216           
===============================================
  Hits            18460        18460           
Files with missing lines Coverage Δ
src/trio/_highlevel_ssl_helpers.py 100.00000% <ø> (ø)

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