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 setting client network interface by name #6383

Open
1 task done
SobhanMP opened this issue Dec 6, 2021 · 3 comments
Open
1 task done

support setting client network interface by name #6383

SobhanMP opened this issue Dec 6, 2021 · 3 comments
Labels
enhancement good first issue Hacktoberfest need pull request

Comments

@SobhanMP
Copy link

@SobhanMP SobhanMP commented Dec 6, 2021

Is your feature request related to a problem?

While setting the target interface's ip should work in most cases, it's possible that multiple devices have the same ip.

Also i'm having trouble using a wireguard vpn when i set Table=off. Table=off disables setting up the routes for the vpn and it justs shows up as a regular device. The connection is fine as pycurl can access it when i set the device but aiohttp fails. probably related but not directly.

Describe the solution you'd like

Users should be able to set the inet device directly.

Describe alternatives you've considered

UnixConnector seems like a good starting place.

loop.create_connection with (socket.SOL_SOCKET, socket.SO_BINDTODEVICE, iface) inspired from here also seems like a good idea

Related component

Client

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct
@asvetlov
Copy link
Member

@asvetlov asvetlov commented Dec 6, 2021

Interesting idea, thanks!

@webknjaz
Copy link
Member

@webknjaz webknjaz commented Dec 6, 2021

Related component

Client

What you're describing sounds like a server-side thing, no?

@webknjaz webknjaz added good first issue Hacktoberfest need pull request labels Dec 6, 2021
@SobhanMP
Copy link
Author

@SobhanMP SobhanMP commented Dec 6, 2021

no?

i'm trying to do request with aiohttp.ClientSession. by definition that's a client side thing, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue Hacktoberfest need pull request
Projects
None yet
Development

No branches or pull requests

3 participants