fatedier / frp

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.
Apache License 2.0
80.97k stars 12.78k forks source link

如果增加兼容openwrt之类的开源路由系统那就更好了 #96

Closed kson34 closed 7 years ago

fatedier commented 7 years ago

很抱歉,我对这方面不是很熟悉,而且也没有相关的测试环境,如果有其他人能提供一些帮助就更好了。

wxyzh commented 7 years ago

客户端在 r6300v2上使用正常,固件是tomato

fatedier notifications@github.com于2016年8月24日周三 16:05写道:

很抱歉,我对这方面不是很熟悉,而且也没有相关的测试环境,如果有其他人能提供一些帮助就更好了。

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fatedier/frp/issues/96#issuecomment-241987985, or mute the thread https://github.com/notifications/unsubscribe-auth/ASpHqUaCwyMj69iOTTiewoCaRjf4tB9Jks5qi_svgaJpZM4Jrrxh .

FlashSoft commented 7 years ago

看这里 http://www.right.com.cn/forum/thread-191839-1-1.html

iseeyou commented 7 years ago

@FlashSoft 正常,就是版本不是最新的,Gzip打不开 sshot-3

FlashSoft commented 7 years ago
qq20160825-0 2x
FlashSoft commented 7 years ago

对了,需要再注意下,由于log库在op上编译的有点不兼容,所以需要启动的时候把log指向到一个/dev/null 如果是使用老毛子固件需要指向到/dev/zero

fprc -c xxx.conf -L /dev/zero

fatedier commented 7 years ago

@FlashSoft 感谢支持,我学习一下,争取后续发布新版本时编译一个 mips32 的版本。 @iseeyou 0.8.0 的 gzip 选项其实已经生效,只是非特权模式创建的代理在 dashboard 上的展示没有更新。

FlashSoft commented 7 years ago

@fatedier 其实大家感谢你开发的frp,这样让大家可以弃用ngrok了,毕竟frp可以不影响服务器的80 443之类的

iseeyou commented 7 years ago

路由器上web关闭gzip性能提升不少,打开了卡顿明显。可能是路由器性能限制。

se77en commented 7 years ago

@FlashSoft ngrok 放 docker 里可以解决 80,443 的问题,不过还是没有 frp 好用

FlashSoft commented 7 years ago

嗯,所以才说frp更方便:)期待@fatedier 的后续更新

shutup commented 7 years ago

@fatedier 搭建go-mips32的docker镜像,我这篇文章以frp为例的,顺便感谢 @FlashSoft

fatedier commented 7 years ago

@shutup Great!

chmis8000 commented 7 years ago

@fatedier @iseeyou 网上搜索,据说 lz4压缩算法省CPU,压缩速度非常快,不知道有人是否能够 比较一下 go实现的 lz4和 gzip 。说不准增加一个算法lz4,专用于路由器等低性能设备可以使用压缩特性: https://github.com/bkaradzic/go-lz4 https://github.com/pierrec/lz4

一个比较: http://catchchallenger.first-world.info/wiki/Quick_Benchmark:_Gzip_vs_Bzip2_vs_LZMA_vs_XZ_vs_LZ4_vs_LZO Stream test: 压缩时间:gzip: 376,lz4:130,不压缩:10 解压缩:gzip: 1797,lz4:809,不压缩:9 内存: gzip:0.5M lz4:0M none:0M 压缩率:gzip:0.99 lz4:1.59,不压缩:1(这个感觉不对啊)

fatedier commented 7 years ago

@chmis8000 go 1.7 的 gzip 默认压缩算法好像是换成 snappy 了,效率更高,资源占用低,但是压缩率要差一些,后面有时间了会研究比对一下。

目前还主要在加功能,后面差不多的时候会考虑重构一下代码,进行一些专门的优化。

soulteary commented 7 years ago

@fatedier 的工具棒棒哒。

@shutup 感谢分享,不过现在参考你的文章或者https://github.com/lnterface/go-mips32le 执行编译32位frp的时候都会出现一些小问题。

我补充点东西,以免后来人踩坑。

准备编译环境中,不论使用alpine3.3/3.4,搭配gomini/go-mips32源的代码,都会出现unknown relocation type 42; compiled without -fpic?的错误。

参考 https://github.com/golang/go/issues/13114https://github.com/gliderlabs/docker-alpine/issues/182 解决方案有两个,一个打补丁,一个是env关掉cgo。(偷懒暂时先关闭,明天详细看一下作者的修改记录,评估下mips go 1.4.2->1.7 麻烦否,如果不麻烦就升级1.7了)

执行编译的时候,发现博文中提到的工具有的仓库已经被作者删除/隐藏,中断again.... 明天围观下frp现在的编译再继续补充。

另外,在构建过程中,我发现你clone了go mips32全部的代码,实则木有必要,--depth 1即可。 在编译frp的过程中,直接取最新代码不可取,应该取 @fatedier release stable的版本呀,不过 docker 中

RUN git clone --branch v0.8.1 https://github.com/fatedier/frp.git --single-branch --depth 1

会因为notice中断,可以考虑使用wget zipball, unzip zipball的方式来解决,go get 似乎可以取本地的代码构建,而不用一律取github上的,毕竟utils里的代码已经check到本地了...

fatedier commented 7 years ago

Go1.8 开始会支持 mips32。

piiiiiiiiiiiiiii commented 7 years ago

请问楼主 @FlashSoft

tomato advanced 路由器Tenda N6 芯片Broadcom BCM5357 ,能用frp吗?

我下载了这个mpls版客户端,有5m多,路由器放不下

http://www.right.com.cn/forum/thread-191839-1-1.html

f8q8 commented 5 years ago

放到/tmp目录,缺点就是每次路由器重启后,这个玩意儿就没有了,

NemoAlex commented 5 years ago

实测目前的版本在 X64 上面可以很好地运行。 分享一个刚写的启动脚本: https://gist.github.com/NemoAlex/d9bfb0a45c8d04eaf356753fb7be8971 图省事就放 /root 了,并且用 root 用户启动了。想改可以自己改一下。

f8q8 commented 5 years ago

@NemoAlex 很不错,要是有界面就更好了,