Skip to content

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

@jwodder

Description

@jwodder
  • 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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions