gonc是一款基于Golang开发的网络工具,旨在实现点对点通信与NAT穿透1。该工具支持通过-p2p参数实现零配置自动NAT穿透,用户仅需双方同意共享密码短语即可在不同网络间建立直接连接1。gonc采用TLS(TCP)和DTLS(UDP)加密传输方式,提供基于密码短语的相互身份认证1。
在NAT穿透实现上,gonc将NAT类型分为三类:Easy类型指单个内部端口映射到相同外部端口;Hard类型为映射到一致但不同的外部端口;Symmetric类型则映射到不同外部端口,被认为最为困难1。该工具采用多项穿透策略,包括多STUN服务器检测、优先IPv6连接、双向TCP监听、UDP延迟发送、TTL降低和600端口随机碰撞等1。gonc集成公开STUN和MQTT服务用于地址交换,不使用中继服务器实现真正的点对点通信1。
gonc提供跨平台支持,包括桌面应用gonc-gui和Android应用1。该工具支持文件传输、SOCKS5代理、HTTP文件服务、流量转发和远程Shell等多种应用场景,可用于跨设备、跨网络的安全P2P直连1。
Gonc is a Golang-based networking tool designed to enable peer-to-peer communication with automatic NAT traversal capabilities 1. The tool requires only a shared passphrase between two parties to establish direct connections across different networks without manual configuration, using the -p2p parameter 1. It supports both TLS encryption for TCP and DTLS encryption for UDP, with mutual authentication based on passphrase exchange 1.
The tool categorizes NAT types into three levels of complexity: Easy, where a single internal port maps to the same external port; Hard, where ports map to consistent but different external ports; and Symmetric, which represents the most challenging scenario with mappings to varying external ports 1. To overcome these obstacles, gonc implements multiple strategies including detection via multiple STUN servers, preference for IPv6 connections, bidirectional TCP listening, UDP delayed transmission, TTL reduction, and randomized port collision attempts across 600 ports 1.
Gonc achieves true peer-to-peer connectivity by integrating public STUN and MQTT services for address exchange without relying on relay servers 1. Beyond basic connectivity, the platform offers graphical interfaces through gonc-gui for desktop and Android applications, enabling secure file transfer across devices and networks 1. Additional features include SOCKS5 proxy support, HTTP file serving, traffic forwarding, and remote shell capabilities 1.
评论
还没有评论,欢迎留下第一条。