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 options for setting the source port and IP address #302

Open
jwodder opened this issue Dec 12, 2023 · 0 comments
Open

Add options for setting the source port and IP address #302

jwodder opened this issue Dec 12, 2023 · 0 comments
Labels
connecting enhancement New feature or request therefor

Comments

@jwodder
Copy link
Owner

jwodder commented Dec 12, 2023

  • Options:

    • -p/--source-port <port> — Set source port
    • -s/--source-ip <ip> — Set source IP address
  • This can be done via tokio::net::TcpSocket::bind().

  • Problem: Setting the source IP requires committing to either IPv4 or IPv6 and making a connection to one IP at a time, which means extra work when a domain name has multiple IPs. (Then again, std::net::TcpStream::connect() handles domains with multiple IPs by just trying them one at at time.)

@jwodder jwodder added connecting enhancement New feature or request therefor labels Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
connecting enhancement New feature or request therefor
Projects
None yet
Development

No branches or pull requests

1 participant