8000 GitHub - ciaos/stun-php: stun php 客户端
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ciaos/stun-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stun Client php

学习网上的stun python脚本做了一个同功能的php版本


功能描述

检测本机网络环境

使用方法

  • 运行程序获取结果 php test.php

NAT TYPE:Port Restricted NAT 3
MAPPED ADDRESS:218.17.55.162:15499
  • 找一个公共标准的Stun服务器,替换下面的服务器地址
<?php
include_once("STUNClient.php");
error_reporting(E_ERROR);
$sc = new STUNClient();
$sc->setServerAddr("stunserver.org");
$sc->createSocket();
print("NAT TYPE:" . $sc->natType2String($sc->getNatType()) ."\n");
print("MAPPED ADDRESS:" . $sc->getMappedAddr() . "\n");
?>

Weibo Account

Have a question? @littley

About

stun php 客户端

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0