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

add simple configuration for bind address of outgoing sockets #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mzhou
Copy link

@mzhou mzhou commented Jan 5, 2022

when specified like --outgoing-addr=1.2.3.4:0, outbound sockets will be bound to 1.2.3.4 before connecting. there are cases where a specific port may be desired instead of 0 for auto-select, but most uses cases call for 0, so i can add a fallback to parse the argument as an IpAddr (and constructing a SocketAddr with port 0) if parsing as SocketAddr fails. just wanted to see what you think of the general concept first though

@dizda
Copy link
Owner

dizda commented Jan 10, 2022

Hey there,

I'm not sure to understand the purpose of this, could you elaborate or give me an example?

Much appreciated.
Thank you.

@mzhou mzhou force-pushed the outgoing_addr_config branch from b8444c4 to 819d6ed Compare January 15, 2022 06:37
@Shados
Copy link

Shados commented Apr 13, 2022

@dizda I'm not the PR author, but at a guess the intent is to let you select which IP is used as the source IP, when run on a machine with multiple IP addresses.

@dizda
Copy link
Owner

dizda commented Aug 25, 2022

Sorry about the delay.
This is a legitimate feature, thanks for adding this.
There's some conflicts to fix before I can merge this, could you have a look at it please @mzhou ?

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