Traffic Server
  1. Traffic Server
  2. TS-692

Allow for setting the source address for the connection to the origin server

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.7
    • Component/s: TS API
    • Labels:
      None

      Description

      It would be nice to have the ability to set the source address of the socket which will connect to the origin server. Useful when fetching pages using geo-targetting and when many different IPs are at one's disposal.

      Any way would be a good way to do this, but it seems that per http://trafficserver.apache.org/docs/v2/sdk/HTTPTransactionFunctions.html,
      something like HttpTxnSourceIPSet(txn,ip) should do, but really anything should be sufficient.

      { /*Just to be clear: under the hood, something like this should happen:*/ int sock = socket(...); /*I need control for this line:*/ bind(sock,...); /*Connect to the origin server*/ connect(sock,...); }
      1. ts692.diff
        7 kB
        Leif Hedstrom

        Activity

        Hide
        Leif Hedstrom added a comment -

        This is a prototype / idea for what we could do. I'm still contemplating if we should just bite the bullet and change the internal representation to a sockaddr as well (instead of an int).

        As been pointed out, we only (currently at least) use the IP addr of the sockaddr.

        Show
        Leif Hedstrom added a comment - This is a prototype / idea for what we could do. I'm still contemplating if we should just bite the bullet and change the internal representation to a sockaddr as well (instead of an int). As been pointed out, we only (currently at least) use the IP addr of the sockaddr.

          People

          • Assignee:
            Leif Hedstrom
            Reporter:
            M. Nunberg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development