← 返回命令列表

Linux command

pystun3 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Check NAT type

pystun3

Use specific STUN server

pystun3 -H [stun.example.com]

Specify source port

pystun3 -p [54320]

Use specific interface

pystun3 -i [192.168.1.100]

Enable debug logging

pystun3 -d

Specify STUN server port

pystun3 -H [stun.example.com] -P [3478]

说明

pystun3 is a STUN (Session Traversal Utilities for NAT) client that discovers the type of NAT between a host and the internet. It communicates with a STUN server to determine the NAT classification (full cone, restricted cone, port restricted, or symmetric) and reports the external IP address and mapped port. Understanding NAT type is essential for configuring VoIP, video conferencing, and peer-to-peer applications that require direct connections between hosts. The tool can target specific STUN servers and bind to particular network interfaces.

参数

-H _STUN_HOST_, --host _STUN_HOST_
STUN server hostname.
-P _STUN_PORT_, --host-port _STUN_PORT_
STUN server port (default: 3478).
-p _SOURCE_PORT_, --port _SOURCE_PORT_
Source port to listen on (default: 54320).
-i _SOURCE_IP_, --interface _SOURCE_IP_
Network interface for client (default: 0.0.0.0).
-d, --debug
Enable debug logging.
--version
Show program version.

FAQ

What is the pystun3 command used for?

pystun3 is a STUN (Session Traversal Utilities for NAT) client that discovers the type of NAT between a host and the internet. It communicates with a STUN server to determine the NAT classification (full cone, restricted cone, port restricted, or symmetric) and reports the external IP address and mapped port. Understanding NAT type is essential for configuring VoIP, video conferencing, and peer-to-peer applications that require direct connections between hosts. The tool can target specific STUN servers and bind to particular network interfaces.

How do I run a basic pystun3 example?

Run `pystun3` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -H _STUN_HOST_, --host _STUN_HOST_ do in pystun3?

STUN server hostname.