I'm getting this issue when I run two zroks at once.
I have one forwarding my port 6777 to http://somecrazyname82jhf23f.share.zrok.io
and I'm trying to send this port 6888 to http://somecrazynameaksfjkl2.share.zrok.io
but I get that error above, should it be working? or am I doing something wrong?
I reserved the name, then ran each one in separate VS Code Terminals, but only one works
this one gives me just a blank page with no data
That EOF
error would indicate that your local service is returning no data.
If it's a local development server, it might be unhappy about being proxied. I know for some of the node development I do on the zrok console, I have to add a Host
header to make it behave how I want.
You might take a look at the caddy
backend, and the header_up
directive if this is the case:
But there's certainly no issue with running as many local zrok instances as you want to serve multiple services.
yes both my servers I'm trying to zrok are very simple C# ASP.Net servers, just run using the dotnet run
commands, then serving them with zrok in second VS Code terminals.
like I said, the first one is working, but this one is giving these errors. It doesn't seem to affect it if my other zrok is on or off though, so must just be something wrong with this first server.
how would I use a Host
header? like this?
zrok share reserved myrandomcrayname214server1 public https://localhost:6777 Host
also I'm literally just running zrok.exe from inside my C# server project folder, so I don't know how everyone else is "installing" zrok and able to access config files & stuff. This isn't a node.js server where you can npm i zrok
I think you're running into the fact that zrok won't proxy https with an invalid cert without using the --insecure flag.
I just fired up a new react asp.net web app in visual studio, it throws me over to https://localhost:5173/ but it's https... and you can see I chose to NOT trust the 'asp.net core cert'... so my browser thinks the site is invalid...
When I share this: zrok.exe share public https://localhost:5173/
, you'll see i get 'no data' and zrok's log shows an error:
BUT -- if i use --insecure: zrok.exe share public https://localhost:5173/ --insecure
-- now it'll work!
With a Reserved Share:
zrok.exe reserve public https://localhost:5173/
zrok share reserved p4nkdy0po2t1 --insecure
really appreciate the help, you guys are an awesome community, but still having some issues:
I ran my commands again:
.\zrok.exe reserve public 6888 --unique-name myrandomcrayname2z8234server1
and
.\zrok.exe share reserved myrandomcrayname2z8234server1 public Host https://localhost:6888 --insecure
and still got this:
[15.919] ERROR zrok/endpoints/proxy.newReverseProxy.func2: error proxying: EOF
is that more or less what you meant, for me to try?
also, your error seems a bit different from mine
1 Like
I'd realized you were reserving a share and updated the post at the end there. It comes down to:
Reserving a Share:
zrok reserve public https://localhost:5173 --unique-name thisiscsharpandreact
(also used a 'reserved' name for a bigger example)
Sharing the Reserved Share:
zrok share reserved thisiscsharpandreact --insecure
Hit that 'now' and it'll work https://thisiscsharpandreact.share.zrok.io/
1 Like
I think you just got the commands a little jumbled. if you look at my example and use your port and reserved share you'll be fine...
you might also need to zrok release your reserved share -- don't forget to do that too
EDIT - releasing a share:
zrok.exe release thisiscsharpandreact
[ 0.846] INFO main.(*releaseCommand).run: reserved share 'thisiscsharpandreact' released
1 Like
I think it's working now! Thanks soooo much!
looks like the only thing better than zrok is its community
awesome project thank you @TheLumberjack
Glad you are enjoying zrok ! Don't forget to give the projects a github star and show your support!