Skip to content

Latest commit

 

History

History

ziti-http-server

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Ziti HTTP Server

This example shows how to listen for HTTP requests on a service

Setup 🔧

Refer to the examples README for details on setting up your network, service, and obtaining an identity file.

Install Python Requirements

If you haven't already installed them, you'll need the dependent libraries used in the examples.

pip install -r ../requirements

Running the Example ▶️

We can test this example with curl however, in order to connect to the service over netcat you'll need an identity and a tunneler for the device running the curl command. An easy way to set this up is to create an identity that has dial access on the intended service. Then run a tunneler on your platform, and enroll the identity.

Example:

curl <name-of-service>
Hello!

Example Output:

Using a service called python.http.ziti on port 80 here is what this would look like.

$ curl http://python.http.ziti:80
{"msg": "Help! I was zitified!"}

And on the ziti-http-server side, we can see the following output showing the identity (desktop.user) and some request metadata.

desktop.user - - [12/Apr/2023 15:03:33] "GET / HTTP/1.1" 200 -