tcp-outlet create


ockam tcp-outlet create [OPTIONS] --to <SOCKET_ADDRESS> [NAME]

Create a TCP Outlet that runs adjacent to a TCP server. The Outlet unwraps Ockam messages and delivers the raw TCP messages to the TCP server.

You must specify the TCP address of the server, that your Outlet should send raw TCP traffic to. You can also name your Outlet by giving it an alias.

When you create a TCP Outlet, on an Ockam node, running on your local machine, it makes the TCP server available from a worker address, to the corresponding TCP Inlet (see ockam tcp-inlet).

Arguments

  • [NAME] (optional)
    Address of your TCP Outlet, which is part of a route used in other commands. This unique address identifies the TCP Outlet worker on the Node on your local machine. Examples are /service/my-outlet or my-outlet. If not provided, outlet will be used, or a random address will be generated if outlet is taken. You will need this address when creating a TCP Inlet using ockam tcp-inlet create

Options

  • --to <SOCKET_ADDRESS>
    TCP address where your TCP server is running: domain:port. Your Outlet will send raw TCP traffic to it

  • --tls (optional)
    If set, the outlet will establish a TLS connection over TCP

  • --from [OUTLET_ADDRESS] (optional)
    Alternative to the positional argument. Address of your TCP Outlet, which is part of a route used in other commands

  • --at [NODE_NAME] (optional)
    Your TCP Outlet will be created on this node. If you don't provide it, the default node will be used

  • --allow [POLICY_EXPRESSION] (optional)
    Policy expression that will be used for access control to the TCP Outlet. If you don't provide it, the policy set for the "tcp-outlet" resource type will be used.

You can check the fallback policy with ockam policy show --resource-type tcp-outlet

  • --privileged (optional)
    Use eBPF and RawSocket to access TCP packets instead of TCP data stream. If OCKAM_PRIVILEGED env variable is set to 1, this argument will be true

Examples

# To create a new TCP Outlet to the TCP server, using the default node
$ ockam tcp-outlet create --to 127.0.0.1:5000

# To create a new TCP Outlet at the given address, to the TCP server
$ ockam tcp-outlet create --to 127.0.0.1:5000 --from payroll-db-outlet

# To create a new TCP Outlet to the TCP server, using a specific node
$ ockam tcp-outlet create --at n1 --to 127.0.0.1:5000