惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
T
Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
Intezer
C
Cyber Attacks, Cyber Crime and Cyber Security
The Register - Security
The Register - Security
量子位
Security Latest
Security Latest
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
C
CXSECURITY Database RSS Feed - CXSecurity.com
MyScale Blog
MyScale Blog
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Spread Privacy
Spread Privacy
Jina AI
Jina AI
博客园 - 【当耐特】
P
Palo Alto Networks Blog
Last Week in AI
Last Week in AI
SecWiki News
SecWiki News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
G
GRAHAM CLULEY
宝玉的分享
宝玉的分享
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
The Blog of Author Tim Ferriss
V
Vulnerabilities – Threatpost
有赞技术团队
有赞技术团队
T
Tor Project blog
H
Hacker News: Front Page
A
Arctic Wolf
NISL@THU
NISL@THU
A
About on SuperTechFans
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
V
V2EX
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
I
InfoQ
D
Docker
L
LINUX DO - 最新话题
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
U
Unit 42

Rat's Blog - 内网穿透

Proxyer:一款简单且带Web面板的内网穿透工具 - Rat's Blog sish:一个开源、轻量且类似于Servo/Ngrok的内网穿透工具 - Rat's Blog 一款基于Frp的Web管理面板:FrpMgr安装及使用 - Rat's Blog
Spike-使用PHP实现的内网穿透工具 - Rat's Blog
博主: Rat's · 2017-08-01 · via Rat's Blog - 内网穿透

简介

  • 之前由于要与一个同事远程协作开发一款app需要用到内网穿透服务,在网上找到了frpngrok; 后来我在想能不能用php也写出来一个这样的服务软件? 大家都知道php多进程多线程不够友好,在window上还不支持; 写服务确实很吃力; 不过幸运的是有ReactPHP的存在,关于ReactPHP不做赘述有兴趣的同学可以自行百度。
  • 基于ReactPHPIO多路复用,使得Spike并没有比Frp性能差太多; 下面是我简单做的一个benchmark,基于apache ab检验http隧道的服务性能; 客户端与服务端都搭在本地,代理同事电脑上的http服务。不是特别符合应用场景,大家简单看一下。
  • 从下面的信息可以看出Spike性能似乎是稍微好点的,不过这个地方有点不公平,我在做spike的测试时只开启了服务端的日志,客户端的日志是关闭的; 而FRP的两端日志都是开启的;我不知道怎么关 frp 的日志;
  • 在这里简单提一点由于Spike的日志 IO 是同步的所以日志的读写会耗掉部分性能,提升日志等级减少日志写入可以提升不少的性能;
  • 这个项目是我比较上心的一个作品,算是证明了一点,php除了可以做网站也可以做服务,并且也没有太差。项目地址:https://github.com/slince/spike欢迎star,欢迎fork

Spike:

Concurrency Level:      10
Time taken for tests:   37.727 seconds
Complete requests:      100
Failed requests:        0
Total transferred:      2569900 bytes
HTML transferred:       2514600 bytes
Requests per second:    2.65 [#/sec] (mean)
Time per request:       3772.747 [ms] (mean)
Time per request:       377.275 [ms] (mean, across all concurrent requests)
Transfer rate:          66.52 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.4      0       3
Processing:   533 3602 591.9   3714    4096
Waiting:      516 3587 592.3   3701    4076
Total:        534 3602 591.9   3715    4097

Percentage of the requests served within a certain time (ms)
  50%   3715
  66%   3791
  75%   3822
  80%   3844
  90%   3970
  95%   4015
  98%   4053
  99%   4097
 100%   4097 (longest request)

Frp:

Concurrency Level:      10
Time taken for tests:   38.230 seconds
Complete requests:      100
Failed requests:        0
Total transferred:      2569900 bytes
HTML transferred:       2514600 bytes
Requests per second:    2.62 [#/sec] (mean)
Time per request:       3823.045 [ms] (mean)
Time per request:       382.304 [ms] (mean, across all concurrent requests)
Transfer rate:          65.65 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.2      0       1
Processing:   379 3650 644.4   3809    4140
Waiting:      360 3633 645.5   3789    4124
Total:        380 3650 644.4   3809    4140

Percentage of the requests served within a certain time (ms)
  50%   3809
  66%   3847
  75%   3909
  80%   3923
  90%   4026
  95%   4053
  98%   4129
  99%   4140
 100%   4140 (longest request)

原文地址:https://www.v2ex.com/t/371529#reply35


版权声明:本文为原创文章,版权归 Rat's Blog 所有,转载请注明出处!

本文链接:https://www.moerats.com/archives/233/

如教程需要更新,或者相关链接出现404,可以在文章下面评论留言。

Vultr新用户注册送100美元/16个机房按小时计费,支持支付宝,【点击查看】。