{"id":15148615,"url":"https://github.com/oneclickvirt/gostun","last_synced_at":"2025-10-24T04:31:11.291Z","repository":{"id":238247892,"uuid":"796177147","full_name":"oneclickvirt/gostun","owner":"oneclickvirt","description":"本机NAT类型检测工具(Local NAT type detection tool)(NatTypeTester)","archived":false,"fork":false,"pushed_at":"2024-07-02T05:49:36.000Z","size":74,"stargazers_count":25,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-10-29T22:36:41.464Z","etag":null,"topics":["detector","freebsd","goecs","linux","nat","nattype","nattypetester","openbsd","rfc3489","rfc4787","rfc5780","stun","tcp","tls","udp"],"latest_commit_sha":null,"homepage":"https://github.com/oneclickvirt/ecs","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oneclickvirt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-05T07:00:08.000Z","updated_at":"2024-10-25T15:13:29.000Z","dependencies_parsed_at":"2024-05-05T08:20:26.024Z","dependency_job_id":"0c737778-67ed-47c9-a714-6148da7cb34f","html_url":"https://github.com/oneclickvirt/gostun","commit_stats":null,"previous_names":["oneclickvirt/gostun"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oneclickvirt%2Fgostun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oneclickvirt%2Fgostun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oneclickvirt%2Fgostun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oneclickvirt%2Fgostun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oneclickvirt","download_url":"https://codeload.github.com/oneclickvirt/gostun/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237915423,"owners_count":19386724,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["detector","freebsd","goecs","linux","nat","nattype","nattypetester","openbsd","rfc3489","rfc4787","rfc5780","stun","tcp","tls","udp"],"created_at":"2024-09-26T13:21:07.287Z","updated_at":"2025-10-24T04:31:11.286Z","avatar_url":"https://github.com/oneclickvirt.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gostun\n\n[![Hits](https://hits.spiritlhl.net/gostun.svg?action=hit\u0026title=Hits\u0026title_bg=%23555555\u0026count_bg=%230eecf8\u0026edge_flat=false)](https://hits.spiritlhl.net)\n\n[![Build and Release](https://github.com/oneclickvirt/gostun/actions/workflows/main.yaml/badge.svg)](https://github.com/oneclickvirt/gostun/actions/workflows/main.yaml)\n\n本机NAT类型检测工具\n\nLocal NAT type detection tool (NatTypeTester)\n\n## 类型说明[Information]\n\n```\nNatMappingBehavior:\ninconclusive\nendpoint independent (no NAT)\nendpoint independent\naddress dependent\naddress and port dependent\n```\n\n```\nNatFilteringBehavior:\ninconclusive\nendpoint independent\naddress dependent\naddress and port dependent\n```\n\n| NAT Type             | Nat Mapping Behavior          | Nat Filtering Behavior         |\n|----------------------|------------------------|----------------------|\n| Full Cone        | ```endpoint independent``` | ```endpoint independent``` |\n| Restricted Cone  | ```endpoint independent```   |  ```address dependent```  |\n| Port Restricted Cone |  ```endpoint independent```   |  ```address and port dependent```  |\n| Symmetric       | ```address and port dependent``` | ```address and port dependent``` |\n| Inconclusive    |           ```inconclusive```    |  ```inconclusive```         |\n\n## 使用说明[Usage]\n\n下载、安装、更新\n\n```\ncurl https://raw.githubusercontent.com/oneclickvirt/gostun/main/gostun_install.sh -sSf | sh\n```\n\n使用\n\n```\ngostun\n```\n\n或\n\n```\n./gostun\n```\n\n进行测试\n\n无环境依赖，理论上适配所有系统和主流架构，更多架构请查看 https://github.com/oneclickvirt/gostun/releases/tag/output\n\n```\nUsage: gostun [options]\n  -e    Enable logging functionality (default true)\n  -h    Display help information\n  -server string\n        Specify STUN server address (default \"stun.voipgate.com:3478\")\n  -timeout int\n        Set timeout in seconds for STUN server response (default 3)\n  -type string\n        Specify ip test version: ipv4, ipv6 or both (default \"ipv4\")\n  -v    Display version information\n  -verbose int\n        Set verbosity level\n```\n\n![图片](https://github.com/oneclickvirt/gostun/assets/103393591/303afc84-b92f-4e16-9d6c-1c9aa34a1221)\n\n\n## 卸载\n\n```\nrm -rf /root/gostun\nrm -rf /usr/bin/gostun\n```\n\n## 在Golang中使用\n\n```\ngo get github.com/oneclickvirt/gostun@v0.0.5-20250727155022\n```\n\n## 感谢[Thanks]\n\nhttps://datatracker.ietf.org/doc/html/rfc3489\n\nhttps://datatracker.ietf.org/doc/html/rfc4787\n\nhttps://datatracker.ietf.org/doc/html/rfc5389\n\nhttps://datatracker.ietf.org/doc/html/rfc8839\n\nhttps://github.com/pion/stun/tree/master/cmd/stun-nat-behaviour\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foneclickvirt%2Fgostun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foneclickvirt%2Fgostun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foneclickvirt%2Fgostun/lists"}