hare1039 / reverse-tunnel-cpp

A Small program punch through NAT firewalls
11 stars 6 forks source link

reverse proxy start only as listener #1

Open ghost opened 4 years ago

ghost commented 4 years ago

hi, i downloaded from release page, reverse-tunnel-w64.exe, when i starting, he started as listener OZRBO5bwj0 how to start another copy to connect on listener?, i need to put some keys? best regards.

hare1039 commented 4 years ago

Hi, First, thank you for using this project! Sorry that I didn't write a README of how to use it.

First, you start your service that you want to export. For example, I have a HTTP service on port :8080 Screen Shot 2019-10-18 at 12 25 20 AM

Next, I start reverse-tunnel on another machine(I run it on localhost just for demonstration). Like: Screen Shot 2019-10-18 at 12 25 34 AM which should start in listening mode. Keep it running in the background.

Next, starting another reverse-tunnel to connect to the remote server. Like Screen Shot 2019-10-18 at 12 37 26 AM The command

./reverse-tunnel-macos --connect 127.0.0.1:7000 --bind :8000 --export localhost:8080

means: connect to remote server 127.0.0.1:7000, request to bind on :8000 on the remote server, and export my localhost:8080 service.

Finally, you can see on port :8000 also shows my HTTP webpage Screen Shot 2019-10-18 at 12 27 03 AM

This project is only a proof of concept, which is not suitable for running for a long period. You can use frp. It is better documented, and the features are much more richer than this project. But anyway, thank for trying it out!