Hi,
This is my weekend attempt to understand how ziti-tunnel-sdk-c can be used to terminate the tcp session locally by using lwip and pass the intercepted TCP payload to some server (using some transport, it could be very well another TCP session, for example).
This is what I want to achieve:
Browser(TCP App) ----->tun interface(created by ziti)---->ziti lwip (extract TCP payload)---->my-code-prints-the-packet[it doesn’t exist yet]
Here’s what I think I need to do:
1. run ziti-edge-tunnel on ubuntu [cmd: ziti-edge-tunnel run]
[I am assuming that this will create a tun interface which will start intercepting all the TCP, for example, packets].
2. Modify some ziti sdk file which is extracting the payload to print the packet.
Question is, how do I achieve above?
Here’s what I have done so far:
I have cloned GitHub - openziti/ziti-tunnel-sdk-c
I have compiled the code
mkdir ziti-tunnel-sdk-c/build
cd ziti-tunnel-sdk-c/build
cmake … && make
When I run ziti-edge-tunnel, I get following error:
sudo ./ziti-edge-tunnel run
[ 0.000] WARN ziti-edge-tunnel:programs/ziti-edge-tunnel/ziti-edge-tunnel.c:199 run(): No DNS support specified; services won’t be available by DNS names
[ 0.007] INFO ziti-tunnel-sdk-c:lib/ziti_tunnel.c:44 ziti_tunneler_init(): Ziti Tunneler SDK (v0.7.14)
[ 0.008] INFO ziti-sdk:build/_deps/ziti-sdk-c-src/library/ziti.c:194 ziti_init_opts(): Ziti C SDK version 0.17.13-local @b9e3ed2(HEAD) starting at (2020-12-06T14:21:32.996)
[ 0.008] ERROR ziti-sdk:build/_deps/ziti-sdk-c-src/library/ziti.c:200 ziti_init_opts(): config or controller/tls has to be set
[ 0.008] ERROR ziti-edge-tunnel:programs/ziti-edge-tunnel/ziti-edge-tunnel.c:111 run_tunnel(): failed to initialize ziti
I need a quick help from the experts on what’s the next step for me. If there is a documentation available then that will be even great.