Features | Pricing | Documentation | Contact | Blog

Input and Output Formats

When packets are delivered to your resources they will arrive in one of three formats: JSON, NDJSON or plain text. The table below summarized the formats used for each service:

Resource Type Format(s)
Lambda and StepFunctions Input is a JSON object where the Messages property is an array of RequestPacket. Output from Lambda and EXPRESS state machines is a JSON object where the Replies properties is an array of ResponsePacket.
SNS and SQS One JSON encoded RequestPacket per message.
Firehose and S3 NDJSON, one JSON encoded RequestPacket per line.
CloudWatch Logs Packet Data as UTF-8 string, one log message per RequestPacket.
DynamoDB One record per RequestPacket with the primary key being the src/dst touple and the sort key being the arrival timestamp. Properties are mapped to attributes on the stored record.

RequestPacket Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://proxylity.com/request-packet.schema.json",
  "title": "RequestPacket",
  "description": "Representation of a packet arriving at a UDP listener, as forwarded to AWS resources.",
  "type": "object",
  "properties": {
    "Tag": {
      "description": "A unique identifier for the packet among the batch. Responses (if any) to the message must include this tag.",
      "type": "string"
    },
    "Remote": {
      "description": "The remote endpoint (sender IP and port) of the packet.",
      "type": "object",
      "properties": {
        "IpAddress": {
          "description": "The IP address of the sender.",
          "type": "string"
        },
        "Port": {
          "description": "The port of the sender.",
          "type": "integer"
        }
      },
      "required": [
        "IpAddress",
        "Port"
      ]
    },
    "Local": {
      "description": "The local endpoint (IP and port) of the listener that received the packet.",
      "type": "object",
      "properties": {
        "IpAddress": {
          "description": "The IP address of the listener that received the packet.",
          "type": "string"
        },
        "Port": {
          "description": "The port of the listener that received the packet.",
          "type": "integer"
        }
      },
      "required": [
        "IpAddress",
        "Port"
      ]
    },
    "ReceivedAt": {
      "description": "The time at which the packet was received, in ISO 8601 format.",
      "type": "string",
      "format": "date-time"
    },
    "Data": {
      "description": "The packet payload, in base64 encoding.",
      "type": "string",
      "format": "byte"
    }
  },
  "required": [
    "Tag",
    "Remote",
    "Local",
    "Data"
  ]
}

ResponsePacket Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://proxylity.com/response-packet.schema.json",
  "title": "ResponsePacket",
  "description": "Representation of a packet to be sent back to the remote client, as provided in the response from an AWS resource.",
  "type": "object",
  "properties": {
    "Tag": {
      "description": "A `Tag` value matching an input message. The content of the `Data` property will form the response directed to the source address and port of the input message.",
      "type": "string"
    },
    "Data": {
      "description": "The response packet payload, in base64 encoding.",
      "type": "string"
    }
  },
  "required": [
    "Tag",
    "Data"
  ]
}