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

支持TCP类型检测吗? #207

Closed
ahhfzwl opened this issue Apr 21, 2023 · 17 comments
Closed

支持TCP类型检测吗? #207

ahhfzwl opened this issue Apr 21, 2023 · 17 comments
Labels
Enhancement New feature or request

Comments

@ahhfzwl
Copy link

ahhfzwl commented Apr 21, 2023

No description provided.

@HMBSbige
Copy link
Owner

不支持,因为没有必要

@HMBSbige HMBSbige closed this as not planned Won't fix, can't repro, duplicate, stale Apr 21, 2023
@ahhfzwl
Copy link
Author

ahhfzwl commented Apr 21, 2023 via email

@HMBSbige
Copy link
Owner

额,难道我还要说完整吗?
NAT 行为对 TCP 服务没有意义

@ahhfzwl
Copy link
Author

ahhfzwl commented Apr 22, 2023 via email

@dsus4wang
Copy link

同求

@HMBSbige
Copy link
Owner

HMBSbige commented Sep 8, 2023

最新 Actions 可以下载支持 TCP 测试的版本

所以我还是没懂,TCP 打洞根本不需要 STUN 吧

@MFWT
Copy link

MFWT commented Sep 16, 2023

所以我还是没懂,TCP 打洞根本不需要 STUN 吧

存在UDP是FullCone但是TCP是Symmetric的情况,我朋友用某地广电卡就是这个情况,俗称假FullCone
这玩意还挺恶心,因为有些打洞软件可能看见FullCone就连接了,结果当然是连不上

@HMBSbige
Copy link
Owner

HMBSbige commented Sep 16, 2023

所以我还是没懂,TCP 打洞根本不需要 STUN 吧

存在UDP是FullCone但是TCP是Symmetric的情况,我朋友用某地广电卡就是这个情况,俗称假FullCone 这玩意还挺恶心,因为有些打洞软件可能看见FullCone就连接了,结果当然是连不上

UDP 和 TCP 行为不一样也很正常吧
你说的假FullCone应该是 RFC3489 测出来的吧。这种测试方法早已过时,不适用于现代的路由设备

所以你的意思是测试出来 TCP EndpointIndependent 的 NAT 就可以 TCP 打洞吗?

@HMBSbige HMBSbige added the Enhancement New feature or request label Sep 16, 2023
@molehzy
Copy link

molehzy commented Sep 19, 2023

所以我还是没懂,TCP 打洞根本不需要 STUN 吧

存在UDP是FullCone但是TCP是Symmetric的情况,我朋友用某地广电卡就是这个情况,俗称假FullCone 这玩意还挺恶心,因为有些打洞软件可能看见FullCone就连接了,结果当然是连不上

UDP 和 TCP 行为不一样也很正常吧 你说的假 FullCone应该是 RFC3489 测出来的吧。这种测试方法早已过时,不适用于现代的路由设备

所以你的意思是测试出来 TCP EndpointIndependent 的 NAT 就可以 TCP 打洞吗?

比如这个项目https://github.com/heiher/natmap

@HMBSbige
Copy link
Owner

HMBSbige commented Sep 20, 2023

所以我还是没懂,TCP 打洞根本不需要 STUN 吧

存在UDP是FullCone但是TCP是Symmetric的情况,我朋友用某地广电卡就是这个情况,俗称假FullCone 这玩意还挺恶心,因为有些打洞软件可能看见FullCone就连接了,结果当然是连不上

UDP 和 TCP 行为不一样也很正常吧 你说的假 FullCone应该是 RFC3489 测出来的吧。这种测试方法早已过时,不适用于现代的路由设备
所以你的意思是测试出来 TCP EndpointIndependent 的 NAT 就可以 TCP 打洞吗?

比如这个项目heiher/natmap

Establish a connection with the STUN server from the same port and obtain the public address.

只是为了获取公网IP
所以还是跟我之前理解的一样?TCP 打洞根本不需要 STUN(因为现在还有很多其他手段可以获取公网IP)

@ahhfzwl
Copy link
Author

ahhfzwl commented Sep 20, 2023 via email

@MFWT
Copy link

MFWT commented Sep 20, 2023

TCP没有NAT1,市面上的测试软件都是假的,我试过各种路由系统,没有可以成功打洞的,最终都需要端口映射或转发,UDP倒是可以打洞成功

我现在就是用natter打洞ssh连回家的,纯纯的TCP连接

@MFWT
Copy link

MFWT commented Sep 20, 2023

我现在就是用natter打洞ssh连回家的,纯纯的TCP连接

反正这个打洞是可以正常使用的,访问端不需要另外再安装客户端,natter显示TCP为Cone NAT

@ahhfzwl
Copy link
Author

ahhfzwl commented Sep 21, 2023

所以我还是没懂,TCP 打洞根本不需要 STUN 吧

存在UDP是FullCone但是TCP是Symmetric的情况,我朋友用某地广电卡就是这个情况,俗称假FullCone 这玩意还挺恶心,因为有些打洞软件可能看见FullCone就连接了,结果当然是连不上

UDP 和 TCP 行为不一样也很正常吧 你说的假 FullCone应该是 RFC3489 测出来的吧。这种测试方法早已过时,不适用于现代的路由设备
所以你的意思是测试出来 TCP EndpointIndependent 的 NAT 就可以 TCP 打洞吗?

比如这个项目heiher/natmap

Establish a connection with the STUN server from the same port and obtain the public address.

只是为了获取公网IP 所以还是跟我之前理解的一样?TCP 打洞根本不需要 STUN(因为现在还有很多其他手段可以获取公网IP)

还有什么手段啊?求教程。

@ahhfzwl
Copy link
Author

ahhfzwl commented Sep 21, 2023

TCP没有NAT1,市面上的测试软件都是假的,我试过各种路由系统,没有可以成功打洞的,最终都需要端口映射或转发,UDP倒是可以打洞成功

我现在就是用natter打洞ssh连回家的,纯纯的TCP连接

你应该是在路由器上安装的吧?那确实可以,因为没有经过路由NAT。我是在电脑上运行测试软件,提示NAT1,但我在电脑上打洞却不行,因为路由器只有UDP支持NAT1,TCP不支持。所以我说测试软件是假的。

@MFWT
Copy link

MFWT commented Sep 21, 2023

你应该是在路由器上安装的吧?那确实可以,因为没有经过路由NAT。我是在电脑上运行测试软件,提示NAT1,但我在电脑上打洞却不行,因为路由器只有UDP支持NAT1,TCP不支持。所以我说测试软件是假的。

路由器和内网设备我都用过,内网设备用要在路由器上设置一下端口转发,比如natter开始时指定的那个端口(bind port),得在路由器上设置下转发

@HMBSbige
Copy link
Owner

上面有几位可能误会了,NatTypeTester 只是利用 STUN 检测 NAT 类型,并不是为了打洞

对于 TCP 来说,理论上 Mapping behavior = EndpointIndependent 就可以打洞

在 TCP 打洞流程中是可以利用 STUN 协议获取公网 IP(当然完全也可以通过其他方法)

具体怎么打洞可以自行搜索研究,或者另开 discussions

Repository owner locked as off-topic and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants