4,911
stars
273
forks
28
watchers
248
prs
69
issues
35
releases
17
discussions
README
NatTypeTester
Package | NuGet
-|-
Stun.Net |
Architecture
mermaid
flowchart TD
Console["Console"] -- Application["Application"]
Desktop["Desktop"] -- Views["Views"]
Android["Android"] -- Views
Views -- Application
Views -- Configuration["Configuration"]
Views -- ViewModels["ViewModels"]
Application -- ApplicationContracts["Application.Contracts"]
Application -- Domain["Domain"]
Configuration -- Domain
ViewModels -- ApplicationContracts
ViewModels -- Domain
ApplicationContracts -- DomainShared["Domain.Shared"]
Domain -- DomainShared
RFC
- RFC 3489
- RFC 5780
- RFC 8489
Internet Protocol
- [x] IPv4
- [x] IPv6
Transmission Protocol
- [x] UDP
- [x] TCP
- [x] TLS-over-TCP
- [x] DTLS-over-UDP
RFC3489
The STUN server has two IP addresses (IP1, IP2), each listening on two ports (Port1, Port2).
Send to X, request from Y means the request is sent to endpoint X, asking the server to reply from endpoint Y.
mermaid
flowchart TD
T1["Test 1:Send to IP1:Port1request from IP1:Port1"] -- R1{"Received?"}
R1 --|No| B1["UDP Blocked"]:::bad
R1 --|Yes| R2{"ReceivedMappedEndpoint1 andIP2:Port2?"}
R2 --|No| B2["Unsupported Server"]:::bad
R2 --|Yes| T2["Test 2:Send to IP1:Port1request from IP2:Port2"]
T2 -- D1{"MappedEndpoint1 islink's IP endpoint?"}
D1 --|Yes| R3{"Received?"}
R3 --|No| W1["Symmetric UDP Firewall"]:::warn
R3 --|Yes| R4{"Received fromIP2:Port2?"}
R4 --|No| B3["Unsupported Server"]:::bad
R4 --|Yes| G1["Open Internet"]:::good
D1 --|"No (NAT)"| R5{"Received?"}
R5 --|Yes| R6{"Received fromIP2:Port2?"}
R6 --|No| B3
R6 --|Yes| G2["Full Cone"]:::good
R5 --|No| T12["Test 1(35;2):Send to IP2:Port2request from IP2:Port2"]
T12 -- R7{"ReceivedMappedEndpoint1.2?"}
R7 --|No| B4["Unknown"]:::bad
R7 --|Yes| D2{"MappedEndpoint1.2is MappedEndpoint1?"}
D2 --|No| W2["Symmetric"]:::warn
D2 --|Yes| T3["Test 3:Send to IP1:Port1request from IP1:Port2"]
T3 -- R8{"ReceivedMappedEndpoint3from IP1:Port2?"}
R8 --|No| M1["Port Restricted Cone"]:::mild
R8 --|Yes| M2["Restricted Cone"]:::mild
classDef bad fill:f4756b,stroke:c0392b,color:000
classDef warn fill:ffe6cc,stroke:d79b00,color:000
classDef good fill:7fe57f,stroke:38761d,color:000
classDef mild fill:d9ead3,stroke:93c47d,color:000
RFC5389
The STUN server has two IP addresses (IP1, IP2), each listening on two ports (Port1, Port2).
Send to X, request from Y means the request is sent to endpoint X, asking the server to reply from endpoint Y.
Binding Test
Checking for UDP Connectivity with the STUN Server
mermaid
flowchart TD
T1["Send to IP1:Port1request from IP1:Port1"] -- R1{"Received?"}
R1 --|No| B1["Fail"]:::bad
R1 --|Yes| R2{"ReceivedMappedEndpoint?"}
R2 --|No| B2["Unsupported Server"]:::bad
R2 --|Yes| G1["Success"]:::good
classDef bad fill:f4756b,stroke:c0392b,color:000
classDef good fill:7fe57f,sTop issues
Discussions
#266为啥一个简单的STUN客户端需要做这么大?2 comments · 2025-07-01#257Confusion: why no Filtering behavior type for TCP connection?2 comments · 2025-01-08#254连续测RFC3489结果会从nat3变nat11 comments · 2024-12-18#245打包发布到微软商店?1 comments · 2024-08-28#244基于Stun.Net我做了各个平台的发布1 comments · 2024-08-23#240请问怎么修改为中文语言1 comments · 2024-06-01#237在其上下文中,该请求的地址无效1 comments · 2024-05-12#233[Suggestion] 在文档中添加指示,以终结有关 Linux 和其他平台支持的询问1 comments · 2024-05-01
Latest release
10.0.10 10.0.10 2026-10-08🐛 修复 - 修复 Linux 在中文、日文等语言环境下可能选用错误默认字体,导致小写字母显示为小型大写等文字显示异常的问题(332) 完整变更:10.0.9 → 10.0.10