@txthinking/mr2
v20190616.0.0
Published
Mr.2 can help you expose local server to external network. Support both TCP/UDP, of course support HTTP.
Downloads
10
Maintainers
Readme
Mr2.js
Mr2.js is javascript client with built-in free server of mr2 can help you expose local server to external network.
Install
$ npm install -g @txthinking/mr2
Usage
$ mr2 -c 127.0.0.1:1234
Advanced usage
Built-in server
# expose your local server 127.0.0.1:1234
$ mr2 -c 127.0.0.1:1234
# expose your local directory /path/to/www
$ mr2 -d /path/to/www
# Specify a subdomain
$ mr2 -D xxx -c 127.0.0.1:1234
# View built-in server list
$ mr2 -l
# Specify a built-in server
$ mr2 -s us.mr2.dev:2222 -c 127.0.0.1:1234
# Specify a built-in server and subdomain
$ mr2 -s us.mr2.dev:2222 -D xxx -c 127.0.0.1:1234
Customize mr2 server
# Local server is 127.0.0.1:1234, expect to expose: server_address:5678
$ mr2 -s server_address:port -p password -P 5678 -c 127.0.0.1:1234
# Local web root is /path/to/www, expect to expose: server_address:5678
$ mr2 -s server_address:port -p password -P 5678 -d /path/to/www
License
Licensed under The GPLv3 License