hoppscotch / proxyscotch

📡 A simple proxy server created for https://hoppscotch.io
https://hoppscotch.io
MIT License
360 stars 93 forks source link

Running server on Windows #13

Closed phantompepper closed 2 years ago

phantompepper commented 4 years ago

I have a quick question in regards to where it says ./server --host="<hostname>:<port>" --token="<token_or_blank>"

On windows, this doesn't seem to do anything. I just get "./server is a directory" in bash. If I need to just manually add the host and token values before building it, that's fine I was just curious if the command would work or not, as it would be handy.

Also, in regards to hosting: I've so far been able to get this working (with my own copy of Postwoman) locally. I would really like to host the proxy but am a bit confused on what's going to happen. My question is if the server, with an IP of 123.123.123.123 is running the proxy (pointing at localhost:9159 for host) then would I be able to reach the proxy at 123.123.123.123:9159?

Thanks a million for all of the work that has gone into this and Postwoman!

NBTX commented 4 years ago

Hey - thank you and sorry I didn't get back sooner!

I reorganized the directory structure and forgot that I moved the server output to ./out/windows-server/postwoman-proxy-server.exe. If you copy this file to your working directory and rename it to server.exe, then you can run the command as shown (though I'd recommend specifying server.exe.)

I will update the documentation to reflect this - so thanks for bringing it to my attention.

So a full build procedure would be as follows:

$ ./build.sh windows server
$ cp out/windows-server/postwoman-proxy-server.exe ./server.exe

# Then you can run the server
$ ./server.exe --host="<hostname>:<port>" --token="<token_or_blank>"

As for your question about hosting - yes, if you were hosting the proxy on a server at 123.123.123.123, you would enter http://123.123.123.123:9159 as the proxy URL in Postwoman. However you could not bind to localhost:9159 and then access it on that IP, you'd either need to specify --host="123.123.123.123:9159" or `--host="0.0.0.0:9159" to bind to all IP addresses / interfaces)

phantompepper commented 4 years ago

Thanks for the info! Really appreciate it,

Grant

On Sun, Jun 7, 2020 at 10:01 AM John Harker notifications@github.com wrote:

Hey - thank you and sorry I didn't get back sooner!

I reorganized the directory structure and forgot that I moved the server output to ./out/windows-server/postwoman-proxy-server.exe. If you copy this file to your working directory and rename it to server.exe, then you can run the command as shown (though I'd recommend specifying server.exe.)

I will update the documentation to reflect this - so thanks for bringing it to my attention.

So a full build procedure would be as follows:

$ ./build.sh windows server $ cp out/windows-server/postwoman-proxy-server.exe ./server.exe

Then you can run the server

$ ./server.exe --host=":" --token=""

As for your question about hosting - yes, if you were hosting the proxy on a server at 123.123.123.123, you would enter http://123.123.123.123:9159 as the proxy URL in Postwoman. However you could not bind to localhost:9159 and then access it on that IP, you'd either need to specify --host="123.123.123.123:9159" or `--host="0.0.0.0:9159" to bind to all IP addresses / interfaces)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/postwoman-io/postwoman-proxy/issues/13#issuecomment-640240378, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJHBGFHKFIVNXWIIR757WDRVO2UJANCNFSM4LT6GVWQ .