测试当前网络的 NAT 类型(STUN)

renovate[bot] a47abce0f1 dep: Update ReactiveUI to v18.4.25 2 years ago
.github c616979555 dep: Update actions/setup-dotnet action to v3 (#194) 3 years ago
Build 111e4f4adc housekeeping: Update build scripts 3 years ago
NatTypeTester a47abce0f1 dep: Update ReactiveUI to v18.4.25 2 years ago
NatTypeTester.Models a47abce0f1 dep: Update ReactiveUI to v18.4.25 2 years ago
NatTypeTester.ViewModels a47abce0f1 dep: Update ReactiveUI to v18.4.25 2 years ago
STUN 254c7e9e71 dep: Update dependency Microsoft.VisualStudio.Validation to v17.0.71 2 years ago
UnitTest db70b7e2ed dep: Update dependency Microsoft.NET.Test.Sdk to v17.5.0 2 years ago
pic 8425c658f5 housekeeping: Update RFC5780_4.5.png 3 years ago
.editorconfig 0b857a128c housekeeping: Update .editorconfig 3 years ago
.gitattributes 93159da643 housekeeping: Update framework to .net5.0 4 years ago
.gitignore 22a115f142 style: Update code style 3 years ago
LICENSE 3fe3bbf5c4 Initial commit 7 years ago
NatTypeTester.sln e1ad9c5627 refactor: drop console 3 years ago
NuGet.Config 75422b3531 housekeeping: Update to .net6.0 4 years ago
README.md 52fc5d1ff6 housekeeping: Update README.md 3 years ago
build.ps1 6a7d4ff4a2 housekeeping: remove win-arm 3 years ago
common.props 22a115f142 style: Update code style 3 years ago

README.md

NatTypeTester

Channel | Status -|- CI | CI Stun.Net | NuGet.org

RFC supports

Internet Protocol

  • IPv4
  • IPv6

Transmission Protocol

  • UDP
  • TCP
  • TLS-over-TCP
  • DTLS-over-UDP

Preview

RFC3489

![](pic/RFC3489.png)

RFC5389

Binding Test

Checking for UDP Connectivity with the STUN Server ![](pic/RFC5780_4.2.png)

Mapping Behavior

Determining NAT Mapping Behavior ![](pic/RFC5780_4.3.png)

Filtering Behavior

Determining NAT Filtering Behavior ![](pic/RFC5780_4.4.png)

Combining Tests

![](pic/RFC5780_4.5.png)

STUN Server

Docker

docker pull hmbsbige/stunserver
docker run -d --restart=always --net=host --name=stunserver hmbsbige/stunserver --mode full --primaryinterface $IP1 --altinterface $IP2