Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Able to run on my personal computer but not on VPS #31

Open
Falcn8 opened this issue Apr 11, 2022 · 15 comments
Open

Able to run on my personal computer but not on VPS #31

Falcn8 opened this issue Apr 11, 2022 · 15 comments

Comments

@Falcn8
Copy link

Falcn8 commented Apr 11, 2022

I was running this on my personal computer (MacBook) and it successfully runned and was able to search and visit websites, but when I deployed it on my VPS (Ubuntu 18.04), I couldn't search up things or visit websites using the proxy.

Expected Behavior

Able to search things and visit websites with the proxy.

Current Behavior

Does not redirect me to a proxy search page/website.

Possible Solution

I don't know

Steps to Reproduce

  1. Run UltraViolet on Ubuntu 18.04 with NPM version 8.6.0 and node version 14.17.1
  2. Access the hosted website from a different network
  3. Search something up

Context (Environment)

I'm trying to be able to use the proxy

@jackchristel
Copy link

jackchristel commented Apr 18, 2022

Can you open dev tools(in your browser on the page) and look in the console for any errors when clicking the enter button to go to the specified website you want to proxy.

@Falcn8
Copy link
Author

Falcn8 commented Apr 19, 2022

Can you open dev tools(in your browser on the page) and look in the console for any errors when clicking the enter button to go to the specified website you want to proxy.

This is what I got
image

Failed to load resource: the server responded with a status of 404 (Not Found)
index.js:6 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'register')
    at HTMLFormElement.<anonymous> (index.js:6:36)
new_rightclick.js:87 Uncaught TypeError: event.cancelBubble is not a function
    at HTMLDocument.bringBackDefault (new_rightclick.js:87:31)

@jackchristel
Copy link

Service workers can only be registered when using https or on localhost for some reason not really sure how they work, but they do need https. So what you can do is if you don't have a domain I'd use freenom as they are a free domaon provider to an extent, and then point the nameservers to cloudflare, make an A record with the @ name and in the content field put the IP of your vps, and make sure the little cloudflare proxy icon is enabled, that should fix it.

@Falcn8
Copy link
Author

Falcn8 commented Apr 19, 2022

How would I set a specific port (8080) to the website name with Node.js though?

@jackchristel
Copy link

You can use nginx which is a webserver.

@jackchristel
Copy link

You pass the proxy to nginx, which then listens on port 80 and when visited sends requests to nodejs

@Falcn8
Copy link
Author

Falcn8 commented Apr 19, 2022

How would I set up Ultraviolet/Node.js with Nginx though?

@Falcn8
Copy link
Author

Falcn8 commented Apr 19, 2022

I've tried that before, but it only proxies the main / page not the /service/... page

@jackchristel
Copy link

Are you familiar with nginx?

@Falcn8
Copy link
Author

Falcn8 commented Apr 19, 2022

No, I only know a little.

@jackchristel
Copy link

So in the config, the location would be / and then you'd put a proxy_pass in there

@jackchristel
Copy link

I can assist you tomorrow some more. Sorry.

@Falcn8
Copy link
Author

Falcn8 commented Apr 19, 2022

Ok, thanks

@draccurate
Copy link

I have the same problem, I can run it on localhost, 127..0.01 but not my local ip 192.168.1.103, I tried to tweak index.mjs to use https but didn't work.
can you give me a link to documentation for using nginx?

@Falcn8
Copy link
Author

Falcn8 commented Jun 16, 2022

The link to the documentation for proxy_pass is https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants