What is the port number of the zrok share proxy?

I have a python script for listening to the incoming http requests from internet and it is running in localhost:8080 so, when I create a public share from my environment (PC), zrok gives a proxy https address to share to my clients. This url is working fine with browsers compatible devices like mobile phone, pc, raspberry pi, but when I try to send a data from my ESP8266/ESP32 microcontroller module programmed with sending data to the url that zrok gave, it cannot access. the client always receives 400 bad request error.

I tried similar with ngrok, there ngrok gives a proxy url as well as a proxy port number, so after the url, when I put the proxy number, my http requests from microcontrollers are reaching the agent.

How do I do this with zrok??

Hi @Harish, welcome to the community and to zrok (and OpenZiti/BrowZer)!

When you share with zrok, I assume you're sharing publicly? zrok share public? If that's the case, zrok will always use port :443.

A 400 usually indicates "you did something wrong" though and I don't think that zrok would be delivering that 400. Often, this can be things like, you didn't specify the proper Content-Type or you didn't supply a Host header. Browsers will do these things on your behalf.

Are you sure your traffic is not actually making it to your service correctly? I think it might be?

Thanks for your response @TheLumberjack , yes, I am sharing publicly using zrok share public . I tried sending data with the port number 443 as: https://example.share.zrok.io:443/. As my microcontroller is a non interactive device, I also added skip_zrok_interstitial header to my post from microcontroller.

As you said, I'll go through my server code and the microcontroller code once again, but what else am I missing?

Thanks

I don't know what you might be missing unfortunately. My guess is that your traffic made it through zrok to your python script and the python script threw the 400. I don't have visibility into the zrok environment to know if zrok returned to you the 400 but since you say things works when using a browser, my guess is that it's something like the User Agent, the Accept header, Content-Type, etc... You'll have to figure that out though, I won't be able to help there.

Thanks @TheLumberjack