8 ms·
Show HN: Expose local server. Support both TCP/UDP, of course support HTTP
- metalliqaz 7y agoI find that documentation very difficult to understand.
- teddyh 7y agoWhy not start a Tor Onion service instead? I believe there are similar turn-key solutions for that as well.
- linuxdude314 7y agoThat’s not remotely the same use case, nor is Tor something most want to use in their networks unless it is absolutely needed.
- madars 7y agoThat's an underrated suggestion! However, even if configured as a single-hop service Tor would add substantial latency and bandwidth restrictions, and would not support UDP. But Tor would not require the user to self-host external infrastructure so could be used in a pinch where this (or more canonical ssh -R) couldn't.
- c0nsumer 7y agoCould you explain the goal of this, and how it actually attains this? It just doesn't seem clear what the client and server are here, nor what the "local server" is behind that needs piercing. Is this to, say, expose a server sitting behind a NAT to the rest of the world, or...?
- isp 7y agoI'm not the author, but I _think_ this is similar to what you can do via "ssh -R" (SSH remote port forwarding) - but generalised to UDP too. Scenario: - You have a Linode VM running, accessible to everyone on the Internet - You run Mr.2 server on this Linode VM - On your home laptop (behind NAT), you run Mr.2 client, pointing it at your Mr.2 server on the Linode VM - Now, from anywhere in the world, you can connect to your home laptop via the Linode server ... I think.
- ericmuyser 7y agoWorst Show HN ever?
- nantes 7y agoNo. Someone took the time to build something that solved a need and then shared it, thinking it might help other people. There's nothing bad about this whatsoever.
- deleted 7y ago[deleted]
- pcr910303 7y agoOk, I'm not sure about this, but looking at the explanation it looks like something like ngrok[0], serveo[1] or Argo Tunnel[2]. So basically it's a program for server & client that allows exposing a local server to the net (usually) for development purposes. Install mr2 on the server & client, you can use the mr2 program in the client to expose the web server running in the client through the server (with mr2 installed). [0] https://ngrok.com https://ngrok.com [1] http://serveo.net http://serveo.net [2] https://developers.cloudflare.com/argo-tunnel/quickstart/ https://developers.cloudflare.com/argo-tunnel/quickstart/
- ziftface 7y agoJust to add to your list, I've been using frp[0] for the same purpose. [0] https://github.com/fatedier/frp https://github.com/fatedier/frp
- deleted 7y ago[deleted]
- chrisweekly 7y agoUDP support implies QUIC, right? Would that be a differentiator vs eg ngrok?
- chrisweekly 7y agoI don't care about my karma level, and don't like commenting about downvotes per sensible guidelines... but I genuinely don't understand this. I asked an honest simple real relevant question (still wd love an answer), but most ppl can't see my question bc it's at 0. /complaint
- gwbas1c 7y agoCan this be a library instead of a standalone executable? I can imagine a lot of end-user P2P applications where this, as a library, would be a great help.
- zackmorris 7y agoI need it in library form as well. It can get tricky sometimes learning the ins and outs of sockets on various platforms, so it would be great to have C bindings to open the port in a standard cross-platform way. Currently it supports: https://github.com/txthinking/mr2#download https://github.com/txthinking/mr2#download Download OS Arch mr2 Linux amd64 mr2_darwin_amd64 MacOS amd64 mr2_windows_amd64.exe https://github.com/txthinking/mr2/releases https://github.com/txthinking/mr2/releases mr2, mr2_darwin_amd64, mr2_freebsd_386, mr2_freebsd_amd64, mr2_linux_386, mr2_linux_arm5, mr2_linux_arm6, mr2_linux_arm64, mr2_linux_arm7, mr2_linux_mips, mr2_linux_mips64, mr2_linux_mips64le, mr2_linux_mipsle, mr2_linux_mipsle_sf, mr2_linux_mips_sf, mr2_linux_ppc64, mr2_linux_ppc64le, mr2_windows_386.exe, mr2_windows_amd64.exe Also random question, but, does anyone know of a lightweight cross-platform tool to wrap any console executable within a library? Like a mini container or Docker except it would inherit the parent OS so there would be no base platform. The parent application would just see C bindings to the STDIN/STDOUT/STDERR streams and possibly an array of shared directories/permissions, and/or anything else that a console app typically communicates through. Sorry if this is a dumb question (I've only used Docker and Vagrant for specific use cases and am not an expert on the theory behind containers).
- protomikron 7y agoHow does that differ from $ ssh -R2345:localhost:80 user@example.com And then going to example.com:2345 (if you want to e.g. forward HTTP)? I mean you need a remote node anyway for that to work?
- labawi 7y agoI'd guess UDP support and form.
- dautusohoa 7y agoG
- sneak 7y agohttps://github.com/txthinking/x/blob/master/cryptkv.go https://github.com/txthinking/x/blob/master/cryptkv.go This is in the library it pulls in. https://github.com/txthinking/mr2/blob/master/client.go#L47 https://github.com/txthinking/mr2/blob/master/client.go#L47 Homebrew cryptosystem. On a quick glance, it appears to be using a string password from the command line directly as an AES key, in CFB mode, with no authentication. tl;dr: this is the cryptographic equivalent of that bridge in Florida.
- alexellisuk 7y agoLooks like this is using GPL - if companies want something they can use for commercial purposes, checkout https://inlets.dev https://inlets.dev which is on the CNFC Landscape and also has a deep Kubernetes integration through its operator. https://github.com/inlets/inlets-operator https://github.com/inlets/inlets-operator
- wbkang 7y agoThis is an application, companies can use it commercially the same way you can use bash.
- cmcd 7y agoThis is using GNU General Public License v3.0 which means commercial purposes are allowed, no?
- trulyrandom 7y agoEvery version of the GPL allows commercial use.
- wizzwizz4 7y agoEven AGPL allows commercial use, but you'd have to release the source code to modifications used to serve network resources. The bog-standard GPL doesn't even require that for this usecase.
- fulafel 7y agoI think the description would be clearer if it talked about port forwarding from a remote server to your local machine. After all "expose local server" is normally just about binding to 0.0.0.0 instead of loopback.