ehang-io / nps

一款轻量级、高性能、功能强大的内网穿透代理服务器。支持tcp、udp、socks5、http等几乎所有流量转发,可用来访问内网网站、本地支付接口调试、ssh访问、远程桌面,内网dns解析、内网socks5代理等等……,并带有功能强大的web管理端。a lightweight, high-performance, powerful intranet penetration proxy server, with a powerful web management terminal.
https://ehang.io/nps/documents
GNU General Public License v3.0
30.58k stars 5.53k forks source link

HTTP Tunneling with images is slow #390

Closed codecube47 closed 4 years ago

codecube47 commented 4 years ago

Slow with images When running HTTP tunnel for my local server it working fine, But if we have images the public Ip is very slow

Screenshots or logs Screenshot from 2020-02-07 19-51-03

Server:

Client:

ffdfgdfg commented 4 years ago

Maybe you should check the bandwidth between your server and client,like upload a file from client to server use ssh,nps should not be too slow than it

codecube47 commented 4 years ago

Hi @ffdfgdfg I checked the connection between server and client it is pretty good, by the way, I will do more investigation about that.

I have also changed to bridge type to bridge_type=kcp it is improved connection speed but still hanging, Is there any setting that you can suggest me to check?

ffdfgdfg commented 4 years ago

Could you please trying to use tcp tunnel instead of http host tunnel?

codecube47 commented 4 years ago

Can you please then how can I do a subdomain name with that?

ffdfgdfg commented 4 years ago

Just for testing, or you can use nginx to reserve proxy the tcp tunnel port for subdomain.

yelky commented 4 years ago

if vmware client, try bridge(B),not nat

codecube47 commented 4 years ago

Problem was not fixed to me even TCP slow

ffdfgdfg commented 4 years ago

We meet some problem with CI, not release yet

codecube47 commented 4 years ago

Hi @ffdfgdfg, I just checked with the new release, still the same problem, http://a.krisps.xyz/

ffdfgdfg commented 4 years ago

Please give me the log both server and client,take a screenshot on client ping the server

codecube47 commented 4 years ago

@ffdfgdfg Here I have attached the screenshots

Server log file: server-nps.log

Screen Shots:

Screenshot from 2020-03-12 13-39-49 Screenshot from 2020-03-12 13-40-35 Screenshot from 2020-03-12 13-40-40 Screenshot from 2020-03-12 13-41-50 Screenshot from 2020-03-12 13-41-55 Screenshot from 2020-03-12 13-42-06 Screenshot from 2020-03-12 13-42-23 Screenshot from 2020-03-12 13-57-31

ffdfgdfg commented 4 years ago

Your log shows client disconnect from server many times, and some http request even not finish. If you upload some file to your server and speed looks like pretty good, trying to turn on crypt, or change bridge type to kcp, maybe your network been Qos.

codecube47 commented 4 years ago

Yea you are correct that is what I talking about, Everything loading except the image. image file is the one actually breaking.

I will check KCP, Do you think that may UAE block VPN?

ffdfgdfg commented 4 years ago

Try turn on crypt with tcp, crypt with kcp

codecube47 commented 4 years ago

Seems to be now it is working http://a.krisps.xyz/, but I feel like little slow, do you recommend any setting on server-side and do you recommend for production?

ffdfgdfg commented 4 years ago

Turn on tcp bbr, if you use tcp bridge, both server and client turn on it.

codecube47 commented 4 years ago

Thanks for that I will check TCP bbr. What do you think why TCP bridge not working for me?

ffdfgdfg commented 4 years ago

ISP block or something else, we provides crypt and kcp, for different situations, just try it

codecube47 commented 4 years ago

After I active TCP bbr, Then TCP bridge is working now

codecube47 commented 4 years ago

@ffdfgdfg Thanks for your help everything working fine and I must say this is a fantastic piece of software

ffdfgdfg commented 4 years ago

thx

codecube47 commented 4 years ago

Try turn on crypt with tcp, crypt with kcp

can we open both bridges at the same time? I mean different client deferent bridge

ffdfgdfg commented 4 years ago

Try turn on crypt with tcp, crypt with kcp

can we open both bridges at the same time? I mean different client deferent bridge

nope, you can run two server