-4

Ive been looking around and i cant find an answer for creating a Pure JavaScript Proxy server without node.js. If anyone has an answer please comment. I’m wondering if its possible because i want to set up my own proxy server without node.js so its fully web based.

EDIT 2 So now that i know that i cant directly create a proxy server on the web, is there a way to do it in Java? (Or a similar language)

  • Why do you want to use JavaScript to accomplish this? – Jonathan Rys Oct 04 '18 at 13:58
  • 2
    A proxy server requires a server by definition. What exactly do you mean by "fully web based" (and why is node.js bad for your use-case)? – UnholySheep Oct 04 '18 at 13:59
  • What do you mean by fully web based? Do you want it to run in the browser? – Mark Oct 04 '18 at 13:59
  • Yes i want it to run on the browser, and i want it to be in JavaScript because i have some experience with the language. By fully web-based i mean that i want it to run in a browser. Also if there is a different way to do it in the web then i guess i could use that. – Lightning417 Oct 04 '18 at 14:00
  • @Lightning417 — What would be the point of a proxy server running in a browser? The proxy server would allow the request to be made from the browser instead of … the browser. – Quentin Oct 04 '18 at 14:38
  • And.... nodeJS is pretty much javascript anyways. Take a look at the express library & http-proxy-middleware – Joelgullander Oct 04 '18 at 14:48
  • Next time, please also take some time to explain what you are trying to accomplish and we could assist you better. – Joelgullander Oct 04 '18 at 14:49
  • The reason i want it on the web is so i could edit it everywhere, i guess the initial question should’ve been: “is there a way that i could Crete a server that when it receives a request, it sends an answer back.” Like an echo server and a proxy server. I’m trying to create a virtual assistant that can be accessed from the web, mobile, and desktop. – Lightning417 Oct 04 '18 at 15:41

1 Answers1

0

You cannot accomplish having a proxy server (or any type of server) in the browser. Reason is that proxy servers require a static host that would map data to and from the server.

You will at least need to have a client/server type architecture to accomplish what you're trying to do.

Take a read at: https://en.wikipedia.org/wiki/Proxy_server

Magnum
  • 2,299
  • 4
  • 17
  • 23