tcp-outlet create
ockam tcp-outlet create [OPTIONS] --to <HOSTNAME_PORT>
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
).
Options
-
--to <HOSTNAME_PORT>
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)
Address of your TCP Outlet, which is part of a route that is used in other commands. This address must be unique. This address identifies the TCP Outlet worker, on the node, on your local machine. Examples are/service/my-outlet
ormy-outlet
. If you don't provide it,/service/outlet
will be used. You will need this address when you create a TCP Inlet (usingockam tcp-inlet create --to <OUTLET_ADDRESS>
) -
--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 -
--privileged
(optional)
Use eBPF and RawSocket to access TCP packets instead of TCP data stream. IfOCKAM_PRIVILEGED
env variable is set to 1, this argument will betrue
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