zoraxy icon indicating copy to clipboard operation
zoraxy copied to clipboard

Migrating NPM to Zoraxy

Open lucius100 opened this issue 9 months ago • 7 comments

Okay, I tried a little bit and got lost

in my NPM I just setup sub1.example.com >> portainer:9000

Because I don't expose my port to public I just use the same LAN to make the connection works. in zoraxy I tried the same thing but didn't work Create HTTP Proxy sub1.example.com >> portainer:9000 sub1.example.com >> 127.0.0.1:9000

Both options doesn't work, any idea ? I already put the portainer and zoraxy in same network though. A video that showcase the whole zoraxy feature would be great, since I am a bit lost with all the cool features offered.

lucius100 avatar May 14 '24 21:05 lucius100

Hi @lucius100 What do you mean by doesn't work? Can you describe more in details what you saw? (e.g. page loaded but css went off? connection reset? timeout trying to access sub1?) Any screenshots of your current settings?

I tried to make Zoraxy as straight forward to use as possible and in theory, if you have questions on a particular function, you shd generally be able to find tips / instruction somewhere nearby. If you have any difficulties in finding a particular function, please open an issue and report it as an UX design enhancement / bug

tobychui avatar May 15 '24 02:05 tobychui

Hi @lucius100 What do you mean by doesn't work? Can you describe more in details what you saw? (e.g. page loaded but css went off? connection reset? timeout trying to access sub1?) Any screenshots of your current settings?

I tried to make Zoraxy as straight forward to use as possible and in theory, if you have questions on a particular function, you shd generally be able to find tips / instruction somewhere nearby. If you have any difficulties in finding a particular function, please open an issue and report it as an UX design enhancement / bug

Doesn't work mean the proxy doesn't work, so access the domain obviously got error and not timeout, etc. https://prnt.sc/RqRS-NWenH-j https://prnt.sc/v-zxOFM-vvfh

I also thought zoraxy gonna be straight forward to use as possible and in theory, but in reality doesn't work as I expected, I am not sure if I setup it wrong or not, so I don't dare to say it was a bug,etc since I saw many people get it up and running.

I already point my subdomain to the ip and my domain is using cloudflare NS with orange cloud on / cloudflare proxy. Maybe this will give you understanding of my setup and why it doesn't work in my case, example, zoraxy not working on cloudflare proxy and must point it directly to ip without hiding behind cloudflare, etc.

lucius100 avatar May 15 '24 22:05 lucius100

Did you read the guide in the wiki?

Maybe I should write a full guide with pictures 🤔 On saturday I have spare time for this

127.0.0.1, ::1 and localhost are always inside the same container. In the Zoraxycontainer it will always point to back to Zoraxy, in Portainer it will always point to Portainer.

It is only useful if Zoraxy runs directly on the host maschine and points through a portmapping like 9000:9000, the you can use localhost:9000

Inside the same docker network portainer:9000 should work in Zoraxy if Zoraxy runs inside docker too.

Morethanevil avatar May 15 '24 23:05 Morethanevil

Did you read the guide in the wiki?

Maybe I should write a full guide with pictures 🤔 On saturday I have spare time for this

127.0.0.1, ::1 and localhost are always inside the same container. In the Zoraxycontainer it will always point to back to Zoraxy, in Portainer it will always point to Portainer.

It is only useful if Zoraxy runs directly on the host maschine and points through a portmapping like 9000:9000, the you can use localhost:9000

Inside the same docker network portainer:9000 should work in Zoraxy if Zoraxy runs inside docker too.

Yes, my zoraxy run inside docker, portainer also in docker, it should work, but in reality , it's not.

lucius100 avatar May 16 '24 00:05 lucius100

Use docker inspect portainer to get the IP from the portainer container (usally something like 172.20.0.23) and try it. If this works, your docker DNS is not working properly.

But even then you can use static IPs for your container

Morethanevil avatar May 16 '24 00:05 Morethanevil

@Morethanevil Thanks for the follow up!

@lucius100 Ok, so your issue is that you don't know how to use Zoraxy inside your docker setup right? One thing to keep in mind is that although the docker version of Zoraxy is available, it is generally for users with some degree of networking background. If you are new to networking, picking the non-docker version usually cause less panic and frustration. That is also why the docker version is on the bottom of the list of "Get Zoraxy" in README.

Docker by itself adds a layer of networking between the existing host network and containerized app, it is not quite straight forward (from the containerize app point of view) to automatically check if things working and give you warning about anything doesn't work.

Updates If you think this is an issue related to the docker file, please let me know so I can handover this issue to our docker maintainer.

tobychui avatar May 16 '24 01:05 tobychui

I got time today to write this guide. It should be easy enough and it works, since I tested it today :)

Beginners guide in the wiki

Morethanevil avatar May 16 '24 17:05 Morethanevil

as i know, to reach containers trough hostname, the proxymanager needs to be on the same network as the docker container

like if you add docker network "proxy" and add service123 to this network + the proxymanager like npm or zoraxy? they can communicate trough hostname / docker network

correct me if im wrong, thats how i used NPM -- thinking to switch to zoraxy

but im scared about security bcs npm is well tested etc. and didnt heared anything about zoraxy until today haha

does security headers etc works on zoraxy? on npm strange workarounds are nessesary..

Nazgile94 avatar May 20 '24 23:05 Nazgile94

@Nazgile94 you actually raised a really good question. I should let Zoraxy automatically inject those header so even the backend proxied server don't have these header, Zoraxy will fix it for you.

Feel free to open a feature request for secure headers, I will work on it later :D

tobychui avatar May 21 '24 07:05 tobychui

@Nazgile94 you actually raised a really good question. I should let Zoraxy automatically inject those header so even the backend proxied server don't have these header, Zoraxy will fix it for you.

Feel free to open a feature request for secure headers, I will work on it later :D

Maybe you can implement Checkboxes for Users , so they can choose from different Security Headers , enabled by Default .

Turning on and Off

Or some fields for content Security polices etc etc etc .

Nazgile94 avatar May 21 '24 07:05 Nazgile94

Closing this as there are no more updates from this author. For future visitors, check out the wiki page Move to Zoraxy from Nginx Proxy Manager.

tobychui avatar Jun 10 '24 09:06 tobychui