Hacker Newsnew | past | comments | ask | show | jobs | submit | Morhaus's commentslogin

That's a great suggestion! If you'd like to see this implemented, please open an issue. https://github.com/Morhaus/facebook-sixth-sense/issues


Glad you think so. Done!


They will. However, if you take a look at the final code snippet, you'll see we're not relying on any minified name. The public interface of modules remains intact through minification.


Because it's much easier to implement?


To support this JSON patch format, you've got to implement a system which validates that all the array entries are in a valid format, securely interprets the 'path' attribute, and processes the rules according to a specification which may or may not cover every edge case

To support my approach, you need to validate that each line uses a strict subset of JavaScript, then securely evaluate each one according to the well defined rules of JavaScript.

Both have basically the same essential complexity - not sure I see why the JSON format patch is inherently 'easier' to work with.


You can write a simple library to apply a valid JSON patch in any language. Your method basically requires a JavaScript engine.


There is no built-in failover mechanism atm. However I guess you could use another program on top of dispatch to implement such a feature.


Yup.


You should totally add this use case to your README. That's the very first things my fellow student friends ask when I show them this.


I just did, thanks :)


One of the advantages of using a proxy is that you can configure it per app.

For example, let's say I have 3 interfaces.

Interfaces (1) and (2) are low-latency and interface (3) is high latency.

I can start a proxy on localhost:1080 that redirects to interfaces (1), (2) and (3), and configure my download manager to use it.

I can then start another proxy on localhost:1081 that redirects to interfaces (1) and (2), and configure my game client to use it.


Windows, Mac OS X and Linux.

Every platform which runs NodeJS in fact.


Ah, got confused as you said terminal.


Is that in the readme?


Adding it now.


For now, the proxy will still try to dispatch sockets to every network interfaces specified at launch. But such a feature could perfectly be implemented.


At the TCP level.


Dispatch-proxy lets you boot a proxy on your machine that dispatches every incoming connection to a different network interface.

The possibilities are endless:

* download a file through threaded downloading, effectively combining multiple connections' speed in one single file download,

* create two proxies, assign to each its own interface, and run two apps simultaneously that use a different interface,

* create a hotspot proxy at home that connects through Ethernet and your 4G card for all your mobile devices,

* etc.

Here are some instructions to quickly get started with using the proxy:

1) INSTALLATION

* Install Node.JS (http://nodejs.org/).

* Launch a terminal.

* Run the command `npm install -g dispatch-proxy` as a power user and press Enter. It will install the `dispatch` command-line utility.

2) STARTING AN HTTP PROXY

* To quickly start an HTTP proxy, run `dispatch start --http`.

* The program will print the proxy address and port (by default localhost:8080) as well as the list of local addresses the program will be dispatching requests to.

* Configure your system to use the combination address:port as an HTTP proxy.

3) LISTING ALL AVAILABLE NETWORK INTERFACES

* To list all available network interfaces, run `dispatch list`

* Each available network interface will be printed with a list of addresses.

* Right now, the dispatch utility only supports IPv4 addresses.

* If an address is marked to be "internal", then you won't be able to use it to connect to the internet.

I encourage you to read the docs https://github.com/Morhaus/dispatch-proxy.


You should really consider to put those use-cases in your readme too! :)


Just did, thanks for the input!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: