-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use piping-server to foward TCP port with socat/netcat #689
Comments
Suppose you have two machines named "server host" which serves 22 port and "client host", and you want to use the 22 port in the server host as a new 2222 port in the client host. The following commands forward the 22 port in the server host to the 2222 port in the client host. curl -sSN https://ppng.io/aaa | nc localhost 22 | curl -sSNT - https://ppng.io/bbb curl -sSN https://ppng.io/bbb | nc -lp 2222 | curl -sSNT - https://ppng.io/aaa See Secure TCP tunnel from anywhere with curl and nc for single connection - DEV Community for more details. |
You need go-piping-tunnel https://github.com/nwtgck/go-piping-tunnel |
Thanks @m2acgi
|
yamux having something to improve : |
@bhzhu203 Thanks for the report. I'd like to know details. Could you see "Universal end-to-end encryption over SSH" section in Secure TCP tunnel from anywhere with curl and nc for single connection? It describes another way to multiplex TCP connection over SSH. The way requires SSH server and SSH client. |
The command only can be used one time (can not reconnect), and can not be used next time (the command line can not be reused)
client command line :
server : piping-server-rust 0.12.1 |
Could you tell me what you want to do? |
port forawrd for an UDP VPN (peervpn) UDP port tmp.selleroa.top:9999 |
The command should be like the following. # server host (in VPN)
curl -sSN https://ppng.io/aaa656 | yamux -u tmp.selleroa.top 9999 | curl -sSNT - https://ppng.io/bbb656 # client host (localhost:19999 is forwared VPN endpont)
curl -sSN https://ppng.io/bbb656 | yamux -ul 19999 | curl -sSNT - https://ppng.io/aaa656 You can replace |
There is a problems of "Another sender has been connected" on piping-server-rust
|
@bhzhu203 Could you give the command in the other side? It might have a problem. |
Doesn't need run other side. run this "curl -sSN https://p.seller.top/nick1 | /usr/bin/yamux -u 127.0.0.1 2000 | curl -sSNT - https://p.seller.top/nick123" on one side , then "Ctrl+C" and rerun , will reproduce this The server is piping-server-rust |
@bhzhu203 Thanks. You need to change the both paths |
It is not easy to make the two connections reconnect automatically, while one line disconnected or be reset |
I know that piping-server can for foward VNC stream with special NoVNC. But how to do with common TCP stream ? Thanks
The text was updated successfully, but these errors were encountered: