Skip to content
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

[bug] TCP tunnel breaks after every request #5032

Open
diyism opened this issue May 23, 2018 · 1 comment
Open

[bug] TCP tunnel breaks after every request #5032

diyism opened this issue May 23, 2018 · 1 comment

Comments

@diyism
Copy link

diyism commented May 23, 2018

==============Server side, firewall only open TCP 4001=========
$ ipfs version
ipfs version 0.4.15

$ ipfs id
"ID": [my vps ipfs id]
$ ipfs p2p listener open p2p-test /ip4/127.0.0.1/tcp/8081
{"Address":"/ip4/127.0.0.1/tcp/8081","Protocol":"/p2p/p2p-test"}

$ curl --socks5 127.0.0.1:8081 http://myip.ipip.net
IP:[my vps wan ip] amazon.com

==================Client side, symmetric NAT===========
$ ipfs version
ipfs version 0.4.15

$ ipfs p2p stream dial [my vps ipfs id] p2p-test /ip4/127.0.0.1/tcp/10102
{"Address":"/ip4/127.0.0.1/tcp/10102","Protocol":"/p2p/p2p-test"}

$ ipfs p2p stream dial [my vps ipfs id] p2p-test /ip4/127.0.0.1/tcp/10102
Error: listen tcp4 127.0.0.1:10102: bind: address already in use

$ curl --socks5 127.0.0.1:10102 http://myip.ipip.net
IP:[my vps wan ip] amazon.com

$ curl --socks5 127.0.0.1:10102 http://myip.ipip.net
curl: (7) Failed to connect to 127.0.0.1 port 10102: Connection refused

$ ipfs p2p stream dial [my vps ipfs id] p2p-test /ip4/127.0.0.1/tcp/10102
{"Address":"/ip4/127.0.0.1/tcp/10102","Protocol":"/p2p/p2p-test"}

$ curl --socks5 127.0.0.1:10102 http://myip.ipip.net
IP:[my vps wan ip] amazon.com

$ curl --socks5 127.0.0.1:10102 http://myip.ipip.net
curl: (7) Failed to connect to 127.0.0.1 port 10102: Connection refused

$ ipfs p2p stream dial [my vps ipfs id] p2p-test /ip4/127.0.0.1/tcp/10102
{"Address":"/ip4/127.0.0.1/tcp/10102","Protocol":"/p2p/p2p-test"}

$ curl --socks5 127.0.0.1:10102 http://myip.ipip.net
IP:[my vps wan ip] amazon.com

$ curl --socks5 127.0.0.1:10102 http://myip.ipip.net
curl: (7) Failed to connect to 127.0.0.1 port 10102: Connection refused

....

What a pity, TCP tunnel breaks after every request.

#3397 (comment)

@magik6k
Copy link
Member

magik6k commented May 23, 2018

This is/was by design, but is being changed as a part of #4929 / #4895 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants