Giter Site home page Giter Site logo

Comments (5)

255kb avatar 255kb commented on May 7, 2024

I need to investigation how and if this can be fixed. Mockoon being an Electron app I can run Nodejs elevated sub processes but I am not sure how I can do that with npm libs (I use ExpressJS to create the server)

from mockoon.

255kb avatar 255kb commented on May 7, 2024

If impossible to solve I could add an option to set a port forwarding using ncat https://apple.stackexchange.com/questions/37418/how-can-i-open-port-80-so-a-non-root-process-can-bind-to-it

from mockoon.

naegelin avatar naegelin commented on May 7, 2024

Netcat I do not believe is native to OSX but you can use the built in 'pf' to redirect ports as follows:
From 443 to 4443

echo "
rdr pass inet proto tcp from any to any port 4443 -> 127.0.0.1 port 443
" | sudo pfctl -ef -

from mockoon.

255kb avatar 255kb commented on May 7, 2024

@naegelin thank you. I think this would be a good compromise. Apparently running a Node sub process elevated is not a big deal, but not sure how I would do this with an npm package while maintaining the connection with the Electron app... (to update the UI).
So it could be one option per environment saying something like "Forward from " with an input to specify the port, then the command would be run elevated so the OS would prompt you.
What do you think ?

from mockoon.

255kb avatar 255kb commented on May 7, 2024

This won't be implemented for now. While it would be an interesting addition it didn't gather enough attention. Also, I don't want to mess up with users system files or configs.
If this gather more attention in the future (through votes) I will reconsider.

from mockoon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.